@educa-corp/sdd-framework 0.1.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/bin/build.js +230 -0
- package/bin/index.js +609 -0
- package/commands/debug.md +835 -0
- package/commands/debug.tmpl +257 -0
- package/commands/define-product.md +746 -0
- package/commands/define-product.tmpl +191 -0
- package/commands/dev-gen-test.md +1015 -0
- package/commands/dev-gen-test.tmpl +490 -0
- package/commands/dev-run-test.md +749 -0
- package/commands/dev-run-test.tmpl +224 -0
- package/commands/dev-smoke-test.md +716 -0
- package/commands/dev-smoke-test.tmpl +217 -0
- package/commands/fix-bug.md +749 -0
- package/commands/fix-bug.tmpl +171 -0
- package/commands/generate-bdd.md +1144 -0
- package/commands/generate-bdd.tmpl +499 -0
- package/commands/generate-code.md +1038 -0
- package/commands/generate-code.tmpl +513 -0
- package/commands/generate-design-spec.md +1079 -0
- package/commands/generate-design-spec.tmpl +524 -0
- package/commands/generate-prd.md +945 -0
- package/commands/generate-prd.tmpl +166 -0
- package/commands/generate-spec-manifest.md +663 -0
- package/commands/generate-spec-manifest.tmpl +164 -0
- package/commands/generate-tech-docs.md +1249 -0
- package/commands/generate-tech-docs.tmpl +252 -0
- package/commands/learn.md +641 -0
- package/commands/learn.tmpl +63 -0
- package/commands/map-testids.md +580 -0
- package/commands/map-testids.tmpl +81 -0
- package/commands/propose-scenario.md +632 -0
- package/commands/propose-scenario.tmpl +133 -0
- package/commands/qc-analyze.md +611 -0
- package/commands/qc-analyze.tmpl +112 -0
- package/commands/qc-design-test.md +567 -0
- package/commands/qc-design-test.tmpl +68 -0
- package/commands/qc-plan.md +548 -0
- package/commands/qc-plan.tmpl +49 -0
- package/commands/qc-report.md +559 -0
- package/commands/qc-report.tmpl +60 -0
- package/commands/qc-review.md +552 -0
- package/commands/qc-review.tmpl +53 -0
- package/commands/qc-run-test.md +609 -0
- package/commands/qc-run-test.tmpl +84 -0
- package/commands/refine-prd.md +992 -0
- package/commands/refine-prd.tmpl +278 -0
- package/commands/report-bug.md +647 -0
- package/commands/report-bug.tmpl +148 -0
- package/commands/review-code.md +682 -0
- package/commands/review-code.tmpl +104 -0
- package/commands/review-context.md +1202 -0
- package/commands/review-context.tmpl +488 -0
- package/commands/review-tech-docs.md +871 -0
- package/commands/review-tech-docs.tmpl +372 -0
- package/commands/setup-ai-first.md +546 -0
- package/commands/setup-ai-first.tmpl +358 -0
- package/commands/sync.md +451 -0
- package/commands/sync.tmpl +351 -0
- package/commands/update-framework.md +251 -0
- package/commands/update-framework.tmpl +151 -0
- package/commands/validate-traces.md +928 -0
- package/commands/validate-traces.tmpl +429 -0
- package/core/FRAMEWORK_VERSION +1 -0
- package/core/commands/debug.md +835 -0
- package/core/commands/define-product.md +746 -0
- package/core/commands/dev-gen-test.md +1015 -0
- package/core/commands/dev-run-test.md +749 -0
- package/core/commands/dev-smoke-test.md +716 -0
- package/core/commands/fix-bug.md +749 -0
- package/core/commands/generate-bdd.md +1144 -0
- package/core/commands/generate-code.md +1038 -0
- package/core/commands/generate-design-spec.md +1079 -0
- package/core/commands/generate-prd.md +945 -0
- package/core/commands/generate-spec-manifest.md +663 -0
- package/core/commands/generate-tech-docs.md +1249 -0
- package/core/commands/learn.md +641 -0
- package/core/commands/map-testids.md +580 -0
- package/core/commands/propose-scenario.md +632 -0
- package/core/commands/qc-analyze.md +611 -0
- package/core/commands/qc-design-test.md +567 -0
- package/core/commands/qc-plan.md +548 -0
- package/core/commands/qc-report.md +559 -0
- package/core/commands/qc-review.md +552 -0
- package/core/commands/qc-run-test.md +609 -0
- package/core/commands/refine-prd.md +992 -0
- package/core/commands/report-bug.md +647 -0
- package/core/commands/review-code.md +682 -0
- package/core/commands/review-context.md +1202 -0
- package/core/commands/review-tech-docs.md +871 -0
- package/core/commands/setup-ai-first.md +546 -0
- package/core/commands/sync.md +451 -0
- package/core/commands/update-framework.md +251 -0
- package/core/commands/validate-traces.md +928 -0
- package/core/hooks/data-guard.js +141 -0
- package/core/hooks/settings.json +18 -0
- package/core/modules/android-compose/module.yaml +13 -0
- package/core/modules/android-compose/stack-profile.yaml +57 -0
- package/core/modules/angular/architecture-snippets/component-patterns.md +187 -0
- package/core/modules/angular/module.yaml +6 -0
- package/core/modules/angular/stack-profile.yaml +38 -0
- package/core/modules/context-engineering/architecture-snippets/context-design.md +119 -0
- package/core/modules/context-engineering/module.yaml +9 -0
- package/core/modules/context-engineering/stack-profile.yaml +61 -0
- package/core/modules/dotnet/architecture-snippets/clean-arch.md +160 -0
- package/core/modules/dotnet/module.yaml +6 -0
- package/core/modules/dotnet/stack-profile.yaml +50 -0
- package/core/modules/flutter/module.yaml +14 -0
- package/core/modules/flutter/stack-profile.yaml +59 -0
- package/core/modules/golang/architecture-snippets/domain-layout.md +283 -0
- package/core/modules/golang/module.yaml +6 -0
- package/core/modules/golang/stack-profile.yaml +40 -0
- package/core/modules/ios-swiftui/module.yaml +13 -0
- package/core/modules/ios-swiftui/stack-profile.yaml +55 -0
- package/core/modules/java-spring/architecture-snippets/layered-arch.md +201 -0
- package/core/modules/java-spring/module.yaml +15 -0
- package/core/modules/java-spring/stack-profile.yaml +28 -0
- package/core/modules/nextjs/architecture-snippets/app-router-patterns.md +269 -0
- package/core/modules/nextjs/module.yaml +14 -0
- package/core/modules/nextjs/stack-profile.yaml +74 -0
- package/core/modules/nuxt/module.yaml +14 -0
- package/core/modules/nuxt/stack-profile.yaml +58 -0
- package/core/modules/php-laravel/architecture-snippets/service-repository.md +302 -0
- package/core/modules/php-laravel/module.yaml +15 -0
- package/core/modules/php-laravel/stack-profile.yaml +56 -0
- package/core/modules/qc-playwright/stack-profile.yaml +66 -0
- package/core/modules/react/architecture-snippets/hooks-query-patterns.md +254 -0
- package/core/modules/react/module.yaml +14 -0
- package/core/modules/react/stack-profile.yaml +63 -0
- package/core/modules/react-native/module.yaml +14 -0
- package/core/modules/react-native/stack-profile.yaml +56 -0
- package/core/modules/vue/module.yaml +14 -0
- package/core/modules/vue/stack-profile.yaml +65 -0
- package/core/rules/data-protection.md +80 -0
- package/core/rules/workflow.md +44 -0
- package/core/skills/code/SKILL.md +19 -0
- package/core/skills/debug/SKILL.md +19 -0
- package/core/skills/design-spec/SKILL.md +11 -0
- package/core/skills/discovery/SKILL.md +14 -0
- package/core/skills/prd/SKILL.md +19 -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 +11 -0
- package/core/skills/spec/SKILL.md +19 -0
- package/core/skills/test/SKILL.md +18 -0
- package/core/steps/business-language.md +56 -0
- package/core/steps/capture-lesson.md +79 -0
- package/core/steps/context-loader.md +311 -0
- package/core/steps/gate.md +88 -0
- package/core/steps/report-footer.md +100 -0
- package/core/steps/review-fanout.md +159 -0
- package/core/steps/spawn-agent.md +129 -0
- package/core/steps/trace-mirror.md +26 -0
- package/core/templates/architecture.template.md +113 -0
- package/core/templates/design-spec.template.md +217 -0
- package/core/templates/feature.template +120 -0
- package/core/templates/platform-guide.template.md +145 -0
- package/core/templates/prd.template.md +224 -0
- package/core/templates/product-definition.template.md +188 -0
- package/core/templates/project-context.yaml +161 -0
- package/core/templates/tech-design.template.md +498 -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 +156 -0
- package/docs/01-getting-started/quickstart.md +86 -0
- package/docs/02-guides/README.md +26 -0
- package/docs/02-guides/bdd-input-checklist.md +68 -0
- package/docs/02-guides/developer/README.md +49 -0
- package/docs/02-guides/developer/bdd-and-trace.md +126 -0
- package/docs/02-guides/developer/commands.md +76 -0
- package/docs/02-guides/developer/pr-checklist.md +16 -0
- package/docs/02-guides/developer/scenarios.md +460 -0
- package/docs/02-guides/developer/workflow.md +121 -0
- package/docs/02-guides/prd-input-checklist.md +94 -0
- package/docs/02-guides/product-owner/README.md +81 -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 +438 -0
- package/docs/02-guides/tech-docs-input-checklist.md +109 -0
- package/docs/02-guides/tester/README.md +75 -0
- package/docs/02-guides/tester/bug-reporting.md +117 -0
- package/docs/02-guides/tester/qc-automation.md +165 -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 +130 -0
- package/docs/02-guides/tester/test-checklist.md +31 -0
- package/docs/02-guides/tester/workflow.md +77 -0
- package/docs/03-concepts/README.md +20 -0
- package/docs/03-concepts/architecture.md +248 -0
- package/docs/03-concepts/mechanisms-explained.md +124 -0
- package/docs/03-concepts/pipeline.md +278 -0
- package/docs/03-concepts/traceability.md +152 -0
- package/docs/04-operations/README.md +33 -0
- package/docs/04-operations/bug-flow.md +364 -0
- package/docs/04-operations/publishing.md +154 -0
- package/docs/04-operations/sync-and-update.md +522 -0
- package/docs/05-reference/README.md +34 -0
- package/docs/05-reference/command-cheatsheet.md +147 -0
- package/docs/05-reference/commands.md +234 -0
- package/docs/05-reference/model-selection.md +74 -0
- package/docs/05-reference/modules.md +110 -0
- package/docs/05-reference/trace-schema.md +154 -0
- package/docs/06-commands/README.md +75 -0
- package/docs/06-commands/explain-debug.md +32 -0
- package/docs/06-commands/explain-define-product.md +43 -0
- package/docs/06-commands/explain-dev-gen-test.md +28 -0
- package/docs/06-commands/explain-dev-run-test.md +24 -0
- package/docs/06-commands/explain-dev-smoke-test.md +25 -0
- package/docs/06-commands/explain-fix-bug.md +28 -0
- package/docs/06-commands/explain-generate-bdd.md +45 -0
- package/docs/06-commands/explain-generate-code.md +53 -0
- package/docs/06-commands/explain-generate-design-spec.md +54 -0
- package/docs/06-commands/explain-generate-prd.md +45 -0
- package/docs/06-commands/explain-generate-spec-manifest.md +20 -0
- package/docs/06-commands/explain-generate-tech-docs.md +56 -0
- package/docs/06-commands/explain-learn.md +21 -0
- package/docs/06-commands/explain-map-testids.md +28 -0
- package/docs/06-commands/explain-propose-scenario.md +24 -0
- package/docs/06-commands/explain-qc-analyze.md +22 -0
- package/docs/06-commands/explain-qc-design-test.md +20 -0
- package/docs/06-commands/explain-qc-plan.md +21 -0
- package/docs/06-commands/explain-qc-report.md +23 -0
- package/docs/06-commands/explain-qc-review.md +24 -0
- package/docs/06-commands/explain-qc-run-test.md +27 -0
- package/docs/06-commands/explain-refine-prd.md +51 -0
- package/docs/06-commands/explain-report-bug.md +24 -0
- package/docs/06-commands/explain-review-code.md +45 -0
- package/docs/06-commands/explain-review-context.md +68 -0
- package/docs/06-commands/explain-review-tech-docs.md +45 -0
- package/docs/06-commands/explain-setup-ai-first.md +25 -0
- package/docs/06-commands/explain-sync.md +24 -0
- package/docs/06-commands/explain-update-framework.md +22 -0
- package/docs/06-commands/explain-validate-traces.md +25 -0
- package/docs/README.md +53 -0
- package/docs/t-sample.md +826 -0
- package/hooks/data-guard.js +141 -0
- package/hooks/settings.json +18 -0
- package/modules/android-compose/module.yaml +13 -0
- package/modules/android-compose/stack-profile.yaml +57 -0
- package/modules/angular/architecture-snippets/component-patterns.md +187 -0
- package/modules/angular/module.yaml +6 -0
- package/modules/angular/stack-profile.yaml +38 -0
- package/modules/context-engineering/architecture-snippets/context-design.md +119 -0
- package/modules/context-engineering/module.yaml +9 -0
- package/modules/context-engineering/stack-profile.yaml +61 -0
- package/modules/dotnet/architecture-snippets/clean-arch.md +160 -0
- package/modules/dotnet/module.yaml +6 -0
- package/modules/dotnet/stack-profile.yaml +50 -0
- package/modules/flutter/module.yaml +14 -0
- package/modules/flutter/stack-profile.yaml +59 -0
- package/modules/golang/architecture-snippets/domain-layout.md +283 -0
- package/modules/golang/module.yaml +6 -0
- package/modules/golang/stack-profile.yaml +40 -0
- package/modules/ios-swiftui/module.yaml +13 -0
- package/modules/ios-swiftui/stack-profile.yaml +55 -0
- package/modules/java-spring/architecture-snippets/layered-arch.md +201 -0
- package/modules/java-spring/module.yaml +15 -0
- package/modules/java-spring/stack-profile.yaml +28 -0
- package/modules/nextjs/architecture-snippets/app-router-patterns.md +269 -0
- package/modules/nextjs/module.yaml +14 -0
- package/modules/nextjs/stack-profile.yaml +74 -0
- package/modules/nuxt/module.yaml +14 -0
- package/modules/nuxt/stack-profile.yaml +58 -0
- package/modules/php-laravel/architecture-snippets/service-repository.md +302 -0
- package/modules/php-laravel/module.yaml +15 -0
- package/modules/php-laravel/stack-profile.yaml +56 -0
- package/modules/qc-playwright/stack-profile.yaml +66 -0
- package/modules/react/architecture-snippets/hooks-query-patterns.md +254 -0
- package/modules/react/module.yaml +14 -0
- package/modules/react/stack-profile.yaml +63 -0
- package/modules/react-native/module.yaml +14 -0
- package/modules/react-native/stack-profile.yaml +56 -0
- package/modules/vue/module.yaml +14 -0
- package/modules/vue/stack-profile.yaml +65 -0
- package/package.json +49 -0
- package/readme.txt +1 -0
- package/rules/data-protection.md +80 -0
- package/rules/workflow.md +44 -0
- package/scripts/init.sh +49 -0
- package/scripts/migrate-specs.js +258 -0
- package/scripts/rename-prd-files.js +174 -0
- package/scripts/upgrade.sh +94 -0
- package/skills/code/SKILL.md +19 -0
- package/skills/code/SKILL.tmpl +19 -0
- package/skills/debug/SKILL.md +19 -0
- package/skills/debug/SKILL.tmpl +19 -0
- package/skills/design-spec/SKILL.md +11 -0
- package/skills/design-spec/SKILL.tmpl +11 -0
- package/skills/discovery/SKILL.md +14 -0
- package/skills/discovery/SKILL.tmpl +14 -0
- package/skills/prd/SKILL.md +19 -0
- package/skills/prd/SKILL.tmpl +19 -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 +11 -0
- package/skills/setup-ai-first/SKILL.tmpl +11 -0
- package/skills/spec/SKILL.md +19 -0
- package/skills/spec/SKILL.tmpl +19 -0
- package/skills/test/SKILL.md +18 -0
- package/skills/test/SKILL.tmpl +18 -0
- package/steps/business-language.md +56 -0
- package/steps/capture-lesson.md +79 -0
- package/steps/context-loader.md +311 -0
- package/steps/gate.md +88 -0
- package/steps/report-footer.md +100 -0
- package/steps/review-fanout.md +159 -0
- package/steps/spawn-agent.md +129 -0
- package/steps/trace-mirror.md +26 -0
- package/templates/architecture.template.md +113 -0
- package/templates/design-spec.template.md +217 -0
- package/templates/feature.template +120 -0
- package/templates/platform-guide.template.md +145 -0
- package/templates/prd.template.md +224 -0
- package/templates/product-definition.template.md +188 -0
- package/templates/project-context.yaml +161 -0
- package/templates/tech-design.template.md +498 -0
|
@@ -0,0 +1,451 @@
|
|
|
1
|
+
# /sync — Sync & Refresh Umbrella Project
|
|
2
|
+
|
|
3
|
+
Một lệnh cho cả **setup lần đầu** lẫn **cập nhật hằng ngày** một umbrella repo có git submodule.
|
|
4
|
+
An toàn chạy lặp lại — tự phát hiện cần làm gì.
|
|
5
|
+
|
|
6
|
+
**Argument tuỳ chọn:** `/sync [spec-branch]` — branch của spec submodule để pull (vd `/sync develop`). Nếu bỏ, branch được phân giải tự động (xem Step 0-D).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Step 0 — Pre-flight Checks
|
|
11
|
+
|
|
12
|
+
**A. Git repo check**
|
|
13
|
+
|
|
14
|
+
Xác minh thư mục hiện tại nằm trong git repo. Nếu không → dừng:
|
|
15
|
+
```
|
|
16
|
+
❌ Not a git repository. Open Claude Code from umbrella root and retry.
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**B. Đọc project config sớm**
|
|
20
|
+
|
|
21
|
+
Đọc `.agent/project-context.yaml` trước khi chạy lệnh git nào. Trích:
|
|
22
|
+
- `setup.spec_source` → path của spec submodule (vd `"my-project-specs"`)
|
|
23
|
+
- `services` → map domain → `{path, module, ...}` cho mỗi service submodule
|
|
24
|
+
|
|
25
|
+
Cần cái này để phân biệt spec vs service submodule ở Step 1.
|
|
26
|
+
|
|
27
|
+
Nếu `.agent/project-context.yaml` không tồn tại → cảnh báo và set `spec_source = null`, `services = {}`.
|
|
28
|
+
|
|
29
|
+
**C. Submodule status scan**
|
|
30
|
+
|
|
31
|
+
Chạy `git submodule status --recursive` và phân loại mỗi entry theo ký tự đầu:
|
|
32
|
+
|
|
33
|
+
| Char | Ý nghĩa | Hành động |
|
|
34
|
+
|------|---------|--------|
|
|
35
|
+
| `-` | Chưa init | → **Setup mode** |
|
|
36
|
+
| ` ` | Khớp pointer đã ghi | → OK |
|
|
37
|
+
| `+` | Ahead của pointer đã ghi (local advance chưa commit) | → cảnh báo từng submodule |
|
|
38
|
+
| `U` | Merge conflict | → **STOP** |
|
|
39
|
+
|
|
40
|
+
Nếu **bất kỳ** entry nào có `U`:
|
|
41
|
+
```
|
|
42
|
+
❌ Merge conflict in submodule: {path}
|
|
43
|
+
Resolve manually before running /sync:
|
|
44
|
+
cd {path} && git status
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Nếu **bất kỳ** entry nào có `+` (commit đang checkout khác pointer đã ghi):
|
|
48
|
+
```
|
|
49
|
+
ℹ️ {path} is ahead of the umbrella's recorded pointer.
|
|
50
|
+
/sync classifies it in Step 1b — if you're on a branch there, it stays untouched.
|
|
51
|
+
```
|
|
52
|
+
Đừng xử lý `+` ở đây — Step 1b quyết định cách xử lý đúng cho từng submodule.
|
|
53
|
+
|
|
54
|
+
In mode phát hiện: `Mode: Setup (first-time init)` hoặc `Mode: Update (sync latest)`.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Step 1 — Umbrella Pull
|
|
59
|
+
|
|
60
|
+
Ghi branch umbrella hiện tại trước (đây là cái `git pull` cập nhật):
|
|
61
|
+
`git rev-parse --abbrev-ref HEAD` → lưu thành `umbrella_branch` và hiển thị.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# 1. Pull latest umbrella (includes updated submodule pointer records)
|
|
65
|
+
git pull
|
|
66
|
+
|
|
67
|
+
# 2. Sync .gitmodules config into local git config
|
|
68
|
+
# (needed when new submodules were added since last clone)
|
|
69
|
+
git submodule sync --recursive
|
|
70
|
+
|
|
71
|
+
# 3. Initialize any NOT-yet-cloned submodules ONLY (the '-' entries from Step 0-C).
|
|
72
|
+
# Do NOT run a blanket `git submodule update --recursive` — that would detach
|
|
73
|
+
# a submodule you are actively working in. Per-submodule handling is Step 1b.
|
|
74
|
+
git submodule update --init {paths that were '-' in Step 0-C}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Nếu `git pull` exit khác 0 → in lỗi và dừng với `❌`.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Step 1b — Phân loại & Sync từng Submodule
|
|
82
|
+
|
|
83
|
+
**Ý tưởng cốt lõi:** `/sync` không bao giờ áp một branch lên submodule. Nó **kiểm tra checkout hiện tại của từng submodule** và tôn trọng nó. Đây là cách nó biết submodule nào bạn đang làm vs cái nào là dependency thụ động.
|
|
84
|
+
|
|
85
|
+
Với mỗi submodule (dùng `git submodule foreach` hoặc lặp các path), đọc state:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Inside each submodule:
|
|
89
|
+
git symbolic-ref --short -q HEAD # → branch name, or empty/non-zero if DETACHED
|
|
90
|
+
git status --porcelain # → non-empty means uncommitted local changes
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Phân loại vào một trong bốn case và xử lý tương ứng:
|
|
94
|
+
|
|
95
|
+
| Case | State phát hiện | Hành động |
|
|
96
|
+
|------|----------------|--------|
|
|
97
|
+
| **Spec submodule** | `path == spec_source` | Advance tới `spec_branch` (Step 1c bên dưới) |
|
|
98
|
+
| **Active (on a branch)** | HEAD là một branch, không detached | **KHÔNG checkout.** Đây là nơi bạn (hoặc đồng đội) đang code. Chỉ `git -C {path} fetch` và report branch + ahead/behind. Để working tree y nguyên. |
|
|
99
|
+
| **Passive (detached, clean)** | Detached HEAD, không có thay đổi local | An toàn align về pointer đã ghi của umbrella: `git submodule update {path}` |
|
|
100
|
+
| **Dirty (uncommitted changes)** | `git status --porcelain` non-empty | **Đừng đụng.** Cảnh báo: `⚠️ {path} has uncommitted changes — skipped. Commit or stash before syncing this submodule.` |
|
|
101
|
+
|
|
102
|
+
> **Vì sao quan trọng:** Một `git submodule update` toàn bộ checkout mọi submodule về **detached HEAD** ở pointer đã ghi. Nếu bạn đang checkout `feature/FEAT-01` trong `user-service/` và đang làm dở, cái đó sẽ âm thầm chuyển bạn khỏi branch. Phân loại trước bảo vệ công việc đang làm của bạn.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Step 1c — Advance Spec Submodule *(chỉ khi `spec_source` được cấu hình)*
|
|
107
|
+
|
|
108
|
+
Spec submodule là submodule duy nhất ta cố ý advance tới một branch HEAD (PO push spec liên tục).
|
|
109
|
+
|
|
110
|
+
**Phân giải spec branch** (giờ submodule đã init), theo thứ tự ưu tiên:
|
|
111
|
+
|
|
112
|
+
1. **Command argument** — nếu `$ARGUMENTS` chứa tên branch → dùng nó (override một lần)
|
|
113
|
+
2. **`.gitmodules` config** — `git config -f .gitmodules --get submodule.{spec_source}.branch`. Nếu set → dùng nó (default committed của team)
|
|
114
|
+
3. **Remote default** — else branch default của spec repo: `git -C {spec_source} rev-parse --abbrev-ref origin/HEAD` (bỏ prefix `origin/`)
|
|
115
|
+
|
|
116
|
+
Lưu thành `spec_branch` + `spec_branch_source` (argument | .gitmodules | remote-default). Nếu nó rơi xuống remote-default mà không có gì pin, thêm hint này vào output:
|
|
117
|
+
```
|
|
118
|
+
ℹ️ Spec submodule branch not pinned in .gitmodules — using remote default '{spec_branch}'.
|
|
119
|
+
To pin it for the whole team:
|
|
120
|
+
git config -f .gitmodules submodule.{spec_source}.branch {spec_branch}
|
|
121
|
+
git add .gitmodules && git commit -m "chore: pin spec submodule branch"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Rồi kiểm tra an toàn: nếu spec submodule có thay đổi chưa commit → cảnh báo và skip (dev nên coi spec là read-only). Ngược lại dùng **explicit checkout** (không phải `--remote` trần) để branch rõ ràng:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
cd {spec_source}
|
|
128
|
+
git fetch origin
|
|
129
|
+
git checkout {spec_branch} # branch resolved in Step 0-D
|
|
130
|
+
git pull origin {spec_branch}
|
|
131
|
+
cd - # back to umbrella root
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
In: `Spec submodule {spec_source}: pulled branch '{spec_branch}' (source: {spec_branch_source})`
|
|
135
|
+
|
|
136
|
+
> **Vì sao không `--remote` cho service submodule?** Service submodule bị version-lock bởi pointer đã ghi của umbrella — cố ý để mọi dev làm từ cùng commit. `--remote` sẽ bỏ qua lock này và tạo pointer drift chưa commit. Spec submodule là ngoại lệ: PO push liên tục, nên ta advance nó tới branch HEAD — nhưng làm bằng explicit `checkout {spec_branch}` thay vì `--remote` để nó không bao giờ âm thầm theo sai branch.
|
|
137
|
+
|
|
138
|
+
Nếu `git pull` hoặc `git submodule update` exit khác 0 → in lỗi và dừng với `❌`.
|
|
139
|
+
|
|
140
|
+
Thu từ output:
|
|
141
|
+
- Submodule nào đổi SHA
|
|
142
|
+
- Cái nào đã up to date
|
|
143
|
+
- `{old_sha}..{new_sha}` của spec submodule (cần cho Step 1d)
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Step 1d — Surface Feedback của Tester/QC *(bug report / scenario proposal / PRD change request)*
|
|
148
|
+
|
|
149
|
+
`/report-bug`, `/propose-scenario` của tester & QC (gồm cả PRD change request Case B) commit feedback vào spec repo. Step này cho PO/Dev biết cái gì tới trong **lần** pull này, để họ được thông báo qua routine bình thường. Nó phủ cả hai đối tượng:
|
|
150
|
+
|
|
151
|
+
- **Dev/tester trong umbrella** → feedback tới qua spec submodule advance (Step 1c)
|
|
152
|
+
- **PO làm trực tiếp trong spec repo** → feedback tới qua `git pull` của umbrella/current-repo (Step 1)
|
|
153
|
+
|
|
154
|
+
Chọn repo + range đã pull feedback:
|
|
155
|
+
- Umbrella có `spec_source` → `REPO={spec_source}`, range = spec submodule `{old_sha}..{new_sha}`
|
|
156
|
+
- Ngược lại (chạy trong chính spec repo) → `REPO=.`, range = `{old_sha}..{new_sha}` của `git pull` từ Step 1
|
|
157
|
+
|
|
158
|
+
Nếu `feedback/` không tồn tại trong REPO → skip âm thầm.
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
git -C {REPO} diff --name-status {old_sha}..{new_sha} -- feedback/bug-reports/ feedback/bdd-proposals/ feedback/prd-change-requests/
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Với mỗi entry, đọc title/summary + `State` và report. **Bug report: chỉ surface `State: Open`** là cần chú ý; liệt kê `Fixed`/`Closed` riêng (hoặc bỏ) để PO/PM thấy cái gì còn pending:
|
|
165
|
+
```
|
|
166
|
+
📥 New feedback (pulled this sync):
|
|
167
|
+
Bug reports (open):
|
|
168
|
+
BUG-20260608-01 FT-001 — account locks after 6 fails (spec says 5) [layer: Code · waiting: dev]
|
|
169
|
+
Bug reports (fixed, awaiting QC re-verify): BUG-20260605-02
|
|
170
|
+
Scenario proposals:
|
|
171
|
+
FT-001-trailing-spaces.md → maps to AC2 (pending review)
|
|
172
|
+
PRD change requests:
|
|
173
|
+
FT-001-bulk-export.md → new requirement, needs an AC (waiting: PO)
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Nếu không có gì đổi → in `📥 Feedback: none new this sync`.
|
|
177
|
+
|
|
178
|
+
Nếu người đọc là PO/Dev, thêm một dòng nudge:
|
|
179
|
+
`→ Review feedback/ then act: /fix-bug {BUG-ID} · promote proposal via /generate-bdd · or add an AC to the PRD.`
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Step 2 — Post-sync State Check
|
|
184
|
+
|
|
185
|
+
Chạy `git status --short` và kiểm tra entry submodule bị modified (dòng bắt đầu bằng ` M` mà path khớp một submodule).
|
|
186
|
+
|
|
187
|
+
Nếu pointer submodule nào đổi (thường là spec submodule sau `--remote`):
|
|
188
|
+
```
|
|
189
|
+
⚠️ Submodule pointer(s) updated — commit to lock new version into umbrella:
|
|
190
|
+
git add {spec_source} && git commit -m "chore: sync {spec_source} to latest"
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Nếu không có thay đổi → `✅ Umbrella state clean — no commit needed`.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Step 3 — Bootstrap Service Configs
|
|
198
|
+
|
|
199
|
+
*Skip nếu `services` rỗng.*
|
|
200
|
+
|
|
201
|
+
Với mỗi entry trong `services[]`:
|
|
202
|
+
|
|
203
|
+
**A. Nếu `{service.path}/.agent/project-context.yaml` đã tồn tại:**
|
|
204
|
+
- Đọc `conventions.test_command` và `conventions.build_command`
|
|
205
|
+
- Report: `✅ {service.path} — test: {test_command} | build: {build_command}`
|
|
206
|
+
|
|
207
|
+
**B. Nếu thiếu — tự tạo:**
|
|
208
|
+
|
|
209
|
+
1. Xác định `module` từ umbrella `services[].module` (authoritative). Nếu không set, auto-detect từ file trong `{service.path}/`:
|
|
210
|
+
|
|
211
|
+
| File có mặt | Module phát hiện | test_command | build_command |
|
|
212
|
+
|---|---|---|---|
|
|
213
|
+
| `pom.xml` | `java-spring` | `mvn test` | `mvn compile` |
|
|
214
|
+
| `build.gradle` or `build.gradle.kts` | `java-spring` | `./gradlew test` | `./gradlew build` |
|
|
215
|
+
| `go.mod` | `golang` | `go test ./...` | `go build ./...` |
|
|
216
|
+
| `*.csproj` or `*.sln` | `dotnet` | `dotnet test` | `dotnet build` |
|
|
217
|
+
| `composer.json` | `php-laravel` | `php artisan test` | `composer install` |
|
|
218
|
+
| `pubspec.yaml` | `flutter` | `flutter test` | `flutter build apk` |
|
|
219
|
+
| `angular.json` | `angular` | `npx ng test --watch=false` | `npm run build` |
|
|
220
|
+
| `next.config.*` | `nextjs` | `npx vitest run` | `npm run build` |
|
|
221
|
+
| `package.json` + `nest-cli.json` | `nestjs` | `npm test` | `npm run build` |
|
|
222
|
+
| `package.json` (fallback) | `react` | `npx vitest run` | `npm run build` |
|
|
223
|
+
| `requirements.txt` or `pyproject.toml` | `context-engineering` | `pytest tests/ -v` | `pip install -r requirements.txt` |
|
|
224
|
+
| *(none matched)* | `unknown` | `{{TEST_COMMAND}}` | `{{BUILD_COMMAND}}` |
|
|
225
|
+
|
|
226
|
+
2. Tạo thư mục `{service.path}/.agent/` nếu chưa có.
|
|
227
|
+
|
|
228
|
+
3. Ghi `{service.path}/.agent/project-context.yaml`:
|
|
229
|
+
|
|
230
|
+
```yaml
|
|
231
|
+
# Auto-generated by /sync — review and update as needed
|
|
232
|
+
tech_stack:
|
|
233
|
+
language: "{detected or from module}"
|
|
234
|
+
framework: "{detected or from module}"
|
|
235
|
+
module: "{module}"
|
|
236
|
+
|
|
237
|
+
conventions:
|
|
238
|
+
test_command: "{test_command}"
|
|
239
|
+
build_command: "{build_command}"
|
|
240
|
+
|
|
241
|
+
paths:
|
|
242
|
+
trace_dir: ".trace"
|
|
243
|
+
lessons_file: ".agent/project-lessons.md" # per-service guardrails (see /learn)
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
4. Report:
|
|
247
|
+
- Nếu auto-detect: `✅ Created {service.path}/.agent/project-context.yaml (module: {module}, test: {test_command})`
|
|
248
|
+
- Nếu unknown/placeholder: `⚠️ Created {service.path}/.agent/project-context.yaml — fill in {{TEST_COMMAND}} and {{BUILD_COMMAND}}`
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Step 4 — Check `.gitignore`
|
|
253
|
+
|
|
254
|
+
Kiểm tra các Living Docs mirror được sinh ra có gitignore không:
|
|
255
|
+
- `.trace/` trong `.gitignore` của repo hiện tại (hoặc `.git/info/exclude`)
|
|
256
|
+
- `.living-docs/` trong `.gitignore` của **specs module** (khi `setup.spec_source` được set)
|
|
257
|
+
|
|
258
|
+
Nếu thiếu cái nào:
|
|
259
|
+
```
|
|
260
|
+
⚠️ Living Docs mirrors not gitignored — they are generated, never commit them:
|
|
261
|
+
echo ".trace/" >> .gitignore
|
|
262
|
+
echo ".living-docs/" >> {spec_source}/.gitignore # specs module (if spec_source set)
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Step 5 — Refresh Living Docs *(chỉ umbrella mode)*
|
|
268
|
+
|
|
269
|
+
*Skip nếu `services` rỗng.*
|
|
270
|
+
|
|
271
|
+
**Phân giải Living Docs home (cùng quy tắc như `/validate-traces`):**
|
|
272
|
+
- `living_docs_dir` = `{spec_source}/.living-docs` nếu `setup.spec_source` được set, else `.living-docs` ở umbrella root. *(Specs module được mount trong mọi service workspace, nên panel phân giải nó kể cả khi dev mở một service submodule đơn.)*
|
|
273
|
+
- `panel_mirror` = `./.trace` ở gốc workspace hiện tại.
|
|
274
|
+
|
|
275
|
+
1. Với mỗi service trong `services[]`: nếu `{service.path}/.trace/` có file `.tsv` → copy chúng vào `{living_docs_dir}/{service-name}/` (tạo dir nếu cần).
|
|
276
|
+
2. Ghi merged `{living_docs_dir}/trace-report.json`:
|
|
277
|
+
- Tổng hợp TSV `.trace/` của mỗi service, thêm field `"service"` **và `"platform"`** (suy từ tên file `{UC-ID}-{platform}.tsv`) cho mỗi row, tính lại summary totals. **Không dedupe theo `sc_id` giữa các platform** — `web·SC1` và `system·SC1` là 2 row khác nhau; nhờ field `platform` dashboard hiển thị tách bạch coverage từng platform.
|
|
278
|
+
3. **Mirror tới panel location:** copy `{living_docs_dir}/trace-report.json` (+ TSV namespaced) → `{panel_mirror}/` để panel trong repo đang mở không rỗng. Skip nếu `panel_mirror` đã bằng `living_docs_dir`.
|
|
279
|
+
|
|
280
|
+
In kết quả sync:
|
|
281
|
+
```
|
|
282
|
+
Living Docs → {living_docs_dir}/ synced (canonical, specs module)
|
|
283
|
+
{service-name}: {N} TSVs
|
|
284
|
+
trace-report.json: {total} scenarios across {S} services
|
|
285
|
+
Panel mirror → {panel_mirror}/ (current workspace)
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Nếu không tìm thấy dir `.trace/` → `Living Docs: no trace data yet — run /generate-bdd then /generate-code first.`
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## Step 6 — Refresh Spec Manifest *(nếu có spec_source)*
|
|
293
|
+
|
|
294
|
+
*Skip nếu `setup.spec_source` vắng.*
|
|
295
|
+
|
|
296
|
+
Nếu `spec-manifest.yaml` tồn tại HOẶC `setup.spec_source` được cấu hình:
|
|
297
|
+
- Re-scan các file PRD `{spec_source}/specs/*/*/*.md` (file `.md` ở gốc mỗi feature folder = PRD; tech-docs/design-spec `.md` nằm sâu hơn nên không bị quét nhầm)
|
|
298
|
+
- Rebuild `spec-manifest.yaml` map TICKET-ID → path PRD/BDD/tech-doc
|
|
299
|
+
- In: `spec-manifest.yaml refreshed — {N} features indexed`
|
|
300
|
+
|
|
301
|
+
---
|
|
302
|
+
|
|
303
|
+
## Output
|
|
304
|
+
|
|
305
|
+
# Report Footer — Định dạng output chuẩn cho mọi lệnh
|
|
306
|
+
|
|
307
|
+
Mọi report của lệnh phải kết thúc bằng section footer chuẩn này.
|
|
308
|
+
|
|
309
|
+
## Status Badge
|
|
310
|
+
|
|
311
|
+
Chọn một theo kết quả:
|
|
312
|
+
- `✅ Complete` — mọi bước thành công, không có vấn đề
|
|
313
|
+
- `❌ Failed` — lệnh không hoàn thành được do lỗi chặn
|
|
314
|
+
- `⚠️ Warnings` — hoàn thành nhưng có vấn đề không chặn, nên review lại
|
|
315
|
+
|
|
316
|
+
## Output Artifacts
|
|
317
|
+
|
|
318
|
+
Liệt kê mọi file được tạo hoặc sửa bởi lệnh này:
|
|
319
|
+
```
|
|
320
|
+
Output Artifacts:
|
|
321
|
+
{created|updated} {file-path} ({mô tả ngắn})
|
|
322
|
+
{created|updated} {file-path} ({mô tả ngắn})
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Nếu không ghi file nào (vd: lệnh review hoặc phân tích) → ghi `Output Artifacts: none (read-only)`.
|
|
326
|
+
|
|
327
|
+
## Pipeline Position
|
|
328
|
+
|
|
329
|
+
In một sơ đồ pipeline một dòng, đánh dấu phase của lệnh HIỆN TẠI bằng `◀ bạn ở đây`,
|
|
330
|
+
để người dùng luôn thấy lệnh này nằm ở đâu trong luồng end-to-end:
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
Discovery → PRD → [Design Spec] → BDD → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Tìm lệnh hiện tại trong bảng phase dưới đây và đánh dấu **phase của nó** trong sơ đồ trên:
|
|
337
|
+
|
|
338
|
+
| Phase | Commands |
|
|
339
|
+
|-------|----------|
|
|
340
|
+
| Discovery | `/define-product` |
|
|
341
|
+
| PRD | `/generate-prd` · `/refine-prd` · `/review-context` (PRD) |
|
|
342
|
+
| Design Spec | `/generate-design-spec` |
|
|
343
|
+
| BDD | `/generate-bdd` · `/review-context` (BDD) |
|
|
344
|
+
| Tech Design | `/generate-tech-docs` · `/map-testids` · `/review-tech-docs` |
|
|
345
|
+
| Code | `/generate-code` · `/review-code` |
|
|
346
|
+
| Dev Self-Check | `/dev-gen-test` · `/dev-run-test` · `/dev-smoke-test` |
|
|
347
|
+
| QC | `/qc-analyze` · `/qc-plan` · `/qc-design-test` · `/qc-review` · `/qc-run-test` · `/qc-report` |
|
|
348
|
+
| Trace Audit | `/validate-traces` |
|
|
349
|
+
|
|
350
|
+
Với **lệnh review**, thêm vòng review 3 bước và đánh dấu bước hiện tại, vd:
|
|
351
|
+
`Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume`.
|
|
352
|
+
|
|
353
|
+
**Lệnh xuyên suốt** (`/sync`, `/update-framework`, `/fix-bug`, `/debug`, `/learn`,
|
|
354
|
+
`/report-bug`, `/propose-scenario`, `/generate-spec-manifest`) nằm ngoài pipeline tuyến tính —
|
|
355
|
+
**bỏ hẳn dòng Pipeline** cho các lệnh này (đừng cố nhét chúng vào sơ đồ).
|
|
356
|
+
|
|
357
|
+
## Gợi ý lệnh tiếp theo
|
|
358
|
+
|
|
359
|
+
Gợi ý lệnh kế tiếp hợp lý theo phase của workflow:
|
|
360
|
+
|
|
361
|
+
| Lệnh hiện tại | Gợi ý lệnh tiếp theo |
|
|
362
|
+
|-------------------------|-----------------------------------------------|
|
|
363
|
+
| /setup-ai-first | `/define-product` để bắt đầu feature đầu tiên |
|
|
364
|
+
| /define-product | `/generate-prd {product-definition-file}` |
|
|
365
|
+
| /generate-prd | `/refine-prd {prd-file}` rồi `/review-context {prd-file}` |
|
|
366
|
+
| /refine-prd | Mở Review Board → cập nhật PRD → `/review-context {prd-file}` |
|
|
367
|
+
| /review-context (PRD) | Khi 0 critical → PO đặt `Status: approved`, rồi FE/App: `/generate-design-spec {prd-file}` (→ design sign-off → BDD); BE: `/generate-bdd {prd-file}`. Còn critical/NEEDS_FIX → sửa PRD (giữ draft) |
|
|
368
|
+
| /generate-design-spec | Designer review → xác nhận link Figma → PO + Designer sign-off → `/generate-bdd {prd-file}` |
|
|
369
|
+
| /generate-bdd | `/review-context {feature-file}` để kiểm tra độ phủ |
|
|
370
|
+
| /review-context (BDD) | `/generate-tech-docs {UC-ID}` nếu APPROVED; sinh lại nếu NEEDS_FIX |
|
|
371
|
+
| /qc-analyze | `/qc-plan {UC-ID}` (xử lý các gap blocker 🔴 trước) |
|
|
372
|
+
| /qc-plan | `/qc-design-test {UC-ID}` |
|
|
373
|
+
| /qc-design-test | `/qc-review {UC-ID}` (review test-case) |
|
|
374
|
+
| /qc-review (test-case) | `/qc-run-test {UC-ID}` nếu APPROVED; sửa TC nếu NEEDS_FIX |
|
|
375
|
+
| /qc-run-test | `/qc-report {UC-ID}` rồi `/qc-review {UC-ID}` (review script) |
|
|
376
|
+
| /qc-review (script) | `/qc-report {UC-ID}` rồi tạo PR nếu APPROVED |
|
|
377
|
+
| /qc-report | `/validate-traces {UC-ID}` để làm mới Living Docs (qc_status) |
|
|
378
|
+
| /generate-tech-docs | `/review-tech-docs {tech-design-file}` |
|
|
379
|
+
| /review-tech-docs | `/generate-code {feature-file}` nếu APPROVED; sửa doc nếu NEEDS_FIX |
|
|
380
|
+
| /generate-code | Lần gen đầu → `/review-code {UC-ID}`; gen lại → `/dev-gen-test {UC-ID}` |
|
|
381
|
+
| /dev-gen-test | `/dev-run-test {UC-ID}` |
|
|
382
|
+
| /dev-run-test (passing) | `/review-code {UC-ID}` |
|
|
383
|
+
| /dev-run-test (failing) | `/fix-bug {ticket-id}` hoặc `/debug {error}` |
|
|
384
|
+
| /review-code | `/dev-smoke-test {UC-ID}` hoặc tạo PR |
|
|
385
|
+
| /dev-smoke-test | Tạo PR và link tới ticket |
|
|
386
|
+
| /validate-traces | DRIFT/UNTRACKED → `/generate-code {UC-ID}`; GAP → `/dev-gen-test {UC-ID}`; tất cả OK → tạo PR |
|
|
387
|
+
| /fix-bug | Tạo PR và link tới ticket |
|
|
388
|
+
| /debug | `/fix-bug {ticket-id}` nếu cần sửa |
|
|
389
|
+
| /report-bug | Gửi cho dev (`/fix-bug {BUG-ID}`); nếu thiếu coverage → `/propose-scenario {UC-ID}` |
|
|
390
|
+
| /propose-scenario | Báo PO/Dev review proposal trong `feedback/bdd-proposals/` |
|
|
391
|
+
| /learn | Tiếp tục làm việc — lesson áp dụng ở lệnh kế tiếp |
|
|
392
|
+
| /sync | `/validate-traces` để xem độ phủ đầy đủ; xử lý mọi `📥 tester feedback` được nêu |
|
|
393
|
+
| /update-framework | Review `git diff .agent/`, commit; `/sync` để đồng bộ nội dung dự án |
|
|
394
|
+
|
|
395
|
+
Định dạng footer như sau:
|
|
396
|
+
```
|
|
397
|
+
---
|
|
398
|
+
Status : {badge}
|
|
399
|
+
{khối Output Artifacts}
|
|
400
|
+
Pipeline : Discovery → PRD → [BDD ◀ bạn ở đây] → Tech Design → Code → Dev Self-Check → QC → Trace Audit
|
|
401
|
+
(lệnh review) Vòng review: [① phân tích ◀] → ② Review Board → ③ --resume
|
|
402
|
+
Next : {lệnh gợi ý kèm ví dụ tham số}
|
|
403
|
+
```
|
|
404
|
+
*(Bỏ dòng `Pipeline` cho các lệnh xuyên suốt liệt kê ở trên.)*
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
```
|
|
408
|
+
/sync — {Setup | Update}
|
|
409
|
+
|
|
410
|
+
Git
|
|
411
|
+
✅ git pull — umbrella on branch '{umbrella_branch}'
|
|
412
|
+
✅ submodule sync — .gitmodules config refreshed
|
|
413
|
+
|
|
414
|
+
Submodules (each handled by its current state)
|
|
415
|
+
✅ {spec_source} [spec] — pulled branch '{spec_branch}' ({spec_branch_source}) → {new-sha}
|
|
416
|
+
✋ user-service [active] — on 'feature/FEAT-01' — left untouched, fetched (↓2 behind origin)
|
|
417
|
+
✅ order-service [passive] — aligned to umbrella pointer {sha}
|
|
418
|
+
⚠️ payment-service [dirty] — uncommitted changes, skipped (commit/stash first)
|
|
419
|
+
|
|
420
|
+
Umbrella state
|
|
421
|
+
⚠️ Pointer changed: git add {spec_source} && git commit -m "chore: sync specs"
|
|
422
|
+
(or: ✅ Clean — no commit needed)
|
|
423
|
+
|
|
424
|
+
Tester feedback (pulled this sync)
|
|
425
|
+
📥 1 bug report: BUG-20260608-01 FT-001 [Code]
|
|
426
|
+
1 proposal: FT-001-trailing-spaces → AC2 (pending review)
|
|
427
|
+
(or: 📥 none new this sync)
|
|
428
|
+
→ /fix-bug {BUG-ID} · promote proposal into BDD · or update PRD
|
|
429
|
+
|
|
430
|
+
Service Configs
|
|
431
|
+
✅ user-service — test: mvn test | build: mvn compile
|
|
432
|
+
✅ order-service — test: mvn test | build: mvn compile
|
|
433
|
+
⚠️ payment-service — .agent/project-context.yaml missing
|
|
434
|
+
→ create it so /dev-run-test works correctly
|
|
435
|
+
|
|
436
|
+
.gitignore
|
|
437
|
+
✅ .trace/ is gitignored
|
|
438
|
+
(or: ⚠️ Add .trace/ to .gitignore)
|
|
439
|
+
|
|
440
|
+
Living Docs
|
|
441
|
+
✅ .trace/ synced — {N} TSVs across {S} services
|
|
442
|
+
(run /validate-traces for full coverage report)
|
|
443
|
+
|
|
444
|
+
Spec Manifest
|
|
445
|
+
✅ spec-manifest.yaml — {N} features indexed
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
Status : ✅ Complete | ⚠️ Warnings
|
|
449
|
+
Output Artifacts: updated .trace/ (umbrella mirror), spec-manifest.yaml
|
|
450
|
+
Next : /validate-traces (full coverage check) | /generate-code {UC-ID} (start coding)
|
|
451
|
+
```
|