bmad-speckit-sdd-flow 1.0.0 → 1.0.2

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.
Files changed (107) hide show
  1. package/README.md +138 -102
  2. package/README.zh-CN.md +212 -0
  3. package/_bmad/claude/skills/bmad-bug-assistant/SKILL.zh.md +673 -673
  4. package/_bmad/claude/skills/bmad-code-reviewer-lifecycle/SKILL.en.md +7 -7
  5. package/_bmad/claude/skills/bmad-code-reviewer-lifecycle/SKILL.md +314 -314
  6. package/_bmad/claude/skills/bmad-code-reviewer-lifecycle/SKILL.zh.md +314 -314
  7. package/_bmad/claude/skills/bmad-rca-helper/SKILL.en.md +7 -7
  8. package/_bmad/claude/skills/bmad-rca-helper/SKILL.md +255 -255
  9. package/_bmad/claude/skills/bmad-rca-helper/SKILL.zh.md +255 -255
  10. package/_bmad/claude/skills/bmad-standalone-tasks-doc-review/SKILL.en.md +6 -6
  11. package/_bmad/claude/skills/bmad-standalone-tasks-doc-review/SKILL.md +232 -232
  12. package/_bmad/claude/skills/bmad-standalone-tasks-doc-review/SKILL.zh.md +232 -232
  13. package/_bmad/claude/skills/bmad-story-assistant/SKILL.zh.md +2113 -2113
  14. package/_bmad/claude/skills/speckit-workflow/SKILL.en.md +7 -7
  15. package/_bmad/claude/skills/speckit-workflow/SKILL.md +604 -604
  16. package/_bmad/claude/skills/speckit-workflow/SKILL.zh.md +604 -604
  17. package/_bmad/claude/skills/speckit-workflow/references/audit-prompts-code.en.md +3 -3
  18. package/_bmad/claude/skills/speckit-workflow/references/audit-prompts-code.md +3 -3
  19. package/_bmad/claude/skills/speckit-workflow/references/audit-prompts.en.md +1 -1
  20. package/_bmad/claude/skills/speckit-workflow/references/audit-prompts.md +1 -1
  21. package/_bmad/cursor/skills/bmad-code-reviewer-lifecycle/SKILL.en.md +7 -7
  22. package/_bmad/cursor/skills/bmad-code-reviewer-lifecycle/SKILL.md +61 -61
  23. package/_bmad/cursor/skills/bmad-code-reviewer-lifecycle/SKILL.zh.md +61 -61
  24. package/_bmad/cursor/skills/speckit-workflow/SKILL.en.md +7 -7
  25. package/_bmad/cursor/skills/speckit-workflow/SKILL.md +600 -600
  26. package/_bmad/cursor/skills/speckit-workflow/SKILL.zh.md +600 -600
  27. package/_bmad/cursor/skills/speckit-workflow/references/audit-prompts-code.en.md +3 -3
  28. package/_bmad/cursor/skills/speckit-workflow/references/audit-prompts-code.md +3 -3
  29. package/_bmad/cursor/skills/speckit-workflow/references/audit-prompts.en.md +1 -1
  30. package/_bmad/cursor/skills/speckit-workflow/references/audit-prompts.md +1 -1
  31. package/_bmad/skills/npm-public-release/SKILL.md +193 -0
  32. package/_bmad/skills/npm-public-release/agents/openai.yaml +4 -0
  33. package/_bmad/skills/npm-public-release/references/first-public-release.md +248 -0
  34. package/_bmad/skills/npm-public-release/references/release-command-templates.md +294 -0
  35. package/_bmad/skills/npm-public-release/references/release-evidence-pack.md +218 -0
  36. package/_bmad/skills/npm-public-release/references/release-operator-playbooks.md +208 -0
  37. package/_bmad/skills/npm-public-release/references/repo-contract-discovery.md +197 -0
  38. package/_bmad/skills/npm-public-release/references/subsequent-release.md +168 -0
  39. package/_bmad/skills/npm-public-release/references/trusted-publishing-troubleshooting.md +293 -0
  40. package/docs/assets/readme-architecture-overview.final.svg +175 -0
  41. package/docs/assets/readme-slogan.final.svg +220 -0
  42. package/node_modules/@bmad-speckit/ralph-method/package.json +1 -1
  43. package/node_modules/@bmad-speckit/runtime-context/package.json +1 -1
  44. package/node_modules/@bmad-speckit/runtime-emit/package.json +2 -2
  45. package/node_modules/@bmad-speckit/schema/package.json +1 -1
  46. package/node_modules/@bmad-speckit/scoring/dist/dashboard/mcp-server.js +1 -1
  47. package/node_modules/@bmad-speckit/scoring/package.json +1 -1
  48. package/node_modules/bmad-speckit/_bmad/claude/skills/bmad-bug-assistant/SKILL.zh.md +673 -673
  49. package/node_modules/bmad-speckit/_bmad/claude/skills/bmad-code-reviewer-lifecycle/SKILL.en.md +7 -7
  50. package/node_modules/bmad-speckit/_bmad/claude/skills/bmad-code-reviewer-lifecycle/SKILL.md +314 -314
  51. package/node_modules/bmad-speckit/_bmad/claude/skills/bmad-code-reviewer-lifecycle/SKILL.zh.md +314 -314
  52. package/node_modules/bmad-speckit/_bmad/claude/skills/bmad-rca-helper/SKILL.en.md +7 -7
  53. package/node_modules/bmad-speckit/_bmad/claude/skills/bmad-rca-helper/SKILL.md +255 -255
  54. package/node_modules/bmad-speckit/_bmad/claude/skills/bmad-rca-helper/SKILL.zh.md +255 -255
  55. package/node_modules/bmad-speckit/_bmad/claude/skills/bmad-standalone-tasks-doc-review/SKILL.en.md +6 -6
  56. package/node_modules/bmad-speckit/_bmad/claude/skills/bmad-standalone-tasks-doc-review/SKILL.md +232 -232
  57. package/node_modules/bmad-speckit/_bmad/claude/skills/bmad-standalone-tasks-doc-review/SKILL.zh.md +232 -232
  58. package/node_modules/bmad-speckit/_bmad/claude/skills/bmad-story-assistant/SKILL.zh.md +2113 -2113
  59. package/node_modules/bmad-speckit/_bmad/claude/skills/speckit-workflow/SKILL.en.md +7 -7
  60. package/node_modules/bmad-speckit/_bmad/claude/skills/speckit-workflow/SKILL.md +604 -604
  61. package/node_modules/bmad-speckit/_bmad/claude/skills/speckit-workflow/SKILL.zh.md +604 -604
  62. package/node_modules/bmad-speckit/_bmad/claude/skills/speckit-workflow/references/audit-prompts-code.en.md +3 -3
  63. package/node_modules/bmad-speckit/_bmad/claude/skills/speckit-workflow/references/audit-prompts-code.md +3 -3
  64. package/node_modules/bmad-speckit/_bmad/claude/skills/speckit-workflow/references/audit-prompts.en.md +1 -1
  65. package/node_modules/bmad-speckit/_bmad/claude/skills/speckit-workflow/references/audit-prompts.md +1 -1
  66. package/node_modules/bmad-speckit/_bmad/cursor/skills/bmad-code-reviewer-lifecycle/SKILL.en.md +7 -7
  67. package/node_modules/bmad-speckit/_bmad/cursor/skills/bmad-code-reviewer-lifecycle/SKILL.md +61 -61
  68. package/node_modules/bmad-speckit/_bmad/cursor/skills/bmad-code-reviewer-lifecycle/SKILL.zh.md +61 -61
  69. package/node_modules/bmad-speckit/_bmad/cursor/skills/speckit-workflow/SKILL.en.md +7 -7
  70. package/node_modules/bmad-speckit/_bmad/cursor/skills/speckit-workflow/SKILL.md +600 -600
  71. package/node_modules/bmad-speckit/_bmad/cursor/skills/speckit-workflow/SKILL.zh.md +600 -600
  72. package/node_modules/bmad-speckit/_bmad/cursor/skills/speckit-workflow/references/audit-prompts-code.en.md +3 -3
  73. package/node_modules/bmad-speckit/_bmad/cursor/skills/speckit-workflow/references/audit-prompts-code.md +3 -3
  74. package/node_modules/bmad-speckit/_bmad/cursor/skills/speckit-workflow/references/audit-prompts.en.md +1 -1
  75. package/node_modules/bmad-speckit/_bmad/cursor/skills/speckit-workflow/references/audit-prompts.md +1 -1
  76. package/node_modules/bmad-speckit/_bmad/skills/npm-public-release/SKILL.md +193 -0
  77. package/node_modules/bmad-speckit/_bmad/skills/npm-public-release/agents/openai.yaml +4 -0
  78. package/node_modules/bmad-speckit/_bmad/skills/npm-public-release/references/first-public-release.md +248 -0
  79. package/node_modules/bmad-speckit/_bmad/skills/npm-public-release/references/release-command-templates.md +294 -0
  80. package/node_modules/bmad-speckit/_bmad/skills/npm-public-release/references/release-evidence-pack.md +218 -0
  81. package/node_modules/bmad-speckit/_bmad/skills/npm-public-release/references/release-operator-playbooks.md +208 -0
  82. package/node_modules/bmad-speckit/_bmad/skills/npm-public-release/references/repo-contract-discovery.md +197 -0
  83. package/node_modules/bmad-speckit/_bmad/skills/npm-public-release/references/subsequent-release.md +168 -0
  84. package/node_modules/bmad-speckit/_bmad/skills/npm-public-release/references/trusted-publishing-troubleshooting.md +293 -0
  85. package/node_modules/bmad-speckit/bin/bmad-speckit-init.js +0 -0
  86. package/node_modules/bmad-speckit/bin/bmad-speckit.js +0 -0
  87. package/node_modules/bmad-speckit/package.json +7 -7
  88. package/node_modules/inquirer/node_modules/wrap-ansi/index.js +0 -0
  89. package/node_modules/js-yaml/bin/js-yaml.js +0 -0
  90. package/node_modules/wrap-ansi/index.js +0 -0
  91. package/package.json +20 -10
  92. package/packages/bmad-speckit/node_modules/@bmad-speckit/ralph-method/package.json +1 -1
  93. package/packages/bmad-speckit/node_modules/@bmad-speckit/runtime-context/package.json +1 -1
  94. package/packages/bmad-speckit/node_modules/@bmad-speckit/runtime-emit/package.json +9 -3
  95. package/packages/bmad-speckit/node_modules/@bmad-speckit/schema/package.json +1 -1
  96. package/packages/bmad-speckit/node_modules/@bmad-speckit/scoring/dist/dashboard/mcp-server.js +1 -1
  97. package/packages/bmad-speckit/node_modules/@bmad-speckit/scoring/package.json +1 -1
  98. package/scripts/init-to-root.js +0 -0
  99. package/scripts/mcp/consumer/install-consumer-mcp.ps1 +84 -84
  100. package/scripts/mcp/consumer/install-consumer-mcp.sh +44 -44
  101. package/scripts/mcp/consumer/verify-consumer-mcp.ps1 +19 -19
  102. package/scripts/mcp/consumer/verify-consumer-mcp.sh +14 -14
  103. package/scripts/setup.ps1 +1 -0
  104. package/scripts/setup.sh +20 -3
  105. package/scripts/speckit-cli.ts +1 -1
  106. package/_bmad/claude/hooks/.omc/state/last-tool-error.json +0 -7
  107. package/node_modules/bmad-speckit/_bmad/claude/hooks/.omc/state/last-tool-error.json +0 -7
package/README.md CHANGED
@@ -1,82 +1,137 @@
1
1
  # BMAD-Speckit-SDD-Flow
2
2
 
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
4
- [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org)
3
+ English | [简体中文](README.zh-CN.md)
5
4
 
6
5
  <p align="center">
7
6
  <img src="docs/assets/readme-slogan.final.svg" alt="BMAD-Speckit-SDD-Flow slogan banner" width="100%" />
8
7
  </p>
9
8
 
10
- **Built on** [BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) and [github/spec-kit](https://github.com/github/spec-kit).
11
- **Extended with** audit loops, critical auditor, scoring system, AI Coach, and SFT fine-tuning data extraction.
9
+ <h3 align="center">
10
+ Governed Spec-Driven AI Delivery for Cursor and Claude Code
11
+ </h3>
12
12
 
13
- 100% free and open source. No paywalls.
13
+ <p align="center">
14
+ <strong>Built on <a href="https://github.com/bmad-code-org/BMAD-METHOD">BMAD-METHOD</a> and <a href="https://github.com/github/spec-kit">Spec-Kit</a>.</strong><br>
15
+ <em>Runtime governance, mandatory audit loops, dashboard observability, and published npm installation in one flow.</em>
16
+ </p>
17
+
18
+ <p align="center">
19
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
20
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen" alt="Node.js Version"></a>
21
+ </p>
14
22
 
15
23
  ---
16
24
 
17
- ## Why BMAD-Speckit-SDD-Flow?
25
+ ## Why This Flow?
18
26
 
19
- Traditional AI tools do the thinking for you. BMAD-Speckit-SDD-Flow combines **BMAD Method** (agile, party-mode, multi-agent) with **Spec-Driven Development** (specify plan GAPS tasks TDD).
27
+ Traditional AI tooling often stops at prompt orchestration. BMAD-Speckit-SDD-Flow turns that into a governed delivery pipeline: specify, plan, audit, enter implementation through readiness gates, run runtime governance during execution, then close out into scoring, dashboard, coach, and SFT data.
20
28
 
21
29
  <p align="center">
22
30
  <img src="docs/assets/readme-architecture-overview.final.svg" alt="BMAD-Speckit-SDD-Flow architecture overview" width="100%" />
23
31
  </p>
24
32
 
25
- What this adds in practice:
33
+ ### Key Capabilities
34
+
35
+ - **5-layer delivery architecture**: Product Def → Epic Planning → Story Dev → Technical Implementation → Finish.
36
+ - **Mandatory audit loops**: governed stages require review closure before continuing.
37
+ - **Four-Signal implementation readiness**: implementation entry is blocked unless the readiness baseline covers `P0 Journey Coverage`, `Smoke E2E Readiness`, `Evidence Proof Chain`, and `Cross-Document Traceability`.
38
+ - **Runtime gate loops and rerun gates**: governed routes can re-enter, rerun, or block with the same runtime truth path instead of silently bypassing failed close-out.
39
+ - **Packet execution and closure evidence**: pass, required-fixes, blocked, and rerun outcomes are recorded as packet execution truth instead of host-local guesswork.
40
+ - **Dashboard, coach, and SFT extraction**: runtime and scoring outputs feed the same downstream observability and optimization surfaces.
26
41
 
27
- - **Five-layer architecture** Product Brief PRD Architecture Epic/Story speckit specify/plan/GAPS/tasks TDD implement PR + human review
28
- - **Mandatory audit loops** — Each stage requires code-review pass before proceeding
29
- - **Critical Auditor** — Dedicated challenger role, >60% share in party-mode
30
- - **Scoring system** — Multi-stage weighted scores, one-vote veto, AI Coach diagnosis
31
- - **SFT extraction** — Instruction-response pairs from low-score runs for fine-tuning
42
+ > Image strategy: README assets live in `docs/assets/` and are tracked in Git. The package `README.md` is rendered on npm as GitHub Flavored Markdown, so keeping repository assets tracked and using repository-relative paths is the most reliable cross-surface strategy for GitHub and npm. Source: [About package README files](https://docs.npmjs.com/about-package-readme-files)
32
43
 
33
44
  ---
34
45
 
35
- ## Quick Start
46
+ ## Runtime Governance At A Glance
36
47
 
37
- **Prerequisites**: [Node.js](https://nodejs.org) v18+
48
+ - **Four-Signal readiness gate** runs before implementation entry and keeps readiness scoring separate from implementation scoring.
49
+ - **Runtime gates loop** keeps workflow progression aligned with stage truth instead of letting hosts continue optimistically.
50
+ - **Rerun gates** carry remediation and re-entry through the same governed path after fixes.
51
+ - **Packet execution closure** preserves evidence for every governed execution outcome across Cursor and Claude Code hosts.
52
+ - **Post-audit close-out** feeds scoring, dashboard, coach, and SFT extraction from the same runtime close-out path.
38
53
 
39
- ```bash
40
- # Run the published root package without persisting it
41
- npx --yes --package bmad-speckit-sdd-flow bmad-speckit init . --ai cursor-agent --yes
54
+ ## Dashboard And MCP
42
55
 
43
- # Or create a new project
44
- npx --yes --package bmad-speckit-sdd-flow bmad-speckit init my-project --ai cursor-agent --yes
56
+ - **Dashboard is default**: the published package supports runtime dashboard status, start/stop helpers, and runtime snapshot generation without any extra MCP setup.
57
+ - **Runtime MCP is optional**: enable it only when you want runtime data exposed as agent tools via `--with-mcp`.
58
+ - **Dashboard and runtime governance do not depend on MCP**: live dashboard, hooks, scoring projection, and runtime close-out all work without `.mcp.json`.
45
59
 
46
- # Verify installation
47
- npx --yes --package bmad-speckit-sdd-flow bmad-speckit check
48
- ```
60
+ Quick mental model:
49
61
 
50
- **Important boundary**:
62
+ - `dashboard`: human-facing runtime and scoring visibility
63
+ - `runtime-mcp`: explicit agent-tool surface over the same runtime data
51
64
 
52
- - The commands above execute the **single public root package** and expose the bundled `bmad-speckit` CLI
53
- - They are **not** the highest-confidence installation path for BMAD-Speckit-SDD-Flow custom consumer features on another machine
54
- - If your priority scenario is **installing into a consumer project on another machine without this repository checked out**, use the verified off-repo path in [Consumer Installation Guide](docs/how-to/consumer-installation.md)
55
- - In this repository, the verified off-repo path is: install the **root package release artifact** (`bmad-speckit-sdd-flow-<version>.tgz` or the equivalent published package), then run `npx bmad-speckit version` / `check` / `bmad-speckit-init`
65
+ ---
56
66
 
57
- ### Install From A CI Artifact
67
+ ## Recommended npm Installation
58
68
 
59
- If you need to install this into a consumer project on another machine without cloning this repository, use the tarball produced by the CI `package` job:
69
+ Ensure you have **[Node.js](https://nodejs.org) v18+** installed.
60
70
 
61
- 1. Download the GitHub Actions artifact named `npm-packages-<commit-sha>`
62
- 2. Extract the artifact and locate `bmad-speckit-sdd-flow-<version>.tgz`
63
- 3. Install that root package tarball in the consumer project
64
- 4. Run the verification commands before initializing host hooks
71
+ ### Recommended Off-Repo Install From npm
65
72
 
66
- ```powershell
67
- cd D:\Dev\your-project
68
- npm install --save-dev .\bmad-speckit-sdd-flow-<version>.tgz
69
- npx bmad-speckit version
73
+ Use the published root package directly. This is the current recommended path when you're installing into a consumer project without cloning this repository.
74
+
75
+ This is the verified off-repo path for the published package contract.
76
+
77
+ ```bash
78
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit version
79
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit-init . --agent claude-code --full --no-package-json
80
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit-init . --agent cursor --full --no-package-json
81
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit check
82
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit dashboard-status
83
+ ```
84
+
85
+ Why this is the recommended path:
86
+
87
+ - it uses the published single public root package
88
+ - it aligns both host surfaces explicitly
89
+ - it preserves the non-invasive `--no-package-json` consumer install style
90
+ - it matches the validated published package flow rather than an older bootstrap-only shortcut
91
+
92
+ ### Persistent Install In A Project
93
+
94
+ If you want the package present in the consumer project's dependency tree:
95
+
96
+ ```bash
97
+ npm install --save-dev bmad-speckit-sdd-flow@latest
98
+ npx bmad-speckit-init . --agent claude-code --full --no-package-json
99
+ npx bmad-speckit-init . --agent cursor --full --no-package-json
70
100
  npx bmad-speckit check
71
- npx bmad-speckit-init --agent claude-code
72
- npx bmad-speckit-init --agent cursor
73
101
  ```
74
102
 
75
- Use the root package tarball as the default install artifact. The CI artifact manifest is only there to help you verify filename, version, and checksum metadata.
103
+ ### Quick Bootstrap Path
104
+
105
+ The faster bootstrap command still exists:
106
+
107
+ ```bash
108
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit init . --ai cursor-agent --yes
109
+ ```
110
+
111
+ Treat that as a quick initializer, not the highest-confidence installation path for the full runtime governance surface. If you care about the latest published hooks, runtime governance, dashboard wiring, and dual-host alignment, use the recommended installation path above.
112
+
113
+ > Need help choosing the next governed route? Run `/bmad-help` in your AI IDE. It evaluates `flow`, `contextMaturity`, `complexity`, and `implementationReadinessStatus` before recommending or blocking routes.
114
+
115
+ ### Alternative Deployments
76
116
 
77
- > **Not sure what to do?** Run `/bmad-help` in your AI IDE. 它会先识别你的 `flow / contextMaturity / complexity / implementationReadinessStatus`,再把路径标成 `recommended / allowed but not recommended / blocked`。See [Installation & Migration Guide](docs/how-to/migration.md) and [bmad-help 路由模型参考](docs/reference/bmad-help-routing-model.md) for details.
117
+ <details>
118
+ <summary><b>Install via CI Artifact (Consumer Projects)</b></summary>
119
+ <br>
120
+ If you are installing from a release artifact instead of npm registry:
78
121
 
79
- **One-line deploy**:
122
+ 1. Download the `npm-packages-<commit-sha>` artifact from GitHub Actions.
123
+ 2. Extract the `bmad-speckit-sdd-flow-<version>.tgz` tarball.
124
+ 3. Install and initialize:
125
+ ```bash
126
+ npx --yes --package ./bmad-speckit-sdd-flow-<version>.tgz bmad-speckit version
127
+ npx --yes --package ./bmad-speckit-sdd-flow-<version>.tgz bmad-speckit-init . --agent claude-code --full --no-package-json
128
+ npx --yes --package ./bmad-speckit-sdd-flow-<version>.tgz bmad-speckit-init . --agent cursor --full --no-package-json
129
+ ```
130
+ </details>
131
+
132
+ <details>
133
+ <summary><b>One-Line Deploy Scripts</b></summary>
134
+ <br>
80
135
 
81
136
  ```powershell
82
137
  # Windows
@@ -86,93 +141,74 @@ pwsh scripts/setup.ps1 -Target <project-path>
86
141
  ```bash
87
142
  # WSL / Linux / macOS
88
143
  bash scripts/setup.sh -Target <project-path>
89
- # or: npm run setup:sh -- -Target <path>
90
144
  ```
91
145
 
92
- See [WSL / Shell scripts](docs/how-to/wsl-shell-scripts.md) for full shell script reference.
93
-
94
- 面向消费项目的完整安装入口见 [Consumer Installation Guide](docs/how-to/consumer-installation.md)。如果你需要继续配置 provider 的 `baseUrl` / `apiKeyEnv` / `model`,也从这篇开始。
146
+ </details>
95
147
 
96
- 如果你后续需要安全卸载当前项目中的受管安装面,使用:
148
+ <details>
149
+ <summary><b>Safe Uninstallation</b></summary>
150
+ <br>
151
+ To remove managed installation surfaces in the current project:
97
152
 
98
153
  ```bash
99
- npx bmad-speckit uninstall
154
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit uninstall
100
155
  ```
101
156
 
102
- 边界:
103
-
104
- - 只删除安装器受管条目
105
- - 不整删 `.cursor`、`.claude`、全局 skills 根目录
106
- - **禁止删除 `_bmad-output`**
157
+ This only removes installer-managed entries. It does not delete `.cursor`, `.claude`, or global skills, and it never deletes `_bmad-output`.
107
158
 
108
- 如果你后续确实需要把运行时信息通过工具接口暴露给 agent,再看 [Runtime MCP Installation](docs/how-to/runtime-mcp-installation.md)。该能力不是默认安装产物,需要显式启用。
159
+ </details>
109
160
 
110
161
  ---
111
162
 
112
- ## Built On
163
+ ## Architecture And Modules
113
164
 
114
- | Upstream | Purpose |
115
- | ----------------------------------------------------------- | ------------------------------------------------------------ |
116
- | [BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) | Agile workflows, Party Mode, 34+ workflows |
117
- | [github/spec-kit](https://github.com/github/spec-kit) | Spec-Driven Development (constitution, specify, plan, tasks) |
165
+ ### Core Components
118
166
 
119
- **Our extensions**: scoring, critical auditor, speckit-workflow audit loops, bmad-story-assistant, bmad-bug-assistant.
120
-
121
- ---
167
+ | Component | Purpose |
168
+ | :-------------------------- | :-------------------------------------------------------------------------------------------------- |
169
+ | **`_bmad/`** | Canonical source of truth for workflow modules, hooks, prompts, routing, and host-facing assets. |
170
+ | **`packages/scoring/`** | Scoring engine, readiness drift evaluation, dashboard projection, coach inputs, and SFT extraction. |
171
+ | **`dashboard`** | Default runtime observability surface: live dashboard, runtime snapshots, and scoring projections. |
172
+ | **`runtime-mcp`** | Optional MCP surface for agent tools over runtime data; enabled explicitly with `--with-mcp`. |
173
+ | **`speckit-workflow`** | Specify -> Plan -> GAPS -> Tasks -> TDD with mandatory audit loops. |
174
+ | **`bmad-story-assistant`** | Story lifecycle path: Create Story -> Party Mode -> Dev Story -> Implement. |
175
+ | **`bmad-bug-assistant`** | Bug lifecycle path: RCA -> Party Mode -> BUGFIX -> Implement. |
176
+ | **`bmad-standalone-tasks`** | Standalone execution path for TASKS or BUGFIX documents through governed subagent delivery. |
122
177
 
123
- ## Project Structure
178
+ <details>
179
+ <summary><b>View Folder Structure</b></summary>
124
180
 
125
- ```
181
+ ```text
126
182
  BMAD-Speckit-SDD-Flow/
127
- ├── _bmad/ # BMAD core modules (single source of truth)
128
- ├── speckit/ # Speckit module (commands, templates, workflows, scripts)
129
- ├── core/ # Core BMAD functionality
130
- ├── bmm/, bmb/, cis/, tea/ # Other BMAD modules
131
- ├── scoring/ # Scoring system
132
- └── _config/ # Configuration files
133
- ├── packages/ # Source code (monorepo)
134
- │ ├── bmad-speckit/ # Internal CLI workspace bundled into the root package
135
- │ └── scoring/ # Scoring extensions (see [packages/scoring/README.md](packages/scoring/README.md))
136
- ├── tests/ # Test suite (acceptance/, epic-acceptance/)
137
- ├── scripts/ # Deployment/utility scripts only
138
- │ └── _config/ # Project configuration (merged from former root config/)
139
- ├── specs/ # Story specifications (generated)
140
- ├── docs/ # Documentation (Diataxis)
141
- │ ├── tutorials/ # Learning-oriented
142
- │ ├── how-to/ # Task-oriented
143
- │ ├── explanation/ # Understanding-oriented
144
- │ ├── reference/ # Information-oriented
145
- │ └── sample/ # Example documents
146
- └── package.json
183
+ ├── _bmad/ # Core modules and configuration
184
+ ├── packages/ # Monorepo packages (CLI, scoring)
185
+ ├── scripts/ # Setup and deployment utilities
186
+ ├── docs/ # Diataxis-style documentation
187
+ ├── tests/ # Acceptance & epic testing
188
+ └── specs/ # Generated story specs
147
189
  ```
148
190
 
149
- ## Modules & Components
150
-
151
- | Component | Purpose |
152
- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
153
- | **\_bmad/** | BMAD core (core, bmm, bmb, cis, tea, scoring) |
154
- | **packages/scoring/** | Scoring extensions: audit report parsing, score persistence, Coach diagnosis, Dashboard, SFT extraction |
155
- | **scripts/** | Deployment/utility scripts: init-to-root, setup. Scoring 已整合进 bmad-speckit CLI,目标项目使用 `npx bmad-speckit score/coach/dashboard/sft-extract/scores` |
156
- | **speckit-workflow** | specify → plan → GAPS → tasks → TDD with mandatory audits |
157
- | **bmad-story-assistant** | Create Story → Party-Mode → Dev Story → implement |
158
- | **bmad-bug-assistant** | Bug description → Party-Mode → BUGFIX doc |
159
- | **bmad-standalone-tasks** | Execute TASKS/BUGFIX docs via subagents |
191
+ </details>
160
192
 
161
193
  ---
162
194
 
163
195
  ## Documentation
164
196
 
197
+ Key entry points:
198
+
165
199
  - [Getting Started](docs/tutorials/getting-started.md)
166
200
  - [Consumer Installation Guide](docs/how-to/consumer-installation.md)
167
- - [Installation & Migration Guide](docs/how-to/migration.md)
201
+ - [Runtime Dashboard Guide](docs/how-to/runtime-dashboard.md)
202
+ - [Runtime MCP Installation](docs/how-to/runtime-mcp-installation.md)
203
+ - [Provider Configuration](docs/how-to/provider-configuration.md)
168
204
  - [Cursor Setup](docs/how-to/cursor-setup.md)
169
205
  - [Claude Code Setup](docs/how-to/claude-code-setup.md)
170
- - [Provider Configuration](docs/how-to/provider-configuration.md)
171
- - [Runtime MCP Installation](docs/how-to/runtime-mcp-installation.md)
172
206
  - [WSL / Shell Scripts](docs/how-to/wsl-shell-scripts.md)
173
207
 
174
208
  ---
175
209
 
176
- ## License
177
-
178
- MIT License — see [LICENSE](LICENSE) for details.
210
+ <p align="center">
211
+ <a href="LICENSE">MIT License</a> •
212
+ <a href="https://github.com/bmad-code-org/BMAD-METHOD">BMAD-METHOD</a>
213
+ <a href="https://github.com/github/spec-kit">Spec-Kit</a>
214
+ </p>
@@ -0,0 +1,212 @@
1
+ # BMAD-Speckit-SDD-Flow
2
+
3
+ [English](README.md) | 简体中文
4
+
5
+ <p align="center">
6
+ <img src="docs/assets/readme-slogan.final.svg" alt="BMAD-Speckit-SDD-Flow" width="100%" />
7
+ </p>
8
+
9
+ <h3 align="center">
10
+ 面向 Cursor 与 Claude Code 的规范化 Spec-Driven AI 开发流程
11
+ </h3>
12
+
13
+ <p align="center">
14
+ <strong>基于 <a href="https://github.com/bmad-code-org/BMAD-METHOD">BMAD-METHOD</a> 与 <a href="https://github.com/github/spec-kit">Spec-Kit</a> 构建。</strong><br>
15
+ <em>把需求规范、审计流程、运行监控和评分反馈整合成一条完整的工程化交付链路。</em>
16
+ </p>
17
+
18
+ <p align="center">
19
+ <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a>
20
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen" alt="Node.js Version"></a>
21
+ </p>
22
+
23
+ ---
24
+
25
+ ## 这套流程要解决什么问题?
26
+
27
+ 很多 AI 工具只停留在提示词编排层面。BMAD-Speckit-SDD-Flow 把它推进成一条可管理的交付流水线:先写规范、再出计划、经过审计,确认 ready 后再进入实现阶段,执行过程中有运行时管控,最后统一输出评分、看板和训练数据。
28
+
29
+ <p align="center">
30
+ <img src="docs/assets/readme-architecture-overview.final.svg" alt="架构总览" width="100%" />
31
+ </p>
32
+
33
+ ### 主要特性
34
+
35
+ - **五层交付架构**:Product Def → Epic Planning → Story Dev → Technical Implementation → Finish
36
+ - **强制审计闭环**:每个治理阶段必须通过代码审查才能继续
37
+ - **四信号就绪检查**:实现入口前需满足需求覆盖、冒烟测试就绪、证据链完整、文档可追溯
38
+ - **运行时管控循环**:执行失败不会被静默跳过,而是沿同一条治理链路进入重试或阻塞
39
+ - **执行证据链**:通过、需修复、阻塞、重跑等状态都会留下完整记录
40
+ - **看板、诊断与训练数据**:运行结果自动汇总到可视化面板、问题诊断和模型微调数据集
41
+
42
+ > **关于图片**:README 中的图片放在 `docs/assets/` 目录下并纳入 Git 管理。npm 包里的 README 会按 GitHub Flavored Markdown 渲染,因此"仓库内相对路径 + 已跟踪资源"是对 GitHub 和 npm 都最稳定的策略。来源:[About package README files](https://docs.npmjs.com/about-package-readme-files)
43
+
44
+ ---
45
+
46
+ ## 运行时管控一览
47
+
48
+ - **四信号就绪检查**:在进入实现阶段前执行,与实现评分保持独立
49
+ - **运行时管控循环**:工作流推进与阶段事实保持一致,不允许宿主"乐观继续"
50
+ - **重跑检查点**:修复后沿同一条治理路径回到重试或重新进入
51
+ - **执行闭环证据**:Cursor 与 Claude Code 两侧都保留完整的治理执行记录
52
+ - **事后审计收口**:通过同一条运行时收口路径驱动评分、看板、诊断和训练数据提取
53
+
54
+ ## 看板与 MCP
55
+
56
+ - **看板是默认能力**:发布包默认支持运行时看板状态查询、启停辅助、快照生成
57
+ - **运行时 MCP 是可选能力**:只有在你希望把运行时数据暴露成 agent 工具接口时,才显式启用 `--with-mcp`
58
+ - **看板和运行时管控不依赖 MCP**:实时看板、钩子、评分投影、运行时收口在没有 `.mcp.json` 的情况下也能工作
59
+
60
+ 简单理解:
61
+
62
+ - `dashboard`:给人看的运行时/评分可视化
63
+ - `runtime-mcp`:把同一份运行时数据暴露成 agent 工具接口
64
+
65
+ ---
66
+
67
+ ## 推荐的 npm 安装方式
68
+
69
+ 确保本机已安装 **[Node.js](https://nodejs.org) v18+**。
70
+
71
+ ### 推荐的 npm 离仓安装路径
72
+
73
+ 如果你是要把它装进一个消费项目,而不是修改本仓库源码,当前推荐直接使用已发布的根包:
74
+
75
+ ```bash
76
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit version
77
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit-init . --agent claude-code --full --no-package-json
78
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit-init . --agent cursor --full --no-package-json
79
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit check
80
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit dashboard-status
81
+ ```
82
+
83
+ 为什么推荐这条路径:
84
+
85
+ - 它使用唯一公开发布的根包
86
+ - 它显式对齐两侧宿主安装面
87
+ - 它保留 `--no-package-json` 这种非侵入式消费安装风格
88
+ - 它对应的是这次已经验证过的已发布 npm 路径,而不是旧的纯引导快捷入口
89
+
90
+ ### 持久安装到项目依赖树
91
+
92
+ 如果你希望把包写进消费项目的依赖树:
93
+
94
+ ```bash
95
+ npm install --save-dev bmad-speckit-sdd-flow@latest
96
+ npx bmad-speckit-init . --agent claude-code --full --no-package-json
97
+ npx bmad-speckit-init . --agent cursor --full --no-package-json
98
+ npx bmad-speckit check
99
+ ```
100
+
101
+ ### 快速引导路径
102
+
103
+ 更快的引导命令仍然保留:
104
+
105
+ ```bash
106
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit init . --ai cursor-agent --yes
107
+ ```
108
+
109
+ 但应把它理解成一个快速初始化入口,而不是完整运行时治理安装面的最高置信路径。如果你关心已发布钩子、运行时管控、看板接入和双宿主对齐,优先使用上面的推荐路径。
110
+
111
+ > 不确定该走哪条治理路径时,在 AI IDE 中运行 `/bmad-help`。它会结合流程、上下文成熟度、复杂度和实现就绪状态做推荐或阻断。
112
+
113
+ ### 其他安装方式
114
+
115
+ <details>
116
+ <summary><b>通过 CI 产物安装到消费项目</b></summary>
117
+ <br>
118
+ 如果你使用 release 产物,而不是直接从 npm registry 安装:
119
+
120
+ 1. 下载 GitHub Actions 产物 `npm-packages-<commit-sha>`
121
+ 2. 解压出 `bmad-speckit-sdd-flow-<version>.tgz`
122
+ 3. 执行:
123
+
124
+ ```bash
125
+ npx --yes --package ./bmad-speckit-sdd-flow-<version>.tgz bmad-speckit version
126
+ npx --yes --package ./bmad-speckit-sdd-flow-<version>.tgz bmad-speckit-init . --agent claude-code --full --no-package-json
127
+ npx --yes --package ./bmad-speckit-sdd-flow-<version>.tgz bmad-speckit-init . --agent cursor --full --no-package-json
128
+ ```
129
+
130
+ </details>
131
+
132
+ <details>
133
+ <summary><b>一键部署脚本</b></summary>
134
+ <br>
135
+
136
+ ```powershell
137
+ # Windows
138
+ pwsh scripts/setup.ps1 -Target <项目路径>
139
+ ```
140
+
141
+ ```bash
142
+ # WSL / Linux / macOS
143
+ bash scripts/setup.sh -Target <项目路径>
144
+ ```
145
+
146
+ </details>
147
+
148
+ <details>
149
+ <summary><b>安全卸载</b></summary>
150
+ <br>
151
+ 如果要移除当前项目里的受管安装面:
152
+
153
+ ```bash
154
+ npx --yes --package bmad-speckit-sdd-flow@latest bmad-speckit uninstall
155
+ ```
156
+
157
+ 它只会删除安装器受管条目,不会整删 `.cursor`、`.claude` 或全局 skills,也不会删除 `_bmad-output`。
158
+
159
+ </details>
160
+
161
+ ---
162
+
163
+ ## 架构与模块
164
+
165
+ ### 核心组件
166
+
167
+ | 组件 | 说明 |
168
+ | :-------------------------- | :-------------------------------------------------------------------- |
169
+ | **`_bmad/`** | 工作流模块、钩子、提示词、路由与宿主侧资产的规范源 |
170
+ | **`packages/scoring/`** | 评分引擎、就绪漂移评估、看板投影、诊断输入与训练数据提取 |
171
+ | **`dashboard`** | 默认运行时可观测层:实时看板、运行时快照、评分投影 |
172
+ | **`runtime-mcp`** | 可选的 MCP 工具接口,通过 `--with-mcp` 显式启用 |
173
+ | **`speckit-workflow`** | Specify → Plan → GAPS → Tasks → TDD,并带强制审计循环 |
174
+ | **`bmad-story-assistant`** | Story 生命周期路径:Create Story → Party Mode → Dev Story → Implement |
175
+ | **`bmad-bug-assistant`** | Bug 生命周期路径:RCA → Party Mode → BUGFIX → Implement |
176
+ | **`bmad-standalone-tasks`** | 针对 TASKS 或 BUGFIX 文档的独立受管子代理执行路径 |
177
+
178
+ <details>
179
+ <summary><b>查看目录结构</b></summary>
180
+
181
+ ```text
182
+ BMAD-Speckit-SDD-Flow/
183
+ ├── _bmad/ # 核心模块与配置
184
+ ├── packages/ # Monorepo 包(CLI、评分)
185
+ ├── scripts/ # 安装与部署工具脚本
186
+ ├── docs/ # Diataxis 风格文档
187
+ ├── tests/ # 验收测试与 epic 测试
188
+ └── specs/ # 生成的 Story 规范
189
+ ```
190
+
191
+ </details>
192
+
193
+ ---
194
+
195
+ ## 文档入口
196
+
197
+ - [快速开始](docs/tutorials/getting-started.md)
198
+ - [消费项目安装指南](docs/how-to/consumer-installation.md)
199
+ - [运行时看板指南](docs/how-to/runtime-dashboard.md)
200
+ - [运行时 MCP 安装](docs/how-to/runtime-mcp-installation.md)
201
+ - [Provider 配置](docs/how-to/provider-configuration.md)
202
+ - [Cursor 配置](docs/how-to/cursor-setup.md)
203
+ - [Claude Code 配置](docs/how-to/claude-code-setup.md)
204
+ - [WSL / Shell 脚本](docs/how-to/wsl-shell-scripts.md)
205
+
206
+ ---
207
+
208
+ <p align="center">
209
+ <a href="LICENSE">MIT License</a> •
210
+ <a href="https://github.com/bmad-code-org/BMAD-METHOD">BMAD-METHOD</a> •
211
+ <a href="https://github.com/github/spec-kit">Spec-Kit</a>
212
+ </p>