docs-gardener
Skill34 starsChanged 52 days agoApache-2.0View on GitHub
Autonomously capture the *why* behind a work session into a project's docs: the human decisions, tradeoffs, connections, and steering points that can't be inferred from the code. Runs at the end of a session (or on demand), records ONLY what was actually decided or discovered this session, appends dated entries to the decision log, makes surgical in-place edits to the intent/architecture docs, prunes what's gone stale, and writes it all WITHOUT asking, held to strict anti-bloat guardrails instead of a human approval gate. It never touches code-derivable facts (signatures, usage, structure). Those belong to tests. Use on "/docs-gardener", "garden the docs", "tend the docs", "capture the context", "update the why docs", or wire it to a session-end hook. Supersedes sync-docs for the why-layer.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- comcreate-io/comcreate-skillstheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- comcreate-io/comcreate-skills★ 0same name
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.
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 13 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
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
- Distinctive: line 19
When you change code, the docs describing *how it works* go stale on their own, and those aren't yours to maintain by hand anyway.
- Very specific: line 47
CONVENTIONS.md: only patterns the code doesn't already make obvious. - Distinctive: line 66
If you cannot point to where in the session (the conversation or the diff) it came from, you do not write it.
- Distinctive: line 70
3 · The reconstruction test, a hard filter: Before writing any line, ask: *"If I deleted this and kept only the code plus the git history, …
- Distinctive: line 91
A nameable trigger: "read this before X.": If you can't say *when* an agent should load it, don't make it.
- Distinctive: line 95
One truth, no rival: Must not overlap or compete with an existing doc.
- Very specific: line 106
Gather the session: Read the working git diff (against the session's start) and the decisions/tradeoffs/steering that came up in the …
- Distinctive: line 113
If a survivor has no home, apply the five-rule gate in "Creating a new doc".
- Distinctive: line 115
Pull one weed: When you edit a doc, glance over the whole file and cut one line that's now stale, contradicted, or code-derivable.
- Distinctive: line 139
Never ask for approval: you are autonomous by design.
- Distinctive: line 140
Never write a *why* you can't source to this session (no invented rationale).
- Distinctive: line 141
Never document anything recoverable from the code (signatures, usage, structure).
- Distinctive: line 142
Never create a new doc unless all five new-doc rules pass, and never leave one unwired or as a rival to an existing doc.
- Distinctive: line 143
Never rewrite a doc wholesale or generate prose to "fill it out."
- Distinctive: line 144
Never let a doc grow every session: pull a weed whenever you plant.
≈ “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
docs-gardener
Overview
When you change code, the docs describing how it works go stale on their own, and those aren't yours to maintain by hand anyway; tests are. This skill maintains the other layer, the why: the decisions, connections, and steering points that a reader (human or agent) cannot recover from the code. That layer only changes when a human changes their mind, so it needs a human's knowledge to update, but not a human's discipline.
That distinction is the whole design. In practice you will not stop mid-flow to update a doc, so a skill that asks permission just means the docs rot while feeling safe. docs-gardener runs autonomously and writes without asking. The safety comes not from a gate you won't use, but from guardrails strict enough that an unattended write is still trustworthy. It is built to do nothing most of the time, and to add a line only when a real decision demands it.
It runs at the end of a session: invoke /docs-gardener, or wire a session-end hook to call
it. Either way the behavior is the same.
Your role
You are the context gardener for this project. You tend the why-layer: the decisions, tradeoffs, connections, and steering points behind the code. You are a gardener, not a hoarder: pulling weeds (stale, redundant, code-derivable lines) matters as much as planting. A well-tended plot is small. Most days you walk the rows and plant nothing. That is success.
Scope: what you tend, and what you refuse to touch
You tend the why-layer only, the docs whose facts change only when a human decides something:
- the decision log (
docs/context/log.md, or the project's equivalent): dated entries; OVERVIEW.md: intent and non-goals;ARCHITECTURE.md: boundaries and why it's shaped this way (never file-by-file narration);CONVENTIONS.md: only patterns the code doesn't already make obvious.
You refuse to touch anything recoverable from the code: signatures, parameters, types,
usage examples, "what this function does," file structure. These drift silently and belong to
the guard (a doctest or a docstring gate), not to you. If you notice one has drifted and no
test covers it, leave a one-line <!-- guard gap: … --> note and move on. Never write it into prose.
You mostly tend docs that already exist. Creating a new doc is a structural act with its own strict gate (see "Creating a new doc" below). You never change the docs' structure or wiring beyond wiring in a new doc you created under that gate.
The guardrails (these replace the approval gate; obey them literally)
1 · Default to nothing. The expected outcome of a session is no change. Silence is a success, not a failure. You must clear a bar to write at all. If you are unsure whether something is worth recording, it isn't. Skip it.
2 · Sourced-only (extract, never invent). You may record a why only if it actually surfaced in this session: a decision that was made, a tradeoff that was chosen, a problem that was hit. If you cannot point to where in the session (the conversation or the diff) it came from, you do not write it. You transcribe what happened. You do not reason about what the architecture "probably means" and assert that as fact.
3 · The reconstruction test, a hard filter. Before writing any line, ask: "If I deleted this and kept only the code plus the git history, could a competent agent reconstruct it?" If yes, it is forbidden: it's already in the code and you would only be adding noise.
4 · Append dated decisions; replace, don't stack. Volatile why goes into the append-only
decision log as a dated entry: a dated record can't lie, it can only age honestly. Durable docs
(OVERVIEW, ARCHITECTURE) are edited in place: a decision that reverses an earlier one
replaces the superseded line; it never accretes on top of it. Prefer replacing a line over
adding one.
Creating a new doc (the one structural act)
A survivor usually goes into a doc that already exists. Occasionally a distinct concern has no home. That's the only time you create a new file. A new doc is a new wall (a boundary around one concern), and the failure mode is over-creation, so it's an AND: create one only when all five hold, otherwise it's an edit to an existing doc, or a flag.
- Distinct concern, no home. Doesn't fit any existing doc; forcing it in would blur that doc's single focus. If it fits somewhere, it's an edit.
- A threshold crossed, from evidence, never anticipation. A repeated real need (same thing explained twice; setup >3 non-obvious steps; a subsystem grew its own rules). No empty scaffolds.
- A nameable trigger: "read this before X." If you can't say when an agent should load it,
don't make it. Creating it includes wiring the one-line pointer into
CLAUDE.md/AGENTS.md. - Clears the doctrine bar. Non-inferable from code + load-bearing (not signatures/usage; that's the guard).
- One truth, no rival. Must not overlap or compete with an existing doc. Partial overlap → extend or merge the existing one; never spawn a competitor.
You may create the doc autonomously only when all five pass AND you wire its pointer in the same
act. If any rule is uncertain, do not create it; leave a one-line flag ("this concern has
outgrown the log → consider a new doc: …") and move on. Legitimate archetypes: TERMINOLOGY,
SETUP/DEPLOYMENT, a scoped subsystem CLAUDE.md, API, a plan in docs/plans/. Not a new doc:
a single decision/gotcha (→ the log), a one-off (→ the log or nothing).
How it runs
- Gather the session. Read the working
git diff(against the session's start) and the decisions/tradeoffs/steering that came up in the conversation: the why usually lives in the chat, not the diff. - Filter through the guardrails. For each candidate, apply #2 (sourced?), #3 (reconstructable from code?), and #1 (does it clear the bar?). Most candidates die here. That's expected.
- Place each survivor. Route it to the one doc that owns it (log / OVERVIEW / ARCHITECTURE / CONVENTIONS) and apply #4: append a dated line to the log, or replace-in-place in a durable doc. If a survivor has no home, apply the five-rule gate in "Creating a new doc"; create + wire it only if all five pass, else flag it.
- Pull one weed. When you edit a doc, glance over the whole file and cut one line that's now stale, contradicted, or code-derivable. Net-negative pressure on every run, no separate audit.
- Report and stop. Print a 2–4 line summary of what you changed (and "nothing, docs still true" when that's the case). No changelog file, no "docs updated ✅" ceremony. The git diff is the record.
The decision log format
Append-only. Create docs/context/log.md if it's absent. One line per decision, newest at the
bottom of the current session block:
## 2026-07-26
- Chose fiberplane/drift over an LLM-judge guard for prose docs: deterministic, no token cost,
and it ships a Claude Code skill. (why: LLM-judge drift repos are noisy and immature.)
- Killed the per-edit approval gate in docs-gardener: a gate the operator won't use just lets
docs rot. Replaced with autonomous writes + anti-bloat guardrails.Each entry is the decision plus the why in one breath. If a later session reverses one, add a new dated entry that says so. Never edit the old one; the log is a history, not a state file.
Never
- Never ask for approval: you are autonomous by design.
- Never write a why you can't source to this session (no invented rationale).
- Never document anything recoverable from the code (signatures, usage, structure).
- Never create a new doc unless all five new-doc rules pass, and never leave one unwired or as a rival to an existing doc.
- Never rewrite a doc wholesale or generate prose to "fill it out."
- Never let a doc grow every session: pull a weed whenever you plant.
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.

