@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.
Files changed (34) hide show
  1. package/agents/documenter.md +2 -0
  2. package/agents/spec-writer.md +2 -1
  3. package/commands/cleto-apply.md +2 -154
  4. package/commands/cleto-archive.md +2 -164
  5. package/commands/cleto-bulk-archive.md +2 -248
  6. package/commands/cleto-continue.md +2 -126
  7. package/commands/cleto-explore.md +2 -174
  8. package/commands/cleto-ff.md +2 -120
  9. package/commands/cleto-new.md +2 -108
  10. package/commands/cleto-onboard.md +2 -550
  11. package/commands/cleto-propose.md +2 -130
  12. package/commands/cleto-recall.md +4 -52
  13. package/commands/cleto-sync.md +2 -137
  14. package/commands/cleto-verify.md +2 -169
  15. package/package.json +1 -1
  16. package/skills/ancleto-apply/SKILL.md +15 -38
  17. package/skills/ancleto-archive/SKILL.md +22 -24
  18. package/skills/ancleto-bulk-archive/SKILL.md +45 -55
  19. package/skills/ancleto-commit/SKILL.md +10 -29
  20. package/skills/ancleto-continue/SKILL.md +18 -24
  21. package/skills/ancleto-explore/SKILL.md +40 -67
  22. package/skills/ancleto-ff/SKILL.md +20 -28
  23. package/skills/ancleto-new/SKILL.md +20 -39
  24. package/skills/ancleto-onboard/SKILL.md +35 -38
  25. package/skills/ancleto-pr/SKILL.md +12 -26
  26. package/skills/ancleto-propose/SKILL.md +22 -69
  27. package/skills/ancleto-recall/SKILL.md +21 -25
  28. package/skills/ancleto-sync-specs/SKILL.md +27 -62
  29. package/skills/ancleto-upgrade/SKILL.md +132 -223
  30. package/skills/ancleto-upgrade/references/templates.md +138 -171
  31. package/skills/ancleto-verify/SKILL.md +36 -66
  32. package/skills/ancleto-workflow/SKILL.md +17 -17
  33. package/src/cli/index.js +36 -31
  34. package/templates/AGENTS.md +3 -0
@@ -19,58 +19,42 @@ metadata:
19
19
 
20
20
  # ancleto-upgrade
21
21
 
22
- Analiza el repositorio completo y genera un aspec change para migrar cualquier
23
- librería o runtime a una nueva versión mayor — de forma documentada, faseada y sin
24
- romper el repo.
22
+ **Artifacts language**: write every artifact in English. Keywords (`Requirement`, `Scenario`, `SHALL`, `WHEN`/`THEN`, `ADDED/MODIFIED/REMOVED/RENAMED Requirements`) are literal and MUST NOT be translated. File and directory names stay English kebab-case.
25
23
 
26
- El análisis es completamente dinámico: detecta la versión actual en el repo, obtiene
27
- los breaking changes de la documentación oficial, construye los patterns de búsqueda
28
- a partir de eso, y escanea todo el código. Sin listas estáticas.
24
+ Generate an aspec change to migrate any library/runtime to a new major version. No code
25
+ edits. Fully dynamic: detect the current repo version → fetch breaking changes from official
26
+ docs → derive search patterns → scan all code. No static lists.
29
27
 
30
- **Ejemplos de uso:**
31
-
32
- - `/ancleto-upgrade node 22` → migra Node.js a v22
33
- - `/ancleto-upgrade @middy/core 7` → migra Middy a v7
34
- - `/ancleto-upgrade @middy/core 7 https://middy.js.org/docs/upgrade/v7` → con docs
35
- - `/ancleto-upgrade react 19` → migra React a v19
36
- - `/ancleto-upgrade typescript 5.8` → migra TypeScript a 5.8
28
+ **Usage:** `/ancleto-upgrade <library> <major> [docs-url]` — e.g. `node 22`, `@middy/core 7`,
29
+ `react 19`, `typescript 5.8`, `@middy/core 7 https://middy.js.org/docs/upgrade/v7`.
37
30
 
38
31
  ---
39
32
 
40
- ## Paso 1 — Parsear argumentos
41
-
42
- Del mensaje del usuario, extraer:
43
-
44
- - `LIBRARY` — nombre de la librería o runtime (ej: `node`, `@middy/core`, `react`)
45
- - `TARGET_VERSION` — versión objetivo, solo major (ej: `22`, `7`, `19`)
46
- - `DOCS_URL` — URL de migration guide (opcional, puede venir en el mensaje)
47
- - `IS_RUNTIME` — `true` si LIBRARY es `node`, `deno` o `bun`
48
- - `LIBRARY_SLUG` — nombre seguro para archivos:
49
- - `node` → `node` | `@middy/core` → `middy` | `@aws-sdk/client-s3` → `aws-sdk`
50
- - Regla: parte después del último `/` o `@`, sin caracteres especiales
51
- - `CHANGE_NAME` — `${LIBRARY_SLUG}${TARGET_VERSION}-migration` (ej: `node22-migration`)
52
-
53
- ### 1.1 URL opcional de documentación
33
+ ## Step 1 — Parse arguments
54
34
 
55
- Si el usuario no incluyó `DOCS_URL`, preguntar de forma explícita y breve:
35
+ Extract from the user message:
56
36
 
57
- - "¿Querés pasar una URL oficial de migration guide/changelog de {LIBRARY} v{TARGET_VERSION}? (opcional)"
37
+ - `LIBRARY` — library/runtime (`node`, `@middy/core`, `react`)
38
+ - `TARGET_VERSION` — target major (`22`, `7`, `19`)
39
+ - `DOCS_URL` — migration guide URL (optional)
40
+ - `IS_RUNTIME` — `true` for `node`, `deno`, `bun`
41
+ - `LIBRARY_SLUG` — safe file name: `node` → `node`, `@middy/core` → `middy`, `@aws-sdk/client-s3` → `aws-sdk` (part after the last `/` or `@`, no special characters)
42
+ - `CHANGE_NAME` — `${LIBRARY_SLUG}${TARGET_VERSION}-migration` (`node22-migration`)
58
43
 
59
- Regla:
44
+ ### 1.1 Optional docs URL
60
45
 
61
- - Si responde con URL, usarla en Paso 3a
62
- - Si responde que no, continuar automáticamente con Paso 3a (búsqueda web)
63
- - Nunca bloquear la ejecución por no tener URL
46
+ If `DOCS_URL` is missing, ask: "Provide an official migration guide/changelog URL for
47
+ {LIBRARY} v{TARGET_VERSION}? (optional)". URL → Step 3a; none → Step 3a web search. Never
48
+ block execution for lack of a URL.
64
49
 
65
50
  ---
66
51
 
67
- ## Paso 2 — Detectar versión actual en el repo
52
+ ## Step 2 — Detect current version in the repo
68
53
 
69
- Antes de buscar documentación, detectar `CURRENT_VERSION` — la versión que tiene el
70
- repo hoy. Esto es crítico para construir los patterns de grep del Paso 4.
54
+ Detect `CURRENT_VERSION` before fetching docs — critical for the Step 4 grep patterns.
71
55
 
72
56
  ```bash
73
- # Para runtimes: buscar en .nvmrc, engines, Dockerfiles, CI
57
+ # Runtimes: look in .nvmrc, engines, Dockerfiles, CI
74
58
  cat .nvmrc 2>/dev/null
75
59
  cat .node-version 2>/dev/null
76
60
  grep -r "\"node\":" package.json
@@ -78,7 +62,7 @@ grep -rn "node-version\|nodeVersion" .github/ azure-pipelines.yml 2>/dev/null
78
62
  find . -name "Dockerfile*" -not -path "*/node_modules/*" \
79
63
  -exec grep -l "FROM node:" {} \; 2>/dev/null | xargs grep "FROM node:" 2>/dev/null
80
64
 
81
- # Para librerías: buscar en todos los package.json
65
+ # Libraries: look in all package.json
82
66
  find . -name "package.json" \
83
67
  -not -path "*/node_modules/*" -not -path "*/dist/*" \
84
68
  -not -name "package-lock.json" \
@@ -86,67 +70,55 @@ find . -name "package.json" \
86
70
  | xargs grep "${LIBRARY}" 2>/dev/null
87
71
  ```
88
72
 
89
- De estos resultados, inferir `CURRENT_VERSION` (ej: `20` para Node, `6` para Middy).
90
-
91
- Si hay versiones inconsistentes entre archivos, registrarlas todas — son candidatas
92
- a cambio también.
73
+ Infer `CURRENT_VERSION` (`20` Node, `6` Middy). Conflicting versions → record all; also
74
+ change candidates.
93
75
 
94
76
  ---
95
77
 
96
- ## Paso 3 — Obtener breaking changes de la documentación
97
-
98
- El objetivo es construir `SEARCH_PATTERNS[]` — qué buscar en el repo y por qué.
99
- Los patterns NO son estáticos: se derivan de la documentación real de la migración.
78
+ ## Step 3 — Get breaking changes from the docs
100
79
 
101
- ### 3a. Obtener la documentación
80
+ Build `SEARCH_PATTERNS[]` (what to search, why) from the real migration docs, never static.
102
81
 
103
- Ejecutar en paralelo:
82
+ ### 3a. Fetch the docs
104
83
 
105
- **Si el usuario proveyó DOCS_URL:** hacer fetch directo.
106
-
107
- **Siempre, en paralelo:** buscar en internet:
84
+ Run in parallel. `DOCS_URL` → fetch directly. Always also web search:
108
85
 
109
86
  - `"{LIBRARY}" "v{TARGET_VERSION}" migration guide`
110
87
  - `"{LIBRARY}" "{TARGET_VERSION}" breaking changes changelog`
111
- - Releases oficiales en GitHub: `github.com/{owner}/{repo}/releases/tag/v{TARGET_VERSION}`
112
-
113
- Priorizar: URL del usuario → docs oficiales → release notes → changelog GitHub.
88
+ - Official GitHub releases: `github.com/{owner}/{repo}/releases/tag/v{TARGET_VERSION}`
114
89
 
115
- Si no se encuentra nada: documentarlo y continuar — el Paso 4 igual detecta
116
- referencias a `CURRENT_VERSION` en todo el repo.
90
+ Priority: user URL → official docs → release notes → GitHub changelog. Nothing found →
91
+ document it and continue; Step 4 still finds `CURRENT_VERSION` references.
117
92
 
118
- ### 3b. Extraer breaking changes y construir SEARCH_PATTERNS[]
93
+ ### 3b. Extract breaking changes and build SEARCH_PATTERNS[]
119
94
 
120
- De la documentación obtenida, extraer cada breaking change y construir un entry:
95
+ One entry per breaking change:
121
96
 
122
97
  ```
123
98
  {
124
- id: string único (ej: "BC-001")
125
- source: URL de donde viene
126
- description: qué cambia y por qué rompe
127
- fix: cómo arreglarlo
99
+ id: unique string (e.g. "BC-001")
100
+ source: URL it comes from
101
+ description: what changes and why it breaks
102
+ fix: how to fix it
128
103
  severity: "breaking" | "warning" | "info"
129
- patterns: [strings o regex a buscar en el repo]
104
+ patterns: [strings or regex to search in the repo]
130
105
  file_types: [".ts", ".js", "jest.config.*", "Dockerfile", etc.]
131
106
  }
132
107
  ```
133
108
 
134
- Ejemplos de cómo derivar patterns de la documentación:
109
+ Derive patterns from docs:
135
110
 
136
- - Doc dice "`ReactDOM.render` fue eliminado" → patterns: `["ReactDOM.render"]`
137
- - Doc dice "`useFormState` se renombró" → patterns: `["useFormState"]`
138
- - Doc dice "Jest necesita `transformIgnorePatterns` para ESM" → verificar ausencia en jest.config
139
- - Doc dice "versión mínima de Node es 22" → pattern: `engines.node` con valor < 22
111
+ - "`ReactDOM.render` was removed" → `["ReactDOM.render"]`
112
+ - "`useFormState` was renamed" → `["useFormState"]`
113
+ - "Jest needs `transformIgnorePatterns` for ESM" → check its absence in jest.config
114
+ - "minimum Node version is 22" → pattern `engines.node` with value < 22
140
115
 
141
- ### 3c. Construir VERSION_PATTERNS[] automáticamente
116
+ ### 3c. Build VERSION_PATTERNS[] automatically
142
117
 
143
- Independientemente de la doc, siempre construir patterns para encontrar cualquier
144
- referencia a `CURRENT_VERSION` en todas sus formas. Estos tienen confianza `high`
145
- porque toda mención de la versión vieja es candidata a actualización.
118
+ Always build patterns for every form of `CURRENT_VERSION`, docs or not — `high` confidence:
119
+ any old-version mention is a change candidate.
146
120
 
147
- Derivar las formas según el tipo:
148
-
149
- **Si IS_RUNTIME = true (Node.js como ejemplo con CURRENT_VERSION=20):**
121
+ **IS_RUNTIME = true (Node example, CURRENT_VERSION=20):**
150
122
 
151
123
  ```
152
124
  NODEJS_20_X, NODEJS_20 # Lambda runtime strings (CDK/TS)
@@ -155,26 +127,24 @@ Runtime.NODEJS_20_X # enum usage in CDK code
155
127
  node:20, node:20-alpine, node:20-slim, node:20-bullseye # Docker
156
128
  "node": "20", "node": ">=20", "node": "^20" # engines package.json
157
129
  nodeVersion: 20, node-version: 20, node-version: '20' # CI/CD
158
- 20.x, v20 # referencias genéricas
130
+ 20.x, v20 # generic references
159
131
  ```
160
132
 
161
- **Si IS_RUNTIME = false (librería npm como ejemplo con @middy/core v6):**
133
+ **IS_RUNTIME = false (npm library, @middy/core v6):**
162
134
 
163
135
  ```
164
136
  "@middy/core": "^6", "@middy/core": "6" # package.json
165
- @middy/core@6, middy@6 # referencias inline
166
- "@middy/": "^6" # todos los scoped packages
137
+ @middy/core@6, middy@6 # inline references
138
+ "@middy/": "^6" # all scoped packages
167
139
  ```
168
140
 
169
- Adaptar estos patterns al LIBRARY y CURRENT_VERSION detectados. El objetivo es no
170
- perder ninguna ocurrencia de la versión vieja en ningún tipo de archivo.
141
+ Adapt to LIBRARY/CURRENT_VERSION; miss no old-version occurrence.
171
142
 
172
- ## Paso 4 — Escanear el repo
143
+ ## Step 4 — Scan the repo
173
144
 
174
- Con `SEARCH_PATTERNS[]` (de la doc) + `VERSION_PATTERNS[]` (automáticos) del Paso 3,
175
- escanear exhaustivamente. Ejecutar todo en paralelo.
145
+ Run both Step 3 pattern sets exhaustively, in parallel.
176
146
 
177
- ### 4a. Grep de versión — todo el repo
147
+ ### 4a. Version grep — whole repo
178
148
 
179
149
  ```bash
180
150
  grep -rn \
@@ -186,10 +156,10 @@ grep -rn \
186
156
  .
187
157
  ```
188
158
 
189
- Reemplazar con los VERSION_PATTERNS[] reales. Registrar cada match:
159
+ Replace with the real VERSION_PATTERNS[]. Record:
190
160
  `{file, line_number, line_content, pattern_matched, confidence: "high"}`
191
161
 
192
- ### 4b. Grep de breaking changes semánticos
162
+ ### 4b. Semantic breaking-change grep
193
163
 
194
164
  ```bash
195
165
  grep -rn \
@@ -199,10 +169,10 @@ grep -rn \
199
169
  .
200
170
  ```
201
171
 
202
- Reemplazar con los patterns de SEARCH_PATTERNS[]. Registrar cada match:
172
+ Replace with SEARCH_PATTERNS[]. Record:
203
173
  `{file, line_number, line_content, pattern_matched, break_id, confidence: "medium"}`
204
174
 
205
- ### 4c. Archivos de configuración
175
+ ### 4c. Config files
206
176
 
207
177
  ```bash
208
178
  find . \( -name "jest.config.*" -o -name "tsconfig*.json" \
@@ -211,24 +181,23 @@ find . \( -name "jest.config.*" -o -name "tsconfig*.json" \
211
181
  -not -path "*/node_modules/*" -not -path "*/dist/*" | sort
212
182
  ```
213
183
 
214
- Leer cada uno y verificar breaking changes de configuración del Paso 3
215
- (ej: ausencia de `transformIgnorePatterns`, valor de `moduleResolution`).
184
+ Verify Step 3 config breaking changes per file (e.g. missing `transformIgnorePatterns`,
185
+ `moduleResolution`).
216
186
 
217
- ### 4d. Registro por categoría (obligatorio)
187
+ ### 4d. Per-category registry (mandatory)
218
188
 
219
- Además de los grep agregados, ejecutar este escaneo por categoría para asegurar
220
- cobertura exhaustiva y permitir snippets accionables en proposal/tasks:
189
+ Per-category scan for exhaustive coverage and actionable snippets:
221
190
 
222
- ### 4d.1 package.json raíz
191
+ ### 4d.1 Root package.json
223
192
 
224
193
  ```bash
225
194
  cat package.json
226
195
  ```
227
196
 
228
- Extraer: dependencias relacionadas con LIBRARY (versión actual), scripts disponibles
229
- (`build`, `lint`, `test`, `test:ci`, `typecheck`), campo `workspaces`.
197
+ Extract LIBRARY dependencies (current version), scripts (`build`, `lint`, `test`, `test:ci`,
198
+ `typecheck`), `workspaces`.
230
199
 
231
- ### 4d.2 Todos los package.json del monorepo
200
+ ### 4d.2 All monorepo package.json
232
201
 
233
202
  ```bash
234
203
  find . -name "package.json" \
@@ -237,18 +206,18 @@ find . -name "package.json" \
237
206
  -not -name "package-lock.json" | sort
238
207
  ```
239
208
 
240
- Para cada uno: dependencias relacionadas con LIBRARY, `engines.node`, `name`.
209
+ Per file: LIBRARY dependencies, `engines.node`, `name`.
241
210
 
242
- ### 4d.3 Archivos CI/CD
211
+ ### 4d.3 CI/CD files
243
212
 
244
213
  ```bash
245
214
  find . \( -name "azure-pipelines.yml" -o -path "*/.github/workflows/*.yml" \) \
246
215
  -not -path "*/node_modules/*" | sort
247
216
  ```
248
217
 
249
- Buscar: `nodeVersion`, `node-version`, imagen base de Node.
218
+ Look for `nodeVersion`, `node-version`, Node base image.
250
219
 
251
- ### 4d.4 Configuración de runtime
220
+ ### 4d.4 Runtime config
252
221
 
253
222
  ```bash
254
223
  cat .nvmrc 2>/dev/null || echo "NO_NVMRC"
@@ -261,7 +230,7 @@ cat .node-version 2>/dev/null || echo "NO_NODE_VERSION"
261
230
  find . -name "Dockerfile*" -not -path "*/node_modules/*" -not -path "*/dist/*" | sort
262
231
  ```
263
232
 
264
- Para cada uno: buscar `FROM node:X` o `FROM node:X-alpine`.
233
+ Per file: `FROM node:X` or `FROM node:X-alpine`.
265
234
 
266
235
  ### 4d.6 CDK / Lambda appSettings
267
236
 
@@ -270,9 +239,9 @@ find . -name "appSettings*.json" \
270
239
  -not -path "*/node_modules/*" -not -path "*/dist/*" | sort
271
240
  ```
272
241
 
273
- Buscar el campo `"Runtime"`.
242
+ Look for `"Runtime"`.
274
243
 
275
- ### 4d.7 Build, tests y tsconfig
244
+ ### 4d.7 Build, tests and tsconfig
276
245
 
277
246
  ```bash
278
247
  find . \( -name "jest.config.*" -o -name "tsconfig*.json" \
@@ -281,11 +250,11 @@ find . \( -name "jest.config.*" -o -name "tsconfig*.json" \
281
250
  -not -path "*/node_modules/*" -not -path "*/dist/*" | sort
282
251
  ```
283
252
 
284
- Para `jest.config.*`: registrar `transformIgnorePatterns`, `transform`, `testEnvironment`.
285
- Para `tsconfig*.json`: registrar `target`, `module`, `moduleResolution`, `verbatimModuleSyntax`.
286
- Aplicar `SEARCH_PATTERNS[]` con `file_types` que incluyan `jest.config.*` o `tsconfig`.
253
+ - `jest.config.*`: `transformIgnorePatterns`, `transform`, `testEnvironment`
254
+ - `tsconfig*.json`: `target`, `module`, `moduleResolution`, `verbatimModuleSyntax`
255
+ - apply `SEARCH_PATTERNS[]` whose `file_types` include `jest.config.*` or `tsconfig`
287
256
 
288
- ### 4d.8 Código fuente
257
+ ### 4d.8 Source code
289
258
 
290
259
  ```bash
291
260
  find . \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" \) \
@@ -293,20 +262,13 @@ find . \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" \) \
293
262
  -not -name "*.spec.*" -not -name "*.test.*" | sort
294
263
  ```
295
264
 
296
- Para cada archivo de código:
297
-
298
- - Detectar uso directo de `LIBRARY` (imports/requires)
299
- - Detectar también patrones globales de `SEARCH_PATTERNS[]` aunque no haya import directo
300
- (ej: `url.parse`, APIs deprecadas, patrones de ESM/CJS)
301
- - Detectar `VERSION_PATTERNS[]` de runtime/dependencia aunque no estén ligados a imports
302
- (ej: `NODEJS_20_X`, `Runtime.NODEJS_20_X`, `nodejs20.x`, `node:20`)
303
- - Evaluar **cada archivo** y registrar evidencia por match:
304
- `{file, line_number, snippet, break_id?, pattern_matched, confidence}`
265
+ Per file:
305
266
 
306
- Formato de snippet:
307
-
308
- - incluir línea exacta + contexto breve (2 líneas antes / 2 líneas después)
309
- - evitar snippets ambiguos o sin contexto
267
+ - direct `LIBRARY` use (imports/requires)
268
+ - global `SEARCH_PATTERNS[]` without a direct import (e.g. `url.parse`, deprecated APIs, ESM/CJS)
269
+ - runtime/dependency `VERSION_PATTERNS[]` not import-related (e.g. `NODEJS_20_X`, `Runtime.NODEJS_20_X`, `nodejs20.x`, `node:20`)
270
+ - evaluate **every file**; per match record `{file, line_number, snippet, break_id?, pattern_matched, confidence}`
271
+ - snippets: exact line + 2 lines before/after, never ambiguous or context-free
310
272
 
311
273
  ### 4d.9 Tests
312
274
 
@@ -316,132 +278,79 @@ find . \( -name "*.spec.ts" -o -name "*.test.ts" \
316
278
  -not -path "*/node_modules/*" -not -path "*/dist/*" | sort
317
279
  ```
318
280
 
319
- Mismo proceso que 4d.8, aplicando `SEARCH_PATTERNS[]` + `VERSION_PATTERNS[]` para tests.
320
-
321
- Regla de cobertura obligatoria:
281
+ Same as 4d.8 with both pattern sets.
322
282
 
323
- - Reportar cuántos archivos fueron analizados por categoría:
324
- - `source_files_scanned`
325
- - `test_files_scanned`
326
- - `config_files_scanned`
327
- - Si alguna categoría queda en 0, explicar por qué (no existe, filtros, etc.)
328
- - Registrar además:
329
- - `total_matches`
330
- - `patterns_used`
283
+ **Coverage (mandatory):** report files analyzed per category (`source_files_scanned`,
284
+ `test_files_scanned`, `config_files_scanned`); 0 → explain why. Also record `total_matches`,
285
+ `patterns_used`.
331
286
 
332
287
  ---
333
288
 
334
- ## Paso 5 — Clasificar hallazgos
335
-
336
- Con todos los matches del Paso 4, construir:
337
-
338
- - **`BREAKING_CHANGES_IN_CODE[]`** — matches en `.ts/.js` (no tests):
339
- `id`, `description`, `fix`, `severity`, `source`,
340
- `affected_files[{file, line_number, snippet, confidence}]`
341
-
342
- - **`BREAKING_CHANGES_IN_TESTS[]`** — mismo esquema para `.spec.ts/.test.ts`
289
+ ## Step 5 — Classify findings
343
290
 
344
- - **`CONFIG_CHANGES[]`** — archivos de config a modificar:
345
- `file`, `description`, `current_value`, `target_value`, `source`
291
+ Build from all Step 4 matches:
346
292
 
347
- - **`DEPENDENCY_CHANGES[]`** — package.json afectados:
348
- `path`, `package_name`, `current_version`, `target_version`
293
+ | Output | Contents |
294
+ | ------ | -------- |
295
+ | `BREAKING_CHANGES_IN_CODE[]` | `id`, `description`, `fix`, `severity`, `source`, `affected_files[{file, line_number, snippet, confidence}]` |
296
+ | `BREAKING_CHANGES_IN_TESTS[]` | same schema, `.spec.ts/.test.ts` |
297
+ | `CONFIG_CHANGES[]` | `file`, `description`, `current_value`, `target_value`, `source` |
298
+ | `DEPENDENCY_CHANGES[]` | `path`, `package_name`, `current_version`, `target_version` |
299
+ | `SCRIPTS_AVAILABLE[]` | root package.json scripts |
300
+ | `UNSURE_MATCHES[]` | `file`, `line_number`, `snippet`, `reason` |
349
301
 
350
- - **`SCRIPTS_AVAILABLE[]`** — scripts detectados en package.json raíz
351
-
352
- - **`UNSURE_MATCHES[]`** — matches de baja confianza para revisión manual:
353
- `file`, `line_number`, `snippet`, `reason`
354
-
355
- **Regla de confianza:**
356
-
357
- - `high` — match de VERSION_PATTERNS (versión vieja hardcodeada)
358
- - `medium` — match semántico derivado de la doc (API deprecada, flag eliminado)
359
- - `low` — match ambiguo, posible falso positivo
302
+ **Confidence:** `high` = VERSION_PATTERNS (hardcoded old version); `medium` = semantic doc match
303
+ (deprecated API, removed flag); `low` = ambiguous, possible false positive.
360
304
 
361
305
  ---
362
306
 
363
- ## Paso 6 — Crear el change aspec
364
-
365
- Crear el directorio del change en `aspec/changes/${CHANGE_NAME}/` (con `specs/` si aplica).
307
+ ## Step 6 — Create the aspec change
366
308
 
367
- Si el nombre ya existe, preguntar al usuario: agregar sufijo `-v2` o eliminar el existente.
309
+ Create `aspec/changes/${CHANGE_NAME}/` (with `specs/` if applicable). If it exists, ask: `-v2`
310
+ suffix or delete the existing one.
368
311
 
369
312
  ---
370
313
 
371
- ## Paso 7 — Escribir los artefactos aspec
314
+ ## Step 7 — Write the aspec artifacts
372
315
 
373
- Leer `references/templates.md` para obtener los templates exactos de cada archivo.
374
- Escribir en este orden:
316
+ Read `references/templates.md`; write in order `proposal.md`,
317
+ `specs/{LIBRARY_SLUG}{TARGET_VERSION}.md`, `tasks.md`, `design.md`.
375
318
 
376
- 1. `proposal.md`
377
- 2. `specs/{LIBRARY_SLUG}{TARGET_VERSION}.md`
378
- 3. `tasks.md`
379
- 4. `design.md`
380
-
381
- Reglas al completar los templates:
382
-
383
- - Cada match de código debe incluir `file`, `line_number` y `snippet` para ser accionable
384
- - Cada match debería incluir `confidence` (`high|medium|low`) cuando aplique
385
- - Las tareas de verificación (Fase 6) solo se incluyen si el script existe en `SCRIPTS_AVAILABLE[]`
386
- - Si `IS_RUNTIME = false`, la Fase 2 se marca como "No aplica"
387
- - Si no hay breaking changes en código o tests, incluir la fase con nota explicativa (nunca omitirla)
388
- - En monorepos Nx, incluir tanto el comando `npm` como el equivalente `npx nx`
389
- - Incluir siempre: cobertura del escaneo y lista de patterns utilizados
319
+ - every code match: `file`, `line_number`, `snippet`
320
+ - include `confidence` (`high|medium|low`) where applicable
321
+ - Phase 6 tasks only for scripts in `SCRIPTS_AVAILABLE[]`
322
+ - `IS_RUNTIME = false` → Phase 2 "Not applicable"
323
+ - no breaking changes in code/tests → keep the phase with an explanatory note (never omit)
324
+ - Nx monorepos → both `npm` and `npx nx` commands
325
+ - always include scan coverage and patterns used
390
326
 
391
327
  ---
392
328
 
393
- ## Paso 8 — Mostrar resumen final
329
+ ## Step 8 — Show the final summary
394
330
 
395
331
  ```
396
- ## Change creado: {CHANGE_NAME}
397
-
398
- ### Librería migrada
399
- {LIBRARY} {CURRENT_VERSION} → v{TARGET_VERSION}
400
-
401
- ### Documentación utilizada
402
- {URL(s) consultadas | "No se encontró documentación oficial — se usaron VERSION_PATTERNS únicamente"}
403
-
404
- ### Patterns aplicados
405
- - De versión (high confidence): {N} patterns para todas las formas de "{CURRENT_VERSION}"
406
- - Semánticos (de la doc): {N} patterns
407
-
408
- ### Análisis del repositorio
409
- - Cobertura: {source_files_scanned} source, {test_files_scanned} tests, {config_files_scanned} config
410
- - Total matches: {total_matches}
411
- - package.json afectados: {N}
412
- - Archivos de configuración a modificar: {N}
413
- - Archivos de código con issues: {N}
414
- - Archivos de tests con issues: {N}
415
-
416
- ### Breaking changes detectados
417
- {lista: id, severity, description, N ocurrencias, confidence}
418
- {o: "Ninguno detectado"}
419
-
420
- ### Matches de baja confianza — revisar manualmente
421
- {lista con file:line + razón | "Ninguno"}
422
-
423
- ### Scripts de verificación
424
- build: sí/no | lint: sí/no | test: sí/no | test:ci: sí/no | typecheck: sí/no
425
-
426
- ### Artefactos aspec generados
427
- - proposal.md ✅
428
- - specs/{LIBRARY_SLUG}{TARGET_VERSION}.md ✅
429
- - tasks.md ✅ ({N} tareas en 6 fases)
430
- - design.md ✅
431
-
432
- Para implementar: /cleto-apply {CHANGE_NAME}
332
+ ## Change created: {CHANGE_NAME}
333
+ Library: {LIBRARY} {CURRENT_VERSION} → v{TARGET_VERSION}
334
+ Docs: {URL(s) consulted | "None found — VERSION_PATTERNS only"}
335
+ Patterns: {N} version (high confidence) + {N} semantic (from docs)
336
+ Analysis: {source_files_scanned} source, {test_files_scanned} tests, {config_files_scanned} config | {total_matches} matches
337
+ Affected: {N} package.json, {N} config, {N} code, {N} test files
338
+ Breaking changes: {list id/severity/description/N occurrences/confidence | "None detected"}
339
+ Low confidence — review manually: {file:line + reason | "None"}
340
+ Scripts: build: yes/no | lint: yes/no | test: yes/no | test:ci: yes/no | typecheck: yes/no
341
+ Artifacts: proposal.md ✅ | specs/{LIBRARY_SLUG}{TARGET_VERSION}.md ✅ | tasks.md ✅ ({N} tasks, 6 phases) | design.md ✅
342
+ Implement: /cleto-apply {CHANGE_NAME}
433
343
  ```
434
344
 
435
345
  ---
436
346
 
437
347
  ## Guardrails
438
348
 
439
- Este skill solo genera artefactos aspec — no modifica ningún archivo del repo.
440
- Todo cambio real lo ejecuta el desarrollador con `/cleto-apply`, que tiene su propio
441
- ciclo de revisión. Modificar el repo desde este skill saltearía ese control.
349
+ Generates aspec artifacts only — never edits repo files. Real changes run via `/cleto-apply`
350
+ (own review cycle); editing here would bypass it.
442
351
 
443
- - No tocar archivos fuera de `aspec/changes/{CHANGE_NAME}/`
444
- - Los `VERSION_PATTERNS[]` siempre se aplican, con o sin documentación oficial
445
- - Si no hay doc disponible, documentarlo en proposal y continuar con el escaneo
446
- - Si el change ya existe, avisar antes de cualquier acción
447
- - Reportar siempre cobertura del escaneo y patterns utilizados
352
+ - Do not touch files outside `aspec/changes/{CHANGE_NAME}/`
353
+ - `VERSION_PATTERNS[]` always apply, with or without official docs
354
+ - No docs → document it in proposal and continue scanning
355
+ - Change already exists → warn before any action
356
+ - Always report scan coverage and patterns used