cc-devflow 4.1.5 → 4.2.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.
Files changed (112) hide show
  1. package/.claude/CLAUDE.md +87 -1091
  2. package/.claude/commands/core/architecture.md +32 -2
  3. package/.claude/commands/core/guidelines.md +27 -2
  4. package/.claude/commands/core/roadmap.md +33 -4
  5. package/.claude/commands/core/style.md +53 -263
  6. package/.claude/commands/flow/CLAUDE.md +28 -0
  7. package/.claude/commands/flow/archive.md +2 -2
  8. package/.claude/commands/flow/checklist.md +9 -251
  9. package/.claude/commands/flow/clarify.md +9 -127
  10. package/.claude/commands/flow/constitution.md +1 -1
  11. package/.claude/commands/flow/context.md +1 -1
  12. package/.claude/commands/flow/dev.md +19 -395
  13. package/.claude/commands/flow/ideate.md +13 -13
  14. package/.claude/commands/flow/init.md +19 -30
  15. package/.claude/commands/flow/new.md +12 -268
  16. package/.claude/commands/flow/quality.md +10 -153
  17. package/.claude/commands/flow/release.md +18 -81
  18. package/.claude/commands/flow/restart.md +15 -16
  19. package/.claude/commands/flow/spec.md +14 -164
  20. package/.claude/commands/flow/status.md +12 -12
  21. package/.claude/commands/flow/update.md +4 -4
  22. package/.claude/commands/flow/upgrade.md +6 -6
  23. package/.claude/commands/flow/verify.md +19 -78
  24. package/.claude/commands/flow/workspace.md +1 -1
  25. package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +7 -7
  26. package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +44 -96
  27. package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +1 -1
  28. package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +5 -5
  29. package/.claude/docs/templates/ATTEMPT_TEMPLATE.md +1 -1
  30. package/.claude/docs/templates/BACKLOG_TEMPLATE.md +3 -3
  31. package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +5 -5
  32. package/.claude/docs/templates/ERROR_LOG_TEMPLATE.md +2 -2
  33. package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +3 -3
  34. package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +33 -64
  35. package/.claude/docs/templates/RESEARCH_TEMPLATE.md +3 -3
  36. package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +2 -2
  37. package/.claude/docs/templates/ROADMAP_TEMPLATE.md +2 -2
  38. package/.claude/docs/templates/STYLE_TEMPLATE.md +3 -3
  39. package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +8 -9
  40. package/.claude/guides/workflow-guides/flow-orchestrator.md +31 -265
  41. package/.claude/hooks/CLAUDE.md +1 -1
  42. package/.claude/hooks/checklist-gate.js +4 -4
  43. package/.claude/hooks/inject-agent-context.ts +2 -2
  44. package/.claude/scripts/calculate-checklist-completion.sh +2 -2
  45. package/.claude/scripts/check-prerequisites.sh +2 -2
  46. package/.claude/scripts/checklist-errors.sh +4 -4
  47. package/.claude/scripts/flow-quality-full.sh +5 -5
  48. package/.claude/scripts/flow-quality-quick.sh +4 -4
  49. package/.claude/scripts/flow-workspace-init.sh +2 -2
  50. package/.claude/scripts/generate-clarification-report.sh +4 -4
  51. package/.claude/scripts/recover-workflow.sh +70 -73
  52. package/.claude/scripts/run-quality-gates.sh +1 -1
  53. package/.claude/scripts/setup-epic.sh +2 -2
  54. package/.claude/scripts/setup-ralph-loop.sh +2 -2
  55. package/.claude/scripts/validate-research.sh +1 -1
  56. package/.claude/scripts/verify-setup.sh +1 -1
  57. package/.claude/skills/cc-devflow-orchestrator/SKILL.md +113 -108
  58. package/.claude/skills/workflow/CLAUDE.md +24 -0
  59. package/.claude/skills/workflow/flow-dev/CLAUDE.md +14 -76
  60. package/.claude/skills/workflow/flow-dev/SKILL.md +58 -60
  61. package/.claude/skills/workflow/flow-dev/context.jsonl +4 -8
  62. package/.claude/skills/workflow/flow-init/SKILL.md +46 -144
  63. package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +1 -1
  64. package/.claude/skills/workflow/flow-init/context.jsonl +3 -3
  65. package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +1 -1
  66. package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +1 -1
  67. package/.claude/skills/workflow/flow-release/SKILL.md +23 -56
  68. package/.claude/skills/workflow/flow-release/context.jsonl +5 -7
  69. package/.claude/skills/workflow/flow-spec/CLAUDE.md +15 -101
  70. package/.claude/skills/workflow/flow-spec/SKILL.md +40 -511
  71. package/.claude/skills/workflow/flow-spec/context.jsonl +5 -7
  72. package/.claude/skills/workflow/flow-verify/CLAUDE.md +10 -0
  73. package/.claude/skills/workflow/flow-verify/SKILL.md +53 -0
  74. package/.claude/skills/workflow/flow-verify/context.jsonl +5 -0
  75. package/.claude/skills/workflow.yaml +72 -267
  76. package/CHANGELOG.md +72 -0
  77. package/README.md +96 -69
  78. package/README.zh-CN.md +95 -67
  79. package/bin/cc-devflow-cli.js +154 -0
  80. package/bin/harness.js +22 -0
  81. package/docs/commands/README.md +34 -38
  82. package/docs/commands/README.zh-CN.md +34 -36
  83. package/docs/commands/core-roadmap.md +2 -2
  84. package/docs/commands/core-roadmap.zh-CN.md +2 -2
  85. package/docs/commands/core-style.md +29 -381
  86. package/docs/commands/core-style.zh-CN.md +29 -381
  87. package/docs/commands/flow-init.md +10 -10
  88. package/docs/commands/flow-init.zh-CN.md +11 -11
  89. package/docs/commands/flow-new.md +25 -260
  90. package/docs/commands/flow-new.zh-CN.md +26 -257
  91. package/docs/guides/getting-started.md +16 -15
  92. package/docs/guides/getting-started.zh-CN.md +10 -12
  93. package/lib/compiler/__tests__/manifest.test.js +156 -0
  94. package/lib/compiler/__tests__/parser.test.js +21 -0
  95. package/lib/compiler/index.js +17 -1
  96. package/lib/compiler/manifest.js +68 -6
  97. package/lib/compiler/parser.js +5 -0
  98. package/lib/harness/CLAUDE.md +21 -0
  99. package/lib/harness/cli.js +208 -0
  100. package/lib/harness/index.js +16 -0
  101. package/lib/harness/operations/dispatch.js +285 -0
  102. package/lib/harness/operations/init.js +48 -0
  103. package/lib/harness/operations/janitor.js +74 -0
  104. package/lib/harness/operations/pack.js +100 -0
  105. package/lib/harness/operations/plan.js +29 -0
  106. package/lib/harness/operations/release.js +83 -0
  107. package/lib/harness/operations/resume.js +44 -0
  108. package/lib/harness/operations/verify.js +163 -0
  109. package/lib/harness/planner.js +141 -0
  110. package/lib/harness/schemas.js +108 -0
  111. package/lib/harness/store.js +240 -0
  112. package/package.json +9 -1
@@ -1,4 +1,10 @@
1
1
  #!/usr/bin/env node
2
+ /**
3
+ * [INPUT]: 依赖 .claude 模板、adapt 编译入口与 harness 运行时入口。
4
+ * [OUTPUT]: 提供 init/adapt/harness 命令,并在目标仓库自动补齐 harness npm scripts。
5
+ * [POS]: cc-devflow 的统一 CLI 门面,串联安装、编译与运行时发布链路。
6
+ * [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
7
+ */
2
8
  const fs = require('fs');
3
9
  const path = require('path');
4
10
  const { spawnSync } = require('child_process');
@@ -7,6 +13,17 @@ const PACKAGE_ROOT = path.resolve(__dirname, '..');
7
13
  const TEMPLATE_DIR = path.join(PACKAGE_ROOT, '.claude');
8
14
  const ADAPT_BIN = path.join(PACKAGE_ROOT, 'bin', 'adapt.js');
9
15
  const ADAPTER_BIN = path.join(PACKAGE_ROOT, 'bin', 'cc-devflow.js');
16
+ const HARNESS_BIN = path.join(PACKAGE_ROOT, 'bin', 'harness.js');
17
+ const HARNESS_SCRIPT_COMMANDS = {
18
+ 'harness:init': 'init',
19
+ 'harness:pack': 'pack',
20
+ 'harness:plan': 'plan',
21
+ 'harness:dispatch': 'dispatch',
22
+ 'harness:verify': 'verify',
23
+ 'harness:release': 'release',
24
+ 'harness:resume': 'resume',
25
+ 'harness:janitor': 'janitor'
26
+ };
10
27
 
11
28
  function showHelp() {
12
29
  console.log(`
@@ -15,6 +32,7 @@ Usage: cc-devflow <command> [options]
15
32
  Commands:
16
33
  init Install .claude template into a project
17
34
  adapt Compile .claude into multi-platform outputs
35
+ harness Run harness runtime commands (init/verify/release/janitor...)
18
36
 
19
37
  Init options:
20
38
  --dir <path> Target project path (default: cwd)
@@ -34,6 +52,7 @@ Examples:
34
52
  cc-devflow init --dir /path/to/project
35
53
  cc-devflow adapt --platform cursor
36
54
  cc-devflow adapt --cwd /path/to/project --platform codex
55
+ cc-devflow harness release --change-id REQ-123
37
56
  `);
38
57
  }
39
58
 
@@ -122,6 +141,114 @@ function copyIncremental(src, dest) {
122
141
  }
123
142
  }
124
143
 
144
+ function detectJsonIndent(content) {
145
+ const match = content.match(/\n([ \t]+)"[^"\n]+":/);
146
+ if (!match) {
147
+ return 2;
148
+ }
149
+
150
+ const indent = match[1];
151
+ return indent.includes('\t') ? '\t' : indent.length;
152
+ }
153
+
154
+ function hasLocalHarnessBinary(targetRoot) {
155
+ return fs.existsSync(path.join(targetRoot, 'bin', 'harness.js'));
156
+ }
157
+
158
+ function getHarnessScriptCommand(targetRoot, subcommand) {
159
+ if (hasLocalHarnessBinary(targetRoot)) {
160
+ return `node bin/harness.js ${subcommand}`;
161
+ }
162
+ return `cc-devflow harness ${subcommand}`;
163
+ }
164
+
165
+ function ensureHarnessScripts(targetRoot) {
166
+ const pkgPath = path.join(targetRoot, 'package.json');
167
+ if (!fs.existsSync(pkgPath)) {
168
+ console.warn(`[WARN] Missing package.json in ${targetRoot}; skipping harness script bootstrap.`);
169
+ return;
170
+ }
171
+
172
+ let raw;
173
+ let packageJson;
174
+ try {
175
+ raw = fs.readFileSync(pkgPath, 'utf8');
176
+ packageJson = JSON.parse(raw);
177
+ } catch (error) {
178
+ console.warn(`[WARN] Skipping harness script bootstrap: cannot parse package.json (${error.message})`);
179
+ return;
180
+ }
181
+
182
+ if (!packageJson || typeof packageJson !== 'object' || Array.isArray(packageJson)) {
183
+ console.warn('[WARN] Skipping harness script bootstrap: package.json root must be an object.');
184
+ return;
185
+ }
186
+
187
+ if (!packageJson.scripts || typeof packageJson.scripts !== 'object' || Array.isArray(packageJson.scripts)) {
188
+ packageJson.scripts = {};
189
+ }
190
+
191
+ const hasLocalBinary = hasLocalHarnessBinary(targetRoot);
192
+ const added = [];
193
+ const repaired = [];
194
+ let changed = false;
195
+
196
+ for (const [scriptName, subcommand] of Object.entries(HARNESS_SCRIPT_COMMANDS)) {
197
+ const desired = getHarnessScriptCommand(targetRoot, subcommand);
198
+ const existing = packageJson.scripts[scriptName];
199
+
200
+ if (typeof existing === 'undefined') {
201
+ packageJson.scripts[scriptName] = desired;
202
+ added.push(scriptName);
203
+ changed = true;
204
+ continue;
205
+ }
206
+
207
+ if (typeof existing !== 'string') {
208
+ continue;
209
+ }
210
+
211
+ // Auto-repair legacy value when local harness binary does not exist.
212
+ if (!hasLocalBinary && existing.trim() === `node bin/harness.js ${subcommand}`) {
213
+ packageJson.scripts[scriptName] = desired;
214
+ repaired.push(scriptName);
215
+ changed = true;
216
+ continue;
217
+ }
218
+
219
+ // Auto-repair previous injected npx-based value to deterministic runtime path.
220
+ if (!hasLocalBinary && existing.trim() === `npx --yes cc-devflow harness ${subcommand}`) {
221
+ packageJson.scripts[scriptName] = desired;
222
+ repaired.push(scriptName);
223
+ changed = true;
224
+ continue;
225
+ }
226
+
227
+ // Auto-repair previous absolute-path fallback value (not portable across machines).
228
+ const escapedHarnessBin = HARNESS_BIN.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
229
+ const absoluteLegacy = new RegExp(`^node\\s+["']?${escapedHarnessBin}["']?\\s+${subcommand}(\\s*\\|\\|\\s*cc-devflow\\s+harness\\s+${subcommand})?$`);
230
+ if (!hasLocalBinary && absoluteLegacy.test(existing.trim())) {
231
+ packageJson.scripts[scriptName] = desired;
232
+ repaired.push(scriptName);
233
+ changed = true;
234
+ }
235
+ }
236
+
237
+ if (!changed) {
238
+ return;
239
+ }
240
+
241
+ const indent = detectJsonIndent(raw);
242
+ fs.writeFileSync(pkgPath, `${JSON.stringify(packageJson, null, indent)}\n`);
243
+
244
+ if (added.length > 0) {
245
+ console.log(`[UPDATE] package.json (added ${added.join(', ')})`);
246
+ }
247
+ if (repaired.length > 0) {
248
+ console.log(`[UPDATE] package.json (repaired ${repaired.join(', ')})`);
249
+ }
250
+ }
251
+
125
252
  function runInit(args) {
126
253
  const { options } = parseCliArgs(args);
127
254
 
@@ -141,6 +268,7 @@ function runInit(args) {
141
268
  // Case 1: Directory does not exist - Clean Install
142
269
  if (!fs.existsSync(targetDir)) {
143
270
  fs.cpSync(TEMPLATE_DIR, targetDir, { recursive: true });
271
+ ensureHarnessScripts(targetRoot);
144
272
  console.log(`Initialized .claude in ${targetRoot}`);
145
273
  return 0;
146
274
  }
@@ -150,6 +278,7 @@ function runInit(args) {
150
278
  console.log('Force flag detected. Resetting .claude directory...');
151
279
  fs.rmSync(targetDir, { recursive: true, force: true });
152
280
  fs.cpSync(TEMPLATE_DIR, targetDir, { recursive: true });
281
+ ensureHarnessScripts(targetRoot);
153
282
  console.log(`Re-initialized .claude in ${targetRoot}`);
154
283
  return 0;
155
284
  }
@@ -157,6 +286,7 @@ function runInit(args) {
157
286
  // Case 3: Directory exists - Incremental Update
158
287
  console.log(`Target ${targetDir} already exists. Performing incremental update...`);
159
288
  copyIncremental(TEMPLATE_DIR, targetDir);
289
+ ensureHarnessScripts(targetRoot);
160
290
  console.log('Incremental update complete. Existing files were preserved.');
161
291
  return 0;
162
292
  }
@@ -178,6 +308,8 @@ function runAdapt(args) {
178
308
  return 1;
179
309
  }
180
310
 
311
+ ensureHarnessScripts(targetRoot);
312
+
181
313
  const result = spawnSync(process.execPath, [ADAPT_BIN, ...rest], {
182
314
  stdio: 'inherit',
183
315
  cwd: targetRoot
@@ -191,6 +323,24 @@ function runAdapt(args) {
191
323
  return typeof result.status === 'number' ? result.status : 1;
192
324
  }
193
325
 
326
+ function runHarness(args) {
327
+ const { options, rest } = parseCliArgs(args);
328
+
329
+ const targetRoot = path.resolve(options.cwd || process.cwd());
330
+ const cliArgs = options.help || rest.length === 0 ? ['--help'] : rest;
331
+ const result = spawnSync(process.execPath, [HARNESS_BIN, ...cliArgs], {
332
+ stdio: 'inherit',
333
+ cwd: targetRoot
334
+ });
335
+
336
+ if (result.error) {
337
+ console.error(`Failed to run harness: ${result.error.message}`);
338
+ return 1;
339
+ }
340
+
341
+ return typeof result.status === 'number' ? result.status : 1;
342
+ }
343
+
194
344
  function runAdapter(command, args) {
195
345
  const result = spawnSync(process.execPath, [ADAPTER_BIN, command, ...args], {
196
346
  stdio: 'inherit'
@@ -221,6 +371,10 @@ function main() {
221
371
  return runAdapt(rest);
222
372
  }
223
373
 
374
+ if (command === 'harness') {
375
+ return runHarness(rest);
376
+ }
377
+
224
378
  return runAdapter(command, rest);
225
379
  }
226
380
 
package/bin/harness.js ADDED
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * [INPUT]: 依赖 lib/harness/cli 的 runCli 函数与 shell argv。
5
+ * [OUTPUT]: 将 harness 子命令分发到内核,并用 exit code 返回执行结果。
6
+ * [POS]: Harness 命令行入口,被 npm scripts(harness:*) 调用。
7
+ * [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
8
+ */
9
+
10
+ const { runCli } = require('../lib/harness/cli');
11
+
12
+ async function main() {
13
+ try {
14
+ const code = await runCli(process.argv.slice(2));
15
+ process.exit(code);
16
+ } catch (error) {
17
+ console.error(error.message);
18
+ process.exit(1);
19
+ }
20
+ }
21
+
22
+ main();
@@ -4,54 +4,50 @@
4
4
 
5
5
  ---
6
6
 
7
- ## 🎯 Requirement Management Commands
7
+ ## 🎯 Requirement Commands
8
8
 
9
9
  | Command | Purpose | Quick Example | Detailed Docs |
10
10
  |---------|---------|---------------|---------------|
11
- | `/flow-new` | 🚀 Start New Requirement Development | `/flow-new "REQ-123\|Feature"` | [→](./flow-new.md) |
12
- | `/flow-init` | 📦 Initialize Requirement Structure | `/flow-init "REQ-123\|Feature"` | [→](./flow-init.md) |
13
- | `/flow-status` | 📊 Query Development Progress | `/flow-status REQ-123` | [→](./flow-status.md) |
14
- | `/flow-restart` | 🔄 Resume Interrupted Development | `/flow-restart "REQ-123"` | [→](./flow-restart.md) |
15
- | `/flow-update` | Update Task Progress | `/flow-update "REQ-123" "T001"` | [→](./flow-update.md) |
16
-
17
- ## 🏗️ Architecture Design Commands
18
-
19
- | Command | Purpose | Quick Example | Detailed Docs |
20
- |---------|---------|---------------|---------------|
21
- | `/core-roadmap` | 🗺️ Generate Product Roadmap | `/core-roadmap` | [→](./core-roadmap.md) |
22
- | `/core-architecture` | 🏛️ Generate System Architecture | `/core-architecture` | [→](./core-architecture.md) |
23
- | `/core-guidelines` | 📘 Generate Project Guidelines | `/core-guidelines` | [→](./core-guidelines.md) |
24
-
25
- ## 🧪 Quality Assurance Commands
11
+ | `/flow:init` | 📦 Initialize requirement context | `/flow:init "REQ-123\|Feature"` | [→](../../.claude/commands/flow/init.md) |
12
+ | `/flow:spec` | 📋 Generate task-manifest | `/flow:spec "REQ-123"` | [→](../../.claude/commands/flow/spec.md) |
13
+ | `/flow:dev` | 🛠️ Dispatch or resume task execution | `/flow:dev "REQ-123" --resume` | [→](../../.claude/commands/flow/dev.md) |
14
+ | `/flow:verify` | Quick/strict quality gates | `/flow:verify "REQ-123" --strict` | [→](../../.claude/commands/flow/verify.md) |
15
+ | `/flow:release` | 🚢 Release + runtime cleanup | `/flow:release "REQ-123"` | [→](../../.claude/commands/flow/release.md) |
16
+ | `/flow:status` | 📊 Query progress snapshot | `/flow:status REQ-123` | [→](../../.claude/commands/flow/status.md) |
17
+ | `/flow:restart` | 🔄 Recover interrupted workflow | `/flow:restart "REQ-123" --from=dev` | [→](../../.claude/commands/flow/restart.md) |
18
+ | `/flow:update` | ✅ Update task progress | `/flow:update "REQ-123" "T001"` | [→](../../.claude/commands/flow/update.md) |
19
+ | `/flow:fix` | 🐛 Bug fix workflow | `/flow:fix "BUG-001\|Description"` | [→](../../.claude/commands/flow/fix.md) |
20
+
21
+ ## ⚠️ Deprecated Commands
22
+
23
+ | Deprecated | Migration |
24
+ |------------|-----------|
25
+ | `/flow:new` | `/flow:init -> /flow:spec -> /flow:dev -> /flow:verify -> /flow:release` |
26
+ | `/flow:clarify` | Use `/flow:spec` |
27
+ | `/flow:checklist` | Use `/flow:verify --strict` |
28
+ | `/flow:quality` | Use `/flow:verify` |
29
+
30
+ ## 🏗️ Core Commands
26
31
 
27
32
  | Command | Purpose | Quick Example | Detailed Docs |
28
33
  |---------|---------|---------------|---------------|
29
- | `/flow-checklist` | Requirement Quality Check | `/flow-checklist --type ux` | [→](../../.claude/commands/flow-checklist.md) |
30
- | `/flow-verify` | 🔍 Verify Document Consistency | `/flow-verify "REQ-123"` | [→](./flow-verify.md) |
31
- | `/flow-qa` | 🧪 Execute Quality Assurance | `/flow-qa "REQ-123"` | [→](./flow-qa.md) |
32
- | `/flow-constitution` | 📜 Constitution Compliance | `/flow-constitution --verify` | [→](./flow-constitution.md) |
33
-
34
- ## 🛠️ Tool Commands
35
-
36
- | Command | Purpose | Quick Example | Detailed Docs |
37
- |---------|---------|---------------|---------------|
38
- | `/flow-fix` | 🐛 Bug Fix Flow | `/flow-fix "BUG-001\|Description"` | [→](./flow-fix.md) |
39
- | `/flow-release` | 🚢 Create Release | `/flow-release "REQ-123"` | [→](./flow-release.md) |
34
+ | `/core:roadmap` | 🗺️ Generate product roadmap | `/core:roadmap` | [→](./core-roadmap.md) |
35
+ | `/core:architecture` | 🏛️ Generate system architecture | `/core:architecture` | [→](./core-architecture.md) |
36
+ | `/core:guidelines` | 📘 Generate project guidelines | `/core:guidelines` | [→](./core-guidelines.md) |
37
+ | `/core:style` | 🎨 Generate style system guide | `/core:style` | [→](./core-style.md) |
40
38
 
41
39
  ## 🎯 Quick Selection Guide
42
40
 
43
- ```
41
+ ```text
44
42
  Your Scenario:
45
- ├─ Start brand new feature? → /flow-new "REQ-123|Feature"
46
- ├─ Plan product direction? → /core-roadmap
47
- ├─ Design system architecture? → /core-architecture
48
- ├─ Validate requirement quality? → /flow-checklist --type ux,api,security
49
- ├─ Continue interrupted development? → /flow-restart "REQ-123"
50
- ├─ Check development progress? → /flow-status REQ-123
51
- ├─ Found document conflicts? → /flow-verify "REQ-123"
52
- ├─ Development complete, test? → /flow-qa "REQ-123"
53
- ├─ Fix production bug? → /flow-fix "BUG-001|Description"
54
- └─ Ready to release? → /flow-release "REQ-123"
43
+ ├─ Start requirement delivery? → /flow:init "REQ-123|Feature|URLs"
44
+ ├─ Need executable plan? → /flow:spec "REQ-123"
45
+ ├─ Need implementation/resume? → /flow:dev "REQ-123" [--resume]
46
+ ├─ Need release gates? → /flow:verify "REQ-123" --strict
47
+ ├─ Ready to ship? → /flow:release "REQ-123"
48
+ ├─ Check progress? → /flow:status REQ-123
49
+ ├─ Fix production bug? → /flow:fix "BUG-001|Description"
50
+ └─ Project-level planning? → /core:roadmap /core:architecture /core:guidelines
55
51
  ```
56
52
 
57
53
  ## 📚 Related Documentation
@@ -1,51 +1,49 @@
1
1
  # 📋 命令参考文档
2
2
 
3
- ## 🎯 需求管理命令
3
+ ## 🎯 需求命令
4
4
 
5
5
  | 命令 | 用途 | 快速示例 |
6
6
  |------|------|----------|
7
- | `/flow-new` | 🚀 启动新需求开发 | `/flow-new "REQ-123|功能"` → [详细文档](./flow-new.md) |
8
- | `/flow-init` | 📦 初始化需求结构 | `/flow-init "REQ-123|功能"` → [详细文档](./flow-init.md) |
9
- | `/flow-status` | 📊 查询开发进度 | `/flow-status REQ-123` → [详细文档](./flow-status.md) |
10
- | `/flow-restart` | 🔄 恢复中断的开发 | `/flow-restart "REQ-123"` → [详细文档](./flow-restart.md) |
11
- | `/flow-update` | 更新任务进度 | `/flow-update "REQ-123" "T001"` → [详细文档](./flow-update.md) |
12
-
13
- ## 🏗️ 架构设计命令
14
-
15
- | 命令 | 用途 | 快速示例 |
16
- |------|------|----------|
17
- | `/core-roadmap` | 🗺️ 生成产品路线图 | `/core-roadmap` → [详细文档](./core-roadmap.md) |
18
- | `/core-architecture` | 🏛️ 生成系统架构 | `/core-architecture` → [详细文档](./core-architecture.md) |
19
- | `/core-guidelines` | 📘 生成项目规范 | `/core-guidelines` → [详细文档](./core-guidelines.md) |
20
-
21
- ## 🧪 质量保证命令
7
+ | `/flow:init` | 📦 初始化需求上下文 | `/flow:init "REQ-123|功能"` → [详细文档](../../.claude/commands/flow/init.md) |
8
+ | `/flow:spec` | 📋 生成可执行任务清单 | `/flow:spec "REQ-123"` → [详细文档](../../.claude/commands/flow/spec.md) |
9
+ | `/flow:dev` | 🛠️ 分发/恢复任务执行 | `/flow:dev "REQ-123" --resume` → [详细文档](../../.claude/commands/flow/dev.md) |
10
+ | `/flow:verify` | 执行快速/严格质量闸 | `/flow:verify "REQ-123" --strict` → [详细文档](../../.claude/commands/flow/verify.md) |
11
+ | `/flow:release` | 🚢 发布并清理运行时 | `/flow:release "REQ-123"` → [详细文档](../../.claude/commands/flow/release.md) |
12
+ | `/flow:status` | 📊 查询开发进度 | `/flow:status REQ-123` → [详细文档](../../.claude/commands/flow/status.md) |
13
+ | `/flow:restart` | 🔄 恢复中断工作流 | `/flow:restart "REQ-123" --from=dev` → [详细文档](../../.claude/commands/flow/restart.md) |
14
+ | `/flow:update` | ✅ 更新任务进度 | `/flow:update "REQ-123" "T001"` → [详细文档](../../.claude/commands/flow/update.md) |
15
+ | `/flow:fix` | 🐛 Bug 修复流程 | `/flow:fix "BUG-001\|描述"` → [详细文档](../../.claude/commands/flow/fix.md) |
16
+
17
+ ## ⚠️ 已废弃命令
18
+
19
+ | 废弃命令 | 迁移路径 |
20
+ |----------|----------|
21
+ | `/flow:new` | `/flow:init -> /flow:spec -> /flow:dev -> /flow:verify -> /flow:release` |
22
+ | `/flow:clarify` | 使用 `/flow:spec` |
23
+ | `/flow:checklist` | 使用 `/flow:verify --strict` |
24
+ | `/flow:quality` | 使用 `/flow:verify` |
25
+
26
+ ## 🏗️ 核心命令
22
27
 
23
28
  | 命令 | 用途 | 快速示例 |
24
29
  |------|------|----------|
25
- | `/flow-verify` | 🔍 验证文档一致性 | `/flow-verify "REQ-123"` → [详细文档](./flow-verify.md) |
26
- | `/flow-qa` | 🧪 执行质量保证 | `/flow-qa "REQ-123"` → [详细文档](./flow-qa.md) |
27
- | `/flow-constitution` | 📜 Constitution 合规 | `/flow-constitution --verify` → [详细文档](./flow-constitution.md) |
28
-
29
- ## 🛠️ 工具命令
30
-
31
- | 命令 | 用途 | 快速示例 |
32
- |------|------|----------|
33
- | `/flow-fix` | 🐛 Bug 修复流程 | `/flow-fix "BUG-001\|描述"` → [详细文档](./flow-fix.md) |
34
- | `/flow-release` | 🚢 创建发布 | `/flow-release "REQ-123"` → [详细文档](./flow-release.md) |
30
+ | `/core:roadmap` | 🗺️ 生成产品路线图 | `/core:roadmap` → [详细文档](./core-roadmap.md) |
31
+ | `/core:architecture` | 🏛️ 生成系统架构 | `/core:architecture` → [详细文档](./core-architecture.md) |
32
+ | `/core:guidelines` | 📘 生成项目规范 | `/core:guidelines` → [详细文档](./core-guidelines.md) |
33
+ | `/core:style` | 🎨 生成设计风格指南 | `/core:style` → [详细文档](./core-style.md) |
35
34
 
36
35
  ## 🎯 快速选择指南
37
36
 
38
- ```
37
+ ```text
39
38
  你的场景:
40
- ├─ 启动全新功能? → /flow-new "REQ-123|功能"
41
- ├─ 规划产品方向? → /core-roadmap
42
- ├─ 设计系统架构? → /core-architecture
43
- ├─ 开发中断继续? → /flow-restart "REQ-123"
44
- ├─ 检查开发进度? → /flow-status REQ-123
45
- ├─ 发现文档冲突? → /flow-verify "REQ-123"
46
- ├─ 开发完成测试? → /flow-qa "REQ-123"
47
- ├─ 修复生产 Bug? → /flow-fix "BUG-001|描述"
48
- └─ 准备发布上线? → /flow-release "REQ-123"
39
+ ├─ 启动需求交付? → /flow:init "REQ-123|功能|URLs"
40
+ ├─ 生成可执行计划? → /flow:spec "REQ-123"
41
+ ├─ 执行或恢复开发? → /flow:dev "REQ-123" [--resume]
42
+ ├─ 进行发布门禁? → /flow:verify "REQ-123" --strict
43
+ ├─ 准备发布上线? → /flow:release "REQ-123"
44
+ ├─ 检查进度? → /flow:status REQ-123
45
+ ├─ 修复生产 Bug? → /flow:fix "BUG-001|描述"
46
+ └─ 做项目级规划? → /core:roadmap /core:architecture /core:guidelines
49
47
  ```
50
48
 
51
49
  ## 📚 相关文档
@@ -22,7 +22,7 @@ Generate comprehensive product roadmap and requirement priority planning through
22
22
  - Present product plan to team
23
23
 
24
24
  ### ❌ Not Recommended Scenarios
25
- - Single requirement development → Use `/flow-new`
25
+ - Single requirement development → Use `/flow:init` (then `/flow:spec` → `/flow:dev` → `/flow:verify` → `/flow:release`)
26
26
 
27
27
  ## 🔄 Execution Flow (6-Stage Interactive Dialogue)
28
28
 
@@ -96,7 +96,7 @@ User: Target users are Tech Leads and senior engineers in development teams.
96
96
  ## 🔗 Related Commands
97
97
 
98
98
  - [`/core-architecture`](./core-architecture.md) - Generate architecture based on roadmap
99
- - [`/flow-init`](./flow-init.md) - Initialize requirement based on roadmap
99
+ - [`/flow:init`](./flow-init.md) - Initialize requirement based on roadmap
100
100
  - `.claude/scripts/sync-roadmap-progress.sh` - Sync progress to roadmap
101
101
 
102
102
  ## 📚 Deep Reading
@@ -18,7 +18,7 @@
18
18
  - 向团队展示产品规划
19
19
 
20
20
  ### ❌ 不推荐场景
21
- - 单个需求开发 → 使用 `/flow-new`
21
+ - 单个需求开发 → 使用 `/flow:init`(随后 `/flow:spec` → `/flow:dev` → `/flow:verify` → `/flow:release`)
22
22
 
23
23
  ## 🔄 执行流程(6阶段交互式对话)
24
24
 
@@ -92,7 +92,7 @@ User: 目标用户是开发团队的 Tech Lead 和高级工程师。
92
92
  ## 🔗 相关命令
93
93
 
94
94
  - [`/core-architecture`](./core-architecture.md) - 基于路线图生成架构
95
- - [`/flow-init`](./flow-init.md) - 基于路线图初始化需求
95
+ - [`/flow:init`](./flow-init.md) - 基于路线图初始化需求
96
96
  - `.claude/scripts/sync-roadmap-progress.sh` - 同步进度到路线图
97
97
 
98
98
  ## 📚 深度阅读