@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
|
@@ -37,13 +37,13 @@ description: "Use after workflow-integration-verify has passed or produced an ap
|
|
|
37
37
|
|
|
38
38
|
| 优先级 | 输入 | 轨道 |
|
|
39
39
|
|--------|------|------|
|
|
40
|
-
| 1 | `.planning/features/{feature}/integration-report.md` | 合流门禁结果,必须存在 |
|
|
41
|
-
| 2 | `.planning/features/{feature}/api-contract.md` | API 契约,包含 no-op 场景 |
|
|
42
|
-
| 3 | `.planning/features/{feature}/api-call-guide.md` | 前端消费指南,包含 no-op 场景 |
|
|
43
|
-
| 4 | `.planning/features/{feature}/后端技术方案.md` | Track A |
|
|
44
|
-
| 5 | `.planning/features/{feature}/前端技术方案.md` | Track B |
|
|
45
|
-
| 6 | `.planning/features/{feature}/功能点梳理.md` | Track B |
|
|
46
|
-
| 7 | `.planning/requirements/baseline.md` | fallback |
|
|
40
|
+
| 1 | `.devflow/planning/features/{feature}/integration-report.md` | 合流门禁结果,必须存在 |
|
|
41
|
+
| 2 | `.devflow/planning/features/{feature}/api-contract.md` | API 契约,包含 no-op 场景 |
|
|
42
|
+
| 3 | `.devflow/planning/features/{feature}/api-call-guide.md` | 前端消费指南,包含 no-op 场景 |
|
|
43
|
+
| 4 | `.devflow/planning/features/{feature}/后端技术方案.md` | Track A |
|
|
44
|
+
| 5 | `.devflow/planning/features/{feature}/前端技术方案.md` | Track B |
|
|
45
|
+
| 6 | `.devflow/planning/features/{feature}/功能点梳理.md` | Track B |
|
|
46
|
+
| 7 | `.devflow/planning/requirements/baseline.md` | fallback |
|
|
47
47
|
|
|
48
48
|
**无 API 变更时**:不得直接跳过合流。必须存在 no-op `api-contract.md`、no-op `api-call-guide.md` 和 no-op `integration-report.md`;变更清单聚焦于代码文件改动,DDL/API 章节标注"无"。
|
|
49
49
|
|
|
@@ -58,23 +58,23 @@ description: "Use after workflow-integration-verify has passed or produced an ap
|
|
|
58
58
|
5. 读取功能点梳理(如存在)→ 确认 FP 覆盖完整性
|
|
59
59
|
6. 读取 baseline.md 的审查结论和风险标记
|
|
60
60
|
7. 若输入包含 `SL-*` 切片计划,读取 `skill://workflow-pipeline/references/slice-safety-guide.md`,只生成当前执行切片的任务。后置切片只能写入风险/后续范围,不得生成实现任务。
|
|
61
|
-
8. 读取 `.planning/requirements/{feature}/traceability.json`;它是任务覆盖判断的唯一 REQ 清单,不能仅凭技术方案标题推断覆盖。
|
|
62
|
-
9. 读取候选态的 `.planning/requirements/{feature}/tests.json`。它定义本次验收意图;不得从实现摘要或预期代码结构补造测试范围。该测试意图会与变更清单一起在 CP-3 冻结。
|
|
61
|
+
8. 读取 `.devflow/planning/requirements/{feature}/traceability.json`;它是任务覆盖判断的唯一 REQ 清单,不能仅凭技术方案标题推断覆盖。
|
|
62
|
+
9. 读取候选态的 `.devflow/planning/requirements/{feature}/tests.json`。它定义本次验收意图;不得从实现摘要或预期代码结构补造测试范围。该测试意图会与变更清单一起在 CP-3 冻结。
|
|
63
63
|
|
|
64
64
|
### 第二阶段:扫描项目上下文
|
|
65
65
|
|
|
66
66
|
1. 验证技术方案中列出的文件路径存在
|
|
67
67
|
2. 读取关键源文件的当前内容(确认改动基线)
|
|
68
68
|
3. 识别可复用的现有模式和工具库
|
|
69
|
-
4. 检查 `.planning/execution-contract.md` 的分层规则
|
|
69
|
+
4. 检查 `.devflow/planning/execution-contract.md` 的分层规则
|
|
70
70
|
|
|
71
71
|
### 第三阶段:生成变更清单
|
|
72
72
|
|
|
73
|
-
输出到 `.planning/features/{feature}/变更清单.md`。
|
|
73
|
+
输出到 `.devflow/planning/features/{feature}/变更清单.md`。
|
|
74
74
|
|
|
75
|
-
同时输出 `.planning/features/{feature}/test-bindings.json`。这是受控的任务—验收用例绑定。生成时它必须使用 `schema_version: 2` 与 `candidate_test_suite: { graph_revision, fingerprint }`,并通过 `test_task_binding_check.py --feature {feature} --stage candidate --json`。每个代码任务必须关联一个或多个候选 `TC-*`,并指定 `tdd_required`、`contract_first`、`integration_only` 或 `manual_justified` 测试模式;非 TDD 模式必须说明原因。`tdd_required` 还必须给出同一测试目标的 RED/GREEN 命令、RED 的预期失败标记、回归命令和生产代码路径。CP-3 会在同一次确认中核验候选绑定、冻结 TC 并写入 Core attestation;之后执行阶段以 `--stage frozen` 校验。所有 Core 实际执行的命令必须是无 shell 的 argv,且 runner 已在初始化生成的 `.planning/toolchain.md` 中被发现;不能用 `python -c`、`node -e` 或任意脚本解释器绕过。
|
|
75
|
+
同时输出 `.devflow/planning/features/{feature}/test-bindings.json`。这是受控的任务—验收用例绑定。生成时它必须使用 `schema_version: 2` 与 `candidate_test_suite: { graph_revision, fingerprint }`,并通过 `test_task_binding_check.py --feature {feature} --stage candidate --json`。每个代码任务必须关联一个或多个候选 `TC-*`,并指定 `tdd_required`、`contract_first`、`integration_only` 或 `manual_justified` 测试模式;非 TDD 模式必须说明原因。`tdd_required` 还必须给出同一测试目标的 RED/GREEN 命令、RED 的预期失败标记、回归命令和生产代码路径。CP-3 会在同一次确认中核验候选绑定、冻结 TC 并写入 Core attestation;之后执行阶段以 `--stage frozen` 校验。所有 Core 实际执行的命令必须是无 shell 的 argv,且 runner 已在初始化生成的 `.devflow/planning/toolchain.md` 中被发现;不能用 `python -c`、`node -e` 或任意脚本解释器绕过。
|
|
76
76
|
|
|
77
|
-
同时输出 `.planning/features/{feature}/变更清单.meta.json`。只有 Core 随包提供的 `traceability_check.py --file .planning/requirements/{feature}/traceability.json --stage change-plan` 成功时才允许写入 `traceability_status: "passed"`;`uncovered_requirement_count` 和 `orphan_task_count` 必须为 0。
|
|
77
|
+
同时输出 `.devflow/planning/features/{feature}/变更清单.meta.json`。只有 Core 随包提供的 `traceability_check.py --file .devflow/planning/requirements/{feature}/traceability.json --stage change-plan` 成功时才允许写入 `traceability_status: "passed"`;`uncovered_requirement_count` 和 `orphan_task_count` 必须为 0。
|
|
78
78
|
|
|
79
79
|
`变更清单.meta.json` 必须在顶层同时写入以下字段(不能只放在嵌套对象中):
|
|
80
80
|
|
|
@@ -87,7 +87,7 @@ description: "Use after workflow-integration-verify has passed or produced an ap
|
|
|
87
87
|
}
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
其中数值必须从当前 `.planning/requirements/{feature}/tests.json` 读取,禁止手填旧 revision 或旧 fingerprint。
|
|
90
|
+
其中数值必须从当前 `.devflow/planning/requirements/{feature}/tests.json` 读取,禁止手填旧 revision 或旧 fingerprint。
|
|
91
91
|
|
|
92
92
|
`test-bindings.json` 必须由 Core 随包提供的 `test_task_binding_check.py --feature {feature} --stage candidate --json` 校验通过。`candidate_test_suite` 必须严格只包含 `graph_revision` 和 `fingerprint` 两个字段,不能附加 `test_case_count` 或 `source`。每个 `implementation_tests` 项必须包含项目相对 `path`;非 `tdd_required` 任务必须在任务顶层提供 `non_tdd_reason`,`manual_justified` 还必须提供 `owner`。校验器的字段名是 `tc_refs`、`implementation_tests` 和 `tdd.red/green/regression`;不能使用旧格式的 `test_cases`、`red_command`、`green_command` 或 `regression_command`。`origin` 必须为 `devflow_change_plan`。
|
|
93
93
|
|
|
@@ -128,11 +128,11 @@ description: "Use after workflow-integration-verify has passed or produced an ap
|
|
|
128
128
|
- **操作**:新增 / 修改 / 删除
|
|
129
129
|
- **依赖**:T-000(无则写"无")
|
|
130
130
|
- **参考实现**:`path/to/similar/file.py:line`(有则填写)
|
|
131
|
-
- **Code Index 证据**:相关 symbol/relation/evidence(有 `.planning/code-index/` 时填写;无则写"未使用:原因")
|
|
131
|
+
- **Code Index 证据**:相关 symbol/relation/evidence(有 `.devflow/planning/code-index/` 时填写;无则写"未使用:原因")
|
|
132
132
|
- **需求来源**:FP-001 / BR-001 / 技术方案第X章
|
|
133
133
|
- **REQ 覆盖**:`REQ-001`(必须是 traceability.json 中的原子 ID;无来源任务必须显式标为获批技术债)
|
|
134
134
|
- **Slice**:SL-001
|
|
135
|
-
- **适用规范**:`.context/spec/backend/service.md` 等(有则填写)
|
|
135
|
+
- **适用规范**:`.devflow/context/spec/backend/service.md` 等(有则填写)
|
|
136
136
|
- **相关经验教训**:lesson ID 或"无"
|
|
137
137
|
- **执行前门禁**:编码前必须确认的事项(无则写"无")
|
|
138
138
|
- **测试策略**:单元/集成/人工测试策略简述
|
|
@@ -182,7 +182,7 @@ graph TD
|
|
|
182
182
|
- [ ] 每个任务有完成标准
|
|
183
183
|
- [ ] 所有完成标准使用 `- [ ]` checkbox 格式(非纯列表 `-`)
|
|
184
184
|
- [ ] 每条完成标准描述的是可通过静态代码分析验证的条件(禁止"功能正确"类模糊描述)
|
|
185
|
-
- [ ] 若 `.planning/code-index/` 存在,涉及已有代码的任务已标注相关 symbol/relation/evidence 或说明未使用原因
|
|
185
|
+
- [ ] 若 `.devflow/planning/code-index/` 存在,涉及已有代码的任务已标注相关 symbol/relation/evidence 或说明未使用原因
|
|
186
186
|
- [ ] 每个任务包含审查要求、适用规范、需求来源字段(至少标注"无")
|
|
187
187
|
- [ ] 文件路径与技术方案一致
|
|
188
188
|
- [ ] 变更清单任务同步写入 `traceability.json.tasks`,每项包含 `id`、`requirements` 和六维 `acceptance`
|
package/plugins/devflow-implementation/skills/workflow-change-plan/references/code-conventions.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 通用代码约束
|
|
2
2
|
|
|
3
|
-
Use this reference only as a fallback when the target project has no stronger rule package. Project-specific rules from `.planning/rules/`, `.context/spec/`, `AGENTS.md`, `CLAUDE.md`, framework conventions, or language stack slots override this file.
|
|
3
|
+
Use this reference only as a fallback when the target project has no stronger rule package. Project-specific rules from `.devflow/planning/rules/`, `.devflow/context/spec/`, `AGENTS.md`, `CLAUDE.md`, framework conventions, or language stack slots override this file.
|
|
4
4
|
|
|
5
5
|
## Task Design
|
|
6
6
|
|
package/plugins/devflow-implementation/skills/workflow-change-plan/references/output-template.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
>
|
|
19
19
|
> 完成标准在执行阶段由 `code_review` 门禁自动逐条验证。每条标准必须描述**可通过静态代码分析验证的具体条件**(精确到类名/方法名/字段名/返回值/文件行),不得使用"确保功能正确"、"用户体验良好"等模糊描述。标准模糊的条目将被标记为 `⚠️ UNVERIFIABLE`,无法通过自动化验证。
|
|
20
20
|
|
|
21
|
-
> **变更计划 meta:** `.planning/features/{功能名}/变更清单.meta.json` 顶层必须包含 `test_case_count`、`test_coverage_status`、`candidate_test_suite_graph_revision`、`candidate_test_suite_fingerprint`,值来自当前 `tests.json`,不能只放在嵌套对象中。
|
|
21
|
+
> **变更计划 meta:** `.devflow/planning/features/{功能名}/变更清单.meta.json` 顶层必须包含 `test_case_count`、`test_coverage_status`、`candidate_test_suite_graph_revision`、`candidate_test_suite_fingerprint`,值来自当前 `tests.json`,不能只放在嵌套对象中。
|
|
22
22
|
>
|
|
23
23
|
> **验收测试绑定:** 除 Markdown 外,必须生成 schema v2 的 `test-bindings.json`。它将每个任务绑定到候选 `TC-*`,任务字段必须使用 `tc_refs`、`implementation_tests` 和 `test_mode`;`tdd_required` 使用 `tdd.red/green/regression`。文件必须声明 `origin: devflow_change_plan`,并以 `candidate_test_suite: { graph_revision, fingerprint }` 固定候选测试意图;它必须通过 Core 随包提供的 `test_task_binding_check.py --feature <功能名> --stage candidate --json`。CP-3 在同一次用户确认中验证该绑定、冻结 TC,并写入 Core-owned `test-suite-freeze.json`;之后才可按 `--stage frozen` 进入执行。所有 `tdd_required` 任务必须声明相同测试目标的 RED/GREEN 命令、RED 失败标记、回归命令与生产代码路径。
|
|
24
24
|
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
```markdown
|
|
28
28
|
# <功能名称> - 变更清单
|
|
29
29
|
|
|
30
|
-
> 基于技术文档:`.planning/features/{功能名}/前端技术方案.md` 和 `.planning/features/{功能名}/后端技术方案.md`
|
|
30
|
+
> 基于技术文档:`.devflow/planning/features/{功能名}/前端技术方案.md` 和 `.devflow/planning/features/{功能名}/后端技术方案.md`
|
|
31
31
|
|
|
32
32
|
> 当前执行切片:`{{SL-001}}` — {{切片名称}}。本清单只生成该切片任务;后置切片仅作为上下文和风险记录。
|
|
33
33
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
- **技术栈**:语言 / 框架 / 主要依赖
|
|
39
39
|
- **分层结构**:项目的分层方式(如 Domain → DAO → Service → Handler)
|
|
40
|
-
- **规则来源**:`.planning/rules/` / `.context/spec/` / `.context/workflow/` / `.planning/lessons/` / `AGENTS.md` / `CLAUDE.md`
|
|
40
|
+
- **规则来源**:`.devflow/planning/rules/` / `.devflow/context/spec/` / `.devflow/context/workflow/` / `.devflow/planning/lessons/` / `AGENTS.md` / `CLAUDE.md`
|
|
41
41
|
- **关键规范**:核心编码规则(命名、参数限制、错误处理、日志、事务、分页、权限等)
|
|
42
42
|
- **执行契约**:层级顺序、测试策略、codegen/mock/DI/migration 要求
|
|
43
43
|
- **经验教训**:与本次任务相关的历史教训
|
|
@@ -6,28 +6,28 @@ Use this contract when generating implementation change lists. A project rule pa
|
|
|
6
6
|
|
|
7
7
|
Look for rule sources in the target project, in this order:
|
|
8
8
|
|
|
9
|
-
1. `.planning/rules/INDEX.md`
|
|
10
|
-
2. `.planning/execution-contract.md`
|
|
11
|
-
3. `.planning/toolchain.md`
|
|
12
|
-
4. `.planning/lessons/README.md`
|
|
13
|
-
5. `.planning/milestones/`
|
|
14
|
-
6. `.planning/requirements/`
|
|
15
|
-
7. `.context/spec/index.md`
|
|
16
|
-
8. matching `.context/spec/stacks/{stack_key}.md`
|
|
17
|
-
9. matching `.context/spec/frontend|backend/{codebase}.md`
|
|
18
|
-
10. `.context/spec/`
|
|
19
|
-
11. `.context/workflow/tdd.md`
|
|
20
|
-
12. `.context/workflow/verification.md`
|
|
21
|
-
13. `.context/workflow/checklist.md`
|
|
22
|
-
14. `.context/lessons/README.md`
|
|
9
|
+
1. `.devflow/planning/rules/INDEX.md`
|
|
10
|
+
2. `.devflow/planning/execution-contract.md`
|
|
11
|
+
3. `.devflow/planning/toolchain.md`
|
|
12
|
+
4. `.devflow/planning/lessons/README.md`
|
|
13
|
+
5. `.devflow/planning/milestones/`
|
|
14
|
+
6. `.devflow/planning/requirements/`
|
|
15
|
+
7. `.devflow/context/spec/index.md`
|
|
16
|
+
8. matching `.devflow/context/spec/stacks/{stack_key}.md`
|
|
17
|
+
9. matching `.devflow/context/spec/frontend|backend/{codebase}.md`
|
|
18
|
+
10. `.devflow/context/spec/`
|
|
19
|
+
11. `.devflow/context/workflow/tdd.md`
|
|
20
|
+
12. `.devflow/context/workflow/verification.md`
|
|
21
|
+
13. `.devflow/context/workflow/checklist.md`
|
|
22
|
+
14. `.devflow/context/lessons/README.md`
|
|
23
23
|
15. root `AGENTS.md`, `CLAUDE.md`, or equivalent project instruction files
|
|
24
24
|
|
|
25
25
|
If none exist, explicitly write `未发现项目规则包` and continue using the technical documents and discovered code patterns.
|
|
26
26
|
|
|
27
27
|
History rule:
|
|
28
28
|
|
|
29
|
-
- Use `.planning/milestones/`, `.planning/requirements/`, `.planning/lessons/`, and phase `CONTEXT.md` files as the primary history model.
|
|
30
|
-
- Treat `.context/lessons/` and `features/` as compatible legacy/project-rule evidence only when present in the target project.
|
|
29
|
+
- Use `.devflow/planning/milestones/`, `.devflow/planning/requirements/`, `.devflow/planning/lessons/`, and phase `CONTEXT.md` files as the primary history model.
|
|
30
|
+
- Treat `.devflow/context/lessons/` and `features/` as compatible legacy/project-rule evidence only when present in the target project.
|
|
31
31
|
- Do not require outbound-call style history files.
|
|
32
32
|
|
|
33
33
|
## Task-Level Requirements
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: workflow-execute-phase
|
|
3
|
-
description: "Use when a planned .planning phase needs implementation, dependency-aware task execution, progress tracking, and verification evidence."
|
|
3
|
+
description: "Use when a planned .devflow/planning phase needs implementation, dependency-aware task execution, progress tracking, and verification evidence."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Legacy Command Metadata
|
|
@@ -44,7 +44,7 @@ references/ui-brand.md
|
|
|
44
44
|
Phase: $ARGUMENTS
|
|
45
45
|
|
|
46
46
|
**Requirement backfill rule:**
|
|
47
|
-
During execution, if an implementation change would alter external behavior, notifications, failure handling, retry/scheduling policy, permissions, API contracts, persistence/data-writing rules, compatibility behavior, or non-functional guarantees, stop before or immediately after the smallest safe edit and update `.planning/requirements/baseline.md` first.
|
|
47
|
+
During execution, if an implementation change would alter external behavior, notifications, failure handling, retry/scheduling policy, permissions, API contracts, persistence/data-writing rules, compatibility behavior, or non-functional guarantees, stop before or immediately after the smallest safe edit and update `.devflow/planning/requirements/baseline.md` first.
|
|
48
48
|
|
|
49
49
|
After updating the baseline, update every affected downstream artifact: feature breakdown, frontend/backend tech specs, change list, and pipeline/execution state. Do not let implementation become the only source of truth for new behavior.
|
|
50
50
|
|
|
@@ -52,38 +52,38 @@ Backfill is not required for pure refactors, local method extraction, naming cle
|
|
|
52
52
|
|
|
53
53
|
**Project rule package:**
|
|
54
54
|
Before assigning or executing implementation work, discover project rule sources in the target workspace:
|
|
55
|
-
- `.planning/rules/INDEX.md`
|
|
56
|
-
- `.planning/execution-contract.md`
|
|
57
|
-
- `.planning/toolchain.md`
|
|
58
|
-
- `.planning/lessons/README.md`
|
|
59
|
-
- `.planning/milestones/`
|
|
60
|
-
- `.planning/requirements/`
|
|
61
|
-
- `.context/spec/index.md`
|
|
62
|
-
- matching `.context/spec/stacks/{stack_key}.md`
|
|
63
|
-
- matching `.context/spec/frontend|backend/{codebase}.md`
|
|
64
|
-
- `.planning/code-index/` when present
|
|
65
|
-
- `.context/spec/`
|
|
66
|
-
- `.context/workflow/tdd.md`
|
|
67
|
-
- `.context/workflow/checklist.md`
|
|
68
|
-
- `.context/lessons/README.md`(如存在)
|
|
55
|
+
- `.devflow/planning/rules/INDEX.md`
|
|
56
|
+
- `.devflow/planning/execution-contract.md`
|
|
57
|
+
- `.devflow/planning/toolchain.md`
|
|
58
|
+
- `.devflow/planning/lessons/README.md`
|
|
59
|
+
- `.devflow/planning/milestones/`
|
|
60
|
+
- `.devflow/planning/requirements/`
|
|
61
|
+
- `.devflow/context/spec/index.md`
|
|
62
|
+
- matching `.devflow/context/spec/stacks/{stack_key}.md`
|
|
63
|
+
- matching `.devflow/context/spec/frontend|backend/{codebase}.md`
|
|
64
|
+
- `.devflow/planning/code-index/` when present
|
|
65
|
+
- `.devflow/context/spec/`
|
|
66
|
+
- `.devflow/context/workflow/tdd.md`
|
|
67
|
+
- `.devflow/context/workflow/checklist.md`
|
|
68
|
+
- `.devflow/context/lessons/README.md`(如存在)
|
|
69
69
|
- root `AGENTS.md`, `CLAUDE.md`, or equivalent project instruction files
|
|
70
70
|
|
|
71
|
-
If rule sources exist, resolve them using this read order before delegating work: `.planning/rules/INDEX.md` → `.context/spec/index.md` → matching stack spec → matching codebase spec → `.planning/navigation/{codebase}.md` → `.planning/code-index/` when present and relation facts are needed → actual source files. Include the resolved rules and relevant code-index evidence in the files delegated to execution workers and require task-level rule activation. If no rule sources exist, record that no project rule package was found and proceed with the plan context.
|
|
71
|
+
If rule sources exist, resolve them using this read order before delegating work: `.devflow/planning/rules/INDEX.md` → `.devflow/context/spec/index.md` → matching stack spec → matching codebase spec → `.devflow/planning/navigation/{codebase}.md` → `.devflow/planning/code-index/` when present and relation facts are needed → actual source files. Include the resolved rules and relevant code-index evidence in the files delegated to execution workers and require task-level rule activation. If no rule sources exist, record that no project rule package was found and proceed with the plan context.
|
|
72
72
|
|
|
73
|
-
When `.planning/code-index/` exists, implementation workers should use it to locate callers, callees, imports, routes, data/resource reads and writes, and tests before editing. They must still read source files at `evidence_path` before making changes.
|
|
73
|
+
When `.devflow/planning/code-index/` exists, implementation workers should use it to locate callers, callees, imports, routes, data/resource reads and writes, and tests before editing. They must still read source files at `evidence_path` before making changes.
|
|
74
74
|
|
|
75
75
|
**Baseline and change-list contract:**
|
|
76
76
|
Before assigning implementation work, read the relevant requirement baseline and change list when present:
|
|
77
|
-
- `.planning/requirements/baseline.md`
|
|
78
|
-
- `.planning/features/{功能名}/功能点梳理.md`
|
|
79
|
-
- `.planning/features/{功能名}/前端技术方案.md`
|
|
80
|
-
- `.planning/features/{功能名}/后端技术方案.md`
|
|
81
|
-
- `.planning/features/{功能名}/*变更清单.md`
|
|
77
|
+
- `.devflow/planning/requirements/baseline.md`
|
|
78
|
+
- `.devflow/planning/features/{功能名}/功能点梳理.md`
|
|
79
|
+
- `.devflow/planning/features/{功能名}/前端技术方案.md`
|
|
80
|
+
- `.devflow/planning/features/{功能名}/后端技术方案.md`
|
|
81
|
+
- `.devflow/planning/features/{功能名}/*变更清单.md`
|
|
82
82
|
|
|
83
|
-
Legacy compatibility: if the `.planning/features/{功能名}/` documents are missing, workers may read root `features/{功能名}/` as historical/legacy input, but new generated workflow artifacts should stay under `.planning/features/{功能名}/`.
|
|
83
|
+
Legacy compatibility: if the `.devflow/planning/features/{功能名}/` documents are missing, workers may read root `features/{功能名}/` as historical/legacy input, but new generated workflow artifacts should stay under `.devflow/planning/features/{功能名}/`.
|
|
84
84
|
|
|
85
85
|
Workers must implement only confirmed scope. Pending baseline decisions or challenge items that affect scope, semantics, ownership, compatibility, or implementation cost must be reported as blockers, not silently resolved in code.
|
|
86
|
-
Use `.planning/milestones/`, `.planning/requirements/`, `.planning/lessons/`, and phase `CONTEXT.md` as primary history when a task needs history. Treat `features/` or `.context/lessons/` as optional legacy/project-rule sources only when present.
|
|
86
|
+
Use `.devflow/planning/milestones/`, `.devflow/planning/requirements/`, `.devflow/planning/lessons/`, and phase `CONTEXT.md` as primary history when a task needs history. Treat `features/` or `.devflow/context/lessons/` as optional legacy/project-rule sources only when present.
|
|
87
87
|
|
|
88
88
|
**Available optional flags (documentation only — not automatically active):**
|
|
89
89
|
- `--wave N` — Execute only Wave `N` in the phase. Use when you want to pace execution or stay inside usage limits.
|
|
@@ -107,7 +107,7 @@ Before any worker edits code for a task, it must state a compact Rule Activation
|
|
|
107
107
|
## Rule Activation
|
|
108
108
|
- Task:
|
|
109
109
|
- Affected layers/modules:
|
|
110
|
-
- Spec index: .context/spec/index.md
|
|
110
|
+
- Spec index: .devflow/context/spec/index.md
|
|
111
111
|
- Stack spec resolved: (from index "Stack Specs" table)
|
|
112
112
|
- Codebase spec resolved: (from index "Codebase Specs" table)
|
|
113
113
|
- Depth spec files to check: (from domain index)
|
|
@@ -173,12 +173,12 @@ Preserve these generalized workflow rules from the project rule package when app
|
|
|
173
173
|
8. **Spec Compliance Gate** — After task implementation and before marking complete, check the applicable depth spec.
|
|
174
174
|
|
|
175
175
|
**Resolve spec paths through the index chain — do not hardcode directory names:**
|
|
176
|
-
1. Read `.context/spec/index.md` — the project's spec registry
|
|
177
|
-
2. From the "Stack Specs" table, find the stack spec path for your codebase (e.g., BACKEND → `.context/spec/stacks/python-fastapi-pydantic2-sqlalchemy-playwright.md`)
|
|
178
|
-
3. From the "Codebase Specs" table, find the codebase spec path (e.g., BACKEND → `.context/spec/backend/BACKEND.md`)
|
|
179
|
-
4. From "Detailed Spec Packages", find the domain index (e.g., `.context/spec/backend/index.md`) and read the relevant layer specs it lists
|
|
176
|
+
1. Read `.devflow/context/spec/index.md` — the project's spec registry
|
|
177
|
+
2. From the "Stack Specs" table, find the stack spec path for your codebase (e.g., BACKEND → `.devflow/context/spec/stacks/python-fastapi-pydantic2-sqlalchemy-playwright.md`)
|
|
178
|
+
3. From the "Codebase Specs" table, find the codebase spec path (e.g., BACKEND → `.devflow/context/spec/backend/BACKEND.md`)
|
|
179
|
+
4. From "Detailed Spec Packages", find the domain index (e.g., `.devflow/context/spec/backend/index.md`) and read the relevant layer specs it lists
|
|
180
180
|
|
|
181
|
-
The paths vary per project. `.context/spec/index.md` is the single source of truth for where specs live.
|
|
181
|
+
The paths vary per project. `.devflow/context/spec/index.md` is the single source of truth for where specs live.
|
|
182
182
|
|
|
183
183
|
For every MUST rule in the resolved spec files that applies to the layers you modified, either:
|
|
184
184
|
- Confirm the implementation satisfies it, with evidence; or
|
|
@@ -188,10 +188,10 @@ Preserve these generalized workflow rules from the project rule package when app
|
|
|
188
188
|
|
|
189
189
|
```yaml
|
|
190
190
|
## Spec Compliance Check
|
|
191
|
-
- Spec index: .context/spec/index.md
|
|
191
|
+
- Spec index: .devflow/context/spec/index.md
|
|
192
192
|
- Stack spec: stacks/python-fastapi-pydantic2-sqlalchemy-playwright.md
|
|
193
193
|
- Codebase spec: backend/BACKEND.md
|
|
194
|
-
- Code index evidence: `.planning/code-index/` checked or unavailable with reason
|
|
194
|
+
- Code index evidence: `.devflow/planning/code-index/` checked or unavailable with reason
|
|
195
195
|
- Depth spec files checked: service.md, errors.md
|
|
196
196
|
- MUST rules:
|
|
197
197
|
- "Do not expose secrets in error payloads" → ✅ satisfied (secrets stripped in response schema)
|
|
@@ -209,7 +209,7 @@ Preserve these generalized workflow rules from the project rule package when app
|
|
|
209
209
|
- A test strategy that caught real issues
|
|
210
210
|
- A decision rationale that future tasks should know
|
|
211
211
|
|
|
212
|
-
If yes, write to `.context/lessons/YYYY-MM-DD-{slug}.md` following existing lesson format. If no, skip.
|
|
212
|
+
If yes, write to `.devflow/context/lessons/YYYY-MM-DD-{slug}.md` following existing lesson format. If no, skip.
|
|
213
213
|
|
|
214
214
|
This applies to both positive patterns and regression prevention. Good practices deserve preservation as much as bug fixes.
|
|
215
215
|
|
|
@@ -228,7 +228,7 @@ Preserve these generalized workflow rules from the project rule package when app
|
|
|
228
228
|
<checkpoint_resume>
|
|
229
229
|
## 断点续传机制
|
|
230
230
|
|
|
231
|
-
执行前必须读取 `.planning/features/{功能名}/PROGRESS.md`,确定当前执行位置。
|
|
231
|
+
执行前必须读取 `.devflow/planning/features/{功能名}/PROGRESS.md`,确定当前执行位置。
|
|
232
232
|
|
|
233
233
|
### 续传流程
|
|
234
234
|
|
|
@@ -239,15 +239,15 @@ Preserve these generalized workflow rules from the project rule package when app
|
|
|
239
239
|
5. **更新进度**:每个任务完成后立即更新 PROGRESS.md(状态改为 `done`,记录完成时间戳)
|
|
240
240
|
6. **Wave 完成检查**:当前 Wave 所有任务 `done` 后,将执行指针移到下一 Wave
|
|
241
241
|
7. **全部完成**:所有 Wave 的 `done` 后,更新 PROGRESS.md 标记为 `completed`
|
|
242
|
-
8. **写入结构化元数据**:全部完成后写入 `.planning/features/{功能名}/PROGRESS.meta.json`,字段见 `feature-development.yaml` 中 `steps[execute].meta_output.fields`:`task_completed`, `task_total`, `build_passed`, `test_passed`。
|
|
242
|
+
8. **写入结构化元数据**:全部完成后写入 `.devflow/planning/features/{功能名}/PROGRESS.meta.json`,字段见 `feature-development.yaml` 中 `steps[execute].meta_output.fields`:`task_completed`, `task_total`, `build_passed`, `test_passed`。
|
|
243
243
|
|
|
244
244
|
### 清除上下文后续传
|
|
245
245
|
|
|
246
246
|
当会话上下文用尽或用户手动清除上下文后:
|
|
247
247
|
|
|
248
248
|
1. 用户重新调用 `workflow-execute-phase <功能名>`
|
|
249
|
-
2. 读取 `.planning/features/{功能名}/PROGRESS.md` 找到断点
|
|
250
|
-
3. 读取 `.planning/features/{功能名}/变更清单.md` 获取当前 Wave 任务详情
|
|
249
|
+
2. 读取 `.devflow/planning/features/{功能名}/PROGRESS.md` 找到断点
|
|
250
|
+
3. 读取 `.devflow/planning/features/{功能名}/变更清单.md` 获取当前 Wave 任务详情
|
|
251
251
|
4. 从断点继续执行,无需重读已完成的上下文
|
|
252
252
|
|
|
253
253
|
### 自包含任务要求
|
package/plugins/devflow-implementation/skills/workflow-execute-phase/references/execute-phase.md
CHANGED
|
@@ -69,7 +69,7 @@ execute-phase
|
|
|
69
69
|
→ workflow-release-closeout
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
`workflow-run-acceptance-tests` 只消费冻结的 `TC-*`。每个已确认验收条件都必须覆盖;异常、边界、权限、兼容和架构风险用例不能被主流程用例替代。验收结果保存在 `.planning/test-runs/{feature}/acceptance-results.json`。
|
|
72
|
+
`workflow-run-acceptance-tests` 只消费冻结的 `TC-*`。每个已确认验收条件都必须覆盖;异常、边界、权限、兼容和架构风险用例不能被主流程用例替代。验收结果保存在 `.devflow/planning/test-runs/{feature}/acceptance-results.json`。
|
|
73
73
|
|
|
74
74
|
只有当所有冻结 `TC-*` 已执行且通过、无 `failed`/`blocked`,且代码索引审计通过时,才允许进入 `workflow-release-closeout`。版本收口负责生成项目自己的里程碑收口记录并更新项目状态;它不生成旧式人工验收或独立验证报告。
|
|
75
75
|
|
|
@@ -14,7 +14,7 @@ autoloadSkills:
|
|
|
14
14
|
|
|
15
15
|
Act as a bounded read-only evidence collector, not a planner. Use the code index first, then make at most three targeted reads or searches needed to answer the assigned question. Do not inspect adjacent systems merely to be thorough.
|
|
16
16
|
|
|
17
|
-
Before using `read`, `grep`, or `devflow_code_index`, resolve the project root by walking upward from the runtime directory to the nearest `.devflow/project.json`, `.planning/code-index/index.sqlite`, or `.planning/PROJECT.md`. Treat nested directories such as `drama-ad/backend` as codebases, not Devflow project roots; `.planning` must always be resolved from the project root.
|
|
17
|
+
Before using `read`, `grep`, or `devflow_code_index`, resolve the project root by walking upward from the runtime directory to the nearest `.devflow/project.json`, `.devflow/planning/code-index/index.sqlite`, or `.devflow/planning/PROJECT.md`. Treat nested directories such as `drama-ad/backend` as codebases, not Devflow project roots; `.devflow/planning` must always be resolved from the project root.
|
|
18
18
|
|
|
19
19
|
If the index is missing, stale, fails validation, or has no useful hit, continue with a bounded `grep`/`rg` or LSP fallback over the registered codebase roots. Return `degraded_index_coverage` and the exact fallback scope; never present fallback relations as index facts.
|
|
20
20
|
|
|
@@ -26,19 +26,20 @@ function resolveSkillRoot(cwd: string): string {
|
|
|
26
26
|
/**
|
|
27
27
|
* Resolve the Devflow project root from the runtime directory. A codebase
|
|
28
28
|
* (for example `drama-ad/backend`) may be nested below the project root;
|
|
29
|
-
* `.planning` belongs to the nearest ancestor project, never to the codebase
|
|
29
|
+
* `.devflow/planning` belongs to the nearest ancestor project, never to the codebase
|
|
30
30
|
* directory itself.
|
|
31
31
|
*/
|
|
32
32
|
function resolveProjectRoot(cwd: string): string {
|
|
33
33
|
let current = path.resolve(cwd);
|
|
34
34
|
while (true) {
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
if (existsSync(path.join(current, ".devflow", "project.json"))) return current;
|
|
36
|
+
const parent = path.dirname(current);
|
|
37
|
+
if (parent === current) break;
|
|
38
|
+
current = parent;
|
|
39
|
+
}
|
|
40
|
+
current = path.resolve(cwd);
|
|
41
|
+
while (true) {
|
|
42
|
+
if (existsSync(path.join(current, ".git"))) return current;
|
|
42
43
|
const parent = path.dirname(current);
|
|
43
44
|
if (parent === current) break;
|
|
44
45
|
current = parent;
|
|
@@ -101,7 +102,7 @@ export default function devflowIntel(pi: ExtensionAPI) {
|
|
|
101
102
|
}),
|
|
102
103
|
approval: (args) => {
|
|
103
104
|
const action = (args as { action?: string }).action;
|
|
104
|
-
// scan 写 .planning/code-index,按 exec 询问;validate/audit/query 只读,免确认。
|
|
105
|
+
// scan 写 .devflow/planning/code-index,按 exec 询问;validate/audit/query 只读,免确认。
|
|
105
106
|
return ["scan", "domain-import"].includes(action ?? "") ? "exec" : "read";
|
|
106
107
|
},
|
|
107
108
|
async execute(_id, params, _signal, _onUpdate, ctx) {
|
|
@@ -110,26 +111,26 @@ export default function devflowIntel(pi: ExtensionAPI) {
|
|
|
110
111
|
const script = path.join(skillRoot, "workflow-code-index/scripts/code_index.py");
|
|
111
112
|
const args = ["python3", script, params.action];
|
|
112
113
|
if (params.action === "scan") {
|
|
113
|
-
args.push("--root", projectRoot, "--output", ".planning/code-index");
|
|
114
|
+
args.push("--root", projectRoot, "--output", ".devflow/planning/code-index");
|
|
114
115
|
if (params.changedFiles.length > 0) args.push("--changed-files", ...params.changedFiles);
|
|
115
116
|
} else if (params.action === "validate") {
|
|
116
|
-
args.push("--index", ".planning/code-index");
|
|
117
|
+
args.push("--index", ".devflow/planning/code-index");
|
|
117
118
|
args.push("--level", params.validationLevel);
|
|
118
119
|
if (params.snapshot) args.push("--snapshot", params.snapshot);
|
|
119
120
|
} else if (params.action === "audit") {
|
|
120
|
-
args.push("--root", projectRoot, "--index", ".planning/code-index", "--skill-root", skillRoot);
|
|
121
|
+
args.push("--root", projectRoot, "--index", ".devflow/planning/code-index", "--skill-root", skillRoot);
|
|
121
122
|
args.push("--level", params.validationLevel === "fast" ? "publish" : params.validationLevel);
|
|
122
123
|
if (params.snapshot) args.push("--snapshot", params.snapshot);
|
|
123
124
|
} else if (params.action === "query") {
|
|
124
125
|
if (!params.term) {
|
|
125
126
|
return render({ ok: false, exitCode: 2, stdout: "", stderr: "term is required" }, {});
|
|
126
127
|
}
|
|
127
|
-
args.push("--index", ".planning/code-index", "--term", params.term, "--limit", String(params.limit));
|
|
128
|
+
args.push("--index", ".devflow/planning/code-index", "--term", params.term, "--limit", String(params.limit));
|
|
128
129
|
if (params.snapshot) args.push("--snapshot", params.snapshot);
|
|
129
130
|
} else {
|
|
130
131
|
if (params.action === "search-content") {
|
|
131
132
|
if (!params.term) return render({ ok: false, exitCode: 2, stdout: "", stderr: "term is required" }, {});
|
|
132
|
-
args.push("--index", ".planning/code-index", "--term", params.term, "--limit", String(params.limit));
|
|
133
|
+
args.push("--index", ".devflow/planning/code-index", "--term", params.term, "--limit", String(params.limit));
|
|
133
134
|
args.push("--project-id", params.projectId);
|
|
134
135
|
args.push("--match-kind", params.matchKind === "phrase" ? "exact_phrase" : params.matchKind);
|
|
135
136
|
if (params.repository) args.push("--repository", params.repository);
|
|
@@ -138,14 +139,14 @@ export default function devflowIntel(pi: ExtensionAPI) {
|
|
|
138
139
|
return render(await run(args, projectRoot), { action: params.action, projectRoot });
|
|
139
140
|
} else if (params.action === "resolve-domain") {
|
|
140
141
|
if (!params.term) return render({ ok: false, exitCode: 2, stdout: "", stderr: "term is required" }, {});
|
|
141
|
-
args.push("--index", ".planning/code-index", "--term", params.term, "--project-id", params.projectId, "--limit", String(params.limit));
|
|
142
|
+
args.push("--index", ".devflow/planning/code-index", "--term", params.term, "--project-id", params.projectId, "--limit", String(params.limit));
|
|
142
143
|
if (params.mappingRevision) args.push("--mapping-revision", params.mappingRevision);
|
|
143
144
|
return render(await run(args, projectRoot), { action: params.action, projectRoot });
|
|
144
145
|
} else if (params.action === "query-plan") {
|
|
145
146
|
if (!params.plan) return render({ ok: false, exitCode: 2, stdout: "", stderr: "plan is required" }, {});
|
|
146
147
|
const plan = { ...params.plan };
|
|
147
148
|
if (plan.limit === undefined) plan.limit = params.limit;
|
|
148
|
-
args.push("--index", ".planning/code-index", "--project-id", params.projectId, "--plan", JSON.stringify(plan));
|
|
149
|
+
args.push("--index", ".devflow/planning/code-index", "--project-id", params.projectId, "--plan", JSON.stringify(plan));
|
|
149
150
|
if (params.snapshot) args.push("--snapshot", params.snapshot);
|
|
150
151
|
return render(await run(args, projectRoot), { action: params.action, projectRoot });
|
|
151
152
|
} else if (params.action === "domain-import") {
|
|
@@ -154,7 +155,7 @@ export default function devflowIntel(pi: ExtensionAPI) {
|
|
|
154
155
|
const bundlePath = path.join(bundleDir, "bundle.json");
|
|
155
156
|
try {
|
|
156
157
|
writeFileSync(bundlePath, JSON.stringify(params.bundle), { encoding: "utf8", mode: 0o600 });
|
|
157
|
-
args.push("--index", ".planning/code-index", "--project-id", params.projectId, "--bundle", bundlePath);
|
|
158
|
+
args.push("--index", ".devflow/planning/code-index", "--project-id", params.projectId, "--bundle", bundlePath);
|
|
158
159
|
if (params.expectedRevision) args.push("--expected-revision", params.expectedRevision);
|
|
159
160
|
return render(await run(args, projectRoot), { action: params.action, projectRoot });
|
|
160
161
|
} finally {
|
|
@@ -163,13 +164,13 @@ export default function devflowIntel(pi: ExtensionAPI) {
|
|
|
163
164
|
}
|
|
164
165
|
if (params.action === "impact") {
|
|
165
166
|
if (!params.entity) return render({ ok: false, exitCode: 2, stdout: "", stderr: "entity is required" }, {});
|
|
166
|
-
args.push("--index", ".planning/code-index", "--entity", params.entity, "--depth", String(params.depth), "--limit", String(params.limit));
|
|
167
|
+
args.push("--index", ".devflow/planning/code-index", "--entity", params.entity, "--depth", String(params.depth), "--limit", String(params.limit));
|
|
167
168
|
if (params.snapshot) args.push("--snapshot", params.snapshot);
|
|
168
169
|
if (params.changeType) args.push("--change-type", params.changeType);
|
|
169
170
|
return render(await run(args, projectRoot), { action: params.action, projectRoot });
|
|
170
171
|
}
|
|
171
172
|
if (!params.object) return render({ ok: false, exitCode: 2, stdout: "", stderr: "object is required" }, {});
|
|
172
|
-
args.push("--index", ".planning/code-index", "--object", params.object, "--depth", String(params.depth), "--limit", String(params.limit));
|
|
173
|
+
args.push("--index", ".devflow/planning/code-index", "--object", params.object, "--depth", String(params.depth), "--limit", String(params.limit));
|
|
173
174
|
args.push("--direction", params.direction);
|
|
174
175
|
if (params.snapshot) args.push("--snapshot", params.snapshot);
|
|
175
176
|
if (params.includeHeuristic) args.push("--include-heuristic");
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: code-index-query
|
|
3
|
-
description: Query a generated .planning/code-index machine index to answer code structure questions. Use when the OMP development agent needs callers, callees, entrypoint flows, imports, resource reads/writes, tested_by links, or symbol locations before reading source evidence.
|
|
3
|
+
description: Query a generated .devflow/planning/code-index machine index to answer code structure questions. Use when the OMP development agent needs callers, callees, entrypoint flows, imports, resource reads/writes, tested_by links, or symbol locations before reading source evidence.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Code Index Query
|
|
7
7
|
|
|
8
|
-
Use this skill to answer source-structure questions from `.planning/code-index/`.
|
|
8
|
+
Use this skill to answer source-structure questions from `.devflow/planning/code-index/`.
|
|
9
9
|
|
|
10
10
|
## Project-root resolution
|
|
11
11
|
|
|
12
12
|
The runtime directory may be a nested codebase such as `drama-ad/backend`. Before checking the index, resolve the project root from the runtime directory using the same rule as project initialization:
|
|
13
13
|
|
|
14
14
|
1. Walk upward from the runtime directory and select the nearest ancestor containing `.devflow/project.json`.
|
|
15
|
-
2. If no manifest exists, select the nearest ancestor containing `.planning/code-index/index.sqlite` or `.planning/PROJECT.md`.
|
|
15
|
+
2. If no manifest exists, select the nearest ancestor containing `.devflow/planning/code-index/index.sqlite` or `.devflow/planning/PROJECT.md`.
|
|
16
16
|
3. Only if neither exists, use the runtime directory and report that the project root is uninitialized.
|
|
17
17
|
|
|
18
|
-
All index checks and `devflow_code_index` calls must run with that resolved root as the working directory. Source paths remain relative to the resolved root, so a source file may be `drama-ad/backend/...` while the index remains `.planning/code-index/...`. Never append `.planning` to a selected source/codebase directory.
|
|
18
|
+
All index checks and `devflow_code_index` calls must run with that resolved root as the working directory. Source paths remain relative to the resolved root, so a source file may be `drama-ad/backend/...` while the index remains `.devflow/planning/code-index/...`. Never append `.devflow/planning` to a selected source/codebase directory.
|
|
19
19
|
|
|
20
|
-
The tool returns the resolved `projectRoot` in its details. If the root cannot be resolved, stop and report the exact check command/path instead of probing `<source-dir>/.planning`.
|
|
20
|
+
The tool returns the resolved `projectRoot` in its details. If the root cannot be resolved, stop and report the exact check command/path instead of probing `<source-dir>/.devflow/planning`.
|
|
21
21
|
|
|
22
22
|
If the index is missing, stale, fails validation, or returns no useful hit, do not block the source question. Record the machine failure and use a bounded `rg`/`grep` or LSP search within the registered codebase roots. Mark the result `degraded_index_coverage` and include the exact fallback scope; do not claim index-derived relations or complete impact coverage.
|
|
23
23
|
|
|
24
24
|
## Required Flow
|
|
25
25
|
|
|
26
|
-
1. Check that `.planning/code-index/index.sqlite` or JSONL sidecars exist.
|
|
26
|
+
1. Check that `.devflow/planning/code-index/index.sqlite` or JSONL sidecars exist.
|
|
27
27
|
2. Search symbols or relations using the machine index.
|
|
28
28
|
3. Expand relation edges as needed.
|
|
29
29
|
4. Read source files at `evidence_path`.
|
|
@@ -11,17 +11,17 @@ Build a generic code intelligence index for the current project. This skill is p
|
|
|
11
11
|
|
|
12
12
|
Write generated artifacts to the target project:
|
|
13
13
|
|
|
14
|
-
- `.planning/code-index/files.jsonl`
|
|
15
|
-
- `.planning/code-index/symbols.jsonl`
|
|
16
|
-
- `.planning/code-index/relations.jsonl`
|
|
17
|
-
- `.planning/code-index/diagnostics.jsonl`
|
|
18
|
-
- `.planning/code-index/index.sqlite`
|
|
19
|
-
- `.planning/code-index/INDEX.md`
|
|
20
|
-
- `.planning/code-index/SYMBOLS.md`
|
|
21
|
-
- `.planning/code-index/RELATIONS.md`
|
|
22
|
-
- `.planning/code-index/ENTRYPOINTS.md`
|
|
23
|
-
- `.planning/code-index/DATAFLOW.md`
|
|
24
|
-
- `.planning/code-index/AUDIT.md` when auditing
|
|
14
|
+
- `.devflow/planning/code-index/files.jsonl`
|
|
15
|
+
- `.devflow/planning/code-index/symbols.jsonl`
|
|
16
|
+
- `.devflow/planning/code-index/relations.jsonl`
|
|
17
|
+
- `.devflow/planning/code-index/diagnostics.jsonl`
|
|
18
|
+
- `.devflow/planning/code-index/index.sqlite`
|
|
19
|
+
- `.devflow/planning/code-index/INDEX.md`
|
|
20
|
+
- `.devflow/planning/code-index/SYMBOLS.md`
|
|
21
|
+
- `.devflow/planning/code-index/RELATIONS.md`
|
|
22
|
+
- `.devflow/planning/code-index/ENTRYPOINTS.md`
|
|
23
|
+
- `.devflow/planning/code-index/DATAFLOW.md`
|
|
24
|
+
- `.devflow/planning/code-index/AUDIT.md` when auditing
|
|
25
25
|
|
|
26
26
|
Markdown is a display layer only. JSONL/SQLite is the machine fact layer.
|
|
27
27
|
|
|
@@ -69,7 +69,7 @@ devflow_code_index(action="scan", changedFiles=["path/to/file.ext"])
|
|
|
69
69
|
|
|
70
70
|
## Audit Gate
|
|
71
71
|
|
|
72
|
-
`audit` is part of this skill's normal lifecycle, not a separate workflow. Run `validate` before `audit` whenever index files were edited or refreshed, then review `.planning/code-index/AUDIT.md` against `references/audit-checklist.md`.
|
|
72
|
+
`audit` is part of this skill's normal lifecycle, not a separate workflow. Run `validate` before `audit` whenever index files were edited or refreshed, then review `.devflow/planning/code-index/AUDIT.md` against `references/audit-checklist.md`.
|
|
73
73
|
|
|
74
74
|
Blocking findings are stale file hashes, missing indexed files, dangling `to_id` relations, missing relation evidence, and invalid schema. Unresolved heuristic calls, low-confidence diagnostics, and possible project-bound examples in generic skills are non-blocking but must be reported.
|
|
75
75
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Discover codebases in this order:
|
|
4
4
|
|
|
5
5
|
1. Explicit CLI arguments: `--codebase name:path[:type]`.
|
|
6
|
-
2. `.planning/navigation/INDEX.md` Codebase Registry.
|
|
7
|
-
3. `.context/spec/index.md` codebase mapping.
|
|
6
|
+
2. `.devflow/planning/navigation/INDEX.md` Codebase Registry.
|
|
7
|
+
3. `.devflow/context/spec/index.md` codebase mapping.
|
|
8
8
|
4. Current working directory fallback.
|
|
9
9
|
|
|
10
10
|
Normalize each codebase to:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Query flow:
|
|
4
4
|
|
|
5
5
|
1. Load project rules and navigation if present.
|
|
6
|
-
2. Check `.planning/code-index/index.sqlite` or JSONL sidecars.
|
|
6
|
+
2. Check `.devflow/planning/code-index/index.sqlite` or JSONL sidecars.
|
|
7
7
|
3. Search symbols using exact name, qualified name, path, or FTS.
|
|
8
8
|
4. Expand relations by type and depth.
|
|
9
9
|
5. Read source files at `evidence_path`.
|