Update Documentation -- Tech Writers Agents Team
Generate world-class documentation for ANY project using a team of 5 specialized agents. Follows Diataxis, Arc42, C4 Model, Stripe, Google Style Guide, Microsoft Learn, Rust Book, and 12-Factor patterns.
The Team
| Agent |
Role |
Analogy |
| doc-orchestrator |
Lead -- detects stack, dispatches team, merges results |
Editor-in-Chief |
| doc-hub-architect |
Designs docs/ structure, creates INDEX hub |
Information Architect |
| doc-official-writer |
Official project docs (Diataxis 4-quadrant) |
Senior Technical Writer |
| doc-code-analyst |
Deep code docs (teaches everything to anyone) |
Staff Engineer |
| doc-diagram-artist |
Eraser.io diagrams (C4, Arc42, ERD, flows) |
Visual Designer |
What To Do
Parse target and flags from $ARGUMENTS. Default target is all if none specified.
Detect project stack(s) by scanning root for identifying files:
.csproj/.sln = .NET | pom.xml = Java | go.mod = Go | Cargo.toml = Rust
package.json = Node.js (sub-detect deps) | requirements.txt = Python
angular.json = Angular | next.config.js = Next.js | pubspec.yaml = Flutter
- 30+ more stacks supported (see doc-orchestrator agent for full list)
Dispatch agents based on target (use Task tool for parallel execution):
| Target |
Agents Dispatched |
Output Directory |
hub |
doc-hub-architect |
docs/INDEX.md |
official |
doc-official-writer + doc-diagram-artist |
docs/project/ (11 docs) |
deep |
doc-code-analyst + doc-diagram-artist |
docs/code/ (13 docs) |
diagrams |
doc-diagram-artist |
docs/diagrams/ (8 diagrams) |
codemap |
doc-code-analyst (quick) |
docs/code/01-CODEBASE-MAP.md |
api |
doc-official-writer (quick) |
docs/project/06-API-REFERENCE.md |
memory |
doc-orchestrator (self) |
Refresh MEMORY.md counters |
claude |
doc-orchestrator (self) |
Update CLAUDE.md active context |
all |
ALL agents in parallel |
Full docs/ generation |
Post-process: Cross-link all documents, verify all markdown links resolve, report summary.
Verify: Check no empty documents, all diagrams have valid URLs, hub links to every doc.
Documentation Architecture
Layer 1: Official Project Documentation (docs/project/)
Follows Diataxis (4 content types) + Arc42 (architecture template) + Stripe (API docs):
| Document |
Type |
Framework |
| OVERVIEW.md |
Explanation |
Arc42 S1-S2 |
| QUICKSTART.md |
Tutorial |
Microsoft Learn |
| TUTORIALS.md |
Tutorial |
Rust Book |
| ARCHITECTURE.md |
Explanation |
Arc42 S3-S9 + C4 |
| HOWTO-GUIDES.md |
How-to |
Diataxis |
| API-REFERENCE.md |
Reference |
Stripe (use-case-first) |
| DEPLOYMENT.md |
Reference |
12-Factor App |
| CONFIGURATION.md |
Reference |
12-Factor III |
| SECURITY.md |
Explanation |
OWASP + GDPR |
| GLOSSARY.md |
Reference |
Arc42 S12 |
| ADR/ |
Explanation |
Arc42 S9 |
Layer 2: Deep Code Documentation (docs/code/)
Follows Rust Book progressive teaching (TL;DR -> Plain English -> Technical -> Deep Dive):
| Document |
What It Teaches |
| CODEBASE-MAP.md |
Every file and its responsibility |
| ARCHITECTURE-PATTERNS.md |
All design patterns with real code |
| DATA-FLOW.md |
Request lifecycle end-to-end |
| DATA-MODEL.md |
All entities and relationships |
| CLASS-HIERARCHY.md |
Interfaces, implementations, composition |
| ALGORITHMS.md |
Core algorithms with complexity analysis |
| ERROR-HANDLING.md |
Error types and recovery patterns |
| TESTING-STRATEGY.md |
Test pyramid and coverage map |
| PERFORMANCE.md |
Bottlenecks and optimization |
| SECURITY-INTERNALS.md |
Auth implementation and GDPR mechanics |
| DEPENDENCIES.md |
Every dependency and why it was chosen |
| CONVENTIONS.md |
Naming, file org, commit style |
| TECHNICAL-DEBT.md |
Known issues and refactoring candidates |
Layer 3: Diagrams (docs/diagrams/)
Generated via Eraser.io API following C4 Model:
System Context (C4 L1) | Container (C4 L2) | Component (C4 L3) | Data Model (ERD) | API Flow (Sequence) | Deployment | Security Flow | Data Flow
Arguments
<target>: One of hub, official, deep, diagrams, codemap, api, memory, claude, all
--preview: Show planned files and sections without writing anything
--verbose: Show agent dispatch log and scan details
--force: Overwrite existing docs (default: merge/update non-destructively)
--stack=<name>: Override auto-detection (e.g., --stack=dotnet)
Examples
/update-docs all # Full documentation generation
/update-docs official --preview # Preview official docs without writing
/update-docs deep # Generate deep code documentation
/update-docs diagrams # Regenerate all Eraser.io diagrams
/update-docs codemap # Quick: codebase map only
/update-docs api # Quick: API reference only
/update-docs memory # Refresh EAGLES MEMORY.md counters
/update-docs hub # Generate documentation hub INDEX
Verification
After running, verify:
docs/INDEX.md exists and links to all generated documents
docs/project/ contains 11+ documents following Diataxis types
docs/code/ contains 13+ documents with progressive teaching structure
docs/diagrams/ contains Eraser.io diagram URLs
- All code snippets reference real source files (never invented)
- Writing style follows Google Developer Docs guidelines
1---2name: update-docs-113description: Universal documentation generator powered by a tech writers agents team (5 specialized agents)4---5
6# Update Documentation -- Tech Writers Agents Team
7
8Generate world-class documentation for ANY project using a team of 5 specialized agents. Follows Diataxis, Arc42, C4 Model, Stripe, Google Style Guide, Microsoft Learn, Rust Book, and 12-Factor patterns.
9
10## The Team
11
12| Agent | Role | Analogy |
13|-------|------|---------|
14| **doc-orchestrator** | Lead -- detects stack, dispatches team, merges results | Editor-in-Chief |
15| **doc-hub-architect** | Designs docs/ structure, creates INDEX hub | Information Architect |
16| **doc-official-writer** | Official project docs (Diataxis 4-quadrant) | Senior Technical Writer |
17| **doc-code-analyst** | Deep code docs (teaches everything to anyone) | Staff Engineer |
18| **doc-diagram-artist** | Eraser.io diagrams (C4, Arc42, ERD, flows) | Visual Designer |
19
20## What To Do
21
221. **Parse target and flags** from `$ARGUMENTS`. Default target is `all` if none specified.
23
242. **Detect project stack(s)** by scanning root for identifying files:
25 - `.csproj`/`.sln` = .NET | `pom.xml` = Java | `go.mod` = Go | `Cargo.toml` = Rust
26 - `package.json` = Node.js (sub-detect deps) | `requirements.txt` = Python
27 - `angular.json` = Angular | `next.config.js` = Next.js | `pubspec.yaml` = Flutter
28 - 30+ more stacks supported (see doc-orchestrator agent for full list)
29
303. **Dispatch agents** based on target (use Task tool for parallel execution):
31
32 | Target | Agents Dispatched | Output Directory |
33 |--------|-------------------|-----------------|
34 | `hub` | doc-hub-architect | `docs/INDEX.md` |
35 | `official` | doc-official-writer + doc-diagram-artist | `docs/project/` (11 docs) |
36 | `deep` | doc-code-analyst + doc-diagram-artist | `docs/code/` (13 docs) |
37 | `diagrams` | doc-diagram-artist | `docs/diagrams/` (8 diagrams) |
38 | `codemap` | doc-code-analyst (quick) | `docs/code/01-CODEBASE-MAP.md` |
39 | `api` | doc-official-writer (quick) | `docs/project/06-API-REFERENCE.md` |
40 | `memory` | doc-orchestrator (self) | Refresh MEMORY.md counters |
41 | `claude` | doc-orchestrator (self) | Update CLAUDE.md active context |
42 | `all` | ALL agents in parallel | Full `docs/` generation |
43
444. **Post-process**: Cross-link all documents, verify all markdown links resolve, report summary.
45
465. **Verify**: Check no empty documents, all diagrams have valid URLs, hub links to every doc.
47
48## Documentation Architecture
49
50### Layer 1: Official Project Documentation (`docs/project/`)
51Follows **Diataxis** (4 content types) + **Arc42** (architecture template) + **Stripe** (API docs):
52
53| Document | Type | Framework |
54|----------|------|-----------|
55| OVERVIEW.md | Explanation | Arc42 S1-S2 |
56| QUICKSTART.md | Tutorial | Microsoft Learn |
57| TUTORIALS.md | Tutorial | Rust Book |
58| ARCHITECTURE.md | Explanation | Arc42 S3-S9 + C4 |
59| HOWTO-GUIDES.md | How-to | Diataxis |
60| API-REFERENCE.md | Reference | Stripe (use-case-first) |
61| DEPLOYMENT.md | Reference | 12-Factor App |
62| CONFIGURATION.md | Reference | 12-Factor III |
63| SECURITY.md | Explanation | OWASP + GDPR |
64| GLOSSARY.md | Reference | Arc42 S12 |
65| ADR/ | Explanation | Arc42 S9 |
66
67### Layer 2: Deep Code Documentation (`docs/code/`)
68Follows **Rust Book** progressive teaching (TL;DR -> Plain English -> Technical -> Deep Dive):
69
70| Document | What It Teaches |
71|----------|-----------------|
72| CODEBASE-MAP.md | Every file and its responsibility |
73| ARCHITECTURE-PATTERNS.md | All design patterns with real code |
74| DATA-FLOW.md | Request lifecycle end-to-end |
75| DATA-MODEL.md | All entities and relationships |
76| CLASS-HIERARCHY.md | Interfaces, implementations, composition |
77| ALGORITHMS.md | Core algorithms with complexity analysis |
78| ERROR-HANDLING.md | Error types and recovery patterns |
79| TESTING-STRATEGY.md | Test pyramid and coverage map |
80| PERFORMANCE.md | Bottlenecks and optimization |
81| SECURITY-INTERNALS.md | Auth implementation and GDPR mechanics |
82| DEPENDENCIES.md | Every dependency and why it was chosen |
83| CONVENTIONS.md | Naming, file org, commit style |
84| TECHNICAL-DEBT.md | Known issues and refactoring candidates |
85
86### Layer 3: Diagrams (`docs/diagrams/`)
87Generated via **Eraser.io API** following **C4 Model**:
88
89System Context (C4 L1) | Container (C4 L2) | Component (C4 L3) | Data Model (ERD) | API Flow (Sequence) | Deployment | Security Flow | Data Flow
90
91## Arguments
92
93- `<target>`: One of `hub`, `official`, `deep`, `diagrams`, `codemap`, `api`, `memory`, `claude`, `all`
94- `--preview`: Show planned files and sections without writing anything
95- `--verbose`: Show agent dispatch log and scan details
96- `--force`: Overwrite existing docs (default: merge/update non-destructively)
97- `--stack=<name>`: Override auto-detection (e.g., `--stack=dotnet`)
98
99## Examples
100
101```bash
102/update-docs all # Full documentation generation
103/update-docs official --preview # Preview official docs without writing
104/update-docs deep # Generate deep code documentation
105/update-docs diagrams # Regenerate all Eraser.io diagrams
106/update-docs codemap # Quick: codebase map only
107/update-docs api # Quick: API reference only
108/update-docs memory # Refresh EAGLES MEMORY.md counters
109/update-docs hub # Generate documentation hub INDEX
110```
111
112## Verification
113
114After running, verify:
1151. `docs/INDEX.md` exists and links to all generated documents
1162. `docs/project/` contains 11+ documents following Diataxis types
1173. `docs/code/` contains 13+ documents with progressive teaching structure
1184. `docs/diagrams/` contains Eraser.io diagram URLs
1195. All code snippets reference real source files (never invented)
1206. Writing style follows Google Developer Docs guidelines