Documentation
Run after QA passes for a PROJ-X. The goal is not a short changelog; the goal is curated documentation a human can use to understand:
- what the app does and which features exist
- how the main user workflows behave
- which technology choices matter
- how the data model, integrations, and data flows work
- what future agents must remember
Update only what needs updating, but do not keep the docs shallow when the feature or architecture needs explanation.
Output Files
| File |
Role |
Update trigger |
Length budget |
README.md |
App on-ramp: what it is, how to run it, where deeper docs live |
First PROJ, dependency/setup change, deployment change, or explicit user request |
<= 80 lines |
docs/PROJECT.md |
Human feature guide: implemented capabilities, user workflows, status, links to PRDs |
Always when QA passes |
grows with PROJs; concise but useful |
docs/TECHNICAL.md |
Technical reference: architecture, data model, data flows, integrations, deployment, gotchas |
Architecture/data/dependency/agent-note changes, or explicit user request |
as long as needed |
AGENTS.md |
Durable agent context for all future coding sessions |
>= 1 approved candidate from progress.md |
<= 40 non-blank lines hard cap |
CLAUDE.md |
Pointer-only Claude entry file; must tell Claude to read AGENTS.md |
Missing, or contains durable rules instead of only a pointer |
<= 5 lines; no curated rules |
No per-feature documentation files by default. The PRDs under specs/PROJ-<X>-<theme>/3_PRDs/ remain the detailed requirement source; link to them instead of copying acceptance criteria.
Decomposed PROJ Handling
Documentation updates the completed PROJ while preserving the larger decomposition map:
docs/PROJECT.md should show how this PROJ fits sibling PROJs when the concept has Decomposition Context.
- Refresh only the current PROJ's detailed section; keep sibling sections intact.
- If this PROJ introduces or consumes shared design language, document the canonical design file and which sibling PROJs it applies to.
docs/TECHNICAL.md should document cross-PROJ contracts only when they are source-backed by concept, architecture, plans, or implementation.
- Do not describe unbuilt sibling PROJs as shipped capabilities.
Input
Read in this priority order. Structured data first; raw reconstruction only as fallback.
Structured inputs, filled by Skills 4/5/6:
specs/PROJ-<X>-<theme>/7_progress/PROJ-<X>-progress.md
### Wave N Gate - PASSED blocks: authoritative wave completion proof
## QA Results: QA summary and residual risk
## PROJ Retrospective: implementation lessons and durable observations
## AGENTS.md Candidates: proposed durable agent rules awaiting approval
specs/PROJ-<X>-<theme>/1_brainstorm/PROJ-<X>-concept.md
- app/feature purpose, target user, in-scope/out-of-scope boundaries
specs/PROJ-<X>-<theme>/3_PRDs/*.md
- user stories, feature names, acceptance criteria, edge cases
specs/PROJ-<X>-<theme>/6_plan/PROJ-<X>-architecture.md
- architecture, data model, data flows, cross-cutting decisions
specs/PROJ-<X>-<theme>/6_plan/PROJ-<X>-wave-*-plan.md
- shipped user-story scope per wave
src/features/*/agent.md
- non-obvious gotchas surfaced during implementation
package.json at BASE_SHA and HEAD
- dependency and script deltas for setup/technical docs
Fallback only if structured inputs are absent:
git log --oneline --grep="PROJ-<X>" --reverse
- focused code structure scan
Do not re-derive what structured inputs already provide. If a Wave PASSED block lists shipped stories, treat that as canonical.
Claude Adaptation
This Claude skill uses the Codex documentation skill as the behavioral source of truth. Keep gates, output structure, diagrams, content ownership, and AGENTS.md merge behavior aligned with the Codex copy. Claude-specific differences are limited to tool invocation and the pointer-only CLAUDE.md file:
- Use project-root
AGENTS.md for durable agent context.
- Keep project-root
CLAUDE.md pointer-only. It must reference AGENTS.md as required reading and must not contain curated rules.
- Ask the user before merging any
AGENTS.md candidate unless the current user request explicitly authorizes automatic merging.
- Use Claude
Agent subagents when available and useful. Otherwise, generate docs locally.
- Keep documentation edits scoped to triggered files.
Documentation Standard
Write for a human maintainer or product owner who did not implement the feature.
- Curated, not exhaustive: explain the current truth of the app; link to PRDs for detailed acceptance criteria.
- Feature-first:
PROJECT.md should answer "what can users do now?" before it talks about implementation.
- Technical clarity:
TECHNICAL.md should explain architecture, technology choices, data model, data flows, deployment, and operational gotchas.
- Diagrams when useful: use Mermaid diagrams for system context, data model, state transitions, and critical data flows when the source material supports them.
- Source-backed: never invent entities, tables, services, queues, permissions, or flows. If a fact is inferred from code, say so briefly.
- Incremental curation: update stale sections, remove contradicted statements, and keep sibling PROJs intact.
Context Economy
Documentation arrives late in the chain. Keep the main context focused on progress.md, the current doc diff, and any user approvals.
- Read
progress.md first to decide which outputs are triggered.
- Load concept, PRDs, architecture, wave plans, and source files only for the triggered output that needs them.
- If delegation is allowed, assign independent harvest tasks to subagents; otherwise do focused local reads.
- Keep long PRDs, architecture files, screenshots, and raw logs out of the final answer.
Workflow
1. Collect documentation inputs
Start with 7_progress/PROJ-<X>-progress.md. Then collect only the extra inputs needed for triggered outputs:
- Feature purpose and boundaries: read the concept file if
PROJECT.md or README.md needs human-facing purpose/scope text.
- Shipped stories: parse Wave PASSED blocks first; fall back to
6_plan/PROJ-<X>-wave-*-plan.md headings matching ## PROJ-<X>-PRD-<Y>-US-<Z>:.
- Feature behavior: read PRDs only to summarize capabilities, user workflows, edge cases, and links. Do not paste acceptance criteria.
- Technical structure: read architecture and relevant
agent.md files when TECHNICAL.md triggers.
- Dependency delta: compare
package.json at BASE_SHA to HEAD using structured JSON over dependencies and devDependencies.
- Runtime/deployment facts: inspect package scripts, config files, env examples, and deployment notes only when README or TECHNICAL needs them.
Trigger evaluation:
PROJECT.md: always true after QA passes
README.md: first PROJ, dependency/setup/deployment delta, missing README, or explicit request
TECHNICAL.md: architecture/data-flow/data-model/integration/dependency/agent-note change, missing technical doc, or explicit request
AGENTS.md: ## AGENTS.md Candidates has at least one [PROPOSED] entry
CLAUDE.md: missing, or contains durable rules instead of only a pointer to AGENTS.md
Missing-sections fallback: if ## PROJ Retrospective or ## AGENTS.md Candidates is absent, proceed anyway and note the degraded input path in the final summary.
Only proceed to sections whose trigger fires.
2. Update docs/PROJECT.md
Always runs. This is the human feature guide, not a terse release log.
Required structure:
# Project - Features
**Last updated:** YYYY-MM-DD
**Features implemented:** <count>
---
## PROJ-<X>: <theme>
**Status:** <development | QA-passed | production>
**Purpose:** <one-sentence user/business goal from concept>
**Scope:** <what is included and intentionally excluded>
### Capabilities
- <user-facing thing the app can now do>
- <another capability>
### Primary Workflow
1. <human workflow step>
2. <human workflow step>
3. <outcome>
```mermaid
flowchart LR
A[Start] --> B[Key user action]
B --> C[System response]
C --> D[Result]
```
### User Stories Implemented
- PROJ-<X>-PRD-1-US-1: <title>
- PROJ-<X>-PRD-1-US-2: <title>
### Notes
- **PRDs:** [PRD-1](../specs/PROJ-<X>-<theme>/3_PRDs/PROJ-<X>-PRD-1-<desc>.md)
- **QA:** <pass/bugs/residual-risk summary from QA Results>
- **Known limits:** <only if source-backed>
Guidelines:
- New PROJs append. Existing PROJs get only their own section refreshed.
- Include a Mermaid workflow only for meaningful multi-step behavior; skip it for trivial backend or setup-only changes.
- Keep feature text understandable to non-engineers.
- Do not duplicate detailed acceptance criteria, edge-case lists, or implementation plans.
3. Update README.md
Runs conditionally. README is the front door, not the technical deep dive.
Required structure:
# <Project Name>
> <one-sentence app purpose>
## What It Does
- <top-level capability>
- <top-level capability>
- <top-level capability>
## Quick Start
```bash
<install command>
<dev command>
```
## Tech Stack
- <framework> - <one-line purpose>
- <database/auth/styling/deployment> - <one-line purpose>
## Documentation
- [Features](docs/PROJECT.md) - human feature guide and workflows
- [Technical](docs/TECHNICAL.md) - architecture, data model, data flows, deployment, gotchas
- [AGENTS.md](./AGENTS.md) - durable conventions for AI-pair coding
Guidelines:
- Keep it short enough to scan.
- Mention setup requirements, env files, and scripts only at the level needed to run the app locally.
- Avoid duplicating
TECHNICAL.md; link to it for architecture/data details.
4. Update docs/TECHNICAL.md
Runs conditionally. This is the maintainers' technical map of the app.
Required structure:
# Technical Reference
**Last updated:** YYYY-MM-DD
## System Overview
<short explanation of runtime shape and major modules>
```mermaid
flowchart LR
User[User] --> App[App/UI]
App --> API[API or server actions]
API --> DB[(Database)]
```
## Architecture
<high-level architecture from PROJ architecture files>
## Technology Choices
| Area | Choice | Why it matters |
|---|---|---|
| Frontend | <tool> | <reason> |
| Data | <tool> | <reason> |
## Data Model
<entities, relationships, ownership, important constraints>
```mermaid
erDiagram
USER ||--o{ ITEM : owns
```
## Data Flows
### <Flow Name>
<when this flow happens and why>
```mermaid
sequenceDiagram
actor User
participant App
participant API
participant DB
User->>App: Action
App->>API: Request
API->>DB: Read/write
API-->>App: Response
```
## Integrations and External Services
<APIs, auth providers, storage, payment, queues, model providers, email, analytics>
## Directory Structure
```text
src/
app/ - <what lives here>
features/ - <what lives here>
lib/ - <what lives here>
```
## Dependencies
<runtime and dev dependencies with purpose, especially newly introduced ones>
## Deployment and Runtime
<provider, build command, env-var overview, persistence/runtime constraints>
## Operational Notes and Gotchas
<source-backed notes from agent.md, QA, post-wave notes, and retrospective>
Guidelines:
- Prefer Mermaid diagrams over prose when they reduce ambiguity.
- Include at least one diagram when
TECHNICAL.md is created from scratch and architecture/data-flow information exists.
- Use
flowchart, sequenceDiagram, erDiagram, or stateDiagram-v2 according to the source material.
- Do not create fake diagrams from guesses. If the data model is absent, write "No persistent data model documented yet" rather than inventing one.
- Update stale diagrams when the underlying architecture changes.
- Keep technology explanations practical: what it is used for, why it matters, and where to find it in the repo.
5. AGENTS.md merge
Runs only if ## AGENTS.md Candidates in progress.md has [PROPOSED] entries.
Algorithm:
- Parse every
[PROPOSED] line from progress.md's candidates section. Each line has a stable ID, such as AGENTS-PROJ1-QA-003.
- For each candidate, ask the user directly:
- Approve
- Reject
- Approve with edit
- Skip
- For each approved or edited candidate:
- Append it to project-root
AGENTS.md under an appropriate short heading.
- Prefix the line with its ID as a comment anchor:
<!-- AGENTS-PROJ1-QA-003 -->.
- In progress.md, flip
[PROPOSED] to [MERGED] by ID. Never delete the candidate line.
- Enforce the 40-line hard cap on
AGENTS.md.
- Count non-blank lines, including headings.
- If over 40, ask the user which old entries to remove. Do not delete automatically.
- Rejected candidates are marked
[REJECTED] in progress.md to prevent re-proposal.
Never edit AGENTS.md without explicit approval per entry. The user owns this file; Skill 7 only facilitates.
Autonomous mode (CLAUDE_AUTONOMOUS_LEVEL=balanced set):
balanced: auto-merge a candidate only if high-confidence: two or more persona sources flagged the same rule, or the source is Dr. Sarah Chen (Security) or a DB-schema/RLS finding. Everything else is marked [REJECTED-BY-POLICY].
conservative: reject all candidates for later user review.
aggressive: auto-merge everything.
On 40-line overflow, balanced and aggressive evict oldest merged entries until within cap; conservative halts for user pruning. Log every auto-decision to 7_progress/PROJ-<X>-autonomous-log.md.
6. CLAUDE.md pointer
Runs if CLAUDE.md is missing or contains durable rules.
CLAUDE.md must stay a tiny pointer file. It should not be curated, should not receive QA candidates, and should not duplicate AGENTS.md.
Allowed content:
# Claude Instructions
Must read and follow [AGENTS.md](./AGENTS.md) before making changes. All durable agent instructions are curated in AGENTS.md only.
If an existing CLAUDE.md contains additional durable rules, move proposed durable rules through the normal AGENTS.md candidate flow instead of preserving them in CLAUDE.md.
7. Git commit
One commit for the documentation update:
docs(PROJ-<X>): Update project documentation
If AGENTS.md was merged or CLAUDE.md was normalized to the pointer, include those changes in the same commit.
Content Ownership
| Info |
Lives in |
| "What does this app do?" |
README.md summary + docs/PROJECT.md feature guide |
| "How do I run it?" |
README.md |
| "Which features exist and how do users use them?" |
docs/PROJECT.md |
| "What are the detailed ACs of feature X?" |
Linked PRD |
| "Why did we choose this architecture or dependency?" |
docs/TECHNICAL.md |
| "What is the data model?" |
docs/TECHNICAL.md |
| "How does data move through the system?" |
docs/TECHNICAL.md with Mermaid flow/sequence diagrams |
| "What should future agents always remember?" |
AGENTS.md, after user approval |
| "Where should Claude look for durable rules?" |
CLAUDE.md pointer to AGENTS.md |
| "What bugs remain?" |
docs/PROJECT.md QA note if source-backed |
Rules
- English for all generated docs, even if the conversation is German.
- Human-readable first; implementation details only where they explain behavior or maintenance.
- Do not duplicate PRDs, architecture plans, or QA logs; summarize and link.
- Prefer source-backed statements over confident reconstruction.
- Keep diagrams valid Mermaid and small enough to read.
- No emojis unless the user explicitly asks.
- Do not fabricate setup commands, environment variables, tables, queues, services, or integrations.
When to Run
- After Step 6 QA passes for a PROJ-X.
- When the user explicitly asks for documentation, feature docs, technical docs, diagrams, data model explanation, or data-flow explanation.
Source: silviobeer/agentic-development-skill-chain — distributed by TomeVault.
1---2name: silviobeer-agentic-development-skill-chain-documentation3description: Documentation4---56# Documentation78Run after QA passes for a PROJ-X. The goal is not a short changelog; the goal is curated documentation a human can use to understand:910- what the app does and which features exist11- how the main user workflows behave12- which technology choices matter13- how the data model, integrations, and data flows work14- what future agents must remember1516Update only what needs updating, but do not keep the docs shallow when the feature or architecture needs explanation.1718## Output Files1920| File | Role | Update trigger | Length budget |21|---|---|---|---|22| `README.md` | App on-ramp: what it is, how to run it, where deeper docs live | First PROJ, dependency/setup change, deployment change, or explicit user request | <= 80 lines |23| `docs/PROJECT.md` | Human feature guide: implemented capabilities, user workflows, status, links to PRDs | Always when QA passes | grows with PROJs; concise but useful |24| `docs/TECHNICAL.md` | Technical reference: architecture, data model, data flows, integrations, deployment, gotchas | Architecture/data/dependency/agent-note changes, or explicit user request | as long as needed |25| `AGENTS.md` | Durable agent context for all future coding sessions | >= 1 approved candidate from progress.md | <= 40 non-blank lines hard cap |26| `CLAUDE.md` | Pointer-only Claude entry file; must tell Claude to read `AGENTS.md` | Missing, or contains durable rules instead of only a pointer | <= 5 lines; no curated rules |2728No per-feature documentation files by default. The PRDs under `specs/PROJ-<X>-<theme>/3_PRDs/` remain the detailed requirement source; link to them instead of copying acceptance criteria.2930## Decomposed PROJ Handling3132Documentation updates the completed PROJ while preserving the larger decomposition map:3334- `docs/PROJECT.md` should show how this PROJ fits sibling PROJs when the concept has `Decomposition Context`.35- Refresh only the current PROJ's detailed section; keep sibling sections intact.36- If this PROJ introduces or consumes shared design language, document the canonical design file and which sibling PROJs it applies to.37- `docs/TECHNICAL.md` should document cross-PROJ contracts only when they are source-backed by concept, architecture, plans, or implementation.38- Do not describe unbuilt sibling PROJs as shipped capabilities.3940## Input4142Read in this priority order. Structured data first; raw reconstruction only as fallback.4344**Structured inputs, filled by Skills 4/5/6:**45461. `specs/PROJ-<X>-<theme>/7_progress/PROJ-<X>-progress.md`47 - `### Wave N Gate - PASSED` blocks: authoritative wave completion proof48 - `## QA Results`: QA summary and residual risk49 - `## PROJ Retrospective`: implementation lessons and durable observations50 - `## AGENTS.md Candidates`: proposed durable agent rules awaiting approval512. `specs/PROJ-<X>-<theme>/1_brainstorm/PROJ-<X>-concept.md`52 - app/feature purpose, target user, in-scope/out-of-scope boundaries533. `specs/PROJ-<X>-<theme>/3_PRDs/*.md`54 - user stories, feature names, acceptance criteria, edge cases554. `specs/PROJ-<X>-<theme>/6_plan/PROJ-<X>-architecture.md`56 - architecture, data model, data flows, cross-cutting decisions575. `specs/PROJ-<X>-<theme>/6_plan/PROJ-<X>-wave-*-plan.md`58 - shipped user-story scope per wave596. `src/features/*/agent.md`60 - non-obvious gotchas surfaced during implementation617. `package.json` at `BASE_SHA` and `HEAD`62 - dependency and script deltas for setup/technical docs6364**Fallback only if structured inputs are absent:**65668. `git log --oneline --grep="PROJ-<X>" --reverse`679. focused code structure scan6869Do not re-derive what structured inputs already provide. If a Wave PASSED block lists shipped stories, treat that as canonical.7071## Claude Adaptation7273This Claude skill uses the Codex documentation skill as the behavioral source of truth. Keep gates, output structure, diagrams, content ownership, and `AGENTS.md` merge behavior aligned with the Codex copy. Claude-specific differences are limited to tool invocation and the pointer-only `CLAUDE.md` file:7475- Use project-root `AGENTS.md` for durable agent context.76- Keep project-root `CLAUDE.md` pointer-only. It must reference `AGENTS.md` as required reading and must not contain curated rules.77- Ask the user before merging any `AGENTS.md` candidate unless the current user request explicitly authorizes automatic merging.78- Use Claude `Agent` subagents when available and useful. Otherwise, generate docs locally.79- Keep documentation edits scoped to triggered files.8081## Documentation Standard8283Write for a human maintainer or product owner who did not implement the feature.8485- **Curated, not exhaustive:** explain the current truth of the app; link to PRDs for detailed acceptance criteria.86- **Feature-first:** `PROJECT.md` should answer "what can users do now?" before it talks about implementation.87- **Technical clarity:** `TECHNICAL.md` should explain architecture, technology choices, data model, data flows, deployment, and operational gotchas.88- **Diagrams when useful:** use Mermaid diagrams for system context, data model, state transitions, and critical data flows when the source material supports them.89- **Source-backed:** never invent entities, tables, services, queues, permissions, or flows. If a fact is inferred from code, say so briefly.90- **Incremental curation:** update stale sections, remove contradicted statements, and keep sibling PROJs intact.9192## Context Economy9394Documentation arrives late in the chain. Keep the main context focused on `progress.md`, the current doc diff, and any user approvals.9596- Read `progress.md` first to decide which outputs are triggered.97- Load concept, PRDs, architecture, wave plans, and source files only for the triggered output that needs them.98- If delegation is allowed, assign independent harvest tasks to subagents; otherwise do focused local reads.99- Keep long PRDs, architecture files, screenshots, and raw logs out of the final answer.100101## Workflow102103### 1. Collect documentation inputs104105Start with `7_progress/PROJ-<X>-progress.md`. Then collect only the extra inputs needed for triggered outputs:1061071. **Feature purpose and boundaries:** read the concept file if `PROJECT.md` or `README.md` needs human-facing purpose/scope text.1082. **Shipped stories:** parse Wave PASSED blocks first; fall back to `6_plan/PROJ-<X>-wave-*-plan.md` headings matching `## PROJ-<X>-PRD-<Y>-US-<Z>:`.1093. **Feature behavior:** read PRDs only to summarize capabilities, user workflows, edge cases, and links. Do not paste acceptance criteria.1104. **Technical structure:** read architecture and relevant `agent.md` files when `TECHNICAL.md` triggers.1115. **Dependency delta:** compare `package.json` at `BASE_SHA` to `HEAD` using structured JSON over `dependencies` and `devDependencies`.1126. **Runtime/deployment facts:** inspect package scripts, config files, env examples, and deployment notes only when README or TECHNICAL needs them.113114**Trigger evaluation:**115116- `PROJECT.md`: always true after QA passes117- `README.md`: first PROJ, dependency/setup/deployment delta, missing README, or explicit request118- `TECHNICAL.md`: architecture/data-flow/data-model/integration/dependency/agent-note change, missing technical doc, or explicit request119- `AGENTS.md`: `## AGENTS.md Candidates` has at least one `[PROPOSED]` entry120- `CLAUDE.md`: missing, or contains durable rules instead of only a pointer to `AGENTS.md`121122**Missing-sections fallback:** if `## PROJ Retrospective` or `## AGENTS.md Candidates` is absent, proceed anyway and note the degraded input path in the final summary.123124Only proceed to sections whose trigger fires.125126### 2. Update `docs/PROJECT.md`127128Always runs. This is the human feature guide, not a terse release log.129130**Required structure:**131132````markdown133# Project - Features134135**Last updated:** YYYY-MM-DD136**Features implemented:** <count>137138---139140## PROJ-<X>: <theme>141142**Status:** <development | QA-passed | production>143**Purpose:** <one-sentence user/business goal from concept>144**Scope:** <what is included and intentionally excluded>145146### Capabilities147148- <user-facing thing the app can now do>149- <another capability>150151### Primary Workflow1521531. <human workflow step>1542. <human workflow step>1553. <outcome>156157```mermaid158flowchart LR159 A[Start] --> B[Key user action]160 B --> C[System response]161 C --> D[Result]162```163164### User Stories Implemented165166- PROJ-<X>-PRD-1-US-1: <title>167- PROJ-<X>-PRD-1-US-2: <title>168169### Notes170171- **PRDs:** [PRD-1](../specs/PROJ-<X>-<theme>/3_PRDs/PROJ-<X>-PRD-1-<desc>.md)172- **QA:** <pass/bugs/residual-risk summary from QA Results>173- **Known limits:** <only if source-backed>174````175176Guidelines:177178- New PROJs append. Existing PROJs get only their own section refreshed.179- Include a Mermaid workflow only for meaningful multi-step behavior; skip it for trivial backend or setup-only changes.180- Keep feature text understandable to non-engineers.181- Do not duplicate detailed acceptance criteria, edge-case lists, or implementation plans.182183### 3. Update `README.md`184185Runs conditionally. README is the front door, not the technical deep dive.186187**Required structure:**188189````markdown190# <Project Name>191192> <one-sentence app purpose>193194## What It Does195196- <top-level capability>197- <top-level capability>198- <top-level capability>199200## Quick Start201202```bash203<install command>204<dev command>205```206207## Tech Stack208209- <framework> - <one-line purpose>210- <database/auth/styling/deployment> - <one-line purpose>211212## Documentation213214- [Features](docs/PROJECT.md) - human feature guide and workflows215- [Technical](docs/TECHNICAL.md) - architecture, data model, data flows, deployment, gotchas216- [AGENTS.md](./AGENTS.md) - durable conventions for AI-pair coding217````218219Guidelines:220221- Keep it short enough to scan.222- Mention setup requirements, env files, and scripts only at the level needed to run the app locally.223- Avoid duplicating `TECHNICAL.md`; link to it for architecture/data details.224225### 4. Update `docs/TECHNICAL.md`226227Runs conditionally. This is the maintainers' technical map of the app.228229**Required structure:**230231````markdown232# Technical Reference233234**Last updated:** YYYY-MM-DD235236## System Overview237238<short explanation of runtime shape and major modules>239240```mermaid241flowchart LR242 User[User] --> App[App/UI]243 App --> API[API or server actions]244 API --> DB[(Database)]245```246247## Architecture248249<high-level architecture from PROJ architecture files>250251## Technology Choices252253| Area | Choice | Why it matters |254|---|---|---|255| Frontend | <tool> | <reason> |256| Data | <tool> | <reason> |257258## Data Model259260<entities, relationships, ownership, important constraints>261262```mermaid263erDiagram264 USER ||--o{ ITEM : owns265```266267## Data Flows268269### <Flow Name>270271<when this flow happens and why>272273```mermaid274sequenceDiagram275 actor User276 participant App277 participant API278 participant DB279 User->>App: Action280 App->>API: Request281 API->>DB: Read/write282 API-->>App: Response283```284285## Integrations and External Services286287<APIs, auth providers, storage, payment, queues, model providers, email, analytics>288289## Directory Structure290291```text292src/293 app/ - <what lives here>294 features/ - <what lives here>295 lib/ - <what lives here>296```297298## Dependencies299300<runtime and dev dependencies with purpose, especially newly introduced ones>301302## Deployment and Runtime303304<provider, build command, env-var overview, persistence/runtime constraints>305306## Operational Notes and Gotchas307308<source-backed notes from agent.md, QA, post-wave notes, and retrospective>309````310311Guidelines:312313- Prefer Mermaid diagrams over prose when they reduce ambiguity.314- Include at least one diagram when `TECHNICAL.md` is created from scratch and architecture/data-flow information exists.315- Use `flowchart`, `sequenceDiagram`, `erDiagram`, or `stateDiagram-v2` according to the source material.316- Do not create fake diagrams from guesses. If the data model is absent, write "No persistent data model documented yet" rather than inventing one.317- Update stale diagrams when the underlying architecture changes.318- Keep technology explanations practical: what it is used for, why it matters, and where to find it in the repo.319320### 5. AGENTS.md merge321322Runs only if `## AGENTS.md Candidates` in progress.md has `[PROPOSED]` entries.323324**Algorithm:**3253261. Parse every `[PROPOSED]` line from progress.md's candidates section. Each line has a stable ID, such as `AGENTS-PROJ1-QA-003`.3272. For each candidate, ask the user directly:328 - Approve329 - Reject330 - Approve with edit331 - Skip3323. For each approved or edited candidate:333 - Append it to project-root `AGENTS.md` under an appropriate short heading.334 - Prefix the line with its ID as a comment anchor: `<!-- AGENTS-PROJ1-QA-003 -->`.335 - In progress.md, flip `[PROPOSED]` to `[MERGED]` by ID. Never delete the candidate line.3364. Enforce the 40-line hard cap on `AGENTS.md`.337 - Count non-blank lines, including headings.338 - If over 40, ask the user which old entries to remove. Do not delete automatically.3395. Rejected candidates are marked `[REJECTED]` in progress.md to prevent re-proposal.340341Never edit `AGENTS.md` without explicit approval per entry. The user owns this file; Skill 7 only facilitates.342343**Autonomous mode** (`CLAUDE_AUTONOMOUS_LEVEL=balanced` set):344345- `balanced`: auto-merge a candidate only if high-confidence: two or more persona sources flagged the same rule, or the source is `Dr. Sarah Chen (Security)` or a DB-schema/RLS finding. Everything else is marked `[REJECTED-BY-POLICY]`.346- `conservative`: reject all candidates for later user review.347- `aggressive`: auto-merge everything.348349On 40-line overflow, `balanced` and `aggressive` evict oldest merged entries until within cap; `conservative` halts for user pruning. Log every auto-decision to `7_progress/PROJ-<X>-autonomous-log.md`.350351### 6. CLAUDE.md pointer352353Runs if `CLAUDE.md` is missing or contains durable rules.354355`CLAUDE.md` must stay a tiny pointer file. It should not be curated, should not receive QA candidates, and should not duplicate `AGENTS.md`.356357Allowed content:358359```markdown360# Claude Instructions361362Must read and follow [AGENTS.md](./AGENTS.md) before making changes. All durable agent instructions are curated in AGENTS.md only.363```364365If an existing `CLAUDE.md` contains additional durable rules, move proposed durable rules through the normal `AGENTS.md` candidate flow instead of preserving them in `CLAUDE.md`.366367### 7. Git commit368369One commit for the documentation update:370371```text372docs(PROJ-<X>): Update project documentation373```374375If `AGENTS.md` was merged or `CLAUDE.md` was normalized to the pointer, include those changes in the same commit.376377## Content Ownership378379| Info | Lives in |380|---|---|381| "What does this app do?" | `README.md` summary + `docs/PROJECT.md` feature guide |382| "How do I run it?" | `README.md` |383| "Which features exist and how do users use them?" | `docs/PROJECT.md` |384| "What are the detailed ACs of feature X?" | Linked PRD |385| "Why did we choose this architecture or dependency?" | `docs/TECHNICAL.md` |386| "What is the data model?" | `docs/TECHNICAL.md` |387| "How does data move through the system?" | `docs/TECHNICAL.md` with Mermaid flow/sequence diagrams |388| "What should future agents always remember?" | `AGENTS.md`, after user approval |389| "Where should Claude look for durable rules?" | `CLAUDE.md` pointer to `AGENTS.md` |390| "What bugs remain?" | `docs/PROJECT.md` QA note if source-backed |391392## Rules393394- English for all generated docs, even if the conversation is German.395- Human-readable first; implementation details only where they explain behavior or maintenance.396- Do not duplicate PRDs, architecture plans, or QA logs; summarize and link.397- Prefer source-backed statements over confident reconstruction.398- Keep diagrams valid Mermaid and small enough to read.399- No emojis unless the user explicitly asks.400- Do not fabricate setup commands, environment variables, tables, queues, services, or integrations.401402## When to Run403404- After Step 6 QA passes for a PROJ-X.405- When the user explicitly asks for documentation, feature docs, technical docs, diagrams, data model explanation, or data-flow explanation.406407---408> Source: [silviobeer/agentic-development-skill-chain](https://github.com/silviobeer/agentic-development-skill-chain) — distributed by [TomeVault](https://tomevault.io).409<!-- tomevault:4.0:skill_md:2026-05-22 -->