@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,271 @@
1
+ ---
2
+ name: workflow-execute-phase
3
+ description: "Use when a planned .planning phase needs implementation, dependency-aware task execution, progress tracking, and verification evidence."
4
+ ---
5
+
6
+ ## Legacy Command Metadata
7
+
8
+ Original slash-command metadata retained only as workflow invocation guidance.
9
+
10
+ ```yaml
11
+ argument-hint: "<phase-number> [--wave N] [--gaps-only] [--interactive]"
12
+ user-invocable: true
13
+ pattern: pipeline
14
+ resumable: true
15
+ state-key: phase-execution
16
+ ```
17
+
18
+ <objective>
19
+ Execute all plans in a phase using wave-based parallel execution.
20
+
21
+ Orchestrator stays lean: discover plans, analyze dependencies, group into waves, spawn subagents, collect results. Each subagent loads the full execute-plan context and handles its own plan.
22
+
23
+ Optional wave filter:
24
+ - `--wave N` executes only Wave `N` for pacing, quota management, or staged rollout
25
+ - phase verification/completion still only happens when no incomplete plans remain after the selected wave finishes
26
+
27
+ Flag handling rule:
28
+ - The optional flags documented below are available behaviors, not implied active behaviors
29
+ - A flag is active only when its literal token appears in `$ARGUMENTS`
30
+ - If a documented flag is absent from `$ARGUMENTS`, treat it as inactive
31
+
32
+ Context budget: ~15% orchestrator, 100% fresh per subagent.
33
+ </objective>
34
+
35
+ <execution_context>
36
+ references/execute-phase.md
37
+ references/ui-brand.md
38
+ </execution_context>
39
+
40
+ <runtime_note>
41
+ </runtime_note>
42
+
43
+ <context>
44
+ Phase: $ARGUMENTS
45
+
46
+ **Requirement backfill rule:**
47
+ During execution, if an implementation change would alter external behavior, notifications, failure handling, retry/scheduling policy, permissions, API contracts, persistence/data-writing rules, compatibility behavior, or non-functional guarantees, stop before or immediately after the smallest safe edit and update `.planning/requirements/baseline.md` first.
48
+
49
+ After updating the baseline, update every affected downstream artifact: feature breakdown, frontend/backend tech specs, change list, and pipeline/execution state. Do not let implementation become the only source of truth for new behavior.
50
+
51
+ Backfill is not required for pure refactors, local method extraction, naming cleanup, formatting, comments, or log wording changes that do not alter behavior.
52
+
53
+ **Project rule package:**
54
+ Before assigning or executing implementation work, discover project rule sources in the target workspace:
55
+ - `.planning/rules/INDEX.md`
56
+ - `.planning/execution-contract.md`
57
+ - `.planning/toolchain.md`
58
+ - `.planning/lessons/README.md`
59
+ - `.planning/milestones/`
60
+ - `.planning/requirements/`
61
+ - `.context/spec/index.md`
62
+ - matching `.context/spec/stacks/{stack_key}.md`
63
+ - matching `.context/spec/frontend|backend/{codebase}.md`
64
+ - `.planning/code-index/` when present
65
+ - `.context/spec/`
66
+ - `.context/workflow/tdd.md`
67
+ - `.context/workflow/checklist.md`
68
+ - `.context/lessons/README.md`(如存在)
69
+ - root `AGENTS.md`, `CLAUDE.md`, or equivalent project instruction files
70
+
71
+ If rule sources exist, resolve them using this read order before delegating work: `.planning/rules/INDEX.md` → `.context/spec/index.md` → matching stack spec → matching codebase spec → `.planning/navigation/{codebase}.md` → `.planning/code-index/` when present and relation facts are needed → actual source files. Include the resolved rules and relevant code-index evidence in the files delegated to execution workers and require task-level rule activation. If no rule sources exist, record that no project rule package was found and proceed with the plan context.
72
+
73
+ When `.planning/code-index/` exists, implementation workers should use it to locate callers, callees, imports, routes, data/resource reads and writes, and tests before editing. They must still read source files at `evidence_path` before making changes.
74
+
75
+ **Baseline and change-list contract:**
76
+ Before assigning implementation work, read the relevant requirement baseline and change list when present:
77
+ - `.planning/requirements/baseline.md`
78
+ - `.planning/features/{功能名}/功能点梳理.md`
79
+ - `.planning/features/{功能名}/前端技术方案.md`
80
+ - `.planning/features/{功能名}/后端技术方案.md`
81
+ - `.planning/features/{功能名}/*变更清单.md`
82
+
83
+ Legacy compatibility: if the `.planning/features/{功能名}/` documents are missing, workers may read root `features/{功能名}/` as historical/legacy input, but new generated workflow artifacts should stay under `.planning/features/{功能名}/`.
84
+
85
+ Workers must implement only confirmed scope. Pending baseline decisions or challenge items that affect scope, semantics, ownership, compatibility, or implementation cost must be reported as blockers, not silently resolved in code.
86
+ Use `.planning/milestones/`, `.planning/requirements/`, `.planning/lessons/`, and phase `CONTEXT.md` as primary history when a task needs history. Treat `features/` or `.context/lessons/` as optional legacy/project-rule sources only when present.
87
+
88
+ **Available optional flags (documentation only — not automatically active):**
89
+ - `--wave N` — Execute only Wave `N` in the phase. Use when you want to pace execution or stay inside usage limits.
90
+ - `--gaps-only` — Execute only gap closure plans (plans with `gap_closure: true` in frontmatter). Use after verify-work creates fix plans.
91
+ - `--interactive` — Execute plans sequentially inline (no subagents) with user checkpoints between tasks. Lower token usage, pair-programming style. Best for small phases, bug fixes, and verification gaps.
92
+
93
+ **Active flags must be derived from `$ARGUMENTS`:**
94
+ - `--wave N` is active only if the literal `--wave` token is present in `$ARGUMENTS`
95
+ - `--gaps-only` is active only if the literal `--gaps-only` token is present in `$ARGUMENTS`
96
+ - `--interactive` is active only if the literal `--interactive` token is present in `$ARGUMENTS`
97
+ - If none of these tokens appear, run the standard full-phase execution flow with no flag-specific filtering
98
+ - Do not infer that a flag is active just because it is documented in this prompt
99
+
100
+ Context files are resolved inside the workflow per-subagent `<files_to_read>` blocks.
101
+ </context>
102
+
103
+ <rule_activation_gate>
104
+ Before any worker edits code for a task, it must state a compact Rule Activation block:
105
+
106
+ ```markdown
107
+ ## Rule Activation
108
+ - Task:
109
+ - Affected layers/modules:
110
+ - Spec index: .context/spec/index.md
111
+ - Stack spec resolved: (from index "Stack Specs" table)
112
+ - Codebase spec resolved: (from index "Codebase Specs" table)
113
+ - Depth spec files to check: (from domain index)
114
+ - MUST rules to verify:
115
+ - Rules read:
116
+ - Related lessons:
117
+ - Toolchain/codegen/mock/DI requirements:
118
+ - Test strategy from change list:
119
+ - Planned test command(s):
120
+ - Execution test command(s):
121
+ - Test files to add/update:
122
+ - Automation skipped? type/reason/debt:
123
+ - Completion gate:
124
+ ```
125
+
126
+ The worker must not treat existing code as more authoritative than explicit project rules. If project rules conflict with the change plan or existing implementation, stop and report the conflict instead of silently choosing.
127
+
128
+ When the change list includes task-level `适用规范`, `相关经验教训`, `执行前门禁`, `测试策略`, or `审查要求`, those fields are mandatory execution inputs.
129
+ When the change list includes `需求来源` or `CR-*` decision references, the worker must keep implementation inside those confirmed decisions and mention any deviation before editing.
130
+
131
+ If a code task lacks a task-level test strategy, planned command, execution command placeholder, or skip-automation classification, the worker must stop before editing and report the task as blocked for change-list backfill. Do not invent a silent testing scope during implementation.
132
+ </rule_activation_gate>
133
+
134
+ <execution_discipline>
135
+ Preserve these generalized workflow rules from the project rule package when applicable:
136
+
137
+ 1. Do not skip required workflow steps or verification because a change looks small unless the user explicitly approved simplification.
138
+ 2. Before editing, activate the relevant rules, lessons, toolchain, tests, generated artifacts, and compatibility gates for the task.
139
+ 3. Execute in dependency order derived from the change list and project architecture; do not hardcode outbound-call's Go layer order for non-Go projects.
140
+ 4. Tests can be written before code (TDD) or incrementally within the same task, but task-level tests must not be deferred to a final standalone test wave.
141
+ 5. Before marking a code task complete, add/update the required task-level tests unless the change list contains an acceptable or reviewed skip classification.
142
+ 6. Refine planning-level test commands into execution-level commands that are precise enough to rerun the changed tests, then run them and record the result.
143
+ 7. **Verification Iron Law** — Before marking ANY task complete, pass the verification gate:
144
+
145
+ ```
146
+ BEFORE claiming completion or expressing satisfaction:
147
+ 1. IDENTIFY: What command proves this claim?
148
+ 2. RUN: Execute the FULL command (fresh, complete in this session)
149
+ 3. READ: Full output, check exit code, count failures
150
+ 4. VERIFY: Does output confirm the claim?
151
+ - If NO: State actual status with evidence, fix, re-run
152
+ - If YES: State claim WITH evidence
153
+ 5. ONLY THEN: Mark task complete
154
+
155
+ Skip any step = dishonesty, not efficiency.
156
+ ```
157
+
158
+ **Common false completion patterns (forbidden wording):**
159
+ | False claim | Requires | Not sufficient |
160
+ |---|---|---|
161
+ | "Tests pass" | Test output: 0 failures | Previous run, "should pass" |
162
+ | "Linter clean" | Linter output: 0 errors | Partial check |
163
+ | "Build succeeds" | Build command: exit 0 | Linter passing |
164
+ | "Bug fixed" | Test original symptom: passes | Code changed, assumed fixed |
165
+ | "Agent reported success" | VCS diff + verify output | Agent claim alone |
166
+
167
+ **Red flags — STOP and verify before proceeding:**
168
+ - Using "should", "probably", "seems to" about completion
169
+ - Expressing satisfaction before verification ("Great!", "Perfect!", "Done!")
170
+ - About to commit/push/complete without fresh verification
171
+ - Trusting subagent success reports without verifying output
172
+
173
+ 8. **Spec Compliance Gate** — After task implementation and before marking complete, check the applicable depth spec.
174
+
175
+ **Resolve spec paths through the index chain — do not hardcode directory names:**
176
+ 1. Read `.context/spec/index.md` — the project's spec registry
177
+ 2. From the "Stack Specs" table, find the stack spec path for your codebase (e.g., BACKEND → `.context/spec/stacks/python-fastapi-pydantic2-sqlalchemy-playwright.md`)
178
+ 3. From the "Codebase Specs" table, find the codebase spec path (e.g., BACKEND → `.context/spec/backend/BACKEND.md`)
179
+ 4. From "Detailed Spec Packages", find the domain index (e.g., `.context/spec/backend/index.md`) and read the relevant layer specs it lists
180
+
181
+ The paths vary per project. `.context/spec/index.md` is the single source of truth for where specs live.
182
+
183
+ For every MUST rule in the resolved spec files that applies to the layers you modified, either:
184
+ - Confirm the implementation satisfies it, with evidence; or
185
+ - Document why it does not apply.
186
+
187
+ Record the check in the task completion block:
188
+
189
+ ```yaml
190
+ ## Spec Compliance Check
191
+ - Spec index: .context/spec/index.md
192
+ - Stack spec: stacks/python-fastapi-pydantic2-sqlalchemy-playwright.md
193
+ - Codebase spec: backend/BACKEND.md
194
+ - Code index evidence: `.planning/code-index/` checked or unavailable with reason
195
+ - Depth spec files checked: service.md, errors.md
196
+ - MUST rules:
197
+ - "Do not expose secrets in error payloads" → ✅ satisfied (secrets stripped in response schema)
198
+ - "Browser resources must be explicitly cleaned up" → ✅ satisfied (lifespan shutdown handler)
199
+ - SHOULD rules pending: none
200
+ ```
201
+
202
+ Unresolved MUST violations block task completion. Report them as blocked, do not silently proceed.
203
+
204
+ 10. **Lessons Extraction** — Before marking task complete, ask: "Is there anything worth preserving from this task?"
205
+
206
+ Positive lesson candidates:
207
+ - A new code pattern or design approach that worked well
208
+ - A subtle dependency or configuration that was non-obvious
209
+ - A test strategy that caught real issues
210
+ - A decision rationale that future tasks should know
211
+
212
+ If yes, write to `.context/lessons/YYYY-MM-DD-{slug}.md` following existing lesson format. If no, skip.
213
+
214
+ This applies to both positive patterns and regression prevention. Good practices deserve preservation as much as bug fixes.
215
+
216
+ 11. **AI Output Boundary** — When a task involves LLM-generated user-facing content (recommendation reasons, summaries, descriptions, error messages in natural language), the implementation must define:
217
+
218
+ - **Fixed part**: content controlled by code, not modifiable by LLM (numbers, IDs, format structure)
219
+ - **Free part**: content delegated to LLM generation (descriptive language, tone, summary wording)
220
+ - **Constraint list**: things the LLM must NOT output
221
+ - **Validation**: how to verify LLM output quality (sample with real data, edge cases)
222
+
223
+ Record these in the spec or implementation notes. Do not treat LLM output as a black box — the fixed/constraint boundary determines where bugs are: wrong fixed part = code bug, violated constraint = prompt/system bug, poor free part = quality bug. Without this boundary, all LLM output issues look like "it just doesn't sound right.""
224
+
225
+ 9. Do not commit unless the user explicitly asks.
226
+ </execution_discipline>
227
+
228
+ <checkpoint_resume>
229
+ ## 断点续传机制
230
+
231
+ 执行前必须读取 `.planning/features/{功能名}/PROGRESS.md`,确定当前执行位置。
232
+
233
+ ### 续传流程
234
+
235
+ 1. **读取进度文件**:若 PROGRESS.md 存在,读取当前 Wave 和执行指针
236
+ 2. **跳过已完成任务**:所有状态为 `done` 的任务不再执行
237
+ 3. **定位续传点**:找到第一个 `pending` 任务,从该任务所在 Wave 开始执行
238
+ 4. **Wave 内执行**:对当前 Wave 中所有 `pending` 任务,按依赖关系执行(无依赖的并行,有依赖的串行)
239
+ 5. **更新进度**:每个任务完成后立即更新 PROGRESS.md(状态改为 `done`,记录完成时间戳)
240
+ 6. **Wave 完成检查**:当前 Wave 所有任务 `done` 后,将执行指针移到下一 Wave
241
+ 7. **全部完成**:所有 Wave 的 `done` 后,更新 PROGRESS.md 标记为 `completed`
242
+ 8. **写入结构化元数据**:全部完成后写入 `.planning/features/{功能名}/PROGRESS.meta.json`,字段见 `feature-development.yaml` 中 `steps[execute].meta_output.fields`:`task_completed`, `task_total`, `build_passed`, `test_passed`。
243
+
244
+ ### 清除上下文后续传
245
+
246
+ 当会话上下文用尽或用户手动清除上下文后:
247
+
248
+ 1. 用户重新调用 `workflow-execute-phase <功能名>`
249
+ 2. 读取 `.planning/features/{功能名}/PROGRESS.md` 找到断点
250
+ 3. 读取 `.planning/features/{功能名}/变更清单.md` 获取当前 Wave 任务详情
251
+ 4. 从断点继续执行,无需重读已完成的上下文
252
+
253
+ ### 自包含任务要求
254
+
255
+ 每个任务在变更清单中的描述必须包含:
256
+ - 所需文件路径和变更类型(新增/修改/删除)
257
+ - 参考实现位置
258
+ - 适用规范编号
259
+ - 测试策略、规划级命令、执行级命令占位或跳过自动化测试分级
260
+ - 完成验证命令和执行结果记录要求
261
+
262
+ 执行者仅凭任务描述 + 当前代码文件即可完成,无需回看整个变更清单或技术方案。
263
+ </checkpoint_resume>
264
+
265
+ <process>
266
+ Execute the execute-phase workflow from references/execute-phase.md end-to-end.
267
+ Preserve all workflow gates (wave execution, checkpoint handling, verification, state updates, routing).
268
+ Additionally preserve the project rule activation gate above for every implementation task and carry rule/test/codegen requirements into worker prompts.
269
+ Additionally apply the checkpoint/resume mechanism: read PROGRESS.md first, skip done tasks, update state after each task completes.
270
+ After all implementation tasks for the requested scope are complete and required verification/state updates have been recorded, call `workflow-context-sync --after-implementation` before the final user-facing completion report. Let `workflow-context-sync` classify changed files and choose Light / Medium / Full. If it requires Full without explicit user authorization, explain the reason and wait for confirmation. Include the context sync result in the final report.
271
+ </process>