@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
|
@@ -19,58 +19,42 @@ metadata:
|
|
|
19
19
|
|
|
20
20
|
# ancleto-upgrade
|
|
21
21
|
|
|
22
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
**
|
|
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
|
-
##
|
|
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
|
-
|
|
35
|
+
Extract from the user message:
|
|
56
36
|
|
|
57
|
-
-
|
|
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
|
-
|
|
44
|
+
### 1.1 Optional docs URL
|
|
60
45
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
##
|
|
52
|
+
## Step 2 — Detect current version in the repo
|
|
68
53
|
|
|
69
|
-
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
80
|
+
Build `SEARCH_PATTERNS[]` (what to search, why) from the real migration docs, never static.
|
|
102
81
|
|
|
103
|
-
|
|
82
|
+
### 3a. Fetch the docs
|
|
104
83
|
|
|
105
|
-
|
|
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
|
-
-
|
|
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
|
-
|
|
116
|
-
|
|
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.
|
|
93
|
+
### 3b. Extract breaking changes and build SEARCH_PATTERNS[]
|
|
119
94
|
|
|
120
|
-
|
|
95
|
+
One entry per breaking change:
|
|
121
96
|
|
|
122
97
|
```
|
|
123
98
|
{
|
|
124
|
-
id: string
|
|
125
|
-
source: URL
|
|
126
|
-
description:
|
|
127
|
-
fix:
|
|
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
|
|
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
|
-
|
|
109
|
+
Derive patterns from docs:
|
|
135
110
|
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
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.
|
|
116
|
+
### 3c. Build VERSION_PATTERNS[] automatically
|
|
142
117
|
|
|
143
|
-
|
|
144
|
-
|
|
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
|
-
|
|
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 #
|
|
130
|
+
20.x, v20 # generic references
|
|
159
131
|
```
|
|
160
132
|
|
|
161
|
-
**
|
|
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 #
|
|
166
|
-
"@middy/": "^6" #
|
|
137
|
+
@middy/core@6, middy@6 # inline references
|
|
138
|
+
"@middy/": "^6" # all scoped packages
|
|
167
139
|
```
|
|
168
140
|
|
|
169
|
-
|
|
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
|
-
##
|
|
143
|
+
## Step 4 — Scan the repo
|
|
173
144
|
|
|
174
|
-
|
|
175
|
-
escanear exhaustivamente. Ejecutar todo en paralelo.
|
|
145
|
+
Run both Step 3 pattern sets exhaustively, in parallel.
|
|
176
146
|
|
|
177
|
-
### 4a.
|
|
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
|
-
|
|
159
|
+
Replace with the real VERSION_PATTERNS[]. Record:
|
|
190
160
|
`{file, line_number, line_content, pattern_matched, confidence: "high"}`
|
|
191
161
|
|
|
192
|
-
### 4b.
|
|
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
|
-
|
|
172
|
+
Replace with SEARCH_PATTERNS[]. Record:
|
|
203
173
|
`{file, line_number, line_content, pattern_matched, break_id, confidence: "medium"}`
|
|
204
174
|
|
|
205
|
-
### 4c.
|
|
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
|
-
|
|
215
|
-
|
|
184
|
+
Verify Step 3 config breaking changes per file (e.g. missing `transformIgnorePatterns`,
|
|
185
|
+
`moduleResolution`).
|
|
216
186
|
|
|
217
|
-
### 4d.
|
|
187
|
+
### 4d. Per-category registry (mandatory)
|
|
218
188
|
|
|
219
|
-
|
|
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
|
|
191
|
+
### 4d.1 Root package.json
|
|
223
192
|
|
|
224
193
|
```bash
|
|
225
194
|
cat package.json
|
|
226
195
|
```
|
|
227
196
|
|
|
228
|
-
|
|
229
|
-
|
|
197
|
+
Extract LIBRARY dependencies (current version), scripts (`build`, `lint`, `test`, `test:ci`,
|
|
198
|
+
`typecheck`), `workspaces`.
|
|
230
199
|
|
|
231
|
-
### 4d.2
|
|
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
|
-
|
|
209
|
+
Per file: LIBRARY dependencies, `engines.node`, `name`.
|
|
241
210
|
|
|
242
|
-
### 4d.3
|
|
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
|
-
|
|
218
|
+
Look for `nodeVersion`, `node-version`, Node base image.
|
|
250
219
|
|
|
251
|
-
### 4d.4
|
|
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
|
-
|
|
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
|
-
|
|
242
|
+
Look for `"Runtime"`.
|
|
274
243
|
|
|
275
|
-
### 4d.7 Build, tests
|
|
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
|
-
|
|
285
|
-
|
|
286
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
307
|
-
|
|
308
|
-
-
|
|
309
|
-
-
|
|
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
|
-
|
|
320
|
-
|
|
321
|
-
Regla de cobertura obligatoria:
|
|
281
|
+
Same as 4d.8 with both pattern sets.
|
|
322
282
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
345
|
-
`file`, `description`, `current_value`, `target_value`, `source`
|
|
291
|
+
Build from all Step 4 matches:
|
|
346
292
|
|
|
347
|
-
|
|
348
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
-
##
|
|
314
|
+
## Step 7 — Write the aspec artifacts
|
|
372
315
|
|
|
373
|
-
|
|
374
|
-
|
|
316
|
+
Read `references/templates.md`; write in order `proposal.md`,
|
|
317
|
+
`specs/{LIBRARY_SLUG}{TARGET_VERSION}.md`, `tasks.md`, `design.md`.
|
|
375
318
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
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
|
-
##
|
|
329
|
+
## Step 8 — Show the final summary
|
|
394
330
|
|
|
395
331
|
```
|
|
396
|
-
## Change
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
{
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
{
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
-
|
|
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
|
-
|
|
440
|
-
|
|
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
|
-
-
|
|
444
|
-
-
|
|
445
|
-
-
|
|
446
|
-
-
|
|
447
|
-
-
|
|
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
|