Documentation
¶
Overview ¶
Package packagecheck is the one check of the harness packages (work item 382): the static rules that `make plugin-check`, `muse-plugin-check`, `codex-plugin-check`, `grok-plugin-check` and `antigravity-plugin-check` hold of plugin/, muse/brigade/, codex/brigade/, grok/brigade/ and antigravity/brigade/. It was four shell scripts, one per package, each with its own copy of what they share: the allow-list of files, the assets equal to plugin/bin's, the bootstrap's mode in git, the version the manifest declares, the shells the scripts parse under, and that no skill takes the model's reach away. Those are written once here; what a package has of its own (its manifest's form, how its hooks are worded, its marketplace file) is beside them, one file a harness.
A check reads the tree and runs git, sh and shellcheck where they are; it starts no host and changes nothing. Its lines are the scripts' own: `ok: …` on stdout for each rule held, one `<name>: …` line on stderr for the first rule broken, and exit status 1.
Index ¶
- Constants
- Variables
- func AntigravitySource(root string) error
- func DescriptionFits(skill string) error
- func DescriptionLength(skill string) (int, error)
- func GrokSource(root string) error
- func IDs() []string
- func Run(id string, o Options) (status int)
- func WritePin(root, commit string) error
- type Options
- type Pin
Constants ¶
const ( // CodexMarketplace and GrokMarketplace are the two files that carry // the pin. CodexMarketplace = ".agents/plugins/marketplace.json" GrokMarketplace = ".grok-plugin/marketplace.json" // PinURL is the repository both entries fetch the package from. PinURL = "https://github.com/appshapes/brigade.git" )
The pin of the Codex CLI and Grok Build packages (work item 424, ADR 0030). Both harnesses are given this repository as a plugin marketplace and read its marketplace file from the default branch. Until the pin each file named the package's directory, so a member had what `master` held when their harness last looked. Now each names the package at one commit, the commit of the last published release, and the release sequence is what moves it (scripts/release-pin.sh). A push to `master` changes nothing for a member; the commit that moves the pin does.
const DescriptionLimit = 1024
DescriptionLimit is the most characters the `description` of a skill may have: over it, a host may not load the skill at all (work item 306; the owner's ruling of 2026-11-13, a second deliberate carve-out from the ruling of 2026-09-08 that CI does not police what a skill declares). It is the smallest limit a host enforces, as read on 2026-11-23:
- The Agent Skills format, which all five hosts' skills follow (https://agentskills.io/specification): "Must be 1-1024 characters."
- Codex CLI refused the skill, "invalid description: exceeds maximum length of 1024 characters", through release 0.141.0 (codex-rs/core-skills/src/loader.rs at the tag rust-v0.141.0: MAX_DESCRIPTION_LEN is 1024, counted with chars().count() after runs of whitespace are made one space). From 0.142.0 its parser checks the name's length alone (codex-rs/skills/src/parser.rs), and shortens descriptions only to fit the list's budget. A member may run either.
- Claude Code documents no refusal: its listing cuts the description and `when_to_use` together at 1,536 characters (https://code.claude.com/docs/en/skills).
- Muse Code documents no limit on a description: a SKILL.md may be 262,144 bytes, and the whole catalog has a budget under which a row loses its description (https://meta-models.github.io/muse-code-sdk/next/guides/extend/skills/). Not measured.
- Grok Build: no page of its documentation on skills was found, and its binary (1.0.92) carries no message about a description's length. Not measured.
The count is of characters (Unicode code points) of the value a YAML parser gives, so a folded scalar (`>-`) counts as the loader reads it and not as its raw lines. Codex counted after collapsing whitespace, which is never more.
Variables ¶
var AntigravitySkills = GrokSkills
AntigravitySkills are the fifteen skills Antigravity CLI's package carries, by directory: the same as every package's.
var ClaudeHookSubcommands = []string{"prompt", "session-end", "session-start", "stop"}
ClaudeHookSubcommands are the `brigade hook` subcommands the Claude Code plugin's hooks may name. A test holds them to the hook package's own.
var GrokSkills = []string{"email", "join", "move", "quiet", "sessions", "setup", "slack", "subscribe", "team-messaging", "update", "whoami", "work-item", "work-item-next", "work-item-start", "work-items"}
GrokSkills are the fifteen skills Grok Build's package carries, by directory: its check holds the package to exactly these.
var PointedHookSubcommands = []string{"prompt", "session-end", "session-start"}
PointedHookSubcommands are the `brigade hook` subcommands a Muse Code wrapper or a Codex CLI hook command may name: neither host has a Stop hook of Brigade's.
Functions ¶
func AntigravitySource ¶ added in v0.62.0
AntigravitySource holds the source of Antigravity CLI's package under root: its files, its skills, its manifest and its three hooks.
func DescriptionFits ¶
DescriptionFits is nil for a SKILL.md whose description a loader accepts, and otherwise says why not, with the length.
func DescriptionLength ¶
DescriptionLength is the number of characters in the `description` of a SKILL.md's frontmatter as a loader reads it; 0 for a file with no frontmatter or no description, which is not this check's to refuse (the ruling is about a description too long to load, and no more). An error is frontmatter that is never closed or that no YAML parser reads, so nothing can be counted.
func GrokSource ¶
GrokSource holds the source of Grok Build's package under root: its files, its skills, its manifest and its four hooks. Source validation deliberately makes no live-host or release-readiness claim; the check's strict mode separately requires release-produced pins.
func Run ¶
Run checks the package of the harness id and returns the exit status: 0 when every rule holds, 1 at the first that does not, 2 for a harness that has no check or an argument the check does not take.
Types ¶
type Options ¶
type Options struct {
// Root is the repository's root, which the scripts took as their
// working directory.
Root string
// Environ is the environment git, sh and shellcheck are found and run
// with, and where CI is read.
Environ []string
// Args are the check's own arguments (Grok Build's takes `--source`).
Args []string
// Stdout and Stderr receive the check's lines.
Stdout, Stderr io.Writer
}
Options are what one check is run with.
type Pin ¶ added in v0.60.0
type Pin struct {
// Commit is the commit both files name.
Commit string
// Release is the release tag at that commit, "" where the tree cannot
// say: no git repository, or a clone whose release tags do not reach
// the release plugin/bin/VERSION pins.
Release string
// Ahead is the release plugin/bin/VERSION pins, when that release is
// tagged and the two files still name another: a release whose last
// step has not run yet, or did not run.
Ahead string
}
Pin is where the two marketplace files stand.
func MovePin ¶ added in v0.60.0
MovePin writes the commit into both marketplace files and reads the pin the tree then has. A commit that breaks the pin's rules is refused with both files as they were.