cc-devflow 1.0.1
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/.claude/CLAUDE.md +83 -0
- package/.claude/agents/architecture-designer.md +443 -0
- package/.claude/agents/bug-analyzer.md +382 -0
- package/.claude/agents/checklist-agent.md +175 -0
- package/.claude/agents/clarify-analyst.md +50 -0
- package/.claude/agents/code-reviewer.md +71 -0
- package/.claude/agents/codex-analyzer.md +39 -0
- package/.claude/agents/compatibility-checker.md +580 -0
- package/.claude/agents/consistency-checker.md +532 -0
- package/.claude/agents/impact-analyzer.md +441 -0
- package/.claude/agents/planner.md +230 -0
- package/.claude/agents/prd-writer.md +320 -0
- package/.claude/agents/project-guidelines-generator.md +1329 -0
- package/.claude/agents/qa-tester.md +313 -0
- package/.claude/agents/release-manager.md +295 -0
- package/.claude/agents/security-reviewer.md +314 -0
- package/.claude/agents/style-guide-generator.md +458 -0
- package/.claude/agents/tech-architect.md +516 -0
- package/.claude/agents/ui-designer.md +485 -0
- package/.claude/commands/code-review-high.md +58 -0
- package/.claude/commands/core-architecture.md +429 -0
- package/.claude/commands/core-guidelines.md +486 -0
- package/.claude/commands/core-roadmap.md +439 -0
- package/.claude/commands/core-style.md +293 -0
- package/.claude/commands/flow-archive.md +245 -0
- package/.claude/commands/flow-checklist.md +260 -0
- package/.claude/commands/flow-clarify.md +136 -0
- package/.claude/commands/flow-constitution.md +82 -0
- package/.claude/commands/flow-dev.md +134 -0
- package/.claude/commands/flow-epic.md +150 -0
- package/.claude/commands/flow-fix.md +104 -0
- package/.claude/commands/flow-ideate.md +214 -0
- package/.claude/commands/flow-init.md +313 -0
- package/.claude/commands/flow-new.md +394 -0
- package/.claude/commands/flow-prd.md +131 -0
- package/.claude/commands/flow-qa.md +93 -0
- package/.claude/commands/flow-release.md +92 -0
- package/.claude/commands/flow-restart.md +98 -0
- package/.claude/commands/flow-status.md +64 -0
- package/.claude/commands/flow-tech.md +142 -0
- package/.claude/commands/flow-ui.md +189 -0
- package/.claude/commands/flow-update.md +111 -0
- package/.claude/commands/flow-upgrade.md +115 -0
- package/.claude/commands/flow-verify.md +96 -0
- package/.claude/commands/problem-analyzer.md +60 -0
- package/.claude/config/quality-rules.yml +161 -0
- package/.claude/docs/SPEC_KIT_CONSTITUTION_ANALYSIS.md +426 -0
- package/.claude/docs/design/consistency-conflict-detection-algorithms.md +658 -0
- package/.claude/docs/design/intent-driven-input-design.md +380 -0
- package/.claude/docs/design/prd-version-management-design.md +437 -0
- package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +117 -0
- package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +151 -0
- package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +188 -0
- package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +338 -0
- package/.claude/docs/templates/ARCHITECTURE_TEMPLATE.md +633 -0
- package/.claude/docs/templates/BACKLOG_TEMPLATE.md +261 -0
- package/.claude/docs/templates/CHECKLIST_TEMPLATE.md +52 -0
- package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +206 -0
- package/.claude/docs/templates/CODE_REVIEW_TEMPLATE.md +71 -0
- package/.claude/docs/templates/EPIC_TEMPLATE.md +805 -0
- package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +213 -0
- package/.claude/docs/templates/INTENT_CLARIFICATION_TEMPLATE.md +57 -0
- package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +148 -0
- package/.claude/docs/templates/PRD_TEMPLATE.md +562 -0
- package/.claude/docs/templates/RESEARCH_TEMPLATE.md +276 -0
- package/.claude/docs/templates/REVIEW-HIGH.md +57 -0
- package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +198 -0
- package/.claude/docs/templates/ROADMAP_TEMPLATE.md +310 -0
- package/.claude/docs/templates/STYLE_TEMPLATE.md +1266 -0
- package/.claude/docs/templates/TASKS_TEMPLATE.md +523 -0
- package/.claude/docs/templates/TECH_DESIGN_TEMPLATE.md +1019 -0
- package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +1436 -0
- package/.claude/guides/agent-guides/agent-coordination-guide.md +459 -0
- package/.claude/guides/project-guidelines-system.md +463 -0
- package/.claude/guides/technical-guides/datetime-handling-guide.md +563 -0
- package/.claude/guides/technical-guides/git-github-guide.md +642 -0
- package/.claude/guides/technical-guides/test-execution-guide.md +618 -0
- package/.claude/guides/workflow-guides/bug-fix-orchestrator.md +217 -0
- package/.claude/guides/workflow-guides/flow-orchestrator.md +282 -0
- package/.claude/hooks/checklist-gate.js +397 -0
- package/.claude/hooks/error-handling-reminder.sh +12 -0
- package/.claude/hooks/error-handling-reminder.ts +459 -0
- package/.claude/hooks/post-tool-use-tracker.sh +280 -0
- package/.claude/hooks/pre-tool-use-guardrail.sh +36 -0
- package/.claude/hooks/pre-tool-use-guardrail.ts +342 -0
- package/.claude/hooks/skill-activation-prompt.sh +36 -0
- package/.claude/hooks/skill-activation-prompt.ts +214 -0
- package/.claude/hooks/state/skills-used-test-guard.json +3 -0
- package/.claude/rules/devflow-conventions.md +305 -0
- package/.claude/rules/project-constitution.md +748 -0
- package/.claude/schemas/constitution.schema.json +43 -0
- package/.claude/scripts/analyze-upgrade-impact.sh +200 -0
- package/.claude/scripts/archive-requirement.sh +351 -0
- package/.claude/scripts/calculate-checklist-completion.sh +243 -0
- package/.claude/scripts/calculate-quarter.sh +206 -0
- package/.claude/scripts/check-dependencies.sh +409 -0
- package/.claude/scripts/check-prerequisites.sh +232 -0
- package/.claude/scripts/check-task-status.sh +264 -0
- package/.claude/scripts/checklist-errors.sh +131 -0
- package/.claude/scripts/common.sh +570 -0
- package/.claude/scripts/consolidate-research.sh +182 -0
- package/.claude/scripts/create-requirement.sh +426 -0
- package/.claude/scripts/export-contracts.sh +117 -0
- package/.claude/scripts/extract-data-model.sh +78 -0
- package/.claude/scripts/generate-clarification-questions.sh +377 -0
- package/.claude/scripts/generate-clarification-report.sh +463 -0
- package/.claude/scripts/generate-quickstart.sh +146 -0
- package/.claude/scripts/generate-research-tasks.sh +157 -0
- package/.claude/scripts/generate-status-report.sh +523 -0
- package/.claude/scripts/generate-tech-analysis.sh +46 -0
- package/.claude/scripts/locate-requirement-in-roadmap.sh +233 -0
- package/.claude/scripts/manage-constitution.sh +602 -0
- package/.claude/scripts/mark-task-complete.sh +198 -0
- package/.claude/scripts/populate-research-tasks.sh +259 -0
- package/.claude/scripts/recover-workflow.sh +460 -0
- package/.claude/scripts/run-clarify-scan.sh +601 -0
- package/.claude/scripts/run-high-review.sh +62 -0
- package/.claude/scripts/run-problem-analysis.sh +68 -0
- package/.claude/scripts/setup-epic.sh +173 -0
- package/.claude/scripts/sync-roadmap-progress.sh +300 -0
- package/.claude/scripts/sync-task-marks.sh +199 -0
- package/.claude/scripts/test-clarify-scan.sh +515 -0
- package/.claude/scripts/update-agent-context.sh +806 -0
- package/.claude/scripts/validate-constitution.sh +567 -0
- package/.claude/scripts/validate-hooks.sh +487 -0
- package/.claude/scripts/validate-research.sh +332 -0
- package/.claude/scripts/validate-scope-boundary.sh +493 -0
- package/.claude/scripts/verify-setup.sh +37 -0
- package/.claude/settings.json +76 -0
- package/.claude/skills/_reference-implementations/README.md +96 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/SKILL.md +302 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/architecture-overview.md +451 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/async-and-errors.md +307 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/complete-examples.md +638 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/configuration.md +275 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/database-patterns.md +224 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/middleware-guide.md +213 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/routing-and-controllers.md +756 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/sentry-and-monitoring.md +336 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/services-and-repositories.md +789 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/testing-guide.md +235 -0
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/validation-patterns.md +754 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/SKILL.md +399 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/common-patterns.md +331 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/complete-examples.md +872 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/component-patterns.md +502 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/data-fetching.md +767 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/file-organization.md +502 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/loading-and-error-states.md +501 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/performance.md +406 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/routing-guide.md +364 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/styling-guide.md +428 -0
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/typescript-standards.md +418 -0
- package/.claude/skills/cc-devflow-orchestrator/SKILL.md +229 -0
- package/.claude/skills/constitution-guardian/SKILL.md +306 -0
- package/.claude/skills/devflow-constitution-quick-ref/SKILL.md +374 -0
- package/.claude/skills/devflow-file-standards/SKILL.md +353 -0
- package/.claude/skills/devflow-tdd-enforcer/SKILL.md +192 -0
- package/.claude/skills/skill-developer/ADVANCED.md +197 -0
- package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +306 -0
- package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +152 -0
- package/.claude/skills/skill-developer/SKILL.md +426 -0
- package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +315 -0
- package/.claude/skills/skill-developer/TRIGGER_TYPES.md +305 -0
- package/.claude/skills/skill-developer/TROUBLESHOOTING.md +514 -0
- package/.claude/skills/skill-rules.json +213 -0
- package/.claude/tests/README.md +300 -0
- package/.claude/tests/TODO.md +69 -0
- package/.claude/tests/__pycache__/test_analyze_upgrade_impact.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_consolidate_research.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_export_contracts.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_extract_data_model.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_generate_quickstart.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_generate_research_tasks.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/constitution/run_all_constitution_tests.sh +111 -0
- package/.claude/tests/constitution/test_agent_assignment.sh +207 -0
- package/.claude/tests/constitution/test_article_coverage.sh +201 -0
- package/.claude/tests/constitution/test_template_completeness.sh +150 -0
- package/.claude/tests/constitution/test_version_consistency.sh +120 -0
- package/.claude/tests/fixtures/spec_delta_full.md +16 -0
- package/.claude/tests/fixtures/tasks_progress_sample.md +5 -0
- package/.claude/tests/run-all-tests.sh +229 -0
- package/.claude/tests/scripts/run.sh +30 -0
- package/.claude/tests/scripts/test-framework.sh +128 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh +511 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak +504 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak2 +505 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak3 +506 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak4 +507 -0
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak5 +508 -0
- package/.claude/tests/scripts/test_check_task_status.sh +499 -0
- package/.claude/tests/scripts/test_common.sh +244 -0
- package/.claude/tests/scripts/test_generate_status_report.sh +71 -0
- package/.claude/tests/scripts/test_mark_task_complete.sh +441 -0
- package/.claude/tests/scripts/test_mark_task_complete.sh.backup +410 -0
- package/.claude/tests/scripts/test_recover_workflow.sh +304 -0
- package/.claude/tests/scripts/test_setup_epic.sh +437 -0
- package/.claude/tests/scripts/test_sync_task_marks.sh +196 -0
- package/.claude/tests/scripts/test_validate_constitution.sh +74 -0
- package/.claude/tests/scripts/test_validate_research.sh +462 -0
- package/.claude/tests/slugify.bats +82 -0
- package/.claude/tests/test-framework.sh +732 -0
- package/.claude/tests/test_analyze_upgrade_impact.py +34 -0
- package/.claude/tests/test_consolidate_research.py +48 -0
- package/.claude/tests/test_export_contracts.py +43 -0
- package/.claude/tests/test_extract_data_model.py +33 -0
- package/.claude/tests/test_generate_quickstart.py +50 -0
- package/.claude/tests/test_generate_research_tasks.py +52 -0
- package/.claude/tsc-cache/6e64f818-6398-49ca-8623-581a9af85c44/edited-files.log +1 -0
- package/.claude/tsc-cache/795ba6e3-b98a-423b-bab2-51aa62812569/affected-repos.txt +1 -0
- package/.claude/tsc-cache/795ba6e3-b98a-423b-bab2-51aa62812569/edited-files.log +1 -0
- package/.claude/tsc-cache/ae335694-be5a-4ba4-a1a0-b676c09a7906/affected-repos.txt +1 -0
- package/.claude/tsc-cache/ae335694-be5a-4ba4-a1a0-b676c09a7906/edited-files.log +1 -0
- package/CHANGELOG.md +507 -0
- package/LICENSE +21 -0
- package/README.md +534 -0
- package/README.zh-CN.md +530 -0
- package/bin/adapt.js +240 -0
- package/bin/cc-devflow-cli.js +185 -0
- package/bin/cc-devflow.js +78 -0
- package/config/adapters.yml +5 -0
- package/config/schema/adapters.schema.json +44 -0
- package/docs/CLAUDE.md +26 -0
- package/docs/commands/README.md +61 -0
- package/docs/commands/README.zh-CN.md +55 -0
- package/docs/commands/core-roadmap.md +106 -0
- package/docs/commands/core-roadmap.zh-CN.md +102 -0
- package/docs/commands/core-style.md +405 -0
- package/docs/commands/core-style.zh-CN.md +405 -0
- package/docs/commands/flow-init.md +134 -0
- package/docs/commands/flow-init.zh-CN.md +163 -0
- package/docs/commands/flow-new.md +274 -0
- package/docs/commands/flow-new.zh-CN.md +270 -0
- package/docs/guides/getting-started.md +204 -0
- package/docs/guides/getting-started.zh-CN.md +152 -0
- package/lib/adapters/adapter-interface.js +57 -0
- package/lib/adapters/claude-adapter.js +74 -0
- package/lib/adapters/codex-adapter.js +40 -0
- package/lib/adapters/config-validator.js +68 -0
- package/lib/adapters/logger.js +42 -0
- package/lib/adapters/registry.js +153 -0
- package/lib/compiler/CLAUDE.md +92 -0
- package/lib/compiler/__tests__/drift.test.js +215 -0
- package/lib/compiler/__tests__/errors.test.js +184 -0
- package/lib/compiler/__tests__/incremental.test.js +174 -0
- package/lib/compiler/__tests__/integration.test.js +174 -0
- package/lib/compiler/__tests__/manifest.test.js +233 -0
- package/lib/compiler/__tests__/parser.test.js +456 -0
- package/lib/compiler/__tests__/schemas.test.js +301 -0
- package/lib/compiler/__tests__/skills-registry.test.js +125 -0
- package/lib/compiler/__tests__/transformer.test.js +286 -0
- package/lib/compiler/emitters/antigravity-emitter.js +171 -0
- package/lib/compiler/emitters/base-emitter.js +73 -0
- package/lib/compiler/emitters/codex-emitter.js +52 -0
- package/lib/compiler/emitters/cursor-emitter.js +31 -0
- package/lib/compiler/emitters/index.js +50 -0
- package/lib/compiler/emitters/qwen-emitter.js +39 -0
- package/lib/compiler/errors.js +119 -0
- package/lib/compiler/index.js +256 -0
- package/lib/compiler/manifest.js +242 -0
- package/lib/compiler/parser.js +258 -0
- package/lib/compiler/platforms.js +113 -0
- package/lib/compiler/resource-copier.js +320 -0
- package/lib/compiler/rules-emitters/__tests__/antigravity-rules-emitter.test.js +191 -0
- package/lib/compiler/rules-emitters/__tests__/codex-rules-emitter.test.js +109 -0
- package/lib/compiler/rules-emitters/__tests__/cursor-rules-emitter.test.js +123 -0
- package/lib/compiler/rules-emitters/__tests__/qwen-rules-emitter.test.js +123 -0
- package/lib/compiler/rules-emitters/antigravity-rules-emitter.js +253 -0
- package/lib/compiler/rules-emitters/base-rules-emitter.js +83 -0
- package/lib/compiler/rules-emitters/codex-rules-emitter.js +116 -0
- package/lib/compiler/rules-emitters/cursor-rules-emitter.js +98 -0
- package/lib/compiler/rules-emitters/index.js +71 -0
- package/lib/compiler/rules-emitters/qwen-rules-emitter.js +70 -0
- package/lib/compiler/schemas.js +144 -0
- package/lib/compiler/skills-registry.js +225 -0
- package/lib/compiler/transformer.js +236 -0
- package/package.json +50 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-init
|
|
3
|
+
description: 'Initialize requirement structure. Usage: /flow-init "REQ-123|Title|URLs"'
|
|
4
|
+
scripts:
|
|
5
|
+
create: .claude/scripts/create-requirement.sh
|
|
6
|
+
prereq: .claude/scripts/check-prerequisites.sh
|
|
7
|
+
research_tasks: .claude/scripts/generate-research-tasks.sh
|
|
8
|
+
populate_tasks: .claude/scripts/populate-research-tasks.sh
|
|
9
|
+
consolidate: .claude/scripts/consolidate-research.sh
|
|
10
|
+
validate_research: .claude/scripts/validate-research.sh
|
|
11
|
+
templates:
|
|
12
|
+
flow: .claude/docs/templates/INIT_FLOW_TEMPLATE.md
|
|
13
|
+
research: .claude/docs/templates/RESEARCH_TEMPLATE.md
|
|
14
|
+
guides:
|
|
15
|
+
troubleshoot: .claude/docs/guides/INIT_TROUBLESHOOTING.md
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<!-- ============================================================
|
|
19
|
+
头文件引用语法规范 (Header File Reference Syntax)
|
|
20
|
+
============================================================
|
|
21
|
+
|
|
22
|
+
命令头文件格式:
|
|
23
|
+
```yaml
|
|
24
|
+
scripts:
|
|
25
|
+
create: .claude/scripts/create-requirement.sh
|
|
26
|
+
templates:
|
|
27
|
+
flow: .claude/docs/templates/INIT_FLOW_TEMPLATE.md
|
|
28
|
+
guides:
|
|
29
|
+
troubleshoot: .claude/docs/guides/INIT_TROUBLESHOOTING.md
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
引用语法:
|
|
33
|
+
- {SCRIPT:create} → 执行 .claude/scripts/create-requirement.sh
|
|
34
|
+
- {TEMPLATE:flow} → 加载 .claude/docs/templates/INIT_FLOW_TEMPLATE.md
|
|
35
|
+
- {GUIDE:troubleshoot} → 参考 .claude/docs/guides/INIT_TROUBLESHOOTING.md
|
|
36
|
+
|
|
37
|
+
使用案例:
|
|
38
|
+
```markdown
|
|
39
|
+
# 正文中遇到:
|
|
40
|
+
→ Run: {SCRIPT:create} "REQ-123" --title "User Auth"
|
|
41
|
+
# 解释为:
|
|
42
|
+
→ 执行命令: bash .claude/scripts/create-requirement.sh "REQ-123" --title "User Auth"
|
|
43
|
+
|
|
44
|
+
# 正文中遇到:
|
|
45
|
+
→ 详见 {TEMPLATE:flow} Stage 2.5
|
|
46
|
+
# 解释为:
|
|
47
|
+
→ 打开并阅读 .claude/docs/templates/INIT_FLOW_TEMPLATE.md 中的 Stage 2.5 章节
|
|
48
|
+
|
|
49
|
+
# 正文中遇到:
|
|
50
|
+
→ 遇到问题参考 {GUIDE:troubleshoot}
|
|
51
|
+
# 解释为:
|
|
52
|
+
→ 打开并阅读 .claude/docs/guides/INIT_TROUBLESHOOTING.md
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
规则: 遇到 {TYPE:key} 占位符时,去头文件 YAML 中找对应类型的 key,获取文件路径并执行/加载。
|
|
56
|
+
============================================================ -->
|
|
57
|
+
|
|
58
|
+
# Flow-Init - 需求初始化命令
|
|
59
|
+
|
|
60
|
+
## User Input
|
|
61
|
+
```text
|
|
62
|
+
$ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?" 或 --interactive
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**格式**:
|
|
66
|
+
- REQ_ID: `^(REQ|BUG)-[0-9]+$` (例如: REQ-123, BUG-456)
|
|
67
|
+
- TITLE: 需求简短标题
|
|
68
|
+
- PLAN_URLS: 计划文档URL,多个用逗号分隔 (可选)
|
|
69
|
+
|
|
70
|
+
**示例**:
|
|
71
|
+
```
|
|
72
|
+
/flow-init "REQ-123|User Authentication"
|
|
73
|
+
/flow-init "REQ-124|数据导出|https://docs.example.com/export-spec.md"
|
|
74
|
+
/flow-init --interactive
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 执行前加载
|
|
80
|
+
|
|
81
|
+
**详细流程**:
|
|
82
|
+
→ 参见 `{TEMPLATE:flow}` 获取完整执行流程
|
|
83
|
+
|
|
84
|
+
**研究模板**:
|
|
85
|
+
→ 参见 `{TEMPLATE:research}` 了解研究文档格式
|
|
86
|
+
|
|
87
|
+
**故障排查**:
|
|
88
|
+
→ 遇到问题参考 `{GUIDE:troubleshoot}`
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 执行流程
|
|
93
|
+
|
|
94
|
+
### Stage 1: Entry Gate (参数验证)
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
1. 解析参数: REQ_ID|TITLE|PLAN_URLS
|
|
98
|
+
→ 验证 REQ_ID 格式: ^(REQ|BUG)-[0-9]+$
|
|
99
|
+
→ 提取 TITLE 和 PLAN_URLS
|
|
100
|
+
|
|
101
|
+
2. 前置条件检查
|
|
102
|
+
→ Run: {SCRIPT:prereq} --json --paths-only
|
|
103
|
+
→ 检查 Git 状态是否干净
|
|
104
|
+
→ 验证 devflow/ 目录存在
|
|
105
|
+
|
|
106
|
+
3. 目录唯一性检查
|
|
107
|
+
→ 确认 devflow/requirements/${REQ_ID}/ 不存在
|
|
108
|
+
→ 如果存在 → ERROR (使用 --force 强制覆盖)
|
|
109
|
+
|
|
110
|
+
4. 验证通过 → 继续 Stage 1.5
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### Stage 1.5: Context Loading (路线图与架构)
|
|
116
|
+
|
|
117
|
+
**目标**: 理解需求在项目中的位置
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
检查 ROADMAP.md 和 ARCHITECTURE.md:
|
|
121
|
+
→ 如果存在: 加载上下文,展示需求位置
|
|
122
|
+
→ 如果不存在: 提示可选运行 /core-roadmap
|
|
123
|
+
|
|
124
|
+
→ 详见 {TEMPLATE:flow} Stage 1.5
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**输出**: 显示需求在路线图和架构中的位置 (如果可用)
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
### Stage 2: Directory Initialization
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
创建需求目录结构:
|
|
135
|
+
→ Run: {SCRIPT:create} "${REQ_ID}" --title "${TITLE}" --json
|
|
136
|
+
|
|
137
|
+
生成文件:
|
|
138
|
+
- devflow/requirements/${REQ_ID}/README.md
|
|
139
|
+
- devflow/requirements/${REQ_ID}/EXECUTION_LOG.md
|
|
140
|
+
- devflow/requirements/${REQ_ID}/orchestration_status.json
|
|
141
|
+
- devflow/requirements/${REQ_ID}/research/ (目录)
|
|
142
|
+
|
|
143
|
+
→ 详见 {TEMPLATE:flow} Stage 2
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
### Stage 2.5: Research (MCP Mandatory Flow)
|
|
149
|
+
|
|
150
|
+
**目标**: 收集"真实材料",所有步骤 **MANDATORY**
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
S0: Internal Codebase Research (必需)
|
|
154
|
+
→ 分析现有代码库,生成 research/internal/codebase-overview.md
|
|
155
|
+
|
|
156
|
+
Task 1-5: External Learning Materials (MCP)
|
|
157
|
+
1. Official Documentation (Context7)
|
|
158
|
+
2. Domain Tutorials (Web Search)
|
|
159
|
+
3. Core Materials (WebFetch)
|
|
160
|
+
4. Case Studies/Examples (Web Search + WebFetch)
|
|
161
|
+
5. Summary & Recommendations
|
|
162
|
+
|
|
163
|
+
→ 详见 {TEMPLATE:flow} Stage 2.5
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**输出**:
|
|
167
|
+
- `research/internal/codebase-overview.md`
|
|
168
|
+
- `research/mcp/$(date +%Y%m%d)/official/*`
|
|
169
|
+
- `research/mcp/$(date +%Y%m%d)/guides/*`
|
|
170
|
+
- `research/mcp/$(date +%Y%m%d)/tutorials/*`
|
|
171
|
+
- `research/mcp/$(date +%Y%m%d)/examples/*`
|
|
172
|
+
- `research/research-summary.md`
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
### Stage 2.6: Research Consolidation
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
研究决策整合:
|
|
180
|
+
1. Generate research tasks
|
|
181
|
+
→ Run: {SCRIPT:research_tasks} "${REQ_DIR}"
|
|
182
|
+
→ Output: research/tasks.json
|
|
183
|
+
|
|
184
|
+
2. Populate task decisions
|
|
185
|
+
→ Run: {SCRIPT:populate_tasks} "${REQ_DIR}"
|
|
186
|
+
→ Fill decision/rationale/alternatives from research
|
|
187
|
+
|
|
188
|
+
3. Consolidate research
|
|
189
|
+
→ Run: {SCRIPT:consolidate} "${REQ_DIR}"
|
|
190
|
+
→ Output: research/research.md
|
|
191
|
+
→ Format: Decision/Rationale/Alternatives/Source
|
|
192
|
+
|
|
193
|
+
4. Update status
|
|
194
|
+
→ orchestration_status.json.phase0_complete = true
|
|
195
|
+
|
|
196
|
+
→ 详见 {TEMPLATE:flow} Stage 2.6
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
### Stage 3: Git Branch Creation
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
创建功能分支:
|
|
205
|
+
→ Requirements: feature/${REQ_ID}-${slug(title)}
|
|
206
|
+
→ Bug Fixes: bugfix/${BUG_ID}-${slug(title)}
|
|
207
|
+
|
|
208
|
+
Where slug() = lowercase, replace spaces/special chars with hyphens
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
### Stage 4: README Generation
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
生成工作流指南:
|
|
217
|
+
→ devflow/requirements/${REQ_ID}/README.md
|
|
218
|
+
→ 包含: 需求概述、工作流步骤、检查清单
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
### Stage 5: Exit Gate (5-Level Quality Check)
|
|
224
|
+
|
|
225
|
+
**5层验证**:
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
Level 1: File Existence Check
|
|
229
|
+
→ 验证所有必需文件已创建
|
|
230
|
+
|
|
231
|
+
Level 2: Research.md Structure Validation
|
|
232
|
+
→ Run: {SCRIPT:validate_research} "${REQ_DIR}"
|
|
233
|
+
→ 检查 research.md 结构
|
|
234
|
+
|
|
235
|
+
Level 3: Research.md Content Quality
|
|
236
|
+
→ 无 TODO/FIXME/{{PLACEHOLDER}} 标记
|
|
237
|
+
→ 每个 Decision block 完整
|
|
238
|
+
|
|
239
|
+
Level 4: Research Tasks Validation
|
|
240
|
+
→ 验证 tasks.json 格式和内容
|
|
241
|
+
|
|
242
|
+
Level 5: Git & Status & Constitution
|
|
243
|
+
→ Git 分支创建成功
|
|
244
|
+
→ orchestration_status.json 正确
|
|
245
|
+
→ Constitution 符合性检查
|
|
246
|
+
|
|
247
|
+
→ 详见 {TEMPLATE:flow} Stage 5
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## 输出产物
|
|
253
|
+
|
|
254
|
+
### Requirements
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
devflow/requirements/${REQ_ID}/
|
|
258
|
+
├── README.md
|
|
259
|
+
├── research/
|
|
260
|
+
│ ├── internal/
|
|
261
|
+
│ │ └── codebase-overview.md
|
|
262
|
+
│ ├── mcp/
|
|
263
|
+
│ │ └── $(date +%Y%m%d)/
|
|
264
|
+
│ │ ├── official/
|
|
265
|
+
│ │ ├── guides/
|
|
266
|
+
│ │ ├── tutorials/
|
|
267
|
+
│ │ └── examples/
|
|
268
|
+
│ ├── research.md
|
|
269
|
+
│ ├── research-summary.md
|
|
270
|
+
│ └── tasks.json
|
|
271
|
+
├── EXECUTION_LOG.md
|
|
272
|
+
└── orchestration_status.json
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Git
|
|
276
|
+
|
|
277
|
+
- **Branch**: `feature/${REQ_ID}-${slug(title)}`
|
|
278
|
+
- **Status**: orchestration_status.json.status = "initialized"
|
|
279
|
+
- **Phase**: orchestration_status.json.phase = "planning"
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## 错误处理
|
|
284
|
+
|
|
285
|
+
**常见错误**:
|
|
286
|
+
→ 详见 `{GUIDE:troubleshoot}`
|
|
287
|
+
|
|
288
|
+
**主要错误场景**:
|
|
289
|
+
1. Invalid REQ_ID format → 检查格式
|
|
290
|
+
2. REQ_ID already exists → 使用不同 ID 或 --force
|
|
291
|
+
3. Git status not clean → commit/stash changes
|
|
292
|
+
4. Research validation failed → 手动补充 research.md
|
|
293
|
+
5. MCP fetch failed → 继续但标记待补项
|
|
294
|
+
|
|
295
|
+
**恢复步骤**:
|
|
296
|
+
→ 详见 `{GUIDE:troubleshoot}` Recovery Procedures
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Next Step
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
/flow-prd "${REQ_ID}"
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
生成产品需求文档
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
**Related Documentation**:
|
|
311
|
+
- [INIT_FLOW_TEMPLATE.md](../.claude/docs/templates/INIT_FLOW_TEMPLATE.md) - 详细执行流程
|
|
312
|
+
- [INIT_TROUBLESHOOTING.md](../.claude/docs/guides/INIT_TROUBLESHOOTING.md) - 故障排查指南
|
|
313
|
+
- [RESEARCH_TEMPLATE.md](../.claude/docs/templates/RESEARCH_TEMPLATE.md) - 研究模板格式
|
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow-new
|
|
3
|
+
description: 'One-shot requirement flow. Usage: /flow-new "REQ-123|支持用户下单|https://plan.example.com/Q1"'
|
|
4
|
+
templates:
|
|
5
|
+
orchestration: .claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md
|
|
6
|
+
guides:
|
|
7
|
+
troubleshoot: .claude/docs/guides/NEW_TROUBLESHOOTING.md
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
<!-- ============================================================
|
|
11
|
+
头文件引用语法规范 (Header File Reference Syntax)
|
|
12
|
+
============================================================
|
|
13
|
+
|
|
14
|
+
命令头文件格式:
|
|
15
|
+
```yaml
|
|
16
|
+
templates:
|
|
17
|
+
orchestration: .claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md
|
|
18
|
+
guides:
|
|
19
|
+
troubleshoot: .claude/docs/guides/NEW_TROUBLESHOOTING.md
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
引用语法:
|
|
23
|
+
- {TEMPLATE:orchestration} → 加载 .claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md
|
|
24
|
+
- {GUIDE:troubleshoot} → 参考 .claude/docs/guides/NEW_TROUBLESHOOTING.md
|
|
25
|
+
|
|
26
|
+
使用案例:
|
|
27
|
+
```markdown
|
|
28
|
+
# 正文中遇到:
|
|
29
|
+
→ 详见 {TEMPLATE:orchestration} Stage 4
|
|
30
|
+
# 解释为:
|
|
31
|
+
→ 打开并阅读 .claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md 中的 Stage 4 章节
|
|
32
|
+
|
|
33
|
+
# 正文中遇到:
|
|
34
|
+
→ 常见错误参见 {GUIDE:troubleshoot} Error 3
|
|
35
|
+
# 解释为:
|
|
36
|
+
→ 打开并阅读 .claude/docs/guides/NEW_TROUBLESHOOTING.md 中的 Error 3 章节
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
规则: 遇到 {TYPE:key} 占位符时,去头文件 YAML 中找对应类型的 key,获取文件路径并加载。
|
|
40
|
+
============================================================ -->
|
|
41
|
+
|
|
42
|
+
# Flow-New - 一键需求开发流
|
|
43
|
+
|
|
44
|
+
## User Input
|
|
45
|
+
```text
|
|
46
|
+
$ARGUMENTS = "REQ_ID|TITLE|PLAN_URLS?"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**格式**:
|
|
50
|
+
- REQ_ID: 需求编号 (例如: REQ-123)
|
|
51
|
+
- TITLE: 需求标题
|
|
52
|
+
- PLAN_URLS: 计划文档URL,多个用逗号分隔 (可选)
|
|
53
|
+
|
|
54
|
+
**示例**:
|
|
55
|
+
```
|
|
56
|
+
/flow-new "REQ-123|支持用户下单|https://plan.example.com/Q1"
|
|
57
|
+
/flow-new "REQ-124|用户权限管理"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 执行前加载
|
|
63
|
+
|
|
64
|
+
**详细编排流程**:
|
|
65
|
+
→ 参见 `{TEMPLATE:orchestration}` 获取完整编排逻辑
|
|
66
|
+
|
|
67
|
+
**故障排查**:
|
|
68
|
+
→ 遇到问题参考 `{GUIDE:troubleshoot}`
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 架构说明
|
|
73
|
+
|
|
74
|
+
**设计理念**: flow-new 是**编排器**(Orchestrator),串行调用 7-8 个阶段化命令
|
|
75
|
+
|
|
76
|
+
**调用链**:
|
|
77
|
+
```
|
|
78
|
+
/flow-new "REQ-123|Title|URLs"
|
|
79
|
+
↓
|
|
80
|
+
[1/8] /flow-init "REQ-123|Title|URLs"
|
|
81
|
+
↓
|
|
82
|
+
[2/8] /flow-prd "REQ-123"
|
|
83
|
+
↓
|
|
84
|
+
[2.3/8] /flow-checklist "REQ-123" (可选, 80%门禁)
|
|
85
|
+
↓
|
|
86
|
+
[2.5/8] /flow-ui "REQ-123" (条件触发)
|
|
87
|
+
↓
|
|
88
|
+
[2.7/8] /flow-tech "REQ-123" (必需)
|
|
89
|
+
↓
|
|
90
|
+
[3/8] /flow-epic "REQ-123"
|
|
91
|
+
↓
|
|
92
|
+
[4/8] /flow-dev "REQ-123"
|
|
93
|
+
↓
|
|
94
|
+
[5/8] /flow-qa "REQ-123" --full
|
|
95
|
+
↓
|
|
96
|
+
[6/8] /flow-release "REQ-123"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 执行流程骨架
|
|
102
|
+
|
|
103
|
+
### [1/8] 初始化 → /flow-init
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
调用: /flow-init "${REQ_ID}|${TITLE}|${PLAN_URLS}"
|
|
107
|
+
|
|
108
|
+
检查: orchestration_status.json.status === "initialized"
|
|
109
|
+
|
|
110
|
+
→ 详见 {TEMPLATE:orchestration} Stage 1
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
**输出**:
|
|
114
|
+
- Git分支: `feature/${REQ_ID}-${slug(title)}`
|
|
115
|
+
- 需求目录已创建
|
|
116
|
+
- 研究材料已抓取
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
### [2/8] PRD生成 → /flow-prd
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
调用: /flow-prd "${REQ_ID}"
|
|
124
|
+
|
|
125
|
+
检查: PRD.md 存在且完整
|
|
126
|
+
|
|
127
|
+
→ 详见 {TEMPLATE:orchestration} Stage 2
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**输出**:
|
|
131
|
+
- PRD.md (用户故事 + GWT验收标准)
|
|
132
|
+
- Constitution检查通过
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### [2.3/8] 需求质量检查 → /flow-checklist (可选)
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
触发条件: quality-rules.yml 中 checklist_gate_enabled: true
|
|
140
|
+
|
|
141
|
+
调用: /flow-checklist "${REQ_ID}"
|
|
142
|
+
|
|
143
|
+
闸门: 完成度 ≥ 80%
|
|
144
|
+
|
|
145
|
+
→ 详见 {TEMPLATE:orchestration} Stage 2.3
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### [2.5/8] UI原型生成 → /flow-ui (条件触发)
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
触发条件 (任一满足):
|
|
154
|
+
- PRD包含UI关键词 ("页面"/"表单"/"按钮" etc.)
|
|
155
|
+
- 项目包含 package.json 或 src/components/
|
|
156
|
+
- 用户显式请求
|
|
157
|
+
|
|
158
|
+
调用: /flow-ui "${REQ_ID}"
|
|
159
|
+
|
|
160
|
+
→ 详见 {TEMPLATE:orchestration} Stage 2.5 (包含 UI Detection Logic)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**输出** (如有UI需求):
|
|
164
|
+
- UI_PROTOTYPE.html (响应式单文件原型)
|
|
165
|
+
- research/ui_design_strategy.md
|
|
166
|
+
|
|
167
|
+
**跳过** (无UI需求):
|
|
168
|
+
- orchestration_status.json.ui_skipped = true
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
### [2.7/8] 技术方案设计 → /flow-tech (必需)
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
调用: /flow-tech "${REQ_ID}"
|
|
176
|
+
|
|
177
|
+
检查: TECH_DESIGN.md 完整 (所有 Section 1-7)
|
|
178
|
+
|
|
179
|
+
→ 详见 {TEMPLATE:orchestration} Stage 2.7
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**输出**:
|
|
183
|
+
- TECH_DESIGN.md (完整技术方案)
|
|
184
|
+
- data-model.md (数据模型)
|
|
185
|
+
- contracts/openapi.yaml (API契约)
|
|
186
|
+
- quickstart.md (快速开始)
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
### [3/8] Epic规划 → /flow-epic
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
调用: /flow-epic "${REQ_ID}"
|
|
194
|
+
|
|
195
|
+
检查:
|
|
196
|
+
- EPIC.md + TASKS.md 存在
|
|
197
|
+
- TASKS 覆盖 TECH_DESIGN.md 所有技术层
|
|
198
|
+
|
|
199
|
+
→ 详见 {TEMPLATE:orchestration} Stage 3
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
**输出**:
|
|
203
|
+
- EPIC.md (Epic描述)
|
|
204
|
+
- TASKS.md (单文件管理所有任务)
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
### [4/8] 开发执行 → /flow-dev
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
调用: /flow-dev "${REQ_ID}"
|
|
212
|
+
|
|
213
|
+
执行模式: TDD (Tests First)
|
|
214
|
+
Phase 1: 分析现有代码
|
|
215
|
+
Phase 2: 编写测试 (Tests First)
|
|
216
|
+
TEST VERIFICATION CHECKPOINT (测试必须先失败)
|
|
217
|
+
Phase 3: 实现代码
|
|
218
|
+
Phase 4: 测试验证 (测试必须通过)
|
|
219
|
+
Phase 5: Git提交并标记完成
|
|
220
|
+
|
|
221
|
+
→ 详见 {TEMPLATE:orchestration} Stage 4
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**输出**:
|
|
225
|
+
- 实现代码
|
|
226
|
+
- 测试代码
|
|
227
|
+
- tasks/*.completed 标记
|
|
228
|
+
- Git commits (每个任务一个)
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
### [5/8] 质量保证 → /flow-qa
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
调用: /flow-qa "${REQ_ID}" --full
|
|
236
|
+
|
|
237
|
+
Exit Gate检查:
|
|
238
|
+
- ✅ 所有测试通过
|
|
239
|
+
- ✅ 代码覆盖率 ≥ 80%
|
|
240
|
+
- ✅ 无高危安全问题
|
|
241
|
+
- ✅ TypeScript类型检查通过
|
|
242
|
+
|
|
243
|
+
→ 详见 {TEMPLATE:orchestration} Stage 5
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**输出**:
|
|
247
|
+
- TEST_PLAN.md
|
|
248
|
+
- TEST_REPORT.md
|
|
249
|
+
- SECURITY_PLAN.md
|
|
250
|
+
- SECURITY_REPORT.md
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
### [6/8] 发布管理 → /flow-release
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
调用: /flow-release "${REQ_ID}"
|
|
258
|
+
|
|
259
|
+
执行:
|
|
260
|
+
- 生成发布计划
|
|
261
|
+
- 更新 CLAUDE.md (如有重要架构变更)
|
|
262
|
+
- 最终构建
|
|
263
|
+
- 创建 GitHub Pull Request
|
|
264
|
+
|
|
265
|
+
→ 详见 {TEMPLATE:orchestration} Stage 6
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**输出**:
|
|
269
|
+
- RELEASE_PLAN.md
|
|
270
|
+
- CLAUDE.md (更新技术架构,如有)
|
|
271
|
+
- GitHub Pull Request
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## 进度展示
|
|
276
|
+
|
|
277
|
+
**实时进度** (详见 `{TEMPLATE:orchestration}` Progress Display Format):
|
|
278
|
+
|
|
279
|
+
```
|
|
280
|
+
🎯 CC-DevFlow 完整需求开发流程
|
|
281
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
282
|
+
|
|
283
|
+
需求: REQ-123 | 支持用户下单
|
|
284
|
+
|
|
285
|
+
[1/8] ✅ 初始化完成
|
|
286
|
+
[2/8] ✅ PRD生成完成
|
|
287
|
+
[2.5/8] ✅ UI原型生成完成 ⚡️
|
|
288
|
+
[2.7/8] ✅ 技术方案设计完成 🔧
|
|
289
|
+
[3/8] ✅ Epic规划完成
|
|
290
|
+
[4/8] 🔄 开发执行中... (8/18 已完成)
|
|
291
|
+
[5/8] ⏳ 等待质量保证...
|
|
292
|
+
[6/8] ⏳ 等待发布管理...
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## 输出产物
|
|
298
|
+
|
|
299
|
+
**完整目录结构** (详见 `{TEMPLATE:orchestration}` Output Structure):
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
devflow/requirements/${REQ_ID}/
|
|
303
|
+
├── research/ (初始化时生成)
|
|
304
|
+
├── PRD.md
|
|
305
|
+
├── UI_PROTOTYPE.html (条件)
|
|
306
|
+
├── TECH_DESIGN.md
|
|
307
|
+
├── data-model.md
|
|
308
|
+
├── contracts/openapi.yaml
|
|
309
|
+
├── quickstart.md
|
|
310
|
+
├── EPIC.md
|
|
311
|
+
├── TASKS.md
|
|
312
|
+
├── tasks/*.completed
|
|
313
|
+
├── TEST_PLAN.md + TEST_REPORT.md
|
|
314
|
+
├── SECURITY_PLAN.md + SECURITY_REPORT.md
|
|
315
|
+
└── RELEASE_PLAN.md
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## 中断与恢复
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
# 查看当前状态
|
|
324
|
+
/flow-status REQ-123
|
|
325
|
+
|
|
326
|
+
# 从中断点恢复
|
|
327
|
+
/flow-restart "REQ-123"
|
|
328
|
+
|
|
329
|
+
# 或手动执行特定阶段
|
|
330
|
+
/flow-tech "REQ-123"
|
|
331
|
+
/flow-epic "REQ-123"
|
|
332
|
+
/flow-dev "REQ-123" --resume
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## 错误处理
|
|
338
|
+
|
|
339
|
+
**常见错误**:
|
|
340
|
+
→ 详见 `{GUIDE:troubleshoot}`
|
|
341
|
+
|
|
342
|
+
**主要错误场景**:
|
|
343
|
+
1. Stage command not found → 检查命令文件
|
|
344
|
+
2. Status file corrupted → 重建或修复
|
|
345
|
+
3. 中途中断无法恢复 → 使用 /flow-restart
|
|
346
|
+
4. UI detection false positive → 在PRD明确标注
|
|
347
|
+
5. Epic 未覆盖所有技术层 → 重新生成或手动补充
|
|
348
|
+
6. QA gate failure → 补充测试/修复安全问题
|
|
349
|
+
7. Build failure → 修复类型错误
|
|
350
|
+
8. PR creation failed → 认证 gh CLI 或手动创建
|
|
351
|
+
|
|
352
|
+
**恢复步骤**:
|
|
353
|
+
→ 详见 `{GUIDE:troubleshoot}` Recovery Procedures
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## 使用建议
|
|
358
|
+
|
|
359
|
+
### ✅ 适合使用 flow-new
|
|
360
|
+
|
|
361
|
+
- 简单明确的需求
|
|
362
|
+
- 演示和学习工作流程
|
|
363
|
+
- 快速原型开发
|
|
364
|
+
- 熟悉的需求类型
|
|
365
|
+
|
|
366
|
+
### ❌ 建议使用阶段化命令
|
|
367
|
+
|
|
368
|
+
- 复杂需求,需要每个阶段审查
|
|
369
|
+
- 需要在PRD阶段与需求方确认
|
|
370
|
+
- 需要在Epic阶段调整任务分解
|
|
371
|
+
- 开发过程中可能需要暂停调整
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## Next Step
|
|
376
|
+
|
|
377
|
+
```
|
|
378
|
+
# 查看PR状态
|
|
379
|
+
cat devflow/requirements/${REQ_ID}/RELEASE_PLAN.md | grep "PR URL"
|
|
380
|
+
|
|
381
|
+
# 审查PR
|
|
382
|
+
gh pr view <PR_NUMBER>
|
|
383
|
+
|
|
384
|
+
# 合并PR
|
|
385
|
+
gh pr merge <PR_NUMBER>
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
**Related Documentation**:
|
|
391
|
+
- [NEW_ORCHESTRATION_TEMPLATE.md](../.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md) - 详细编排流程
|
|
392
|
+
- [NEW_TROUBLESHOOTING.md](../.claude/docs/guides/NEW_TROUBLESHOOTING.md) - 故障排查指南
|
|
393
|
+
- [flow-init.md](./flow-init.md) - 初始化阶段
|
|
394
|
+
- [flow-dev.md](./flow-dev.md) - 开发阶段
|