@guanlin4924/devflow-pi 0.1.93 → 0.1.94
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/README.md +6 -6
- package/package.json +1 -1
- package/plugins/devflow-core/extensions/devflow-core.ts +87 -33
- package/plugins/devflow-core/runtime/hooks/context_sync_gate.py +3 -3
- package/plugins/devflow-core/runtime/hooks/hook_common.py +65 -11
- package/plugins/devflow-core/runtime/hooks/start.py +13 -13
- package/plugins/devflow-core/skills/wireframe-proposal/SKILL.md +2 -2
- package/plugins/devflow-core/skills/wireframe-validate/SKILL.md +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/SKILL.md +19 -19
- package/plugins/devflow-core/skills/workflow-orchestrator/agents/openai.yaml +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/acceptance_test_runner.py +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/advance_state.rb +9 -9
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/api_test_matrix.py +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_assessment.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_brief.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_feasibility.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_invalidation.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_model_commit.rb +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_model_validate.py +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_source_resolver.rb +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/checker_adapter.rb +7 -7
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/control_io.rb +51 -7
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/cross_track_consistency_check.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/execution_contract.rb +6 -6
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/gate_runtime.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_state.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_workflow.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/inspect_state.rb +13 -13
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/machine_evidence.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/manage_lessons.rb +7 -7
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/parallel_recover.rb +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/parallel_run.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/phase_ownership.rb +6 -6
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/repair_control_plane.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/requirement_coverage.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/requirement_graph.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_preflight.py +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_run.py +18 -18
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/runtime_context_collector.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/session_rollover.rb +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/static_runtime_context_collector.rb +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/sync_artifacts.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/tdd_evidence.py +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/test_command_policy.py +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/test_task_binding_check.py +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/update_triage_route.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/validate_state.rb +6 -6
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_commit.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_validate.py +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/acceptance-remediation.yaml +12 -12
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/feature-development.yaml +205 -205
- package/plugins/devflow-core/skills/workflow-pipeline/SKILL.md +3 -3
- package/plugins/devflow-core/skills/workflow-pipeline/references/pipeline-flow.md +10 -10
- package/plugins/devflow-core/skills/workflow-project-context/SKILL.md +14 -14
- package/plugins/devflow-core/skills/workflow-project-context/assets/agents-md-template.md +7 -7
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-backend-spec-template.md +4 -4
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-frontend-spec-template.md +4 -4
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-navigation-template.md +1 -1
- package/plugins/devflow-core/skills/workflow-project-context/assets/context-domain-index-template.md +4 -4
- package/plugins/devflow-core/skills/workflow-project-context/assets/context-spec-index-template.md +10 -10
- package/plugins/devflow-core/skills/workflow-project-context/assets/execution-contract-template.md +2 -2
- package/plugins/devflow-core/skills/workflow-project-context/assets/navigation-index-template.md +18 -18
- package/plugins/devflow-core/skills/workflow-project-context/assets/project-initialization-template.md +32 -32
- package/plugins/devflow-core/skills/workflow-project-context/assets/rules-index-template.md +30 -30
- package/plugins/devflow-core/skills/workflow-project-context/assets/state-template.md +7 -7
- package/plugins/devflow-core/skills/workflow-project-context/references/navigation-guide.md +37 -37
- package/plugins/devflow-core/skills/workflow-project-context/scripts/validate_initialization.py +16 -16
- package/plugins/devflow-design/skills/workflow-api-call-guide/SKILL.md +4 -4
- package/plugins/devflow-design/skills/workflow-api-contract/SKILL.md +8 -8
- package/plugins/devflow-design/skills/workflow-api-supplement/SKILL.md +5 -5
- package/plugins/devflow-design/skills/workflow-architecture-feasibility/SKILL.md +1 -1
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/SKILL.md +39 -39
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/assets/backend-spec-template.md +10 -10
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/affected-module-exploration.md +2 -2
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/code-explore-guide.md +1 -1
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/project-rule-contract.md +20 -20
- package/plugins/devflow-design/skills/workflow-design-rule-pack/SKILL.md +8 -8
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/index.md +3 -3
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/accessibility.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/component-library.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/design-systems.md +1 -1
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/responsive-grid.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/stack-guidelines.md +6 -6
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/ux-patterns.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tokens/project-tokens.md +1 -1
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/SKILL.md +12 -12
- package/plugins/devflow-design/skills/workflow-design-rule-pack/scripts/install.py +2 -2
- package/plugins/devflow-design/skills/workflow-feature-breakdown/SKILL.md +30 -30
- package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/output-template.md +2 -2
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/SKILL.md +41 -41
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/assets/frontend-spec-template.md +15 -15
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/affected-module-exploration.md +2 -2
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/project-rule-contract.md +25 -25
- package/plugins/devflow-design/skills/workflow-integration-verify/SKILL.md +13 -13
- package/plugins/devflow-design/skills/workflow-ui-spec/SKILL.md +23 -23
- package/plugins/devflow-design/skills/workflow-ui-spec/assets/ui-spec-template.md +3 -3
- package/plugins/devflow-implementation/agents/implementation-worker.md +2 -2
- package/plugins/devflow-implementation/skills/workflow-bug-fix/SKILL.md +9 -9
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/lesson-format.md +2 -2
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/root-cause-ladder.md +1 -1
- package/plugins/devflow-implementation/skills/workflow-change-plan/SKILL.md +17 -17
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/code-conventions.md +1 -1
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/output-template.md +3 -3
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/project-rule-contract.md +16 -16
- package/plugins/devflow-implementation/skills/workflow-execute-phase/SKILL.md +38 -38
- package/plugins/devflow-implementation/skills/workflow-execute-phase/references/execute-phase.md +1 -1
- package/plugins/devflow-intel/agents/project-scout.md +1 -1
- package/plugins/devflow-intel/extensions/devflow-intel.ts +20 -19
- package/plugins/devflow-intel/skills/code-index-query/SKILL.md +6 -6
- package/plugins/devflow-intel/skills/workflow-code-index/SKILL.md +12 -12
- package/plugins/devflow-intel/skills/workflow-code-index/references/discovery.md +2 -2
- package/plugins/devflow-intel/skills/workflow-code-index/references/query-guide.md +1 -1
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/code_index.py +8 -8
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/discovery.py +2 -2
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/scanner.py +4 -1
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/project_binding_check.py +4 -4
- package/plugins/devflow-intel/skills/workflow-context-sync/SKILL.md +14 -14
- package/plugins/devflow-intel/skills/workflow-context-sync/scripts/context_sync_cursor.py +2 -2
- package/plugins/devflow-intel/skills/workflow-update-navigation/SKILL.md +26 -26
- package/plugins/devflow-intel/skills/workflow-update-navigation/references/incremental-update-guide.md +2 -2
- package/plugins/devflow-quality/skills/code-review/SKILL.md +12 -12
- package/plugins/devflow-quality/skills/code-review/references/spec-checklist.md +1 -1
- package/plugins/devflow-quality/skills/workflow-acceptance-test-design/SKILL.md +8 -8
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/SKILL.md +6 -6
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/SKILL.md +14 -14
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/SKILL.md +23 -23
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/codebase-discovery.md +9 -9
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/project-dsl-contract.md +1 -1
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/compile_dsl.py +2 -2
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/discover_codebases.py +2 -2
- package/plugins/devflow-quality/skills/workflow-release-closeout/SKILL.md +15 -15
- package/plugins/devflow-quality/skills/workflow-run-acceptance-tests/SKILL.md +5 -5
- package/plugins/devflow-requirements/skills/requirement-feasibility-review/SKILL.md +1 -1
- package/plugins/devflow-requirements/skills/workflow-demand-clarify/SKILL.md +10 -10
- package/plugins/devflow-requirements/skills/workflow-domain-modeling/SKILL.md +25 -25
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/SKILL.md +49 -49
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/assets/baseline-template.md +22 -22
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/antipatterns.md +3 -3
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/challenge-review-guide.md +3 -3
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/project-context-guide.md +11 -11
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/questioning.md +1 -1
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/requirement-review-checklist.md +4 -4
- package/plugins/devflow-requirements/skills/workflow-requirement-triage/SKILL.md +16 -16
- package/plugins/devflow-requirements/skills/workflow-wayfinder/SKILL.md +6 -6
- package/src/cli.ts +15 -0
- package/src/constants.ts +1 -1
- package/src/initialization-store.ts +3 -2
- package/src/project-context.ts +36 -14
- package/src/project-documents.ts +61 -61
- package/src/project-initializer.ts +9 -8
- package/src/project-layout.ts +217 -0
- package/src/runtime.ts +3 -3
- package/templates/commands/start.md +4 -4
- package/templates/omp/AGENTS.md +1 -1
- package/templates/omp/hook-config.json +7 -7
- package/templates/omp/index-policy.json +8 -8
|
@@ -12,12 +12,12 @@ argument-hint: '[@需求文档.md]'
|
|
|
12
12
|
user-invocable: true
|
|
13
13
|
pattern: inversion+generator+reviewer
|
|
14
14
|
inputs:
|
|
15
|
-
- .planning/PROJECT.md
|
|
16
|
-
- .planning/navigation/INDEX.md
|
|
17
|
-
- .planning/navigation/*.md
|
|
18
|
-
- .planning/milestones/
|
|
15
|
+
- .devflow/planning/PROJECT.md
|
|
16
|
+
- .devflow/planning/navigation/INDEX.md
|
|
17
|
+
- .devflow/planning/navigation/*.md
|
|
18
|
+
- .devflow/planning/milestones/
|
|
19
19
|
- 原始需求文档/PRD/会议纪要/用户描述
|
|
20
|
-
output: .planning/requirements/baseline.md
|
|
20
|
+
output: .devflow/planning/requirements/baseline.md
|
|
21
21
|
phase-gate:
|
|
22
22
|
step1: 加载项目上下文和原始需求
|
|
23
23
|
step2: 需求整理:结构化原文信息
|
|
@@ -47,10 +47,10 @@ This skill receives raw requirements and turns them into a stable requirement ba
|
|
|
47
47
|
|
|
48
48
|
Before Phase 1, check these mandatory upstream artifacts:
|
|
49
49
|
|
|
50
|
-
- `.planning/requirements/{feature}/入口分诊.md` and `.meta.json`;
|
|
51
|
-
- `.planning/requirements/{feature}/决策地图.md` and `.meta.json`;
|
|
52
|
-
- `.planning/requirements/{feature}/领域模型记录.md` and `.meta.json`;
|
|
53
|
-
- `.planning/requirements/{feature}/可实现性审查.md` and `.meta.json`.
|
|
50
|
+
- `.devflow/planning/requirements/{feature}/入口分诊.md` and `.meta.json`;
|
|
51
|
+
- `.devflow/planning/requirements/{feature}/决策地图.md` and `.meta.json`;
|
|
52
|
+
- `.devflow/planning/requirements/{feature}/领域模型记录.md` and `.meta.json`;
|
|
53
|
+
- `.devflow/planning/requirements/{feature}/可实现性审查.md` and `.meta.json`.
|
|
54
54
|
|
|
55
55
|
If any are missing, run the earliest missing main-chain step. Baseline must not become the first place where duplicate capability, fog, terminology ambiguity, or feasibility gaps are discovered.
|
|
56
56
|
|
|
@@ -105,24 +105,24 @@ When triage found partial overlap or prior rejection, preserve it as source mate
|
|
|
105
105
|
|
|
106
106
|
Always create or update:
|
|
107
107
|
|
|
108
|
-
- `.planning/requirements/baseline.md` — unified requirement baseline
|
|
109
|
-
- `.planning/requirements/baseline.meta.json` — structured metadata. Schema defined in `feature-development.yaml` under `steps[requirement-baseline].meta_output.fields`: `review_status`, `fp_count`, `br_count`, `bc_count`, `blocking_pending_count`, `critical_image_missing_count`, `challenge_pending_count`, `code_reality_missing_count`, `current_feature`, `depends_on_count`, plus optional `pending_items`, `risks`, and `key_decisions`.
|
|
110
|
-
- `.planning/requirements/{feature}/traceability.json` — copy the orchestrator `templates/traceability.json` schema and create one atomic `REQ-*` record for every confirmed in-scope requirement. Every record must define `input`、`output`、`behavior`、`orchestration`、`failure`、`verification`; use `N/A` only with a reason when a dimension truly does not apply.
|
|
108
|
+
- `.devflow/planning/requirements/baseline.md` — unified requirement baseline
|
|
109
|
+
- `.devflow/planning/requirements/baseline.meta.json` — structured metadata. Schema defined in `feature-development.yaml` under `steps[requirement-baseline].meta_output.fields`: `review_status`, `fp_count`, `br_count`, `bc_count`, `blocking_pending_count`, `critical_image_missing_count`, `challenge_pending_count`, `code_reality_missing_count`, `current_feature`, `depends_on_count`, plus optional `pending_items`, `risks`, and `key_decisions`.
|
|
110
|
+
- `.devflow/planning/requirements/{feature}/traceability.json` — copy the orchestrator `templates/traceability.json` schema and create one atomic `REQ-*` record for every confirmed in-scope requirement. Every record must define `input`、`output`、`behavior`、`orchestration`、`failure`、`verification`; use `N/A` only with a reason when a dimension truly does not apply.
|
|
111
111
|
|
|
112
112
|
Before the CP-1 result is reported, run:
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
python3 <workflow-orchestrator>/scripts/traceability_check.py --file .planning/requirements/{feature}/traceability.json --stage baseline
|
|
115
|
+
python3 <workflow-orchestrator>/scripts/traceability_check.py --file .devflow/planning/requirements/{feature}/traceability.json --stage baseline
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
Set `baseline.meta.json.traceability_status` to `passed` only when that command succeeds. A failed traceability check is a blocking baseline defect, not a deferred documentation suggestion.
|
|
119
119
|
|
|
120
120
|
Do not create by default:
|
|
121
121
|
|
|
122
|
-
- `.planning/features/{功能名}/功能点梳理.md`
|
|
123
|
-
- `.planning/features/{功能名}/前端技术方案.md`
|
|
124
|
-
- `.planning/features/{功能名}/后端技术方案.md`
|
|
125
|
-
- `.planning/features/{功能名}/变更清单.md`
|
|
122
|
+
- `.devflow/planning/features/{功能名}/功能点梳理.md`
|
|
123
|
+
- `.devflow/planning/features/{功能名}/前端技术方案.md`
|
|
124
|
+
- `.devflow/planning/features/{功能名}/后端技术方案.md`
|
|
125
|
+
- `.devflow/planning/features/{功能名}/变更清单.md`
|
|
126
126
|
|
|
127
127
|
## Argument Handling
|
|
128
128
|
|
|
@@ -135,21 +135,21 @@ If both a requirement document and pasted text are provided, use both and record
|
|
|
135
135
|
|
|
136
136
|
### 上游契约(与本技能串联的上游流程)
|
|
137
137
|
|
|
138
|
-
当 `.planning/requirements/{feature}/入口分诊.md` 存在时(由 `workflow-requirement-triage` 生成):
|
|
138
|
+
当 `.devflow/planning/requirements/{feature}/入口分诊.md` 存在时(由 `workflow-requirement-triage` 生成):
|
|
139
139
|
|
|
140
140
|
1. 将分诊分类写入 `baseline.meta.json.requirement_type` 或需求来源摘要。
|
|
141
141
|
2. 将 `related_code_paths` 作为 Phase 1.5/4 的优先检查入口,但不能直接当作行为结论。
|
|
142
142
|
3. 将 `related_history_paths` 和 prior rejection 记录纳入 Phase 4.5 Challenge Review。
|
|
143
143
|
4. 如果 `route` 不是 `ready_for_wayfinder`,按 Phase 0 路由停止或切换技能。
|
|
144
144
|
|
|
145
|
-
当 `.planning/requirements/{feature}/决策地图.md` 存在时(由 `workflow-wayfinder` 生成):
|
|
145
|
+
当 `.devflow/planning/requirements/{feature}/决策地图.md` 存在时(由 `workflow-wayfinder` 生成):
|
|
146
146
|
|
|
147
147
|
1. 只有 `决策地图.meta.json.ready_for_baseline = true` 才可继续 baseline。
|
|
148
148
|
2. Destination 和 Known Land 作为需求来源。
|
|
149
|
-
3. 读取 `.planning/requirements/{feature}/wayfinder/WF-*.md` 中 `status=resolved` 的 ticket;其 Findings / Answer 转为 FP/BR/BC 或 `反向审视与用户拍板` 记录。
|
|
149
|
+
3. 读取 `.devflow/planning/requirements/{feature}/wayfinder/WF-*.md` 中 `status=resolved` 的 ticket;其 Findings / Answer 转为 FP/BR/BC 或 `反向审视与用户拍板` 记录。
|
|
150
150
|
4. Open ticket 只能进入待确认或后置探索,不能伪装成已确认需求。
|
|
151
151
|
|
|
152
|
-
当 `.planning/requirements/{feature}/需求澄清记录.md` 存在时(由 `workflow-demand-clarify` 生成):
|
|
152
|
+
当 `.devflow/planning/requirements/{feature}/需求澄清记录.md` 存在时(由 `workflow-demand-clarify` 生成):
|
|
153
153
|
|
|
154
154
|
1. 优先以 **需求澄清记录.md** 的场景清单和分级任务单作为原始需求来源
|
|
155
155
|
2. 将决策日志中的 L1-L4 决策结论转化为 `key_decisions` 元数据
|
|
@@ -157,14 +157,14 @@ If both a requirement document and pasted text are provided, use both and record
|
|
|
157
157
|
4. 假设验证区内容进入 BR(业务规则),标记为"待上线验证"
|
|
158
158
|
5. 不需要再对用户做"场景反讲"等基础澄清——这些已经在 demand-clarify 阶段完成
|
|
159
159
|
|
|
160
|
-
当 `.planning/requirements/{feature}/领域模型记录.md` 或 `.planning/CONTEXT.md` 存在时(由 `workflow-domain-modeling` 维护):
|
|
160
|
+
当 `.devflow/planning/requirements/{feature}/领域模型记录.md` 或 `.devflow/planning/CONTEXT.md` 存在时(由 `workflow-domain-modeling` 维护):
|
|
161
161
|
|
|
162
|
-
1. `.planning/CONTEXT.md` 只作为纯词汇表读取,不从中读取需求追溯。
|
|
162
|
+
1. `.devflow/planning/CONTEXT.md` 只作为纯词汇表读取,不从中读取需求追溯。
|
|
163
163
|
2. 使用已确认术语写 FP/BR/BC 名称,避免同义多词。
|
|
164
164
|
3. 从 `领域模型记录.md` 读取术语冲突、边缘案例压力测试和追溯信息,并纳入 Phase 4/7 审查。
|
|
165
165
|
4. ADR 只作为需求决策证据,不展开技术方案。
|
|
166
166
|
|
|
167
|
-
当 `.planning/requirements/{feature}/可实现性审查.md` 存在时(由 `requirement-feasibility-review` 维护):
|
|
167
|
+
当 `.devflow/planning/requirements/{feature}/可实现性审查.md` 存在时(由 `requirement-feasibility-review` 维护):
|
|
168
168
|
|
|
169
169
|
1. 仅消费其中 `SOURCE_FACT`、`CONFIRMED_DECISION` 和已接受实现方向;不得把 `DERIVED_QUESTION` 或 `ASSUMPTION` 写入 baseline。
|
|
170
170
|
2. 将审查已确认的范围排除、外部能力边界、入口门禁和存量兼容规则转化为 FP/BR/BC。
|
|
@@ -174,7 +174,7 @@ If both a requirement document and pasted text are provided, use both and record
|
|
|
174
174
|
|
|
175
175
|
**叠加原则:baseline.md 是需求的累积目录,不是单功能快照。每次新增需求时,在已有内容上追加,不覆盖。**
|
|
176
176
|
|
|
177
|
-
If `.planning/requirements/baseline.md` already exists:
|
|
177
|
+
If `.devflow/planning/requirements/baseline.md` already exists:
|
|
178
178
|
|
|
179
179
|
1. Read it before restructuring new input. Understand ALL existing features, not just the current one.
|
|
180
180
|
2. **Preserve all confirmed `FP-*`, `BR-*`, `BC-*` from previous features.** Do not delete, renumber, or silently drop them.
|
|
@@ -193,7 +193,7 @@ Each new requirement gets its own stable `{功能名}`. **This is additive — a
|
|
|
193
193
|
3. Keep it short, stable, and safe as a path segment.
|
|
194
194
|
4. Once written to baseline, do not change it in later clarification unless the user explicitly renames the feature.
|
|
195
195
|
5. If the feature name changes, record the old name, new name, reason, and downstream directory impact in `澄清与变更记录`.
|
|
196
|
-
6. The canonical downstream output directory is `.planning/features/{功能名}/`. Multiple features → multiple directories.
|
|
196
|
+
6. The canonical downstream output directory is `.devflow/planning/features/{功能名}/`. Multiple features → multiple directories.
|
|
197
197
|
7. Legacy root `features/{功能名}/` may be read as historical evidence only; new workflow outputs must not use it.
|
|
198
198
|
8. When baseline already has features, the new `{功能名}` must be distinct from existing ones unless the user explicitly says it's an iteration on the same feature.
|
|
199
199
|
|
|
@@ -220,21 +220,21 @@ Load bundled resources only when needed:
|
|
|
220
220
|
|
|
221
221
|
Load available project context:
|
|
222
222
|
|
|
223
|
-
1. `.planning/PROJECT.md`
|
|
224
|
-
2. `.planning/navigation/INDEX.md`
|
|
225
|
-
3. `.planning/navigation/INDEX.md` for the Codebase Registry — identify which codebases are relevant to the requirement
|
|
226
|
-
4. Load the navigation files (`.planning/navigation/{name}.md`) for each relevant codebase from the registry
|
|
227
|
-
5. If `.planning/code-index/` exists, note that `code-index-query` must be used for Phase 1.5 routing and Phase 4 source-reality checks
|
|
228
|
-
6. `.planning/milestones/`
|
|
229
|
-
7. `.planning/requirements/`
|
|
230
|
-
8. `.planning/lessons/`
|
|
231
|
-
9. `.planning/*/CONTEXT.md`
|
|
223
|
+
1. `.devflow/planning/PROJECT.md`
|
|
224
|
+
2. `.devflow/planning/navigation/INDEX.md`
|
|
225
|
+
3. `.devflow/planning/navigation/INDEX.md` for the Codebase Registry — identify which codebases are relevant to the requirement
|
|
226
|
+
4. Load the navigation files (`.devflow/planning/navigation/{name}.md`) for each relevant codebase from the registry
|
|
227
|
+
5. If `.devflow/planning/code-index/` exists, note that `code-index-query` must be used for Phase 1.5 routing and Phase 4 source-reality checks
|
|
228
|
+
6. `.devflow/planning/milestones/`
|
|
229
|
+
7. `.devflow/planning/requirements/`
|
|
230
|
+
8. `.devflow/planning/lessons/`
|
|
231
|
+
9. `.devflow/planning/*/CONTEXT.md`
|
|
232
232
|
|
|
233
233
|
History model rule:
|
|
234
234
|
|
|
235
235
|
- This workflow's primary historical artifacts are milestone and planning artifacts, not outbound-call style `features/*.spec.md` files.
|
|
236
|
-
- Use `.planning/milestones/`, `.planning/requirements/`, `.planning/lessons/`, and `.planning/*/CONTEXT.md` first.
|
|
237
|
-
- If `features/`, `.context/lessons/`, or `.context/workflow/` exist in the target project, treat them as optional legacy/project-rule evidence and record that distinction.
|
|
236
|
+
- Use `.devflow/planning/milestones/`, `.devflow/planning/requirements/`, `.devflow/planning/lessons/`, and `.devflow/planning/*/CONTEXT.md` first.
|
|
237
|
+
- If `features/`, `.devflow/context/lessons/`, or `.devflow/context/workflow/` exist in the target project, treat them as optional legacy/project-rule evidence and record that distinction.
|
|
238
238
|
|
|
239
239
|
Then collect this requirement input:
|
|
240
240
|
|
|
@@ -289,16 +289,16 @@ Use this wording pattern when blocked by an image:
|
|
|
289
289
|
|
|
290
290
|
**混合类型**:一个需求可能同时涉及多种类型(如 A+D 混合)。标记为主类型+副类型(如 `A+D`),后续 Phase 按主类型流程推进,在 Phase 3.5 和 Phase 4 兼顾副类型的检查项。
|
|
291
291
|
|
|
292
|
-
写入 `.planning/requirements/baseline.meta.json` 的 `requirement_type` 字段。
|
|
292
|
+
写入 `.devflow/planning/requirements/baseline.meta.json` 的 `requirement_type` 字段。
|
|
293
293
|
|
|
294
294
|
### 1.5.3 Code routing scan before questions
|
|
295
295
|
|
|
296
296
|
Before asking the user any clarification question, produce an internal code routing summary from project artifacts:
|
|
297
297
|
|
|
298
|
-
1. Use `.planning/navigation/INDEX.md` to identify relevant codebases.
|
|
299
|
-
2. Read the relevant navigation files (`.planning/navigation/BACKEND.md`, `.planning/navigation/FRONTEND.md`, or other registered codebase files).
|
|
298
|
+
1. Use `.devflow/planning/navigation/INDEX.md` to identify relevant codebases.
|
|
299
|
+
2. Read the relevant navigation files (`.devflow/planning/navigation/BACKEND.md`, `.devflow/planning/navigation/FRONTEND.md`, or other registered codebase files).
|
|
300
300
|
3. Treat navigation as a routing index only. It helps find files quickly, but it is not sufficient evidence for requirement conclusions.
|
|
301
|
-
4. If `.planning/code-index/` exists, use `code-index-query` with requirement concepts to find candidate routes/pages/services/models/tests/resources. Treat these as routing candidates only.
|
|
301
|
+
4. If `.devflow/planning/code-index/` exists, use `code-index-query` with requirement concepts to find candidate routes/pages/services/models/tests/resources. Treat these as routing candidates only.
|
|
302
302
|
5. Confirm likely related source paths exist by listing directories or opening only top-level file structure, imports, class/function names, route declarations, comments, and short module headers.
|
|
303
303
|
6. Do not inspect function bodies, branch logic, data flow, SQL/query details, permission checks, or state transitions in Phase 1.5. Those are Phase 4 Level 2 responsibilities.
|
|
304
304
|
7. Do not conclude "already supported", "not supported", or "conflicting" in Phase 1.5. Only record "possibly related" modules and why they should be checked later.
|
|
@@ -471,7 +471,7 @@ seam_type: "新建" | "扩展" | "修改"
|
|
|
471
471
|
module_depth: "深" | "浅(需下游关注)" | "待评估"
|
|
472
472
|
```
|
|
473
473
|
|
|
474
|
-
写入 `.planning/requirements/baseline.md` 中每个 FP 的描述末尾。
|
|
474
|
+
写入 `.devflow/planning/requirements/baseline.md` 中每个 FP 的描述末尾。
|
|
475
475
|
|
|
476
476
|
### 完成门禁
|
|
477
477
|
|
|
@@ -508,7 +508,7 @@ Review the decomposed feature points for:
|
|
|
508
508
|
|
|
509
509
|
**Level 1: 导航 Call Chain Map 对照(结构层)**
|
|
510
510
|
- 对每个涉及已有代码的 FP,从导航文件的 API Modules / Route-Component Map 提取受影响文件清单
|
|
511
|
-
- 若 `.planning/code-index/` 存在,必须通过 `code-index-query` 用需求关键词、API 路径、页面名、字段名、状态名、表/配置/资源名查询 Symbol Index 和 Relation Graph,补充 navigation 未覆盖的调用方、被调用方、入口和数据流候选
|
|
511
|
+
- 若 `.devflow/planning/code-index/` 存在,必须通过 `code-index-query` 用需求关键词、API 路径、页面名、字段名、状态名、表/配置/资源名查询 Symbol Index 和 Relation Graph,补充 navigation 未覆盖的调用方、被调用方、入口和数据流候选
|
|
512
512
|
- 调用链重叠类型判断:扩展已有 vs 新建分支
|
|
513
513
|
- 契约影响预判:修改已有接口时检查其他调用方
|
|
514
514
|
- 导航无候选时,先通过 `code-index-query` 查 code-index;仍无候选时,再用需求关键词、API 路径、页面名、字段名、状态名通过 `rg` 查实际源码。navigation 不能作为"无相关代码"的唯一证据
|
|
@@ -618,7 +618,7 @@ After every user answer in Phase 5:
|
|
|
618
618
|
|
|
619
619
|
**叠加模式(baseline 已存在)**:
|
|
620
620
|
|
|
621
|
-
1. Read existing `.planning/requirements/baseline.md` as the base.
|
|
621
|
+
1. Read existing `.devflow/planning/requirements/baseline.md` as the base.
|
|
622
622
|
2. Append new feature points after the existing ones. Keep all old FP-*, BR-*, BC-* intact.
|
|
623
623
|
3. Update `需求来源` to add the new source entry.
|
|
624
624
|
4. Update `当前功能切片` to list only the current feature's FP/BR/BC IDs, active `SL-*`, deferred slices, and any `depends_on` historical references.
|
|
@@ -634,10 +634,10 @@ After every user answer in Phase 5:
|
|
|
634
634
|
|
|
635
635
|
Read `assets/baseline-template.md`.
|
|
636
636
|
|
|
637
|
-
Generate `.planning/requirements/baseline.md` with:
|
|
637
|
+
Generate `.devflow/planning/requirements/baseline.md` with:
|
|
638
638
|
|
|
639
639
|
- Requirement source summary
|
|
640
|
-
- Feature name and canonical output directory, using one stable `{功能名}` for all downstream `.planning/features/{功能名}/...` outputs
|
|
640
|
+
- Feature name and canonical output directory, using one stable `{功能名}` for all downstream `.devflow/planning/features/{功能名}/...` outputs
|
|
641
641
|
- Structured requirement summary
|
|
642
642
|
- Current feature slice with current FP/BR/BC IDs
|
|
643
643
|
- Slice plan with active `SL-*`, deferred slices, dependencies, and gates
|
|
@@ -655,11 +655,11 @@ Generate `.planning/requirements/baseline.md` with:
|
|
|
655
655
|
- Clarification and change log
|
|
656
656
|
- Review result
|
|
657
657
|
|
|
658
|
-
Create `.planning/requirements/` if needed.
|
|
658
|
+
Create `.devflow/planning/requirements/` if needed.
|
|
659
659
|
|
|
660
660
|
Do not create synonym duplicate sections such as `需求来源汇总` or `历史影响` when the template section is named `需求来源` or `与历史功能/里程碑的关联`.
|
|
661
661
|
|
|
662
|
-
Write `.planning/requirements/baseline.meta.json` with the fields required by the workflow YAML. `review_status` must be `passed` only when the baseline review conclusion is `通过`; otherwise use `failed`. Count blocking items explicitly:
|
|
662
|
+
Write `.devflow/planning/requirements/baseline.meta.json` with the fields required by the workflow YAML. `review_status` must be `passed` only when the baseline review conclusion is `通过`; otherwise use `failed`. Count blocking items explicitly:
|
|
663
663
|
|
|
664
664
|
- `blocking_pending_count`: unanswered clarification items that block reliable baseline or downstream handoff
|
|
665
665
|
- `critical_image_missing_count`: missing or unclear `critical_image` items
|
|
@@ -731,7 +731,7 @@ Completion gate: baseline and baseline.meta.json are written and contain no unre
|
|
|
731
731
|
|
|
732
732
|
Before claiming baseline readiness, submit `requirement`、`rule`、`boundary`、`slice` and `acceptance` candidates through `devflow_requirement_graph`. Each requirement candidate must cite source IDs and reference behavior/acceptance IDs returned by the writer. Run `devflow_requirement_graph(action="validate")` and record its result in baseline metadata. Do not directly create `governance.json`, allocate IDs, or set candidate status to `confirmed`.
|
|
733
733
|
|
|
734
|
-
The baseline handoff must also call `devflow_requirement_graph(action="inspect")` after all proposals and validation. Record the returned graph `revision` and the SHA-256 of `.planning/requirements/{feature}/governance.json` as `graph_revision` and `governance_graph_sha256` in `baseline.meta.json`. The step is not complete if the Core-owned graph file, revision, or hash is missing.
|
|
734
|
+
The baseline handoff must also call `devflow_requirement_graph(action="inspect")` after all proposals and validation. Record the returned graph `revision` and the SHA-256 of `.devflow/planning/requirements/{feature}/governance.json` as `graph_revision` and `governance_graph_sha256` in `baseline.meta.json`. The step is not complete if the Core-owned graph file, revision, or hash is missing.
|
|
735
735
|
|
|
736
736
|
```markdown
|
|
737
737
|
- [ ] 每个原始需求映射到 FP-*/BR-*/BC-* 或 out-of-scope
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
- **来源类型**:{{PRD / 会议纪要 / 用户描述 / 其他}}
|
|
6
6
|
- **来源文件/说明**:{{来源}}
|
|
7
7
|
- **生成时间**:{{日期}}
|
|
8
|
-
- **项目上下文**:`.planning/PROJECT.md`
|
|
9
|
-
- **项目导航**:`.planning/navigation/INDEX.md`
|
|
8
|
+
- **项目上下文**:`.devflow/planning/PROJECT.md`
|
|
9
|
+
- **项目导航**:`.devflow/planning/navigation/INDEX.md`
|
|
10
10
|
- **功能名称**:{{功能名称}}
|
|
11
|
-
- **功能目录名**:{{功能名,用于 .planning/features/{功能名}/}}
|
|
12
|
-
- **下游输出目录**:`.planning/features/{{功能名}}/`
|
|
11
|
+
- **功能目录名**:{{功能名,用于 .devflow/planning/features/{功能名}/}}
|
|
12
|
+
- **下游输出目录**:`.devflow/planning/features/{{功能名}}/`
|
|
13
13
|
|
|
14
14
|
## 二、需求整理摘要
|
|
15
15
|
|
|
@@ -138,11 +138,11 @@
|
|
|
138
138
|
|
|
139
139
|
| 来源类型 | 路径/范围 | 结论 |
|
|
140
140
|
|----------|-----------|------|
|
|
141
|
-
| 里程碑 | `.planning/milestones/...` | {{相关/无相关/不存在/未扫描原因}} |
|
|
142
|
-
| 历史需求基线 | `.planning/requirements/...` | {{相关/无相关/不存在/未扫描原因}} |
|
|
143
|
-
| 经验教训 | `.planning/lessons/...` | {{相关/无相关/不存在/未扫描原因}} |
|
|
144
|
-
| 阶段上下文 | `.planning/*/CONTEXT.md` | {{相关/无相关/不存在/未扫描原因}} |
|
|
145
|
-
| Legacy/项目规则历史 | `features/` / `.context/lessons/` / `.context/workflow/` | {{如存在则记录;不存在则写“不适用”}} |
|
|
141
|
+
| 里程碑 | `.devflow/planning/milestones/...` | {{相关/无相关/不存在/未扫描原因}} |
|
|
142
|
+
| 历史需求基线 | `.devflow/planning/requirements/...` | {{相关/无相关/不存在/未扫描原因}} |
|
|
143
|
+
| 经验教训 | `.devflow/planning/lessons/...` | {{相关/无相关/不存在/未扫描原因}} |
|
|
144
|
+
| 阶段上下文 | `.devflow/planning/*/CONTEXT.md` | {{相关/无相关/不存在/未扫描原因}} |
|
|
145
|
+
| Legacy/项目规则历史 | `features/` / `.devflow/context/lessons/` / `.devflow/context/workflow/` | {{如存在则记录;不存在则写“不适用”}} |
|
|
146
146
|
|
|
147
147
|
### 9.2 关联历史功能/里程碑
|
|
148
148
|
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
统一使用以下功能目录,后续 skill 不得重新生成不同目录名:
|
|
170
170
|
|
|
171
171
|
- **功能名**:{{功能名}}
|
|
172
|
-
- **输出目录**:`.planning/features/{{功能名}}/`
|
|
172
|
+
- **输出目录**:`.devflow/planning/features/{{功能名}}/`
|
|
173
173
|
- **当前功能切片**:读取本文档“当前功能切片”中的当前 FP/BR/BC。
|
|
174
174
|
- **当前执行切片**:读取本文档“3.0a 当前执行切片范围”。非当前切片只能作为依赖上下文,不得生成实现任务。
|
|
175
175
|
- **跨功能依赖**:读取 `depends_on` 引用的历史 FP/BR/BC 详情,不得只读当前 FP 而忽略依赖项。
|
|
@@ -178,37 +178,37 @@
|
|
|
178
178
|
|
|
179
179
|
- 读取本文档的当前功能切片、`depends_on` 引用详情、功能点详情、业务规则、边界场景。
|
|
180
180
|
- 输出必须带当前 `Slice ID`,且只展开当前执行切片。
|
|
181
|
-
- 输出 `.planning/features/{{功能名}}/功能点梳理.md`。
|
|
181
|
+
- 输出 `.devflow/planning/features/{{功能名}}/功能点梳理.md`。
|
|
182
182
|
|
|
183
183
|
### 11.1a 给测试指导书
|
|
184
184
|
|
|
185
|
-
- 读取 `.planning/features/{{功能名}}/功能点梳理.md`(主要输入)和本文档的 FP/BR/BC/CR 关联。
|
|
186
|
-
- 同时读取 `.planning/PROJECT.md`。
|
|
185
|
+
- 读取 `.devflow/planning/features/{{功能名}}/功能点梳理.md`(主要输入)和本文档的 FP/BR/BC/CR 关联。
|
|
186
|
+
- 同时读取 `.devflow/planning/PROJECT.md`。
|
|
187
187
|
- 此步骤为可选,不阻塞下游门禁。
|
|
188
|
-
- 输出 `.planning/features/{{功能名}}/测试指导书.md`。
|
|
188
|
+
- 输出 `.devflow/planning/features/{{功能名}}/测试指导书.md`。
|
|
189
189
|
|
|
190
190
|
### 11.2 给前端技术方案
|
|
191
191
|
|
|
192
|
-
- 读取 `.planning/features/{{功能名}}/功能点梳理.md` 中的页面/组件/字段/交互拆解。
|
|
192
|
+
- 读取 `.devflow/planning/features/{{功能名}}/功能点梳理.md` 中的页面/组件/字段/交互拆解。
|
|
193
193
|
- 只为当前执行切片生成前端方案;后置切片只列为依赖或后续范围。
|
|
194
194
|
- 读取本文档的当前功能切片、跨功能依赖、涉及页面/模块、入口/触发、主流程、边界场景、数据要求。
|
|
195
|
-
- 同时读取 `.planning/navigation/INDEX.md` → 筛选前端类型代码库 → 加载对应 navigation 文件。
|
|
196
|
-
- 输出 `.planning/features/{{功能名}}/前端技术方案.md`。
|
|
195
|
+
- 同时读取 `.devflow/planning/navigation/INDEX.md` → 筛选前端类型代码库 → 加载对应 navigation 文件。
|
|
196
|
+
- 输出 `.devflow/planning/features/{{功能名}}/前端技术方案.md`。
|
|
197
197
|
|
|
198
198
|
### 11.3 给后端技术方案
|
|
199
199
|
|
|
200
|
-
- 读取 `.planning/features/{{功能名}}/功能点梳理.md` 中的 API/服务节点和逻辑维度。
|
|
200
|
+
- 读取 `.devflow/planning/features/{{功能名}}/功能点梳理.md` 中的 API/服务节点和逻辑维度。
|
|
201
201
|
- 只为当前执行切片生成后端方案;共享能力若服务于后置切片,必须有当前切片可验证门禁。
|
|
202
202
|
- 读取本文档的当前功能切片、跨功能依赖、业务规则、数据要求、与历史功能/里程碑的关联、兼容性要求、边界场景、代码现实对照。
|
|
203
|
-
- 同时读取 `.planning/navigation/INDEX.md` → 筛选后端/服务类型代码库 → 加载对应 navigation 文件。
|
|
204
|
-
- 输出 `.planning/features/{{功能名}}/后端技术方案.md`。
|
|
203
|
+
- 同时读取 `.devflow/planning/navigation/INDEX.md` → 筛选后端/服务类型代码库 → 加载对应 navigation 文件。
|
|
204
|
+
- 输出 `.devflow/planning/features/{{功能名}}/后端技术方案.md`。
|
|
205
205
|
|
|
206
206
|
### 11.4 给变更清单
|
|
207
207
|
|
|
208
208
|
- 读取本文档的功能点、业务规则、边界场景、反向审视与用户拍板。
|
|
209
|
-
- 同时读取 `.planning/features/{{功能名}}/前端技术方案.md` 和 `.planning/features/{{功能名}}/后端技术方案.md`。
|
|
209
|
+
- 同时读取 `.devflow/planning/features/{{功能名}}/前端技术方案.md` 和 `.devflow/planning/features/{{功能名}}/后端技术方案.md`。
|
|
210
210
|
- 变更任务必须标注 `Slice ID`;不得生成后置切片的实现任务。
|
|
211
|
-
- 输出 `.planning/features/{{功能名}}/变更清单.md`。
|
|
211
|
+
- 输出 `.devflow/planning/features/{{功能名}}/变更清单.md`。
|
|
212
212
|
|
|
213
213
|
### 11.5 给测试验收
|
|
214
214
|
|
package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/antipatterns.md
CHANGED
|
@@ -35,13 +35,13 @@ Required:
|
|
|
35
35
|
Wrong:
|
|
36
36
|
|
|
37
37
|
- Assuming the project keeps outbound-call style `features/*.spec.md` history.
|
|
38
|
-
- Treating `.context/lessons/README.md` as the only source of historical product or requirement decisions.
|
|
38
|
+
- Treating `.devflow/context/lessons/README.md` as the only source of historical product or requirement decisions.
|
|
39
39
|
- Ignoring milestone artifacts because their filenames differ from spec documents.
|
|
40
40
|
|
|
41
41
|
Required:
|
|
42
42
|
|
|
43
|
-
- Use this workflow's primary history model first: `.planning/milestones/`, `.planning/requirements/`, `.planning/lessons/`, and `.planning/*/CONTEXT.md`.
|
|
44
|
-
- Treat `features/`, `.context/lessons/`, and `.context/workflow/` as optional legacy or project-rule evidence when present.
|
|
43
|
+
- Use this workflow's primary history model first: `.devflow/planning/milestones/`, `.devflow/planning/requirements/`, `.devflow/planning/lessons/`, and `.devflow/planning/*/CONTEXT.md`.
|
|
44
|
+
- Treat `features/`, `.devflow/context/lessons/`, and `.devflow/context/workflow/` as optional legacy or project-rule evidence when present.
|
|
45
45
|
- Record exactly which history sources were checked.
|
|
46
46
|
|
|
47
47
|
## Implementation Leakage
|
|
@@ -25,7 +25,7 @@ Do not:
|
|
|
25
25
|
|
|
26
26
|
## Entry Triage Carry-Forward
|
|
27
27
|
|
|
28
|
-
If `.planning/requirements/{功能名}/入口分诊.md` exists, start challenge review from its findings:
|
|
28
|
+
If `.devflow/planning/requirements/{功能名}/入口分诊.md` exists, start challenge review from its findings:
|
|
29
29
|
|
|
30
30
|
- Duplicate or already-done evidence feeds C1 and C2.
|
|
31
31
|
- Prior rejection / out-of-scope evidence feeds C3 and may block baseline until the user explicitly reverses it.
|
|
@@ -96,8 +96,8 @@ Do not silently choose. The user must decide when the choice changes scope, sema
|
|
|
96
96
|
|
|
97
97
|
Search available history before claiming there is no precedent:
|
|
98
98
|
|
|
99
|
-
- Primary workflow history: `.planning/milestones/`, `.planning/requirements/`, `.planning/lessons/`, and `.planning/*/CONTEXT.md`.
|
|
100
|
-
- Optional legacy/project-rule history when present: `features/`, `.context/lessons/README.md`, `.context/workflow/`, root `AGENTS.md`, and root `CLAUDE.md`.
|
|
99
|
+
- Primary workflow history: `.devflow/planning/milestones/`, `.devflow/planning/requirements/`, `.devflow/planning/lessons/`, and `.devflow/planning/*/CONTEXT.md`.
|
|
100
|
+
- Optional legacy/project-rule history when present: `features/`, `.devflow/context/lessons/README.md`, `.devflow/context/workflow/`, root `AGENTS.md`, and root `CLAUDE.md`.
|
|
101
101
|
|
|
102
102
|
Do not assume outbound-call style `features/*.spec.md` exists. This workflow's normal long-term memory is milestone/planning based.
|
|
103
103
|
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## 加载顺序
|
|
4
4
|
|
|
5
|
-
1. `.planning/PROJECT.md` — 项目上下文和已上线能力
|
|
6
|
-
2. `.planning/navigation/INDEX.md` — 代码库注册表(Codebase Registry),从中识别与需求相关的代码库
|
|
7
|
-
3. `.planning/navigation/{name}.md` — 加载 INDEX.md 中标识的相关代码库的导航文件
|
|
8
|
-
4. `.planning/milestones/` — 归档的里程碑记录,是本工作流的主要历史口径
|
|
9
|
-
5. `.planning/requirements/` — 已确认或历史需求基线
|
|
10
|
-
6. `.planning/lessons/` — 跨里程碑经验教训
|
|
11
|
-
7. `.planning/*/CONTEXT.md` — 之前阶段的决策记录
|
|
12
|
-
8. `features/`、`.context/lessons/`、`.context/workflow/` — 仅当目标项目存在时作为兼容历史或项目规则来源,不作为默认历史口径
|
|
5
|
+
1. `.devflow/planning/PROJECT.md` — 项目上下文和已上线能力
|
|
6
|
+
2. `.devflow/planning/navigation/INDEX.md` — 代码库注册表(Codebase Registry),从中识别与需求相关的代码库
|
|
7
|
+
3. `.devflow/planning/navigation/{name}.md` — 加载 INDEX.md 中标识的相关代码库的导航文件
|
|
8
|
+
4. `.devflow/planning/milestones/` — 归档的里程碑记录,是本工作流的主要历史口径
|
|
9
|
+
5. `.devflow/planning/requirements/` — 已确认或历史需求基线
|
|
10
|
+
6. `.devflow/planning/lessons/` — 跨里程碑经验教训
|
|
11
|
+
7. `.devflow/planning/*/CONTEXT.md` — 之前阶段的决策记录
|
|
12
|
+
8. `features/`、`.devflow/context/lessons/`、`.devflow/context/workflow/` — 仅当目标项目存在时作为兼容历史或项目规则来源,不作为默认历史口径
|
|
13
13
|
|
|
14
14
|
## 对比分析要点
|
|
15
15
|
|
|
16
16
|
### 入口分诊证据复用
|
|
17
17
|
|
|
18
|
-
- 如果 `.planning/requirements/{功能名}/入口分诊.md` 存在,先读取其中的"已实现/重叠检查"和"历史拒绝/范围检查"。
|
|
18
|
+
- 如果 `.devflow/planning/requirements/{功能名}/入口分诊.md` 存在,先读取其中的"已实现/重叠检查"和"历史拒绝/范围检查"。
|
|
19
19
|
- 分诊结果只能作为 Phase 4/4.5 的优先证据入口,不能替代源码比差。
|
|
20
20
|
- 当分诊结论为 `already_done`、`wontfix` 或 `ready_for_human` 时,baseline 不应继续生成通过状态,除非用户明确改变范围或推翻历史决策。
|
|
21
21
|
- 分诊已搜索的来源必须并入 baseline 的搜索来源记录,避免重复声明"未发现历史"。
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
|
|
40
40
|
### 历史口径映射
|
|
41
41
|
|
|
42
|
-
- outbound-call 中的 `features/*.spec.md` 对应本工作流里的 `.planning/milestones/`、`.planning/requirements/baseline.md` 和阶段 `CONTEXT.md`。
|
|
43
|
-
- outbound-call 中的 `.context/lessons/README.md` 对应本工作流里的 `.planning/lessons/README.md`;如果目标项目同时存在 `.context/lessons/`,将其标为项目规则/遗留经验来源。
|
|
42
|
+
- outbound-call 中的 `features/*.spec.md` 对应本工作流里的 `.devflow/planning/milestones/`、`.devflow/planning/requirements/baseline.md` 和阶段 `CONTEXT.md`。
|
|
43
|
+
- outbound-call 中的 `.devflow/context/lessons/README.md` 对应本工作流里的 `.devflow/planning/lessons/README.md`;如果目标项目同时存在 `.devflow/context/lessons/`,将其标为项目规则/遗留经验来源。
|
|
44
44
|
- 输出时必须写清楚实际搜索了哪些目录或文件,不能只写"未发现历史"。
|
|
45
45
|
|
|
46
46
|
## 三级递进审查
|
package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/questioning.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
4. 已形成代码路由摘要:可能相关模块、候选源码路径、映射到这些路径的需求词、需要 Phase 4 深查的问题
|
|
17
17
|
5. 已将问题绑定到来源、现有模块、候选 FP/BR/BC/CR,或图片阻塞点
|
|
18
18
|
|
|
19
|
-
如果只读了 `.planning/navigation/*.md` 或只做了 Phase 1.5 轻量路由扫描,不得声称“当前系统已支持/不支持某能力”。只能说“可能相关”,并在 Phase 4 Level 2 下钻源码后再产出行为结论。
|
|
19
|
+
如果只读了 `.devflow/planning/navigation/*.md` 或只做了 Phase 1.5 轻量路由扫描,不得声称“当前系统已支持/不支持某能力”。只能说“可能相关”,并在 Phase 4 Level 2 下钻源码后再产出行为结论。
|
|
20
20
|
|
|
21
21
|
在 Phase 2 之前,只允许问会阻塞需求理解的输入澄清问题,例如 `critical_image` 无法识别、核心业务目标缺失、需求明显指向多个现有模块但无法判断边界。
|
|
22
22
|
|
|
@@ -54,7 +54,7 @@ Use this checklist after feature point decomposition and before writing the base
|
|
|
54
54
|
- [ ] 每个涉及已有代码的 FP,已从导航 Call Chain Map 提取受影响的文件清单:
|
|
55
55
|
- 前端:受影响的路由、页面组件、composable、API 模块
|
|
56
56
|
- 后端:受影响的 handler、service、repository、DAO
|
|
57
|
-
- [ ] 如果 `.planning/code-index/` 存在,已通过 `code-index-query` 查询需求关键词、API 路径、页面名、字段名、状态名、表/配置/资源名,并记录使用到的 symbol/relation id
|
|
57
|
+
- [ ] 如果 `.devflow/planning/code-index/` 存在,已通过 `code-index-query` 查询需求关键词、API 路径、页面名、字段名、状态名、表/配置/资源名,并记录使用到的 symbol/relation id
|
|
58
58
|
- [ ] 调用链重叠类型已判断:扩展已有调用链 vs 新建独立调用链
|
|
59
59
|
- [ ] 契约影响已预判:修改已有接口/参数时,已检查 Call Chain Map 中的其他调用方
|
|
60
60
|
- [ ] 受影响的调用链文件、路由、API 路径已写回 FP 的"关联已有模块"
|
|
@@ -88,8 +88,8 @@ Level 2 发现"已存在且一致"或"已存在但冲突"时启动。
|
|
|
88
88
|
- Historical feature overlap is classified as new, modify, replace, or affect.
|
|
89
89
|
- Compatibility requirements are recorded.
|
|
90
90
|
- Reuse opportunities are checked across business capability, installed library, and project pattern layers.
|
|
91
|
-
- Historical lessons or prior work are searched using the workflow history model first: `.planning/milestones/`, `.planning/requirements/`, `.planning/lessons/`, and `.planning/*/CONTEXT.md`.
|
|
92
|
-
- Legacy history such as `features/` or `.context/lessons/` is used only when present and is labeled as legacy/project-rule evidence.
|
|
91
|
+
- Historical lessons or prior work are searched using the workflow history model first: `.devflow/planning/milestones/`, `.devflow/planning/requirements/`, `.devflow/planning/lessons/`, and `.devflow/planning/*/CONTEXT.md`.
|
|
92
|
+
- Legacy history such as `features/` or `.devflow/context/lessons/` is used only when present and is labeled as legacy/project-rule evidence.
|
|
93
93
|
- The searched sources are recorded before claiming no related history.
|
|
94
94
|
|
|
95
95
|
### Challenge Review
|
|
@@ -103,7 +103,7 @@ Level 2 发现"已存在且一致"或"已存在但冲突"时启动。
|
|
|
103
103
|
|
|
104
104
|
### Downstream Readiness
|
|
105
105
|
|
|
106
|
-
- One canonical feature name and `.planning/features/{功能名}/` output directory are defined.
|
|
106
|
+
- One canonical feature name and `.devflow/planning/features/{功能名}/` output directory are defined.
|
|
107
107
|
- Current feature slice and `depends_on` are sufficient for downstream skills to load current scope plus required historical context.
|
|
108
108
|
- Frontend has enough information to identify pages, interactions, states, and API dependencies.
|
|
109
109
|
- Backend has enough information to identify data, services, interfaces, rules, and risks.
|
|
@@ -11,8 +11,8 @@ description: "Use as the lightweight first step for a new request, bug report, P
|
|
|
11
11
|
|
|
12
12
|
Always create or update:
|
|
13
13
|
|
|
14
|
-
- `.planning/requirements/{功能名}/入口分诊.md`
|
|
15
|
-
- `.planning/requirements/{功能名}/入口分诊.meta.json`
|
|
14
|
+
- `.devflow/planning/requirements/{功能名}/入口分诊.md`
|
|
15
|
+
- `.devflow/planning/requirements/{功能名}/入口分诊.meta.json`
|
|
16
16
|
|
|
17
17
|
`入口分诊.meta.json` minimum fields:
|
|
18
18
|
|
|
@@ -89,13 +89,13 @@ Search by domain concept, not just exact words.
|
|
|
89
89
|
|
|
90
90
|
Required sources:
|
|
91
91
|
|
|
92
|
-
1. `.planning/requirements/baseline.md`
|
|
93
|
-
2. `.planning/features/`
|
|
94
|
-
3. `.planning/milestones/`
|
|
95
|
-
4. `.planning/lessons/`
|
|
96
|
-
5. `.planning/*/CONTEXT.md`
|
|
97
|
-
6. `.planning/navigation/INDEX.md` and relevant navigation files
|
|
98
|
-
7. `code-index-query` against `.planning/code-index/` when present, for shallow symbol/entrypoint/resource candidate lookup
|
|
92
|
+
1. `.devflow/planning/requirements/baseline.md`
|
|
93
|
+
2. `.devflow/planning/features/`
|
|
94
|
+
3. `.devflow/planning/milestones/`
|
|
95
|
+
4. `.devflow/planning/lessons/`
|
|
96
|
+
5. `.devflow/planning/*/CONTEXT.md`
|
|
97
|
+
6. `.devflow/planning/navigation/INDEX.md` and relevant navigation files
|
|
98
|
+
7. `code-index-query` against `.devflow/planning/code-index/` when present, for shallow symbol/entrypoint/resource candidate lookup
|
|
99
99
|
8. Actual source files only enough to confirm whether a likely capability exists
|
|
100
100
|
|
|
101
101
|
Search strategy:
|
|
@@ -128,13 +128,13 @@ Search for prior decisions that intentionally avoided this request.
|
|
|
128
128
|
|
|
129
129
|
Required sources:
|
|
130
130
|
|
|
131
|
-
- `.planning/requirements/baseline.md`
|
|
132
|
-
- `.planning/features/**/需求梳理.md`
|
|
133
|
-
- `.planning/features/**/需求澄清记录.md`
|
|
134
|
-
- `.planning/features/**/PROGRESS.md`
|
|
135
|
-
- `.planning/milestones/`
|
|
136
|
-
- `.planning/lessons/`
|
|
137
|
-
- `.planning/*/CONTEXT.md`
|
|
131
|
+
- `.devflow/planning/requirements/baseline.md`
|
|
132
|
+
- `.devflow/planning/features/**/需求梳理.md`
|
|
133
|
+
- `.devflow/planning/features/**/需求澄清记录.md`
|
|
134
|
+
- `.devflow/planning/features/**/PROGRESS.md`
|
|
135
|
+
- `.devflow/planning/milestones/`
|
|
136
|
+
- `.devflow/planning/lessons/`
|
|
137
|
+
- `.devflow/planning/*/CONTEXT.md`
|
|
138
138
|
- `.out-of-scope/` if present
|
|
139
139
|
|
|
140
140
|
Treat these as prior rejection signals:
|
|
@@ -11,11 +11,11 @@ description: "Use when a requirement is too large or foggy for one clarification
|
|
|
11
11
|
|
|
12
12
|
Always create or update:
|
|
13
13
|
|
|
14
|
-
- `.planning/requirements/{功能名}/决策地图.md`
|
|
15
|
-
- `.planning/requirements/{功能名}/决策地图.meta.json`
|
|
16
|
-
- `.planning/requirements/{功能名}/source_units.yaml` (Core-generated)
|
|
17
|
-
- `.planning/requirements/{功能名}/coverage.yaml`
|
|
18
|
-
- `.planning/requirements/{功能名}/wayfinder/WF-xxx.md` for each ticket
|
|
14
|
+
- `.devflow/planning/requirements/{功能名}/决策地图.md`
|
|
15
|
+
- `.devflow/planning/requirements/{功能名}/决策地图.meta.json`
|
|
16
|
+
- `.devflow/planning/requirements/{功能名}/source_units.yaml` (Core-generated)
|
|
17
|
+
- `.devflow/planning/requirements/{功能名}/coverage.yaml`
|
|
18
|
+
- `.devflow/planning/requirements/{功能名}/wayfinder/WF-xxx.md` for each ticket
|
|
19
19
|
|
|
20
20
|
`决策地图.meta.json` minimum fields:
|
|
21
21
|
|
|
@@ -75,7 +75,7 @@ Do not merge `Grilling` and `Task`: a question to the user and a local artifact
|
|
|
75
75
|
|
|
76
76
|
## Phase 1 — Chart The First Map
|
|
77
77
|
|
|
78
|
-
1. Read `.planning/requirements/{功能名}/入口分诊.md`.
|
|
78
|
+
1. Read `.devflow/planning/requirements/{功能名}/入口分诊.md`.
|
|
79
79
|
2. Read the raw user input and only the project context needed to understand the uncertainty.
|
|
80
80
|
3. Run the **Source Coherence Gate** below before declaring Fog or creating any Grilling ticket.
|
|
81
81
|
4. Write:
|
package/src/cli.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { readFileSync } from "node:fs";
|
|
|
5
5
|
|
|
6
6
|
import { formatDoctor, runHostDoctor } from "./doctor.ts";
|
|
7
7
|
import { initializeProject, loadProjectContext, resolveProjectRoot } from "./project-context.ts";
|
|
8
|
+
import { migrateLegacyProjectLayout } from "./project-layout.ts";
|
|
9
|
+
import { InitializationStore } from "./initialization-store.ts";
|
|
8
10
|
import { aggregateUsage, renderUsage } from "./usage-stats.ts";
|
|
9
11
|
import { projectSessionDir } from "./paths.ts";
|
|
10
12
|
|
|
@@ -12,6 +14,7 @@ function usage(): string {
|
|
|
12
14
|
return [
|
|
13
15
|
"Usage:",
|
|
14
16
|
" devflow-pi init [project] [--scan]",
|
|
17
|
+
" devflow-pi migrate [project] --confirm-active",
|
|
15
18
|
" devflow-pi doctor [project]",
|
|
16
19
|
" devflow-pi usage [project]",
|
|
17
20
|
" devflow-pi [project] [--resume [session-id]] [--prompt <text>] [--mcp] [--yolo]",
|
|
@@ -65,6 +68,18 @@ async function main(): Promise<void> {
|
|
|
65
68
|
}
|
|
66
69
|
return;
|
|
67
70
|
}
|
|
71
|
+
if (command === "migrate") {
|
|
72
|
+
const projectArgument = args[1] && !args[1].startsWith("-") ? args[1] : undefined;
|
|
73
|
+
if (!args.includes("--confirm-active")) throw new Error("Legacy control-plane migration requires --confirm-active");
|
|
74
|
+
const requested = projectArgument ? path.resolve(projectArgument) : process.cwd();
|
|
75
|
+
const root = await resolveProjectRoot(requested, { explicit: requested, allowUninitialized: true });
|
|
76
|
+
const migrated = await migrateLegacyProjectLayout(root, { allowActive: true, allowUnmanifested: true });
|
|
77
|
+
const manifest = JSON.parse(readFileSync(path.join(root, ".devflow/project.json"), "utf8"));
|
|
78
|
+
const store = await InitializationStore.open({ root, manifest });
|
|
79
|
+
try { await store.registerWorkspace(); } finally { store.close(); }
|
|
80
|
+
console.log(JSON.stringify({ status: "migrated", root, migrated }, null, 2));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
68
83
|
const positionalProject = command && !["doctor", "usage"].includes(command) && !command.startsWith("-") ? command : undefined;
|
|
69
84
|
const requestedProject = ["doctor", "usage"].includes(command || "") ? args[1] : positionalProject;
|
|
70
85
|
const root = await resolveProjectRoot(process.cwd(), { explicit: requestedProject });
|
package/src/constants.ts
CHANGED
|
@@ -5,6 +5,7 @@ import path from "node:path";
|
|
|
5
5
|
import { Database } from "bun:sqlite";
|
|
6
6
|
|
|
7
7
|
import { projectControlDatabasePath, projectDataDir } from "./paths.ts";
|
|
8
|
+
import { DEVFLOW_SCAN_EXCLUDES, PLANNING_DIRECTORY } from "./project-layout.ts";
|
|
8
9
|
|
|
9
10
|
export const INITIALIZATION_SCHEMA_VERSION = 2;
|
|
10
11
|
export const FACT_KINDS = [
|
|
@@ -323,7 +324,7 @@ export class InitializationStore {
|
|
|
323
324
|
}));
|
|
324
325
|
const requiredKinds = input.requiredKinds ?? [...FACT_KINDS];
|
|
325
326
|
if (input.mode === "fast" && requiredKinds.length === FACT_KINDS.length) throw new Error("Fast mode must explicitly limit required fact kinds");
|
|
326
|
-
const config = { ...input, repositories, requiredKinds, includes: input.includes ?? ["**/*"], excludes: input.excludes ?? [
|
|
327
|
+
const config = { ...input, repositories, requiredKinds, includes: input.includes ?? ["**/*"], excludes: [...new Set([...DEVFLOW_SCAN_EXCLUDES, ...(input.excludes ?? [])])], adapterVersions: input.adapterVersions ?? {} };
|
|
327
328
|
const configJson = canonicalJson(config);
|
|
328
329
|
const contentHash = hash(configJson);
|
|
329
330
|
const existing = this.db.query("SELECT id, revision FROM scan_configs WHERE project_id=? AND content_hash=?").get(this.context.manifest.projectId, contentHash) as { id: string; revision: number } | null;
|
|
@@ -510,7 +511,7 @@ export class InitializationStore {
|
|
|
510
511
|
if (options.indexRef.status === "complete" && (typeof options.indexRef.generation !== "string" || typeof options.indexRef.snapshotHash !== "string")) throw new Error("Complete index references require generation and snapshot hash");
|
|
511
512
|
if (options.indexRef.status === "complete") {
|
|
512
513
|
if (typeof options.indexRef.contentManifestHash !== "string" || typeof options.indexRef.repositoryRevision !== "string") throw new Error("Complete index references require content manifest and repository revision");
|
|
513
|
-
const indexRoot = path.resolve(this.context.root, String(options.indexRef.stagingPath ?? options.indexRef.path ??
|
|
514
|
+
const indexRoot = path.resolve(this.context.root, String(options.indexRef.stagingPath ?? options.indexRef.path ?? `${PLANNING_DIRECTORY}/code-index`));
|
|
514
515
|
const immutable = path.resolve(indexRoot, String(options.indexRef.immutablePath ?? `snapshots/${options.indexRef.generation}`));
|
|
515
516
|
const snapshotFile = path.join(immutable, "SNAPSHOT.json");
|
|
516
517
|
if (!existsSync(snapshotFile)) throw new Error("Complete index reference does not point to an immutable generation");
|