agentleFS
tylerjrbuelltylerjrbuell/Wardens/skills/wardens/SKILL.md

wardens

Skill2 starsChanged 11 days agoMITView on GitHub

Set up and maintain a warden team — the one-file config (.claude/wardens.yaml), adding or promoting wardens, checking who owns a path, linting the team (typos, overlaps, stale primer anchors, expired pilots), reading outcome metrics, and migrating from v0.2. Use when adopting wardens in a repo, adding or resizing a warden, or reviewing whether the team is earning its keep.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Commit .claude/wardens.yaml and .claude/agents/.

    line 69
  2. Very specific:

    After a week, read warden team and warden stats, resize owns/run where the guard denied legitimate work, then set mode: enforce.

    line 70

≈ “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

Wardens — admin

The CLI is bin/warden.mjs at the plugin root, two directories above this skill's base directory. It's one file with no dependencies and needs Node 18+. Below, warden means node <plugin-root>/bin/warden.mjs.

Where things live

PathHoldsGit
.claude/wardens.yamlThe team: every warden's kind, owns, run, expires, plus team settingscommit
.claude/agents/<name>.mdEach warden's prompt: name, description, tools, and its domain primercommit
.wardens/Runtime state: the outcome ledgergitignored

Authority (what the hooks enforce) is only ever in wardens.yaml. Agent files hold prose for the model.

Commands

CommandUse
warden init [--mode warn|enforce]Create a commented .claude/wardens.yaml (default warn) and gitignore .wardens/
warden new <name> --owns "<glob>" [--owns …] [--run "<cmd>" …] [--kind domain|specialist]Append a warden to wardens.yaml. Creates .claude/agents/<name>.md from a template, or keeps an existing agent file, so promoting a subagent you already have is one command
warden team [--json]The roster: kind, owned globs, number of allowed commands, missions and first-pass rate from the ledger, agent file
warden route <path…>Who owns a path. Exits 1 for unowned or ambiguous paths
warden doctor [--strict]Lint the team: unknown keys (with did-you-mean), bad values, declared wardens without agent files, agents that look like wardens but aren't declared, owned-path overlaps, expired pilots, stale primer anchors. Exits 1 on errors (or warnings with --strict). Put it in CI
warden stats [--json]Per-warden dispatches, first-pass completion, retries, rejected briefs, guard denials, malformed reports, mean confidence
warden check brief --warden <name> < file / warden check report < fileValidate a contract block by hand
warden migrate [--dry-run]v0.2 → v0.3: fold warden: frontmatter blocks and .wardens/config.json into wardens.yaml

.claude/wardens.yaml

# yaml-language-server: $schema=https://raw.githubusercontent.com/tylerjrbuell/wardens/main/schema/wardens.schema.json
version: 1
mode: warn                      # enforce | warn
# confidence-floor: 0.7         # reports at/above this need `verification`
# ownership-file: tools/ownership.json   # read owned globs from an existing [{glob, owner}] map
never-run:                      # added to the built-ins (git commit/push/tag/rebase, git stash/clean/reset --hard/restore, *publish)
  - terraform apply
# always-run: []                # added to the built-in read-only commands
# ledger: .wardens/ledger.jsonl
# agent-dirs: [.claude/agents]

wardens:                        # keep this section last so `warden new` can append to it
  payments-warden:
    kind: domain                # domain: owns code | specialist: writes only its own reports
    owns:
      - services/payments/**
    run:                        # prefix-matched per shell segment; omit to guard only never-run; ["*"] = anything not in never-run
      - npm test -- services/payments
    expires: 2027-01-31         # optional pilot window
  debrief-scribe:               # bundled agents: override only the keys you need
    owns:
      - docs/debriefs/**
  • Bundled agents (debrief-scribe, evidence-warden) are wardens out of the box, with defaults built into the CLI (debrief-scribe owns docs/debriefs/**, evidence-warden owns docs/evidence/**). Declaring them here overrides key by key.
  • ownership-file keeps an existing path → owner map as the single source: a warden's authority is its owns plus every glob the map assigns to it, and owner: null rows stay unowned.
  • Problems don't disable the guard. An invalid key is reported by doctor, and the rest of the file still loads.

Adopting in a repo

  1. Install the plugin (see README) and run warden init. You start in warn mode: the hooks record what they would deny, and block nothing.
  2. Map ownership. Pick the 2–4 areas where mistakes are costly and the context isn't obvious: invariants, past incidents, quirks. Don't give a warden a directory that the main thread handles fine on its own.
  3. warden new for each, or copy the closest tested example from examples/ at the plugin root. Write each domain primer with things that are true but not obvious from the code: invariants, failure history with anchors, and "never X because Y". Keep it under ~80 lines. doctor checks anchors (path/file.ts:123), so a stale primer fails CI instead of quietly misleading the warden.
  4. Commit .claude/wardens.yaml and .claude/agents/. Add warden doctor to CI.
  5. After a week, read warden team and warden stats, resize owns/run where the guard denied legitimate work, then set mode: enforce.

Reading the numbers

SignalLikely causeFix
Low first-pass rateVague briefs, or a stale primerTighten success criteria; run doctor
Many guard denialsAuthority too narrow, or warden driftingLook at the denied paths in the ledger. Widen in wardens.yaml (with user sign-off) or sharpen out-of-scope
Many rejected dispatchesParent skipping the brief, or briefs widening authorityUse the mission-brief skill; split cross-owner missions
Mean confidence high but verification often failsConfidence not tied to evidenceRe-read the upward-report rubric
missions: 0 for weeks in warden teamDoesn't earn its slotRemove it from wardens.yaml. A smaller roster is better

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.