@guanlin4924/devflow-pi 0.1.0

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 (254) hide show
  1. package/README.md +164 -0
  2. package/docs/OMP-NATIVE-ARCHITECTURE.md +104 -0
  3. package/package.json +40 -0
  4. package/plugins/devflow-core/extensions/devflow-core.ts +1642 -0
  5. package/plugins/devflow-core/package.json +14 -0
  6. package/plugins/devflow-core/runtime/hooks/context_sync_gate.py +174 -0
  7. package/plugins/devflow-core/runtime/hooks/hook_common.py +696 -0
  8. package/plugins/devflow-core/runtime/hooks/index_gate.py +63 -0
  9. package/plugins/devflow-core/runtime/hooks/injection_code_specification.py +7 -0
  10. package/plugins/devflow-core/runtime/hooks/post_tool.py +44 -0
  11. package/plugins/devflow-core/runtime/hooks/start.py +288 -0
  12. package/plugins/devflow-core/skills/workflow-orchestrator/SKILL.md +265 -0
  13. package/plugins/devflow-core/skills/workflow-orchestrator/agents/openai.yaml +4 -0
  14. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/advance_state.rb +520 -0
  15. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/control_io.rb +42 -0
  16. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_state.rb +138 -0
  17. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_workflow.rb +121 -0
  18. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/inspect_state.rb +553 -0
  19. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/manage_lessons.rb +219 -0
  20. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/sync_artifacts.rb +168 -0
  21. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/update_triage_route.rb +110 -0
  22. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/validate_state.rb +565 -0
  23. package/plugins/devflow-core/skills/workflow-orchestrator/templates/feature-development.yaml +783 -0
  24. package/plugins/devflow-core/skills/workflow-orchestrator/templates/uat-remediation.yaml +143 -0
  25. package/plugins/devflow-core/skills/workflow-orchestrator/templates/workflows-README.md +10 -0
  26. package/plugins/devflow-core/skills/workflow-pipeline/SKILL.md +117 -0
  27. package/plugins/devflow-core/skills/workflow-pipeline/references/pipeline-flow.md +167 -0
  28. package/plugins/devflow-core/skills/workflow-pipeline/references/slice-safety-guide.md +125 -0
  29. package/plugins/devflow-core/skills/workflow-project-context/SKILL.md +819 -0
  30. package/plugins/devflow-core/skills/workflow-project-context/assets/agents-md-template.md +25 -0
  31. package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-backend-spec-template.md +68 -0
  32. package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-frontend-spec-template.md +64 -0
  33. package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-navigation-template.md +168 -0
  34. package/plugins/devflow-core/skills/workflow-project-context/assets/context-domain-index-template.md +43 -0
  35. package/plugins/devflow-core/skills/workflow-project-context/assets/context-spec-index-template.md +45 -0
  36. package/plugins/devflow-core/skills/workflow-project-context/assets/execution-contract-template.md +57 -0
  37. package/plugins/devflow-core/skills/workflow-project-context/assets/navigation-index-template.md +40 -0
  38. package/plugins/devflow-core/skills/workflow-project-context/assets/project-initialization-template.md +109 -0
  39. package/plugins/devflow-core/skills/workflow-project-context/assets/rules-index-template.md +80 -0
  40. package/plugins/devflow-core/skills/workflow-project-context/assets/run-manifest-template.json +40 -0
  41. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/directory-structure.md +46 -0
  42. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/engine.md +46 -0
  43. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/errors.md +46 -0
  44. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/locator.md +46 -0
  45. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/model.md +46 -0
  46. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/repository.md +46 -0
  47. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/router.md +46 -0
  48. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/scheduler.md +46 -0
  49. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/schema.md +46 -0
  50. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/service.md +46 -0
  51. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/backend/testing.md +46 -0
  52. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/api-client.md +46 -0
  53. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/case-editor.md +46 -0
  54. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/components.md +46 -0
  55. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/directory-structure.md +46 -0
  56. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/forms.md +46 -0
  57. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/routing.md +46 -0
  58. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/state.md +46 -0
  59. package/plugins/devflow-core/skills/workflow-project-context/assets/spec-templates/frontend/testing.md +46 -0
  60. package/plugins/devflow-core/skills/workflow-project-context/assets/stack-spec-template.md +106 -0
  61. package/plugins/devflow-core/skills/workflow-project-context/assets/state-template.md +77 -0
  62. package/plugins/devflow-core/skills/workflow-project-context/assets/toolchain-template.md +37 -0
  63. package/plugins/devflow-core/skills/workflow-project-context/references/navigation-guide.md +262 -0
  64. package/plugins/devflow-core/skills/workflow-project-context/scripts/validate_initialization.py +545 -0
  65. package/plugins/devflow-design/agents/contract-auditor.md +18 -0
  66. package/plugins/devflow-design/extensions/devflow-design.ts +47 -0
  67. package/plugins/devflow-design/package.json +14 -0
  68. package/plugins/devflow-design/skills/workflow-api-call-guide/SKILL.md +142 -0
  69. package/plugins/devflow-design/skills/workflow-api-contract/SKILL.md +150 -0
  70. package/plugins/devflow-design/skills/workflow-api-supplement/SKILL.md +121 -0
  71. package/plugins/devflow-design/skills/workflow-backend-tech-spec/SKILL.md +257 -0
  72. package/plugins/devflow-design/skills/workflow-backend-tech-spec/assets/adr-template.md +57 -0
  73. package/plugins/devflow-design/skills/workflow-backend-tech-spec/assets/backend-spec-template.md +205 -0
  74. package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/affected-module-exploration.md +59 -0
  75. package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/backend-conventions.md +30 -0
  76. package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/code-explore-guide.md +40 -0
  77. package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/project-rule-contract.md +66 -0
  78. package/plugins/devflow-design/skills/workflow-design-rule-pack/SKILL.md +91 -0
  79. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/index.md +71 -0
  80. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/accessibility.md +31 -0
  81. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/component-library.md +31 -0
  82. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/design-systems.md +47 -0
  83. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/responsive-grid.md +29 -0
  84. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/stack-guidelines.md +31 -0
  85. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/ux-patterns.md +40 -0
  86. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tokens/project-tokens.md +19 -0
  87. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/SKILL.md +377 -0
  88. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/charts.csv +26 -0
  89. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/colors.csv +97 -0
  90. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/icons.csv +101 -0
  91. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/landing.csv +31 -0
  92. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/products.csv +97 -0
  93. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/react-performance.csv +45 -0
  94. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  95. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  96. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  97. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  98. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  99. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  100. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  101. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  102. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/react.csv +54 -0
  103. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  104. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  105. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  106. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  107. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/styles.csv +68 -0
  108. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/typography.csv +58 -0
  109. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  110. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  111. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/data/web-interface.csv +31 -0
  112. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/scripts/core.py +253 -0
  113. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/scripts/design_system.py +1067 -0
  114. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/scripts/search.py +114 -0
  115. package/plugins/devflow-design/skills/workflow-design-rule-pack/scripts/install.py +67 -0
  116. package/plugins/devflow-design/skills/workflow-feature-breakdown/SKILL.md +370 -0
  117. package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/admin-system-template.md +57 -0
  118. package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/api-service-template.md +42 -0
  119. package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/c-end-system-template.md +25 -0
  120. package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/output-template.md +139 -0
  121. package/plugins/devflow-design/skills/workflow-feature-breakdown/references/bug-rules.md +12 -0
  122. package/plugins/devflow-design/skills/workflow-feature-breakdown/references/exception-checklist.md +31 -0
  123. package/plugins/devflow-design/skills/workflow-feature-breakdown/references/trace-integrity-guide.md +153 -0
  124. package/plugins/devflow-design/skills/workflow-feature-breakdown/references/writing-guide.md +92 -0
  125. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/SKILL.md +223 -0
  126. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/assets/frontend-spec-template.md +204 -0
  127. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/affected-module-exploration.md +58 -0
  128. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/component-patterns.md +42 -0
  129. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/frontend-conventions.md +28 -0
  130. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/frontend-stack-slots/common-web.md +53 -0
  131. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/frontend-stack-slots/next.md +40 -0
  132. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/frontend-stack-slots/react.md +41 -0
  133. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/frontend-stack-slots/vue.md +41 -0
  134. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/project-rule-contract.md +95 -0
  135. package/plugins/devflow-design/skills/workflow-integration-verify/SKILL.md +172 -0
  136. package/plugins/devflow-design/skills/workflow-ui-spec/SKILL.md +302 -0
  137. package/plugins/devflow-design/skills/workflow-ui-spec/assets/ui-spec-template.md +244 -0
  138. package/plugins/devflow-design/skills/workflow-ui-spec/references/affected-module-exploration.md +55 -0
  139. package/plugins/devflow-implementation/agents/implementation-worker.md +20 -0
  140. package/plugins/devflow-implementation/package.json +6 -0
  141. package/plugins/devflow-implementation/skills/workflow-bug-fix/SKILL.md +124 -0
  142. package/plugins/devflow-implementation/skills/workflow-bug-fix/references/INDEX.md +13 -0
  143. package/plugins/devflow-implementation/skills/workflow-bug-fix/references/adversarial-review.md +35 -0
  144. package/plugins/devflow-implementation/skills/workflow-bug-fix/references/first-principles.md +26 -0
  145. package/plugins/devflow-implementation/skills/workflow-bug-fix/references/lesson-format.md +28 -0
  146. package/plugins/devflow-implementation/skills/workflow-bug-fix/references/root-cause-ladder.md +51 -0
  147. package/plugins/devflow-implementation/skills/workflow-bug-fix/references/seam-analysis.md +30 -0
  148. package/plugins/devflow-implementation/skills/workflow-change-plan/SKILL.md +160 -0
  149. package/plugins/devflow-implementation/skills/workflow-change-plan/references/code-conventions.md +33 -0
  150. package/plugins/devflow-implementation/skills/workflow-change-plan/references/ddl-guidelines.md +60 -0
  151. package/plugins/devflow-implementation/skills/workflow-change-plan/references/output-template.md +217 -0
  152. package/plugins/devflow-implementation/skills/workflow-change-plan/references/project-rule-contract.md +55 -0
  153. package/plugins/devflow-implementation/skills/workflow-execute-phase/SKILL.md +271 -0
  154. package/plugins/devflow-implementation/skills/workflow-execute-phase/references/execute-phase.md +1251 -0
  155. package/plugins/devflow-implementation/skills/workflow-execute-phase/references/ui-brand.md +160 -0
  156. package/plugins/devflow-intel/agents/project-scout.md +27 -0
  157. package/plugins/devflow-intel/extensions/devflow-intel.ts +104 -0
  158. package/plugins/devflow-intel/package.json +14 -0
  159. package/plugins/devflow-intel/skills/code-index-query/SKILL.md +37 -0
  160. package/plugins/devflow-intel/skills/code-index-query/references/query-patterns.md +27 -0
  161. package/plugins/devflow-intel/skills/workflow-code-index/SKILL.md +68 -0
  162. package/plugins/devflow-intel/skills/workflow-code-index/references/adapter-contract.md +38 -0
  163. package/plugins/devflow-intel/skills/workflow-code-index/references/audit-checklist.md +10 -0
  164. package/plugins/devflow-intel/skills/workflow-code-index/references/confidence-rules.md +43 -0
  165. package/plugins/devflow-intel/skills/workflow-code-index/references/data-model.md +74 -0
  166. package/plugins/devflow-intel/skills/workflow-code-index/references/discovery.md +24 -0
  167. package/plugins/devflow-intel/skills/workflow-code-index/references/query-guide.md +20 -0
  168. package/plugins/devflow-intel/skills/workflow-code-index/scripts/adapters/__init__.py +1 -0
  169. package/plugins/devflow-intel/skills/workflow-code-index/scripts/adapters/base.py +30 -0
  170. package/plugins/devflow-intel/skills/workflow-code-index/scripts/adapters/generic_text.py +287 -0
  171. package/plugins/devflow-intel/skills/workflow-code-index/scripts/adapters/registry.py +17 -0
  172. package/plugins/devflow-intel/skills/workflow-code-index/scripts/code_index.py +437 -0
  173. package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/__init__.py +1 -0
  174. package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/discovery.py +139 -0
  175. package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/hashing.py +11 -0
  176. package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/scanner.py +115 -0
  177. package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/schema.py +123 -0
  178. package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/__init__.py +1 -0
  179. package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/project_binding_check.py +66 -0
  180. package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/relation_check.py +36 -0
  181. package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/schema_validate.py +11 -0
  182. package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/stale_check.py +42 -0
  183. package/plugins/devflow-intel/skills/workflow-code-index/scripts/writers/__init__.py +1 -0
  184. package/plugins/devflow-intel/skills/workflow-code-index/scripts/writers/jsonl_writer.py +25 -0
  185. package/plugins/devflow-intel/skills/workflow-code-index/scripts/writers/markdown_writer.py +106 -0
  186. package/plugins/devflow-intel/skills/workflow-code-index/scripts/writers/sqlite_writer.py +143 -0
  187. package/plugins/devflow-intel/skills/workflow-context-sync/SKILL.md +381 -0
  188. package/plugins/devflow-intel/skills/workflow-context-sync/agents/openai.yaml +4 -0
  189. package/plugins/devflow-intel/skills/workflow-context-sync/scripts/context_sync_cursor.py +241 -0
  190. package/plugins/devflow-intel/skills/workflow-update-navigation/SKILL.md +186 -0
  191. package/plugins/devflow-intel/skills/workflow-update-navigation/references/incremental-update-guide.md +47 -0
  192. package/plugins/devflow-quality/agents/code-reviewer.md +18 -0
  193. package/plugins/devflow-quality/agents/verification-runner.md +21 -0
  194. package/plugins/devflow-quality/extensions/devflow-quality.ts +59 -0
  195. package/plugins/devflow-quality/package.json +14 -0
  196. package/plugins/devflow-quality/skills/code-review/SKILL.md +288 -0
  197. package/plugins/devflow-quality/skills/code-review/references/cross-layer-checklist.md +70 -0
  198. package/plugins/devflow-quality/skills/code-review/references/dao-checklist.md +70 -0
  199. package/plugins/devflow-quality/skills/code-review/references/handler-checklist.md +48 -0
  200. package/plugins/devflow-quality/skills/code-review/references/repository-checklist.md +44 -0
  201. package/plugins/devflow-quality/skills/code-review/references/service-checklist.md +57 -0
  202. package/plugins/devflow-quality/skills/code-review/references/spec-checklist.md +34 -0
  203. package/plugins/devflow-quality/skills/code-review/references/vo-checklist.md +26 -0
  204. package/plugins/devflow-quality/skills/workflow-audit-milestone/SKILL.md +31 -0
  205. package/plugins/devflow-quality/skills/workflow-audit-milestone/references/audit-milestone.md +328 -0
  206. package/plugins/devflow-quality/skills/workflow-complete-milestone/SKILL.md +132 -0
  207. package/plugins/devflow-quality/skills/workflow-complete-milestone/assets/milestone-archive.md +123 -0
  208. package/plugins/devflow-quality/skills/workflow-complete-milestone/references/complete-milestone.md +775 -0
  209. package/plugins/devflow-quality/skills/workflow-complete-milestone/references/milestone-archive.md +123 -0
  210. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/SKILL.md +126 -0
  211. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/api-mainflow-rules.md +27 -0
  212. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/codebase-discovery.md +54 -0
  213. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/intermediate-format.md +244 -0
  214. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/mainflow-selection.md +36 -0
  215. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/project-dsl-contract.md +190 -0
  216. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/ui-mainflow-rules.md +110 -0
  217. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/compile_dsl.py +583 -0
  218. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/discover_codebases.py +199 -0
  219. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/normalize_case_payloads.py +177 -0
  220. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/validate_case_payloads.py +370 -0
  221. package/plugins/devflow-quality/skills/workflow-verify-work/SKILL.md +106 -0
  222. package/plugins/devflow-quality/skills/workflow-verify-work/assets/UAT.md +265 -0
  223. package/plugins/devflow-quality/skills/workflow-verify-work/references/verify-work.md +759 -0
  224. package/plugins/devflow-requirements/agents/requirements-auditor.md +20 -0
  225. package/plugins/devflow-requirements/package.json +6 -0
  226. package/plugins/devflow-requirements/skills/requirement-feasibility-review/SKILL.md +219 -0
  227. package/plugins/devflow-requirements/skills/requirement-feasibility-review/agents/openai.yaml +4 -0
  228. package/plugins/devflow-requirements/skills/requirement-feasibility-review/references/review-method.md +257 -0
  229. package/plugins/devflow-requirements/skills/requirement-feasibility-review/references/review-template.md +80 -0
  230. package/plugins/devflow-requirements/skills/workflow-demand-clarify/SKILL.md +325 -0
  231. package/plugins/devflow-requirements/skills/workflow-domain-modeling/SKILL.md +163 -0
  232. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/SKILL.md +748 -0
  233. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/assets/baseline-template.md +281 -0
  234. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/antipatterns.md +69 -0
  235. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/challenge-review-guide.md +158 -0
  236. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/decomposition-guide.md +115 -0
  237. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/project-context-guide.md +119 -0
  238. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/questioning.md +76 -0
  239. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/requirement-review-checklist.md +115 -0
  240. package/plugins/devflow-requirements/skills/workflow-requirement-triage/SKILL.md +204 -0
  241. package/plugins/devflow-requirements/skills/workflow-wayfinder/SKILL.md +183 -0
  242. package/src/cli.ts +76 -0
  243. package/src/constants.ts +15 -0
  244. package/src/doctor.ts +66 -0
  245. package/src/paths.ts +37 -0
  246. package/src/platform-extension.ts +46 -0
  247. package/src/project-context.ts +165 -0
  248. package/src/runtime.ts +167 -0
  249. package/src/usage-stats.ts +101 -0
  250. package/templates/commands/start.md +58 -0
  251. package/templates/omp/AGENTS.md +36 -0
  252. package/templates/omp/config.yml +112 -0
  253. package/templates/omp/hook-config.json +18 -0
  254. package/templates/omp/index-policy.json +57 -0
@@ -0,0 +1,25 @@
1
+ # {{project_name}}
2
+
3
+ ## Getting Started
4
+
5
+ Before any operation, read these files in order:
6
+
7
+ 1. `.planning/rules/INDEX.md` — project rule index (gate entry point)
8
+ 2. `.context/spec/index.md` — design and codebase specification entry
9
+ {{#if codebase_count}}
10
+ 3. `.planning/navigation/INDEX.md` — codebase registry and navigation files
11
+ 4. `.planning/code-index/` — machine code facts generated by `workflow-code-index` during full initialization unless fast mode skipped it
12
+ {{/if}}
13
+
14
+ ## Codebases
15
+
16
+ This project has {{codebase_count}} codebase(s):
17
+ {{#codebases}}
18
+ - **{{name}}** ({{type}}): {{path}}
19
+ {{/codebases}}
20
+
21
+ ## Key Directories
22
+
23
+ - `.planning/` — workflow state, navigation, rules, execution contract
24
+ - `.context/spec/` — design and codebase specifications (MUST/SHOULD/OBSERVED rules)
25
+ - `.context/lessons/` — accumulated project experience and regression prevention
@@ -0,0 +1,68 @@
1
+ # {{name}} Backend Codebase Specification
2
+
3
+ This file describes project-instance rules for one backend/service codebase. Stack-level defaults are in `.context/spec/stacks/{{stack_key}}.md`.
4
+
5
+ ## Version
6
+
7
+ - Generated at: {{generated_at}}
8
+ - Codebase: `{{name}}`
9
+ - Navigation: `.planning/navigation/{{name}}.md`
10
+ - Stack spec: `.context/spec/stacks/{{stack_key}}.md`
11
+ - Source manifests: {{manifest_sources}}
12
+ - Dependency fingerprint: {{dependency_fingerprint}}
13
+ - Regenerate when:
14
+ - A source manifest changes
15
+ - The framework major version changes
16
+ - A key library is added, removed, or replaced
17
+ - The codebase directory structure or call-chain structure changes materially
18
+
19
+ ## Identity
20
+
21
+ | Field | Value |
22
+ |-------|-------|
23
+ | Root | {{root}} |
24
+ | Type | {{type}} |
25
+ | Role | {{role}} |
26
+ | Stack key | {{stack_key}} |
27
+
28
+ ## Layer Model
29
+
30
+ | Layer | Directory | Responsibility | Dependency Direction | Source |
31
+ |-------|-----------|----------------|----------------------|--------|
32
+ | {{layer}} | {{directory}} | {{responsibility}} | {{dependency_direction}} | {{source}} |
33
+
34
+ ## Entry Points And Interfaces
35
+
36
+ {{entry_points_interfaces}}
37
+
38
+ ## Data Model And Conversion Rules
39
+
40
+ {{data_model_conversion_rules}}
41
+
42
+ ## Auth, Permission, Errors, And Logging
43
+
44
+ {{auth_permission_errors_logging}}
45
+
46
+ ## Persistence, Jobs, And Integrations
47
+
48
+ {{persistence_jobs_integrations}}
49
+
50
+ ## Testing And Verification
51
+
52
+ {{testing_verification}}
53
+
54
+ ## Explicit Rules
55
+
56
+ Rules from `AGENTS.md`, `CLAUDE.md`, `.cursorrules`, existing `.context/spec/`, or equivalent files.
57
+
58
+ - {{explicit_rule}}
59
+
60
+ ## Code-Inferred Conventions
61
+
62
+ Conventions inferred from consistent code patterns. These are weaker than explicit rules.
63
+
64
+ - {{inferred_rule}}
65
+
66
+ ## Pending Confirmation
67
+
68
+ - {{pending_item}}
@@ -0,0 +1,64 @@
1
+ # {{name}} Frontend Codebase Specification
2
+
3
+ This file describes project-instance rules for one frontend codebase. Stack-level defaults are in `.context/spec/stacks/{{stack_key}}.md`.
4
+
5
+ ## Version
6
+
7
+ - Generated at: {{generated_at}}
8
+ - Codebase: `{{name}}`
9
+ - Navigation: `.planning/navigation/{{name}}.md`
10
+ - Stack spec: `.context/spec/stacks/{{stack_key}}.md`
11
+ - Source manifests: {{manifest_sources}}
12
+ - Dependency fingerprint: {{dependency_fingerprint}}
13
+ - Regenerate when:
14
+ - A source manifest changes
15
+ - The framework major version changes
16
+ - A key library is added, removed, or replaced
17
+ - The codebase directory structure or route/component graph changes materially
18
+
19
+ ## Identity
20
+
21
+ | Field | Value |
22
+ |-------|-------|
23
+ | Root | {{root}} |
24
+ | Type | {{type}} |
25
+ | Role | {{role}} |
26
+ | Stack key | {{stack_key}} |
27
+
28
+ ## Structure And Component Model
29
+
30
+ | Layer | Directory | Responsibility | Source |
31
+ |-------|-----------|----------------|--------|
32
+ | {{layer}} | {{directory}} | {{responsibility}} | {{source}} |
33
+
34
+ ## Routes, Pages, And Data Flow
35
+
36
+ {{routes_pages_data_flow}}
37
+
38
+ ## API Client, State, And Permission Rules
39
+
40
+ {{api_state_permission_rules}}
41
+
42
+ ## UI, Forms, Tables, Dialogs, And Feedback
43
+
44
+ {{ui_interaction_rules}}
45
+
46
+ ## Testing And Verification
47
+
48
+ {{testing_verification}}
49
+
50
+ ## Explicit Rules
51
+
52
+ Rules from `AGENTS.md`, `CLAUDE.md`, `.cursorrules`, existing `.context/spec/`, or equivalent files.
53
+
54
+ - {{explicit_rule}}
55
+
56
+ ## Code-Inferred Conventions
57
+
58
+ Conventions inferred from consistent code patterns. These are weaker than explicit rules.
59
+
60
+ - {{inferred_rule}}
61
+
62
+ ## Pending Confirmation
63
+
64
+ - {{pending_item}}
@@ -0,0 +1,168 @@
1
+ # {{codebase_name}} Navigation
2
+
3
+ ## Identity
4
+
5
+ | Field | Value |
6
+ |-------|-------|
7
+ | Name | {{codebase_name}} |
8
+ | Root | {{codebase_root}} |
9
+ | Type | {{codebase_type}} |
10
+ | Role | {{codebase_role}} |
11
+ | Location | {{codebase_location}} |
12
+ | Scan Status | {{scan_status}} |
13
+
14
+ ## Stack
15
+
16
+ | Item | Value | Notes |
17
+ |------|-------|-------|
18
+ | Framework | {{framework}} | {{framework_notes}} |
19
+ | Runtime / Language | {{runtime}} | {{runtime_notes}} |
20
+ | Package / Build Tool | {{build_tool}} | {{build_tool_notes}} |
21
+ {{#is_frontend}}
22
+ | UI Library | {{ui_library}} | {{ui_library_notes}} |
23
+ | State Management | {{state_management}} | {{state_management_notes}} |
24
+ | Request Library | {{request_library}} | {{request_library_notes}} |
25
+ {{/is_frontend}}
26
+ {{#is_backend}}
27
+ | Database Access | {{database_access}} | {{database_access_notes}} |
28
+ | API Style | {{api_style}} | {{api_style_notes}} |
29
+ {{/is_backend}}
30
+
31
+ ## Application Entry Points
32
+
33
+ | Item | Value | Notes |
34
+ |------|-------|-------|
35
+ | App Entry | {{app_entry}} | {{app_entry_notes}} |
36
+ {{#is_frontend}}
37
+ | Router | {{router}} | {{router_notes}} |
38
+ | Pages / Views | {{pages}} | {{pages_notes}} |
39
+ | Layouts | {{layouts}} | {{layouts_notes}} |
40
+ | API Client | {{api_client}} | {{api_client_notes}} |
41
+ | Auth / Permission | {{frontend_auth}} | {{frontend_auth_notes}} |
42
+ | Styles / Theme | {{styles}} | {{styles_notes}} |
43
+ | Env Config | {{frontend_env}} | {{frontend_env_notes}} |
44
+ {{/is_frontend}}
45
+ {{#is_backend}}
46
+ | Routes / Controllers | {{routes}} | {{routes_notes}} |
47
+ | Middleware / Filters | {{middleware}} | {{middleware_notes}} |
48
+ | Auth / Permission | {{backend_auth}} | {{backend_auth_notes}} |
49
+ | Env Config | {{backend_env}} | {{backend_env_notes}} |
50
+ | API Docs | {{api_docs}} | {{api_docs_notes}} |
51
+ {{/is_backend}}
52
+
53
+ ## Structure
54
+
55
+ ### Directory Map
56
+
57
+ ```
58
+ {{directory_tree}}
59
+ ```
60
+
61
+ | Directory | Purpose | Notes |
62
+ |-----------|---------|-------|
63
+ {{#directory_rows}}
64
+ | `{{path}}` | {{purpose}} | {{notes}} |
65
+ {{/directory_rows}}
66
+
67
+ ### Call Chain Map
68
+
69
+ {{#is_backend}}
70
+ #### API Modules
71
+
72
+ | Route Group | Handler | Routes | Service → Repository → DAO |
73
+ |-------------|---------|--------|---------------------------|
74
+ {{#api_modules}}
75
+ | {{route_group}} | {{handler_file}} | {{routes}} | {{call_chain}} |
76
+ {{/api_modules}}
77
+
78
+ #### Scheduled Jobs
79
+
80
+ | Job | Cron | Trigger Type | Call Chain | Notes |
81
+ |-----|------|-------------|------------|-------|
82
+ {{#jobs}}
83
+ | {{job_name}} | {{cron}} | {{trigger_type}} | {{call_chain}} | {{notes}} |
84
+ {{/jobs}}
85
+
86
+ #### External Integrations
87
+
88
+ | Integration | Path | Direction | Notes |
89
+ |-------------|------|-----------|-------|
90
+ {{#integrations}}
91
+ | {{name}} | {{path}} | {{direction}} | {{notes}} |
92
+ {{/integrations}}
93
+ {{/is_backend}}
94
+
95
+ {{#is_frontend}}
96
+ #### Route-Component Map
97
+
98
+ | Route | Page Component | Child Components | Composables | API Calls |
99
+ |-------|---------------|------------------|-------------|-----------|
100
+ {{#route_component_rows}}
101
+ | `{{route}}` | {{page_component}} | {{child_components}} | {{composables}} | {{api_calls}} |
102
+ {{/route_component_rows}}
103
+
104
+ #### Data Flow
105
+
106
+ | Composable / Store | API Client | State Shape | Consumed By |
107
+ |--------------------|-----------|-------------|-------------|
108
+ {{#data_flow_rows}}
109
+ | {{composable}} | {{api_client}} | {{state_shape}} | {{consumed_by}} |
110
+ {{/data_flow_rows}}
111
+ {{/is_frontend}}
112
+
113
+ ### Conventions
114
+
115
+ {{#is_backend}}
116
+ | Category | Rule | Source |
117
+ |----------|------|--------|
118
+ {{#backend_conventions}}
119
+ | {{category}} | {{rule}} | {{source}} |
120
+ {{/backend_conventions}}
121
+
122
+ Convention categories: Layer order, Conversion (VO↔Domain↔Model), Interface/DI, Error handling, Naming, Swagger/API docs
123
+ {{/is_backend}}
124
+
125
+ {{#is_frontend}}
126
+ | Category | Rule | Source |
127
+ |----------|------|--------|
128
+ {{#frontend_conventions}}
129
+ | {{category}} | {{rule}} | {{source}} |
130
+ {{/frontend_conventions}}
131
+
132
+ Convention categories: Component hierarchy, Data flow (composable/store), Route naming, Style/theme, API client, State management
133
+ {{/is_frontend}}
134
+
135
+ ## Commands
136
+
137
+ | Type | Command | Source |
138
+ |------|---------|--------|
139
+ | Install | {{install_cmd}} | {{install_source}} |
140
+ | Dev | {{dev_cmd}} | {{dev_source}} |
141
+ | Build | {{build_cmd}} | {{build_source}} |
142
+ | Test | {{test_cmd}} | {{test_source}} |
143
+ | Lint | {{lint_cmd}} | {{lint_source}} |
144
+ {{#codegen_cmds}}
145
+ | {{codegen_name}} | {{codegen_cmd}} | {{codegen_source}} |
146
+ {{/codegen_cmds}}
147
+
148
+ ## Rule Sources
149
+
150
+ See `.planning/rules/INDEX.md` for the full project rule index. This codebase's relevant rule files:
151
+
152
+ | Rule | Path | Status |
153
+ |------|------|--------|
154
+ {{#rule_sources}}
155
+ | {{rule_name}} | {{rule_path}} | {{rule_status}} |
156
+ {{/rule_sources}}
157
+
158
+ ## Requirement-Relevant Areas
159
+
160
+ {{requirement_areas}}
161
+
162
+ ## Notes
163
+
164
+ {{notes}}
165
+
166
+ ## Missing Information
167
+
168
+ {{missing_information}}
@@ -0,0 +1,43 @@
1
+ # {{domain_title}} Spec Index
2
+
3
+ Generated during project initialization.
4
+
5
+ ## Generation Metadata
6
+
7
+ - Run ID: `{{run_id}}`
8
+ - Generated at: {{generated_at}}
9
+ - Regenerate when: navigation facts, topic discovery evidence, or depth spec paths change.
10
+
11
+ ## Specs
12
+
13
+ | Name | Type | Stack Key | Spec | Navigation |
14
+ |------|------|-----------|------|------------|
15
+ | {{name}} | {{type}} | {{stack_key}} | {{spec_path}} | {{navigation_path}} |
16
+
17
+ ## Read Order
18
+
19
+ 1. `.planning/rules/INDEX.md`
20
+ 2. `.context/spec/index.md`
21
+ 3. Matching stack spec
22
+ 4. Matching codebase spec
23
+ 5. Applicable depth specs from the registry below
24
+ 6. Matching navigation file
25
+ 7. `.planning/code-index/` machine symbols/relations for source-level relation facts; if fast mode skipped generation, refresh through `workflow-code-index` or record fallback
26
+ 8. Actual source files selected from navigation/spec/code-index evidence
27
+
28
+ ## Depth Spec Registry
29
+
30
+ | Codebase | Topic | Status | Spec |
31
+ |----------|-------|--------|------|
32
+ | {{codebase_name}} | {{topic}} | {{present_or_not_applicable}} | {{depth_spec_path_or_none}} |
33
+
34
+ {{depth_spec_markers}}
35
+
36
+ ## Pending Templates
37
+
38
+ Record discovered topics whose matching depth spec template is missing as `PENDING_TEMPLATE`.
39
+ Mirror the same blocker in `.planning/STATE.md` front matter.
40
+
41
+ ## Pending Confirmation
42
+
43
+ - {{pending_item}}
@@ -0,0 +1,45 @@
1
+ # Context Spec Index
2
+
3
+ Generated during project initialization. This file is a registry and read-order contract for project technical specifications.
4
+
5
+ ## Version
6
+
7
+ - Generated at: {{generated_at}}
8
+ - Regenerate when: any codebase manifest changes, a framework major version changes, key libraries change, or navigation/call-chain structure changes materially.
9
+
10
+ ## Read Order
11
+
12
+ Downstream skills must read rule sources in this order:
13
+
14
+ 1. `.planning/rules/INDEX.md`
15
+ 2. `.context/spec/index.md`
16
+ 3. Matching `.context/spec/stacks/{stack_key}.md`
17
+ 4. Matching `.context/spec/frontend|backend/{codebase}.md`
18
+ 5. Matching `.context/spec/{domain}/index.md` and applicable depth specs
19
+ 6. `.planning/navigation/{codebase}.md`
20
+ 7. `.planning/code-index/` machine symbols/relations for source-level relation facts; if fast mode skipped generation, refresh through `workflow-code-index` or record fallback
21
+ 8. Actual source files
22
+
23
+ Priority when rules conflict:
24
+
25
+ 1. User-explicit requirement
26
+ 2. Explicit project rules (`AGENTS.md`, `CLAUDE.md`, `.cursorrules`, existing `.context/spec/`)
27
+ 3. Codebase spec
28
+ 4. Stack spec
29
+ 5. Code-inferred convention
30
+
31
+ ## Stack Specs
32
+
33
+ | Stack Key | Spec | Codebases | Manifest Sources | Fingerprint |
34
+ |-----------|------|-----------|------------------|-------------|
35
+ | {{stack_key}} | `.context/spec/stacks/{{stack_key}}.md` | {{codebases}} | {{manifest_sources}} | {{fingerprint}} |
36
+
37
+ ## Codebase Specs
38
+
39
+ | Codebase | Type | Navigation | Stack Key | Spec |
40
+ |----------|------|------------|-----------|------|
41
+ | {{name}} | {{type}} | `.planning/navigation/{{name}}.md` | {{stack_key}} | `.context/spec/{{domain}}/{{name}}.md` |
42
+
43
+ ## Missing Or Pending
44
+
45
+ - {{pending_item}}
@@ -0,0 +1,57 @@
1
+ # Execution Contract
2
+
3
+ ## Layer Model
4
+
5
+ Each codebase has its own layer conventions documented in `.planning/navigation/{name}.md`. This section consolidates the layer rules that downstream skills must follow.
6
+
7
+ {{#backend_codebases}}
8
+ ### {{name}} ({{role}})
9
+
10
+ | Layer | Directory | Responsibility | Dependency Direction |
11
+ |-------|-----------|----------------|---------------------|
12
+ | {{layer_1_name}} | {{layer_1_dir}} | {{layer_1_responsibility}} | {{layer_1_depends}} |
13
+ | {{layer_2_name}} | {{layer_2_dir}} | {{layer_2_responsibility}} | {{layer_2_depends}} |
14
+ | {{layer_3_name}} | {{layer_3_dir}} | {{layer_3_responsibility}} | {{layer_3_depends}} |
15
+ | {{layer_4_name}} | {{layer_4_dir}} | {{layer_4_responsibility}} | {{layer_4_depends}} |
16
+
17
+ **Conversion rules**: {{conversion_rules}}
18
+
19
+ **Interface rules**: {{interface_rules}}
20
+
21
+ {{/backend_codebases}}
22
+
23
+ {{#frontend_codebases}}
24
+ ### {{name}} ({{role}})
25
+
26
+ | Layer | Directory | Responsibility |
27
+ |-------|-----------|----------------|
28
+ | Pages / Views | {{pages_dir}} | Route-level page components |
29
+ | Page Components | {{page_components_dir}} | Page-private business components |
30
+ | Common Components | {{common_components_dir}} | Shared/reusable components |
31
+ | Layout Components | {{layout_dir}} | Layout, menu, header, container |
32
+ | Hooks / Composables | {{hooks_dir}} | Shared stateful logic |
33
+
34
+ **Component rules**: {{component_rules}}
35
+
36
+ {{/frontend_codebases}}
37
+
38
+ ## TDD Strategy
39
+
40
+ Tests can be written before code (TDD) or incrementally within the same task, but must not be deferred to a standalone final test wave. Each code task in the change plan must include a test strategy before execution begins. See `workflow-change-plan` "测试策略强制规则" for the test selection matrix and skip classification.
41
+
42
+ ## Code Generation
43
+
44
+ {{code_generation_rules}}
45
+
46
+ ## Verification Gates
47
+
48
+ All code tasks must pass three gates before marking complete:
49
+ 1. **Test gate**: task-level tests must be added/updated and pass (or skip classified as acceptable/needs-review).
50
+ 2. **Spec Compliance gate**: every MUST rule from the relevant `.context/spec/` depth spec file must be satisfied or explicitly waived.
51
+ 3. **Verification Iron Law**: before claiming completion: IDENTIFY the verification command → RUN it → READ the output → VERIFY against expected results → ONLY THEN mark complete.
52
+
53
+ For task-level test strategy requirements, see `workflow-execute-phase` "验证铁律" and `workflow-change-plan` "测试策略强制规则" and "跳过自动化测试分级".
54
+
55
+ ---
56
+
57
+ *Generated during project initialization. Update as project conventions evolve.*
@@ -0,0 +1,40 @@
1
+ # Navigation Index
2
+
3
+ <!-- project_context_run_id: {{run_id}}; code_index_status: {{code_index_status}}; code_index_skip_reason: {{code_index_skip_reason}} -->
4
+
5
+ ## Codebase Registry
6
+
7
+ | Name | Path | Type | Role | Navigation | Scan Status |
8
+ |------|------|------|------|------------|-------------|
9
+ {{#codebases}}
10
+ | {{name}} | {{path}} | {{type}} | {{role}} | `.planning/navigation/{{name}}.md` | {{scan_status}} |
11
+ {{/codebases}}
12
+
13
+ ## Project Rule Package
14
+
15
+ The project rule index is at `.planning/rules/INDEX.md`. Downstream skills should read it first, then use `.context/spec/index.md` to resolve stack/codebase specs and each domain index to resolve applicable depth specs before using codebase navigation files for coarse routing. Use `.planning/code-index/` before reading actual source evidence when source-level relation facts are needed; if fast mode skipped index generation, refresh it through `workflow-code-index` first or record the fallback.
16
+
17
+ | Rule Source | Path | Status |
18
+ |-------------|------|--------|
19
+ | Rules Index | `.planning/rules/INDEX.md` | {{rules_index_status}} |
20
+ | Execution Contract | `.planning/execution-contract.md` | {{execution_contract_status}} |
21
+ | Toolchain Contract | `.planning/toolchain.md` | {{toolchain_status}} |
22
+ | Planning Lessons | `.planning/lessons/README.md` | {{lessons_status}} |
23
+ | Context Spec Index | `.context/spec/index.md` | {{context_spec_index_status}} |
24
+ | Stack Specs | `.context/spec/stacks/` | {{stack_specs_status}} |
25
+ | Context Specs | `.context/spec/` | {{context_spec_status}} |
26
+ | Code Index | `.planning/code-index/` | {{code_index_status}} |
27
+ | Design Rule Pack | `.context/spec/design/` | {{design_rule_pack_status}} |
28
+ | Context Workflow | `.context/workflow/` | {{context_workflow_status}} |
29
+ | Context Lessons | `.context/lessons/README.md` | {{context_lessons_status}} |
30
+ | Root Instructions | `AGENTS.md` / `CLAUDE.md` | {{root_instructions_status}} |
31
+
32
+ ## Downstream Read Contract
33
+
34
+ | Skill | Should Read |
35
+ |-------|-------------|
36
+ | `workflow-requirement-baseline` | `.planning/PROJECT.md`, this INDEX.md, relevant codebase navigation files, and `.planning/code-index/` for source-level relation checks |
37
+ | `workflow-feature-breakdown` | `.planning/PROJECT.md`, this INDEX.md, and codebase navigation files for codebases relevant to the feature |
38
+ | `workflow-frontend-tech-spec` | `.planning/rules/INDEX.md` → `.context/spec/index.md` → matching stack spec → matching frontend codebase spec → frontend domain index/applicable depth specs → this INDEX.md/navigation → code-index → source evidence |
39
+ | `workflow-backend-tech-spec` | `.planning/rules/INDEX.md` → `.context/spec/index.md` → matching stack spec → matching backend codebase spec → backend domain index/applicable depth specs → this INDEX.md/navigation → code-index → source evidence |
40
+ | `workflow-change-plan` | `.planning/rules/INDEX.md` + `.context/spec/index.md` for task gates, this INDEX.md for output locations and source navigation |
@@ -0,0 +1,109 @@
1
+ # {{Project Name}}
2
+
3
+ <!-- project_context_run_id: {{run_id}}; code_index_status: {{code_index_status}}; code_index_skip_reason: {{code_index_skip_reason}} -->
4
+
5
+ ## Project Basics
6
+
7
+ - **Name**: {{project_name}}
8
+ - **Type**: {{project_type}}
9
+ - **What This Is**: {{what_this_is}}
10
+ - **Primary Users / Domain**: {{primary_users_or_domain}}
11
+ - **Core Value**: {{core_value_or_pending}}
12
+
13
+ ## Project Locations
14
+
15
+ | Name | Path | Type | Role | Scan Status | Notes |
16
+ |------|------|------|------|-------------|-------|
17
+ {{#codebases}}
18
+ | {{name}} | {{path}} | {{type}} | {{role}} | {{scan_status}} | {{notes}} |
19
+ {{/codebases}}
20
+
21
+ ## Current Structure
22
+
23
+ - **Repository Type**: {{repo_type}}
24
+ - **Planning Root**: `.planning/`
25
+ - **Navigation Root**: `.planning/navigation/`
26
+ - **Code Index Root**: `.planning/code-index/`(generated by default through `workflow-code-index`; skipped only in fast mode)
27
+ - **Code Index Status**: `{{code_index_status}}`
28
+ - **Code Index Skip Reason**: {{code_index_skip_reason}}
29
+ - **Design Rule Pack Status**: `{{design_rule_pack_status}}`
30
+ - **Design Rule Pack Reason**: {{design_rule_pack_reason}}
31
+
32
+ ```text
33
+ {{directory_map}}
34
+ ```
35
+
36
+ ## Navigation
37
+
38
+ Detailed code navigation is split by codebase so later skills can load only what they need:
39
+
40
+ - `.planning/navigation/INDEX.md` — codebase registry and quick pointers
41
+ {{#codebases}}
42
+ - `.planning/navigation/{{name}}.md` — {{role}} structure, entries, conventions, commands
43
+ {{/codebases}}
44
+ - `.planning/code-index/` — machine facts for symbols, relations, entrypoints, and data flow; generated during full initialization unless fast mode skipped it
45
+
46
+ ## Project Rule Package
47
+
48
+ Record generated rule snapshots, existing project-specific rules, and workflow contracts. Generated rules must preserve source labels (`显式规则`, `代码推断`, `待确认`) and must not promote inconsistent legacy code to hard rules.
49
+
50
+ | Rule Source | Path | Status | Notes |
51
+ |-------------|------|--------|-------|
52
+ | Planning Rules | `.planning/rules/INDEX.md` | {{planning_rules_status}} | {{planning_rules_notes}} |
53
+ | Execution Contract | `.planning/execution-contract.md` | {{execution_contract_status}} | {{execution_contract_notes}} |
54
+ | Toolchain Contract | `.planning/toolchain.md` | {{toolchain_status}} | {{toolchain_notes}} |
55
+ | Planning Lessons | `.planning/lessons/README.md` | {{planning_lessons_status}} | {{planning_lessons_notes}} |
56
+ | Planning Milestones | `.planning/milestones/` | {{planning_milestones_status}} | {{planning_milestones_notes}} |
57
+ | Planning Requirements | `.planning/requirements/` | {{planning_requirements_status}} | {{planning_requirements_notes}} |
58
+ | Context Spec Index | `.context/spec/index.md` | {{context_spec_index_status}} | {{context_spec_index_notes}} |
59
+ | Stack Specs | `.context/spec/stacks/` | {{stack_specs_status}} | {{stack_specs_notes}} |
60
+ | Context Specs | `.context/spec/` | {{context_spec_status}} | {{context_spec_notes}} |
61
+ | Context Workflow | `.context/workflow/` | {{context_workflow_status}} | {{context_workflow_notes}} |
62
+ | Context Lessons | `.context/lessons/README.md` | {{context_lessons_status}} | {{context_lessons_notes}} |
63
+ | Root Instructions | `AGENTS.md` / `CLAUDE.md` | {{root_instructions_status}} | {{root_instructions_notes}} |
64
+
65
+ ## History Model
66
+
67
+ This workflow uses planning and milestone artifacts as the primary project memory. Do not assume outbound-call style `features/*.spec.md` history exists.
68
+
69
+ | History Source | Role | Status | Notes |
70
+ |----------------|------|--------|-------|
71
+ | `.planning/milestones/` | 已归档里程碑和交付结果 | {{planning_milestones_status}} | {{planning_milestones_notes}} |
72
+ | `.planning/requirements/` | 当前或历史需求基线 | {{planning_requirements_status}} | {{planning_requirements_notes}} |
73
+ | `.planning/lessons/` | 跨里程碑经验教训 | {{planning_lessons_status}} | {{planning_lessons_notes}} |
74
+ | `.planning/*/CONTEXT.md` | 阶段上下文与决策记录 | {{planning_context_status}} | {{planning_context_notes}} |
75
+ | `features/` | Legacy feature docs, only if present | {{features_history_status}} | {{features_history_notes}} |
76
+ | `.context/lessons/` | Legacy/project-rule lessons, only if present | {{context_lessons_status}} | {{context_lessons_notes}} |
77
+
78
+ ## Shared References
79
+
80
+ | Item | Path | Notes |
81
+ |------|------|-------|
82
+ | Project Context | `.planning/PROJECT.md` | 项目总览、结构、约束、关键决策 |
83
+ | Workflow State | `.planning/STATE.md` | 初始化状态和后续建议 |
84
+ | Navigation Index | `.planning/navigation/INDEX.md` | 后续 skill 的快捷入口 |
85
+ | Code Index | `.planning/code-index/` | 机器事实索引,细粒度调用/符号/数据流追踪;fast mode 可跳过 |
86
+ | Requirements Baseline | `.planning/requirements/baseline.md` | 需求讨论后生成,不在初始化阶段创建 |
87
+ | Feature Breakdown | `.planning/features/{功能名}/功能点梳理.md` | 需求基线后生成的测试可读功能点梳理 |
88
+ | Frontend Tech Doc | `.planning/features/{功能名}/前端技术方案.md` | 前端技术方案输出 |
89
+ | Backend Tech Doc | `.planning/features/{功能名}/后端技术方案.md` | 后端技术方案输出 |
90
+ | Change List | `.planning/features/{功能名}/变更清单.md` | 变更清单输出 |
91
+ | Codebase Map | `.planning/codebase/` | 可选,深度代码库扫描结果 |
92
+
93
+ ## Constraints
94
+
95
+ {{constraints}}
96
+
97
+ ## Key Decisions
98
+
99
+ | Decision | Rationale | Outcome |
100
+ |----------|-----------|---------|
101
+ | {{decision}} | {{rationale}} | {{outcome}} |
102
+
103
+ ## Missing Information
104
+
105
+ {{missing_information}}
106
+
107
+ ---
108
+
109
+ *Last updated: {{date}} after project initialization.*