@ancleto/spec 0.6.5 → 0.6.7

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 (40) hide show
  1. package/README.md +26 -1
  2. package/agents/context-resolver.md +1 -1
  3. package/agents/documenter.md +3 -1
  4. package/agents/memory-keeper.md +1 -1
  5. package/agents/spec-writer.md +2 -1
  6. package/agents/technical-discovery.md +1 -1
  7. package/agents/tester.md +1 -1
  8. package/commands/cleto-apply.md +2 -154
  9. package/commands/cleto-archive.md +2 -164
  10. package/commands/cleto-bulk-archive.md +2 -248
  11. package/commands/cleto-continue.md +2 -126
  12. package/commands/cleto-explore.md +2 -174
  13. package/commands/cleto-ff.md +2 -120
  14. package/commands/cleto-new.md +2 -108
  15. package/commands/cleto-onboard.md +2 -550
  16. package/commands/cleto-propose.md +2 -130
  17. package/commands/cleto-recall.md +4 -52
  18. package/commands/cleto-sync.md +2 -137
  19. package/commands/cleto-verify.md +2 -169
  20. package/package.json +1 -1
  21. package/skills/ancleto-apply/SKILL.md +15 -38
  22. package/skills/ancleto-archive/SKILL.md +22 -24
  23. package/skills/ancleto-bulk-archive/SKILL.md +45 -55
  24. package/skills/ancleto-commit/SKILL.md +10 -29
  25. package/skills/ancleto-continue/SKILL.md +18 -24
  26. package/skills/ancleto-explore/SKILL.md +40 -67
  27. package/skills/ancleto-ff/SKILL.md +20 -28
  28. package/skills/ancleto-new/SKILL.md +20 -39
  29. package/skills/ancleto-onboard/SKILL.md +35 -38
  30. package/skills/ancleto-pr/SKILL.md +12 -26
  31. package/skills/ancleto-propose/SKILL.md +22 -69
  32. package/skills/ancleto-recall/SKILL.md +21 -25
  33. package/skills/ancleto-sync-specs/SKILL.md +27 -62
  34. package/skills/ancleto-upgrade/SKILL.md +132 -223
  35. package/skills/ancleto-upgrade/references/templates.md +138 -171
  36. package/skills/ancleto-verify/SKILL.md +36 -66
  37. package/skills/ancleto-workflow/SKILL.md +17 -17
  38. package/src/cli/index.js +76 -49
  39. package/src/core/tier-models.js +48 -0
  40. package/templates/AGENTS.md +3 -0
@@ -1,66 +1,63 @@
1
- # Templates — Artefactos aspec
1
+ # Templates — aspec artifacts
2
2
 
3
- Este archivo contiene los templates exactos para los cuatro artefactos que genera
4
- el skill. Leer este archivo en el Paso 6 y completar cada placeholder `{...}`.
3
+ Exact templates for the four generated artifacts; fill each `{...}` placeholder.
5
4
 
6
5
  ---
7
6
 
8
7
  ## proposal.md
9
8
 
10
9
  ```markdown
11
- # Propuesta: Migración a {LIBRARY} v{TARGET_VERSION}
10
+ # Proposal: Migration to {LIBRARY} v{TARGET_VERSION}
12
11
 
13
- ## Contexto
12
+ ## Context
14
13
 
15
- {Descripción del estado actual: versión actual de LIBRARY instalada, razón para migrar
16
- (EOL, mejoras de performance, compatibilidad, nuevas features). Si se obtuvo documentación
17
- oficial, resumir los puntos más relevantes del changelog aquí.}
14
+ {Installed version + migration reason (EOL, perf, compatibility, features); key changelog
15
+ points if docs exist.}
18
16
 
19
- ## Cobertura del análisis
17
+ ## Analysis coverage
20
18
 
21
- - source files analizados: {source_files_scanned}
22
- - test files analizados: {test_files_scanned}
23
- - config files analizados: {config_files_scanned}
24
- - archivos con matches: {files_with_matches}
25
- - archivos sin matches: {files_without_matches}
19
+ - source files analyzed: {source_files_scanned}
20
+ - test files analyzed: {test_files_scanned}
21
+ - config files analyzed: {config_files_scanned}
22
+ - files with matches: {files_with_matches}
23
+ - files without matches: {files_without_matches}
26
24
 
27
- ## Alcance del cambio
25
+ ## Change scope
28
26
 
29
- ### Dependencias afectadas — {N} paquetes en {M} package.json
27
+ ### Affected dependencies — {N} packages in {M} package.json
30
28
 
31
- | package.json | Paquete | Versión actual | Versión objetivo |
32
- | ------------ | ------- | -------------- | ---------------- |
29
+ | package.json | Package | Current version | Target version |
30
+ | ------------ | ------- | --------------- | -------------- |
33
31
 
34
- {Una fila por cada entry en DEPENDENCY_CHANGES[]}
32
+ {One row per DEPENDENCY_CHANGES[]}
35
33
 
36
- ### Archivos de configuración a modificar — {N} archivos
34
+ ### Config files to modify — {N} files
37
35
 
38
- {Lista de archivos con descripción del cambio requerido. Si no hay, escribir "Ninguno."}
36
+ {Change per file; if none: "None."}
39
37
 
40
- ### Código fuente con breaking changes — {N} archivos
38
+ ### Source code with breaking changes — {N} files
41
39
 
42
- {Lista de archivos afectados con el breaking change detectado. Si no hay, escribir "Ninguno."}
40
+ {Affected files + breaking change; if none: "None."}
43
41
 
44
- ### Tests con breaking changes — {N} archivos
42
+ ### Tests with breaking changes — {N} files
45
43
 
46
- {Lista de archivos de test afectados. Si no hay, escribir "Ninguno."}
44
+ {Affected test files; if none: "None."}
47
45
 
48
- ## Evaluación de breaking changes
46
+ ## Breaking-change assessment
49
47
 
50
- {Para cada KNOWN_BREAK relevante a la migración:}
48
+ - ✅ AFFECTED — {id}: {description} — {N} occurrences in {M} files
49
+ - ✓ NOT AFFECTED — {id}: {description}
51
50
 
52
- - ✅ AFECTA — {id}: {description} — {N} ocurrencias en {M} archivos
53
- - ✓ NO AFECTA — {id}: {description}
51
+ {Per relevant KNOWN_BREAK}
54
52
 
55
- ## Matches de baja confianza
53
+ ## Low-confidence matches
56
54
 
57
- {Lista de UNSURE_MATCHES[] para revisión manual. Si no hay, escribir "Ninguno."}
55
+ {UNSURE_MATCHES[]; if none: "None."}
58
56
 
59
- ## Decisión
57
+ ## Decision
60
58
 
61
- Migrar {LIBRARY} {CURRENT_VERSION} → v{TARGET_VERSION}.
62
-
63
- Fuente de información: {DOCS_URL | "Búsqueda web: {query}" | "Knowledge base interna"}
59
+ Migrate {LIBRARY} {CURRENT_VERSION} → v{TARGET_VERSION}.
60
+ Source: {DOCS_URL | "Web search: {query}" | "Internal knowledge base"}
64
61
  ```
65
62
 
66
63
  ---
@@ -68,55 +65,54 @@ Fuente de información: {DOCS_URL | "Búsqueda web: {query}" | "Knowledge base i
68
65
  ## specs/{LIBRARY_SLUG}{TARGET_VERSION}.md
69
66
 
70
67
  ```markdown
71
- # Especificaciones: {LIBRARY} v{TARGET_VERSION} Migration
68
+ # Specs: {LIBRARY} v{TARGET_VERSION} Migration
69
+
70
+ ## ADDED Requirements
72
71
 
73
- ## Dependencias
72
+ ### Requirement: Dependencies
74
73
 
75
- {Para cada entry en DEPENDENCY_CHANGES[]:}
74
+ - REQ-D-{N}: The system SHALL use `{package_name}` at version `^{TARGET_VERSION}.0.0` in `{path}`
76
75
 
77
- - REQ-D-{N}: `{package_name}` en `{path}` SHALL usar versión `^{TARGET_VERSION}.0.0`
76
+ {Per DEPENDENCY_CHANGES[]}
78
77
 
79
- ## Configuración
78
+ #### Scenario: dependencies installed
80
79
 
81
- {Para cada entry en CONFIG_CHANGES[]:}
80
+ - **WHEN** dependencies are installed for the affected package
81
+ - **THEN** `{package_name}` resolves to `^{TARGET_VERSION}.0.0`
82
82
 
83
- - REQ-C-{N}: `{file}` SHALL {descripción del cambio requerido}
83
+ ### Requirement: Configuration
84
84
 
85
- {Si CONFIG_CHANGES está vacío:}
86
- No se requieren cambios de configuración.
85
+ - REQ-C-{N}: The system SHALL {required change} in `{file}`
87
86
 
88
- ## Código fuente
87
+ {Per CONFIG_CHANGES[]; empty → "No configuration requirements."}
89
88
 
90
- {Para cada entry en BREAKING_CHANGES_IN_CODE[]:}
89
+ ### Requirement: Source code
91
90
 
92
- - REQ-S-{N} [{break_id}]: {descripción del cambio requerido en el código}
93
- Evidencia: `{file}:{line_number}` ({confidence})
91
+ - REQ-S-{N} [{break_id}]: The system SHALL {required code change}
92
+ Evidence: `{file}:{line_number}` ({confidence})
94
93
 
95
- {Si BREAKING_CHANGES_IN_CODE está vacío:}
96
- No se detectaron breaking changes en código fuente.
94
+ {Per BREAKING_CHANGES_IN_CODE[]; empty → "No source-code requirements."}
97
95
 
98
- ## Tests
96
+ ### Requirement: Tests
99
97
 
100
- {Para cada entry en BREAKING_CHANGES_IN_TESTS[]:}
98
+ - REQ-T-{N} [{break_id}]: The system SHALL {required test change}
99
+ Evidence: `{file}:{line_number}` ({confidence})
101
100
 
102
- - REQ-T-{N} [{break_id}]: {descripción del cambio requerido en los tests}
103
- Evidencia: `{file}:{line_number}` ({confidence})
101
+ {Per BREAKING_CHANGES_IN_TESTS[]; empty → "No test requirements."}
104
102
 
105
- {Si BREAKING_CHANGES_IN_TESTS está vacío:}
106
- No se detectaron breaking changes en tests.
103
+ ### Requirement: Verification
107
104
 
108
- ## Verificación
105
+ - REQ-V-001: The project SHALL compile without TypeScript errors
106
+ - REQ-V-002: The project SHALL pass all tests after the migration
107
+ - REQ-V-003: The project SHALL pass lint without errors
109
108
 
110
- - REQ-V-001: El proyecto SHALL compilar sin errores TypeScript
111
- - REQ-V-002: Todos los tests SHALL pasar luego de la migración
112
- {Si lint script existe:}
113
- - REQ-V-003: El proyecto SHALL pasar lint sin errores
109
+ {REQ-V-003 only if the lint script exists}
114
110
 
115
- ## Cobertura
111
+ ### Requirement: Analysis coverage
116
112
 
117
- - REQ-X-001: El análisis SHALL incluir todo archivo de código fuente elegible (`.ts`, `.tsx`, `.js`) excluyendo `node_modules`, `dist` y artefactos generados
118
- - REQ-X-002: El análisis SHALL incluir todo archivo de tests elegible (`*.spec.*`, `*.test.*`)
119
- - REQ-X-003: El resultado SHALL reportar métricas de cobertura (`source_files_scanned`, `test_files_scanned`, `config_files_scanned`)
113
+ - REQ-X-001: The analysis SHALL include every eligible source file (`.ts`, `.tsx`, `.js`), excluding `node_modules`, `dist` and generated artifacts
114
+ - REQ-X-002: The analysis SHALL include every eligible test file (`*.spec.*`, `*.test.*`)
115
+ - REQ-X-003: The result SHALL report coverage metrics (`source_files_scanned`, `test_files_scanned`, `config_files_scanned`)
120
116
  ```
121
117
 
122
118
  ---
@@ -126,132 +122,111 @@ No se detectaron breaking changes en tests.
126
122
  ````markdown
127
123
  # Tasks: {LIBRARY} v{TARGET_VERSION} Migration
128
124
 
129
- ## Fase 1: Dependencias
125
+ ## Phase 1: Dependencies
130
126
 
131
- {Para cada entry en DEPENDENCY_CHANGES[]:}
127
+ - [ ] **T-D-{N}** Update `{package_name}` in `{path}` from `{current_version}` to `^{TARGET_VERSION}.0.0`
132
128
 
133
- - [ ] **T-D-{N}** Actualizar `{package_name}` en `{path}` de `{current_version}` a `^{TARGET_VERSION}.0.0`
129
+ {Per DEPENDENCY_CHANGES[]}
134
130
 
135
- - [ ] **T-D-LAST** Regenerar lockfile:
131
+ - [ ] **T-D-LAST** Regenerate the lockfile:
136
132
  ```bash
137
133
  npm install
138
134
  ```
139
135
  ````
140
136
 
141
- ## Fase 2: Infraestructura y runtime
142
-
143
- {Solo si IS_RUNTIME = true:}
144
- {Si .nvmrc existe o debe crearse:}
145
-
146
- - [ ] **T-I-001** {Crear | Actualizar} `.nvmrc` con el valor `{TARGET_VERSION}`
137
+ ## Phase 2: Infrastructure and runtime
147
138
 
148
- {Para cada CI file con nodeVersion a cambiar:}
139
+ {Only if IS_RUNTIME = true; one T-I task per file found}
149
140
 
150
- - [ ] **T-I-002** Actualizar `nodeVersion` en `{CI_FILE}` de `{current}` a `{TARGET_VERSION}.x`
141
+ - [ ] **T-I-001** {Create | Update} `.nvmrc` with value `{TARGET_VERSION}`
151
142
 
152
- {Para cada Dockerfile con FROM node:X:}
143
+ - [ ] **T-I-002** Update `nodeVersion` in `{CI_FILE}` from `{current}` to `{TARGET_VERSION}.x`
153
144
 
154
- - [ ] **T-I-003** Actualizar imagen base en `{Dockerfile}`:
145
+ - [ ] **T-I-003** Update the base image in `{Dockerfile}`:
155
146
  ```dockerfile
156
- # Antes
147
+ # Before
157
148
  FROM node:{current}-alpine
158
- # Después
149
+ # After
159
150
  FROM node:{TARGET_VERSION}-alpine
160
151
  ```
161
- _(Ajustar variant según el Dockerfile existente: alpine, slim, bullseye, etc.)_
152
+ _(Match the existing variant: alpine, slim, bullseye, etc.)_
162
153
 
163
- {Para cada appSettings.json con "Runtime":}
154
+ - [ ] **T-I-004** Update `Runtime` in `{appSettings.json}` to `NODEJS_{TARGET_VERSION}_X`
164
155
 
165
- - [ ] **T-I-004** Actualizar `Runtime` en `{appSettings.json}` a `NODEJS_{TARGET_VERSION}_X`
156
+ {If IS_RUNTIME = false:}
157
+ _(Not applicable to library migrations)_
166
158
 
167
- {Si IS*RUNTIME = false:}
168
- *(No aplica para migraciones de librería)\_
159
+ ## Phase 3: Build and test configuration
169
160
 
170
- ## Fase 3: Configuración de build y tests
171
-
172
- {Para cada entry en CONFIG_CHANGES[]:}
173
-
174
- - [ ] **T-C-{N}** {Descripción concreta del cambio}
175
- Archivo: `{file}`
161
+ - [ ] **T-C-{N}** {Concrete change description}
162
+ File: `{file}`
176
163
  ```
177
- // Antes
164
+ // Before
178
165
  {current_value}
179
- // Después
166
+ // After
180
167
  {target_value}
181
168
  ```
182
169
 
183
- {Si CONFIG*CHANGES está vacío:}
184
- *(No se detectaron cambios de configuración necesarios)\_
170
+ {Per CONFIG_CHANGES[]; empty →}
171
+ _(No configuration changes detected)_
185
172
 
186
- ## Fase 4: Breaking changes en código fuente
187
-
188
- {Para cada entry en BREAKING_CHANGES_IN_CODE[]:}
173
+ ## Phase 4: Breaking changes in source code
189
174
 
190
175
  - [ ] **T-S-{N}** [{break_id}] `{severity}` — {description}
191
176
  Fix: {fix}
192
- Archivos afectados:
193
- {Para cada {file, line_number, snippet}:}
177
+ Affected files:
194
178
  - `{file}:{line_number}` ({confidence}) — `{snippet}`
195
179
 
196
- {Si BREAKING*CHANGES_IN_CODE está vacío:}
197
- *(No se detectaron breaking changes en código fuente para esta migración)\_
198
-
199
- ## Fase 5: Breaking changes en tests
180
+ {Per BREAKING_CHANGES_IN_CODE[], one sub-bullet per file; empty →}
181
+ _(No breaking changes detected in source code for this migration)_
200
182
 
201
- {Para cada entry en BREAKING_CHANGES_IN_TESTS[]:}
183
+ ## Phase 5: Breaking changes in tests
202
184
 
203
185
  - [ ] **T-T-{N}** [{break_id}] `{severity}` — {description}
204
186
  Fix: {fix}
205
- Archivos afectados:
206
- {Para cada {file, line_number, snippet}:}
187
+ Affected files:
207
188
  - `{file}:{line_number}` ({confidence}) — `{snippet}`
208
189
 
209
- {Si BREAKING*CHANGES_IN_TESTS está vacío:}
210
- *(No se detectaron breaking changes en tests para esta migración)\_
190
+ {Per BREAKING_CHANGES_IN_TESTS[], one sub-bullet per file; empty →}
191
+ _(No breaking changes detected in tests for this migration)_
211
192
 
212
- ## Fase 6: Verificación
193
+ ## Phase 6: Verification
213
194
 
214
- - [ ] **T-V-001** Verificar compilación TypeScript:
195
+ - [ ] **T-V-001** Verify TypeScript compilation:
215
196
  ```bash
216
197
  npx tsc --noEmit
217
- # En monorepos Nx: npx nx affected --target=typecheck
198
+ # Nx monorepos: npx nx affected --target=typecheck
218
199
  ```
219
200
 
220
- {Si script "build" en SCRIPTS_AVAILABLE[]:}
221
-
222
- - [ ] **T-V-002** Verificar build:
201
+ - [ ] **T-V-002** Verify build:
223
202
  ```bash
224
203
  npm run build
225
- # En monorepos Nx: npx nx affected --target=build
204
+ # Nx monorepos: npx nx affected --target=build
226
205
  ```
227
206
 
228
- {Si script "lint" en SCRIPTS_AVAILABLE[]:}
229
-
230
- - [ ] **T-V-003** Ejecutar linter:
207
+ - [ ] **T-V-003** Run the linter:
231
208
  ```bash
232
209
  npm run lint
233
- # En monorepos Nx: npx nx affected:lint
210
+ # Nx monorepos: npx nx affected:lint
234
211
  ```
235
212
 
236
- {Si script "test" en SCRIPTS_AVAILABLE[]:}
237
-
238
- - [ ] **T-V-004** Correr suite de tests:
213
+ - [ ] **T-V-004** Run the test suite:
239
214
  ```bash
240
215
  npm test
241
- # En monorepos Nx: npx nx affected --target=test
216
+ # Nx monorepos: npx nx affected --target=test
242
217
  ```
243
218
 
244
- {Si script "test:ci" en SCRIPTS_AVAILABLE[]:}
245
-
246
- - [ ] **T-V-005** Correr tests en modo CI:
219
+ - [ ] **T-V-005** Run tests in CI mode:
247
220
 
248
221
  ```bash
249
222
  npm run test:ci
250
223
  ```
251
224
 
252
- - [ ] **T-V-900** Validar cobertura del escaneo:
253
- - confirmar conteo de archivos escaneados (source/tests/config)
254
- - revisar `UNSURE_MATCHES[]` y clasificar cada caso
225
+ - [ ] **T-V-900** Validate scan coverage:
226
+ - confirm scanned file counts (source/tests/config)
227
+ - review `UNSURE_MATCHES[]` and classify each case
228
+
229
+ {T-V-002..T-V-005 only when the matching script exists in SCRIPTS_AVAILABLE[]}
255
230
 
256
231
  ````
257
232
 
@@ -262,59 +237,51 @@ No se detectaron breaking changes en tests.
262
237
  ```markdown
263
238
  # Design: {LIBRARY} v{TARGET_VERSION} Migration
264
239
 
265
- ## Estrategia de migración
266
-
267
- {Explicar el enfoque en orden de las fases: primero dependencias (para detectar errores
268
- de compilación antes de tocar código), luego infraestructura, luego config, luego código.
269
- Describir el riesgo principal y cómo se mitiga.}
240
+ ## Migration strategy
270
241
 
271
- ## Decisiones técnicas
242
+ {Phase order: dependencies first (surface compilation errors before touching code), then
243
+ infrastructure, config, code. Main risk and mitigation.}
272
244
 
273
- ### Rango de versión — `^{TARGET_VERSION}.0.0`
245
+ ## Technical decisions
274
246
 
275
- Se usa caret (`^`) en lugar de pin exacto para recibir parches y minor automáticamente,
276
- manteniendo la estabilidad del major. Se evita `>=` para no aceptar accidentalmente el
277
- próximo major con potenciales breaking changes.
247
+ ### Version range — `^{TARGET_VERSION}.0.0`
278
248
 
279
- ### Cambios de configuración
249
+ Caret (`^`) instead of an exact pin receives patches and minors automatically while keeping
250
+ major stability. `>=` is avoided so the next major is not accepted by accident.
280
251
 
281
- {Para cada CONFIG_CHANGE relevante: explicar el razonamiento técnico.}
282
- {Ej para MIDDY7-001: "Jest necesita transformIgnorePatterns porque @middy v7 publica
283
- ESM puro y Jest por defecto no transpila node_modules. Sin este cambio, los tests
284
- fallan con SyntaxError en el import."}
252
+ ### Configuration changes
285
253
 
286
- ### Breaking changes — análisis de impacto
254
+ {Per CONFIG_CHANGE: technical reasoning. E.g. MIDDY7-001: "Jest needs transformIgnorePatterns
255
+ because @middy v7 ships pure ESM and does not transpile node_modules; without it, tests fail
256
+ with a SyntaxError on import."}
287
257
 
288
- {Para cada breaking change encontrado: explicar el impacto técnico y por qué el fix
289
- propuesto es la solución correcta y no un workaround.}
258
+ ### Breaking changes — impact analysis
290
259
 
291
- {Si no hay breaking changes: "No se detectaron breaking changes en este repositorio
292
- para esta migración. El riesgo es bajo."}
260
+ {Per breaking change: technical impact and why the fix is correct, not a workaround.}
261
+ {If none: "No breaking changes were detected in this repository for this migration. Risk is low."}
293
262
 
294
- ### Compatibilidad del ecosistema
263
+ ### Ecosystem compatibility
295
264
 
296
- {Mencionar dependencias relacionadas que pueden verse afectadas.}
297
- {Ej para Middy v7: listar middlewares de terceros y su estado de compatibilidad con v7.}
298
- {Si no aplica: "No se identificaron dependencias del ecosistema con riesgo de incompatibilidad."}
265
+ {Related dependencies that may be affected (e.g. Middy v7 third-party middlewares). If none:
266
+ "No ecosystem dependencies with incompatibility risk were identified."}
299
267
 
300
- ### Calidad del análisis
268
+ ### Analysis quality
301
269
 
302
- - Cobertura: {source_files_scanned} source, {test_files_scanned} tests, {config_files_scanned} config
303
- - Matches de alta confianza: {N}
304
- - Matches de media confianza: {N}
305
- - Matches de baja confianza: {N}
306
- - Estrategia de revisión manual para baja confianza: {criterio aplicado}
270
+ - Coverage: {source_files_scanned} source, {test_files_scanned} tests, {config_files_scanned} config
271
+ - High-confidence matches: {N}
272
+ - Medium-confidence matches: {N}
273
+ - Low-confidence matches: {N}
274
+ - Manual review strategy for low confidence: {criterion applied}
307
275
 
308
- ## Tabla de cambios
276
+ ## Change table
309
277
 
310
- | Archivo | Campo / Patrón | Antes | Después |
311
- |---------|----------------|-------|---------|
312
- {Una fila por cada cambio concreto en DEPENDENCY_CHANGES[], CONFIG_CHANGES[],
313
- BREAKING_CHANGES_IN_CODE[] y BREAKING_CHANGES_IN_TESTS[]}
278
+ | File | Field / Pattern | Before | After |
279
+ |------|-----------------|--------|-------|
280
+ {One row per change in DEPENDENCY_CHANGES[], CONFIG_CHANGES[], BREAKING_CHANGES_IN_CODE[], BREAKING_CHANGES_IN_TESTS[]}
314
281
 
315
- ## Referencias
282
+ ## References
316
283
 
317
- - {DOCS_URL si está disponible}
318
- - {Links adicionales encontrados durante el análisis}
319
- - Knowledge base interna consultada: {lista de break_ids relevantes de known-breaks.md}
320
- ````
284
+ - {DOCS_URL if available}
285
+ - {Additional links found during the analysis}
286
+ - Internal knowledge base consulted: {relevant break_ids from known-breaks.md}
287
+ ```
@@ -10,81 +10,56 @@ metadata:
10
10
 
11
11
  # aspec Verify
12
12
 
13
- Verify that an implementation matches its change artifacts (proposal, design, tasks, delta specs) by reading the files directly. No external binaries are invoked.
13
+ Verify an implementation against its change artifacts (proposal, design, tasks, delta specs) by reading files. No external binaries.
14
14
 
15
- **Input**: Optionally specify a change name (e.g., `add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous, list the directories under `aspec/changes/` that contain a `tasks.md` file and ask the user to select. Mark changes with incomplete tasks as "(In Progress)".
15
+ **Input**: Optionally a change name (e.g., `add-auth`); if omitted, infer from context. If ambiguous, list `aspec/changes/` dirs containing `tasks.md` and ask the user to select. Mark incomplete-task changes "(In Progress)".
16
16
 
17
17
  **IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
18
18
 
19
19
  ## Steps
20
20
 
21
- ### 1. Load the change artifacts
21
+ ### 1. Load change artifacts
22
22
 
23
- Read everything under `aspec/changes/<name>/`:
23
+ Read under `aspec/changes/<name>/`:
24
24
 
25
- - `tasks.md` — the checklist (required)
26
- - `proposal.md`, `design.md` — intent and decisions (if present)
25
+ - `tasks.md` — checklist (required)
26
+ - `proposal.md`, `design.md` — intent/decisions (if present)
27
27
  - `specs/` — delta requirements (if present)
28
28
 
29
- ### 2. Verify Completeness
29
+ ### 2. Completeness
30
30
 
31
- **Task Completion:**
31
+ **Tasks:** parse checkboxes (`- [ ]` incomplete vs `- [x]` complete); count. Each incomplete → CRITICAL: "Complete task: `<description>`" or "Mark as done if already implemented".
32
32
 
33
- - Parse checkboxes in `tasks.md`: `- [ ]` (incomplete) vs `- [x]` (complete).
34
- - Count complete vs total tasks.
35
- - For each incomplete task, add a CRITICAL issue: "Complete task: `<description>`" or "Mark as done if already implemented".
33
+ **Spec coverage:** for each requirement (`### Requirement:`) in `specs/`, search the codebase for related keywords. Unimplemented → CRITICAL: "Requirement not found: `<requirement name>`" + "Implement requirement: `<description>`".
36
34
 
37
- **Spec Coverage:**
35
+ ### 3. Correctness
38
36
 
39
- - If delta specs exist in `aspec/changes/<name>/specs/`:
40
- - Extract all requirements (marked with `### Requirement:`).
41
- - For each requirement, search the codebase for keywords related to it and assess whether implementation likely exists.
42
- - If a requirement appears unimplemented, add a CRITICAL issue: "Requirement not found: `<requirement name>`" with the recommendation "Implement requirement: `<description>`".
37
+ **Mapping:** for each requirement, find implementation evidence; note file paths and lines. Divergence → WARNING: "Implementation may diverge from spec: `<details>`" + "Review `<file>:<lines>` against requirement X".
43
38
 
44
- ### 3. Verify Correctness
39
+ **Scenarios:** for each `#### Scenario:`, check code handles conditions and tests cover it. Uncovered → WARNING: "Scenario not covered: `<scenario name>`" + "Add test or implementation for scenario: `<description>`".
45
40
 
46
- **Requirement Implementation Mapping:**
41
+ ### 4. Coherence
47
42
 
48
- - For each requirement from delta specs, search the codebase for implementation evidence.
49
- - If found, note file paths and line ranges.
50
- - If divergence is detected, add a WARNING: "Implementation may diverge from spec: `<details>`" with "Review `<file>:<lines>` against requirement X".
43
+ **Design:** if `design.md` exists, extract key decisions ("Decision:", "Approach:", "Architecture:") and verify adherence. Contradiction → WARNING: "Design decision not followed: `<decision>`" + "Update implementation or revise design.md to match reality". If absent, note "No design.md to verify against".
51
44
 
52
- **Scenario Coverage:**
53
-
54
- - For each scenario in delta specs (marked with `#### Scenario:`), check whether conditions are handled in code and whether tests cover the scenario.
55
- - If a scenario appears uncovered, add a WARNING: "Scenario not covered: `<scenario name>`" with "Add test or implementation for scenario: `<description>`".
56
-
57
- ### 4. Verify Coherence
58
-
59
- **Design Adherence:**
60
-
61
- - If `design.md` exists, extract key decisions (sections like "Decision:", "Approach:", "Architecture:") and verify the implementation follows them.
62
- - If a contradiction is detected, add a WARNING: "Design decision not followed: `<decision>`" with "Update implementation or revise design.md to match reality".
63
- - If no `design.md` exists, skip this check and note "No design.md to verify against".
64
-
65
- **Code Pattern Consistency:**
66
-
67
- - Review new code for consistency with project patterns (file naming, directory structure, coding style).
68
- - Significant deviations get a SUGGESTION: "Code pattern deviation: `<details>`" with "Consider following project pattern: `<example>`".
45
+ **Patterns:** review new code against project patterns (file naming, dirs, style). Significant deviation → SUGGESTION: "Code pattern deviation: `<details>`" + "Consider following project pattern: `<example>`".
69
46
 
70
47
  ### 5. Capture findings into persistent memory
71
48
 
72
- For every WARNING or CRITICAL issue that reveals an architectural decision, a standing rule, or a reusable lesson, record it with the memory tools:
49
+ For every WARNING/CRITICAL revealing an architectural decision, standing rule, or reusable lesson:
73
50
 
74
- - Standing rules, constraints, or conventions the team must keep following → `recordRule`, e.g.:
51
+ - Standing rules/constraints/conventions → `recordRule`:
75
52
  ```
76
53
  recordRule({ memory_key: "<kebab-topic>", content: "<the rule>", justification: "<evidence>" })
77
54
  ```
78
- - Design decisions, trade-offs, and why one path was taken → `recordDecision`, e.g.:
55
+ - Design decisions/trade-offs and why → `recordDecision`:
79
56
  ```
80
57
  recordDecision({ memory_key: "<kebab-topic>", content: "<the decision>", justification: "<reason>" })
81
58
  ```
82
59
 
83
- Record only findings that would save future investigation. Do not record the verification outcome itself. If no finding meets the bar, record nothing and say so.
60
+ Record only what saves future investigation; not the verification outcome. If nothing meets the bar, record nothing and say so.
84
61
 
85
- ### 6. Generate the Verification Report
86
-
87
- **Summary Scorecard:**
62
+ ### 6. Verification Report
88
63
 
89
64
  ```
90
65
  ## Verification Report: <change-name>
@@ -97,36 +72,31 @@ Record only findings that would save future investigation. Do not record the ver
97
72
  | Coherence | Followed/Issues |
98
73
  ```
99
74
 
100
- **Issues by Priority:**
75
+ **Issues by priority** — each needs a specific, actionable recommendation:
101
76
 
102
- 1. **CRITICAL** (must fix before archive): incomplete tasks, missing requirement implementations — each with a specific, actionable recommendation.
103
- 2. **WARNING** (should fix): spec/design divergences, missing scenario coverage — each with a specific recommendation.
77
+ 1. **CRITICAL** (block archive): incomplete tasks, missing requirement implementations.
78
+ 2. **WARNING** (should fix): spec/design divergences, missing scenario coverage.
104
79
  3. **SUGGESTION** (nice to fix): pattern inconsistencies, minor improvements.
105
80
 
106
- **Final Assessment:**
107
-
108
- - If CRITICAL issues: "X critical issue(s) found. Fix before archiving."
109
- - If only warnings: "No critical issues. Y warning(s) to consider. Ready for archive (with noted improvements)."
110
- - If all clear: "All checks passed. Ready for archive."
111
- - Plus a line listing which memories were recorded in step 5 (or "No findings recorded").
81
+ **Assessment:** CRITICAL → "X critical issue(s) found. Fix before archiving."; only warnings → "No critical issues. Y warning(s) to consider. Ready for archive (with noted improvements)."; clean → "All checks passed. Ready for archive." Plus which memories were recorded in step 5 (or "No findings recorded").
112
82
 
113
- ## Verification Heuristics
83
+ ## Heuristics
114
84
 
115
- - **Completeness**: focus on objective checklist items (checkboxes, requirements list).
116
- - **Correctness**: use keyword search, file path analysis, reasonable inference — don't require perfect certainty.
117
- - **Coherence**: look for glaring inconsistencies, don't nitpick style.
118
- - **False Positives**: when uncertain, prefer SUGGESTION over WARNING, WARNING over CRITICAL.
119
- - **Actionability**: every issue must have a specific recommendation with file/line references where applicable.
85
+ - **Completeness**: objective checklist items only.
86
+ - **Correctness**: keyword search, path analysis, reasonable inference — no perfect certainty required.
87
+ - **Coherence**: glaring inconsistencies only; don't nitpick style.
88
+ - **False positives**: when uncertain, prefer SUGGESTION > WARNING > CRITICAL.
89
+ - **Actionability**: every issue carries a specific recommendation with file/line refs.
120
90
 
121
91
  ## Graceful Degradation
122
92
 
123
- - If only `tasks.md` exists: verify task completion only, skip spec/design checks.
124
- - If tasks + specs exist: verify completeness and correctness, skip design.
125
- - If full artifacts: verify all three dimensions.
126
- - Always note which checks were skipped and why.
93
+ - Only `tasks.md` → task completion, skip spec/design.
94
+ - Tasks + specs → completeness + correctness, skip design.
95
+ - Full artifacts → all three dimensions.
96
+ - Always note skipped checks and why.
127
97
 
128
98
  ## Guardrails
129
99
 
130
- - Use code references in format `file.ts:123`.
131
- - No vague suggestions like "consider reviewing" — every issue needs a specific recommendation.
100
+ - Reference code as `file.ts:123`.
101
+ - No vague suggestions ("consider reviewing") — every issue needs a specific recommendation.
132
102
  - `recordRule`/`recordDecision` accept only `memory_key`, `content`, `justification`, `scope`. Never send `source`, `confidence`, `status` or `id` — the runtime manages those.