@damenor/agent-docs 0.1.1 → 0.1.2

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.
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: doc-scaffold
3
3
  description: >
4
- Inicializa la documentación completa para un proyecto nuevo o existente.
5
- Detecta el stack tecnológico, crea la estructura de archivos esenciales y genera
6
- documentación inicial con contenido real basado en el análisis del código.
7
- TRIGGER: Cuando el usuario dice "inicializar docs", "nuevo proyecto", "scaffold docs",
8
- "crear documentación", "setup docs", o se detecta un proyecto sin documentación.
4
+ Initializes complete documentation for a new or existing project.
5
+ Detects the tech stack, creates essential file structure, and generates
6
+ initial documentation with real content based on code analysis.
7
+ TRIGGER: When the user says "initialize docs", "new project", "scaffold docs",
8
+ "create documentation", "setup docs", or a project without documentation is detected.
9
9
  license: Apache-2.0
10
10
  metadata:
11
11
  author: damenordev
@@ -14,60 +14,60 @@ metadata:
14
14
 
15
15
  # doc-scaffold
16
16
 
17
- ## Cuándo Usar
17
+ ## When to Use
18
18
 
19
- - **Proyecto nuevo**: Se crea un proyecto desde cero y necesita documentación inicial
20
- - **Proyecto existente sin docs**: Se detecta un proyecto que ya tiene código pero carece de documentación estructurada
21
- - **Migración de docs**: Se reorganiza documentación existente hacia la estructura Diátaxis + ADR
22
- - **Post-setup**: Después de inicializar un repositorio, antes de empezar a desarrollar features
19
+ - **New project**: A project is created from scratch and needs initial documentation
20
+ - **Existing project without docs**: A project with code but lacking structured documentation is detected
21
+ - **Docs migration**: Existing documentation is reorganized toward the Diátaxis + ADR structure
22
+ - **Post-setup**: After initializing a repository, before starting to develop features
23
23
 
24
- ## Patrones Críticos
24
+ ## Critical Patterns
25
25
 
26
- ### REGLA #1: NUNCA crear carpetas vacías
26
+ ### RULE #1: NEVER create empty folders
27
27
 
28
- Solo se crean archivos con contenido real y verificable. Si no hay contenido para un archivo, no se crea.
28
+ Only create files with real, verifiable content. If there is no content for a file, do not create it.
29
29
 
30
30
  ```
31
- MAL: mkdir docs/api/ # carpeta vacía
32
- BIEN: Crear docs/api/endpoints.md SOLO cuando hay endpoints documentables
31
+ BAD: mkdir docs/api/ # empty folder
32
+ GOOD: Create docs/api/endpoints.md ONLY when there are documentable endpoints
33
33
  ```
34
34
 
35
- ### REGLA #2: Detectar antes de crear
35
+ ### RULE #2: Detect before creating
36
36
 
37
- Siempre analizar el proyecto ANTES de generar documentación:
37
+ Always analyze the project BEFORE generating documentation:
38
38
 
39
- - Detectar lenguaje: `package.json` → Node, `requirements.txt` → Python, `go.mod` → Go, `Cargo.toml` → Rust, `pom.xml` → Java
40
- - Detectar framework: imports en código principal, dependencias
41
- - Verificar docs existentes: NO sobreescribir documentación existente sin preguntar
42
- - Identificar términos del dominio: buscar en código, nombres de módulos, variables clave
39
+ - Detect language: `package.json` → Node, `requirements.txt` → Python, `go.mod` → Go, `Cargo.toml` → Rust, `pom.xml` → Java
40
+ - Detect framework: imports in main code, dependencies
41
+ - Check existing docs: DO NOT overwrite existing documentation without asking
42
+ - Identify domain terms: search in code, module names, key variables
43
43
 
44
- ### REGLA #3: Archivos esenciales únicamente
44
+ ### RULE #3: Essential files only
45
45
 
46
- Crear SOLO estos archivos con contenido real:
46
+ Create ONLY these files with real content:
47
47
 
48
- | Archivo | Propósito | Cuándo crear |
49
- |---------|-----------|-------------|
50
- | `README.md` | Entry point del proyecto | Siempre |
51
- | `CHANGELOG.md` | Historial de versiones | Siempre (con entrada inicial) |
52
- | `AGENTS.md` | Protocolo para agentes IA | Siempre |
53
- | `docs/README.md` | Mapa de documentación + reglas de crecimiento | Siempre |
54
- | `docs/CONTEXT.md` | Términos del dominio encontrados en código | Siempre |
55
- | `docs/adr/TEMPLATE.md` | Plantilla para ADRs | Siempre |
56
- | `docs/adr/001-*.md` | Primer ADR si aplica | Si hay decisiones arquitectónicas |
57
- | `tutorials/quick-start.md` | Tutorial de inicio rápido | Siempre |
48
+ | File | Purpose | When to create |
49
+ |------|---------|----------------|
50
+ | `README.md` | Project entry point | Always |
51
+ | `CHANGELOG.md` | Version history | Always (with initial entry) |
52
+ | `AGENTS.md` | Protocol for AI agents | Always |
53
+ | `docs/README.md` | Documentation map + growth rules | Always |
54
+ | `docs/CONTEXT.md` | Domain terms found in code | Always |
55
+ | `docs/adr/TEMPLATE.md` | Template for ADRs | Always |
56
+ | `docs/adr/001-*.md` | First ADR if applicable | When there are architectural decisions |
57
+ | `tutorials/quick-start.md` | Quick start tutorial | Always |
58
58
 
59
- ### REGLA #4: CONTEXT.md se genera analizando el código
59
+ ### RULE #4: CONTEXT.md is generated by analyzing code
60
60
 
61
- No inventar términos. Extraer del código:
61
+ Do not invent terms. Extract from code:
62
62
 
63
- 1. Buscar nombres de módulos, clases, funciones principales
64
- 2. Identificar abreviaturas y su significado
65
- 3. Mapear relaciones entre componentes
66
- 4. Detectar términos ambiguos y documentarlos
63
+ 1. Search for module names, classes, main functions
64
+ 2. Identify abbreviations and their meaning
65
+ 3. Map relationships between components
66
+ 4. Detect ambiguous terms and document them
67
67
 
68
- ### REGLA #5: Frontmatter YAML obligatorio
68
+ ### RULE #5: YAML frontmatter required
69
69
 
70
- Todo archivo de documentación debe incluir frontmatter:
70
+ Every documentation file must include frontmatter:
71
71
 
72
72
  ```yaml
73
73
  ---
@@ -78,151 +78,151 @@ tags: [tag1, tag2]
78
78
  ---
79
79
  ```
80
80
 
81
- ### REGLA #6: Manifest de crecimiento en docs/README.md
81
+ ### RULE #6: Growth manifest in docs/README.md
82
82
 
83
- Incluir reglas explícitas de cuándo y cómo agregar nueva documentación.
83
+ Include explicit rules for when and how to add new documentation.
84
84
 
85
- ## Flujo del Proceso
85
+ ## Process Flow
86
86
 
87
- ### Paso 1: Detectar stack
87
+ ### Step 1: Detect stack
88
88
 
89
- Usar la tabla de detección automática de `AGENTS.md` § Stack. Además, analizar:
89
+ Use the auto-detection table from `AGENTS.md` § Stack. Additionally, analyze:
90
90
 
91
91
  ```
92
- Analizar:
93
- ├── Lenguaje principal (package.json, go.mod, requirements.txt, Cargo.toml, pom.xml)
94
- ├── Framework (imports, dependencias, config files)
95
- ├── Estructura de carpetas existente
96
- ├── Herramientas de build/test (detectar comandos del ecosistema)
97
- └── Docs existentes (NO sobreescribir)
92
+ Analyze:
93
+ ├── Primary language (package.json, go.mod, requirements.txt, Cargo.toml, pom.xml)
94
+ ├── Framework (imports, dependencies, config files)
95
+ ├── Existing folder structure
96
+ ├── Build/test tools (detect ecosystem commands)
97
+ └── Existing docs (DO NOT overwrite)
98
98
  ```
99
99
 
100
- ### Paso 2: Verificar documentación existente
100
+ ### Step 2: Verify existing documentation
101
101
 
102
102
  ```
103
- Revisar:
104
- ├── ¿Existe README.md? → NO sobreescribir, sugerir mejoras
105
- ├── ¿Existe CHANGELOG.md? → NO sobreescribir
106
- ├── ¿Existe docs/?Integrar, no reemplazar
107
- ├── ¿Existen ADRs? → Preservar numeración
108
- └── ¿Existe AGENTS.md? → Preservar, sugerir adiciones
103
+ Check:
104
+ ├── Does README.md exist? → DO NOT overwrite, suggest improvements
105
+ ├── Does CHANGELOG.md exist? → DO NOT overwrite
106
+ ├── Does docs/ exist? Integrate, do not replace
107
+ ├── Do ADRs exist? → Preserve numbering
108
+ └── Does AGENTS.md exist? → Preserve, suggest additions
109
109
  ```
110
110
 
111
- ### Paso 3: Crear AGENTS.md con protocolo
111
+ ### Step 3: Create AGENTS.md with protocol
112
112
 
113
113
  ```markdown
114
- # AGENTS.md — Protocolo de Documentación
115
-
116
- ## Antes de empezar una tarea
117
- 1. Leer docs/CONTEXT.md para entender el dominio
118
- 2. Leer docs/README.md para ubicarse en la documentación
119
- 3. Revisar ADRs relevantes en docs/adr/
120
-
121
- ## Después de completar una tarea
122
- 1. Actualizar CONTEXT.md si surgieron nuevos términos
123
- 2. Actualizar docs/README.md si se agregaron/eliminaron archivos
124
- 3. Evaluar si se necesita un ADR (¿es difícil de revertir? ¿es sorprendente? ¿hay trade-off?)
125
- 4. Pasar el protocolo al subagente si se delega trabajo
126
-
127
- ## Al delegar trabajo
128
- 1. Incluir este protocolo en el prompt del subagente
129
- 2. Especificar qué archivos de doc actualizar
130
- 3. Verificar que el subagente cumplió el protocolo
114
+ # AGENTS.md — Documentation Protocol
115
+
116
+ ## Before starting a task
117
+ 1. Read docs/CONTEXT.md to understand the domain
118
+ 2. Read docs/README.md to navigate the documentation
119
+ 3. Review relevant ADRs in docs/adr/
120
+
121
+ ## After completing a task
122
+ 1. Update CONTEXT.md if new terms emerged
123
+ 2. Update docs/README.md if files were added/removed
124
+ 3. Evaluate if an ADR is needed (is it hard to reverse? is it surprising? is there a trade-off?)
125
+ 4. Pass the protocol to the subagent if work is delegated
126
+
127
+ ## When delegating work
128
+ 1. Include this protocol in the subagent's prompt
129
+ 2. Specify which doc files to update
130
+ 3. Verify the subagent followed the protocol
131
131
  ```
132
132
 
133
- ### Paso 4: Crear docs/README.md
133
+ ### Step 4: Create docs/README.md
134
134
 
135
- Incluir:
136
- - Mapa completo de archivos de documentación (generado, no placeholder)
137
- - Reglas de crecimiento: cuándo agregar cada tipo de doc
138
- - Convenciones de nomenclatura
139
- - Enlaces a skills relacionados: `doc-write`, `doc-review`, `doc-maintain`
135
+ Include:
136
+ - Complete map of documentation files (generated, not placeholder)
137
+ - Growth rules: when to add each type of doc
138
+ - Naming conventions
139
+ - Links to related skills: `doc-write`, `doc-review`, `doc-maintain`
140
140
 
141
- ### Paso 5: Crear docs/CONTEXT.md
141
+ ### Step 5: Create docs/CONTEXT.md
142
142
 
143
- Generar con términos reales del dominio detectados en el código:
144
- - Tabla de términos con definiciones
145
- - Relaciones entre términos
146
- - Términos ambiguos señalados
147
- - Origen: análisis del código fuente
143
+ Generate with real domain terms detected in the code:
144
+ - Table of terms with definitions
145
+ - Relationships between terms
146
+ - Flagged ambiguous terms
147
+ - Source: source code analysis
148
148
 
149
- ### Paso 6: Crear docs/adr/TEMPLATE.md + primer ADR
149
+ ### Step 6: Create docs/adr/TEMPLATE.md + first ADR
150
150
 
151
- - TEMPLATE.md: plantilla reutilizable
152
- - Primer ADR: solo si ya existe una decisión arquitectónica que cumpla los 3 criterios (difícil de revertir, sorprendente, trade-off real)
151
+ - TEMPLATE.md: reusable template
152
+ - First ADR: only if an architectural decision already exists that meets the 3 criteria (hard to reverse, surprising, real trade-off)
153
153
 
154
- ### Paso 7: Crear tutorials/quick-start.md
154
+ ### Step 7: Create tutorials/quick-start.md
155
155
 
156
- Basado en el stack detectado:
157
- - Prerequisitos específicos del stack
158
- - Pasos de instalación reales
159
- - Primer ejemplo ejecutable
160
- - Verificación en cada paso
156
+ Based on the detected stack:
157
+ - Stack-specific prerequisites
158
+ - Real installation steps
159
+ - First runnable example
160
+ - Verification at each step
161
161
 
162
- ### Paso 8: Crear archivos de referencia esenciales
162
+ ### Step 8: Create essential reference files
163
163
 
164
- Solo los que apliquen al stack detectado:
165
- - Si hay API: `reference/api.md`
166
- - Si hay configuración: `reference/configuration.md`
167
- - Si hay CLI: `reference/cli.md`
164
+ Only those applicable to the detected stack:
165
+ - If there is an API: `reference/api.md`
166
+ - If there is configuration: `reference/configuration.md`
167
+ - If there is a CLI: `reference/cli.md`
168
168
 
169
- ### Paso 9: Reportar resultado
169
+ ### Step 9: Report results
170
170
 
171
171
  ```
172
- Creados:
172
+ Created:
173
173
  - README.md (entry point)
174
- - CHANGELOG.md (inicializado)
175
- - AGENTS.md (protocolo)
176
- - docs/README.md (mapa + reglas)
177
- - docs/CONTEXT.md (X términos del dominio)
174
+ - CHANGELOG.md (initialized)
175
+ - AGENTS.md (protocol)
176
+ - docs/README.md (map + rules)
177
+ - docs/CONTEXT.md (X domain terms)
178
178
  - docs/adr/TEMPLATE.md
179
- - tutorials/quick-start.md (basado en {stack})
179
+ - tutorials/quick-start.md (based on {stack})
180
180
 
181
- ⏭️ Pendientes (agregar cuando haya contenido):
182
- - docs/adr/001-*.md (cuando haya una decisión arquitectónica)
183
- - reference/api.md (cuando haya endpoints documentables)
184
- - how-to/ (cuando surjan problemas repetibles)
181
+ ⏭️ Pending (add when there is content):
182
+ - docs/adr/001-*.md (when there is an architectural decision)
183
+ - reference/api.md (when there are documentable endpoints)
184
+ - how-to/ (when repeatable problems arise)
185
185
  ```
186
186
 
187
- ## Comandos
187
+ ## Commands
188
188
 
189
- ### Archivos a crear (en orden)
189
+ ### Files to create (in order)
190
190
 
191
191
  ```bash
192
- # Archivos raíz
192
+ # Root files
193
193
  README.md
194
194
  CHANGELOG.md
195
195
  AGENTS.md
196
196
 
197
- # Estructura docs/
197
+ # docs/ structure
198
198
  docs/README.md
199
199
  docs/CONTEXT.md
200
200
  docs/adr/TEMPLATE.md
201
201
 
202
- # Tutoriales
202
+ # Tutorials
203
203
  tutorials/quick-start.md
204
204
 
205
- # Referencia (solo si aplica)
206
- reference/api.md # Solo si hay API
207
- reference/configuration.md # Solo si hay config
205
+ # Reference (only if applicable)
206
+ reference/api.md # Only if there is an API
207
+ reference/configuration.md # Only if there is config
208
208
  ```
209
209
 
210
- ### Verificación post-creación
210
+ ### Post-creation verification
211
211
 
212
212
  ```
213
- 1. Verificar que TODO archivo tiene contenido real (no placeholders)
214
- 2. Verificar que TODO archivo tiene frontmatter YAML
215
- 3. Verificar que CONTEXT.md contiene términos reales del código
216
- 4. Verificar que quick-start.md es ejecutable para el stack detectado
217
- 5. Verificar que docs/README.md mapea todos los archivos creados
213
+ 1. Verify that EVERY file has real content (no placeholders)
214
+ 2. Verify that EVERY file has YAML frontmatter
215
+ 3. Verify that CONTEXT.md contains real terms from the code
216
+ 4. Verify that quick-start.md is runnable for the detected stack
217
+ 5. Verify that docs/README.md maps all created files
218
218
  ```
219
219
 
220
- ## Ejemplo Concreto
220
+ ## Concrete Example
221
221
 
222
- ### Input: Proyecto React + Express detectado
222
+ ### Input: React + Express project detected
223
223
 
224
224
  ```
225
- Detección:
225
+ Detection:
226
226
  ├── package.json → Node.js, React 18, Express 4
227
227
  ├── tsconfig.json → TypeScript 5
228
228
  ├── tailwind.config.ts → Tailwind CSS
@@ -230,48 +230,48 @@ Detección:
230
230
  └── .github/workflows/ci.yml → {{TECH_STACK}} CI/CD
231
231
  ```
232
232
 
233
- ### Output: Archivos creados
233
+ ### Output: Created files
234
234
 
235
235
  ```
236
236
  ✅ README.md
237
- - "Plataforma web construida con React 18 y Express 4"
238
- - Stack table con React, Express, PostgreSQL, {{TECH_STACK}}
237
+ - "Web platform built with React 18 and Express 4"
238
+ - Stack table with React, Express, PostgreSQL, {{TECH_STACK}}
239
239
  - Commands: npm run dev, npm run build, npm run test, npm run lint
240
240
 
241
241
  ✅ CHANGELOG.md
242
- - Entrada inicial: "## [0.1.0] - 2026-05-07 / ### Added / - Initial release"
242
+ - Initial entry: "## [0.1.0] - 2026-05-07 / ### Added / - Initial release"
243
243
 
244
244
  ✅ AGENTS.md
245
245
  - Stack: React 18, Express 4, PostgreSQL, Prisma, Tailwind, {{TECH_STACK}}
246
246
  - Commands: npm run dev/build/test/lint/typecheck
247
- - Protocolo completo (antes/después/subdelegar)
247
+ - Complete protocol (before/after/delegate)
248
248
 
249
249
  ✅ docs/README.md
250
- - Mapa con 8 archivos creados
251
- - Growth rules: "Crear reference/api.md cuando haya 5+ endpoints"
252
- - Tabla Diátaxis: tutorials/ ✅, guides/ ⏭️, reference/ ⏭️, explanation/ ⏭️
250
+ - Map with 8 created files
251
+ - Growth rules: "Create reference/api.md when there are 5+ endpoints"
252
+ - Diátaxis table: tutorials/ ✅, guides/ ⏭️, reference/ ⏭️, explanation/ ⏭️
253
253
 
254
254
  ✅ docs/CONTEXT.md
255
- - 6 términos extraídos: User, Session, Workspace, Role, Permission, Token
256
- - Relaciones: User → Session, User ← Role ← Permission
257
- - ⚠️ AMBIGUO: "workspace" (puede ser equipo o proyecto)
255
+ - 6 terms extracted: User, Session, Workspace, Role, Permission, Token
256
+ - Relationships: User → Session, User ← Role ← Permission
257
+ - ⚠️ AMBIGUOUS: "workspace" (could be team or project)
258
258
 
259
259
  ✅ docs/adr/TEMPLATE.md
260
- - Formato minimal listo para usar
260
+ - Minimal format ready to use
261
261
 
262
262
  ✅ docs/tutorials/quick-start.md
263
- - Prerequisitos: Node 20+, {{TECH_STACK}}, npm
264
- - Pasos: clone → npm install → cp .env.example .env → npx prisma migrate dev → npm run dev
265
- - Verificación: "Abre http://localhost:3000 — deberías ver la landing"
266
-
267
- ⏭️ Pendientes (lazy):
268
- - docs/adr/0001-*.md → cuando haya una decisión arquitectónica
269
- - docs/DESIGN.md → cuando se definan tokens de diseño
270
- - docs/reference/api.md → cuando haya 5+ endpoints estables
271
- - docs/guides/deployment.md → cuando haya proceso de deploy
263
+ - Prerequisites: Node 20+, {{TECH_STACK}}, npm
264
+ - Steps: clone → npm install → cp .env.example .env → npx prisma migrate dev → npm run dev
265
+ - Verification: "Open http://localhost:3000 — you should see the landing"
266
+
267
+ ⏭️ Pending (lazy):
268
+ - docs/adr/0001-*.md → when there is an architectural decision
269
+ - docs/DESIGN.md → when design tokens are defined
270
+ - docs/reference/api.md → when there are 5+ stable endpoints
271
+ - docs/guides/deployment.md → when there is a deploy process
272
272
  ```
273
273
 
274
- ## Recursos
274
+ ## Resources
275
275
 
276
- - [Diátaxis Quick Reference](references/diataxis-quick-ref.md) — Resumen del framework Diátaxis con árbol de decisión
277
- - Skills relacionados: `doc-write` (escribir docs), `doc-review` (auditar docs), `doc-maintain` (mantener docs sincronizados)
276
+ - [Diátaxis Quick Reference](references/diataxis-quick-ref.md) — Summary of the Diátaxis framework with decision tree
277
+ - Related skills: `doc-write` (write docs), `doc-review` (audit docs), `doc-maintain` (keep docs synced)