Living Docs Skill
This skill helps Claude apply the living-documentation methodology to any project or workspace. It encodes the methodology's first principle (capture first, refine second), the same-task rule, and the decision tree for choosing greenfield vs. brownfield adoption.
For the full methodology, see the companion repo:
LIVING_DOCS_OVERVIEW.md — first principle, decision rules, anti-patterns
GREENFIELD_ADOPTION_GUIDE.md — 8-step setup for new projects
BROWNFIELD_ADOPTION_GUIDE.md — 12-step retrofit for existing codebases
This skill provides three modes: adopt, audit, and sweep.
Mode: adopt
Triggered by: "set up living docs", "/living-docs adopt", "adopt the methodology", "start a knowledge base".
Steps Claude should follow
Survey the workspace. Determine:
- Is this a single repo, a workspace with multiple repos, or unclear?
- For each repo: greenfield (empty / near-empty) or brownfield (established codebase)?
- List any pre-existing documentation (README, wiki references, design docs, comments).
Confirm with the user. Summarize the findings and confirm the user agrees with the classification before proceeding. Especially: greenfield vs. brownfield, and (for multi-repo) whether the repos genuinely interact (tight coupling) or not (loose coupling).
Walk through the appropriate adoption guide:
- Greenfield single repo →
GREENFIELD_ADOPTION_GUIDE.md steps 1–8.
- Brownfield single repo →
BROWNFIELD_ADOPTION_GUIDE.md steps 1–12.
- Multi-repo workspace, tightly coupled → both guides as appropriate per repo, plus the workspace-level layout from the brownfield guide's "A note on multi-repo workspaces" section.
- Multi-repo workspace, loosely coupled → per-repo only; do not add a workspace layer.
Generate files based on the templates in this repo's templates/ directory:
CLAUDE.md at the appropriate scope (per-repo and/or workspace-level)
knowledge/index.md and knowledge/log.md
- Empty
knowledge/concepts/ and knowledge/connections/ directories with .gitkeep
For greenfield, seed initial articles. Ask the user to name the 5–7 load-bearing concepts that will exist in the project, and write 200-word thin drafts for each before any substantial code is written. Populate the article-mapping table accordingly.
For brownfield, pick a seam. Help the user choose ONE of: hot-spot module, upcoming feature, or a recent onboarding question. Write 3–5 thin articles for that seam only. Do not inventory the rest of the codebase.
Confirm team buy-in. Brownfield in particular: remind the user that without genuine team agreement on the same-task rule, the discipline won't survive a deadline-pressured sprint. Suggest naming a single person responsible for keeping the discipline alive for the first 2–3 months.
Apply the first principle throughout
Whenever the agent generates an article — even an initial one — capture the why: context, constraints, alternatives ruled out. Not just the post-state. When unsure about placement, pick the closest fit and write — the user reviews and refines.
Mode: audit
Triggered by: "/living-docs audit", "audit my knowledge base", "is my living-docs setup healthy?".
Steps Claude should follow
Inventory. Check for the artifacts:
- Is
CLAUDE.md present at the repo root? (And workspace root, if multi-repo?)
- Is
knowledge/ present, with concepts/, connections/, index.md, log.md?
- Does
CLAUDE.md contain an article-mapping table? Is it populated?
- Is the same-task rule explicitly stated?
Spot-check the same-task rule's enforcement. Pick the 3 most recent significant PRs in git history. For each, check:
- Did the PR touch any code path listed in the article-mapping table?
- If yes, did the PR also touch the corresponding article(s)?
- Did the PR add an entry to
log.md?
Run a drift sweep on the 5 oldest articles. Sort articles by their updated: frontmatter date, oldest first. For each, open the corresponding code path and scan for contradictions (signatures, field lists, env vars, config keys). List any drift found.
Report. Produce a short report covering:
- Maturity phase: First adoption (months 1–3) or established (3+ months in)?
- Coverage: What fraction of the active codebase has articles? (Active = touched in the last 90 days.) Aim for 60–80% by month three.
- Discipline: Is the same-task rule being followed in PRs? Any specific drift or gaps?
- Suggested next move: The single highest-leverage thing to fix or improve.
Mode: sweep
Triggered by: "/living-docs sweep", "run a drift sweep", "check my docs for drift".
Steps Claude should follow
Identify the oldest articles by updated: frontmatter date. Take the oldest 5 (or however many fit in a ~30-minute review).
For each article, open the corresponding code path(s) referenced in the article (or implied by its topic) and compare:
- Function signatures and field lists
- Configuration keys, environment variables
- Folder structure and module names
- Any specific behaviour described
Apply "real data beats the article." When code and article disagree, fix the article to match the code — not the other way around — unless the user explicitly says otherwise.
Update each fixed article's updated: date and append a sweep entry to log.md.
Stop after the agreed time budget. Whatever's left waits for the next sweep. Don't try to inventory everything in one sitting.
Anti-patterns to refuse
The skill should refuse or push back on these requests, even if the user asks:
- "Document everything in the codebase right now." Documentation sprints fail. Suggest the document-on-touch approach instead.
- "Move all the concept articles to the workspace level." Concept articles must live in their owning repo. Refuse and explain.
- "Skip the article update for this PR, just this once." The rule erodes from any single exception. Offer to write the update for the user instead.
- "Write tutorials in
concepts/." Concept articles are descriptive, not procedural. Tutorials belong in code, tests, or a separate tutorials/ location.
Templates available in this repo
When generating files, use the templates at templates/greenfield/, templates/brownfield/, and templates/workspace-level/. They contain the recommended CLAUDE.md, knowledge/index.md, and knowledge/log.md shapes with {{placeholder}} markers ready to be filled in.
1---2name: living-docs3description: Adopt, audit, or operate the living-documentation methodology in any project or workspace. Use when the user says "set up living docs", "adopt the methodology", "/living-docs adopt", "/living-docs audit", "/living-docs sweep", or asks to apply the living-documentation pattern.4---56# Living Docs Skill78This skill helps Claude apply the **living-documentation methodology** to any project or workspace. It encodes the methodology's first principle (capture first, refine second), the same-task rule, and the decision tree for choosing greenfield vs. brownfield adoption.910For the full methodology, see the companion repo:1112- `LIVING_DOCS_OVERVIEW.md` — first principle, decision rules, anti-patterns13- `GREENFIELD_ADOPTION_GUIDE.md` — 8-step setup for new projects14- `BROWNFIELD_ADOPTION_GUIDE.md` — 12-step retrofit for existing codebases1516This skill provides three modes: **adopt**, **audit**, and **sweep**.1718## Mode: adopt1920Triggered by: _"set up living docs"_, _"/living-docs adopt"_, _"adopt the methodology"_, _"start a knowledge base"_.2122### Steps Claude should follow23241. **Survey the workspace.** Determine:25 - Is this a single repo, a workspace with multiple repos, or unclear?26 - For each repo: greenfield (empty / near-empty) or brownfield (established codebase)?27 - List any pre-existing documentation (README, wiki references, design docs, comments).28292. **Confirm with the user.** Summarize the findings and confirm the user agrees with the classification before proceeding. Especially: greenfield vs. brownfield, and (for multi-repo) whether the repos genuinely interact (tight coupling) or not (loose coupling).30313. **Walk through the appropriate adoption guide:**32 - Greenfield single repo → `GREENFIELD_ADOPTION_GUIDE.md` steps 1–8.33 - Brownfield single repo → `BROWNFIELD_ADOPTION_GUIDE.md` steps 1–12.34 - Multi-repo workspace, tightly coupled → both guides as appropriate per repo, plus the workspace-level layout from the brownfield guide's _"A note on multi-repo workspaces"_ section.35 - Multi-repo workspace, loosely coupled → per-repo only; do not add a workspace layer.36374. **Generate files** based on the templates in this repo's `templates/` directory:38 - `CLAUDE.md` at the appropriate scope (per-repo and/or workspace-level)39 - `knowledge/index.md` and `knowledge/log.md`40 - Empty `knowledge/concepts/` and `knowledge/connections/` directories with `.gitkeep`41425. **For greenfield, seed initial articles.** Ask the user to name the 5–7 load-bearing concepts that will exist in the project, and write 200-word thin drafts for each before any substantial code is written. Populate the article-mapping table accordingly.43446. **For brownfield, pick a seam.** Help the user choose ONE of: hot-spot module, upcoming feature, or a recent onboarding question. Write 3–5 thin articles for that seam only. Do **not** inventory the rest of the codebase.45467. **Confirm team buy-in.** Brownfield in particular: remind the user that without genuine team agreement on the same-task rule, the discipline won't survive a deadline-pressured sprint. Suggest naming a single person responsible for keeping the discipline alive for the first 2–3 months.4748### Apply the first principle throughout4950Whenever the agent generates an article — even an initial one — capture the **why**: context, constraints, alternatives ruled out. Not just the post-state. When unsure about placement, pick the closest fit and write — the user reviews and refines.5152## Mode: audit5354Triggered by: _"/living-docs audit"_, _"audit my knowledge base"_, _"is my living-docs setup healthy?"_.5556### Steps Claude should follow57581. **Inventory.** Check for the artifacts:59 - Is `CLAUDE.md` present at the repo root? (And workspace root, if multi-repo?)60 - Is `knowledge/` present, with `concepts/`, `connections/`, `index.md`, `log.md`?61 - Does `CLAUDE.md` contain an article-mapping table? Is it populated?62 - Is the same-task rule explicitly stated?63642. **Spot-check the same-task rule's enforcement.** Pick the 3 most recent significant PRs in git history. For each, check:65 - Did the PR touch any code path listed in the article-mapping table?66 - If yes, did the PR also touch the corresponding article(s)?67 - Did the PR add an entry to `log.md`?68693. **Run a drift sweep on the 5 oldest articles.** Sort articles by their `updated:` frontmatter date, oldest first. For each, open the corresponding code path and scan for contradictions (signatures, field lists, env vars, config keys). List any drift found.70714. **Report.** Produce a short report covering:72 - **Maturity phase:** First adoption (months 1–3) or established (3+ months in)?73 - **Coverage:** What fraction of the active codebase has articles? (Active = touched in the last 90 days.) Aim for 60–80% by month three.74 - **Discipline:** Is the same-task rule being followed in PRs? Any specific drift or gaps?75 - **Suggested next move:** The single highest-leverage thing to fix or improve.7677## Mode: sweep7879Triggered by: _"/living-docs sweep"_, _"run a drift sweep"_, _"check my docs for drift"_.8081### Steps Claude should follow82831. **Identify the oldest articles** by `updated:` frontmatter date. Take the oldest 5 (or however many fit in a ~30-minute review).84852. **For each article**, open the corresponding code path(s) referenced in the article (or implied by its topic) and compare:86 - Function signatures and field lists87 - Configuration keys, environment variables88 - Folder structure and module names89 - Any specific behaviour described90913. **Apply "real data beats the article."** When code and article disagree, fix the article to match the code — not the other way around — unless the user explicitly says otherwise.92934. **Update each fixed article's `updated:` date** and append a sweep entry to `log.md`.94955. **Stop after the agreed time budget.** Whatever's left waits for the next sweep. Don't try to inventory everything in one sitting.9697## Anti-patterns to refuse9899The skill should refuse or push back on these requests, even if the user asks:100101- **"Document everything in the codebase right now."** Documentation sprints fail. Suggest the document-on-touch approach instead.102- **"Move all the concept articles to the workspace level."** Concept articles must live in their owning repo. Refuse and explain.103- **"Skip the article update for this PR, just this once."** The rule erodes from any single exception. Offer to write the update for the user instead.104- **"Write tutorials in `concepts/`."** Concept articles are descriptive, not procedural. Tutorials belong in code, tests, or a separate `tutorials/` location.105106## Templates available in this repo107108When generating files, use the templates at `templates/greenfield/`, `templates/brownfield/`, and `templates/workspace-level/`. They contain the recommended `CLAUDE.md`, `knowledge/index.md`, and `knowledge/log.md` shapes with `{{placeholder}}` markers ready to be filled in.