docs-pipeline
Orchestrates documentation backfill as a cross-cutting pipeline run by leads before handoff. Keeps project-knowledge in sync with the code/artefacts actually produced.
Trigger — when to run
Lead MUST run docs-pipeline if the engagement changed ANY of:
| Domain |
Trigger |
| dev |
architecture (new service, layer, pattern), deployment (new target, env, secret), public API contract, build/CI topology, security posture, data model |
| design |
brand voice/identity doc, design-system tokens/components, accessibility convention |
| marketing |
brand voice/messaging, semantic core, reporting template, campaign pattern |
If engagement changed NONE of these, skip — but log "docs: no change" in engagement/docs-diff.md.
Project-knowledge layout
Canonical path: .claude/skills/project-knowledge/references/ in the project working directory.
| File |
Owner content |
project.md |
project overview, stack, environments, contacts |
architecture.md |
system topology, services, layers, data flow |
patterns.md |
code conventions, naming, folder layout, git workflow |
deployment.md |
deploy targets, CI/CD pipeline, secrets table, rollback steps |
ux-guidelines.md |
interaction patterns, voice, accessibility standards |
Design engagements may add: brand.md, design-system.md.
Marketing engagements may add: voice.md, semantic-core.md, campaigns-log.md.
Steps
1. Identify required updates
Lead diffs the engagement against existing docs:
- What decisions were made that are NOT in the docs yet?
- What code/pattern is now canonical that wasn't before?
- What operational step was added (new secret, new CI job, new rollback)?
List them in engagement/docs-diff.md under "Proposed updates".
2. Dispatch dev-technical-writer
Via Task tool. Pass:
- Absolute paths to the engagement artefacts (spec, PRs, decisions).
- Absolute path to
engagement/docs-diff.md (proposed updates list).
- Absolute path to project-knowledge references directory.
- Engagement domain (dev / design / marketing).
Writer output: edits applied to references/*.md + a changelog section in docs-diff.md showing before/after per file.
3. Verify (lead)
Lead reads the diff. Checks:
- Every proposed update landed in the right file.
- No doc bloat (writer didn't add redundant sections).
- Code blocks contain only canonical snippets, not one-off engagement examples.
- No generic prose padding ("We value clean code. Our architecture is robust.").
If issues: re-dispatch writer with specific fix list. Max 2 writer re-dispatches per iteration.
4. documentation-reviewer pass
Dispatch documentation-reviewer via Task tool to check:
- Document quality against documentation-writing principles.
- No code blocks where prose suffices.
- Operational specifics present (paths, commands, secret names).
- No duplication across files.
Log verdict in engagement/validation-log.md under documentation-reviewer.
5. Record in docs-diff
engagement/docs-diff.md must contain by end of pipeline:
# Docs diff — {engagement-name}
## Files changed
- `references/architecture.md` — added section §3 Service X
- `references/deployment.md` — added secret NEW_API_KEY + rollback for Service X
- `references/patterns.md` — no change (no new pattern introduced)
## Review
- documentation-reviewer verdict: clean (or N findings + resolutions)
## Not yet written
- {if anything was deferred with reason}
Skip rules
Allowed skip scenarios — log in docs-diff:
| Case |
Justified because |
| Pure bugfix with no new pattern |
nothing to document |
| Refactor within existing module, no API change |
convention already captured |
| Copy tweak on existing landing |
brand voice doc already lists voice rules |
Director will verify the skip justification matches engagement scope. Do NOT skip to save time if change is user-visible or operationally relevant.
Anti-patterns
- Don't treat docs as optional. Director rejects handoffs where architecture changed but
architecture.md doesn't reflect it.
- Don't dump code into docs. Project-knowledge is prose + tables + short canonical snippets, not a code dump.
- Don't write generic prose. "We value clean code" is doc bloat. Write specifics: "Folder
src/services/ contains class-per-file, each class exports a single default."
- Don't duplicate across files. If
deployment.md lists the pipeline, patterns.md references it — doesn't repeat it.
- Don't skip
documentation-reviewer. Cheap check, catches rot.
1---
2name: docs-pipeline
3domain: meta
4description: |
5 [PROTOCOL] Documentation backfill after an engagement changes
6 code, architecture, deployment, or public contracts. Defines when to trigger,
7 which doc files to update, and what the diff artefact must contain.
8 Preloaded by lead agents (dev-lead, design-lead, marketing-lead). Pure
9 reference — no triggers, not invoked by secretary.
10metadata:
11 source: https://skillmd.com/skills/aibot88/docs-pipeline
12---
13
14# docs-pipeline
15
16Orchestrates documentation backfill as a cross-cutting pipeline run by leads before handoff. Keeps project-knowledge in sync with the code/artefacts actually produced.
17
18## Trigger — when to run
19
20Lead MUST run docs-pipeline if the engagement changed ANY of:
21
22| Domain | Trigger |
23|---|---|
24| dev | architecture (new service, layer, pattern), deployment (new target, env, secret), public API contract, build/CI topology, security posture, data model |
25| design | brand voice/identity doc, design-system tokens/components, accessibility convention |
26| marketing | brand voice/messaging, semantic core, reporting template, campaign pattern |
27
28If engagement changed NONE of these, skip — but log "docs: no change" in `engagement/docs-diff.md`.
29
30## Project-knowledge layout
31
32Canonical path: `.claude/skills/project-knowledge/references/` in the project working directory.
33
34| File | Owner content |
35|---|---|
36| `project.md` | project overview, stack, environments, contacts |
37| `architecture.md` | system topology, services, layers, data flow |
38| `patterns.md` | code conventions, naming, folder layout, git workflow |
39| `deployment.md` | deploy targets, CI/CD pipeline, secrets table, rollback steps |
40| `ux-guidelines.md` | interaction patterns, voice, accessibility standards |
41
42Design engagements may add: `brand.md`, `design-system.md`.
43Marketing engagements may add: `voice.md`, `semantic-core.md`, `campaigns-log.md`.
44
45## Steps
46
47### 1. Identify required updates
48
49Lead diffs the engagement against existing docs:
50- What decisions were made that are NOT in the docs yet?
51- What code/pattern is now canonical that wasn't before?
52- What operational step was added (new secret, new CI job, new rollback)?
53
54List them in `engagement/docs-diff.md` under "Proposed updates".
55
56### 2. Dispatch `dev-technical-writer`
57
58Via Task tool. Pass:
59- Absolute paths to the engagement artefacts (spec, PRs, decisions).
60- Absolute path to `engagement/docs-diff.md` (proposed updates list).
61- Absolute path to project-knowledge references directory.
62- Engagement domain (dev / design / marketing).
63
64Writer output: edits applied to references/*.md + a changelog section in `docs-diff.md` showing before/after per file.
65
66### 3. Verify (lead)
67
68Lead reads the diff. Checks:
69- Every proposed update landed in the right file.
70- No doc bloat (writer didn't add redundant sections).
71- Code blocks contain only canonical snippets, not one-off engagement examples.
72- No generic prose padding ("We value clean code. Our architecture is robust.").
73
74If issues: re-dispatch writer with specific fix list. Max 2 writer re-dispatches per iteration.
75
76### 4. `documentation-reviewer` pass
77
78Dispatch `documentation-reviewer` via Task tool to check:
79- Document quality against documentation-writing principles.
80- No code blocks where prose suffices.
81- Operational specifics present (paths, commands, secret names).
82- No duplication across files.
83
84Log verdict in `engagement/validation-log.md` under `documentation-reviewer`.
85
86### 5. Record in docs-diff
87
88`engagement/docs-diff.md` must contain by end of pipeline:
89
90```markdown
91# Docs diff — {engagement-name}
92
93## Files changed
94- `references/architecture.md` — added section §3 Service X
95- `references/deployment.md` — added secret NEW_API_KEY + rollback for Service X
96- `references/patterns.md` — no change (no new pattern introduced)
97
98## Review
99- documentation-reviewer verdict: clean (or N findings + resolutions)
100
101## Not yet written
102- {if anything was deferred with reason}
103```
104
105## Skip rules
106
107Allowed skip scenarios — log in docs-diff:
108
109| Case | Justified because |
110|---|---|
111| Pure bugfix with no new pattern | nothing to document |
112| Refactor within existing module, no API change | convention already captured |
113| Copy tweak on existing landing | brand voice doc already lists voice rules |
114
115Director will verify the skip justification matches engagement scope. Do NOT skip to save time if change is user-visible or operationally relevant.
116
117## Anti-patterns
118
119- **Don't treat docs as optional.** Director rejects handoffs where architecture changed but `architecture.md` doesn't reflect it.
120- **Don't dump code into docs.** Project-knowledge is prose + tables + short canonical snippets, not a code dump.
121- **Don't write generic prose.** "We value clean code" is doc bloat. Write specifics: "Folder `src/services/` contains class-per-file, each class exports a single default."
122- **Don't duplicate across files.** If `deployment.md` lists the pipeline, `patterns.md` references it — doesn't repeat it.
123- **Don't skip `documentation-reviewer`.** Cheap check, catches rot.