Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

Repository files navigation

/docs — evidence-first documentation for Claude Code

A Claude Code skill that writes project documentation that shows its receipts: every technical claim cites file:line, anything it couldn't verify is marked ⚠️ UNVERIFIED, and living docs update in place with a changelog instead of piling up stale copies.

Why this exists

AI-generated documentation fails in a specific way: it sounds right. It repeats what a docstring claims, fills gaps with plausible inventions, and drifts from the code the moment anything changes — and nothing in the doc tells you which parts to trust.

This skill enforces a different sequence: find the code, cite it, then write. Claims it can't ground get an explicit marker instead of confident prose. An honest gap beats a fabricated fact.

It works. In this repo's eval suite, the fixture's billing.py docstring claims the function "retries with exponential backoff" — the actual loop retries instantly, with no delay. The eval asserts the generated doc documents the code's real behavior, not the docstring's claim (evals/README.md).

What it writes

Mode What it is Lifecycle
session Thin record of a work session Snapshot, never edited
feature Living reference for a feature or system Updated in place + changelog
architecture System-level overview Updated in place + changelog
decision ADR — context, options, rationale Immutable, superseded not edited
ideation Exploration or brainstorm capture Snapshot, never edited

Every doc gets a Mermaid diagram — a diagram catches structural claims a sentence can hide (a component with no incoming arrow, a step that isn't reachable).

See examples/session-log-example.md and examples/feature-doc-example.md for real output before you install anything.

It adapts to your project

If your project has its own docs/DOC_STANDARD.md (or protocol/DOC_STANDARD.md), the skill reads it fresh on every run and uses your document types, directories, frontmatter fields, and naming rules instead of the defaults above. No standard yet? It offers to bootstrap an editable one from templates/DOC_STANDARD.default.md. Adding a document type is adding a row to a markdown table — no configuration format to learn.

Install

Requires Claude Code.

Option 1 — personal skill (fastest):

git clone <this-repo-url> /tmp/docs-skill
mkdir -p ~/.claude/skills/docs
cp -r /tmp/docs-skill/SKILL.md /tmp/docs-skill/templates /tmp/docs-skill/reference ~/.claude/skills/docs/

Start a new Claude Code session — /docs is now available in every project.

Option 2 — plugin (versioned, shareable):

/plugin marketplace add <github-owner>/docs-skill
/plugin install docs@docs-skill

Invokes as /docs:docs. Updates arrive via /plugin update when this repo's version bumps.

Usage

/docs                            → auto-detects the right mode from recent git history, confirms with you
/docs session                    → log what happened in this session
/docs feature rate-limiting      → create or update a living feature doc
/docs architecture payment-flow  → create or update a system-level doc
/docs decision retry-strategy    → record an immutable decision (ADR)
/docs ideation offline-mode      → capture a brainstorm snapshot

Or just say it naturally: "document this session," "create a feature doc for X," "record this decision."

Repo layout

docs-skill/
├── SKILL.md                        entry point — mode table + core rules (~75 lines)
├── templates/                      one per mode, read only when producing that mode
├── reference/                      Doc Standard detection, frontmatter, Mermaid conventions
├── examples/                       real generated output
└── evals/                          runnable eval suite: fixtures, setup script, expectations

SKILL.md stays small on purpose — Claude reads it first, then pulls in exactly the template or reference file the task needs.

Testing

The eval suite is reproducible: evals/evals.json defines 4 evals with expectations graded against real files and git history, and evals/setup-fixtures.sh rebuilds the fixture repos from committed trees — run it and re-execute the suite yourself. Current results, and what remains untested (cross-model behavior, the interactive confirmation gate), are stated plainly in TESTING.md.

Changelog

See CHANGELOG.md.

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages