skillremove

package
v0.60.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package skillremove opens the pull request a `skill: remove <name>` request asks for (run skills design D44): one commit deleting `.agents/skills/<name>/` on `maku/skill-remove-<name>`, made by the factory with no model and no run. A human merges it; nothing here touches the default branch.

Index

Constants

View Source
const ReasonUnsupported = "skill_removal_unsupported"

ReasonUnsupported is the task's end reason for an UnsupportedError.

Variables

View Source
var ErrBranchExists = errors.New("skill_removal_branch_exists")

ErrBranchExists is maku/skill-remove-<name> left behind by a closed removal pull request, or holding anything but this removal: opening a pull request on it would propose whatever commit it holds, so the request is refused until a maintainer deletes the branch. Nothing is force-moved.

View Source
var ErrNotFound = errors.New("skill_not_found")

ErrNotFound is a skill not on the default branch, or a name no skill can have.

View Source
var ErrOff = errors.New("skill_removal_off")

ErrOff is a repository with no connection that can open a removal pull request.

Functions

func Evidence

func Evidence(body string) string

Evidence is body's `## Evidence` section, trimmed, at most maxEvidence bytes; "" when absent.

Types

type Git

type Git interface {
	RepositoryInfo(ctx context.Context) (forge.RepositoryInfo, error)
	DefaultBranchHead(ctx context.Context) (string, error)
	SubtreeSHA(ctx context.Context, commit, dir string) (string, bool, error)
	Tree(ctx context.Context, sha string, recursive bool) ([]forge.TreeEntry, bool, error)
	DeleteFiles(ctx context.Context, base string, paths []string, message string) (string, error)
	CreateBranchAt(ctx context.Context, branch, sha string) error
	ResolveRef(ctx context.Context, ref string) (string, error)
	CompareFiles(ctx context.Context, base, head string) ([]forge.FilePatch, error)
	CreatePR(ctx context.Context, base, head, title, body string, draft bool) (forge.PR, error)
	PullRequestForBranchInto(ctx context.Context, branch, base string) (int, error)
	PullRequest(ctx context.Context, number int) (forge.PR, error)
}

Git is the repository connection a removal needs; *forge.GitHub implements it.

type Result

type Result struct {
	Number  int
	URL     string
	Created bool
}

Result is the pull request, and whether this call opened it.

func Open

func Open(ctx context.Context, g Git, name string, issue int, evidence string) (Result, error)

Open opens, or finds open, the pull request removing name, requested in issue with evidence, into the repository's default branch. It is safe to call again: an open pull request from the branch is answered, never a second, and a branch an earlier call made but opened no pull request on is reused when it holds exactly this removal.

type UnsupportedError

type UnsupportedError struct{ Why string }

UnsupportedError is a skill directory a removal commit is not built for: a retry gets the same answer, so the request ends. Why is one of the package's fixed phrases, never repository text.

func (*UnsupportedError) Error

func (e *UnsupportedError) Error() string

Error implements error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL