@anhth2/spec-driven-dev-plugin 0.10.0 โ 0.12.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 +43 -8
- package/commands/define-product.md +43 -8
- package/commands/dev-gen-test.md +44 -9
- package/commands/dev-gen-test.tmpl +1 -1
- package/commands/dev-run-test.md +48 -10
- package/commands/dev-run-test.tmpl +5 -2
- package/commands/dev-smoke-test.md +43 -8
- package/commands/fix-bug.md +79 -14
- package/commands/fix-bug.tmpl +36 -6
- package/commands/generate-bdd.md +49 -10
- package/commands/generate-bdd.tmpl +6 -2
- package/commands/generate-code.md +44 -9
- package/commands/generate-code.tmpl +1 -1
- package/commands/generate-design-spec.md +43 -8
- package/commands/generate-prd.md +43 -8
- package/commands/generate-spec-manifest.md +43 -8
- package/commands/generate-tech-docs.md +43 -8
- package/commands/learn.md +43 -8
- package/commands/propose-scenario.md +74 -19
- package/commands/propose-scenario.tmpl +31 -11
- package/commands/qc-analyze.md +534 -0
- package/commands/qc-analyze.tmpl +86 -0
- package/commands/qc-design-test.md +515 -0
- package/commands/qc-design-test.tmpl +67 -0
- package/commands/qc-plan.md +497 -0
- package/commands/qc-plan.tmpl +49 -0
- package/commands/qc-report.md +508 -0
- package/commands/qc-report.tmpl +60 -0
- package/commands/qc-review.md +501 -0
- package/commands/qc-review.tmpl +53 -0
- package/commands/qc-run-test.md +549 -0
- package/commands/qc-run-test.tmpl +83 -0
- package/commands/refine-prd.md +43 -8
- package/commands/report-bug.md +59 -10
- package/commands/report-bug.tmpl +16 -2
- package/commands/review-code.md +43 -8
- package/commands/review-context.md +43 -8
- package/commands/review-tech-docs.md +43 -8
- package/commands/setup-ai-first.md +7 -0
- package/commands/sync.md +19 -9
- package/commands/sync.tmpl +12 -9
- package/commands/update-framework.md +7 -0
- package/commands/validate-traces.md +67 -12
- package/commands/validate-traces.tmpl +24 -4
- package/core/FRAMEWORK_VERSION +1 -1
- package/core/commands/debug.md +43 -8
- package/core/commands/define-product.md +43 -8
- package/core/commands/dev-gen-test.md +44 -9
- package/core/commands/dev-run-test.md +48 -10
- package/core/commands/dev-smoke-test.md +43 -8
- package/core/commands/fix-bug.md +79 -14
- package/core/commands/generate-bdd.md +49 -10
- package/core/commands/generate-code.md +44 -9
- package/core/commands/generate-design-spec.md +43 -8
- package/core/commands/generate-prd.md +43 -8
- package/core/commands/generate-spec-manifest.md +43 -8
- package/core/commands/generate-tech-docs.md +43 -8
- package/core/commands/learn.md +43 -8
- package/core/commands/propose-scenario.md +74 -19
- package/core/commands/qc-analyze.md +534 -0
- package/core/commands/qc-design-test.md +515 -0
- package/core/commands/qc-plan.md +497 -0
- package/core/commands/qc-report.md +508 -0
- package/core/commands/qc-review.md +501 -0
- package/core/commands/qc-run-test.md +549 -0
- package/core/commands/refine-prd.md +43 -8
- package/core/commands/report-bug.md +59 -10
- package/core/commands/review-code.md +43 -8
- package/core/commands/review-context.md +43 -8
- package/core/commands/review-tech-docs.md +43 -8
- package/core/commands/setup-ai-first.md +7 -0
- package/core/commands/sync.md +19 -9
- package/core/commands/update-framework.md +7 -0
- package/core/commands/validate-traces.md +67 -12
- package/core/modules/qc-playwright/stack-profile.yaml +65 -0
- package/core/skills/code/SKILL.md +50 -8
- package/core/skills/debug/SKILL.md +57 -8
- package/core/skills/design-spec/SKILL.md +43 -8
- package/core/skills/discovery/SKILL.md +43 -8
- package/core/skills/prd/SKILL.md +14 -0
- package/core/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
- package/core/skills/qc/qa-analyst/acceptance-criteria.md +60 -0
- package/core/skills/qc/qa-analyst/business-rules.md +59 -0
- package/core/skills/qc/qa-analyst/data-flow.md +64 -0
- package/core/skills/qc/qa-analyst/spec-breakdown.md +61 -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 +7 -0
- package/core/skills/spec/SKILL.md +14 -0
- package/core/skills/test/SKILL.md +93 -16
- package/core/steps/context-loader.md +36 -8
- package/core/steps/report-footer.md +7 -0
- package/core/templates/project-context.yaml +27 -1
- 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 +156 -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 +61 -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 +157 -0
- package/docs/02-guides/tester/README.md +74 -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 +80 -0
- package/docs/03-concepts/README.md +19 -0
- package/docs/03-concepts/architecture.md +245 -0
- package/docs/03-concepts/pipeline.md +262 -0
- package/docs/03-concepts/traceability.md +149 -0
- package/docs/04-operations/README.md +33 -0
- package/docs/04-operations/bug-flow.md +362 -0
- package/docs/04-operations/publishing.md +137 -0
- package/docs/04-operations/sync-and-update.md +365 -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 +152 -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 +50 -8
- package/skills/debug/SKILL.md +57 -8
- package/skills/design-spec/SKILL.md +43 -8
- package/skills/discovery/SKILL.md +43 -8
- package/skills/prd/SKILL.md +14 -0
- package/skills/qc/qa-analyst/DOC_GAPS.template.md +63 -0
- package/skills/qc/qa-analyst/acceptance-criteria.md +60 -0
- package/skills/qc/qa-analyst/business-rules.md +59 -0
- package/skills/qc/qa-analyst/data-flow.md +64 -0
- package/skills/qc/qa-analyst/spec-breakdown.md +61 -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 +7 -0
- package/skills/spec/SKILL.md +14 -0
- package/skills/test/SKILL.md +93 -16
- package/steps/context-loader.md +36 -8
- package/steps/report-footer.md +7 -0
- package/templates/project-context.yaml +27 -1
- package/ARCHITECTURE.md +0 -258
|
@@ -127,6 +127,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
127
127
|
- `paths.specs_dir` โ BDD specs root
|
|
128
128
|
- `paths.prd_dir` โ PRD documents root
|
|
129
129
|
- `paths.refinement_dir` โ findings/review output dir
|
|
130
|
+
- `paths.qc_dir` โ QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
131
|
+
- `paths.qc_skills_dir` โ where qc-* commands load QC skills from (default bundled `.agent/skills/qc`; override to the QC team's own repo/submodule so framework upgrade won't overwrite them)
|
|
130
132
|
- `paths.product_definitions_dir` โ product definitions root
|
|
131
133
|
- `paths.domain_knowledge_dir` โ domain knowledge root
|
|
132
134
|
- `paths.business_dictionary` โ path to business-dictionary.md
|
|
@@ -139,6 +141,8 @@ If `paths` section is absent, use these defaults:
|
|
|
139
141
|
- `specs_dir` = `specs/bdd`
|
|
140
142
|
- `prd_dir` = `specs/prd`
|
|
141
143
|
- `refinement_dir` = `.agent/review`
|
|
144
|
+
- `qc_dir` = `docs`
|
|
145
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
142
146
|
- `product_definitions_dir` = `specs/product-definition`
|
|
143
147
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
144
148
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -183,6 +187,7 @@ If `services` section is present:
|
|
|
183
187
|
- Override `paths.core_entities` โ `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
184
188
|
- Override `paths.bug_reports_dir` โ `{spec_source}/feedback/bug-reports`
|
|
185
189
|
- Override `paths.bdd_proposals_dir` โ `{spec_source}/feedback/bdd-proposals`
|
|
190
|
+
- Override `paths.prd_change_requests_dir` โ `{spec_source}/feedback/prd-change-requests`
|
|
186
191
|
|
|
187
192
|
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** โ they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root โ still shared, same repo.
|
|
188
193
|
|
|
@@ -223,19 +228,41 @@ If the file does not exist โ skip silently.
|
|
|
223
228
|
|
|
224
229
|
---
|
|
225
230
|
|
|
226
|
-
## Step 3 โ [CRITICAL] Load CLAUDE.md
|
|
231
|
+
## Step 3 โ [CRITICAL] Load CLAUDE.md (layered: root + service overlay)
|
|
227
232
|
|
|
228
233
|
*This is the highest-priority context โ it defines HOW to write code and documents for this project.*
|
|
229
234
|
|
|
230
|
-
|
|
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:
|
|
231
254
|
|
|
232
255
|
- **ยง1 Project Overview** โ project name, language, framework, build/test commands, domains
|
|
233
|
-
- **ยง2 Architecture** โ layer order (e.g., Controller โ Facade โ Service โ Repository), architectural rules
|
|
234
|
-
- **ยง3 Coding Standards** โ naming conventions (classes, methods), response wrapper type, forbidden patterns
|
|
235
|
-
- **ยง5 Error Handling** โ exception types, HTTP status code mapping, not-found exception class name
|
|
236
|
-
- **ยง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*
|
|
237
260
|
|
|
238
|
-
|
|
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.
|
|
239
266
|
|
|
240
267
|
---
|
|
241
268
|
|
|
@@ -335,7 +362,8 @@ Output exactly this block:
|
|
|
335
362
|
[CTX LOADED]
|
|
336
363
|
Stack : {language} / {framework} / {database}
|
|
337
364
|
Platform : {active_module} ({platform_type})
|
|
338
|
-
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}
|
|
339
367
|
Ticket : {ticket_prefix}-
|
|
340
368
|
Dict : {loaded โ N canonical terms, M banned terms | missing}
|
|
341
369
|
Entities : {loaded โ EntityA, EntityB, EntityC | missing}
|
|
@@ -444,7 +472,7 @@ If code was generated from an older revision โ flag `TECHDOC_DRIFT`.
|
|
|
444
472
|
*Skip this step if no TSV files existed (handled by Step 1 no-TSV path).*
|
|
445
473
|
|
|
446
474
|
For each `.tsv` file processed: write updated `spec_ver`, `status`, `last_updated` back to disk.
|
|
447
|
-
Do **not** modify `dev_selftest` or `
|
|
475
|
+
Do **not** modify `dev_selftest`/`dev_selftest_at` (owned by `/dev-run-test`) or `qc_status`/`qc_run_at`/`qc_owner`/`qc_blocked_by` (owned by `/qc-run-test` + `/report-bug`); this command only reads them for the report.
|
|
448
476
|
|
|
449
477
|
### Step 7 โ Compute dashboard aggregates
|
|
450
478
|
|
|
@@ -463,8 +491,17 @@ gap_count = rows where status == GAP
|
|
|
463
491
|
dev_selftest_passing = rows where dev_selftest == pass
|
|
464
492
|
dev_selftest_failing = rows where dev_selftest == fail
|
|
465
493
|
dev_selftest_not_run = rows where dev_selftest in (not_run, โ)
|
|
466
|
-
# NOTE:
|
|
467
|
-
# NOT official
|
|
494
|
+
# NOTE: dev_selftest is the DEV self-check signal (did the dev run their own smoke tests),
|
|
495
|
+
# NOT official coverage โ keep it labeled as such on the dashboard.
|
|
496
|
+
qc_passing = rows where qc_status == pass
|
|
497
|
+
qc_failing = rows where qc_status == fail
|
|
498
|
+
qc_skipped = rows where qc_status == skip
|
|
499
|
+
qc_not_run = rows where qc_status in (not_run, โ)
|
|
500
|
+
# qc_status is the OFFICIAL QC automation result (set by /qc-run-test),
|
|
501
|
+
# shown alongside โ never merged with โ dev_selftest.
|
|
502
|
+
waiting_dev = rows where qc_owner == dev # PM view: QC-found, waiting on dev to fix
|
|
503
|
+
waiting_po = rows where qc_owner == po # PM view: blocked, waiting on PO to confirm/clarify
|
|
504
|
+
# qc_owner + qc_blocked_by answer "case nร o ฤang chแป ai" โ surface as a "Waiting on" column.
|
|
468
505
|
tech_docs_count = count .md files in {paths.tech_docs_dir}/{domain}/
|
|
469
506
|
```
|
|
470
507
|
|
|
@@ -495,6 +532,12 @@ Schema:
|
|
|
495
532
|
"dev_selftest_passing": 0,
|
|
496
533
|
"dev_selftest_failing": 0,
|
|
497
534
|
"dev_selftest_not_run": 0,
|
|
535
|
+
"qc_passing": 0,
|
|
536
|
+
"qc_failing": 0,
|
|
537
|
+
"qc_skipped": 0,
|
|
538
|
+
"qc_not_run": 0,
|
|
539
|
+
"waiting_dev": 0,
|
|
540
|
+
"waiting_po": 0,
|
|
498
541
|
"tech_docs_count": 0
|
|
499
542
|
},
|
|
500
543
|
"prds": [
|
|
@@ -522,6 +565,10 @@ Schema:
|
|
|
522
565
|
"test_classes": ["<TestClass1>", "<TestClass2>"],
|
|
523
566
|
"dev_selftest": "pass | fail | not_run",
|
|
524
567
|
"dev_selftest_at": "<YYYY-MM-DD or null>",
|
|
568
|
+
"qc_status": "pass | fail | skip | not_run",
|
|
569
|
+
"qc_run_at": "<YYYY-MM-DD or null>",
|
|
570
|
+
"qc_owner": "dev | po | null",
|
|
571
|
+
"qc_blocked_by": "<BUG-id / GAP-id or null>",
|
|
525
572
|
"prd_version": "<prd version when BDD was generated>",
|
|
526
573
|
"bdd_version": "<bdd version when code was generated>",
|
|
527
574
|
"tech_doc_revision": 0,
|
|
@@ -586,7 +633,8 @@ Schema:
|
|
|
586
633
|
- `tech_doc_revision`: use integer; `0` if not yet generated
|
|
587
634
|
- `code_coverage_pct` / `test_coverage_pct`: round to nearest integer (0โ100)
|
|
588
635
|
- Always write to `{paths.trace_dir}/trace-report.json` regardless of domain filter โ if a domain filter was applied, include only those PRDs in `prds[]` but note the domain in the `domain` field
|
|
589
|
-
- **TSV `"โ"` mapping**: when reading TSV files, map dash values to JSON types: `implemented_by: "โ"` โ `null`; `test_count: "โ"` โ `0`; `test_classes: "โ"` โ `[]`; `tech_doc_revision: "โ"` โ `0`; `dev_selftest: "โ"` โ `"not_run"`; `dev_selftest_at: "โ"` โ `null`
|
|
636
|
+
- **TSV `"โ"` mapping**: when reading TSV files, map dash values to JSON types: `implemented_by: "โ"` โ `null`; `test_count: "โ"` โ `0`; `test_classes: "โ"` โ `[]`; `tech_doc_revision: "โ"` โ `0`; `dev_selftest: "โ"` โ `"not_run"`; `dev_selftest_at: "โ"` โ `null`; `qc_status: "โ"` โ `"not_run"`; `qc_run_at: "โ"` โ `null`; `qc_owner: "โ"` โ `null`; `qc_blocked_by: "โ"` โ `null`
|
|
637
|
+
- **Backward-compat (older 19-col TSV):** if `qc_owner` / `qc_blocked_by` columns are **absent** from the header (a pre-upgrade TSV), treat them as `null` โ do not error. The next `/generate-bdd` re-gen upgrades the header to include them.
|
|
590
638
|
|
|
591
639
|
### Step 8b โ Living Docs Sync *(umbrella mode only)*
|
|
592
640
|
|
|
@@ -659,6 +707,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
659
707
|
| /generate-design-spec | Designer review โ Figma links confirmed โ PO + Designer sign-off โ `/generate-bdd {prd-file}` |
|
|
660
708
|
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
661
709
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
710
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (resolve ๐ด blocker gaps first) |
|
|
711
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
712
|
+
| /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
|
|
713
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
|
|
714
|
+
| /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
|
|
715
|
+
| /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
|
|
716
|
+
| /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
|
|
662
717
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
663
718
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
664
719
|
| /generate-code | First gen โ `/review-code {UC-ID}`; re-gen โ `/dev-gen-test {UC-ID}` |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# QC automation module โ Python + pytest-playwright + Page Object
|
|
2
|
+
# Used by the /qc-* commands (the official QC automation pipeline ported from the QC team).
|
|
3
|
+
# This is the QC test-authoring/execution stack, independent of the dev implementation
|
|
4
|
+
# module (java-spring, react, flutter, โฆ). Selected via tech_stack.qc_module or per /qc-* run.
|
|
5
|
+
|
|
6
|
+
build:
|
|
7
|
+
test: "python3 -m pytest"
|
|
8
|
+
e2e: "python3 -m pytest -m e2e"
|
|
9
|
+
report: "python3 -m pytest --html=reports/<feature>/report.html --self-contained-html"
|
|
10
|
+
show_trace: "python3 -m playwright show-trace <test-results/<nodeid>/trace.zip>"
|
|
11
|
+
|
|
12
|
+
architecture:
|
|
13
|
+
style: "Page Object Model over pytest-playwright โ Markdown test-case first, Python second"
|
|
14
|
+
key_rules:
|
|
15
|
+
- "Markdown-first: never generate Python until a reviewed .Test.md exists for the feature"
|
|
16
|
+
- "No Allure, no hand-written dashboard, no record_video โ use Playwright Trace + pytest-html"
|
|
17
|
+
- "No hard-coded URL/credential/timeout โ read from Env.* and CONFIG[...]"
|
|
18
|
+
- "No time.sleep() โ use Playwright auto-wait / expect()"
|
|
19
|
+
- "Each test independent via pytest-playwright fixtures (page / logged_in_page / โฆ)"
|
|
20
|
+
- "Page Object extends slim BasePage; split 3 layers: locators _x(), actions verb_noun(), assertions assert_x() using expect()"
|
|
21
|
+
- "Locator priority: data-testid โ role โ label/text โ CSS โ avoid XPath"
|
|
22
|
+
- "Group tests by (role, account) so login/logout never interleaves across roles"
|
|
23
|
+
- "Cover 100% of TCs in the .Test.md โ every TC ends Pass/Fail/Skip, none left Draft"
|
|
24
|
+
folder_structure: |
|
|
25
|
+
{paths.qc_dir}/{UC-ID}/test-cases/ โ test-case Markdown (.Test.md) โ source of truth (mแบทc ฤแปnh docs/, lแป ra ngoร i)
|
|
26
|
+
pages/ โ Page Object Model
|
|
27
|
+
โ โโโ base_page.py โ slim BasePage (click/fill/wait/screenshot)
|
|
28
|
+
โ โโโ <feature>_page.py
|
|
29
|
+
tests/ โ pytest scripts, 1-1 with test-cases/
|
|
30
|
+
โ โโโ conftest.py โ fixtures: browser, page, logged_in_page, tracing
|
|
31
|
+
โ โโโ <project>/test_<feature>.py
|
|
32
|
+
utils/ โ config_loader, logger, steps, test_ordering, report helpers
|
|
33
|
+
test_data/ โ JSON datasets
|
|
34
|
+
config/config.yaml โ browser, timeout, video/screenshot/trace toggles
|
|
35
|
+
reports/ test-results/ โ generated (gitignored): html report, trace.zip, screenshots
|
|
36
|
+
|
|
37
|
+
coding_standards:
|
|
38
|
+
naming:
|
|
39
|
+
test_case_id: "TC_<FEATURE>_<NNN>"
|
|
40
|
+
test_class: "TestFeatureHappyCase"
|
|
41
|
+
test_function: "test_TC<NNN>_<snake_case>"
|
|
42
|
+
page_object: "<feature>_page.py with <Feature>Page class extending BasePage"
|
|
43
|
+
files:
|
|
44
|
+
test_case_md: "{paths.qc_dir}/{UC-ID}/test-cases/TC_<FEATURE>.Test.md"
|
|
45
|
+
page_object: "pages/<feature>_page.py"
|
|
46
|
+
test_script: "tests/<project>/test_<feature>.py"
|
|
47
|
+
patterns:
|
|
48
|
+
steps: "wrap steps with `with step(\"โฆ\")` (from utils.steps import step)"
|
|
49
|
+
assertions: "Playwright expect() โ never bare assert on dynamic UI"
|
|
50
|
+
fixtures: "auth fixtures register via register_auth_fixtures([...]) in project conftest"
|
|
51
|
+
fail_triage: "classify each FAIL as script-bug (fix selector/logic) vs product-gap (keep FAIL + evidence, never fake-pass)"
|
|
52
|
+
|
|
53
|
+
testing:
|
|
54
|
+
layers: "functional (gui-screen / gui-feature / api), integration (api/db/gui/kafka), e2e (journey), non-functional, exploratory"
|
|
55
|
+
runner: "pytest-playwright; trace via context.tracing.start in conftest"
|
|
56
|
+
report: "pytest-html (--html ... --self-contained-html) + Playwright Trace viewer"
|
|
57
|
+
|
|
58
|
+
trace_tags:
|
|
59
|
+
# QC tests map back to the framework's scenarios โ drives qc_status in the trace TSV.
|
|
60
|
+
verifies: "# @trace.verifies={UC-ID}-SC{N}"
|
|
61
|
+
source: "# @trace.source=<official .feature path>"
|
|
62
|
+
test_type: "# @trace.test_type=functional|integration|e2e|non-functional"
|
|
63
|
+
|
|
64
|
+
# qc_status: /qc-run-test writes pass|fail|skip|not_run + qc_run_at into {trace_dir}/{UC-ID}.tsv
|
|
65
|
+
# (parallel to dev_selftest), surfaced in Living Docs as the OFFICIAL QC automation result.
|
|
@@ -152,6 +152,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
152
152
|
- `paths.specs_dir` โ BDD specs root
|
|
153
153
|
- `paths.prd_dir` โ PRD documents root
|
|
154
154
|
- `paths.refinement_dir` โ findings/review output dir
|
|
155
|
+
- `paths.qc_dir` โ QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
156
|
+
- `paths.qc_skills_dir` โ where qc-* commands load QC skills from (default bundled `.agent/skills/qc`; override to the QC team's own repo/submodule so framework upgrade won't overwrite them)
|
|
155
157
|
- `paths.product_definitions_dir` โ product definitions root
|
|
156
158
|
- `paths.domain_knowledge_dir` โ domain knowledge root
|
|
157
159
|
- `paths.business_dictionary` โ path to business-dictionary.md
|
|
@@ -164,6 +166,8 @@ If `paths` section is absent, use these defaults:
|
|
|
164
166
|
- `specs_dir` = `specs/bdd`
|
|
165
167
|
- `prd_dir` = `specs/prd`
|
|
166
168
|
- `refinement_dir` = `.agent/review`
|
|
169
|
+
- `qc_dir` = `docs`
|
|
170
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
167
171
|
- `product_definitions_dir` = `specs/product-definition`
|
|
168
172
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
169
173
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -208,6 +212,7 @@ If `services` section is present:
|
|
|
208
212
|
- Override `paths.core_entities` โ `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
209
213
|
- Override `paths.bug_reports_dir` โ `{spec_source}/feedback/bug-reports`
|
|
210
214
|
- Override `paths.bdd_proposals_dir` โ `{spec_source}/feedback/bdd-proposals`
|
|
215
|
+
- Override `paths.prd_change_requests_dir` โ `{spec_source}/feedback/prd-change-requests`
|
|
211
216
|
|
|
212
217
|
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** โ they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root โ still shared, same repo.
|
|
213
218
|
|
|
@@ -248,19 +253,41 @@ If the file does not exist โ skip silently.
|
|
|
248
253
|
|
|
249
254
|
---
|
|
250
255
|
|
|
251
|
-
## Step 3 โ [CRITICAL] Load CLAUDE.md
|
|
256
|
+
## Step 3 โ [CRITICAL] Load CLAUDE.md (layered: root + service overlay)
|
|
252
257
|
|
|
253
258
|
*This is the highest-priority context โ it defines HOW to write code and documents for this project.*
|
|
254
259
|
|
|
255
|
-
|
|
260
|
+
CLAUDE.md is loaded in **two layers** so umbrella-wide rules and service-specific
|
|
261
|
+
architecture/coding standards compose correctly. The agent always sits at the umbrella
|
|
262
|
+
root, but the implementation code lives in a service submodule with its OWN stack,
|
|
263
|
+
architecture, and conventions โ so the service's CLAUDE.md must win for code generation.
|
|
264
|
+
|
|
265
|
+
**Layer 1 โ [BASE] Root CLAUDE.md (umbrella-wide).**
|
|
266
|
+
Read `CLAUDE.md` at the repo root. Treat its contents as the **shared baseline** for the
|
|
267
|
+
whole umbrella โ git conventions, data-protection posture, cross-cutting rules, and (in
|
|
268
|
+
single-service mode) the project's only architecture + coding standards.
|
|
269
|
+
|
|
270
|
+
**Layer 2 โ [OVERLAY] Service CLAUDE.md (umbrella mode only).**
|
|
271
|
+
*Run only if `service_root` was set in Step 1.6 (i.e. a real service was routed to).*
|
|
272
|
+
Read `{service_root}/CLAUDE.md`. This file defines the architecture + coding standards of
|
|
273
|
+
the **actual stack being implemented** (e.g. `user-service` = java-spring, `web` = nextjs).
|
|
274
|
+
Overlay it on top of Layer 1: **on any conflict, the service value WINS** for architecture,
|
|
275
|
+
coding standards, and error handling. Layer-1 values that the service does not redefine
|
|
276
|
+
(e.g. git conventions, banned patterns shared org-wide) remain in effect.
|
|
277
|
+
|
|
278
|
+
From the **merged** result, extract and store:
|
|
256
279
|
|
|
257
280
|
- **ยง1 Project Overview** โ project name, language, framework, build/test commands, domains
|
|
258
|
-
- **ยง2 Architecture** โ layer order (e.g., Controller โ Facade โ Service โ Repository), architectural rules
|
|
259
|
-
- **ยง3 Coding Standards** โ naming conventions (classes, methods), response wrapper type, forbidden patterns
|
|
260
|
-
- **ยง5 Error Handling** โ exception types, HTTP status code mapping, not-found exception class name
|
|
261
|
-
- **ยง7 Git Conventions** โ branch naming pattern, commit message format
|
|
281
|
+
- **ยง2 Architecture** โ layer order (e.g., Controller โ Facade โ Service โ Repository), architectural rules โ *service overlay wins*
|
|
282
|
+
- **ยง3 Coding Standards** โ naming conventions (classes, methods), response wrapper type, forbidden patterns โ *service overlay wins*
|
|
283
|
+
- **ยง5 Error Handling** โ exception types, HTTP status code mapping, not-found exception class name โ *service overlay wins*
|
|
284
|
+
- **ยง7 Git Conventions** โ branch naming pattern, commit message format โ *root baseline unless service redefines*
|
|
262
285
|
|
|
263
|
-
|
|
286
|
+
**Resolution rules:**
|
|
287
|
+
- If both layers exist โ merge as above; record `claude_md_source = root + {service_root}`.
|
|
288
|
+
- If only the service overlay exists (no root CLAUDE.md) โ use the service file alone; `claude_md_source = {service_root}`.
|
|
289
|
+
- 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).
|
|
290
|
+
- If neither exists โ note CLAUDE.md as missing and continue with project-context.yaml data only.
|
|
264
291
|
|
|
265
292
|
---
|
|
266
293
|
|
|
@@ -360,7 +387,8 @@ Output exactly this block:
|
|
|
360
387
|
[CTX LOADED]
|
|
361
388
|
Stack : {language} / {framework} / {database}
|
|
362
389
|
Platform : {active_module} ({platform_type})
|
|
363
|
-
Layers : {layer order from CLAUDE.md ยง2, e.g., Controller โ Facade โ Service โ Repository}
|
|
390
|
+
Layers : {layer order from merged CLAUDE.md ยง2, e.g., Controller โ Facade โ Service โ Repository}
|
|
391
|
+
CLAUDE.md : {root + {service_root} | {service_root} only | root only | โ ๏ธ service overlay MISSING โ using root | missing}
|
|
364
392
|
Ticket : {ticket_prefix}-
|
|
365
393
|
Dict : {loaded โ N canonical terms, M banned terms | missing}
|
|
366
394
|
Entities : {loaded โ EntityA, EntityB, EntityC | missing}
|
|
@@ -504,6 +532,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
504
532
|
| /generate-design-spec | Designer review โ Figma links confirmed โ PO + Designer sign-off โ `/generate-bdd {prd-file}` |
|
|
505
533
|
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
506
534
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
535
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (resolve ๐ด blocker gaps first) |
|
|
536
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
537
|
+
| /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
|
|
538
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
|
|
539
|
+
| /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
|
|
540
|
+
| /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
|
|
541
|
+
| /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
|
|
507
542
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
508
543
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
509
544
|
| /generate-code | First gen โ `/review-code {UC-ID}`; re-gen โ `/dev-gen-test {UC-ID}` |
|
|
@@ -622,6 +657,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
622
657
|
| /generate-design-spec | Designer review โ Figma links confirmed โ PO + Designer sign-off โ `/generate-bdd {prd-file}` |
|
|
623
658
|
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
624
659
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
660
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (resolve ๐ด blocker gaps first) |
|
|
661
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
662
|
+
| /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
|
|
663
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
|
|
664
|
+
| /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
|
|
665
|
+
| /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
|
|
666
|
+
| /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
|
|
625
667
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
626
668
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
627
669
|
| /generate-code | First gen โ `/review-code {UC-ID}`; re-gen โ `/dev-gen-test {UC-ID}` |
|
|
@@ -67,6 +67,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
67
67
|
- `paths.specs_dir` โ BDD specs root
|
|
68
68
|
- `paths.prd_dir` โ PRD documents root
|
|
69
69
|
- `paths.refinement_dir` โ findings/review output dir
|
|
70
|
+
- `paths.qc_dir` โ QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
71
|
+
- `paths.qc_skills_dir` โ where qc-* commands load QC skills from (default bundled `.agent/skills/qc`; override to the QC team's own repo/submodule so framework upgrade won't overwrite them)
|
|
70
72
|
- `paths.product_definitions_dir` โ product definitions root
|
|
71
73
|
- `paths.domain_knowledge_dir` โ domain knowledge root
|
|
72
74
|
- `paths.business_dictionary` โ path to business-dictionary.md
|
|
@@ -79,6 +81,8 @@ If `paths` section is absent, use these defaults:
|
|
|
79
81
|
- `specs_dir` = `specs/bdd`
|
|
80
82
|
- `prd_dir` = `specs/prd`
|
|
81
83
|
- `refinement_dir` = `.agent/review`
|
|
84
|
+
- `qc_dir` = `docs`
|
|
85
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
82
86
|
- `product_definitions_dir` = `specs/product-definition`
|
|
83
87
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
84
88
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -123,6 +127,7 @@ If `services` section is present:
|
|
|
123
127
|
- Override `paths.core_entities` โ `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
124
128
|
- Override `paths.bug_reports_dir` โ `{spec_source}/feedback/bug-reports`
|
|
125
129
|
- Override `paths.bdd_proposals_dir` โ `{spec_source}/feedback/bdd-proposals`
|
|
130
|
+
- Override `paths.prd_change_requests_dir` โ `{spec_source}/feedback/prd-change-requests`
|
|
126
131
|
|
|
127
132
|
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** โ they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root โ still shared, same repo.
|
|
128
133
|
|
|
@@ -163,19 +168,41 @@ If the file does not exist โ skip silently.
|
|
|
163
168
|
|
|
164
169
|
---
|
|
165
170
|
|
|
166
|
-
## Step 3 โ [CRITICAL] Load CLAUDE.md
|
|
171
|
+
## Step 3 โ [CRITICAL] Load CLAUDE.md (layered: root + service overlay)
|
|
167
172
|
|
|
168
173
|
*This is the highest-priority context โ it defines HOW to write code and documents for this project.*
|
|
169
174
|
|
|
170
|
-
|
|
175
|
+
CLAUDE.md is loaded in **two layers** so umbrella-wide rules and service-specific
|
|
176
|
+
architecture/coding standards compose correctly. The agent always sits at the umbrella
|
|
177
|
+
root, but the implementation code lives in a service submodule with its OWN stack,
|
|
178
|
+
architecture, and conventions โ so the service's CLAUDE.md must win for code generation.
|
|
179
|
+
|
|
180
|
+
**Layer 1 โ [BASE] Root CLAUDE.md (umbrella-wide).**
|
|
181
|
+
Read `CLAUDE.md` at the repo root. Treat its contents as the **shared baseline** for the
|
|
182
|
+
whole umbrella โ git conventions, data-protection posture, cross-cutting rules, and (in
|
|
183
|
+
single-service mode) the project's only architecture + coding standards.
|
|
184
|
+
|
|
185
|
+
**Layer 2 โ [OVERLAY] Service CLAUDE.md (umbrella mode only).**
|
|
186
|
+
*Run only if `service_root` was set in Step 1.6 (i.e. a real service was routed to).*
|
|
187
|
+
Read `{service_root}/CLAUDE.md`. This file defines the architecture + coding standards of
|
|
188
|
+
the **actual stack being implemented** (e.g. `user-service` = java-spring, `web` = nextjs).
|
|
189
|
+
Overlay it on top of Layer 1: **on any conflict, the service value WINS** for architecture,
|
|
190
|
+
coding standards, and error handling. Layer-1 values that the service does not redefine
|
|
191
|
+
(e.g. git conventions, banned patterns shared org-wide) remain in effect.
|
|
192
|
+
|
|
193
|
+
From the **merged** result, extract and store:
|
|
171
194
|
|
|
172
195
|
- **ยง1 Project Overview** โ project name, language, framework, build/test commands, domains
|
|
173
|
-
- **ยง2 Architecture** โ layer order (e.g., Controller โ Facade โ Service โ Repository), architectural rules
|
|
174
|
-
- **ยง3 Coding Standards** โ naming conventions (classes, methods), response wrapper type, forbidden patterns
|
|
175
|
-
- **ยง5 Error Handling** โ exception types, HTTP status code mapping, not-found exception class name
|
|
176
|
-
- **ยง7 Git Conventions** โ branch naming pattern, commit message format
|
|
196
|
+
- **ยง2 Architecture** โ layer order (e.g., Controller โ Facade โ Service โ Repository), architectural rules โ *service overlay wins*
|
|
197
|
+
- **ยง3 Coding Standards** โ naming conventions (classes, methods), response wrapper type, forbidden patterns โ *service overlay wins*
|
|
198
|
+
- **ยง5 Error Handling** โ exception types, HTTP status code mapping, not-found exception class name โ *service overlay wins*
|
|
199
|
+
- **ยง7 Git Conventions** โ branch naming pattern, commit message format โ *root baseline unless service redefines*
|
|
177
200
|
|
|
178
|
-
|
|
201
|
+
**Resolution rules:**
|
|
202
|
+
- If both layers exist โ merge as above; record `claude_md_source = root + {service_root}`.
|
|
203
|
+
- If only the service overlay exists (no root CLAUDE.md) โ use the service file alone; `claude_md_source = {service_root}`.
|
|
204
|
+
- 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).
|
|
205
|
+
- If neither exists โ note CLAUDE.md as missing and continue with project-context.yaml data only.
|
|
179
206
|
|
|
180
207
|
---
|
|
181
208
|
|
|
@@ -275,7 +302,8 @@ Output exactly this block:
|
|
|
275
302
|
[CTX LOADED]
|
|
276
303
|
Stack : {language} / {framework} / {database}
|
|
277
304
|
Platform : {active_module} ({platform_type})
|
|
278
|
-
Layers : {layer order from CLAUDE.md ยง2, e.g., Controller โ Facade โ Service โ Repository}
|
|
305
|
+
Layers : {layer order from merged CLAUDE.md ยง2, e.g., Controller โ Facade โ Service โ Repository}
|
|
306
|
+
CLAUDE.md : {root + {service_root} | {service_root} only | root only | โ ๏ธ service overlay MISSING โ using root | missing}
|
|
279
307
|
Ticket : {ticket_prefix}-
|
|
280
308
|
Dict : {loaded โ N canonical terms, M banned terms | missing}
|
|
281
309
|
Entities : {loaded โ EntityA, EntityB, EntityC | missing}
|
|
@@ -442,6 +470,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
442
470
|
| /generate-design-spec | Designer review โ Figma links confirmed โ PO + Designer sign-off โ `/generate-bdd {prd-file}` |
|
|
443
471
|
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
444
472
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
473
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (resolve ๐ด blocker gaps first) |
|
|
474
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
475
|
+
| /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
|
|
476
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
|
|
477
|
+
| /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
|
|
478
|
+
| /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
|
|
479
|
+
| /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
|
|
445
480
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
446
481
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
447
482
|
| /generate-code | First gen โ `/review-code {UC-ID}`; re-gen โ `/dev-gen-test {UC-ID}` |
|
|
@@ -586,6 +621,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
586
621
|
| /generate-design-spec | Designer review โ Figma links confirmed โ PO + Designer sign-off โ `/generate-bdd {prd-file}` |
|
|
587
622
|
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
588
623
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
624
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (resolve ๐ด blocker gaps first) |
|
|
625
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
626
|
+
| /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
|
|
627
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
|
|
628
|
+
| /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
|
|
629
|
+
| /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
|
|
630
|
+
| /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
|
|
589
631
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
590
632
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
591
633
|
| /generate-code | First gen โ `/review-code {UC-ID}`; re-gen โ `/dev-gen-test {UC-ID}` |
|
|
@@ -687,6 +729,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
687
729
|
| /generate-design-spec | Designer review โ Figma links confirmed โ PO + Designer sign-off โ `/generate-bdd {prd-file}` |
|
|
688
730
|
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
689
731
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
732
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (resolve ๐ด blocker gaps first) |
|
|
733
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
734
|
+
| /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
|
|
735
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
|
|
736
|
+
| /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
|
|
737
|
+
| /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
|
|
738
|
+
| /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
|
|
690
739
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
691
740
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
692
741
|
| /generate-code | First gen โ `/review-code {UC-ID}`; re-gen โ `/dev-gen-test {UC-ID}` |
|
|
@@ -141,6 +141,8 @@ Read `.agent/project-context.yaml`. Extract and store:
|
|
|
141
141
|
- `paths.specs_dir` โ BDD specs root
|
|
142
142
|
- `paths.prd_dir` โ PRD documents root
|
|
143
143
|
- `paths.refinement_dir` โ findings/review output dir
|
|
144
|
+
- `paths.qc_dir` โ QC automation artifacts root (visible top-level, one subfolder per UC: `{qc_dir}/{UC-ID}/`)
|
|
145
|
+
- `paths.qc_skills_dir` โ where qc-* commands load QC skills from (default bundled `.agent/skills/qc`; override to the QC team's own repo/submodule so framework upgrade won't overwrite them)
|
|
144
146
|
- `paths.product_definitions_dir` โ product definitions root
|
|
145
147
|
- `paths.domain_knowledge_dir` โ domain knowledge root
|
|
146
148
|
- `paths.business_dictionary` โ path to business-dictionary.md
|
|
@@ -153,6 +155,8 @@ If `paths` section is absent, use these defaults:
|
|
|
153
155
|
- `specs_dir` = `specs/bdd`
|
|
154
156
|
- `prd_dir` = `specs/prd`
|
|
155
157
|
- `refinement_dir` = `.agent/review`
|
|
158
|
+
- `qc_dir` = `docs`
|
|
159
|
+
- `qc_skills_dir` = `.agent/skills/qc`
|
|
156
160
|
- `product_definitions_dir` = `specs/product-definition`
|
|
157
161
|
- `domain_knowledge_dir` = `specs/domain-knowledge`
|
|
158
162
|
- `business_dictionary` = `specs/domain-knowledge/business-dictionary.md`
|
|
@@ -197,6 +201,7 @@ If `services` section is present:
|
|
|
197
201
|
- Override `paths.core_entities` โ `{spec_source}/specs/domain-knowledge/core-entities.md`
|
|
198
202
|
- Override `paths.bug_reports_dir` โ `{spec_source}/feedback/bug-reports`
|
|
199
203
|
- Override `paths.bdd_proposals_dir` โ `{spec_source}/feedback/bdd-proposals`
|
|
204
|
+
- Override `paths.prd_change_requests_dir` โ `{spec_source}/feedback/prd-change-requests`
|
|
200
205
|
|
|
201
206
|
> **Why under `spec_source`:** PRD, design-spec, domain knowledge, the **API contract (tech-docs)**, and tester feedback are all **cross-team artifacts** โ they must live in the **shared spec repo** so every umbrella (FE/App/BE) reads the same source via `/sync`. Tech-docs specifically: BE authors the tech-design (API contract), commits + pushes it into the spec submodule (2-layer commit), and FE/App pull it on their next `/sync` to wire the real API in `/generate-code --phase=integration`. In single-service mode (no `spec_source`), these default under the repo root โ still shared, same repo.
|
|
202
207
|
|
|
@@ -237,19 +242,41 @@ If the file does not exist โ skip silently.
|
|
|
237
242
|
|
|
238
243
|
---
|
|
239
244
|
|
|
240
|
-
## Step 3 โ [CRITICAL] Load CLAUDE.md
|
|
245
|
+
## Step 3 โ [CRITICAL] Load CLAUDE.md (layered: root + service overlay)
|
|
241
246
|
|
|
242
247
|
*This is the highest-priority context โ it defines HOW to write code and documents for this project.*
|
|
243
248
|
|
|
244
|
-
|
|
249
|
+
CLAUDE.md is loaded in **two layers** so umbrella-wide rules and service-specific
|
|
250
|
+
architecture/coding standards compose correctly. The agent always sits at the umbrella
|
|
251
|
+
root, but the implementation code lives in a service submodule with its OWN stack,
|
|
252
|
+
architecture, and conventions โ so the service's CLAUDE.md must win for code generation.
|
|
253
|
+
|
|
254
|
+
**Layer 1 โ [BASE] Root CLAUDE.md (umbrella-wide).**
|
|
255
|
+
Read `CLAUDE.md` at the repo root. Treat its contents as the **shared baseline** for the
|
|
256
|
+
whole umbrella โ git conventions, data-protection posture, cross-cutting rules, and (in
|
|
257
|
+
single-service mode) the project's only architecture + coding standards.
|
|
258
|
+
|
|
259
|
+
**Layer 2 โ [OVERLAY] Service CLAUDE.md (umbrella mode only).**
|
|
260
|
+
*Run only if `service_root` was set in Step 1.6 (i.e. a real service was routed to).*
|
|
261
|
+
Read `{service_root}/CLAUDE.md`. This file defines the architecture + coding standards of
|
|
262
|
+
the **actual stack being implemented** (e.g. `user-service` = java-spring, `web` = nextjs).
|
|
263
|
+
Overlay it on top of Layer 1: **on any conflict, the service value WINS** for architecture,
|
|
264
|
+
coding standards, and error handling. Layer-1 values that the service does not redefine
|
|
265
|
+
(e.g. git conventions, banned patterns shared org-wide) remain in effect.
|
|
266
|
+
|
|
267
|
+
From the **merged** result, extract and store:
|
|
245
268
|
|
|
246
269
|
- **ยง1 Project Overview** โ project name, language, framework, build/test commands, domains
|
|
247
|
-
- **ยง2 Architecture** โ layer order (e.g., Controller โ Facade โ Service โ Repository), architectural rules
|
|
248
|
-
- **ยง3 Coding Standards** โ naming conventions (classes, methods), response wrapper type, forbidden patterns
|
|
249
|
-
- **ยง5 Error Handling** โ exception types, HTTP status code mapping, not-found exception class name
|
|
250
|
-
- **ยง7 Git Conventions** โ branch naming pattern, commit message format
|
|
270
|
+
- **ยง2 Architecture** โ layer order (e.g., Controller โ Facade โ Service โ Repository), architectural rules โ *service overlay wins*
|
|
271
|
+
- **ยง3 Coding Standards** โ naming conventions (classes, methods), response wrapper type, forbidden patterns โ *service overlay wins*
|
|
272
|
+
- **ยง5 Error Handling** โ exception types, HTTP status code mapping, not-found exception class name โ *service overlay wins*
|
|
273
|
+
- **ยง7 Git Conventions** โ branch naming pattern, commit message format โ *root baseline unless service redefines*
|
|
251
274
|
|
|
252
|
-
|
|
275
|
+
**Resolution rules:**
|
|
276
|
+
- If both layers exist โ merge as above; record `claude_md_source = root + {service_root}`.
|
|
277
|
+
- If only the service overlay exists (no root CLAUDE.md) โ use the service file alone; `claude_md_source = {service_root}`.
|
|
278
|
+
- 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).
|
|
279
|
+
- If neither exists โ note CLAUDE.md as missing and continue with project-context.yaml data only.
|
|
253
280
|
|
|
254
281
|
---
|
|
255
282
|
|
|
@@ -349,7 +376,8 @@ Output exactly this block:
|
|
|
349
376
|
[CTX LOADED]
|
|
350
377
|
Stack : {language} / {framework} / {database}
|
|
351
378
|
Platform : {active_module} ({platform_type})
|
|
352
|
-
Layers : {layer order from CLAUDE.md ยง2, e.g., Controller โ Facade โ Service โ Repository}
|
|
379
|
+
Layers : {layer order from merged CLAUDE.md ยง2, e.g., Controller โ Facade โ Service โ Repository}
|
|
380
|
+
CLAUDE.md : {root + {service_root} | {service_root} only | root only | โ ๏ธ service overlay MISSING โ using root | missing}
|
|
353
381
|
Ticket : {ticket_prefix}-
|
|
354
382
|
Dict : {loaded โ N canonical terms, M banned terms | missing}
|
|
355
383
|
Entities : {loaded โ EntityA, EntityB, EntityC | missing}
|
|
@@ -471,6 +499,13 @@ Suggest the logical next command based on workflow phase:
|
|
|
471
499
|
| /generate-design-spec | Designer review โ Figma links confirmed โ PO + Designer sign-off โ `/generate-bdd {prd-file}` |
|
|
472
500
|
| /generate-bdd | `/review-context {feature-file}` to verify coverage |
|
|
473
501
|
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` if APPROVED; regenerate if NEEDS_FIX |
|
|
502
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (resolve ๐ด blocker gaps first) |
|
|
503
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
504
|
+
| /qc-design-test | `/qc-review {UC-ID}` (test-case review) |
|
|
505
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` if APPROVED; fix TCs if NEEDS_FIX |
|
|
506
|
+
| /qc-run-test | `/qc-report {UC-ID}` then `/qc-review {UC-ID}` (script review) |
|
|
507
|
+
| /qc-review (script) | `/qc-report {UC-ID}` then create PR if APPROVED |
|
|
508
|
+
| /qc-report | `/validate-traces {UC-ID}` to refresh Living Docs (qc_status) |
|
|
474
509
|
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
475
510
|
| /review-tech-docs | `/generate-code {feature-file}` if APPROVED; fix doc if NEEDS_FIX |
|
|
476
511
|
| /generate-code | First gen โ `/review-code {UC-ID}`; re-gen โ `/dev-gen-test {UC-ID}` |
|