FormingSkillclaude-codepublished fresh until

How do I write project docs my agent can rely on before it codes?

Summary When an agent guesses business rules while coding a large app, keep one Markdown handbook per feature for its data model, endpoints, rules, and edge cases, plus a CLAUDE.md lookup table; check one doc per branch against code to catch phantom docs.

Not for sharing docs across many repos or fetching library docs; see ai-docs-repo-loaded-per-repo-for-agents, current-library-docs-for-agents

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
ASkill · v1.0.0documentation-writer skill (GitHub awesome-copilot)
How you use itYou ask for it
What it can dowrites files
What's inside
ASkill · v1.0.0documentation-writer skill (GitHub awesome-copilot)
How you use it
You ask for it
What it can do
writes files
What's inside

What this thread does

The problem

On a large app, even with a good CLAUDE.md, the agent greps the code, guesses how features connect and writes code that compiles but misses business rules (an endpoint that deletes without checking dependencies, a form that does not match the API's validation).

What the post says

A r/ClaudeCode post by u/TheDecipherist (28 February 2026) from a platform with about 200 API routes and 56 dashboard pages. The author's claims, not independently checked:

  • A documentation/ folder with 52 markdown files, one per feature, with the same template: data model (every field, type, index), API endpoints (shapes, validation, error cases), dashboard elements and the API each calls, business rules (scoping, cascading deletes, state changes, limits), edge cases. The quality bar: a fresh agent reads only that doc and implements correctly.
  • CLAUDE.md holds a lookup table ("working on servers? read documentation/04-servers.md first").
  • Workflow: write or update the doc first, implement to match, write tests that verify the doc, update the doc if the code forced a change, and merge code, docs and tests together.
  • Audit first, then document. The author had Claude walk every page and endpoint, tag findings PASS, WARN, FAIL or TODO, and says about 15% of what looked working was broken or half-built.
  • Verify the generated docs. A first pass of 52 docs written by parallel agents looked comprehensive, but a one-doc-at-a-time check against the real interfaces and routes found discrepancies (one doc said a project had no update or delete endpoints while the code had full CRUD). The check marks each doc PHANTOM (doc claims it, code does not), NOT IMPLEMENTED or DIVERGED FROM PLAN, one branch and one commit per doc.

What commenters added

  • The top comment: give every doc YAML frontmatter with a table of contents, cross-dependencies and a version, so the agent reads the frontmatter first and jumps to the right content. The author agreed.
  • Others: this is classic software process; make it a hook (a pre-commit check that fails if a source file changed without its doc), which the author called the next step beyond a CLAUDE.md rule.
  • A commenter who audited their own setup said the value is in non-obvious features (external API quirks, multi-step flows); simple CRUD is self-documenting.
  • A sceptic said an app that needs a manual may just be too complex or badly organised, and docs need upkeep while context resets. The author replied that behaviour spread across files cannot be seen from code alone.

How to ask your agent

For the projects feature, write documentation/05-projects.md from the code only: data model, every endpoint with auth and validation, business rules, edge cases, and the source files it came from. Add YAML frontmatter with title, source files, related docs and last-verified date. Then re-read each claim against the code and mark anything the code does not support as PHANTOM.

Mistakes to check

  • Trusting generated docs without a verify pass; the author's own first pass had errors.
  • One huge doc: keep one per feature so the agent loads only what it needs.
  • No update rule: put "docs ship in the same commit" in CLAUDE.md, and enforce it with a hook if it matters.
  • Documenting everything, including trivial CRUD.

Limits

Not run by me. The numbers are the author's. The post promotes the author's own starter kit.

Started from a post by @TheDecipherist, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# How do I write project docs my agent can rely on before it codes?
Summary: When an agent guesses business rules while coding a large app, keep one Markdown handbook per feature for its data model, endpoints, rules, and edge cases, plus a CLAUDE.md lookup table; check one doc per branch against code to catch phantom docs.

## Options
- A · documentation-writer skill (GitHub awesome-copilot) · early, no verdict yet · writes files
Copy for agent
get the whatworks thread feature-docs-handbook-agent-reads-before-coding and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread feature-docs-handbook-agent-reads-before-coding

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · documentation-writer skill (GitHub awesome-copilot)

Documentation skill built on the Diataxis framework: classifies each request as tutorial, how-to guide, reference or explanation and writes it by that type's rules. General-purpose, interactive Diataxis writing persona (draft, confirm, then write); it is not a per-feature pre-spec workflow.

Format
Skill
Source
github:github/awesome-copilot#skills/documentation-writer
Pinned
v1.0.0 · cb64ad12e327
Content hash
cb64ad12e32737ae
Audit
scan passed
Can do
writes files
Works with
claude-code
Check
Skill installed in the project; SKILL.md front matter names the skill; The four Diataxis document types are defined
Author
@github
Kudos
0
Are you @github? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package awesome-copilot-documentation-writer-skill before installing

A · Files

Read from the package source at the pinned version. Shown as is; nothing here runs.

Loading files…

Ask your agent
show me the files of the whatworks package awesome-copilot-documentation-writer-skill
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp