@ancleto/spec 0.6.5 → 0.6.6
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.
- package/agents/documenter.md +2 -0
- package/agents/spec-writer.md +2 -1
- package/commands/cleto-apply.md +2 -154
- package/commands/cleto-archive.md +2 -164
- package/commands/cleto-bulk-archive.md +2 -248
- package/commands/cleto-continue.md +2 -126
- package/commands/cleto-explore.md +2 -174
- package/commands/cleto-ff.md +2 -120
- package/commands/cleto-new.md +2 -108
- package/commands/cleto-onboard.md +2 -550
- package/commands/cleto-propose.md +2 -130
- package/commands/cleto-recall.md +4 -52
- package/commands/cleto-sync.md +2 -137
- package/commands/cleto-verify.md +2 -169
- package/package.json +1 -1
- package/skills/ancleto-apply/SKILL.md +15 -38
- package/skills/ancleto-archive/SKILL.md +22 -24
- package/skills/ancleto-bulk-archive/SKILL.md +45 -55
- package/skills/ancleto-commit/SKILL.md +10 -29
- package/skills/ancleto-continue/SKILL.md +18 -24
- package/skills/ancleto-explore/SKILL.md +40 -67
- package/skills/ancleto-ff/SKILL.md +20 -28
- package/skills/ancleto-new/SKILL.md +20 -39
- package/skills/ancleto-onboard/SKILL.md +35 -38
- package/skills/ancleto-pr/SKILL.md +12 -26
- package/skills/ancleto-propose/SKILL.md +22 -69
- package/skills/ancleto-recall/SKILL.md +21 -25
- package/skills/ancleto-sync-specs/SKILL.md +27 -62
- package/skills/ancleto-upgrade/SKILL.md +132 -223
- package/skills/ancleto-upgrade/references/templates.md +138 -171
- package/skills/ancleto-verify/SKILL.md +36 -66
- package/skills/ancleto-workflow/SKILL.md +17 -17
- package/src/cli/index.js +36 -31
- package/templates/AGENTS.md +3 -0
|
@@ -1,66 +1,63 @@
|
|
|
1
|
-
# Templates —
|
|
1
|
+
# Templates — aspec artifacts
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
#
|
|
10
|
+
# Proposal: Migration to {LIBRARY} v{TARGET_VERSION}
|
|
12
11
|
|
|
13
|
-
##
|
|
12
|
+
## Context
|
|
14
13
|
|
|
15
|
-
{
|
|
16
|
-
|
|
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
|
-
##
|
|
17
|
+
## Analysis coverage
|
|
20
18
|
|
|
21
|
-
- source files
|
|
22
|
-
- test files
|
|
23
|
-
- config files
|
|
24
|
-
-
|
|
25
|
-
-
|
|
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
|
-
##
|
|
25
|
+
## Change scope
|
|
28
26
|
|
|
29
|
-
###
|
|
27
|
+
### Affected dependencies — {N} packages in {M} package.json
|
|
30
28
|
|
|
31
|
-
| package.json |
|
|
32
|
-
| ------------ | ------- |
|
|
29
|
+
| package.json | Package | Current version | Target version |
|
|
30
|
+
| ------------ | ------- | --------------- | -------------- |
|
|
33
31
|
|
|
34
|
-
{
|
|
32
|
+
{One row per DEPENDENCY_CHANGES[]}
|
|
35
33
|
|
|
36
|
-
###
|
|
34
|
+
### Config files to modify — {N} files
|
|
37
35
|
|
|
38
|
-
{
|
|
36
|
+
{Change per file; if none: "None."}
|
|
39
37
|
|
|
40
|
-
###
|
|
38
|
+
### Source code with breaking changes — {N} files
|
|
41
39
|
|
|
42
|
-
{
|
|
40
|
+
{Affected files + breaking change; if none: "None."}
|
|
43
41
|
|
|
44
|
-
### Tests
|
|
42
|
+
### Tests with breaking changes — {N} files
|
|
45
43
|
|
|
46
|
-
{
|
|
44
|
+
{Affected test files; if none: "None."}
|
|
47
45
|
|
|
48
|
-
##
|
|
46
|
+
## Breaking-change assessment
|
|
49
47
|
|
|
50
|
-
{
|
|
48
|
+
- ✅ AFFECTED — {id}: {description} — {N} occurrences in {M} files
|
|
49
|
+
- ✓ NOT AFFECTED — {id}: {description}
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
- ✓ NO AFECTA — {id}: {description}
|
|
51
|
+
{Per relevant KNOWN_BREAK}
|
|
54
52
|
|
|
55
|
-
##
|
|
53
|
+
## Low-confidence matches
|
|
56
54
|
|
|
57
|
-
{
|
|
55
|
+
{UNSURE_MATCHES[]; if none: "None."}
|
|
58
56
|
|
|
59
|
-
##
|
|
57
|
+
## Decision
|
|
60
58
|
|
|
61
|
-
|
|
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
|
-
#
|
|
68
|
+
# Specs: {LIBRARY} v{TARGET_VERSION} Migration
|
|
69
|
+
|
|
70
|
+
## ADDED Requirements
|
|
72
71
|
|
|
73
|
-
|
|
72
|
+
### Requirement: Dependencies
|
|
74
73
|
|
|
75
|
-
{
|
|
74
|
+
- REQ-D-{N}: The system SHALL use `{package_name}` at version `^{TARGET_VERSION}.0.0` in `{path}`
|
|
76
75
|
|
|
77
|
-
|
|
76
|
+
{Per DEPENDENCY_CHANGES[]}
|
|
78
77
|
|
|
79
|
-
|
|
78
|
+
#### Scenario: dependencies installed
|
|
80
79
|
|
|
81
|
-
|
|
80
|
+
- **WHEN** dependencies are installed for the affected package
|
|
81
|
+
- **THEN** `{package_name}` resolves to `^{TARGET_VERSION}.0.0`
|
|
82
82
|
|
|
83
|
-
|
|
83
|
+
### Requirement: Configuration
|
|
84
84
|
|
|
85
|
-
{
|
|
86
|
-
No se requieren cambios de configuración.
|
|
85
|
+
- REQ-C-{N}: The system SHALL {required change} in `{file}`
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
{Per CONFIG_CHANGES[]; empty → "No configuration requirements."}
|
|
89
88
|
|
|
90
|
-
|
|
89
|
+
### Requirement: Source code
|
|
91
90
|
|
|
92
|
-
- REQ-S-{N} [{break_id}]:
|
|
93
|
-
|
|
91
|
+
- REQ-S-{N} [{break_id}]: The system SHALL {required code change}
|
|
92
|
+
Evidence: `{file}:{line_number}` ({confidence})
|
|
94
93
|
|
|
95
|
-
{
|
|
96
|
-
No se detectaron breaking changes en código fuente.
|
|
94
|
+
{Per BREAKING_CHANGES_IN_CODE[]; empty → "No source-code requirements."}
|
|
97
95
|
|
|
98
|
-
|
|
96
|
+
### Requirement: Tests
|
|
99
97
|
|
|
100
|
-
{
|
|
98
|
+
- REQ-T-{N} [{break_id}]: The system SHALL {required test change}
|
|
99
|
+
Evidence: `{file}:{line_number}` ({confidence})
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
Evidencia: `{file}:{line_number}` ({confidence})
|
|
101
|
+
{Per BREAKING_CHANGES_IN_TESTS[]; empty → "No test requirements."}
|
|
104
102
|
|
|
105
|
-
|
|
106
|
-
No se detectaron breaking changes en tests.
|
|
103
|
+
### Requirement: Verification
|
|
107
104
|
|
|
108
|
-
|
|
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
|
-
|
|
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
|
-
|
|
111
|
+
### Requirement: Analysis coverage
|
|
116
112
|
|
|
117
|
-
- REQ-X-001:
|
|
118
|
-
- REQ-X-002:
|
|
119
|
-
- REQ-X-003:
|
|
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
|
-
##
|
|
125
|
+
## Phase 1: Dependencies
|
|
130
126
|
|
|
131
|
-
{
|
|
127
|
+
- [ ] **T-D-{N}** Update `{package_name}` in `{path}` from `{current_version}` to `^{TARGET_VERSION}.0.0`
|
|
132
128
|
|
|
133
|
-
|
|
129
|
+
{Per DEPENDENCY_CHANGES[]}
|
|
134
130
|
|
|
135
|
-
- [ ] **T-D-LAST**
|
|
131
|
+
- [ ] **T-D-LAST** Regenerate the lockfile:
|
|
136
132
|
```bash
|
|
137
133
|
npm install
|
|
138
134
|
```
|
|
139
135
|
````
|
|
140
136
|
|
|
141
|
-
##
|
|
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
|
-
{
|
|
139
|
+
{Only if IS_RUNTIME = true; one T-I task per file found}
|
|
149
140
|
|
|
150
|
-
- [ ] **T-I-
|
|
141
|
+
- [ ] **T-I-001** {Create | Update} `.nvmrc` with value `{TARGET_VERSION}`
|
|
151
142
|
|
|
152
|
-
|
|
143
|
+
- [ ] **T-I-002** Update `nodeVersion` in `{CI_FILE}` from `{current}` to `{TARGET_VERSION}.x`
|
|
153
144
|
|
|
154
|
-
- [ ] **T-I-003**
|
|
145
|
+
- [ ] **T-I-003** Update the base image in `{Dockerfile}`:
|
|
155
146
|
```dockerfile
|
|
156
|
-
#
|
|
147
|
+
# Before
|
|
157
148
|
FROM node:{current}-alpine
|
|
158
|
-
#
|
|
149
|
+
# After
|
|
159
150
|
FROM node:{TARGET_VERSION}-alpine
|
|
160
151
|
```
|
|
161
|
-
_(
|
|
152
|
+
_(Match the existing variant: alpine, slim, bullseye, etc.)_
|
|
162
153
|
|
|
163
|
-
|
|
154
|
+
- [ ] **T-I-004** Update `Runtime` in `{appSettings.json}` to `NODEJS_{TARGET_VERSION}_X`
|
|
164
155
|
|
|
165
|
-
|
|
156
|
+
{If IS_RUNTIME = false:}
|
|
157
|
+
_(Not applicable to library migrations)_
|
|
166
158
|
|
|
167
|
-
|
|
168
|
-
*(No aplica para migraciones de librería)\_
|
|
159
|
+
## Phase 3: Build and test configuration
|
|
169
160
|
|
|
170
|
-
|
|
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
|
-
//
|
|
164
|
+
// Before
|
|
178
165
|
{current_value}
|
|
179
|
-
//
|
|
166
|
+
// After
|
|
180
167
|
{target_value}
|
|
181
168
|
```
|
|
182
169
|
|
|
183
|
-
{
|
|
184
|
-
|
|
170
|
+
{Per CONFIG_CHANGES[]; empty →}
|
|
171
|
+
_(No configuration changes detected)_
|
|
185
172
|
|
|
186
|
-
##
|
|
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
|
-
|
|
193
|
-
{Para cada {file, line_number, snippet}:}
|
|
177
|
+
Affected files:
|
|
194
178
|
- `{file}:{line_number}` ({confidence}) — `{snippet}`
|
|
195
179
|
|
|
196
|
-
{
|
|
197
|
-
|
|
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
|
-
|
|
183
|
+
## Phase 5: Breaking changes in tests
|
|
202
184
|
|
|
203
185
|
- [ ] **T-T-{N}** [{break_id}] `{severity}` — {description}
|
|
204
186
|
Fix: {fix}
|
|
205
|
-
|
|
206
|
-
{Para cada {file, line_number, snippet}:}
|
|
187
|
+
Affected files:
|
|
207
188
|
- `{file}:{line_number}` ({confidence}) — `{snippet}`
|
|
208
189
|
|
|
209
|
-
{
|
|
210
|
-
|
|
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
|
-
##
|
|
193
|
+
## Phase 6: Verification
|
|
213
194
|
|
|
214
|
-
- [ ] **T-V-001**
|
|
195
|
+
- [ ] **T-V-001** Verify TypeScript compilation:
|
|
215
196
|
```bash
|
|
216
197
|
npx tsc --noEmit
|
|
217
|
-
#
|
|
198
|
+
# Nx monorepos: npx nx affected --target=typecheck
|
|
218
199
|
```
|
|
219
200
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
- [ ] **T-V-002** Verificar build:
|
|
201
|
+
- [ ] **T-V-002** Verify build:
|
|
223
202
|
```bash
|
|
224
203
|
npm run build
|
|
225
|
-
#
|
|
204
|
+
# Nx monorepos: npx nx affected --target=build
|
|
226
205
|
```
|
|
227
206
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
- [ ] **T-V-003** Ejecutar linter:
|
|
207
|
+
- [ ] **T-V-003** Run the linter:
|
|
231
208
|
```bash
|
|
232
209
|
npm run lint
|
|
233
|
-
#
|
|
210
|
+
# Nx monorepos: npx nx affected:lint
|
|
234
211
|
```
|
|
235
212
|
|
|
236
|
-
|
|
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
|
-
#
|
|
216
|
+
# Nx monorepos: npx nx affected --target=test
|
|
242
217
|
```
|
|
243
218
|
|
|
244
|
-
|
|
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**
|
|
253
|
-
-
|
|
254
|
-
-
|
|
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
|
-
##
|
|
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
|
-
|
|
242
|
+
{Phase order: dependencies first (surface compilation errors before touching code), then
|
|
243
|
+
infrastructure, config, code. Main risk and mitigation.}
|
|
272
244
|
|
|
273
|
-
|
|
245
|
+
## Technical decisions
|
|
274
246
|
|
|
275
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
289
|
-
propuesto es la solución correcta y no un workaround.}
|
|
258
|
+
### Breaking changes — impact analysis
|
|
290
259
|
|
|
291
|
-
{
|
|
292
|
-
|
|
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
|
-
###
|
|
263
|
+
### Ecosystem compatibility
|
|
295
264
|
|
|
296
|
-
{
|
|
297
|
-
|
|
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
|
-
###
|
|
268
|
+
### Analysis quality
|
|
301
269
|
|
|
302
|
-
-
|
|
303
|
-
-
|
|
304
|
-
-
|
|
305
|
-
-
|
|
306
|
-
-
|
|
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
|
-
##
|
|
276
|
+
## Change table
|
|
309
277
|
|
|
310
|
-
|
|
|
311
|
-
|
|
312
|
-
{
|
|
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
|
-
##
|
|
282
|
+
## References
|
|
316
283
|
|
|
317
|
-
- {DOCS_URL
|
|
318
|
-
- {
|
|
319
|
-
-
|
|
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
|
|
13
|
+
Verify an implementation against its change artifacts (proposal, design, tasks, delta specs) by reading files. No external binaries.
|
|
14
14
|
|
|
15
|
-
**Input**: Optionally
|
|
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
|
|
21
|
+
### 1. Load change artifacts
|
|
22
22
|
|
|
23
|
-
Read
|
|
23
|
+
Read under `aspec/changes/<name>/`:
|
|
24
24
|
|
|
25
|
-
- `tasks.md` —
|
|
26
|
-
- `proposal.md`, `design.md` — intent
|
|
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.
|
|
29
|
+
### 2. Completeness
|
|
30
30
|
|
|
31
|
-
**
|
|
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
|
-
|
|
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
|
-
|
|
35
|
+
### 3. Correctness
|
|
38
36
|
|
|
39
|
-
|
|
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
|
-
|
|
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
|
-
|
|
41
|
+
### 4. Coherence
|
|
47
42
|
|
|
48
|
-
|
|
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
|
-
**
|
|
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
|
|
49
|
+
For every WARNING/CRITICAL revealing an architectural decision, standing rule, or reusable lesson:
|
|
73
50
|
|
|
74
|
-
- Standing rules
|
|
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
|
|
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
|
|
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.
|
|
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
|
|
75
|
+
**Issues by priority** — each needs a specific, actionable recommendation:
|
|
101
76
|
|
|
102
|
-
1. **CRITICAL** (
|
|
103
|
-
2. **WARNING** (should fix): spec/design divergences, missing scenario coverage
|
|
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
|
-
**
|
|
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
|
-
##
|
|
83
|
+
## Heuristics
|
|
114
84
|
|
|
115
|
-
- **Completeness**:
|
|
116
|
-
- **Correctness**:
|
|
117
|
-
- **Coherence**:
|
|
118
|
-
- **False
|
|
119
|
-
- **Actionability**: every issue
|
|
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
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
- Always note
|
|
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
|
-
-
|
|
131
|
-
- No vague suggestions
|
|
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.
|