AI-DLC Doc Writer
Produces the actual content of AI-DLC documents. For status/phase tracking
and approval gates, see aidlc-tracker — use that skill first to confirm
which doc is next and that writing it now is appropriate.
1. Find the doc root
Check, in this order, for the AI-DLC docs root (and check project rules /
CLAUDE.md for an explicit remap — some projects redirect the official
default to a different path):
docs/aidlc/
aidlc-docs/ (official AI-DLC default)
.aidlc-docs/
If none exist and the user wants to start, see "Bootstrapping" below.
2. Read source first
Before writing any construction doc, read the relevant implementation
files (.tf, .cs, .js, .py, etc.) for the unit being documented. Docs
must describe what is actually implemented, not what was planned — if they
diverge, the code wins and the doc should say what's real.
3. Phase → folder → required files
| Phase |
Folder |
Required files |
| Inception |
<root>/inception/ |
architecture-decisions, architecture-diagram, execution-plan, team-responsibilities, requirements-clarification-questions |
| Construction (per unit) |
<root>/construction/ |
infrastructure-design, CONSTRUCTION-REVIEW, functional-design, nfr-requirements, nfr-design |
| Construction / Build & Test |
<root>/construction/build-and-test/ |
build-instructions, unit-test-instructions, integration-test-instructions, build-and-test-summary |
| Operations |
<root>/operations/ |
deployment-runbook, deployment-readiness-checklist, e2e-testing-guide |
| Verification |
<root>/verification/ |
self-check-report, interview-prep |
4. Per-document structure
- functional-design.md: data model table → business rules (
BR-NN
format) → service interaction diagram.
- nfr-requirements.md: numbered NFRs grouped by category (Throughput,
Latency, Availability, Scalability, Security, Observability, Retention,
Cost, Maintainability, Resilience).
- nfr-design.md: one section per NFR category → pattern name → code/HCL
snippet from actual source → file reference.
- build-and-test/:
build-instructions covers the CI stage diagram;
unit-test-instructions lists every test case; integration-test-instructions
covers smoke + e2e; build-and-test-summary has a pipeline gate map + NFR
coverage table + known gaps.
5. Append-only audit log
Always use an append (e.g. str_replace/Edit adding a new line, never a
full overwrite) to add entries to <root>/audit.md:
| {ISO date} | {Phase} - {Stage} | {Description} | Agent |
Match whatever format already exists — if it's a different table shape or
per-entry block style, follow that instead of reformatting.
6. Retroactive docs
Any doc created after the work it describes was already implemented must say
so in its header:
**Status:** ✅ Approved (retroactively documented — reflects implemented code)
7. Update the doc index
After adding any new doc, add it to the project's AIDLC doc index/table if
one exists (commonly a table in README.md, INDEX.md, or a DEMO/
walkthrough doc) — search for an existing phase table before assuming none
exists.
8. Bootstrapping a new project
If no AIDLC docs exist yet:
- Create
docs/aidlc/aidlc-state.md with a Project table (scenario, repo,
doc root), a Current Status table (phase=Inception, stage=Workspace
Detection, status, last-updated=today), an empty Phase Completion table,
and an Artifacts Index pointing at phase subfolders.
- Create
docs/aidlc/audit.md with a header and the table format from
step 5.
- Create
inception/, construction/, operations/ subfolders only as
their first artifact is written — don't pre-create empty folders.
- Hand off to
aidlc-tracker for ongoing status/gate tracking.
1---2name: aidlc-doc-writer3description: Write or update AI-DLC methodology documents (inception, per-unit construction, operations, verification) following the standard phase-to-folder mapping and per-document structure conventions, reading the actual source/infra code first so docs reflect what's implemented. Complements aidlc-tracker (status/gates) by producing the document content itself. Use when asked to write/update an AIDLC doc, document a phase/stage, or generate AIDLC scaffolding for a new project.4---56# AI-DLC Doc Writer78Produces the actual content of AI-DLC documents. For status/phase tracking9and approval gates, see `aidlc-tracker` — use that skill first to confirm10which doc is next and that writing it now is appropriate.1112## 1. Find the doc root1314Check, in this order, for the AI-DLC docs root (and check project rules /15`CLAUDE.md` for an explicit remap — some projects redirect the official16default to a different path):17- `docs/aidlc/`18- `aidlc-docs/` (official AI-DLC default)19- `.aidlc-docs/`2021If none exist and the user wants to start, see "Bootstrapping" below.2223## 2. Read source first2425Before writing **any** construction doc, read the relevant implementation26files (`.tf`, `.cs`, `.js`, `.py`, etc.) for the unit being documented. Docs27must describe what is actually implemented, not what was planned — if they28diverge, the code wins and the doc should say what's real.2930## 3. Phase → folder → required files3132| Phase | Folder | Required files |33|-------|--------|-----------------|34| Inception | `<root>/inception/` | architecture-decisions, architecture-diagram, execution-plan, team-responsibilities, requirements-clarification-questions |35| Construction (per unit) | `<root>/construction/` | infrastructure-design, CONSTRUCTION-REVIEW, functional-design, nfr-requirements, nfr-design |36| Construction / Build & Test | `<root>/construction/build-and-test/` | build-instructions, unit-test-instructions, integration-test-instructions, build-and-test-summary |37| Operations | `<root>/operations/` | deployment-runbook, deployment-readiness-checklist, e2e-testing-guide |38| Verification | `<root>/verification/` | self-check-report, interview-prep |3940## 4. Per-document structure4142- **functional-design.md**: data model table → business rules (`BR-NN`43 format) → service interaction diagram.44- **nfr-requirements.md**: numbered NFRs grouped by category (Throughput,45 Latency, Availability, Scalability, Security, Observability, Retention,46 Cost, Maintainability, Resilience).47- **nfr-design.md**: one section per NFR category → pattern name → code/HCL48 snippet from actual source → file reference.49- **build-and-test/**: `build-instructions` covers the CI stage diagram;50 `unit-test-instructions` lists every test case; `integration-test-instructions`51 covers smoke + e2e; `build-and-test-summary` has a pipeline gate map + NFR52 coverage table + known gaps.5354## 5. Append-only audit log5556Always use an append (e.g. `str_replace`/`Edit` adding a new line, never a57full overwrite) to add entries to `<root>/audit.md`:5859```60| {ISO date} | {Phase} - {Stage} | {Description} | Agent |61```6263Match whatever format already exists — if it's a different table shape or64per-entry block style, follow that instead of reformatting.6566## 6. Retroactive docs6768Any doc created after the work it describes was already implemented must say69so in its header:7071```72**Status:** ✅ Approved (retroactively documented — reflects implemented code)73```7475## 7. Update the doc index7677After adding any new doc, add it to the project's AIDLC doc index/table if78one exists (commonly a table in `README.md`, `INDEX.md`, or a `DEMO/`79walkthrough doc) — search for an existing phase table before assuming none80exists.8182## 8. Bootstrapping a new project8384If no AIDLC docs exist yet:851. Create `docs/aidlc/aidlc-state.md` with a Project table (scenario, repo,86 doc root), a Current Status table (phase=Inception, stage=Workspace87 Detection, status, last-updated=today), an empty Phase Completion table,88 and an Artifacts Index pointing at phase subfolders.892. Create `docs/aidlc/audit.md` with a header and the table format from90 step 5.913. Create `inception/`, `construction/`, `operations/` subfolders only as92 their first artifact is written — don't pre-create empty folders.934. Hand off to `aidlc-tracker` for ongoing status/gate tracking.