agentleFS
govctl-orggovctl-org/govctl/.claude/skills/guard-writer/SKILL.md

guard-writer

Skill276 starsChanged 38 days agoMITView on GitHub

Define reusable, non-interactive verification guards with stable commands and risk-matched scope

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check gov/config.toml for project defaults.

    line 22
  2. Distinctive:

    Do not create a guard for a one-off diagnostic.

    line 27
  3. Distinctive:

    Do not add a heavy or domain-specific guard to project defaults just because it is reusable.

    line 28
  4. Distinctive:

    Do not delete a guard without explicit user authorization.

    line 30
  5. Distinctive:

    No interactive commands, prompts, or TTY-dependent behavior.

    line 32
  6. Distinctive:

    Stop when the command gives no stable evidence for a named risk.

    line 33
  7. Distinctive:

    run non-interactively from the project root.

    line 43
  8. Distinctive:

    check one named risk with a stable exit status.

    line 44
  9. Distinctive:

    use the narrowest reliable test, lint, schema, or validation target.

    line 45
  10. Very specific:

    use a pattern only when exit status cannot prove the condition.

    line 47
  11. Very specific:

    Keep commands simple and portable.

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Guard Writer

Define reusable executable completion checks under [[RFC-0000:C-GUARD-DEF]]. This helper owns guard quality; the invoking workflow decides which Work Items use a guard.

Discovery

govctl guard list
govctl guard show <GUARD-ID>
govctl work show <WI-ID>

Check gov/config.toml for project defaults. Use govctl <resource> --help for current syntax.

Hard Stops

  • Do not create a guard for a one-off diagnostic.
  • Do not add a heavy or domain-specific guard to project defaults just because it is reusable.
  • Do not delete a guard without explicit user authorization; hand deletion to the invoking workflow.
  • No interactive commands, prompts, or TTY-dependent behavior.
  • Stop when the command gives no stable evidence for a named risk.

Writing A Guard

A guard has id, title, optional refs, a command, optional timeout_secs, and an optional output pattern. Let govctl guard handle serialization and field validation.

The command should:

  • run non-interactively from the project root;
  • check one named risk with a stable exit status;
  • use the narrowest reliable test, lint, schema, or validation target;
  • set a timeout that fits its expected cost; and
  • use a pattern only when exit status cannot prove the condition.

Keep commands simple and portable. Reference the RFC or ADR the guard helps verify. For a reusable scenario with a Conformance Case, add the guard to that Case's guards field; never put CONF-* IDs in guard refs.

Placement

  • verification.default_guards are the intersection of checks every Work Item needs: fast, stable, environment-independent, and relevant even to documentation-only work.
  • A Work Item's verification.required_guards add reusable checks chosen from its changed surface, references, and criteria.
  • Full suites belong on cross-cutting items, release checks, or changes no narrower guard can cover.
  • A waiver needs a specific reason and applies to the effective default plus item guard set. Repeated waivers mean the guard's scope is wrong; fix the scope instead of waiving again.

Checklist

  • The ID and metadata are clear and unique, and no existing guard already serves the same purpose.
  • Timeout and pattern are present only when needed.
  • Placement as default or required matches actual scope.
  • govctl check passes; it validates schema, identity, references, and pattern syntax.
  • The command has been run once when the guard is new or materially changed.

Hand VCS work to the commit skill.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.