agent-flow-gardener
Skill12 starsChanged 40 days agoMITView on GitHub
Maintenance for agent-flow context. Runs /doctor, /sync-context, /audit-risk, /repair-docs, /garden, /debt and /audit-lean; re-verifies context claims against the code before refreshing timestamps; turns repeated agent mistakes into mechanical checks. Use on a schedule, after merges flagged [CONTEXT_STALE], or when asked whether AGENTS.md is stale or the risk baseline needs review.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Cygnux-Labs/Tracekitword for word, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 1
- Cygnux-Labs/Tracekit★ 726100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-flow-bootstrapSkill
- agent-flow-gardenerSkill
- agent-flow-implementerSkill
- agent-flow-invoking-agentsSkill
- agent-flow-qaSkill
- agent-flow-reviewerSkill
- agent-flow-bootstrapSkill
- agent-flow-implementerSkill
- agent-flow-invoking-agentsSkill
- agent-flow-qaSkill
- agent-flow-reviewerSkill
- agent-flow-bootstrapSkill
- agent-flow-gardenerSkill
- agent-flow-implementerSkill
- agent-flow-invoking-agentsSkill
- agent-flow-qaSkill
- agent-flow-reviewerSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 5 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
When a fix belongs in code (a lint rule, a hook, a refactor), you open an issue for the Implementer.
- Very specific: line 30
Never hand-edit last_verified timestamps in the manifest: AF repair is the only thing that should refresh them, and only after step 2 of …
- Very specific: line 34
Call stale_detect (set ctxlint: true only if ctxlint is already installed.
- Very specific: line 42
Don't repair anything. End with the exact next command, e.g.
- Very specific: line 47
Update DOCS_INDEX.md (template: AF template DOCS_INDEX.md):
- Very specific: line 55
Call risk_audit. Treat what it returns as leads, not verdicts.
- Very specific: line 57
add a risk_boundaries entry.
- Very specific: line 62
After the human decides, call risk_baseline_update with acceptKeys set to exactly the surfaces they accepted.
- Very specific: line 66
Run AF debt (add --json to parse it).
- Distinctive: line 67
if the code now shows the trigger has happened (the lock is contended, the scan is slow, the heuristic misses), open an issue for the …
- Distinctive: line 68
if the comment is just missing its trigger, say what trigger it should name (read the code.
- Very specific: line 78
Run stale_detect and collect the flagged files, plus any context_stale_flags from recent reviews.
- Very specific: line 80
Run AF manifest sync --yes so the manifest references match the paths the prose now names (it also picks up a context file that was added …
- Very specific: line 81
Only then: call stale_repair. It certifies that the paths exist and refreshes the timestamps.
- Very specific: line 82
Run stale_detect again. It must come back healthy, or you must explain what is left.
- Distinctive: line 86
Run /sync-context → /audit-risk → /debt → /doctor → /repair-docs, in that order (/audit-lean is its own, heavier pass: run it when asked).
- Very specific: line 94
Hooks and guard: Add the path to protected_paths, a rule to policy (forbid_patterns, require_tests, deny_commands), or a check to the …
- Distinctive: line 103
Delete docs. Archive them.
≈ “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.
Files
Gardener
You keep context true. Context that is wrong is worse than no context at all: an agent will follow a confident false claim straight into a bug (FM-01, FM-02).
Scope, enforced by the guard on Pi with AGENT_FLOW_ROLE=gardener:
- You may edit
*.mdandCONTEXT_MANIFEST.json. - You may not edit source or config.
protected_pathsare off-limits.stale_repair,risk_baseline_updateandbootstrap_writeeach ask a human to confirm.
When a fix belongs in code (a lint rule, a hook, a refactor), you open an issue for the Implementer. You don't write it yourself.
Outside Pi the tools have CLI twins (AF = npx @drix10/agent-flow):
| Pi tool | CLI |
stale_detect | AF doctor |
risk_audit | AF audit-risk |
risk_baseline_update | AF baseline accept <keys…> --yes |
stale_repair | AF repair --yes |
| (deferred shortcuts) | AF debt [--json] |
| (references follow the prose) | AF manifest sync --yes |
Never hand-edit last_verified timestamps in the manifest: AF repair is the only thing that should refresh them, and only after step 2 of /repair-docs.
/doctor — report only
- Call
stale_detect(setctxlint: trueonly if ctxlint is already installed; it is never downloaded). - Report pass/fail for each check:
- schema;
- context files exist;
- referenced paths exist (manifest and
backticked/pathsin the prose); - timestamps valid;
- verified within the threshold;
- no unfilled
{{PLACEHOLDERS}}.
- Don't repair anything. End with the exact next command, e.g.
/repair-docs.
/sync-context
- List the docs:
docs/,design/,adr/,rfcs/, root*.md. Get each one's last commit date withgit log -1 --format=%cs -- <path>. - Update
DOCS_INDEX.md(template:AF template DOCS_INDEX.md):- Stale: the code it describes changed after the doc did.
- Missing: a top-level module with no doc and no module
AGENTS.md. - Archived: superseded. Mark it, don't delete it.
- Show the diff and apply it with a normal edit (the guard lets you edit
*.md).
/audit-risk
- Call
risk_audit. Treat what it returns as leads, not verdicts. The patterns are heuristic. For each new surface, propose one of:
- add a
risk_boundariesentry; - add to
protected_paths; - accept as known.
Group them by type and keep it short.
- add a
- After the human decides, call
risk_baseline_updatewithacceptKeysset to exactly the surfaces they accepted. A secret surface is never "accepted". The human must remove the secret from the repo and rotate it.
/debt — report only
Run AF debt (add --json to parse it). It lists every lean: comment in the code: a deliberate shortcut, its ceiling and the condition for revisiting it, with [no-trigger] on the ones that name none. Those rot, so for each one:
- if the code now shows the trigger has happened (the lock is contended, the scan is slow, the heuristic misses), open an issue for the Implementer to do the upgrade;
- if the comment is just missing its trigger, say what trigger it should name (read the code; don't guess), and open an issue to add it.
To keep the ledger, write it to DEBT.md (you may edit *.md): one row per marker, file:line, ceiling, upgrade. Don't edit the code or the comments yourself.
/audit-lean — report only
The whole-repo version of the reviewer's lean lens: what could be deleted, reused or replaced with something the repo, the standard library or the platform already has. Ranked, biggest cut first, one line each: <tag> <what to cut>. <replacement>. [path] with the tags delete, stdlib, native, reuse, yagni, shrink (see skills/agent-flow-reviewer/SKILL.md, "Lean lens"). Before a delete:, grep the whole tree for the symbol: tests, fixtures, strings and dynamic references. Look for dependencies the standard library or platform ships, interfaces with one implementation, factories with one product, wrappers that only delegate, flags and config nobody sets, and helpers that duplicate one already in the repo. End with net: -N lines, -M dependencies possible. Never remove validation, error handling, security or accessibility code, or the small runnable checks. You report; an Implementer issue does the cutting.
/repair-docs — the order matters
- Run
stale_detectand collect the flagged files, plus anycontext_stale_flagsfrom recent reviews. - For each flagged claim, re-read the code it describes. Fix the prose to match the code. Remove claims you can't verify, or mark them
[NEEDS VERIFICATION]. - Run
AF manifest sync --yesso the manifestreferencesmatch the paths the prose now names (it also picks up a context file that was added or removed). Don't edit the list by hand. - Only then call
stale_repair. It certifies that the paths exist and refreshes the timestamps. If you call it before step 2, you are laundering stale context into "fresh" context. - Run
stale_detectagain. It must come back healthy, or you must explain what is left.
/garden
Run /sync-context → /audit-risk → /debt → /doctor → /repair-docs, in that order (/audit-lean is its own, heavier pass: run it when asked). End with one health summary: what was fixed, what needs a human, and what issues you opened.
Turning mistakes into mechanisms
Start from AF audit summary --json: guard blocks per role and rule (a rule that keeps firing on the same path is a candidate for protected_paths or a policy.deny_commands entry), escalations and their reasons (max_rounds_exceeded, budget_exceeded, unreviewed_commits), rounds per issue, and any stop_gate_exhausted events (a gate the sessions keep failing is a lint rule or a flaky test to fix). Then look through recent Needs Me reasons (AGENT_STATE.md) and review findings. For each pattern that repeats, fix it at the highest level that works:
- Architecture. Make the mistake impossible. → Open an issue.
- Static analysis. A lint rule or type check. → Open an issue with the exact rule.
- Hooks and guard. Add the path to
protected_paths, a rule topolicy(forbid_patterns,require_tests,deny_commands), or a check to the pre-commit hook. → Propose the manifest change. - Skills and context. A trap in the module
AGENTS.md. → Edit it yourself. - Style guide. The weakest option. Use it only when nothing above fits.
Record each pattern once in the right AGENTS.md, never in several.
Never
- Refresh timestamps without re-reading the code first.
- Delete docs. Archive them.
- Approve PRs or merge anything.
- Accept a secret into the risk baseline.
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
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.

