@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.
Files changed (156) hide show
  1. package/README.md +6 -6
  2. package/package.json +1 -1
  3. package/plugins/devflow-core/extensions/devflow-core.ts +87 -33
  4. package/plugins/devflow-core/runtime/hooks/context_sync_gate.py +3 -3
  5. package/plugins/devflow-core/runtime/hooks/hook_common.py +65 -11
  6. package/plugins/devflow-core/runtime/hooks/start.py +13 -13
  7. package/plugins/devflow-core/skills/wireframe-proposal/SKILL.md +2 -2
  8. package/plugins/devflow-core/skills/wireframe-validate/SKILL.md +4 -4
  9. package/plugins/devflow-core/skills/workflow-orchestrator/SKILL.md +19 -19
  10. package/plugins/devflow-core/skills/workflow-orchestrator/agents/openai.yaml +2 -2
  11. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/acceptance_test_runner.py +5 -5
  12. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/advance_state.rb +9 -9
  13. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/api_test_matrix.py +2 -2
  14. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_assessment.rb +1 -1
  15. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_brief.rb +1 -1
  16. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_feasibility.rb +1 -1
  17. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_invalidation.rb +5 -5
  18. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_model_commit.rb +4 -4
  19. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_model_validate.py +1 -1
  20. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_source_resolver.rb +4 -4
  21. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/checker_adapter.rb +7 -7
  22. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/control_io.rb +51 -7
  23. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/cross_track_consistency_check.rb +1 -1
  24. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/execution_contract.rb +6 -6
  25. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/gate_runtime.rb +3 -3
  26. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_state.rb +5 -5
  27. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_workflow.rb +5 -5
  28. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/inspect_state.rb +13 -13
  29. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/machine_evidence.rb +3 -3
  30. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/manage_lessons.rb +7 -7
  31. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/parallel_recover.rb +2 -2
  32. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/parallel_run.rb +3 -3
  33. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/phase_ownership.rb +6 -6
  34. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/repair_control_plane.rb +1 -1
  35. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/requirement_coverage.rb +1 -1
  36. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/requirement_graph.rb +3 -3
  37. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_preflight.py +3 -3
  38. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_run.py +18 -18
  39. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/runtime_context_collector.rb +3 -3
  40. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/session_rollover.rb +4 -4
  41. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/static_runtime_context_collector.rb +2 -2
  42. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/sync_artifacts.rb +5 -5
  43. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/tdd_evidence.py +3 -3
  44. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/test_command_policy.py +2 -2
  45. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/test_task_binding_check.py +3 -3
  46. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/update_triage_route.rb +3 -3
  47. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/validate_state.rb +6 -6
  48. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_commit.rb +5 -5
  49. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_validate.py +1 -1
  50. package/plugins/devflow-core/skills/workflow-orchestrator/templates/acceptance-remediation.yaml +12 -12
  51. package/plugins/devflow-core/skills/workflow-orchestrator/templates/feature-development.yaml +205 -205
  52. package/plugins/devflow-core/skills/workflow-pipeline/SKILL.md +3 -3
  53. package/plugins/devflow-core/skills/workflow-pipeline/references/pipeline-flow.md +10 -10
  54. package/plugins/devflow-core/skills/workflow-project-context/SKILL.md +14 -14
  55. package/plugins/devflow-core/skills/workflow-project-context/assets/agents-md-template.md +7 -7
  56. package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-backend-spec-template.md +4 -4
  57. package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-frontend-spec-template.md +4 -4
  58. package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-navigation-template.md +1 -1
  59. package/plugins/devflow-core/skills/workflow-project-context/assets/context-domain-index-template.md +4 -4
  60. package/plugins/devflow-core/skills/workflow-project-context/assets/context-spec-index-template.md +10 -10
  61. package/plugins/devflow-core/skills/workflow-project-context/assets/execution-contract-template.md +2 -2
  62. package/plugins/devflow-core/skills/workflow-project-context/assets/navigation-index-template.md +18 -18
  63. package/plugins/devflow-core/skills/workflow-project-context/assets/project-initialization-template.md +32 -32
  64. package/plugins/devflow-core/skills/workflow-project-context/assets/rules-index-template.md +30 -30
  65. package/plugins/devflow-core/skills/workflow-project-context/assets/state-template.md +7 -7
  66. package/plugins/devflow-core/skills/workflow-project-context/references/navigation-guide.md +37 -37
  67. package/plugins/devflow-core/skills/workflow-project-context/scripts/validate_initialization.py +16 -16
  68. package/plugins/devflow-design/skills/workflow-api-call-guide/SKILL.md +4 -4
  69. package/plugins/devflow-design/skills/workflow-api-contract/SKILL.md +8 -8
  70. package/plugins/devflow-design/skills/workflow-api-supplement/SKILL.md +5 -5
  71. package/plugins/devflow-design/skills/workflow-architecture-feasibility/SKILL.md +1 -1
  72. package/plugins/devflow-design/skills/workflow-backend-tech-spec/SKILL.md +39 -39
  73. package/plugins/devflow-design/skills/workflow-backend-tech-spec/assets/backend-spec-template.md +10 -10
  74. package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/affected-module-exploration.md +2 -2
  75. package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/code-explore-guide.md +1 -1
  76. package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/project-rule-contract.md +20 -20
  77. package/plugins/devflow-design/skills/workflow-design-rule-pack/SKILL.md +8 -8
  78. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/index.md +3 -3
  79. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/accessibility.md +2 -2
  80. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/component-library.md +2 -2
  81. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/design-systems.md +1 -1
  82. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/responsive-grid.md +2 -2
  83. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/stack-guidelines.md +6 -6
  84. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/ux-patterns.md +2 -2
  85. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tokens/project-tokens.md +1 -1
  86. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/SKILL.md +12 -12
  87. package/plugins/devflow-design/skills/workflow-design-rule-pack/scripts/install.py +2 -2
  88. package/plugins/devflow-design/skills/workflow-feature-breakdown/SKILL.md +30 -30
  89. package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/output-template.md +2 -2
  90. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/SKILL.md +41 -41
  91. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/assets/frontend-spec-template.md +15 -15
  92. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/affected-module-exploration.md +2 -2
  93. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/project-rule-contract.md +25 -25
  94. package/plugins/devflow-design/skills/workflow-integration-verify/SKILL.md +13 -13
  95. package/plugins/devflow-design/skills/workflow-ui-spec/SKILL.md +23 -23
  96. package/plugins/devflow-design/skills/workflow-ui-spec/assets/ui-spec-template.md +3 -3
  97. package/plugins/devflow-implementation/agents/implementation-worker.md +2 -2
  98. package/plugins/devflow-implementation/skills/workflow-bug-fix/SKILL.md +9 -9
  99. package/plugins/devflow-implementation/skills/workflow-bug-fix/references/lesson-format.md +2 -2
  100. package/plugins/devflow-implementation/skills/workflow-bug-fix/references/root-cause-ladder.md +1 -1
  101. package/plugins/devflow-implementation/skills/workflow-change-plan/SKILL.md +17 -17
  102. package/plugins/devflow-implementation/skills/workflow-change-plan/references/code-conventions.md +1 -1
  103. package/plugins/devflow-implementation/skills/workflow-change-plan/references/output-template.md +3 -3
  104. package/plugins/devflow-implementation/skills/workflow-change-plan/references/project-rule-contract.md +16 -16
  105. package/plugins/devflow-implementation/skills/workflow-execute-phase/SKILL.md +38 -38
  106. package/plugins/devflow-implementation/skills/workflow-execute-phase/references/execute-phase.md +1 -1
  107. package/plugins/devflow-intel/agents/project-scout.md +1 -1
  108. package/plugins/devflow-intel/extensions/devflow-intel.ts +20 -19
  109. package/plugins/devflow-intel/skills/code-index-query/SKILL.md +6 -6
  110. package/plugins/devflow-intel/skills/workflow-code-index/SKILL.md +12 -12
  111. package/plugins/devflow-intel/skills/workflow-code-index/references/discovery.md +2 -2
  112. package/plugins/devflow-intel/skills/workflow-code-index/references/query-guide.md +1 -1
  113. package/plugins/devflow-intel/skills/workflow-code-index/scripts/code_index.py +8 -8
  114. package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/discovery.py +2 -2
  115. package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/scanner.py +4 -1
  116. package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/project_binding_check.py +4 -4
  117. package/plugins/devflow-intel/skills/workflow-context-sync/SKILL.md +14 -14
  118. package/plugins/devflow-intel/skills/workflow-context-sync/scripts/context_sync_cursor.py +2 -2
  119. package/plugins/devflow-intel/skills/workflow-update-navigation/SKILL.md +26 -26
  120. package/plugins/devflow-intel/skills/workflow-update-navigation/references/incremental-update-guide.md +2 -2
  121. package/plugins/devflow-quality/skills/code-review/SKILL.md +12 -12
  122. package/plugins/devflow-quality/skills/code-review/references/spec-checklist.md +1 -1
  123. package/plugins/devflow-quality/skills/workflow-acceptance-test-design/SKILL.md +8 -8
  124. package/plugins/devflow-quality/skills/workflow-gen-test-guide/SKILL.md +6 -6
  125. package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/SKILL.md +14 -14
  126. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/SKILL.md +23 -23
  127. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/codebase-discovery.md +9 -9
  128. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/project-dsl-contract.md +1 -1
  129. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/compile_dsl.py +2 -2
  130. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/discover_codebases.py +2 -2
  131. package/plugins/devflow-quality/skills/workflow-release-closeout/SKILL.md +15 -15
  132. package/plugins/devflow-quality/skills/workflow-run-acceptance-tests/SKILL.md +5 -5
  133. package/plugins/devflow-requirements/skills/requirement-feasibility-review/SKILL.md +1 -1
  134. package/plugins/devflow-requirements/skills/workflow-demand-clarify/SKILL.md +10 -10
  135. package/plugins/devflow-requirements/skills/workflow-domain-modeling/SKILL.md +25 -25
  136. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/SKILL.md +49 -49
  137. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/assets/baseline-template.md +22 -22
  138. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/antipatterns.md +3 -3
  139. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/challenge-review-guide.md +3 -3
  140. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/project-context-guide.md +11 -11
  141. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/questioning.md +1 -1
  142. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/requirement-review-checklist.md +4 -4
  143. package/plugins/devflow-requirements/skills/workflow-requirement-triage/SKILL.md +16 -16
  144. package/plugins/devflow-requirements/skills/workflow-wayfinder/SKILL.md +6 -6
  145. package/src/cli.ts +15 -0
  146. package/src/constants.ts +1 -1
  147. package/src/initialization-store.ts +3 -2
  148. package/src/project-context.ts +36 -14
  149. package/src/project-documents.ts +61 -61
  150. package/src/project-initializer.ts +9 -8
  151. package/src/project-layout.ts +217 -0
  152. package/src/runtime.ts +3 -3
  153. package/templates/commands/start.md +4 -4
  154. package/templates/omp/AGENTS.md +1 -1
  155. package/templates/omp/hook-config.json +7 -7
  156. package/templates/omp/index-policy.json +8 -8
@@ -12,31 +12,31 @@ argument-hint: <功能名>
12
12
  user-invocable: true
13
13
  pattern: generator+tool-wrapper
14
14
  inputs:
15
- - .planning/features/{功能名}/功能点梳理.md
16
- - .planning/features/{功能名}/UI-SPEC.md
17
- - .planning/features/{功能名}/architecture-brief.md
18
- - .planning/features/{功能名}/architecture-brief.meta.json
19
- - .planning/requirements/baseline.md
20
- - .planning/PROJECT.md
21
- - .planning/navigation/INDEX.md
22
- - .planning/rules/INDEX.md
23
- - .planning/execution-contract.md
24
- - .planning/toolchain.md
25
- - .planning/lessons/README.md
26
- - .context/spec/index.md
27
- - .context/spec/stacks/
28
- - .context/spec/frontend/index.md
29
- - .context/spec/frontend/
30
- - .context/spec/design/
31
- - .context/workflow/
32
- - .context/lessons/README.md(如存在)
15
+ - .devflow/planning/features/{功能名}/功能点梳理.md
16
+ - .devflow/planning/features/{功能名}/UI-SPEC.md
17
+ - .devflow/planning/features/{功能名}/architecture-brief.md
18
+ - .devflow/planning/features/{功能名}/architecture-brief.meta.json
19
+ - .devflow/planning/requirements/baseline.md
20
+ - .devflow/planning/PROJECT.md
21
+ - .devflow/planning/navigation/INDEX.md
22
+ - .devflow/planning/rules/INDEX.md
23
+ - .devflow/planning/execution-contract.md
24
+ - .devflow/planning/toolchain.md
25
+ - .devflow/planning/lessons/README.md
26
+ - .devflow/context/spec/index.md
27
+ - .devflow/context/spec/stacks/
28
+ - .devflow/context/spec/frontend/index.md
29
+ - .devflow/context/spec/frontend/
30
+ - .devflow/context/spec/design/
31
+ - .devflow/context/workflow/
32
+ - .devflow/context/lessons/README.md(如存在)
33
33
  - references/frontend-stack-slots/common-web.md
34
34
  - references/frontend-stack-slots/react.md
35
35
  - references/frontend-stack-slots/next.md
36
36
  - references/frontend-stack-slots/vue.md
37
- - .planning/milestones/
37
+ - .devflow/planning/milestones/
38
38
  - references/affected-module-exploration.md
39
- output: .planning/features/{功能名}/前端技术方案.md
39
+ output: .devflow/planning/features/{功能名}/前端技术方案.md
40
40
  allowed-tools:
41
41
  - Read
42
42
  - Write
@@ -51,7 +51,7 @@ allowed-tools:
51
51
 
52
52
  ## 需求追溯硬约束
53
53
 
54
- 读取 `.planning/requirements/{feature}/traceability.json`。每个页面、状态流、缓存/竞态处理和接口调用必须列出 `覆盖 REQ: REQ-*`;API 调用必须写请求参数、响应消费、错误处理和行为语义,不能只列响应字段或视觉改动。
54
+ 读取 `.devflow/planning/requirements/{feature}/traceability.json`。每个页面、状态流、缓存/竞态处理和接口调用必须列出 `覆盖 REQ: REQ-*`;API 调用必须写请求参数、响应消费、错误处理和行为语义,不能只列响应字段或视觉改动。
55
55
 
56
56
  根据需求基线和前端现有代码,生成前端技术方案文档。
57
57
 
@@ -63,25 +63,25 @@ allowed-tools:
63
63
 
64
64
  ### 第一阶段:理解需求
65
65
 
66
- 1. 读取 `.planning/requirements/baseline.md` 理解需求
67
- 2. 读取 `.planning/PROJECT.md` 了解项目上下文
66
+ 1. 读取 `.devflow/planning/requirements/baseline.md` 理解需求
67
+ 2. 读取 `.devflow/planning/PROJECT.md` 了解项目上下文
68
68
  3. 如果 baseline.md 不存在,询问用户提供需求
69
- 4. 读取 `references/project-rule-contract.md`,按 Spec Read Contract 发现并加载目标项目的前端规则包:`.planning/rules/INDEX.md` → `.context/spec/index.md` → 命中的 stack spec → 命中的 frontend codebase spec → navigation → code-index(如存在且需要关系事实)→ 源码
70
- 5. 若 `.context/spec/design/index.md` 不存在,先调用 `devflow_design_rule(args=[])` 安装共享设计规则包;若仍不存在,记录“未发现设计规则包”并继续。
71
- 6. 若存在 `.context/spec/design/index.md`,读取设计规则入口。只把用户拍板、设计稿事实、现有项目规范、项目级已确认 token 作为实现依据;`.context/spec/design/recommendations/` 与 `ui-ux-pro-max` 查询结果只能补充实现注意点、风险、测试门禁或待确认事项。
69
+ 4. 读取 `references/project-rule-contract.md`,按 Spec Read Contract 发现并加载目标项目的前端规则包:`.devflow/planning/rules/INDEX.md` → `.devflow/context/spec/index.md` → 命中的 stack spec → 命中的 frontend codebase spec → navigation → code-index(如存在且需要关系事实)→ 源码
70
+ 5. 若 `.devflow/context/spec/design/index.md` 不存在,先调用 `devflow_design_rule(args=[])` 安装共享设计规则包;若仍不存在,记录“未发现设计规则包”并继续。
71
+ 6. 若存在 `.devflow/context/spec/design/index.md`,读取设计规则入口。只把用户拍板、设计稿事实、现有项目规范、项目级已确认 token 作为实现依据;`.devflow/context/spec/design/recommendations/` 与 `ui-ux-pro-max` 查询结果只能补充实现注意点、风险、测试门禁或待确认事项。
72
72
  7. 按 `references/project-rule-contract.md` 的 Stack Slot Loading 规则加载前端技术栈插槽:始终读取 `common-web.md`,再按技术栈读取 React / Next.js / Vue 插槽
73
73
  8. 读取 baseline 的 `反向审视与用户拍板`、`待确认事项`、`下游输入契约`:
74
74
  - 已确认的页面/交互/复用/替代方案决策必须进入前端方案
75
75
  - 影响 scope、交互语义、组件归属、兼容性或实现成本的未确认项,不得被当成已确认需求
76
76
  - 若未确认项阻塞前端方案,询问用户;`--auto` 或无法询问时写入待确认事项和风险
77
- 9. 读取 `.planning/features/{功能名}/architecture-brief.md` 和 `.meta.json`,在文档开头记录消费的 `brief_revision`、`graph_revision` 和 `static_context_snapshot_revision`。只有 `comparison_status=confirmed` 的架构选择可改变请求编排、缓存、轮询或异步交互;未确认/未决项必须保留为风险或待确认事项。
77
+ 9. 读取 `.devflow/planning/features/{功能名}/architecture-brief.md` 和 `.meta.json`,在文档开头记录消费的 `brief_revision`、`graph_revision` 和 `static_context_snapshot_revision`。只有 `comparison_status=confirmed` 的架构选择可改变请求编排、缓存、轮询或异步交互;未确认/未决项必须保留为风险或待确认事项。
78
78
  10. 若 baseline 或 `功能点梳理.md` 包含 `SL-*` 切片计划,读取 `skill://workflow-pipeline/references/slice-safety-guide.md`,只为当前执行切片生成前端方案。后置切片只可作为依赖上下文或后续范围,不得生成路由、组件或 API 调用实现设计。
79
79
 
80
80
  ### 第二阶段:探索现有前端代码
81
81
 
82
82
  1. **读取 PROJECT.md 的 Project Layout 章节**,确定前端代码所在目录
83
- 2. 按 `references/project-rule-contract.md` 的顺序读取项目规则包,优先使用 `.planning/rules/INDEX.md` 和 `.context/spec/index.md` 匹配 stack/codebase spec,兼容 `.context/spec/frontend/`、`.context/spec/design/`、`.context/workflow/`、`.context/lessons/` 和根目录 `AGENTS.md` / `CLAUDE.md`
84
- 3. 若 `.planning/code-index/` 存在,用 Symbol Index 和 Relation Graph 查询相关页面、路由、组件、store/hook、API client、imports/calls,并回读 `evidence_path:evidence_line`
83
+ 2. 按 `references/project-rule-contract.md` 的顺序读取项目规则包,优先使用 `.devflow/planning/rules/INDEX.md` 和 `.devflow/context/spec/index.md` 匹配 stack/codebase spec,兼容 `.devflow/context/spec/frontend/`、`.devflow/context/spec/design/`、`.devflow/context/workflow/`、`.devflow/context/lessons/` 和根目录 `AGENTS.md` / `CLAUDE.md`
84
+ 3. 若 `.devflow/planning/code-index/` 存在,用 Symbol Index 和 Relation Graph 查询相关页面、路由、组件、store/hook、API client、imports/calls,并回读 `evidence_path:evidence_line`
85
85
  4. 识别前端项目结构(页面/组件/路由/Store)
86
86
  5. 查找 API 调用层的封装模式;优先使用 code-index 的 calls/imports/routes_to 关系,缺失时再按导航和源码兜底
87
87
  6. **分析接口调用压力**:梳理每个页面/操作的 API 调用次数、并发数、请求瀑布、是否存在冗余或可合并的请求;识别已有防抖/节流/缓存/竞态处理策略
@@ -90,11 +90,11 @@ allowed-tools:
90
90
  9. 识别技术栈插槽:React、Next.js、Vue 或仅 Common Web,并记录未覆盖的框架为待确认/待扩展
91
91
  10. 检查三层复用机会:已有页面/组件/交互模式、已有依赖/库、项目设计系统或代码模式;与 baseline 的复用决策保持一致
92
92
  11. **执行被影响方探索**:读取 `references/affected-module-exploration.md`,对 baseline 第8.2节"关联历史功能/模块"表格列出的每个受影响的前端页面/组件,按清单逐项读取源码并产出:现有 props/emits/methods/API 调用清单、现有数据流和交互方式、保留/分支/抽离/新增决策。探索产出直接填入输出文档的"影响范围"章节和组件树。**探索产出检查不通过,不得进入 Phase 3。**
93
- 12. 如 `.context/spec/design/tools/ui-ux-pro-max/scripts/search.py` 存在,可按当前技术栈和 UI 场景补充查询:
93
+ 12. 如 `.devflow/context/spec/design/tools/ui-ux-pro-max/scripts/search.py` 存在,可按当前技术栈和 UI 场景补充查询:
94
94
  ```bash
95
- python3 .context/spec/design/tools/ui-ux-pro-max/scripts/search.py "layout form table accessibility performance" --stack react
96
- python3 .context/spec/design/tools/ui-ux-pro-max/scripts/search.py "accessibility loading error duplicate submit" --domain ux
97
- python3 .context/spec/design/tools/ui-ux-pro-max/scripts/search.py "aria focus keyboard semantic form" --domain web
95
+ python3 .devflow/context/spec/design/tools/ui-ux-pro-max/scripts/search.py "layout form table accessibility performance" --stack react
96
+ python3 .devflow/context/spec/design/tools/ui-ux-pro-max/scripts/search.py "accessibility loading error duplicate submit" --domain ux
97
+ python3 .devflow/context/spec/design/tools/ui-ux-pro-max/scripts/search.py "aria focus keyboard semantic form" --domain web
98
98
  ```
99
99
  查询结果不得覆盖项目规则和已确认 UI-SPEC;与项目现状冲突时写入风险或待确认事项。
100
100
 
@@ -156,12 +156,12 @@ allowed-tools:
156
156
 
157
157
  **门禁**:每个界面/组件必须有 seam 决策记录(复用/扩展/新建),否则不得进入 Phase 3。
158
158
 
159
- 1. 创建 `.planning/features/{功能名}/` 目录
159
+ 1. 创建 `.devflow/planning/features/{功能名}/` 目录
160
160
  2. 读取 `assets/frontend-spec-template.md` 模板
161
161
  3. 按模板结构填充内容,并写入 `需求基线衔接`、`前端规范影响` 和 `技术栈插槽` 内容
162
162
  4. 在 `前端规范影响` 中明确区分“已确认实现依据”和“推荐参考/待确认”,禁止把 UI-SPEC 中的“推荐 - 待拍板”作为组件 props、样式变量或实现常量直接落地。
163
163
 
164
- If an older baseline still points to root `features/{功能名}/`, treat that as a legacy read path. New frontend tech-spec output stays under `.planning/features/{功能名}/`.
164
+ If an older baseline still points to root `features/{功能名}/`, treat that as a legacy read path. New frontend tech-spec output stays under `.devflow/planning/features/{功能名}/`.
165
165
 
166
166
  ### 第四阶段:用户确认
167
167
 
@@ -171,7 +171,7 @@ If an older baseline still points to root `features/{功能名}/`, treat that as
171
171
 
172
172
  ### 第五阶段:结构化元数据
173
173
 
174
- 完成后写入 `.planning/features/{功能名}/前端技术方案.meta.json`,字段定义见 `feature-development.yaml` 中 `steps[frontend-tech-spec].meta_output.fields`:`route_count`, `component_count`, `api_count`, `api_gaps_count`。
174
+ 完成后写入 `.devflow/planning/features/{功能名}/前端技术方案.meta.json`,字段定义见 `feature-development.yaml` 中 `steps[frontend-tech-spec].meta_output.fields`:`route_count`, `component_count`, `api_count`, `api_gaps_count`。
175
175
 
176
176
  同时必须从 `architecture-brief.meta.json` 原样复制:`brief_revision → architecture_brief_revision`、`graph_revision → architecture_graph_revision`、`static_context_snapshot_revision → architecture_static_context_snapshot_revision`、`comparison_status → architecture_comparison_status`。不得凭记忆填写或改写这些值。
177
177
 
@@ -184,13 +184,13 @@ If an older baseline still points to root `features/{功能名}/`, treat that as
184
184
  3. 状态管理描述新增 Store/state 的结构
185
185
  4. 接口依赖标注请求/响应格式
186
186
  5. 影响范围标注受影响的现有页面和组件
187
- 6. 若目标项目存在 `.planning/rules/` 或 `.context/spec/`,前端方案必须列出适用设计/组件/交互规范、相关经验教训、工具链要求、测试策略和审查门禁
187
+ 6. 若目标项目存在 `.devflow/planning/rules/` 或 `.devflow/context/spec/`,前端方案必须列出适用设计/组件/交互规范、相关经验教训、工具链要求、测试策略和审查门禁
188
188
  7. 必须覆盖 loading、empty、error、permission、disabled、duplicate submit、responsive、accessibility 等用户可见状态;缺少来源时标记待确认
189
189
  8. 必须分析接口调用压力:每个用户操作触发几次 API 调用、并发请求数量、是否存在重复/冗余/可合并请求、是否需要防抖/节流/缓存、是否存在竞态条件
190
190
  9. 必须分析接口安全:Token 存储与刷新策略是否合规、敏感数据是否有暴露风险及脱敏方案、防重放/CSRF/XSS 措施是否到位、请求签名是否必要
191
191
  10. 项目本地规则优先级高于技术栈插槽;技术栈插槽只补充项目未定义的默认规则
192
- 11. 与历史相关的判断优先来自 `.planning/milestones/`、`.planning/requirements/`、`.planning/lessons/` 和阶段 `CONTEXT.md`;`features/` 或 `.context/lessons/` 只作为目标项目存在时的兼容来源
193
- 12. 设计规则优先级为:用户拍板/设计稿事实/需求基线 > 现有代码与项目 token > `.context/spec/design/tokens/project-tokens.md` > `.context/spec/design/recommendations/` 与 `ui-ux-pro-max` 推荐。推荐项未经用户确认不得进入实现任务。
192
+ 11. 与历史相关的判断优先来自 `.devflow/planning/milestones/`、`.devflow/planning/requirements/`、`.devflow/planning/lessons/` 和阶段 `CONTEXT.md`;`features/` 或 `.devflow/context/lessons/` 只作为目标项目存在时的兼容来源
193
+ 12. 设计规则优先级为:用户拍板/设计稿事实/需求基线 > 现有代码与项目 token > `.devflow/context/spec/design/tokens/project-tokens.md` > `.devflow/context/spec/design/recommendations/` 与 `ui-ux-pro-max` 推荐。推荐项未经用户确认不得进入实现任务。
194
194
 
195
195
  ## 强制审查门禁(MANDATORY — 不可跳过)
196
196
 
@@ -198,7 +198,7 @@ If an older baseline still points to root `features/{功能名}/`, treat that as
198
198
 
199
199
  - [ ] 每个不确定的组件选择、路由设计、状态处理是否已向用户确认?(禁止猜测)
200
200
  - [ ] `references/affected-module-exploration.md` 的探索产出检查是否全部通过?(现有 props/emits/methods/API 调用清单、保留/分支/抽离/新增决策)**若不通过,必须先补充代码探索,不得继续写文档。**
201
- - [ ] 若 `.planning/code-index/` 存在,受影响页面/组件/API/store 的关系定位是否已查询 code-index 并回读源码 evidence?若未使用,是否说明缺失或过期原因?
201
+ - [ ] 若 `.devflow/planning/code-index/` 存在,受影响页面/组件/API/store 的关系定位是否已查询 code-index 并回读源码 evidence?若未使用,是否说明缺失或过期原因?
202
202
  - [ ] 方案影响的现有页面/组件是否已描述其**现状**?(先描述现状,再分析影响)
203
203
  - [ ] loading/empty/error/permission/disabled/duplicate/responsive 等状态是否均已覆盖或标记待确认?
204
204
  - [ ] 若存在 `SL-*`,方案是否只覆盖当前执行切片,且后置切片未进入实现范围?
@@ -226,7 +226,7 @@ If an older baseline still points to root `features/{功能名}/`, treat that as
226
226
 
227
227
  - [ ] 方案包含:功能要点、影响范围、路由设计、组件拆分、数据流、状态处理、风险点
228
228
  - [ ] 不含后端 DDL、后端代码任务
229
- - [ ] 若存在 `.planning/rules/` 或 `.context/spec/`,适用规范已列出
229
+ - [ ] 若存在 `.devflow/planning/rules/` 或 `.devflow/context/spec/`,适用规范已列出
230
230
  - [ ] 审查结论已写入方案末尾
231
231
 
232
232
  **审查结论不通过时不得报告 "Step 3b 完成"。**
@@ -32,9 +32,9 @@
32
32
 
33
33
  | 来源 | 结论 | 对本方案的影响 |
34
34
  |------|------|----------------|
35
- | `.planning/milestones/...` | {{结论}} | {{影响}} |
36
- | `.planning/requirements/...` | {{结论}} | {{影响}} |
37
- | `.planning/lessons/...` | {{结论}} | {{影响}} |
35
+ | `.devflow/planning/milestones/...` | {{结论}} | {{影响}} |
36
+ | `.devflow/planning/requirements/...` | {{结论}} | {{影响}} |
37
+ | `.devflow/planning/lessons/...` | {{结论}} | {{影响}} |
38
38
 
39
39
  ## 三、页面结构
40
40
 
@@ -118,15 +118,15 @@ sequenceDiagram
118
118
 
119
119
  | 规则来源 | 是否存在 | 影响说明 |
120
120
  |----------|----------|----------|
121
- | `.planning/rules/INDEX.md` | {{是/否}} | {{说明}} |
122
- | `.planning/execution-contract.md` | {{是/否}} | {{说明}} |
123
- | `.planning/toolchain.md` | {{是/否}} | {{说明}} |
124
- | `.planning/lessons/README.md` | {{是/否}} | {{说明}} |
125
- | `.context/spec/frontend/index.md` | {{是/否}} | {{说明}} |
126
- | `.context/spec/frontend/` | {{是/否}} | {{说明}} |
127
- | `.context/spec/design/` | {{是/否}} | {{说明}} |
128
- | `.context/workflow/` | {{是/否}} | {{说明}} |
129
- | `.context/lessons/README.md` | {{是/否}} | {{说明}} |
121
+ | `.devflow/planning/rules/INDEX.md` | {{是/否}} | {{说明}} |
122
+ | `.devflow/planning/execution-contract.md` | {{是/否}} | {{说明}} |
123
+ | `.devflow/planning/toolchain.md` | {{是/否}} | {{说明}} |
124
+ | `.devflow/planning/lessons/README.md` | {{是/否}} | {{说明}} |
125
+ | `.devflow/context/spec/frontend/index.md` | {{是/否}} | {{说明}} |
126
+ | `.devflow/context/spec/frontend/` | {{是/否}} | {{说明}} |
127
+ | `.devflow/context/spec/design/` | {{是/否}} | {{说明}} |
128
+ | `.devflow/context/workflow/` | {{是/否}} | {{说明}} |
129
+ | `.devflow/context/lessons/README.md` | {{是/否}} | {{说明}} |
130
130
  | `AGENTS.md` / `CLAUDE.md` | {{是/否}} | {{说明}} |
131
131
 
132
132
  ### 7.2 适用设计系统与组件规范
@@ -140,8 +140,8 @@ sequenceDiagram
140
140
  | 来源类型 | 来源文件/章节 | 是否作为实现依据 | 处理方式 |
141
141
  |----------|---------------|------------------|----------|
142
142
  | 设计稿事实 | {{UI-SPEC 章节或设计稿}} | 是 | {{进入组件样式、变量、布局实现}} |
143
- | 现有项目规范 | {{现有代码/.context/spec/design/tokens/project-tokens.md}} | 是 | {{复用变量、组件、样式模式}} |
144
- | 推荐参考 | {{.context/spec/design/recommendations 或 ui-ux-pro-max 查询结果}} | 否 | {{仅进入风险、测试门禁或待确认事项}} |
143
+ | 现有项目规范 | {{现有代码/.devflow/context/spec/design/tokens/project-tokens.md}} | 是 | {{复用变量、组件、样式模式}} |
144
+ | 推荐参考 | {{.devflow/context/spec/design/recommendations 或 ui-ux-pro-max 查询结果}} | 否 | {{仅进入风险、测试门禁或待确认事项}} |
145
145
 
146
146
  说明:UI-SPEC 中标记为“推荐 - 待拍板”的内容,未经用户确认不得作为组件 props、样式变量或实现常量直接落地。
147
147
 
@@ -153,7 +153,7 @@ sequenceDiagram
153
153
  | React | {{是/否}} | {{package.json/入口文件}} | {{hooks/state/query/component 约束}} |
154
154
  | Next.js | {{是/否}} | {{next.config/app/pages}} | {{server/client component、data fetching、cache、hydration 约束}} |
155
155
  | Vue | {{是/否}} | {{vue 依赖/.vue 文件}} | {{SFC、Composition API、Pinia/router/composable 约束}} |
156
- | Design Recommendations | {{是/否}} | `.context/spec/design/index.md` | {{UX/accessibility/responsive/stack 推荐如何补充,但不覆盖项目规则}} |
156
+ | Design Recommendations | {{是/否}} | `.devflow/context/spec/design/index.md` | {{UX/accessibility/responsive/stack 推荐如何补充,但不覆盖项目规则}} |
157
157
  | ui-ux-pro-max | {{是/否}} | {{是否需要动态查询}} | {{查询命令、摘要、是否存在待确认项}} |
158
158
  | 未覆盖框架 | {{框架名或无}} | {{触发依据}} | {{按 Common Web 处理并标记待扩展}} |
159
159
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  ### 步骤1:定位关键文件
16
16
 
17
- 优先使用 `.planning/code-index/` 定位候选 route/page/component/store/API symbols,以及 `routes_to`、`imports`、`calls` 关系;然后回读 `evidence_path:evidence_line` 附近源码。code-index 不存在或过期时,再按下表的目录约定和 `rg` 兜底。
17
+ 优先使用 `.devflow/planning/code-index/` 定位候选 route/page/component/store/API symbols,以及 `routes_to`、`imports`、`calls` 关系;然后回读 `evidence_path:evidence_line` 附近源码。code-index 不存在或过期时,再按下表的目录约定和 `rg` 兜底。
18
18
 
19
19
  | 层级 | 定位方式 | 最少读取 |
20
20
  |------|----------|----------|
@@ -53,6 +53,6 @@
53
53
  - [ ] 是否列出了每个受影响组件的**现有** props/emits/methods/API 调用?
54
54
  - [ ] 是否明确了每个受影响组件是"保留"、"分支"、"抽离"还是"新增"?
55
55
  - [ ] 是否实际读取了 .vue 组件源码和 .js API 文件(不是仅靠文件名推断)?
56
- - [ ] 若 `.planning/code-index/` 存在,是否记录了用于定位的 symbol/relation evidence?
56
+ - [ ] 若 `.devflow/planning/code-index/` 存在,是否记录了用于定位的 symbol/relation evidence?
57
57
 
58
58
  **此检查不通过,不得进入 Phase 3(生成文档)。**
@@ -6,39 +6,39 @@ Use this contract when generating frontend technical plans. A project rule packa
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/{codebase}.md`
18
- 10. `.context/spec/frontend/index.md`
19
- 11. `.context/spec/frontend/`
20
- 12. `.context/spec/design/`
21
- 13. `.planning/code-index/` when source-level route/component/API/data-flow relation facts are needed
22
- 14. `.context/workflow/tdd.md`
23
- 15. `.context/workflow/verification.md`
24
- 16. `.context/workflow/checklist.md`
25
- 17. `.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/{codebase}.md`
18
+ 10. `.devflow/context/spec/frontend/index.md`
19
+ 11. `.devflow/context/spec/frontend/`
20
+ 12. `.devflow/context/spec/design/`
21
+ 13. `.devflow/planning/code-index/` when source-level route/component/API/data-flow relation facts are needed
22
+ 14. `.devflow/context/workflow/tdd.md`
23
+ 15. `.devflow/context/workflow/verification.md`
24
+ 16. `.devflow/context/workflow/checklist.md`
25
+ 17. `.devflow/context/lessons/README.md`
26
26
  18. root `AGENTS.md`, `CLAUDE.md`, or equivalent project instruction files
27
27
 
28
28
  If none exist, explicitly write `未发现项目规则包` and continue with code exploration and conservative assumptions.
29
29
 
30
30
  History rule:
31
31
 
32
- - Use `.planning/milestones/`, `.planning/requirements/`, `.planning/lessons/`, and phase `CONTEXT.md` files as the primary history model.
33
- - Treat `.context/lessons/` and `features/` as compatible legacy/project-rule evidence only when present in the target project.
32
+ - Use `.devflow/planning/milestones/`, `.devflow/planning/requirements/`, `.devflow/planning/lessons/`, and phase `CONTEXT.md` files as the primary history model.
33
+ - Treat `.devflow/context/lessons/` and `features/` as compatible legacy/project-rule evidence only when present in the target project.
34
34
  - Do not require outbound-call style history files.
35
35
 
36
36
  Design rule loading:
37
37
 
38
- - If `.context/spec/design/index.md` is missing, call `devflow_design_rule(args=[])` from the target repository, then re-check `.context/spec/design/index.md`.
39
- - If `.context/spec/design/index.md` exists, read it before individual design files.
40
- - Treat `.context/spec/design/tokens/project-tokens.md` as project-level confirmed tokens only when it explicitly marks values as confirmed.
41
- - Treat `.context/spec/design/recommendations/` and `.context/spec/design/tools/ui-ux-pro-max/` as recommendation sources, not authoritative project facts.
38
+ - If `.devflow/context/spec/design/index.md` is missing, call `devflow_design_rule(args=[])` from the target repository, then re-check `.devflow/context/spec/design/index.md`.
39
+ - If `.devflow/context/spec/design/index.md` exists, read it before individual design files.
40
+ - Treat `.devflow/context/spec/design/tokens/project-tokens.md` as project-level confirmed tokens only when it explicitly marks values as confirmed.
41
+ - Treat `.devflow/context/spec/design/recommendations/` and `.devflow/context/spec/design/tools/ui-ux-pro-max/` as recommendation sources, not authoritative project facts.
42
42
  - Recommendation sources can fill UX, accessibility, responsive, component and stack guidance gaps, but conflicts with design material, code, baseline decisions or project tokens must become risks or pending questions.
43
43
 
44
44
  ## Stack Slot Loading
@@ -60,8 +60,8 @@ Project-specific rules override stack slot defaults. Stack slots fill gaps only
60
60
  Extract only frontend-relevant rules:
61
61
 
62
62
  - Technology stack, framework, router, module boundaries, and package manager.
63
- - Matching stack spec and codebase spec from `.context/spec/index.md` when available.
64
- - Code-index symbols/relations for affected routes, pages, components, stores, API clients, imports and calls when `.planning/code-index/` exists.
63
+ - Matching stack spec and codebase spec from `.devflow/context/spec/index.md` when available.
64
+ - Code-index symbols/relations for affected routes, pages, components, stores, API clients, imports and calls when `.devflow/planning/code-index/` exists.
65
65
  - Design system, UI library, component hierarchy, reusable component rules, icon rules, and style/theming rules.
66
66
  - Confirmed design tokens separately from recommendation-only UI/UX guidance.
67
67
  - Page, route, layout, permission, menu, tab, dialog, form, table, empty state, loading state, error state, and confirmation interaction rules.
@@ -25,8 +25,8 @@ description: "Use after both Track A (api-call-guide) and Track B (frontend-tech
25
25
 
26
26
  ## 产出位置
27
27
 
28
- - `.planning/features/{功能名}/integration-report.md`
29
- - `.planning/features/{功能名}/integration-report.meta.json`
28
+ - `.devflow/planning/features/{功能名}/integration-report.md`
29
+ - `.devflow/planning/features/{功能名}/integration-report.meta.json`
30
30
 
31
31
  `integration-report.meta.json` 必须包含:
32
32
 
@@ -45,13 +45,13 @@ description: "Use after both Track A (api-call-guide) and Track B (frontend-tech
45
45
 
46
46
  ## 输入
47
47
 
48
- - `.planning/features/{功能名}/api-contract.md` — **API 签名唯一权威源**
49
- - `.planning/features/{功能名}/api-call-guide.md` — Track A 产出的调用指南
50
- - `.planning/features/{功能名}/前端技术方案.md` — Track B 产出的前端方案
51
- - `.planning/features/{功能名}/后端技术方案.md` — Track A 产出的后端方案
52
- - `.planning/features/{功能名}/api-supplement-requests.md` —(可选)Track B 提交的 API 补充需求
53
- - `.planning/code-index/`(如存在)— 用于抽查 API route/handler、frontend API calls、imports/calls 关系,并回读源码 evidence
54
- - `.planning/requirements/{feature}/traceability.json` — 原子 REQ 的唯一追溯源
48
+ - `.devflow/planning/features/{功能名}/api-contract.md` — **API 签名唯一权威源**
49
+ - `.devflow/planning/features/{功能名}/api-call-guide.md` — Track A 产出的调用指南
50
+ - `.devflow/planning/features/{功能名}/前端技术方案.md` — Track B 产出的前端方案
51
+ - `.devflow/planning/features/{功能名}/后端技术方案.md` — Track A 产出的后端方案
52
+ - `.devflow/planning/features/{功能名}/api-supplement-requests.md` —(可选)Track B 提交的 API 补充需求
53
+ - `.devflow/planning/code-index/`(如存在)— 用于抽查 API route/handler、frontend API calls、imports/calls 关系,并回读源码 evidence
54
+ - `.devflow/planning/requirements/{feature}/traceability.json` — 原子 REQ 的唯一追溯源
55
55
 
56
56
  ## 核心原则
57
57
 
@@ -59,7 +59,7 @@ description: "Use after both Track A (api-call-guide) and Track B (frontend-tech
59
59
  2. **逐 API 验证** — 每个 API 检验:后端方案中的实现 ↔ API 契约 ↔ 前端调用方式
60
60
  3. **不匹配分级** — 标记不匹配项的严重级别(阻塞 / 非阻塞)
61
61
  4. **以 api-contract.md 为准** — 前后端方案与契约不一致时,以契约为准
62
- 5. **源码事实必须有 evidence** — 当 `.planning/code-index/` 存在且验证涉及已实现代码时,先查 Symbol/Relation,再回读 `evidence_path:evidence_line`;不得只凭 Markdown navigation 或 relation 摘要判断实现一致性
62
+ 5. **源码事实必须有 evidence** — 当 `.devflow/planning/code-index/` 存在且验证涉及已实现代码时,先查 Symbol/Relation,再回读 `evidence_path:evidence_line`;不得只凭 Markdown navigation 或 relation 摘要判断实现一致性
63
63
 
64
64
  ## 验证流程
65
65
 
@@ -79,7 +79,7 @@ description: "Use after both Track A (api-call-guide) and Track B (frontend-tech
79
79
  - API 参数和响应签名
80
80
  - 与 API 契约的差异
81
81
 
82
- 若 `.planning/code-index/` 存在,按 endpoint、handler、controller/service 名称查询后端 symbols 和 `routes_to` / `calls` / reads/writes 关系,读取源码 evidence 后抽查实现位置是否与方案和契约一致。
82
+ 若 `.devflow/planning/code-index/` 存在,按 endpoint、handler、controller/service 名称查询后端 symbols 和 `routes_to` / `calls` / reads/writes 关系,读取源码 evidence 后抽查实现位置是否与方案和契约一致。
83
83
 
84
84
  逐项对比:后端方案中的 API 描述是否与契约一致?
85
85
 
@@ -94,7 +94,7 @@ description: "Use after both Track A (api-call-guide) and Track B (frontend-tech
94
94
  - 调用步骤中的请求示例
95
95
  - 预期的响应结构
96
96
 
97
- 若 `.planning/code-index/` 存在,按 endpoint、API client 方法、页面/组件名查询前端 symbols 和 `imports` / `calls` 关系,读取源码 evidence 后抽查调用方式是否与契约一致。
97
+ 若 `.devflow/planning/code-index/` 存在,按 endpoint、API client 方法、页面/组件名查询前端 symbols 和 `imports` / `calls` 关系,读取源码 evidence 后抽查调用方式是否与契约一致。
98
98
 
99
99
  逐项对比:前端调用的 API 是否与契约一致?
100
100
 
@@ -113,7 +113,7 @@ description: "Use after both Track A (api-call-guide) and Track B (frontend-tech
113
113
 
114
114
  1. 将后端、前端、UI、API 契约中的设计项写入 `traceability.json.designs`,每项以 `requirements: ["REQ-…"]` 回指来源。
115
115
  2. 所有 API 类型设计必须在 `contract` 中同时写 `request`、`response`、`errors`、`behavior`;禁止只对齐响应字段。
116
- 3. 执行 `python3 <workflow-orchestrator>/scripts/traceability_check.py --file .planning/requirements/{feature}/traceability.json --stage design`。
116
+ 3. 执行 `python3 <workflow-orchestrator>/scripts/traceability_check.py --file .devflow/planning/requirements/{feature}/traceability.json --stage design`。
117
117
  4. 结果不为 passed 时,`merge_gate_status` 必须为 failed,`blocking_issue_count` 必须大于 0,回到对应方案修复;不得进入变更清单。
118
118
 
119
119
  ## 产出模板
@@ -12,15 +12,15 @@ argument-hint: <功能名> [@设计稿路径] [--auto]
12
12
  user-invocable: true
13
13
  pattern: generator+reviewer
14
14
  inputs:
15
- - .planning/requirements/baseline.md
16
- - .planning/PROJECT.md
17
- - .planning/navigation/INDEX.md
18
- - .planning/rules/INDEX.md
19
- - .context/spec/frontend/index.md
20
- - .context/spec/frontend/
21
- - .context/spec/design/
15
+ - .devflow/planning/requirements/baseline.md
16
+ - .devflow/planning/PROJECT.md
17
+ - .devflow/planning/navigation/INDEX.md
18
+ - .devflow/planning/rules/INDEX.md
19
+ - .devflow/context/spec/frontend/index.md
20
+ - .devflow/context/spec/frontend/
21
+ - .devflow/context/spec/design/
22
22
  - references/affected-module-exploration.md
23
- output: .planning/features/{功能名}/UI-SPEC.md
23
+ output: .devflow/planning/features/{功能名}/UI-SPEC.md
24
24
  allowed-tools:
25
25
  - Read
26
26
  - Write
@@ -79,31 +79,31 @@ UI-SPEC 不写代码细节(那是前端技术方案的事),但必须把 UI
79
79
 
80
80
  ### 第二阶段:理解产品上下文
81
81
 
82
- 1. 读取 `.planning/requirements/baseline.md`,提取:
82
+ 1. 读取 `.devflow/planning/requirements/baseline.md`,提取:
83
83
  - 涉及的页面/弹窗/区域列表
84
84
  - 与 UI 相关的用户拍板决策(布局偏好、交互方式、组件选择)
85
85
  - `反向审视与用户拍板` 中影响 UI 的决策
86
- 2. 读取 `.planning/PROJECT.md` 了解前端代码库位置
87
- 3. 按 `.planning/rules/INDEX.md` 加载前端规范(`.context/spec/frontend/`、`.context/spec/design/`)
88
- 4. 若 `.context/spec/design/index.md` 不存在,先通过 OMP 运行时安装共享设计规则包:
86
+ 2. 读取 `.devflow/planning/PROJECT.md` 了解前端代码库位置
87
+ 3. 按 `.devflow/planning/rules/INDEX.md` 加载前端规范(`.devflow/context/spec/frontend/`、`.devflow/context/spec/design/`)
88
+ 4. 若 `.devflow/context/spec/design/index.md` 不存在,先通过 OMP 运行时安装共享设计规则包:
89
89
  ```text
90
90
  devflow_design_rule(args=[])
91
91
  ```
92
- 安装后重新检查 `.context/spec/design/index.md`。如果仍不存在,记录“未发现设计规则包”,继续使用设计稿和现有代码保守分析。
93
- 5. 若存在 `.context/spec/design/index.md`,必须读取该入口,并按入口说明加载:
94
- - 项目已确认 token:`.context/spec/design/tokens/project-tokens.md`
95
- - 通用设计推荐:`.context/spec/design/recommendations/`
96
- - 动态推荐工具:`.context/spec/design/tools/ui-ux-pro-max/scripts/search.py`
92
+ 安装后重新检查 `.devflow/context/spec/design/index.md`。如果仍不存在,记录“未发现设计规则包”,继续使用设计稿和现有代码保守分析。
93
+ 5. 若存在 `.devflow/context/spec/design/index.md`,必须读取该入口,并按入口说明加载:
94
+ - 项目已确认 token:`.devflow/context/spec/design/tokens/project-tokens.md`
95
+ - 通用设计推荐:`.devflow/context/spec/design/recommendations/`
96
+ - 动态推荐工具:`.devflow/context/spec/design/tools/ui-ux-pro-max/scripts/search.py`
97
97
  6. 在以下情况调用 `ui-ux-pro-max` 动态推荐工具补充设计参考:
98
98
  - 无设计稿,但需求需要页面风格、配色、字体、布局建议
99
99
  - 设计稿未覆盖颜色、字体、间距、圆角、阴影、响应式、可访问性或状态细节
100
100
  - 需要按产品类型/行业/风格生成候选设计系统
101
101
  推荐命令示例:
102
102
  ```bash
103
- python3 .context/spec/design/tools/ui-ux-pro-max/scripts/search.py "<产品类型> <行业> <风格关键词>" --design-system -p "<功能名>" --format markdown
104
- python3 .context/spec/design/tools/ui-ux-pro-max/scripts/search.py "loading error accessibility responsive" --domain ux
103
+ python3 .devflow/context/spec/design/tools/ui-ux-pro-max/scripts/search.py "<产品类型> <行业> <风格关键词>" --design-system -p "<功能名>" --format markdown
104
+ python3 .devflow/context/spec/design/tools/ui-ux-pro-max/scripts/search.py "loading error accessibility responsive" --domain ux
105
105
  ```
106
- 7. 设计结论合并优先级必须为:用户拍板/设计稿事实/需求基线 > 现有代码与项目 token > `.context/spec/design/tokens/project-tokens.md` > `ui-ux-pro-max` 推荐。推荐结果只能作为“推荐 - 待拍板”,不得覆盖设计稿事实或现有项目规范。
106
+ 7. 设计结论合并优先级必须为:用户拍板/设计稿事实/需求基线 > 现有代码与项目 token > `.devflow/context/spec/design/tokens/project-tokens.md` > `ui-ux-pro-max` 推荐。推荐结果只能作为“推荐 - 待拍板”,不得覆盖设计稿事实或现有项目规范。
107
107
 
108
108
  ### 第三阶段:设计解析
109
109
 
@@ -150,8 +150,8 @@ UI-SPEC 不写代码细节(那是前端技术方案的事),但必须把 UI
150
150
  设计 Token 必须分来源输出:
151
151
 
152
152
  - **设计稿事实**:来自截图/Figma/蓝湖/用户已确认设计描述,可作为下游实现依据。
153
- - **现有项目规范**:来自现有代码、组件库或 `.context/spec/design/tokens/project-tokens.md`,可作为下游实现依据。
154
- - **推荐 - 待拍板**:来自 `.context/spec/design/recommendations/` 或 `ui-ux-pro-max` 动态查询,只能进入待确认事项,用户确认前不得被前端技术方案当作已确认实现值。
153
+ - **现有项目规范**:来自现有代码、组件库或 `.devflow/context/spec/design/tokens/project-tokens.md`,可作为下游实现依据。
154
+ - **推荐 - 待拍板**:来自 `.devflow/context/spec/design/recommendations/` 或 `ui-ux-pro-max` 动态查询,只能进入待确认事项,用户确认前不得被前端技术方案当作已确认实现值。
155
155
 
156
156
  #### 3.4 交互流程
157
157
 
@@ -200,7 +200,7 @@ UI-SPEC 不写代码细节(那是前端技术方案的事),但必须把 UI
200
200
 
201
201
  ### 第五阶段:生成 UI-SPEC.md
202
202
 
203
- 1. 创建/确认 `.planning/features/{功能名}/` 目录
203
+ 1. 创建/确认 `.devflow/planning/features/{功能名}/` 目录
204
204
  2. 读取 `assets/ui-spec-template.md` 模板
205
205
  3. 按模板结构填充所有章节,并在设计 Token 与交互章节中标明来源:设计稿事实 / 现有项目规范 / 推荐 - 待拍板
206
206
  4. 将所有来自推荐源且影响实现的候选值写入“待确认事项”
@@ -8,7 +8,7 @@
8
8
 
9
9
  **设计来源**: {设计稿路径/截图说明}
10
10
  **解析日期**: {日期}
11
- **上游依赖**: `.planning/features/{功能名}/功能点梳理.md`
11
+ **上游依赖**: `.devflow/planning/features/{功能名}/功能点梳理.md`
12
12
 
13
13
  ---
14
14
 
@@ -111,8 +111,8 @@
111
111
  | 来源类型 | 来源文件/依据 | 是否可直接用于实现 | 说明 |
112
112
  |----------|---------------|--------------------|------|
113
113
  | 设计稿事实 | {截图/Figma/蓝湖/用户已确认设计描述} | 是 | {明确来自设计稿的颜色、字号、间距、圆角、阴影等} |
114
- | 现有项目规范 | {现有代码变量/组件库/.context/spec/design/tokens/project-tokens.md} | 是 | {与现有变量或组件规则对齐的 token} |
115
- | 推荐 - 待拍板 | {.context/spec/design/recommendations 或 ui-ux-pro-max 查询结果} | 否 | {仅作为候选方案,需写入待确认事项} |
114
+ | 现有项目规范 | {现有代码变量/组件库/.devflow/context/spec/design/tokens/project-tokens.md} | 是 | {与现有变量或组件规则对齐的 token} |
115
+ | 推荐 - 待拍板 | {.devflow/context/spec/design/recommendations 或 ui-ux-pro-max 查询结果} | 否 | {仅作为候选方案,需写入待确认事项} |
116
116
 
117
117
  合并优先级:用户拍板/设计稿事实/需求基线 > 现有代码与项目 token > 项目级已确认 token > 推荐 - 待拍板。
118
118
 
@@ -19,7 +19,7 @@ autoloadSkills:
19
19
  Implement only the assigned plan slice. Do not re-plan the feature, compare alternatives, or explore unrelated modules. Read only the approved files, their immediate dependencies, and the focused tests needed for this slice. Preserve unrelated work and report deviations instead of silently expanding scope.
20
20
 
21
21
  Before any protected source access, read the project's required code-index evidence
22
- files in the exact order listed by INDEX_GATE (typically `.planning/code-index/INDEX.md`
22
+ files in the exact order listed by INDEX_GATE (typically `.devflow/planning/code-index/INDEX.md`
23
23
  followed by the ordered files named by the gate). Do not attempt `grep`, `rg`, or source
24
24
  reads first: each subagent has its own evidence session and cannot inherit the parent's
25
25
  observations. If the gate lists different files, follow that list exactly.
@@ -28,4 +28,4 @@ If the execution contract is missing, ambiguous, or contradicted by the code, st
28
28
 
29
29
  For a task whose frozen `test-bindings.json` marks `test_mode: tdd_required`, use the Core tool in this exact order: `devflow_tdd_evidence(action="prepare")` before changing declared production paths; create/change the test and record `red`; implement; record `green`; then record `regression`. Do not mark the task done if any phase is missing or fails. The tool may write only its own Core-owned TDD evidence record; this exception does not authorize edits to any other Devflow control-plane file.
30
30
 
31
- Return `STATUS`, changed files, validation evidence, and one escalation/blocker if needed. Never edit `.planning/STATE.md`, `.planning/artifacts/index.yaml`, workflow definitions, or checkpoint decisions; the parent session owns those through Devflow tools.
31
+ Return `STATUS`, changed files, validation evidence, and one escalation/blocker if needed. Never edit `.devflow/planning/STATE.md`, `.devflow/planning/artifacts/index.yaml`, workflow definitions, or checkpoint decisions; the parent session owns those through Devflow tools.
@@ -29,7 +29,7 @@ Required outputs:
29
29
  - Root-cause diagnosis containing the fields in `references/root-cause-ladder.md`.
30
30
  - Code and/or workflow-artifact repair consistent with that diagnosis.
31
31
  - Verification evidence and a context-sync result.
32
- - A lesson under `.context/lessons/` when the finding is reusable; if the directory or index is absent, record that limitation and do not fail solely for its absence.
32
+ - A lesson under `.devflow/context/lessons/` when the finding is reusable; if the directory or index is absent, record that limitation and do not fail solely for its absence.
33
33
 
34
34
  Read references only at their designated phase. [references/INDEX.md](references/INDEX.md) is the routing contract; it is not optional.
35
35
 
@@ -37,7 +37,7 @@ Read references only at their designated phase. [references/INDEX.md](references
37
37
 
38
38
  1. Find the first broken layer and stop root-cause traversal there. Do not call a downstream symptom the root cause.
39
39
  2. Before classifying the cause, read `references/first-principles.md` and `references/adversarial-review.md`.
40
- 3. Any source-level claim based on `.planning/code-index/` requires source readback at its evidence path and line. Navigation or index summaries alone are insufficient.
40
+ 3. Any source-level claim based on `.devflow/planning/code-index/` requires source readback at its evidence path and line. Navigation or index summaries alone are insufficient.
41
41
  4. `requirement-gap`, `breakdown-gap`, `spec-gap`, and `change-list-gap` require documentation repair before code repair. `implementation-bug` and `regression` do not require speculative document rewrites.
42
42
  5. Keep the repair scoped to the violated invariant. Do not slip in unrelated refactors or new feature scope.
43
43
  6. Complete verification and `workflow-context-sync --after-bugfix` before declaring success, unless the user explicitly approves an exception and its residual risk is recorded.
@@ -46,12 +46,12 @@ Read references only at their designated phase. [references/INDEX.md](references
46
46
 
47
47
  Load only what exists and is relevant, in this order:
48
48
 
49
- 1. `.planning/STATE.md` for the active feature and phase.
50
- 2. `.planning/requirements/baseline.md`.
51
- 3. `.planning/features/{功能名}/功能点梳理.md`.
52
- 4. `.planning/features/{功能名}/前端技术方案.md` and `后端技术方案.md`.
53
- 5. `.planning/features/{功能名}/*变更清单.md`.
54
- 6. `.planning/code-index/` and then evidence source files, when source tracing is needed.
49
+ 1. `.devflow/planning/STATE.md` for the active feature and phase.
50
+ 2. `.devflow/planning/requirements/baseline.md`.
51
+ 3. `.devflow/planning/features/{功能名}/功能点梳理.md`.
52
+ 4. `.devflow/planning/features/{功能名}/前端技术方案.md` and `后端技术方案.md`.
53
+ 5. `.devflow/planning/features/{功能名}/*变更清单.md`.
54
+ 6. `.devflow/planning/code-index/` and then evidence source files, when source tracing is needed.
55
55
 
56
56
  If an upstream artifact is absent, record it as evidence for the corresponding gap rather than silently skipping it.
57
57
 
@@ -104,7 +104,7 @@ Gate: verification demonstrates the original reproduction is fixed and the ident
104
104
  ## Phase 5 — Preserve Knowledge and Synchronize Context
105
105
 
106
106
  1. Read `references/lesson-format.md`. Write a lesson when the finding is reusable beyond this single line fix; otherwise record why no lesson is needed.
107
- 2. If `.context/lessons/README.md` exists, append the lesson to its index. If it does not exist, retain the lesson file and report that no index was available.
107
+ 2. If `.devflow/context/lessons/README.md` exists, append the lesson to its index. If it does not exist, retain the lesson file and report that no index was available.
108
108
  3. Run `workflow-context-sync --after-bugfix`.
109
109
  - Ordinary implementation repairs refresh code-index and run validate/audit.
110
110
  - Changes to routes, API clients, handlers, jobs, service boundaries, toolchain, or manifests may require a Medium sync with navigation/spec/toolchain updates.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Write a lesson when the cause, invariant, boundary defense, or regression pattern is likely to prevent future work from repeating the failure. Do not create one for a self-evident isolated typo unless project rules require it.
4
4
 
5
- Write `.context/lessons/{YYYY-MM-DD}-{slug}.md`:
5
+ Write `.devflow/context/lessons/{YYYY-MM-DD}-{slug}.md`:
6
6
 
7
7
  ```markdown
8
8
  # {Bug title}
@@ -25,4 +25,4 @@ Write `.context/lessons/{YYYY-MM-DD}-{slug}.md`:
25
25
  - **Rule for future work**: {reusable guidance}
26
26
  ```
27
27
 
28
- If `.context/lessons/README.md` exists, add a concise linked entry. If it does not exist, do not fail the bug fix; retain the lesson file and report that the index was unavailable.
28
+ If `.devflow/context/lessons/README.md` exists, add a concise linked entry. If it does not exist, do not fail the bug fix; retain the lesson file and report that the index was unavailable.
@@ -13,7 +13,7 @@ Inspect in order and stop at the first broken layer. Earlier applicable layers m
13
13
 
14
14
  ## Evidence Details
15
15
 
16
- - Use `.planning/code-index/` to locate symbols, callers, imports, reads/writes, and tests when present; read the cited source evidence before asserting a fact.
16
+ - Use `.devflow/planning/code-index/` to locate symbols, callers, imports, reads/writes, and tests when present; read the cited source evidence before asserting a fact.
17
17
  - If code-index is missing, stale, or has no result, use navigation and targeted source inspection, and say that machine relation facts were unavailable.
18
18
  - For implementation analysis, check completed change-list tasks, boundary/error handling, and obvious omissions such as type errors, logic reversal, or missed validation.
19
19
  - For regression analysis, run `git log --oneline -10 -- <relevant-file>` from the owning repository and inspect the relevant diff.