@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
@@ -92,7 +92,7 @@ def task_binding(root: Path, feature: str, task_id: str) -> tuple[dict[str, Any]
92
92
  validation = validate_bindings(root, feature)
93
93
  if not validation.get("ok"):
94
94
  return None, [str(item) for item in validation.get("errors", ["invalid test bindings"])]
95
- bindings = read_json(root / ".planning" / "features" / feature / "test-bindings.json")
95
+ bindings = read_json(root / ".devflow/planning" / "features" / feature / "test-bindings.json")
96
96
  if bindings is None:
97
97
  return None, ["missing test bindings"]
98
98
  matches = [item for item in bindings.get("tasks", []) if isinstance(item, dict) and item.get("id") == task_id]
@@ -105,7 +105,7 @@ def task_binding(root: Path, feature: str, task_id: str) -> tuple[dict[str, Any]
105
105
 
106
106
 
107
107
  def evidence_path(root: Path, feature: str, task_id: str) -> Path:
108
- return root / ".planning" / "test-runs" / feature / "tdd" / f"{task_id}.json"
108
+ return root / ".devflow/planning" / "test-runs" / feature / "tdd" / f"{task_id}.json"
109
109
 
110
110
 
111
111
  def command_hash(argv: list[str]) -> str:
@@ -233,7 +233,7 @@ def validate_feature(root: Path, feature: str) -> dict[str, Any]:
233
233
  errors = [str(item) for item in binding_result.get("errors", [])]
234
234
  if errors:
235
235
  return response(False, feature=feature, errors=errors)
236
- bindings = read_json(root / ".planning" / "features" / feature / "test-bindings.json")
236
+ bindings = read_json(root / ".devflow/planning" / "features" / feature / "test-bindings.json")
237
237
  assert bindings is not None
238
238
  checked: list[str] = []
239
239
  for task in bindings.get("tasks", []):
@@ -78,9 +78,9 @@ def validate_test_command(root: Path, argv: Any) -> str | None:
78
78
  return "test command runner is not in the Core allowlist"
79
79
  commands = database_toolchain(root)
80
80
  if commands is None:
81
- toolchain = root / ".planning" / "toolchain.md"
81
+ toolchain = root / ".devflow/planning" / "toolchain.md"
82
82
  if not toolchain.is_file():
83
- return "initialized toolchain context (database or .planning/toolchain.md compatibility projection) is required before Core can execute a test command"
83
+ return "initialized toolchain context (database or .devflow/planning/toolchain.md compatibility projection) is required before Core can execute a test command"
84
84
  content = toolchain.read_text(encoding="utf-8").lower()
85
85
  else:
86
86
  content = "\n".join(commands).lower()
@@ -74,7 +74,7 @@ def view_pin(suite: dict[str, Any]) -> dict[str, Any]:
74
74
 
75
75
 
76
76
  def freeze_attestation_path(root: Path, feature: str) -> Path:
77
- return root / ".planning" / "features" / feature / "test-suite-freeze.json"
77
+ return root / ".devflow/planning" / "features" / feature / "test-suite-freeze.json"
78
78
 
79
79
 
80
80
  def validated_attestation(
@@ -108,8 +108,8 @@ def validated_attestation(
108
108
 
109
109
  def validate(root: Path, feature: str, stage: str = "frozen") -> dict[str, Any]:
110
110
  errors: list[str] = []
111
- suite_path = root / ".planning" / "requirements" / feature / "tests.json"
112
- binding_path = root / ".planning" / "features" / feature / "test-bindings.json"
111
+ suite_path = root / ".devflow/planning" / "requirements" / feature / "tests.json"
112
+ binding_path = root / ".devflow/planning" / "features" / feature / "test-bindings.json"
113
113
  suite = read_json(suite_path, errors, "TC suite")
114
114
  bindings = read_json(binding_path, errors, "test bindings")
115
115
  if suite is None or bindings is None:
@@ -33,7 +33,7 @@ options = {
33
33
  route: nil,
34
34
  reason: nil,
35
35
  blocking_question: nil,
36
- state: ".planning/STATE.md",
36
+ state: ".devflow/planning/STATE.md",
37
37
  write: false,
38
38
  json: false
39
39
  }
@@ -76,7 +76,7 @@ result = if !ROUTE_NEXT_SKILL.key?(options[:route].to_s)
76
76
  if feature.to_s.empty?
77
77
  fail_result("missing_feature", "message" => "Pass --feature or provide current_feature in STATE.md")
78
78
  else
79
- meta_path = File.join(root, ".planning", "requirements", feature, "入口分诊.meta.json")
79
+ meta_path = File.join(root, ".devflow/planning", "requirements", feature, "入口分诊.meta.json")
80
80
  meta = File.exist?(meta_path) ? JSON.parse(File.read(meta_path)) : { "feature_name" => feature }
81
81
  route = options[:route]
82
82
 
@@ -101,7 +101,7 @@ result = if !ROUTE_NEXT_SKILL.key?(options[:route].to_s)
101
101
  {
102
102
  "ok" => true,
103
103
  "written" => options[:write],
104
- "path" => ".planning/requirements/#{feature}/入口分诊.meta.json",
104
+ "path" => ".devflow/planning/requirements/#{feature}/入口分诊.meta.json",
105
105
  "meta" => meta
106
106
  }
107
107
  end
@@ -61,9 +61,9 @@ module WorkflowStateValidator
61
61
 
62
62
  def validate(root:, state_path:, state_override: nil, workflow_override: nil, artifact_registry_override: nil, strict_artifact_status: true, strict_registry_revision: true, phase_owner_override: nil)
63
63
  root = File.expand_path(root)
64
- canonical_state_path, = DevflowControlIO.resolve_control_path(root, ".planning/STATE.md", :state)
64
+ canonical_state_path, = DevflowControlIO.resolve_control_path(root, ".devflow/planning/STATE.md", :state)
65
65
  unless File.expand_path(state_path, root) == canonical_state_path
66
- issues = [issue("error", "invalid_control_path", "STATE.md path must be .planning/STATE.md")]
66
+ issues = [issue("error", "invalid_control_path", "STATE.md path must be .devflow/planning/STATE.md")]
67
67
  return result(false, state_path, nil, nil, issues)
68
68
  end
69
69
  state_path = canonical_state_path
@@ -84,7 +84,7 @@ module WorkflowStateValidator
84
84
  return result(false, state_path, nil, nil, issues)
85
85
  end
86
86
 
87
- workflow_path = state["workflow_config"] || File.join(".planning", "workflows", "#{state.fetch("current_flow")}.yaml")
87
+ workflow_path = state["workflow_config"] || File.join(".devflow/planning", "workflows", "#{state.fetch("current_flow")}.yaml")
88
88
  abs_workflow_path, workflow_path = DevflowControlIO.resolve_control_path(root, workflow_path, :workflow)
89
89
  workflow = workflow_override || load_yaml(abs_workflow_path, issues, "workflow_config")
90
90
  return result(false, state_path, workflow_path, nil, issues) unless workflow
@@ -806,7 +806,7 @@ unless %w[prepared claimed consumed superseded failed].include?(status)
806
806
  return unless %w[frontend-tech-spec backend-tech-spec].include?(step["id"])
807
807
 
808
808
  feature = state["current_feature"]
809
- brief_path = File.join(root, ".planning", "features", feature, "architecture-brief.meta.json")
809
+ brief_path = File.join(root, ".devflow/planning", "features", feature, "architecture-brief.meta.json")
810
810
  unless File.file?(brief_path)
811
811
  issues << issue("error", "architecture_brief_meta_missing", "Technical spec cannot be validated without the architecture brief meta", step: step["id"], path: brief_path)
812
812
  return
@@ -826,7 +826,7 @@ unless %w[prepared claimed consumed superseded failed].include?(status)
826
826
 
827
827
  graph, = RequirementGraph.load_graph(root, feature)
828
828
  if brief["graph_revision"] != graph["revision"]
829
- brief_markdown_path = File.join(root, ".planning", "features", feature, "architecture-brief.md")
829
+ brief_markdown_path = File.join(root, ".devflow/planning", "features", feature, "architecture-brief.md")
830
830
  current_markdown = ArchitectureBrief.build(root, feature)[3]
831
831
  normalize_revision = lambda do |markdown|
832
832
  markdown.to_s.gsub(/需求图谱:schema v(\d+) \/ revision \d+/, '需求图谱:schema v\1 / revision <current>')
@@ -1022,7 +1022,7 @@ unless %w[prepared claimed consumed superseded failed].include?(status)
1022
1022
  end
1023
1023
 
1024
1024
  if __FILE__ == $PROGRAM_NAME
1025
- options = { state: ".planning/STATE.md", strict_artifact_status: true, json: false }
1025
+ options = { state: ".devflow/planning/STATE.md", strict_artifact_status: true, json: false }
1026
1026
  OptionParser.new do |opts|
1027
1027
  opts.banner = "Usage: validate_state.rb [--state PATH] [--no-strict-artifact-status] [--json]"
1028
1028
  opts.on("--state PATH", "STATE.md path") { |path| options[:state] = path }
@@ -16,7 +16,7 @@ options = {
16
16
  action: "meta",
17
17
  feature: nil,
18
18
  canonical: nil,
19
- state: ".planning/STATE.md",
19
+ state: ".devflow/planning/STATE.md",
20
20
  expected_revision: nil,
21
21
  confirmed_screens: nil,
22
22
  approved_by: nil,
@@ -107,7 +107,7 @@ def canonical_fingerprint(canonical)
107
107
  end
108
108
 
109
109
  def read_source_fingerprint(root, feature)
110
- path = File.join(root, ".planning", "requirements", feature, "traceability.json")
110
+ path = File.join(root, ".devflow/planning", "requirements", feature, "traceability.json")
111
111
  return "" unless File.file?(path)
112
112
 
113
113
  JSON.parse(File.read(path))["source_document_fingerprint"].to_s
@@ -151,7 +151,7 @@ begin
151
151
  raise ArgumentError, "--runtime-confirmed is required for approval" unless options[:runtime_confirmed]
152
152
  end
153
153
 
154
- canonical_relative = options[:canonical] || ".planning/features/#{options[:feature]}/canonical.json"
154
+ canonical_relative = options[:canonical] || ".devflow/planning/features/#{options[:feature]}/canonical.json"
155
155
  state_absolute, = DevflowControlIO.resolve_control_path(ROOT, options[:state], :state)
156
156
  canonical_absolute, canonical_path = DevflowControlIO.resolve_control_path(ROOT, canonical_relative, :artifact)
157
157
  raise ArgumentError, "canonical.json does not exist" unless File.file?(canonical_absolute)
@@ -176,7 +176,7 @@ begin
176
176
  raise ArgumentError, "source_document_fingerprint is required" if source_fingerprint.empty?
177
177
 
178
178
  screen_ids = Array(canonical["screens"]).map { |screen| screen["id"].to_s }.sort
179
- meta_path = File.join(ROOT, ".planning", "features", options[:feature], "canonical.meta.json")
179
+ meta_path = File.join(ROOT, ".devflow/planning", "features", options[:feature], "canonical.meta.json")
180
180
  meta = {
181
181
  "schema_version" => 1,
182
182
  "feature" => options[:feature],
@@ -208,7 +208,7 @@ begin
208
208
  "approved_by" => options[:approved_by],
209
209
  "approved_at" => Time.now.utc.iso8601
210
210
  }
211
- approval_path = File.join(ROOT, ".planning", "features", options[:feature], "approval.json")
211
+ approval_path = File.join(ROOT, ".devflow/planning", "features", options[:feature], "approval.json")
212
212
  DevflowControlIO.atomic_write(approval_path, JSON.pretty_generate(approval) + "\n")
213
213
  output["action"] = "approve"
214
214
  output["approval"] = approval
@@ -451,7 +451,7 @@ def main() -> int:
451
451
  errors, canonical = validate(proposal, traceability, schema, business_model)
452
452
  questions_path = args.questions
453
453
  if questions_path is None and isinstance(proposal, dict) and proposal.get("feature"):
454
- questions_path = Path(".planning") / "features" / str(proposal["feature"]) / "questions.yaml"
454
+ questions_path = Path(".devflow/planning") / "features" / str(proposal["feature"]) / "questions.yaml"
455
455
  question_meta: dict[str, Any]
456
456
  blocking_open: list[str] = []
457
457
  if questions_path is None or not questions_path.exists():
@@ -10,7 +10,7 @@ entry:
10
10
  initial_step: diagnose
11
11
 
12
12
  state_contract:
13
- source: ".planning/STATE.md"
13
+ source: ".devflow/planning/STATE.md"
14
14
  suggested_transition:
15
15
  current_flow: acceptance-remediation
16
16
  current_step: diagnose
@@ -35,10 +35,10 @@ steps:
35
35
  skill: workflow-bug-fix
36
36
  depends_on: []
37
37
  inputs:
38
- - ".planning/test-runs/{feature}/acceptance-results.json"
39
- - ".planning/features/{feature}/acceptance-test-bindings.json"
38
+ - ".devflow/planning/test-runs/{feature}/acceptance-results.json"
39
+ - ".devflow/planning/features/{feature}/acceptance-test-bindings.json"
40
40
  outputs:
41
- - path: ".planning/features/{feature}/acceptance-remediation.md"
41
+ - path: ".devflow/planning/features/{feature}/acceptance-remediation.md"
42
42
  type: acceptance-remediation
43
43
  required: true
44
44
 
@@ -49,8 +49,8 @@ steps:
49
49
  depends_on:
50
50
  - diagnose
51
51
  inputs:
52
- - ".planning/features/{feature}/acceptance-remediation.md"
53
- - ".planning/features/{feature}/变更清单.md"
52
+ - ".devflow/planning/features/{feature}/acceptance-remediation.md"
53
+ - ".devflow/planning/features/{feature}/变更清单.md"
54
54
 
55
55
  - id: code-index-refresh
56
56
  order: 30
@@ -59,9 +59,9 @@ steps:
59
59
  depends_on:
60
60
  - execute-fix
61
61
  inputs:
62
- - ".planning/features/{feature}/acceptance-remediation.md"
62
+ - ".devflow/planning/features/{feature}/acceptance-remediation.md"
63
63
  outputs:
64
- - path: ".planning/code-index/AUDIT.md"
64
+ - path: ".devflow/planning/code-index/AUDIT.md"
65
65
  type: code-index-audit
66
66
  required: true
67
67
 
@@ -72,11 +72,11 @@ steps:
72
72
  depends_on:
73
73
  - code-index-refresh
74
74
  inputs:
75
- - ".planning/requirements/{feature}/tests.json"
76
- - ".planning/features/{feature}/acceptance-test-bindings.json"
77
- - ".planning/code-index/AUDIT.md"
75
+ - ".devflow/planning/requirements/{feature}/tests.json"
76
+ - ".devflow/planning/features/{feature}/acceptance-test-bindings.json"
77
+ - ".devflow/planning/code-index/AUDIT.md"
78
78
  outputs:
79
- - path: ".planning/test-runs/{feature}/acceptance-results.json"
79
+ - path: ".devflow/planning/test-runs/{feature}/acceptance-results.json"
80
80
  type: acceptance-test-results
81
81
  required: true
82
82