@anhth2/spec-driven-dev-plugin 0.9.2 → 0.11.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/commands/debug.md +50 -20
- package/commands/define-product.md +49 -19
- package/commands/{generate-tests.md → dev-gen-test.md} +85 -23
- package/commands/{generate-tests.tmpl → dev-gen-test.tmpl} +18 -4
- package/{core/commands/run-tests.md → commands/dev-run-test.md} +102 -21
- package/commands/{run-tests.tmpl → dev-run-test.tmpl} +35 -2
- package/commands/{smoke-test.md → dev-smoke-test.md} +54 -24
- package/commands/{smoke-test.tmpl → dev-smoke-test.tmpl} +5 -5
- package/commands/fix-bug.md +50 -20
- package/commands/generate-bdd.md +78 -21
- package/commands/generate-bdd.tmpl +11 -2
- package/commands/generate-code.md +123 -23
- package/commands/generate-code.tmpl +56 -4
- package/commands/generate-design-spec.md +142 -47
- package/commands/generate-design-spec.tmpl +93 -28
- package/commands/generate-prd.md +49 -19
- package/commands/generate-spec-manifest.md +49 -19
- package/commands/generate-tech-docs.md +50 -20
- package/commands/generate-tech-docs.tmpl +1 -1
- package/commands/learn.md +50 -20
- package/commands/propose-scenario.md +50 -20
- package/commands/propose-scenario.tmpl +1 -1
- package/commands/qc-analyze.md +514 -0
- package/commands/qc-analyze.tmpl +71 -0
- package/commands/qc-design-test.md +510 -0
- package/commands/qc-design-test.tmpl +67 -0
- package/commands/qc-plan.md +492 -0
- package/commands/qc-plan.tmpl +49 -0
- package/commands/qc-report.md +491 -0
- package/commands/qc-report.tmpl +48 -0
- package/commands/qc-review.md +496 -0
- package/commands/qc-review.tmpl +53 -0
- package/commands/qc-run-test.md +538 -0
- package/commands/qc-run-test.tmpl +77 -0
- package/commands/refine-prd.md +203 -24
- package/commands/refine-prd.tmpl +16 -5
- package/commands/report-bug.md +49 -19
- package/commands/review-code.md +51 -21
- package/commands/review-code.tmpl +1 -1
- package/commands/review-context.md +198 -20
- package/commands/review-context.tmpl +11 -1
- package/commands/review-tech-docs.md +49 -19
- package/commands/setup-ai-first.md +14 -7
- package/commands/sync.md +30 -20
- package/commands/sync.tmpl +16 -13
- package/commands/update-framework.md +14 -7
- package/commands/validate-traces.md +106 -45
- package/commands/validate-traces.tmpl +57 -26
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/commands/debug.md +50 -20
- package/core/commands/define-product.md +49 -19
- package/core/commands/{generate-tests.md → dev-gen-test.md} +85 -23
- package/{commands/run-tests.md → core/commands/dev-run-test.md} +102 -21
- package/core/commands/{smoke-test.md → dev-smoke-test.md} +54 -24
- package/core/commands/fix-bug.md +50 -20
- package/core/commands/generate-bdd.md +78 -21
- package/core/commands/generate-code.md +123 -23
- package/core/commands/generate-design-spec.md +142 -47
- package/core/commands/generate-prd.md +49 -19
- package/core/commands/generate-spec-manifest.md +49 -19
- package/core/commands/generate-tech-docs.md +50 -20
- package/core/commands/learn.md +50 -20
- package/core/commands/propose-scenario.md +50 -20
- package/core/commands/qc-analyze.md +514 -0
- package/core/commands/qc-design-test.md +510 -0
- package/core/commands/qc-plan.md +492 -0
- package/core/commands/qc-report.md +491 -0
- package/core/commands/qc-review.md +496 -0
- package/core/commands/qc-run-test.md +538 -0
- package/core/commands/refine-prd.md +203 -24
- package/core/commands/report-bug.md +49 -19
- package/core/commands/review-code.md +51 -21
- package/core/commands/review-context.md +198 -20
- package/core/commands/review-tech-docs.md +49 -19
- package/core/commands/setup-ai-first.md +14 -7
- package/core/commands/sync.md +30 -20
- package/core/commands/update-framework.md +14 -7
- package/core/commands/validate-traces.md +106 -45
- package/core/modules/qc-playwright/stack-profile.yaml +65 -0
- package/core/skills/code/SKILL.md +63 -26
- package/core/skills/debug/SKILL.md +78 -34
- package/core/skills/design-spec/SKILL.md +49 -19
- package/core/skills/discovery/SKILL.md +49 -19
- package/core/skills/prd/SKILL.md +28 -14
- package/core/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
- package/core/skills/qc/qa-analyst/acceptance-criteria.md +56 -0
- package/core/skills/qc/qa-analyst/business-rules.md +55 -0
- package/core/skills/qc/qa-analyst/data-flow.md +60 -0
- package/core/skills/qc/qa-analyst/spec-breakdown.md +57 -0
- package/core/skills/qc/qa-designer/e2e/journey.md +41 -0
- package/core/skills/qc/qa-designer/exploratory/charter.md +68 -0
- package/core/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
- package/core/skills/qc/qa-designer/functional/api.md +45 -0
- package/core/skills/qc/qa-designer/functional/gui-feature.md +46 -0
- package/core/skills/qc/qa-designer/functional/gui-screen.md +52 -0
- package/core/skills/qc/qa-designer/integration/api.md +42 -0
- package/core/skills/qc/qa-designer/integration/db.md +39 -0
- package/core/skills/qc/qa-designer/integration/gui.md +40 -0
- package/core/skills/qc/qa-designer/integration/kafka.md +40 -0
- package/core/skills/qc/qa-designer/non-functional.md +40 -0
- package/core/skills/qc/qa-planner/test-plan.md +120 -0
- package/core/skills/qc/qa-reviewer/script/e2e.md +87 -0
- package/core/skills/qc/qa-reviewer/script/exploratory.md +45 -0
- package/core/skills/qc/qa-reviewer/script/functional.md +101 -0
- package/core/skills/qc/qa-reviewer/script/integration.md +91 -0
- package/core/skills/qc/qa-reviewer/script/non-functional.md +126 -0
- package/core/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
- package/core/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
- package/core/skills/qc/qa-reviewer/test-case/functional.md +76 -0
- package/core/skills/qc/qa-reviewer/test-case/integration.md +69 -0
- package/core/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
- package/core/skills/qc/qa-runner/e2e.md +49 -0
- package/core/skills/qc/qa-runner/exploratory/session.md +36 -0
- package/core/skills/qc/qa-runner/functional/api.md +35 -0
- package/core/skills/qc/qa-runner/functional/gui-feature.md +51 -0
- package/core/skills/qc/qa-runner/functional/gui-screen.md +55 -0
- package/core/skills/qc/qa-runner/integration.md +47 -0
- package/core/skills/qc/qa-runner/non-functional.md +49 -0
- package/core/skills/qc/qa-runner/report/report.md +37 -0
- package/core/skills/setup-ai-first/SKILL.md +14 -7
- package/core/skills/spec/SKILL.md +28 -14
- package/core/skills/test/SKILL.md +121 -54
- package/core/steps/capture-lesson.md +1 -1
- package/core/steps/context-loader.md +35 -12
- package/core/steps/report-footer.md +14 -7
- package/core/steps/review-fanout.md +138 -0
- package/core/steps/spawn-agent.md +1 -1
- package/core/steps/trace-mirror.md +18 -0
- package/core/templates/design-spec.template.md +16 -8
- package/core/templates/project-context.yaml +8 -0
- package/docs/01-getting-started/README.md +19 -0
- package/docs/01-getting-started/core-concepts.md +102 -0
- package/docs/01-getting-started/installation.md +154 -0
- package/docs/01-getting-started/quickstart.md +85 -0
- package/docs/02-guides/README.md +27 -0
- package/docs/02-guides/developer/README.md +46 -0
- package/docs/02-guides/developer/bdd-and-trace.md +123 -0
- package/docs/02-guides/developer/commands.md +76 -0
- package/docs/02-guides/developer/pr-checklist.md +15 -0
- package/docs/02-guides/developer/scenarios.md +448 -0
- package/docs/02-guides/developer/workflow.md +59 -0
- package/docs/02-guides/product-owner/README.md +77 -0
- package/docs/02-guides/product-owner/commands.md +30 -0
- package/docs/02-guides/product-owner/handoff-checklist.md +42 -0
- package/docs/02-guides/product-owner/prd-writing-rules.md +45 -0
- package/docs/02-guides/product-owner/scenarios.md +357 -0
- package/docs/02-guides/qc-automation.md +92 -0
- package/docs/02-guides/tester/README.md +72 -0
- package/docs/02-guides/tester/bug-reporting.md +117 -0
- package/docs/02-guides/tester/reading-specs.md +79 -0
- package/docs/02-guides/tester/scenarios.md +186 -0
- package/docs/02-guides/tester/spec-manifest.md +124 -0
- package/docs/02-guides/tester/test-checklist.md +31 -0
- package/docs/02-guides/tester/workflow.md +79 -0
- package/docs/03-concepts/README.md +19 -0
- package/docs/03-concepts/architecture.md +243 -0
- package/docs/03-concepts/pipeline.md +249 -0
- package/docs/03-concepts/traceability.md +148 -0
- package/docs/04-operations/README.md +33 -0
- package/docs/04-operations/bug-flow.md +321 -0
- package/docs/04-operations/publishing.md +137 -0
- package/docs/04-operations/sync-and-update.md +328 -0
- package/docs/05-reference/README.md +29 -0
- package/docs/05-reference/commands.md +229 -0
- package/docs/05-reference/modules.md +110 -0
- package/docs/05-reference/trace-schema.md +146 -0
- package/docs/README.md +51 -0
- package/modules/qc-playwright/stack-profile.yaml +65 -0
- package/package.json +2 -2
- package/skills/code/SKILL.md +63 -26
- package/skills/debug/SKILL.md +78 -34
- package/skills/debug/SKILL.tmpl +1 -1
- package/skills/design-spec/SKILL.md +49 -19
- package/skills/discovery/SKILL.md +49 -19
- package/skills/prd/SKILL.md +28 -14
- package/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
- package/skills/qc/qa-analyst/acceptance-criteria.md +56 -0
- package/skills/qc/qa-analyst/business-rules.md +55 -0
- package/skills/qc/qa-analyst/data-flow.md +60 -0
- package/skills/qc/qa-analyst/spec-breakdown.md +57 -0
- package/skills/qc/qa-designer/e2e/journey.md +41 -0
- package/skills/qc/qa-designer/exploratory/charter.md +68 -0
- package/skills/qc/qa-designer/exploratory/explore-to-functional.md +43 -0
- package/skills/qc/qa-designer/functional/api.md +45 -0
- package/skills/qc/qa-designer/functional/gui-feature.md +46 -0
- package/skills/qc/qa-designer/functional/gui-screen.md +52 -0
- package/skills/qc/qa-designer/integration/api.md +42 -0
- package/skills/qc/qa-designer/integration/db.md +39 -0
- package/skills/qc/qa-designer/integration/gui.md +40 -0
- package/skills/qc/qa-designer/integration/kafka.md +40 -0
- package/skills/qc/qa-designer/non-functional.md +40 -0
- package/skills/qc/qa-planner/test-plan.md +120 -0
- package/skills/qc/qa-reviewer/script/e2e.md +87 -0
- package/skills/qc/qa-reviewer/script/exploratory.md +45 -0
- package/skills/qc/qa-reviewer/script/functional.md +101 -0
- package/skills/qc/qa-reviewer/script/integration.md +91 -0
- package/skills/qc/qa-reviewer/script/non-functional.md +126 -0
- package/skills/qc/qa-reviewer/test-case/e2e.md +73 -0
- package/skills/qc/qa-reviewer/test-case/exploratory.md +43 -0
- package/skills/qc/qa-reviewer/test-case/functional.md +76 -0
- package/skills/qc/qa-reviewer/test-case/integration.md +69 -0
- package/skills/qc/qa-reviewer/test-case/non-functional.md +73 -0
- package/skills/qc/qa-runner/e2e.md +49 -0
- package/skills/qc/qa-runner/exploratory/session.md +36 -0
- package/skills/qc/qa-runner/functional/api.md +35 -0
- package/skills/qc/qa-runner/functional/gui-feature.md +51 -0
- package/skills/qc/qa-runner/functional/gui-screen.md +55 -0
- package/skills/qc/qa-runner/integration.md +47 -0
- package/skills/qc/qa-runner/non-functional.md +49 -0
- package/skills/qc/qa-runner/report/report.md +37 -0
- package/skills/setup-ai-first/SKILL.md +14 -7
- package/skills/spec/SKILL.md +28 -14
- package/skills/test/SKILL.md +121 -54
- package/skills/test/SKILL.tmpl +9 -9
- package/steps/capture-lesson.md +1 -1
- package/steps/context-loader.md +35 -12
- package/steps/report-footer.md +14 -7
- package/steps/review-fanout.md +138 -0
- package/steps/spawn-agent.md +1 -1
- package/steps/trace-mirror.md +18 -0
- package/templates/design-spec.template.md +16 -8
- package/templates/project-context.yaml +8 -0
- package/ARCHITECTURE.md +0 -247
|
@@ -170,7 +170,7 @@ If `services` section is present:
|
|
|
170
170
|
|
|
171
171
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
172
172
|
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
173
|
-
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
|
|
173
|
+
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
|
|
174
174
|
- Store `active_service` = `services.{domain}.path`
|
|
175
175
|
- Store `active_service_module` = `services.{domain}.module`
|
|
176
176
|
- If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
|
|
@@ -182,7 +182,7 @@ If `services` section is present:
|
|
|
182
182
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
183
183
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
184
184
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
185
|
-
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **
|
|
185
|
+
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
|
|
186
186
|
- Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
|
|
187
187
|
- Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
|
|
188
188
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
@@ -213,7 +213,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
213
213
|
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
|
|
214
214
|
|
|
215
215
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
216
|
-
- Shell commands (`/run-
|
|
216
|
+
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
217
217
|
- File write operations (test files, trace TSVs) use paths **relative to** `service_root`
|
|
218
218
|
|
|
219
219
|
**4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
|
|
@@ -228,19 +228,41 @@ If the file does not exist → skip silently.
|
|
|
228
228
|
|
|
229
229
|
---
|
|
230
230
|
|
|
231
|
-
## Step 3 — [CRITICAL] Load CLAUDE.md
|
|
231
|
+
## Step 3 — [CRITICAL] Load CLAUDE.md (layered: root + service overlay)
|
|
232
232
|
|
|
233
233
|
*This is the highest-priority context — it defines HOW to write code and documents for this project.*
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
CLAUDE.md is loaded in **two layers** so umbrella-wide rules and service-specific
|
|
236
|
+
architecture/coding standards compose correctly. The agent always sits at the umbrella
|
|
237
|
+
root, but the implementation code lives in a service submodule with its OWN stack,
|
|
238
|
+
architecture, and conventions — so the service's CLAUDE.md must win for code generation.
|
|
239
|
+
|
|
240
|
+
**Layer 1 — [BASE] Root CLAUDE.md (umbrella-wide).**
|
|
241
|
+
Read `CLAUDE.md` at the repo root. Treat its contents as the **shared baseline** for the
|
|
242
|
+
whole umbrella — git conventions, data-protection posture, cross-cutting rules, and (in
|
|
243
|
+
single-service mode) the project's only architecture + coding standards.
|
|
244
|
+
|
|
245
|
+
**Layer 2 — [OVERLAY] Service CLAUDE.md (umbrella mode only).**
|
|
246
|
+
*Run only if `service_root` was set in Step 1.6 (i.e. a real service was routed to).*
|
|
247
|
+
Read `{service_root}/CLAUDE.md`. This file defines the architecture + coding standards of
|
|
248
|
+
the **actual stack being implemented** (e.g. `user-service` = java-spring, `web` = nextjs).
|
|
249
|
+
Overlay it on top of Layer 1: **on any conflict, the service value WINS** for architecture,
|
|
250
|
+
coding standards, and error handling. Layer-1 values that the service does not redefine
|
|
251
|
+
(e.g. git conventions, banned patterns shared org-wide) remain in effect.
|
|
252
|
+
|
|
253
|
+
From the **merged** result, extract and store:
|
|
236
254
|
|
|
237
255
|
- **§1 Project Overview** → project name, language, framework, build/test commands, domains
|
|
238
|
-
- **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules
|
|
239
|
-
- **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns
|
|
240
|
-
- **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name
|
|
241
|
-
- **§7 Git Conventions** → branch naming pattern, commit message format
|
|
256
|
+
- **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules — *service overlay wins*
|
|
257
|
+
- **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns — *service overlay wins*
|
|
258
|
+
- **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name — *service overlay wins*
|
|
259
|
+
- **§7 Git Conventions** → branch naming pattern, commit message format — *root baseline unless service redefines*
|
|
242
260
|
|
|
243
|
-
|
|
261
|
+
**Resolution rules:**
|
|
262
|
+
- If both layers exist → merge as above; record `claude_md_source = root + {service_root}`.
|
|
263
|
+
- If only the service overlay exists (no root CLAUDE.md) → use the service file alone; `claude_md_source = {service_root}`.
|
|
264
|
+
- If `service_root` is set but `{service_root}/CLAUDE.md` is **missing** → fall back to root CLAUDE.md and flag ⚠️ in the Step 7 recap (the service has no architecture/coding-standards definition — code generation will use umbrella defaults, which may be the wrong stack).
|
|
265
|
+
- If neither exists → note CLAUDE.md as missing and continue with project-context.yaml data only.
|
|
244
266
|
|
|
245
267
|
---
|
|
246
268
|
|
|
@@ -306,7 +328,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
|
306
328
|
|
|
307
329
|
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
308
330
|
|
|
309
|
-
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (
|
|
331
|
+
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
|
|
310
332
|
|
|
311
333
|
---
|
|
312
334
|
|
|
@@ -340,7 +362,8 @@ Output exactly this block:
|
|
|
340
362
|
[CTX LOADED]
|
|
341
363
|
Stack : {language} / {framework} / {database}
|
|
342
364
|
Platform : {active_module} ({platform_type})
|
|
343
|
-
Layers : {layer order from CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
|
|
365
|
+
Layers : {layer order from merged CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
|
|
366
|
+
CLAUDE.md : {root + {service_root} | {service_root} only | root only | ⚠️ service overlay MISSING — using root | missing}
|
|
344
367
|
Ticket : {ticket_prefix}-
|
|
345
368
|
Dict : {loaded — N canonical terms, M banned terms | missing}
|
|
346
369
|
Entities : {loaded — EntityA, EntityB, EntityC | missing}
|
|
@@ -387,6 +410,154 @@ Derive the output findings filename:
|
|
|
387
410
|
|
|
388
411
|
---
|
|
389
412
|
|
|
413
|
+
## Review Procedure
|
|
414
|
+
# Exhaustive Review Fan-Out + Completeness Convergence
|
|
415
|
+
|
|
416
|
+
**Why this exists:** A single-pass review never lists every issue at once — the model
|
|
417
|
+
stops at "enough" findings, so each later review round surfaces *new* problems
|
|
418
|
+
(whack-a-mole). This procedure forces the review to **converge in one command run**:
|
|
419
|
+
fan out across review dimensions in parallel, then loop a completeness critic until a
|
|
420
|
+
round produces nothing new, *before* writing the findings file.
|
|
421
|
+
|
|
422
|
+
The calling command supplies two things:
|
|
423
|
+
- **DIMENSIONS** — the list of review dimensions to fan out over
|
|
424
|
+
(`/refine-prd` → the 4 lenses; `/review-context` → the P-checks or B-checks).
|
|
425
|
+
- **FINDINGS SCHEMA** — the YAML shape each finding must follow (defined in the command).
|
|
426
|
+
|
|
427
|
+
> **Sub-agent mode bypass:** If Gate Step 0 set `_agent_mode: true`, this whole
|
|
428
|
+
> procedure is **skipped** — the orchestrator is already running one dimension/UC per
|
|
429
|
+
> sub-agent. Run the command's checks directly on the scoped section and return findings.
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## Phase 1 — Parallel dimension scan
|
|
434
|
+
|
|
435
|
+
**How many sub-agents:** the agent *count* is not the completeness lever — breadth is
|
|
436
|
+
fixed by the DIMENSION taxonomy (adding agents to the same dimension just re-finds the
|
|
437
|
+
same issues), and *depth* is owned by the Phase 2 critic loop. Pick the **fan-out
|
|
438
|
+
granularity** by target size, reusing the `steps/spawn-agent.md` thresholds:
|
|
439
|
+
|
|
440
|
+
| Target size | Granularity | Agent count |
|
|
441
|
+
|-------------|-------------|-------------|
|
|
442
|
+
| ≤ 3 UCs **and** ≤ 300 lines | one agent per DIMENSION over the whole file | = number of dimensions |
|
|
443
|
+
| > 3 UCs **or** > 300 lines | one agent per **DIMENSION × UC-scope** (UCs + a PRD-global scope), batched to fit the agent cap | `dimensions × (UCs + 1)`, capped (see below) |
|
|
444
|
+
|
|
445
|
+
The larger granularity keeps each sub-agent's context small and its scan exhaustive on a
|
|
446
|
+
single UC — which is what prevents misses on big PRDs.
|
|
447
|
+
|
|
448
|
+
> **Global (non-UC) sections — required in `DIMENSION × UC` mode.** Per-UC agents only
|
|
449
|
+
> see one UC each, so PRD-wide sections that belong to no UC (scope, success metrics,
|
|
450
|
+
> problem statement, terminology, glossary, changelog) would go unscanned. Whenever you
|
|
451
|
+
> fan out per UC, also include a **"PRD-global"** scope (the non-UC sections, findings get
|
|
452
|
+
> `uc_id: ""`) alongside the UC list. So the natural agent count is `dimensions × (UCs + 1)`.
|
|
453
|
+
> (Not needed in the whole-file mode — there each agent already sees the global sections.)
|
|
454
|
+
|
|
455
|
+
### Agent cap — batch UCs when the fan-out gets too wide
|
|
456
|
+
|
|
457
|
+
`dimensions × (UCs + 1)` can explode on large PRDs (e.g. 6 checks × (8 UCs + 1) = 54
|
|
458
|
+
agents). Cap the wave at **`AGENT_CAP = 12`** agents and batch UC scopes to fit:
|
|
459
|
+
|
|
460
|
+
1. Build the scope list = `[UC1, UC2, …, UCn, PRD-global]` (length `UCs + 1`).
|
|
461
|
+
2. Compute scopes-per-agent-bucket: `groups = max(1, floor(AGENT_CAP / dimensions))`.
|
|
462
|
+
- If `groups ≥ UCs + 1` → no batching needed, run one agent per `DIMENSION × scope`.
|
|
463
|
+
- Else split the scope list into `groups` contiguous buckets of roughly equal size
|
|
464
|
+
(keep `PRD-global` in its own bucket if it fits; otherwise append it to the last
|
|
465
|
+
bucket). Each agent then handles **one DIMENSION over one bucket of UCs**.
|
|
466
|
+
3. Resulting wave size = `dimensions × groups ≤ AGENT_CAP`.
|
|
467
|
+
|
|
468
|
+
A batched agent reviews several UCs at once — still scoped far tighter than the whole
|
|
469
|
+
file, so coverage stays high. `AGENT_CAP` is the only knob; raise it if the host allows
|
|
470
|
+
more concurrency, lower it to save tokens. Whole-file mode (≤ 3 UCs) never hits the cap.
|
|
471
|
+
|
|
472
|
+
Spawn the chosen sub-agents using the Agent tool (send them in a single message so they
|
|
473
|
+
run concurrently). Each sub-agent gets a **fresh context window** and scans its scope
|
|
474
|
+
through its **one** dimension only — deeper coverage than one session juggling every
|
|
475
|
+
dimension at once (avoids lost-in-the-middle).
|
|
476
|
+
|
|
477
|
+
Sub-agent prompt template (fill the braces):
|
|
478
|
+
|
|
479
|
+
```
|
|
480
|
+
You are a {DIMENSION_NAME} reviewer. Read the full target file at {target_file}.
|
|
481
|
+
Scope: review ONLY through the {DIMENSION_NAME} lens/check — {DIMENSION_DESCRIPTION}.
|
|
482
|
+
Be exhaustive: scan every section, every UC, every AC/BR/scenario. Do not stop early.
|
|
483
|
+
Project context (terminology, entities, architecture):
|
|
484
|
+
{slim_context — banned terms, canonical entities, layer order, domains}
|
|
485
|
+
|
|
486
|
+
Return a JSON array of findings, each:
|
|
487
|
+
{ "dimension": "{DIMENSION_NAME}", "severity": "critical|major|minor",
|
|
488
|
+
"section": "...", "uc_id": "...", "quote": "<verbatim ≤120 chars>",
|
|
489
|
+
"finding": "...", "suggestion": "...", "auto_fixable": true|false }
|
|
490
|
+
Return [] if this dimension is clean. Return ONLY the JSON array.
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
Collect every sub-agent's array into one consolidated list `ALL_FINDINGS`.
|
|
494
|
+
|
|
495
|
+
---
|
|
496
|
+
|
|
497
|
+
## Phase 2 — Completeness-critic convergence loop
|
|
498
|
+
|
|
499
|
+
This is the anti-whack-a-mole step. Repeat until **two consecutive rounds add zero new
|
|
500
|
+
findings**, or a hard cap of **3 rounds**, whichever comes first:
|
|
501
|
+
|
|
502
|
+
1. Spawn one **completeness-critic** sub-agent with the Agent tool. Give it:
|
|
503
|
+
- the full target file (`{target_file}`),
|
|
504
|
+
- the current `ALL_FINDINGS` list (so it knows what is already captured),
|
|
505
|
+
- the same slim context.
|
|
506
|
+
Prompt it:
|
|
507
|
+
```
|
|
508
|
+
Here is a document and a list of issues already found. Read the WHOLE document.
|
|
509
|
+
List ONLY real, additional issues NOT already in the list — gaps, ambiguities,
|
|
510
|
+
contradictions, missing edge/negative paths, coverage holes, terminology drift,
|
|
511
|
+
structural omissions, and any issue that a fix to an existing finding would expose.
|
|
512
|
+
Do NOT repeat anything already listed. Return the same finding JSON shape, or [] if
|
|
513
|
+
nothing new.
|
|
514
|
+
```
|
|
515
|
+
2. Append any genuinely new findings (not already in `ALL_FINDINGS`) to the list.
|
|
516
|
+
3. If this round returned 0 new → increment the dry-round counter; else reset it to 0.
|
|
517
|
+
4. Stop when dry-round counter reaches 2, or after 3 rounds total.
|
|
518
|
+
|
|
519
|
+
Record `convergence_rounds` (how many critic rounds ran) for the report.
|
|
520
|
+
|
|
521
|
+
---
|
|
522
|
+
|
|
523
|
+
## Phase 3 — Dedup, resolve conflicts, merge
|
|
524
|
+
|
|
525
|
+
Sub-agents run **blind to each other** (independence = diverse coverage). They never
|
|
526
|
+
talk or reconcile among themselves — all duplicate/conflict resolution happens **here in
|
|
527
|
+
the orchestrator**, where the full set is visible.
|
|
528
|
+
|
|
529
|
+
1. **Deduplicate** `ALL_FINDINGS`: two findings are duplicates if they target the same
|
|
530
|
+
`section` + `uc_id` and describe the same underlying issue. Keep the one with the
|
|
531
|
+
richer `suggestion`; if they differ on severity, keep the **higher** severity.
|
|
532
|
+
2. **Resolve conflicts** — group remaining findings by `section` + `uc_id` and check for
|
|
533
|
+
contradictions (two findings whose `suggestion`s cannot both be applied, or that
|
|
534
|
+
propose opposite fixes for the same spot):
|
|
535
|
+
- If the two suggestions can be **merged** into one coherent fix → merge them into a
|
|
536
|
+
single finding.
|
|
537
|
+
- If they are **mutually exclusive** → emit **one** finding that states both options
|
|
538
|
+
and set `auto_fixable: false` with `status: "needs_discussion"` (PRD) /
|
|
539
|
+
`status: "pending"` (review) so a human picks — never silently drop one side.
|
|
540
|
+
- If a finding is **invalidated** by another (e.g. a structural finding says a section
|
|
541
|
+
is missing, but another quotes content from it) → drop the invalid one.
|
|
542
|
+
3. **Sort** by severity (critical → major → minor), then by `section` order in the file.
|
|
543
|
+
4. **Assign stable IDs** `F001, F002, …` in that sorted order.
|
|
544
|
+
5. Map each finding's `dimension` into the command's schema field
|
|
545
|
+
(`lens` for `/refine-prd`; `check_id` for `/review-context`).
|
|
546
|
+
6. Write the **single** findings file in the FINDINGS SCHEMA the command defines.
|
|
547
|
+
|
|
548
|
+
In the command's final report, add one line:
|
|
549
|
+
```
|
|
550
|
+
Convergence: {convergence_rounds} critic round(s) — findings file is complete; re-running should surface 0 new issues.
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
**How the checks below map onto the procedure:**
|
|
555
|
+
- **DIMENSIONS** = the check groups for the detected mode — PRD: `P1, P2, P4, P5`; BDD: `B1, B2, B3, B4, B5, B6`. Fan out one sub-agent per check group, each scanning the full target file for just that group.
|
|
556
|
+
- **Orchestrator-run checks (not fanned out):** `P0` (umbrella routing) and `P3` (cross-PRD conflict) need config / other-PRD context — the orchestrator runs these itself **before** the fan-out and adds their results to `ALL_FINDINGS`.
|
|
557
|
+
- The completeness-critic loop (Phase 2) guarantees the findings file is complete in one run — re-running `/review-context` should surface **0 new** findings. Map each dimension into the `check_id` field of the schema below.
|
|
558
|
+
|
|
559
|
+
---
|
|
560
|
+
|
|
390
561
|
## PRD Review Mode
|
|
391
562
|
|
|
392
563
|
### P0 — Umbrella Routing Check (umbrella mode only)
|
|
@@ -631,15 +802,22 @@ Suggest the logical next command based on workflow phase:
|
|
|
631
802
|
| /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
|
|
632
803
|
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
633
804
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
805
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
|
|
806
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
807
|
+
| /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
|
|
808
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
|
|
809
|
+
| /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
|
|
810
|
+
| /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
|
|
811
|
+
| /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
|
|
634
812
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
635
813
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
636
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
637
|
-
| /
|
|
638
|
-
| /run-
|
|
639
|
-
| /run-
|
|
640
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
641
|
-
| /smoke-test | Create PR and link to ticket |
|
|
642
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
814
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
815
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
816
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
817
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
818
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
819
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
820
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
643
821
|
| /fix-bug | Create PR and link to ticket |
|
|
644
822
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
645
823
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -690,7 +868,7 @@ to the findings file as usual and left `status: pending`.
|
|
|
690
868
|
|
|
691
869
|
### Phase 1 — Run analysis
|
|
692
870
|
|
|
693
|
-
Run all checks (
|
|
871
|
+
Run all checks via the **Review Procedure** (fan-out + completeness loop) exactly as in the default mode.
|
|
694
872
|
Write the findings file with all `status: "pending"` as usual.
|
|
695
873
|
|
|
696
874
|
### Phase 2 — Apply auto-fixable findings
|
|
@@ -34,6 +34,16 @@ Derive the output findings filename:
|
|
|
34
34
|
|
|
35
35
|
---
|
|
36
36
|
|
|
37
|
+
## Review Procedure
|
|
38
|
+
{{include:steps/review-fanout.md}}
|
|
39
|
+
|
|
40
|
+
**How the checks below map onto the procedure:**
|
|
41
|
+
- **DIMENSIONS** = the check groups for the detected mode — PRD: `P1, P2, P4, P5`; BDD: `B1, B2, B3, B4, B5, B6`. Fan out one sub-agent per check group, each scanning the full target file for just that group.
|
|
42
|
+
- **Orchestrator-run checks (not fanned out):** `P0` (umbrella routing) and `P3` (cross-PRD conflict) need config / other-PRD context — the orchestrator runs these itself **before** the fan-out and adds their results to `ALL_FINDINGS`.
|
|
43
|
+
- The completeness-critic loop (Phase 2) guarantees the findings file is complete in one run — re-running `/review-context` should surface **0 new** findings. Map each dimension into the `check_id` field of the schema below.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
37
47
|
## PRD Review Mode
|
|
38
48
|
|
|
39
49
|
### P0 — Umbrella Routing Check (umbrella mode only)
|
|
@@ -277,7 +287,7 @@ to the findings file as usual and left `status: pending`.
|
|
|
277
287
|
|
|
278
288
|
### Phase 1 — Run analysis
|
|
279
289
|
|
|
280
|
-
Run all checks (
|
|
290
|
+
Run all checks via the **Review Procedure** (fan-out + completeness loop) exactly as in the default mode.
|
|
281
291
|
Write the findings file with all `status: "pending"` as usual.
|
|
282
292
|
|
|
283
293
|
### Phase 2 — Apply auto-fixable findings
|
|
@@ -167,7 +167,7 @@ If `services` section is present:
|
|
|
167
167
|
|
|
168
168
|
**2. Route to service** — if active domain matches a key in `services`:
|
|
169
169
|
- Override `paths.specs_dir` → `services.{domain}.specs_dir`
|
|
170
|
-
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir`
|
|
170
|
+
- Override `paths.tech_docs_dir` → `services.{domain}.tech_docs_dir` — **only if `setup.spec_source` is NOT set.** When `spec_source` IS set, the tech-design (API contract) is a cross-team artifact and must live in the shared spec repo (handled in step 4), so leave `tech_docs_dir` for step 4 to route — do NOT pin it per-service here.
|
|
171
171
|
- Store `active_service` = `services.{domain}.path`
|
|
172
172
|
- Store `active_service_module` = `services.{domain}.module`
|
|
173
173
|
- If service has its own `module` → use it as `active_module` (overrides `tech_stack.module`)
|
|
@@ -179,7 +179,7 @@ If `services` section is present:
|
|
|
179
179
|
**4. Spec source auto-override** — if `setup.spec_source` is set AND the corresponding path was not already explicitly set in `paths:`:
|
|
180
180
|
- Override `paths.prd_dir` → `{spec_source}/specs/prd`
|
|
181
181
|
- Override `paths.design_spec_dir` → `{spec_source}/specs/design-spec`
|
|
182
|
-
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **
|
|
182
|
+
- Override `paths.tech_docs_dir` → `{spec_source}/specs/tech-docs` — **always when `spec_source` is set** (step 2 no longer pins tech-docs per-service in this case). The tech-design IS the cross-team API contract: BE authors it here, and FE/App read it from the same spec submodule at `/generate-code --phase=integration`. *(Per-service tech-docs only happen when there is no `spec_source` — a pure multi-service BE repo with no shared spec module.)*
|
|
183
183
|
- Override `paths.domain_knowledge_dir` → `{spec_source}/specs/domain-knowledge`
|
|
184
184
|
- Override `paths.business_dictionary` → `{spec_source}/specs/domain-knowledge/business-dictionary.md`
|
|
185
185
|
- Override `paths.core_entities` → `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
@@ -210,7 +210,7 @@ When `active_service` has been resolved to a real path in Step 1.5 (e.g., `user-
|
|
|
210
210
|
| `paths.specs_dir` | `{active_service}/{service paths.specs_dir}` (if set in service config, else keep Step 1.5 override) |
|
|
211
211
|
|
|
212
212
|
**3. Store** `service_root = {active_service}` as the working directory anchor for all downstream commands:
|
|
213
|
-
- Shell commands (`/run-
|
|
213
|
+
- Shell commands (`/dev-run-test`, `/dev-gen-test`) run **from within** `service_root`
|
|
214
214
|
- File write operations (test files, trace TSVs) use paths **relative to** `service_root`
|
|
215
215
|
|
|
216
216
|
**4. If service config not found** — keep umbrella defaults, still set `service_root = {active_service}` (path anchor is always needed even without a config override).
|
|
@@ -225,19 +225,41 @@ If the file does not exist → skip silently.
|
|
|
225
225
|
|
|
226
226
|
---
|
|
227
227
|
|
|
228
|
-
## Step 3 — [CRITICAL] Load CLAUDE.md
|
|
228
|
+
## Step 3 — [CRITICAL] Load CLAUDE.md (layered: root + service overlay)
|
|
229
229
|
|
|
230
230
|
*This is the highest-priority context — it defines HOW to write code and documents for this project.*
|
|
231
231
|
|
|
232
|
-
|
|
232
|
+
CLAUDE.md is loaded in **two layers** so umbrella-wide rules and service-specific
|
|
233
|
+
architecture/coding standards compose correctly. The agent always sits at the umbrella
|
|
234
|
+
root, but the implementation code lives in a service submodule with its OWN stack,
|
|
235
|
+
architecture, and conventions — so the service's CLAUDE.md must win for code generation.
|
|
236
|
+
|
|
237
|
+
**Layer 1 — [BASE] Root CLAUDE.md (umbrella-wide).**
|
|
238
|
+
Read `CLAUDE.md` at the repo root. Treat its contents as the **shared baseline** for the
|
|
239
|
+
whole umbrella — git conventions, data-protection posture, cross-cutting rules, and (in
|
|
240
|
+
single-service mode) the project's only architecture + coding standards.
|
|
241
|
+
|
|
242
|
+
**Layer 2 — [OVERLAY] Service CLAUDE.md (umbrella mode only).**
|
|
243
|
+
*Run only if `service_root` was set in Step 1.6 (i.e. a real service was routed to).*
|
|
244
|
+
Read `{service_root}/CLAUDE.md`. This file defines the architecture + coding standards of
|
|
245
|
+
the **actual stack being implemented** (e.g. `user-service` = java-spring, `web` = nextjs).
|
|
246
|
+
Overlay it on top of Layer 1: **on any conflict, the service value WINS** for architecture,
|
|
247
|
+
coding standards, and error handling. Layer-1 values that the service does not redefine
|
|
248
|
+
(e.g. git conventions, banned patterns shared org-wide) remain in effect.
|
|
249
|
+
|
|
250
|
+
From the **merged** result, extract and store:
|
|
233
251
|
|
|
234
252
|
- **§1 Project Overview** → project name, language, framework, build/test commands, domains
|
|
235
|
-
- **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules
|
|
236
|
-
- **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns
|
|
237
|
-
- **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name
|
|
238
|
-
- **§7 Git Conventions** → branch naming pattern, commit message format
|
|
253
|
+
- **§2 Architecture** → layer order (e.g., Controller → Facade → Service → Repository), architectural rules — *service overlay wins*
|
|
254
|
+
- **§3 Coding Standards** → naming conventions (classes, methods), response wrapper type, forbidden patterns — *service overlay wins*
|
|
255
|
+
- **§5 Error Handling** → exception types, HTTP status code mapping, not-found exception class name — *service overlay wins*
|
|
256
|
+
- **§7 Git Conventions** → branch naming pattern, commit message format — *root baseline unless service redefines*
|
|
239
257
|
|
|
240
|
-
|
|
258
|
+
**Resolution rules:**
|
|
259
|
+
- If both layers exist → merge as above; record `claude_md_source = root + {service_root}`.
|
|
260
|
+
- If only the service overlay exists (no root CLAUDE.md) → use the service file alone; `claude_md_source = {service_root}`.
|
|
261
|
+
- If `service_root` is set but `{service_root}/CLAUDE.md` is **missing** → fall back to root CLAUDE.md and flag ⚠️ in the Step 7 recap (the service has no architecture/coding-standards definition — code generation will use umbrella defaults, which may be the wrong stack).
|
|
262
|
+
- If neither exists → note CLAUDE.md as missing and continue with project-context.yaml data only.
|
|
241
263
|
|
|
242
264
|
---
|
|
243
265
|
|
|
@@ -303,7 +325,7 @@ active_module = tech_stack.module (e.g. "java-spring", "react", "flutter")
|
|
|
303
325
|
|
|
304
326
|
If `tech_stack.module` is blank or not recognized → set `platform_type = "unknown"` and flag as ⚠️ in the Step 7 recap.
|
|
305
327
|
|
|
306
|
-
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (
|
|
328
|
+
These two variables (`active_module`, `platform_type`) are the canonical source for all branching logic in commands that need platform-specific behavior (dev-gen-test, debug, fix-bug, dev-smoke-test).
|
|
307
329
|
|
|
308
330
|
---
|
|
309
331
|
|
|
@@ -337,7 +359,8 @@ Output exactly this block:
|
|
|
337
359
|
[CTX LOADED]
|
|
338
360
|
Stack : {language} / {framework} / {database}
|
|
339
361
|
Platform : {active_module} ({platform_type})
|
|
340
|
-
Layers : {layer order from CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
|
|
362
|
+
Layers : {layer order from merged CLAUDE.md §2, e.g., Controller → Facade → Service → Repository}
|
|
363
|
+
CLAUDE.md : {root + {service_root} | {service_root} only | root only | ⚠️ service overlay MISSING — using root | missing}
|
|
341
364
|
Ticket : {ticket_prefix}-
|
|
342
365
|
Dict : {loaded — N canonical terms, M banned terms | missing}
|
|
343
366
|
Entities : {loaded — EntityA, EntityB, EntityC | missing}
|
|
@@ -614,15 +637,22 @@ Suggest the logical next command based on workflow phase:
|
|
|
614
637
|
| /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
|
|
615
638
|
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
616
639
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
640
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
|
|
641
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
642
|
+
| /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
|
|
643
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
|
|
644
|
+
| /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
|
|
645
|
+
| /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
|
|
646
|
+
| /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
|
|
617
647
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
618
648
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
619
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
620
|
-
| /
|
|
621
|
-
| /run-
|
|
622
|
-
| /run-
|
|
623
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
624
|
-
| /smoke-test | Create PR and link to ticket |
|
|
625
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
649
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
650
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
651
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
652
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
653
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
654
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
655
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
626
656
|
| /fix-bug | Create PR and link to ticket |
|
|
627
657
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
628
658
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -406,15 +406,22 @@ Suggest the logical next command based on workflow phase:
|
|
|
406
406
|
| /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
|
|
407
407
|
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
408
408
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
409
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
|
|
410
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
411
|
+
| /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
|
|
412
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
|
|
413
|
+
| /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
|
|
414
|
+
| /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
|
|
415
|
+
| /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
|
|
409
416
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
410
417
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
411
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
412
|
-
| /
|
|
413
|
-
| /run-
|
|
414
|
-
| /run-
|
|
415
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
416
|
-
| /smoke-test | Create PR and link to ticket |
|
|
417
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
418
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
419
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
420
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
421
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
422
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
423
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
424
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
418
425
|
| /fix-bug | Create PR and link to ticket |
|
|
419
426
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
420
427
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
package/commands/sync.md
CHANGED
|
@@ -248,13 +248,15 @@ For each entry in `services[]`:
|
|
|
248
248
|
|
|
249
249
|
## Step 4 — Check `.gitignore`
|
|
250
250
|
|
|
251
|
-
Check
|
|
251
|
+
Check the generated Living Docs mirrors are gitignored:
|
|
252
|
+
- `.trace/` in the current repo's `.gitignore` (or `.git/info/exclude`)
|
|
253
|
+
- `.living-docs/` in the **specs module's** `.gitignore` (when `setup.spec_source` is set)
|
|
252
254
|
|
|
253
|
-
If missing:
|
|
255
|
+
If either is missing:
|
|
254
256
|
```
|
|
255
|
-
⚠️
|
|
256
|
-
Add it to prevent accidentally committing generated trace artifacts:
|
|
257
|
+
⚠️ Living Docs mirrors not gitignored — they are generated, never commit them:
|
|
257
258
|
echo ".trace/" >> .gitignore
|
|
259
|
+
echo ".living-docs/" >> {spec_source}/.gitignore # specs module (if spec_source set)
|
|
258
260
|
```
|
|
259
261
|
|
|
260
262
|
---
|
|
@@ -263,20 +265,21 @@ If missing:
|
|
|
263
265
|
|
|
264
266
|
*Skip if `services` is empty.*
|
|
265
267
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
268
|
+
**Resolve the Living Docs home (same rule as `/validate-traces`):**
|
|
269
|
+
- `living_docs_dir` = `{spec_source}/.living-docs` if `setup.spec_source` is set, else `.living-docs` at umbrella root. *(The specs module is mounted inside every service workspace, so the panel resolves it even when a dev opens a single service submodule.)*
|
|
270
|
+
- `panel_mirror` = `./.trace` at the current workspace root.
|
|
269
271
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
-
|
|
273
|
-
-
|
|
272
|
+
1. For each service in `services[]`: if `{service.path}/.trace/` has `.tsv` files → copy them to `{living_docs_dir}/{service-name}/` (create dir if needed).
|
|
273
|
+
2. Write merged `{living_docs_dir}/trace-report.json`:
|
|
274
|
+
- Aggregate each service's `.trace/` TSVs, add `"service"` field per row, recalc summary totals.
|
|
275
|
+
3. **Mirror to the panel location:** copy `{living_docs_dir}/trace-report.json` (+ namespaced TSVs) → `{panel_mirror}/` so the panel in the currently-open repo is non-empty. Skip if `panel_mirror` already equals `living_docs_dir`.
|
|
274
276
|
|
|
275
277
|
Print sync result:
|
|
276
278
|
```
|
|
277
|
-
Living Docs →
|
|
279
|
+
Living Docs → {living_docs_dir}/ synced (canonical, specs module)
|
|
278
280
|
{service-name}: {N} TSVs
|
|
279
281
|
trace-report.json: {total} scenarios across {S} services
|
|
282
|
+
Panel mirror → {panel_mirror}/ (current workspace)
|
|
280
283
|
```
|
|
281
284
|
|
|
282
285
|
If no `.trace/` dirs found → `Living Docs: no trace data yet — run /generate-bdd then /generate-code first.`
|
|
@@ -332,15 +335,22 @@ Suggest the logical next command based on workflow phase:
|
|
|
332
335
|
| /generate-design-spec | Designer review → Figma links confirmed → PO + Designer sign-off → `/generate-bdd {prd-file}` |
|
|
333
336
|
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
334
337
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
338
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (resolve 🔴 blocker gaps first) |
|
|
339
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
340
|
+
| /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
|
|
341
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
|
|
342
|
+
| /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
|
|
343
|
+
| /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
|
|
344
|
+
| /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
|
|
335
345
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
336
346
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
337
|
-
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/
|
|
338
|
-
| /
|
|
339
|
-
| /run-
|
|
340
|
-
| /run-
|
|
341
|
-
| /review-code | `/smoke-test {UC-ID}` or create PR |
|
|
342
|
-
| /smoke-test | Create PR and link to ticket |
|
|
343
|
-
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/
|
|
347
|
+
| /generate-code | First gen → `/review-code {UC-ID}`; re-gen → `/dev-gen-test {UC-ID}` |
|
|
348
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
349
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
350
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` or `/debug {error}` |
|
|
351
|
+
| /review-code | `/dev-smoke-test {UC-ID}` or create PR |
|
|
352
|
+
| /dev-smoke-test | Create PR and link to ticket |
|
|
353
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; all OK → create PR |
|
|
344
354
|
| /fix-bug | Create PR and link to ticket |
|
|
345
355
|
| /debug | `/fix-bug {ticket-id}` if fix needed |
|
|
346
356
|
| /report-bug | Send to dev (`/fix-bug {BUG-ID}`); if coverage gap → `/propose-scenario {UC-ID}` |
|
|
@@ -385,7 +395,7 @@ Service Configs
|
|
|
385
395
|
✅ user-service — test: mvn test | build: mvn compile
|
|
386
396
|
✅ order-service — test: mvn test | build: mvn compile
|
|
387
397
|
⚠️ payment-service — .agent/project-context.yaml missing
|
|
388
|
-
→ create it so /run-
|
|
398
|
+
→ create it so /dev-run-test works correctly
|
|
389
399
|
|
|
390
400
|
.gitignore
|
|
391
401
|
✅ .trace/ is gitignored
|
package/commands/sync.tmpl
CHANGED
|
@@ -248,13 +248,15 @@ For each entry in `services[]`:
|
|
|
248
248
|
|
|
249
249
|
## Step 4 — Check `.gitignore`
|
|
250
250
|
|
|
251
|
-
Check
|
|
251
|
+
Check the generated Living Docs mirrors are gitignored:
|
|
252
|
+
- `.trace/` in the current repo's `.gitignore` (or `.git/info/exclude`)
|
|
253
|
+
- `.living-docs/` in the **specs module's** `.gitignore` (when `setup.spec_source` is set)
|
|
252
254
|
|
|
253
|
-
If missing:
|
|
255
|
+
If either is missing:
|
|
254
256
|
```
|
|
255
|
-
⚠️
|
|
256
|
-
Add it to prevent accidentally committing generated trace artifacts:
|
|
257
|
+
⚠️ Living Docs mirrors not gitignored — they are generated, never commit them:
|
|
257
258
|
echo ".trace/" >> .gitignore
|
|
259
|
+
echo ".living-docs/" >> {spec_source}/.gitignore # specs module (if spec_source set)
|
|
258
260
|
```
|
|
259
261
|
|
|
260
262
|
---
|
|
@@ -263,20 +265,21 @@ If missing:
|
|
|
263
265
|
|
|
264
266
|
*Skip if `services` is empty.*
|
|
265
267
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
268
|
+
**Resolve the Living Docs home (same rule as `/validate-traces`):**
|
|
269
|
+
- `living_docs_dir` = `{spec_source}/.living-docs` if `setup.spec_source` is set, else `.living-docs` at umbrella root. *(The specs module is mounted inside every service workspace, so the panel resolves it even when a dev opens a single service submodule.)*
|
|
270
|
+
- `panel_mirror` = `./.trace` at the current workspace root.
|
|
269
271
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
-
|
|
273
|
-
-
|
|
272
|
+
1. For each service in `services[]`: if `{service.path}/.trace/` has `.tsv` files → copy them to `{living_docs_dir}/{service-name}/` (create dir if needed).
|
|
273
|
+
2. Write merged `{living_docs_dir}/trace-report.json`:
|
|
274
|
+
- Aggregate each service's `.trace/` TSVs, add `"service"` field per row, recalc summary totals.
|
|
275
|
+
3. **Mirror to the panel location:** copy `{living_docs_dir}/trace-report.json` (+ namespaced TSVs) → `{panel_mirror}/` so the panel in the currently-open repo is non-empty. Skip if `panel_mirror` already equals `living_docs_dir`.
|
|
274
276
|
|
|
275
277
|
Print sync result:
|
|
276
278
|
```
|
|
277
|
-
Living Docs →
|
|
279
|
+
Living Docs → {living_docs_dir}/ synced (canonical, specs module)
|
|
278
280
|
{service-name}: {N} TSVs
|
|
279
281
|
trace-report.json: {total} scenarios across {S} services
|
|
282
|
+
Panel mirror → {panel_mirror}/ (current workspace)
|
|
280
283
|
```
|
|
281
284
|
|
|
282
285
|
If no `.trace/` dirs found → `Living Docs: no trace data yet — run /generate-bdd then /generate-code first.`
|
|
@@ -325,7 +328,7 @@ Service Configs
|
|
|
325
328
|
✅ user-service — test: mvn test | build: mvn compile
|
|
326
329
|
✅ order-service — test: mvn test | build: mvn compile
|
|
327
330
|
⚠️ payment-service — .agent/project-context.yaml missing
|
|
328
|
-
→ create it so /run-
|
|
331
|
+
→ create it so /dev-run-test works correctly
|
|
329
332
|
|
|
330
333
|
.gitignore
|
|
331
334
|
✅ .trace/ is gitignored
|