@damenor/agent-docs 0.1.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +65 -29
  2. package/dist/index.js +3834 -217
  3. package/package.json +14 -11
  4. package/templates/modules/agents/.agents/agents/doc-designer.md +39 -37
  5. package/templates/modules/agents/.agents/agents/doc-maintainer.md +35 -35
  6. package/templates/modules/agents/.agents/agents/doc-reviewer.md +55 -46
  7. package/templates/modules/agents/.agents/agents/doc-writer.md +34 -33
  8. package/templates/modules/agents/.agents/agents/reviewer.md +114 -100
  9. package/templates/modules/agents/.agents/skills/doc-design/SKILL.md +176 -174
  10. package/templates/modules/agents/.agents/skills/doc-design/references/design-system-format.md +241 -247
  11. package/templates/modules/agents/.agents/skills/doc-maintain/SKILL.md +205 -195
  12. package/templates/modules/agents/.agents/skills/doc-maintain/references/triggers.md +171 -165
  13. package/templates/modules/agents/.agents/skills/doc-review/SKILL.md +245 -240
  14. package/templates/modules/agents/.agents/skills/doc-review/references/health-checklist.md +115 -112
  15. package/templates/modules/agents/.agents/skills/doc-scaffold/SKILL.md +164 -157
  16. package/templates/modules/agents/.agents/skills/doc-scaffold/references/diataxis-quick-ref.md +110 -110
  17. package/templates/modules/agents/.agents/skills/doc-write/SKILL.md +240 -212
  18. package/templates/modules/agents/.agents/skills/doc-write/references/adr-format.md +99 -93
  19. package/templates/modules/agents/.agents/skills/doc-write/references/diataxis-patterns.md +221 -200
  20. package/templates/base/AGENTS.md +0 -177
  21. package/templates/base/CHANGELOG.md +0 -86
  22. package/templates/base/README.md +0 -110
  23. package/templates/base/docs/CONTEXT.md +0 -111
  24. package/templates/base/docs/README.md +0 -131
  25. package/templates/base/docs/adr/TEMPLATE.md +0 -83
  26. package/templates/modules/design/docs/DESIGN.md +0 -253
  27. package/templates/modules/explanation/docs/explanation/agent-flow.md +0 -15
  28. package/templates/modules/explanation/docs/explanation/architecture.md +0 -138
  29. package/templates/modules/guides/docs/guides/deployment.md +0 -189
  30. package/templates/modules/guides/docs/guides/runbooks/TEMPLATE.md +0 -86
  31. package/templates/modules/guides/docs/guides/troubleshooting.md +0 -65
  32. package/templates/modules/operations/docs/operations/README.md +0 -115
  33. package/templates/modules/product/docs/product/overview.md +0 -90
  34. package/templates/modules/product/docs/roadmap.md +0 -80
  35. package/templates/modules/reference/docs/reference/api.md +0 -131
  36. package/templates/modules/reference/docs/reference/code-style.md +0 -275
  37. package/templates/modules/reference/docs/reference/configuration.md +0 -117
  38. package/templates/modules/reference/docs/reference/infrastructure.md +0 -191
  39. package/templates/modules/tutorials/docs/tutorials/environment-setup.md +0 -212
  40. package/templates/modules/tutorials/docs/tutorials/first-task.md +0 -246
  41. package/templates/modules/tutorials/docs/tutorials/quick-start.md +0 -146
package/README.md CHANGED
@@ -64,19 +64,21 @@ npx @damenor/agent-docs
64
64
 
65
65
  ### What comes out:
66
66
 
67
+ Every file is generated programmatically by 22 TypeScript generators — no static templates copied. Each generator produces content tailored to your stack and language.
68
+
67
69
  ```
68
70
  my-project/
69
71
  ├── AGENTS.md 🤖 AI agent protocol (they finally behave)
70
72
  ├── docs/
71
73
  │ ├── CONTEXT.md 📝 Domain glossary (everyone speaks the same language)
72
74
  │ ├── README.md 📑 Docs index (navigable from day one)
75
+ │ ├── DESIGN.md 🎨 Design system tokens (colors, typography, spacing)
73
76
  │ ├── tutorials/ 🎓 Step-by-step learning (onboarding in 15 min, not 2 hours)
74
77
  │ ├── guides/ 📖 How-to guides (deployment, troubleshooting, runbooks)
75
78
  │ ├── reference/ 📋 Technical reference (API, config, infra, code-style)
76
79
  │ ├── explanation/ 🏗️ Architecture decisions (ADRs, not lost Slack messages)
77
80
  │ ├── product/ 📊 Overview & roadmap (what are we building again?)
78
81
  │ ├── operations/ 🔧 Monitoring & incidents (when prod goes brrr)
79
- │ ├── DESIGN.md 🎨 Design system tokens (colors, typography, spacing)
80
82
  │ └── adr/ 📐 Architecture Decision Records (decisions that last)
81
83
  ├── .agents/ 🤖 5 skills + 5 agents (your AI team is ready)
82
84
  ├── .github/workflows/ ⚙️ CI/CD for docs (never ship broken docs again)
@@ -90,33 +92,57 @@ my-project/
90
92
 
91
93
  Every project is different. Mix and match:
92
94
 
93
- | 🎯 Module | 📄 What you get | 💡 Why you care |
94
- |-----------|----------------|----------------|
95
- | 🎓 Tutorials | quick-start, setup, first-task | New dev productive in 15 min |
96
- | 📖 Guides | deployment, troubleshooting, runbooks | No more "it works on my machine" |
97
- | 📋 Reference | API, config, infra, code-style | Stop answering the same questions |
98
- | 🏗️ Explanation | architecture.md | Everyone understands the big picture |
99
- | 📊 Product | overview, roadmap | Stakeholders know what's happening |
100
- | 🔧 Operations | monitoring, incidents, SLAs | Prod issues resolved faster |
101
- | 🎨 Design System | DESIGN.md with tokens | Consistent UI, no guesswork |
102
- | 🤖 AI Agent Skills | 5 skills + 5 agents | AI agents that actually help |
103
- | ⚙️ CI/CD | GitHub Actions workflow | Docs checked on every PR |
95
+ | 🎯 Module | 📄 What you get | 💡 Why you care |
96
+ | ------------------ | ------------------------------------- | ------------------------------------ |
97
+ | 🎓 Tutorials | quick-start, setup, first-task | New dev productive in 15 min |
98
+ | 📖 Guides | deployment, troubleshooting, runbooks | No more "it works on my machine" |
99
+ | 📋 Reference | API, config, infra, code-style | Stop answering the same questions |
100
+ | 🏗️ Explanation | architecture.md | Everyone understands the big picture |
101
+ | 📊 Product | overview, roadmap | Stakeholders know what's happening |
102
+ | 🔧 Operations | monitoring, incidents, SLAs | Prod issues resolved faster |
103
+ | 🎨 Design System | DESIGN.md with tokens | Consistent UI, no guesswork |
104
+ | 🤖 AI Agent Skills | 5 skills + 5 agents | AI agents that actually help |
105
+ | ⚙️ CI/CD | GitHub Actions workflow | Docs checked on every PR |
104
106
 
105
107
  **Plus** the base layer is always included: `AGENTS.md`, `CONTEXT.md`, `README.md`, ADR template, and shared configs.
106
108
 
107
109
  ---
108
110
 
111
+ ## 🛡️ Conflict detection — non-destructive by default
112
+
113
+ Running the CLI in a project that already has docs? It detects existing files and **skips them by default** — never overwriting your work.
114
+
115
+ | Flag | What it does |
116
+ | ----------------- | -------------------------------------------------------- |
117
+ | `--force` | Overwrite all existing files |
118
+ | `--skip-existing` | Skip all conflicts silently (no prompts) |
119
+ | `--merge` | Merge `AGENTS.md` heading-by-heading instead of skipping |
120
+ | `--dry-run` | Preview what would be generated without writing anything |
121
+
122
+ ```bash
123
+ # Safe re-run: merge AGENTS.md, skip everything else
124
+ npx @damenor/agent-docs --merge
125
+
126
+ # Preview mode: see what would change
127
+ npx @damenor/agent-docs --dry-run
128
+
129
+ # CI mode: non-interactive, skip all conflicts
130
+ npx @damenor/agent-docs --skip-existing
131
+ ```
132
+
133
+ ---
134
+
109
135
  ## 🔍 Auto-detects your stack
110
136
 
111
137
  No manual configuration. The CLI reads your project and figures it out:
112
138
 
113
- | 📁 Found | 🛠️ Detected | ✨ Auto-injected |
114
- |----------|-------------|-----------------|
115
- | `package.json` | Node.js + framework + pkg manager | `npm run dev`, `npm test`, etc. |
116
- | `pyproject.toml` | Python + Django/FastAPI/Flask | `python manage.py runserver`, etc. |
117
- | `go.mod` | Go | `go run .`, `go test ./...` |
118
- | `Cargo.toml` | Rust | `cargo run`, `cargo test` |
119
- | `pom.xml` / `build.gradle` | Java/Kotlin + Spring | `mvn spring-boot:run`, etc. |
139
+ | 📁 Found | 🛠️ Detected | ✨ Auto-injected |
140
+ | -------------------------- | --------------------------------- | ---------------------------------- |
141
+ | `package.json` | Node.js + framework + pkg manager | `npm run dev`, `npm test`, etc. |
142
+ | `pyproject.toml` | Python + Django/FastAPI/Flask | `python manage.py runserver`, etc. |
143
+ | `go.mod` | Go | `go run .`, `go test ./...` |
144
+ | `Cargo.toml` | Rust | `cargo run`, `cargo test` |
145
+ | `pom.xml` / `build.gradle` | Java/Kotlin + Spring | `mvn spring-boot:run`, etc. |
120
146
 
121
147
  Supports **Next.js, Nuxt, Astro, SvelteKit, React, Vue, Express, NestJS, Fastify, Hono, Django, FastAPI, Flask**, and more.
122
148
 
@@ -140,6 +166,7 @@ npx @damenor/agent-docs --agents-guide
140
166
  ```
141
167
 
142
168
  Outputs a structured guide that tells AI agents **exactly** what to do after generation:
169
+
143
170
  - ✅ What files to fill and in what order
144
171
  - ✅ What to delete if it doesn't apply
145
172
  - ✅ Which placeholders to verify
@@ -151,20 +178,29 @@ No guessing. No "I'll add docs later". Your AI agent runs this and knows the dri
151
178
 
152
179
  ## 📊 Before vs After
153
180
 
154
- | 😩 Before | 🤩 After |
155
- |-----------|----------|
156
- | "Where are the docs?" → "What docs?" | Professional docs index, navigable from day one |
157
- | New dev onboarding: 2 hours | New dev onboarding: 15 minutes |
158
- | AI agent: "I don't know the context" | AI agent: "I read AGENTS.md, I know the rules" |
159
- | "How do we deploy?" → Slack thread with 47 messages | `docs/guides/deployment.md` — one click |
160
- | Every project documents differently | Consistent Diátaxis structure across all projects |
161
- | Architecture decisions lost in Slack/Notion | ADRs that persist and are searchable |
181
+ | 😩 Before | 🤩 After |
182
+ | --------------------------------------------------- | ------------------------------------------------- |
183
+ | "Where are the docs?" → "What docs?" | Professional docs index, navigable from day one |
184
+ | New dev onboarding: 2 hours | New dev onboarding: 15 minutes |
185
+ | AI agent: "I don't know the context" | AI agent: "I read AGENTS.md, I know the rules" |
186
+ | "How do we deploy?" → Slack thread with 47 messages | `docs/guides/deployment.md` — one click |
187
+ | Every project documents differently | Consistent Diátaxis structure across all projects |
188
+ | Architecture decisions lost in Slack/Notion | ADRs that persist and are searchable |
189
+
190
+ ---
191
+
192
+ ## 🧪 Battle-tested
193
+
194
+ - **129 tests** across 19 test files
195
+ - **98.66% statement coverage** — every generator, resolver, and utility is tested
196
+ - **Vitest** for unit and integration testing
197
+ - Tests run on every PR via GitHub Actions
162
198
 
163
199
  ---
164
200
 
165
- ## 🌐 Web docs — coming soon
201
+ ## 🌐 Web docs
166
202
 
167
- A beautiful documentation site powered by Astro + Starlight. Publish your docs as a searchable website with zero config.
203
+ A beautiful documentation site powered by Astro + Starlight lives in `packages/web/`. Publish your docs as a searchable website with zero config.
168
204
 
169
205
  ---
170
206