@anhth2/spec-driven-dev-plugin 0.5.0 → 0.7.0
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/ARCHITECTURE.md +1 -1
- package/bin/index.js +184 -15
- package/commands/debug.md +196 -10
- package/commands/debug.tmpl +170 -6
- package/commands/define-product.md +31 -5
- package/commands/define-product.tmpl +5 -1
- package/commands/fix-bug.md +74 -10
- package/commands/fix-bug.tmpl +48 -6
- package/commands/generate-bdd.md +49 -8
- package/commands/generate-bdd.tmpl +23 -4
- package/commands/generate-code.md +109 -18
- package/commands/generate-code.tmpl +83 -14
- package/commands/generate-prd.md +33 -6
- package/commands/generate-prd.tmpl +7 -2
- package/commands/generate-tech-docs.md +85 -8
- package/commands/generate-tech-docs.tmpl +59 -4
- package/commands/generate-tests.md +454 -36
- package/commands/generate-tests.tmpl +428 -32
- package/commands/refine-prd.md +39 -7
- package/commands/refine-prd.tmpl +13 -3
- package/commands/review-code.md +57 -5
- package/commands/review-code.tmpl +31 -1
- package/commands/review-context.md +41 -11
- package/commands/review-context.tmpl +15 -7
- package/commands/review-tech-docs.md +39 -8
- package/commands/review-tech-docs.tmpl +13 -4
- package/commands/run-tests.md +159 -17
- package/commands/run-tests.tmpl +133 -13
- package/commands/setup-ai-first.md +85 -9
- package/commands/setup-ai-first.tmpl +30 -8
- package/commands/smoke-test.md +191 -21
- package/commands/smoke-test.tmpl +165 -17
- package/commands/validate-traces.md +40 -7
- package/commands/validate-traces.tmpl +14 -3
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/commands/debug.md +196 -10
- package/core/commands/define-product.md +31 -5
- package/core/commands/fix-bug.md +74 -10
- package/core/commands/generate-bdd.md +49 -8
- package/core/commands/generate-code.md +109 -18
- package/core/commands/generate-prd.md +33 -6
- package/core/commands/generate-tech-docs.md +85 -8
- package/core/commands/generate-tests.md +454 -36
- package/core/commands/refine-prd.md +39 -7
- package/core/commands/review-code.md +57 -5
- package/core/commands/review-context.md +41 -11
- package/core/commands/review-tech-docs.md +39 -8
- package/core/commands/run-tests.md +159 -17
- package/core/commands/setup-ai-first.md +85 -9
- package/core/commands/smoke-test.md +191 -21
- package/core/commands/validate-traces.md +40 -7
- package/core/skills/code/SKILL.md +29 -6
- package/core/skills/debug/SKILL.md +31 -7
- package/core/skills/discovery/SKILL.md +25 -3
- package/core/skills/prd/SKILL.md +8 -6
- package/core/skills/setup-ai-first/SKILL.md +3 -2
- package/core/skills/spec/SKILL.md +7 -5
- package/core/skills/test/SKILL.md +54 -9
- package/core/steps/context-loader.md +22 -1
- package/core/steps/gate.md +1 -1
- package/core/steps/report-footer.md +3 -2
- package/core/steps/spawn-agent.md +3 -1
- package/package.json +1 -1
- package/scripts/init.sh +2 -2
- package/scripts/upgrade.sh +4 -4
- package/skills/code/SKILL.md +29 -6
- package/skills/debug/SKILL.md +31 -7
- package/skills/discovery/SKILL.md +25 -3
- package/skills/prd/SKILL.md +8 -6
- package/skills/setup-ai-first/SKILL.md +3 -2
- package/skills/spec/SKILL.md +7 -5
- package/skills/test/SKILL.md +54 -9
- package/steps/context-loader.md +22 -1
- package/steps/gate.md +1 -1
- package/steps/report-footer.md +3 -2
- package/steps/spawn-agent.md +3 -1
|
@@ -5,15 +5,17 @@ Walk the user through a one-time setup that creates all required directories, in
|
|
|
5
5
|
## Gate
|
|
6
6
|
{{include:steps/gate.md}}
|
|
7
7
|
|
|
8
|
-
*Note: For this command, there is no input file
|
|
8
|
+
*Note: For this command — **skip Gate Steps 1, 2, and 3** (there is no input file and no project context yet). Only run Step 0-B (model check). The project root is the **current working directory**. Proceed directly to the Precondition Check below.*
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
## Precondition Check
|
|
13
13
|
|
|
14
14
|
Check if already set up:
|
|
15
|
-
- If
|
|
16
|
-
-
|
|
15
|
+
- If `CLAUDE.md` **and** `.agent/project-context.yaml` both exist → ask: "This project is already initialized. Re-run setup to regenerate config files? (Y/N)"
|
|
16
|
+
- N → stop
|
|
17
|
+
- Y → continue (existing files will be preserved — each step will offer merge/skip)
|
|
18
|
+
- If only `specs/` exists or only partial setup detected → continue normally (safe to re-run)
|
|
17
19
|
|
|
18
20
|
## Step 1 — Create Directory Structure
|
|
19
21
|
|
|
@@ -25,8 +27,8 @@ Create these directories (skip if they exist):
|
|
|
25
27
|
│ ├── product-definition/
|
|
26
28
|
│ ├── prd/
|
|
27
29
|
│ ├── bdd/
|
|
30
|
+
│ ├── tech-docs/ ← technical design documents
|
|
28
31
|
│ └── domain-knowledge/ ← business dictionary & domain context
|
|
29
|
-
├── tech-docs/
|
|
30
32
|
├── .trace/
|
|
31
33
|
└── .agent/
|
|
32
34
|
└── review/
|
|
@@ -70,7 +72,7 @@ forbidden:
|
|
|
70
72
|
# §4. Traceability
|
|
71
73
|
# Every controller method must be tagged:
|
|
72
74
|
# @trace.implements={UC-ID}-{SC-ID}
|
|
73
|
-
# @trace.source=specs/bdd/{domain}/{UC-ID}.feature
|
|
75
|
+
# @trace.source=specs/bdd/{domain}/{UC-ID}.feature ← adjust if specs_dir differs in .agent/project-context.yaml
|
|
74
76
|
# Tests must be tagged:
|
|
75
77
|
# @trace.verifies={UC-ID}
|
|
76
78
|
|
|
@@ -90,7 +92,7 @@ commit_feature: "feat({{TICKET_PREFIX}}-{N}): {description}"
|
|
|
90
92
|
|
|
91
93
|
## Step 3 — Create project-context.yaml
|
|
92
94
|
|
|
93
|
-
Create `.agent/project-context.yaml` using
|
|
95
|
+
Create `.agent/project-context.yaml` using `.agent/templates/project-context.yaml` as the source template.
|
|
94
96
|
|
|
95
97
|
Copy the template and instruct: "Open `.agent/project-context.yaml` and fill in all `{{PLACEHOLDER}}` values. The `paths` section is pre-configured with sensible defaults — adjust if your project uses different directory names."
|
|
96
98
|
|
|
@@ -173,9 +175,25 @@ Create `specs/domain-knowledge/core-entities.md` if it does not exist:
|
|
|
173
175
|
|
|
174
176
|
Instruct: "Open `specs/domain-knowledge/core-entities.md` and define your key domain entities. Start with aggregate roots. This file is loaded by every AI command — good definitions here save significant back-and-forth during code generation."
|
|
175
177
|
|
|
176
|
-
## Step 6 —
|
|
178
|
+
## Step 6 — Install VS Code Extension (Recommended)
|
|
179
|
+
|
|
180
|
+
Recommend the user install the **Spec Driven Dev** VS Code extension — it provides Review Board + Living Documentation panels that integrate with this workflow.
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
code --install-extension edupia-team.spec-driven-dev-team
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Or: VS Code → `Ctrl+Shift+P` → **"Extensions: Install from Marketplace"** → search **Spec Driven Dev**.
|
|
187
|
+
|
|
188
|
+
**What it does:**
|
|
189
|
+
- 📋 **Review Board** — visual UI to review findings from `/refine-prd`, `/review-context`, `/review-tech-docs`
|
|
190
|
+
- 📊 **Living Documentation** — traceability dashboard driven by `.trace/*.tsv`
|
|
191
|
+
|
|
192
|
+
## Step 7 — Verify
|
|
177
193
|
|
|
178
194
|
- [ ] `specs/` exists
|
|
195
|
+
- [ ] `specs/bdd/` exists
|
|
196
|
+
- [ ] `specs/tech-docs/` exists
|
|
179
197
|
- [ ] `specs/domain-knowledge/` exists
|
|
180
198
|
- [ ] `.trace/` exists
|
|
181
199
|
- [ ] `.agent/project-context.yaml` exists
|
|
@@ -185,6 +203,8 @@ Instruct: "Open `specs/domain-knowledge/core-entities.md` and define your key do
|
|
|
185
203
|
|
|
186
204
|
## Output
|
|
187
205
|
|
|
206
|
+
{{include:steps/report-footer.md}}
|
|
207
|
+
|
|
188
208
|
```
|
|
189
209
|
/setup-ai-first Complete ✅
|
|
190
210
|
Next:
|
|
@@ -193,5 +213,7 @@ Next:
|
|
|
193
213
|
3. Fill specs/domain-knowledge/business-dictionary.md ← terminology rules
|
|
194
214
|
4. Fill specs/domain-knowledge/core-entities.md ← entity glossary for code gen
|
|
195
215
|
5. git add and commit those 4 files
|
|
196
|
-
6.
|
|
216
|
+
6. Install VS Code extension (if not yet installed):
|
|
217
|
+
code --install-extension edupia-team.spec-driven-dev-team
|
|
218
|
+
7. /define-product to start your first feature
|
|
197
219
|
```
|
package/commands/smoke-test.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# /smoke-test — Test Live
|
|
1
|
+
# /smoke-test — Smoke Test Live Service or App
|
|
2
2
|
|
|
3
|
-
Use when service is **already running**. Different from `/run-tests` (no live server needed).
|
|
3
|
+
Use when service/app is **already running**. Different from `/run-tests` (no live server needed).
|
|
4
4
|
|
|
5
5
|
## Gate
|
|
6
6
|
# Gate — Universal Entry Procedure
|
|
@@ -33,7 +33,7 @@ Display and wait for response:
|
|
|
33
33
|
```
|
|
34
34
|
⚙️ MODEL CHECK
|
|
35
35
|
──────────────────────────────────────────────────────────────────
|
|
36
|
-
Recommended : claude-opus-4
|
|
36
|
+
Recommended : claude-opus-4 (or latest Opus model)
|
|
37
37
|
Why needed : Spec analysis, architecture review, code generation
|
|
38
38
|
require deep reasoning. Smaller models miss edge cases.
|
|
39
39
|
|
|
@@ -86,7 +86,7 @@ Wait for explicit "Y" or "N" from the user before continuing.
|
|
|
86
86
|
- "N" → stop and ask what the user wants to change.
|
|
87
87
|
|
|
88
88
|
|
|
89
|
-
*Note: For this command, the target in Step 1 is a UC-ID from `$ARGUMENTS`. Context loading provides `conventions.service_run
|
|
89
|
+
*Note: For this command, the target in Step 1 is a UC-ID from `$ARGUMENTS`. Context loading provides `conventions.service_run`, port information, and `tech_stack.module`.*
|
|
90
90
|
|
|
91
91
|
## Context
|
|
92
92
|
# Context Loader — Load All Project Context
|
|
@@ -142,7 +142,7 @@ If `paths` section is absent, use these defaults:
|
|
|
142
142
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
143
143
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
144
144
|
- `core_entities` = `specs/domain-knowledge/core-entities.md`
|
|
145
|
-
- `tech_docs_dir` = `tech-docs`
|
|
145
|
+
- `tech_docs_dir` = `specs/tech-docs`
|
|
146
146
|
- `trace_dir` = `.trace`
|
|
147
147
|
|
|
148
148
|
If `tech_stack.module` is set, also load `.agent/modules/{module}/stack-profile.yaml` if it exists.
|
|
@@ -219,6 +219,26 @@ If the file does not exist → skip silently.
|
|
|
219
219
|
|
|
220
220
|
---
|
|
221
221
|
|
|
222
|
+
## Step 6.5 — [PLATFORM] Derive active_module and platform_type
|
|
223
|
+
|
|
224
|
+
Using `tech_stack.module` loaded in Step 1, derive and store two variables for use by all downstream commands:
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
| `platform_type` | Modules |
|
|
231
|
+
|---|---|
|
|
232
|
+
| `backend` | `java-spring`, `golang`, `dotnet`, `php-laravel`, `context-engineering` |
|
|
233
|
+
| `web-frontend` | `react`, `nextjs`, `vue`, `nuxt`, `angular` |
|
|
234
|
+
| `mobile` | `flutter`, `react-native`, `ios-swiftui`, `android-compose` |
|
|
235
|
+
|
|
236
|
+
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
237
|
+
|
|
238
|
+
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (generate-tests, debug, fix-bug, smoke-test).
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
222
242
|
## Step 7 — [RECAP] Working Memory Recap (anti-lost-in-middle)
|
|
223
243
|
|
|
224
244
|
After loading all context, synthesize and output a compact summary block.
|
|
@@ -229,6 +249,7 @@ Output exactly this block:
|
|
|
229
249
|
```
|
|
230
250
|
[CTX LOADED]
|
|
231
251
|
Stack : {language} / {framework} / {database}
|
|
252
|
+
Platform : {active_module} ({platform_type})
|
|
232
253
|
Layers : {layer order from CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
|
|
233
254
|
Ticket : {ticket_prefix}-
|
|
234
255
|
Dict : {loaded — N canonical terms, M banned terms | missing}
|
|
@@ -256,19 +277,40 @@ Proceed to the next step of the calling command.
|
|
|
256
277
|
|
|
257
278
|
---
|
|
258
279
|
|
|
259
|
-
##
|
|
280
|
+
## Service Detection
|
|
281
|
+
|
|
282
|
+
Read `active_module` from context. Use to select the correct smoke-test approach.
|
|
283
|
+
|
|
284
|
+
| Platform | Modules |
|
|
285
|
+
|---|---|
|
|
286
|
+
| `backend` | `java-spring`, `golang`, `dotnet`, `php-laravel`, `context-engineering` |
|
|
287
|
+
| `web-frontend` | `react`, `nextjs`, `vue`, `nuxt`, `angular` |
|
|
288
|
+
| `mobile` | `flutter`, `react-native`, `ios-swiftui`, `android-compose` |
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## If `platform_type = backend`
|
|
293
|
+
|
|
294
|
+
### Phase 1 — Verify service is running
|
|
295
|
+
|
|
260
296
|
Read `conventions.service_run` from project-context.yaml to determine port.
|
|
297
|
+
|
|
261
298
|
```bash
|
|
262
|
-
|
|
299
|
+
# Try common health endpoints (use whichever applies):
|
|
300
|
+
curl -s http://localhost:{port}/health # generic / Go / Node
|
|
301
|
+
curl -s http://localhost:{port}/actuator/health # Spring Boot
|
|
302
|
+
curl -s http://localhost:{port}/ping # some frameworks
|
|
263
303
|
```
|
|
264
|
-
If not running: "Start with `{conventions.service_run}` from project root."
|
|
265
304
|
|
|
266
|
-
|
|
267
|
-
|
|
305
|
+
If not running → "Start with `{conventions.service_run}` from project root."
|
|
306
|
+
|
|
307
|
+
### Phase 2 — Identify endpoints
|
|
308
|
+
|
|
309
|
+
From UC-ID → find controller/handler with `@trace.implements={UC-ID}`.
|
|
268
310
|
List: method, path, required auth/role.
|
|
269
311
|
|
|
270
|
-
|
|
271
|
-
|
|
312
|
+
### Phase 3 — Get auth token (if needed)
|
|
313
|
+
|
|
272
314
|
```
|
|
273
315
|
Endpoint requires auth. Options:
|
|
274
316
|
1. Paste Bearer token (from Postman/DevTools)
|
|
@@ -276,10 +318,11 @@ Endpoint requires auth. Options:
|
|
|
276
318
|
3. Skip — test public endpoints only
|
|
277
319
|
```
|
|
278
320
|
|
|
279
|
-
|
|
321
|
+
### Phase 4 — Run
|
|
322
|
+
|
|
280
323
|
```bash
|
|
281
324
|
# GET
|
|
282
|
-
curl -s -X GET "http://localhost:{port}/v1/{resource}
|
|
325
|
+
curl -s -X GET "http://localhost:{port}/v1/{resource}" \
|
|
283
326
|
-H "Authorization: Bearer {token}" | {JSON_FORMATTER}
|
|
284
327
|
|
|
285
328
|
# POST
|
|
@@ -289,7 +332,6 @@ curl -s -X POST "http://localhost:{port}/v1/{resource}" \
|
|
|
289
332
|
-d '{"field1": "test_value"}'
|
|
290
333
|
```
|
|
291
334
|
|
|
292
|
-
## Interpret Results
|
|
293
335
|
| Result | Meaning |
|
|
294
336
|
|--------|---------|
|
|
295
337
|
| 200/201 + correct data | ✅ OK |
|
|
@@ -297,9 +339,131 @@ curl -s -X POST "http://localhost:{port}/v1/{resource}" \
|
|
|
297
339
|
| 400 | Wrong request body → check required fields |
|
|
298
340
|
| 401 | Token expired or wrong config |
|
|
299
341
|
| 403 | Wrong role → check auth rules |
|
|
300
|
-
| 500 | Server error →
|
|
342
|
+
| 500 | Server error → /debug |
|
|
301
343
|
| Connection refused | Service not running |
|
|
302
344
|
|
|
345
|
+
### If `active_module = context-engineering`
|
|
346
|
+
|
|
347
|
+
#### Phase 1 — Verify pipeline entry point is reachable
|
|
348
|
+
|
|
349
|
+
Run the prompt function directly with a minimal valid input:
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
# Python (pytest / script):
|
|
353
|
+
python -c "from {module}.{function} import {function}; print({function}(input='{test_input}'))"
|
|
354
|
+
|
|
355
|
+
# Or using the project test command with a smoke marker:
|
|
356
|
+
{conventions.test_command} -m smoke -v
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
#### Phase 2 — Verify output structure
|
|
360
|
+
|
|
361
|
+
Check the output conforms to the expected schema:
|
|
362
|
+
|
|
363
|
+
```
|
|
364
|
+
Expected output schema: {output fields from @trace or tech-doc}
|
|
365
|
+
Actual output: {paste output here}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
#### Phase 3 — Interpret results
|
|
369
|
+
|
|
370
|
+
| Result | Meaning |
|
|
371
|
+
|--------|---------|
|
|
372
|
+
| Output matches schema | ✅ OK |
|
|
373
|
+
| Output present but wrong format | ⚠️ Logic bug → /debug |
|
|
374
|
+
| `APIError` / `AuthenticationError` | API key invalid or service unavailable |
|
|
375
|
+
| `TokenLimitError` | Input too long — check prompt template size |
|
|
376
|
+
| Exception / traceback | Code error → /debug |
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## If `platform_type = web-frontend`
|
|
381
|
+
|
|
382
|
+
### Phase 1 — Verify dev server is running
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
# Linux / macOS:
|
|
386
|
+
curl -s -o /dev/null -w "%{http_code}" http://localhost:{port}
|
|
387
|
+
|
|
388
|
+
# Windows (cmd / PowerShell):
|
|
389
|
+
curl -s -o NUL -w "%{http_code}" http://localhost:{port}
|
|
390
|
+
|
|
391
|
+
# Should return 200. If not: start with {conventions.service_run} (e.g., npm run dev)
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Phase 2 — Run E2E smoke test
|
|
395
|
+
|
|
396
|
+
Identify E2E tool in the project (Playwright or Cypress):
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
# Playwright — run scenarios tagged with this UC:
|
|
400
|
+
npx playwright test --grep "{UC-ID}"
|
|
401
|
+
|
|
402
|
+
# Cypress:
|
|
403
|
+
npx cypress run --spec "cypress/e2e/{UC-ID}*"
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
If no E2E tests exist yet → open browser and manually verify:
|
|
407
|
+
1. Navigate to the route for this UC
|
|
408
|
+
2. Perform the main user action
|
|
409
|
+
3. Confirm the expected outcome is visible
|
|
410
|
+
|
|
411
|
+
### Phase 3 — Interpret results
|
|
412
|
+
|
|
413
|
+
| Result | Meaning |
|
|
414
|
+
|--------|---------|
|
|
415
|
+
| All E2E tests pass | ✅ OK |
|
|
416
|
+
| Assertion failed | ⚠️ Logic bug → /debug |
|
|
417
|
+
| `ERR_CONNECTION_REFUSED` | Dev server not running |
|
|
418
|
+
| API returns 4xx/5xx | Backend issue → check backend service |
|
|
419
|
+
|
|
420
|
+
---
|
|
421
|
+
|
|
422
|
+
## If `platform_type = mobile`
|
|
423
|
+
|
|
424
|
+
### Phase 1 — Verify device/emulator is ready
|
|
425
|
+
|
|
426
|
+
```bash
|
|
427
|
+
# Flutter:
|
|
428
|
+
flutter devices # list connected devices/emulators
|
|
429
|
+
flutter install # install current build on device
|
|
430
|
+
|
|
431
|
+
# React Native:
|
|
432
|
+
npx react-native run-android # build + install on connected Android
|
|
433
|
+
npx react-native run-ios # build + install on iOS simulator
|
|
434
|
+
|
|
435
|
+
# Android (Compose):
|
|
436
|
+
./gradlew installDebug # install APK on connected device/emulator
|
|
437
|
+
|
|
438
|
+
# iOS (SwiftUI):
|
|
439
|
+
# Open Xcode → select simulator → Product → Run
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### Phase 2 — Manual smoke-test checklist
|
|
443
|
+
|
|
444
|
+
For the UC under test, verify on device:
|
|
445
|
+
1. Navigate to the screen for this UC
|
|
446
|
+
2. Perform the main action from the `.feature` Scenario (`When` step)
|
|
447
|
+
3. Confirm the expected outcome is visible (`Then` step)
|
|
448
|
+
4. Check for any crash or unexpected error dialog
|
|
449
|
+
|
|
450
|
+
### Phase 3 — Capture issues if found
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
# Flutter:
|
|
454
|
+
flutter logs
|
|
455
|
+
|
|
456
|
+
# Android:
|
|
457
|
+
adb logcat -d | grep -i "error\|exception\|crash"
|
|
458
|
+
|
|
459
|
+
# iOS:
|
|
460
|
+
# Copy crash log from Xcode → Devices and Simulators → View Device Logs
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
Paste output into `/debug`.
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
303
467
|
## Output
|
|
304
468
|
|
|
305
469
|
# Report Footer — Standard Command Output Format
|
|
@@ -330,6 +494,7 @@ Suggest the logical next command based on workflow phase:
|
|
|
330
494
|
|
|
331
495
|
| Current command | Suggest next |
|
|
332
496
|
|-------------------------|-----------------------------------------------|
|
|
497
|
+
| /setup-ai-first | `/define-product` to start your first feature |
|
|
333
498
|
| /define-product | `/generate-prd {product-definition-file}` |
|
|
334
499
|
| /generate-prd | `/refine-prd {prd-file}` then `/review-context {prd-file}` |
|
|
335
500
|
| /refine-prd | Open Review Board → update PRD → `/review-context {prd-file}` |
|
|
@@ -338,13 +503,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
338
503
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
339
504
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
340
505
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
341
|
-
| /generate-code | `/generate-tests {UC-ID}`
|
|
506
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/generate-tests {UC-ID}` |
|
|
342
507
|
| /generate-tests | `/run-tests {UC-ID}` |
|
|
343
508
|
| /run-tests (passing) | `/review-code {UC-ID}` |
|
|
344
509
|
| /run-tests (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
345
510
|
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
346
511
|
| /smoke-test | Create PR and link to ticket |
|
|
347
|
-
| /validate-traces | `/generate-code {UC-ID}
|
|
512
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/generate-tests {UC-ID}`; all OK → create PR |
|
|
348
513
|
| /fix-bug | Create PR and link to ticket |
|
|
349
514
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
350
515
|
|
|
@@ -359,8 +524,13 @@ Next : {suggested command with example arguments}
|
|
|
359
524
|
|
|
360
525
|
```
|
|
361
526
|
/smoke-test Report — {UC-ID}
|
|
362
|
-
|
|
363
|
-
|
|
527
|
+
Platform: {backend | web-frontend | mobile}
|
|
528
|
+
| Endpoint / Flow | Status | Result |
|
|
529
|
+
|-----------------------|-------------|---------|
|
|
530
|
+
| {method} {path/screen}| ✅/⚠️/❌ | {notes} |
|
|
531
|
+
|
|
532
|
+
Status legend: ✅ = OK | ⚠️ = Responded but wrong data / logic bug | ❌ = Error / not running
|
|
533
|
+
|
|
364
534
|
Issues: {describe any failures}
|
|
365
|
-
Next: /debug
|
|
535
|
+
Next: /debug (paste error interactively) OR /fix-bug {TICKET_ID} OR ready to PR
|
|
366
536
|
```
|
package/commands/smoke-test.tmpl
CHANGED
|
@@ -1,30 +1,51 @@
|
|
|
1
|
-
# /smoke-test — Test Live
|
|
1
|
+
# /smoke-test — Smoke Test Live Service or App
|
|
2
2
|
|
|
3
|
-
Use when service is **already running**. Different from `/run-tests` (no live server needed).
|
|
3
|
+
Use when service/app is **already running**. Different from `/run-tests` (no live server needed).
|
|
4
4
|
|
|
5
5
|
## Gate
|
|
6
6
|
{{include:steps/gate.md}}
|
|
7
7
|
|
|
8
|
-
*Note: For this command, the target in Step 1 is a UC-ID from `$ARGUMENTS`. Context loading provides `conventions.service_run
|
|
8
|
+
*Note: For this command, the target in Step 1 is a UC-ID from `$ARGUMENTS`. Context loading provides `conventions.service_run`, port information, and `tech_stack.module`.*
|
|
9
9
|
|
|
10
10
|
## Context
|
|
11
11
|
{{include:steps/context-loader.md}}
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
##
|
|
15
|
+
## Service Detection
|
|
16
|
+
|
|
17
|
+
Read `active_module` from context. Use to select the correct smoke-test approach.
|
|
18
|
+
|
|
19
|
+
| Platform | Modules |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `backend` | `java-spring`, `golang`, `dotnet`, `php-laravel`, `context-engineering` |
|
|
22
|
+
| `web-frontend` | `react`, `nextjs`, `vue`, `nuxt`, `angular` |
|
|
23
|
+
| `mobile` | `flutter`, `react-native`, `ios-swiftui`, `android-compose` |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## If `platform_type = backend`
|
|
28
|
+
|
|
29
|
+
### Phase 1 — Verify service is running
|
|
30
|
+
|
|
16
31
|
Read `conventions.service_run` from project-context.yaml to determine port.
|
|
32
|
+
|
|
17
33
|
```bash
|
|
18
|
-
|
|
34
|
+
# Try common health endpoints (use whichever applies):
|
|
35
|
+
curl -s http://localhost:{port}/health # generic / Go / Node
|
|
36
|
+
curl -s http://localhost:{port}/actuator/health # Spring Boot
|
|
37
|
+
curl -s http://localhost:{port}/ping # some frameworks
|
|
19
38
|
```
|
|
20
|
-
If not running: "Start with `{conventions.service_run}` from project root."
|
|
21
39
|
|
|
22
|
-
|
|
23
|
-
|
|
40
|
+
If not running → "Start with `{conventions.service_run}` from project root."
|
|
41
|
+
|
|
42
|
+
### Phase 2 — Identify endpoints
|
|
43
|
+
|
|
44
|
+
From UC-ID → find controller/handler with `@trace.implements={UC-ID}`.
|
|
24
45
|
List: method, path, required auth/role.
|
|
25
46
|
|
|
26
|
-
|
|
27
|
-
|
|
47
|
+
### Phase 3 — Get auth token (if needed)
|
|
48
|
+
|
|
28
49
|
```
|
|
29
50
|
Endpoint requires auth. Options:
|
|
30
51
|
1. Paste Bearer token (from Postman/DevTools)
|
|
@@ -32,10 +53,11 @@ Endpoint requires auth. Options:
|
|
|
32
53
|
3. Skip — test public endpoints only
|
|
33
54
|
```
|
|
34
55
|
|
|
35
|
-
|
|
56
|
+
### Phase 4 — Run
|
|
57
|
+
|
|
36
58
|
```bash
|
|
37
59
|
# GET
|
|
38
|
-
curl -s -X GET "http://localhost:{port}/v1/{resource}
|
|
60
|
+
curl -s -X GET "http://localhost:{port}/v1/{resource}" \
|
|
39
61
|
-H "Authorization: Bearer {token}" | {JSON_FORMATTER}
|
|
40
62
|
|
|
41
63
|
# POST
|
|
@@ -45,7 +67,6 @@ curl -s -X POST "http://localhost:{port}/v1/{resource}" \
|
|
|
45
67
|
-d '{"field1": "test_value"}'
|
|
46
68
|
```
|
|
47
69
|
|
|
48
|
-
## Interpret Results
|
|
49
70
|
| Result | Meaning |
|
|
50
71
|
|--------|---------|
|
|
51
72
|
| 200/201 + correct data | ✅ OK |
|
|
@@ -53,17 +74,144 @@ curl -s -X POST "http://localhost:{port}/v1/{resource}" \
|
|
|
53
74
|
| 400 | Wrong request body → check required fields |
|
|
54
75
|
| 401 | Token expired or wrong config |
|
|
55
76
|
| 403 | Wrong role → check auth rules |
|
|
56
|
-
| 500 | Server error →
|
|
77
|
+
| 500 | Server error → /debug |
|
|
57
78
|
| Connection refused | Service not running |
|
|
58
79
|
|
|
80
|
+
### If `active_module = context-engineering`
|
|
81
|
+
|
|
82
|
+
#### Phase 1 — Verify pipeline entry point is reachable
|
|
83
|
+
|
|
84
|
+
Run the prompt function directly with a minimal valid input:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Python (pytest / script):
|
|
88
|
+
python -c "from {module}.{function} import {function}; print({function}(input='{test_input}'))"
|
|
89
|
+
|
|
90
|
+
# Or using the project test command with a smoke marker:
|
|
91
|
+
{conventions.test_command} -m smoke -v
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### Phase 2 — Verify output structure
|
|
95
|
+
|
|
96
|
+
Check the output conforms to the expected schema:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Expected output schema: {output fields from @trace or tech-doc}
|
|
100
|
+
Actual output: {paste output here}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### Phase 3 — Interpret results
|
|
104
|
+
|
|
105
|
+
| Result | Meaning |
|
|
106
|
+
|--------|---------|
|
|
107
|
+
| Output matches schema | ✅ OK |
|
|
108
|
+
| Output present but wrong format | ⚠️ Logic bug → /debug |
|
|
109
|
+
| `APIError` / `AuthenticationError` | API key invalid or service unavailable |
|
|
110
|
+
| `TokenLimitError` | Input too long — check prompt template size |
|
|
111
|
+
| Exception / traceback | Code error → /debug |
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## If `platform_type = web-frontend`
|
|
116
|
+
|
|
117
|
+
### Phase 1 — Verify dev server is running
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Linux / macOS:
|
|
121
|
+
curl -s -o /dev/null -w "%{http_code}" http://localhost:{port}
|
|
122
|
+
|
|
123
|
+
# Windows (cmd / PowerShell):
|
|
124
|
+
curl -s -o NUL -w "%{http_code}" http://localhost:{port}
|
|
125
|
+
|
|
126
|
+
# Should return 200. If not: start with {conventions.service_run} (e.g., npm run dev)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Phase 2 — Run E2E smoke test
|
|
130
|
+
|
|
131
|
+
Identify E2E tool in the project (Playwright or Cypress):
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# Playwright — run scenarios tagged with this UC:
|
|
135
|
+
npx playwright test --grep "{UC-ID}"
|
|
136
|
+
|
|
137
|
+
# Cypress:
|
|
138
|
+
npx cypress run --spec "cypress/e2e/{UC-ID}*"
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
If no E2E tests exist yet → open browser and manually verify:
|
|
142
|
+
1. Navigate to the route for this UC
|
|
143
|
+
2. Perform the main user action
|
|
144
|
+
3. Confirm the expected outcome is visible
|
|
145
|
+
|
|
146
|
+
### Phase 3 — Interpret results
|
|
147
|
+
|
|
148
|
+
| Result | Meaning |
|
|
149
|
+
|--------|---------|
|
|
150
|
+
| All E2E tests pass | ✅ OK |
|
|
151
|
+
| Assertion failed | ⚠️ Logic bug → /debug |
|
|
152
|
+
| `ERR_CONNECTION_REFUSED` | Dev server not running |
|
|
153
|
+
| API returns 4xx/5xx | Backend issue → check backend service |
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## If `platform_type = mobile`
|
|
158
|
+
|
|
159
|
+
### Phase 1 — Verify device/emulator is ready
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Flutter:
|
|
163
|
+
flutter devices # list connected devices/emulators
|
|
164
|
+
flutter install # install current build on device
|
|
165
|
+
|
|
166
|
+
# React Native:
|
|
167
|
+
npx react-native run-android # build + install on connected Android
|
|
168
|
+
npx react-native run-ios # build + install on iOS simulator
|
|
169
|
+
|
|
170
|
+
# Android (Compose):
|
|
171
|
+
./gradlew installDebug # install APK on connected device/emulator
|
|
172
|
+
|
|
173
|
+
# iOS (SwiftUI):
|
|
174
|
+
# Open Xcode → select simulator → Product → Run
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Phase 2 — Manual smoke-test checklist
|
|
178
|
+
|
|
179
|
+
For the UC under test, verify on device:
|
|
180
|
+
1. Navigate to the screen for this UC
|
|
181
|
+
2. Perform the main action from the `.feature` Scenario (`When` step)
|
|
182
|
+
3. Confirm the expected outcome is visible (`Then` step)
|
|
183
|
+
4. Check for any crash or unexpected error dialog
|
|
184
|
+
|
|
185
|
+
### Phase 3 — Capture issues if found
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Flutter:
|
|
189
|
+
flutter logs
|
|
190
|
+
|
|
191
|
+
# Android:
|
|
192
|
+
adb logcat -d | grep -i "error\|exception\|crash"
|
|
193
|
+
|
|
194
|
+
# iOS:
|
|
195
|
+
# Copy crash log from Xcode → Devices and Simulators → View Device Logs
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Paste output into `/debug`.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
59
202
|
## Output
|
|
60
203
|
|
|
61
204
|
{{include:steps/report-footer.md}}
|
|
62
205
|
|
|
63
206
|
```
|
|
64
207
|
/smoke-test Report — {UC-ID}
|
|
65
|
-
|
|
66
|
-
|
|
208
|
+
Platform: {backend | web-frontend | mobile}
|
|
209
|
+
| Endpoint / Flow | Status | Result |
|
|
210
|
+
|-----------------------|-------------|---------|
|
|
211
|
+
| {method} {path/screen}| ✅/⚠️/❌ | {notes} |
|
|
212
|
+
|
|
213
|
+
Status legend: ✅ = OK | ⚠️ = Responded but wrong data / logic bug | ❌ = Error / not running
|
|
214
|
+
|
|
67
215
|
Issues: {describe any failures}
|
|
68
|
-
Next: /debug
|
|
216
|
+
Next: /debug (paste error interactively) OR /fix-bug {TICKET_ID} OR ready to PR
|
|
69
217
|
```
|