@guanlin4924/devflow-pi 0.1.93 → 0.1.95

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 (369) hide show
  1. package/README.md +10 -10
  2. package/node_modules/@playwright/test/LICENSE +202 -0
  3. package/node_modules/@playwright/test/NOTICE +5 -0
  4. package/node_modules/@playwright/test/README.md +318 -0
  5. package/node_modules/@playwright/test/cli.js +19 -0
  6. package/node_modules/@playwright/test/index.d.ts +18 -0
  7. package/node_modules/@playwright/test/index.js +17 -0
  8. package/node_modules/@playwright/test/index.mjs +18 -0
  9. package/node_modules/@playwright/test/package.json +35 -0
  10. package/node_modules/@playwright/test/reporter.d.ts +17 -0
  11. package/node_modules/@playwright/test/reporter.js +17 -0
  12. package/node_modules/@playwright/test/reporter.mjs +17 -0
  13. package/node_modules/playwright/LICENSE +202 -0
  14. package/node_modules/playwright/NOTICE +5 -0
  15. package/node_modules/playwright/README.md +318 -0
  16. package/node_modules/playwright/ThirdPartyNotices.txt +14 -0
  17. package/node_modules/playwright/cli.js +19 -0
  18. package/node_modules/playwright/index.d.ts +17 -0
  19. package/node_modules/playwright/index.js +17 -0
  20. package/node_modules/playwright/index.mjs +18 -0
  21. package/node_modules/playwright/jsx-runtime.js +42 -0
  22. package/node_modules/playwright/jsx-runtime.mjs +21 -0
  23. package/node_modules/playwright/lib/agents/agentParser.js +89 -0
  24. package/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
  25. package/node_modules/playwright/lib/agents/generateAgents.js +395 -0
  26. package/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
  27. package/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
  28. package/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
  29. package/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
  30. package/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +56 -0
  31. package/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
  32. package/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +74 -0
  33. package/node_modules/playwright/lib/cli/reportActions.js +78 -0
  34. package/node_modules/playwright/lib/cli/testActions.js +214 -0
  35. package/node_modules/playwright/lib/common/index.js +2923 -0
  36. package/node_modules/playwright/lib/common/index.js.txt +34 -0
  37. package/node_modules/playwright/lib/errorContext.js +129 -0
  38. package/node_modules/playwright/lib/globals.js +58 -0
  39. package/node_modules/playwright/lib/index.js +815 -0
  40. package/node_modules/playwright/lib/isomorphic.js +260 -0
  41. package/node_modules/playwright/lib/isomorphic.js.txt +9 -0
  42. package/node_modules/playwright/lib/loader/loaderProcessEntry.js +34 -0
  43. package/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +9 -0
  44. package/node_modules/playwright/lib/matchers/expect.js +13490 -0
  45. package/node_modules/playwright/lib/matchers/expect.js.LICENSE +640 -0
  46. package/node_modules/playwright/lib/matchers/expect.js.txt +67 -0
  47. package/node_modules/playwright/lib/mcp/test/browserBackend.js +135 -0
  48. package/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
  49. package/node_modules/playwright/lib/mcp/test/plannerTools.js +150 -0
  50. package/node_modules/playwright/lib/mcp/test/seed.js +82 -0
  51. package/node_modules/playwright/lib/mcp/test/streams.js +44 -0
  52. package/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
  53. package/node_modules/playwright/lib/mcp/test/testContext.js +306 -0
  54. package/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
  55. package/node_modules/playwright/lib/mcp/test/testTools.js +98 -0
  56. package/node_modules/playwright/lib/package.js +47 -0
  57. package/node_modules/playwright/lib/program.js +241 -0
  58. package/node_modules/playwright/lib/runner/index.js +8527 -0
  59. package/node_modules/playwright/lib/runner/index.js.txt +61 -0
  60. package/node_modules/playwright/lib/transform/babelBundle.js +72274 -0
  61. package/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
  62. package/node_modules/playwright/lib/transform/babelBundle.js.txt +325 -0
  63. package/node_modules/playwright/lib/transform/esmLoader.js +8054 -0
  64. package/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +355 -0
  65. package/node_modules/playwright/lib/transform/esmLoader.js.txt +60 -0
  66. package/node_modules/playwright/lib/util.js +373 -0
  67. package/node_modules/playwright/lib/worker/workerProcessEntry.js +1861 -0
  68. package/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
  69. package/node_modules/playwright/package.json +55 -0
  70. package/node_modules/playwright/test.d.ts +18 -0
  71. package/node_modules/playwright/test.js +24 -0
  72. package/node_modules/playwright/test.mjs +35 -0
  73. package/node_modules/playwright/types/test.d.ts +11074 -0
  74. package/node_modules/playwright/types/testReporter.d.ts +950 -0
  75. package/node_modules/playwright-core/LICENSE +202 -0
  76. package/node_modules/playwright-core/NOTICE +5 -0
  77. package/node_modules/playwright-core/README.md +3 -0
  78. package/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
  79. package/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
  80. package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
  81. package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
  82. package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
  83. package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
  84. package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
  85. package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
  86. package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
  87. package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
  88. package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
  89. package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
  90. package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
  91. package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
  92. package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
  93. package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
  94. package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
  95. package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
  96. package/node_modules/playwright-core/browsers.json +52 -0
  97. package/node_modules/playwright-core/cli.js +21 -0
  98. package/node_modules/playwright-core/index.d.ts +17 -0
  99. package/node_modules/playwright-core/index.js +17 -0
  100. package/node_modules/playwright-core/index.mjs +28 -0
  101. package/node_modules/playwright-core/lib/bootstrap.js +88 -0
  102. package/node_modules/playwright-core/lib/coreBundle.js +75813 -0
  103. package/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
  104. package/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
  105. package/node_modules/playwright-core/lib/entry/mcp.js +10 -0
  106. package/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
  107. package/node_modules/playwright-core/lib/package.js +50 -0
  108. package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
  109. package/node_modules/playwright-core/lib/server/electron/loader.js +116 -0
  110. package/node_modules/playwright-core/lib/serverRegistry.js +1939 -0
  111. package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +65 -0
  112. package/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
  113. package/node_modules/playwright-core/lib/tools/cli-client/cli.js +6 -0
  114. package/node_modules/playwright-core/lib/tools/cli-client/help.json +721 -0
  115. package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
  116. package/node_modules/playwright-core/lib/tools/cli-client/output.js +351 -0
  117. package/node_modules/playwright-core/lib/tools/cli-client/program.js +418 -0
  118. package/node_modules/playwright-core/lib/tools/cli-client/registry.js +180 -0
  119. package/node_modules/playwright-core/lib/tools/cli-client/session.js +259 -0
  120. package/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
  121. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +425 -0
  122. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
  123. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
  124. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
  125. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/running-code.md +241 -0
  126. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/session-management.md +225 -0
  127. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
  128. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
  129. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
  130. package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/video-recording.md +143 -0
  131. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
  132. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
  133. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
  134. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
  135. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
  136. package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
  137. package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +174 -0
  138. package/node_modules/playwright-core/lib/tools/utils/extension.js +112 -0
  139. package/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
  140. package/node_modules/playwright-core/lib/utilsBundle.js +85357 -0
  141. package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +1890 -0
  142. package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
  143. package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
  144. package/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  145. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
  146. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
  147. package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
  148. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
  149. package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
  150. package/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
  151. package/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
  152. package/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
  153. package/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
  154. package/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
  155. package/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
  156. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
  157. package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-CVQWJZAA.js +32 -0
  158. package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  159. package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
  160. package/node_modules/playwright-core/lib/vite/recorder/assets/index-hrlLqLtq.js +129 -0
  161. package/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
  162. package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
  163. package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BbkfBe3n.js +32 -0
  164. package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js +182 -0
  165. package/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
  166. package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-DywYcAf8.js +7 -0
  167. package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
  168. package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  169. package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.Bqk9acqE.css +1 -0
  170. package/node_modules/playwright-core/lib/vite/traceViewer/index.B4cLoZK3.js +1 -0
  171. package/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
  172. package/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
  173. package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
  174. package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
  175. package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
  176. package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
  177. package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
  178. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CU5KtEkS.js +5 -0
  179. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
  180. package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
  181. package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
  182. package/node_modules/playwright-core/lib/webp_codec.LICENSE +173 -0
  183. package/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
  184. package/node_modules/playwright-core/lib/xdg-open +1267 -0
  185. package/node_modules/playwright-core/package.json +34 -0
  186. package/node_modules/playwright-core/types/protocol.d.ts +24645 -0
  187. package/node_modules/playwright-core/types/structs.d.ts +52 -0
  188. package/node_modules/playwright-core/types/types.d.ts +26632 -0
  189. package/package.json +12 -2
  190. package/plugins/devflow-core/extensions/devflow-core.ts +518 -40
  191. package/plugins/devflow-core/runtime/hooks/context_sync_gate.py +3 -3
  192. package/plugins/devflow-core/runtime/hooks/hook_common.py +334 -11
  193. package/plugins/devflow-core/runtime/hooks/index_gate.py +29 -16
  194. package/plugins/devflow-core/runtime/hooks/start.py +13 -13
  195. package/plugins/devflow-core/skills/wireframe-proposal/SKILL.md +2 -2
  196. package/plugins/devflow-core/skills/wireframe-validate/SKILL.md +4 -4
  197. package/plugins/devflow-core/skills/workflow-orchestrator/SKILL.md +19 -19
  198. package/plugins/devflow-core/skills/workflow-orchestrator/agents/openai.yaml +2 -2
  199. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/acceptance_test_runner.py +412 -76
  200. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/advance_state.rb +60 -9
  201. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/api_test_matrix.py +2 -2
  202. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/approval_pins.py +433 -0
  203. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/approval_store.py +137 -0
  204. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_assessment.rb +1 -1
  205. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_brief.rb +1 -1
  206. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_feasibility.rb +1 -1
  207. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_invalidation.rb +5 -5
  208. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_model_commit.rb +4 -4
  209. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_model_validate.py +1 -1
  210. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_source_resolver.rb +4 -4
  211. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/checker_adapter.rb +7 -7
  212. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/control_io.rb +51 -7
  213. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/cross_track_consistency_check.rb +1 -1
  214. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/dsl_coverage.py +87 -0
  215. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/dsl_v1.py +318 -0
  216. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/environment_profile.py +134 -0
  217. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/execution_contract.rb +7 -6
  218. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/execution_surface.py +138 -0
  219. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/gate_runtime.rb +3 -3
  220. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_state.rb +5 -5
  221. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_workflow.rb +5 -5
  222. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/inspect_state.rb +13 -13
  223. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/machine_evidence.rb +3 -3
  224. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/manage_lessons.rb +7 -7
  225. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/parallel_recover.rb +2 -2
  226. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/parallel_run.rb +3 -3
  227. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/phase_ownership.rb +6 -6
  228. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/playwright_adapter.py +515 -0
  229. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/repair_control_plane.rb +1 -1
  230. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/requirement_coverage.rb +1 -1
  231. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/requirement_graph.rb +3 -3
  232. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_preflight.py +3 -3
  233. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_run.py +18 -18
  234. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/runtime_context_collector.rb +3 -3
  235. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/session_rollover.rb +4 -4
  236. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/static_runtime_context_collector.rb +2 -2
  237. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/sync_artifacts.rb +5 -5
  238. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/tc_hash.py +132 -0
  239. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/tdd_evidence.py +3 -3
  240. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/test_command_policy.py +104 -10
  241. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/test_task_binding_check.py +3 -3
  242. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/update_triage_route.rb +3 -3
  243. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/validate_state.rb +19 -6
  244. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_commit.rb +5 -5
  245. package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_validate.py +1 -1
  246. package/plugins/devflow-core/skills/workflow-orchestrator/templates/acceptance-remediation.yaml +12 -12
  247. package/plugins/devflow-core/skills/workflow-orchestrator/templates/feature-development.yaml +201 -222
  248. package/plugins/devflow-core/skills/workflow-pipeline/SKILL.md +6 -4
  249. package/plugins/devflow-core/skills/workflow-pipeline/references/pipeline-flow.md +68 -140
  250. package/plugins/devflow-core/skills/workflow-project-context/SKILL.md +14 -14
  251. package/plugins/devflow-core/skills/workflow-project-context/assets/agents-md-template.md +7 -7
  252. package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-backend-spec-template.md +4 -4
  253. package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-frontend-spec-template.md +4 -4
  254. package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-navigation-template.md +1 -1
  255. package/plugins/devflow-core/skills/workflow-project-context/assets/context-domain-index-template.md +4 -4
  256. package/plugins/devflow-core/skills/workflow-project-context/assets/context-spec-index-template.md +10 -10
  257. package/plugins/devflow-core/skills/workflow-project-context/assets/execution-contract-template.md +2 -2
  258. package/plugins/devflow-core/skills/workflow-project-context/assets/navigation-index-template.md +18 -18
  259. package/plugins/devflow-core/skills/workflow-project-context/assets/project-initialization-template.md +32 -32
  260. package/plugins/devflow-core/skills/workflow-project-context/assets/rules-index-template.md +30 -30
  261. package/plugins/devflow-core/skills/workflow-project-context/assets/state-template.md +7 -7
  262. package/plugins/devflow-core/skills/workflow-project-context/references/navigation-guide.md +37 -37
  263. package/plugins/devflow-core/skills/workflow-project-context/scripts/validate_initialization.py +16 -16
  264. package/plugins/devflow-core/skills/workflow-project-context/scripts/validate_initialization_database.py +1 -1
  265. package/plugins/devflow-design/skills/workflow-api-call-guide/SKILL.md +4 -4
  266. package/plugins/devflow-design/skills/workflow-api-contract/SKILL.md +8 -8
  267. package/plugins/devflow-design/skills/workflow-api-supplement/SKILL.md +5 -5
  268. package/plugins/devflow-design/skills/workflow-architecture-feasibility/SKILL.md +1 -1
  269. package/plugins/devflow-design/skills/workflow-backend-tech-spec/SKILL.md +39 -39
  270. package/plugins/devflow-design/skills/workflow-backend-tech-spec/assets/backend-spec-template.md +10 -10
  271. package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/affected-module-exploration.md +2 -2
  272. package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/code-explore-guide.md +1 -1
  273. package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/project-rule-contract.md +20 -20
  274. package/plugins/devflow-design/skills/workflow-design-rule-pack/SKILL.md +8 -8
  275. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/index.md +3 -3
  276. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/accessibility.md +2 -2
  277. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/component-library.md +2 -2
  278. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/design-systems.md +1 -1
  279. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/responsive-grid.md +2 -2
  280. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/stack-guidelines.md +6 -6
  281. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/ux-patterns.md +2 -2
  282. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tokens/project-tokens.md +1 -1
  283. package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/SKILL.md +12 -12
  284. package/plugins/devflow-design/skills/workflow-design-rule-pack/scripts/install.py +2 -2
  285. package/plugins/devflow-design/skills/workflow-feature-breakdown/SKILL.md +30 -30
  286. package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/output-template.md +2 -2
  287. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/SKILL.md +41 -41
  288. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/assets/frontend-spec-template.md +15 -15
  289. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/affected-module-exploration.md +2 -2
  290. package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/project-rule-contract.md +25 -25
  291. package/plugins/devflow-design/skills/workflow-integration-verify/SKILL.md +13 -13
  292. package/plugins/devflow-design/skills/workflow-ui-spec/SKILL.md +23 -23
  293. package/plugins/devflow-design/skills/workflow-ui-spec/assets/ui-spec-template.md +3 -3
  294. package/plugins/devflow-implementation/agents/implementation-worker.md +2 -2
  295. package/plugins/devflow-implementation/skills/workflow-bug-fix/SKILL.md +9 -9
  296. package/plugins/devflow-implementation/skills/workflow-bug-fix/references/lesson-format.md +2 -2
  297. package/plugins/devflow-implementation/skills/workflow-bug-fix/references/root-cause-ladder.md +1 -1
  298. package/plugins/devflow-implementation/skills/workflow-change-plan/SKILL.md +17 -17
  299. package/plugins/devflow-implementation/skills/workflow-change-plan/references/code-conventions.md +1 -1
  300. package/plugins/devflow-implementation/skills/workflow-change-plan/references/output-template.md +3 -3
  301. package/plugins/devflow-implementation/skills/workflow-change-plan/references/project-rule-contract.md +16 -16
  302. package/plugins/devflow-implementation/skills/workflow-execute-phase/SKILL.md +38 -38
  303. package/plugins/devflow-implementation/skills/workflow-execute-phase/references/execute-phase.md +4 -2
  304. package/plugins/devflow-intel/agents/project-scout.md +1 -1
  305. package/plugins/devflow-intel/extensions/devflow-intel.ts +20 -19
  306. package/plugins/devflow-intel/skills/code-index-query/SKILL.md +6 -6
  307. package/plugins/devflow-intel/skills/workflow-code-index/SKILL.md +12 -12
  308. package/plugins/devflow-intel/skills/workflow-code-index/references/discovery.md +2 -2
  309. package/plugins/devflow-intel/skills/workflow-code-index/references/query-guide.md +1 -1
  310. package/plugins/devflow-intel/skills/workflow-code-index/scripts/code_index.py +31 -12
  311. package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/discovery.py +2 -2
  312. package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/scanner.py +4 -1
  313. package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/project_binding_check.py +4 -4
  314. package/plugins/devflow-intel/skills/workflow-context-sync/SKILL.md +14 -14
  315. package/plugins/devflow-intel/skills/workflow-context-sync/scripts/context_sync_cursor.py +2 -2
  316. package/plugins/devflow-intel/skills/workflow-update-navigation/SKILL.md +26 -26
  317. package/plugins/devflow-intel/skills/workflow-update-navigation/references/incremental-update-guide.md +2 -2
  318. package/plugins/devflow-quality/runtime/playwright/devflow-test-dsl-v1.schema.json +872 -0
  319. package/plugins/devflow-quality/runtime/playwright/playwright.config.mjs +46 -0
  320. package/plugins/devflow-quality/runtime/playwright/reporter.mjs +311 -0
  321. package/plugins/devflow-quality/runtime/playwright/runner.spec.mjs +1308 -0
  322. package/plugins/devflow-quality/runtime/playwright/runtime-manifest.json +11 -0
  323. package/plugins/devflow-quality/skills/code-review/SKILL.md +12 -12
  324. package/plugins/devflow-quality/skills/code-review/references/spec-checklist.md +1 -1
  325. package/plugins/devflow-quality/skills/workflow-acceptance-test-design/SKILL.md +11 -8
  326. package/plugins/devflow-quality/skills/workflow-gen-test-guide/SKILL.md +6 -6
  327. package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/SKILL.md +14 -14
  328. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/SKILL.md +82 -69
  329. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/api-mainflow-rules.md +20 -15
  330. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/codebase-discovery.md +12 -10
  331. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/intermediate-format.md +115 -192
  332. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/mainflow-selection.md +27 -23
  333. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/project-dsl-contract.md +78 -153
  334. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/ui-mainflow-rules.md +36 -83
  335. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/compile_dsl.py +497 -556
  336. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/discover_codebases.py +2 -2
  337. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/export_legacy_testagent.py +647 -0
  338. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/normalize_case_payloads.py +10 -3
  339. package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/validate_case_payloads.py +165 -275
  340. package/plugins/devflow-quality/skills/workflow-human-acceptance/SKILL.md +61 -0
  341. package/plugins/devflow-quality/skills/workflow-release-closeout/SKILL.md +18 -18
  342. package/plugins/devflow-quality/skills/workflow-run-acceptance-tests/SKILL.md +20 -14
  343. package/plugins/devflow-requirements/skills/requirement-feasibility-review/SKILL.md +1 -1
  344. package/plugins/devflow-requirements/skills/workflow-demand-clarify/SKILL.md +10 -10
  345. package/plugins/devflow-requirements/skills/workflow-domain-modeling/SKILL.md +25 -25
  346. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/SKILL.md +49 -49
  347. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/assets/baseline-template.md +22 -22
  348. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/antipatterns.md +3 -3
  349. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/challenge-review-guide.md +3 -3
  350. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/project-context-guide.md +11 -11
  351. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/questioning.md +1 -1
  352. package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/requirement-review-checklist.md +4 -4
  353. package/plugins/devflow-requirements/skills/workflow-requirement-triage/SKILL.md +16 -16
  354. package/plugins/devflow-requirements/skills/workflow-wayfinder/SKILL.md +6 -6
  355. package/src/approval-store.ts +340 -0
  356. package/src/cli.ts +15 -0
  357. package/src/constants.ts +1 -1
  358. package/src/doctor.ts +259 -2
  359. package/src/initialization-store.ts +51 -3
  360. package/src/paths.ts +12 -1
  361. package/src/project-context.ts +60 -15
  362. package/src/project-documents.ts +61 -61
  363. package/src/project-initializer.ts +9 -8
  364. package/src/project-layout.ts +217 -0
  365. package/src/runtime.ts +3 -3
  366. package/templates/commands/start.md +4 -4
  367. package/templates/omp/AGENTS.md +1 -1
  368. package/templates/omp/hook-config.json +13 -7
  369. package/templates/omp/index-policy.json +8 -8
@@ -0,0 +1,11 @@
1
+ {
2
+ "schema_version": 1,
3
+ "runtime_version": "0.1.0",
4
+ "playwright_version": "1.63.0",
5
+ "files": {
6
+ "runner.spec.mjs": "5612cde9ddef5a203829d86ab45788d65cbe83891ff7dbb73c308aa9345ead83",
7
+ "playwright.config.mjs": "301c0b97e229f83e6934994718b11b93a1da5d46ec606cfd11a8292e9d622b02",
8
+ "reporter.mjs": "5c91d68c50a93603f583cf82345d427bcd9ce9a7cfb78fd6d0989abddbd55275",
9
+ "devflow-test-dsl-v1.schema.json": "21ce608adcaf60ac138b532b7731f3b74c3e2749cba26dfeb12fc12ce0b6e5f3"
10
+ }
11
+ }
@@ -15,11 +15,11 @@ description: "Use when code needs review for project conventions, spec complianc
15
15
  4. 若需修复后复审,在下一轮 task 中携带上一轮 `chain_id`,最多三轮。第三轮仍有 P0 时停止当前任务;事实不足时停止并请求人工确认。每轮重新验证源码、契约和证据版本,不复用旧结论。
16
16
  5. 主 Agent 向用户交付门禁裁决、证据链、开放 finding 与下一步动作。本文后续的规范扫描和检查清单仍用于审查内容,但其“输出 Markdown”要求仅适用于独立调用本技能,不覆盖正式工作流协议。
17
17
 
18
- 逐层对照 `.context/spec/` 规范文档,检查目标代码的合规性,输出可操作的问题清单。若项目存在 `.context/spec/index.md`,先按索引匹配 stack spec 和 codebase spec,再加载具体层级规范。
18
+ 逐层对照 `.devflow/context/spec/` 规范文档,检查目标代码的合规性,输出可操作的问题清单。若项目存在 `.devflow/context/spec/index.md`,先按索引匹配 stack spec 和 codebase spec,再加载具体层级规范。
19
19
 
20
20
  ## 核心原则
21
21
 
22
- 1. **规范是唯一标准** — 只对照 `.context/spec/` 中的规范文档,不参考其他已有代码;代码推断规则必须低于显式规范和 codebase spec
22
+ 1. **规范是唯一标准** — 只对照 `.devflow/context/spec/` 中的规范文档,不参考其他已有代码;代码推断规则必须低于显式规范和 codebase spec
23
23
  2. **文件级全量扫描** — 扫描目标文件的每一行,不只看"最近改动的部分"
24
24
  3. **逐条不跳过** — 规范文档中的每一条规则都要检查,包括"看起来无关"的细节。**禁止主观过滤**:不能因为"这个 VO 字段很简单"、"只有一个字段"、"直接传字符串"等主观判断而跳过检查项,规范就是规范,简单的代码同样要逐条对照
25
25
  4. **加法和减法都查** — 既查"缺了什么该有的",也查"多了什么不该有的"(未使用方法/字段/import)
@@ -31,7 +31,7 @@ description: "Use when code needs review for project conventions, spec complianc
31
31
  **当 code-review 作为 feature-development 工作流的独立 `code-review` step 被调用时必须执行。** 独立调用 code-review(如"帮我 review 一下 XX 模块")时,若提供 phase number 则尝试关联变更清单,否则跳过此步。
32
32
 
33
33
  1. **定位变更清单**:
34
- - 若传入 phase number:从 phase 目录的 CONTEXT.md 推断功能名,查找 `.planning/features/{功能名}/变更清单.md`
34
+ - 若传入 phase number:从 phase 目录的 CONTEXT.md 推断功能名,查找 `.devflow/planning/features/{功能名}/变更清单.md`
35
35
  - 若直接调用但用户提供了变更清单路径:使用用户指定路径
36
36
  - 若找不到变更清单:跳过此步,在输出 REVIEW.md 中标注 "无变更清单,跳过完成标准验证"
37
37
 
@@ -114,12 +114,12 @@ seam 标注: "只改 OrderWorkflow.process()"
114
114
  ### 第二步:加载规范(渐进式)
115
115
 
116
116
  **必读**(每次审查都要读):
117
- 1. `.planning/rules/INDEX.md`(如存在)— 找到项目规则入口
118
- 2. `.context/spec/index.md`(如存在)— 匹配目标文件所在 codebase 的 stack spec 和 codebase spec
119
- 3. 命中的 `.context/spec/stacks/{stack_key}.md` — 技术栈通用规范
120
- 4. 命中的 `.context/spec/backend|frontend/{codebase}.md` — 项目实例规范
121
- 5. `.planning/code-index/`(如存在)— 用于调用方、被调用方、导入、读写资源、测试覆盖等关系事实定位
122
- 6. 兼容旧规范:`.context/spec/backend/index.md` 和 `.context/spec/backend/go.md`(如存在)
117
+ 1. `.devflow/planning/rules/INDEX.md`(如存在)— 找到项目规则入口
118
+ 2. `.devflow/context/spec/index.md`(如存在)— 匹配目标文件所在 codebase 的 stack spec 和 codebase spec
119
+ 3. 命中的 `.devflow/context/spec/stacks/{stack_key}.md` — 技术栈通用规范
120
+ 4. 命中的 `.devflow/context/spec/backend|frontend/{codebase}.md` — 项目实例规范
121
+ 5. `.devflow/planning/code-index/`(如存在)— 用于调用方、被调用方、导入、读写资源、测试覆盖等关系事实定位
122
+ 6. 兼容旧规范:`.devflow/context/spec/backend/index.md` 和 `.devflow/context/spec/backend/go.md`(如存在)
123
123
 
124
124
  **按层级按需加载**(只读涉及的层级,详见 `references/spec-checklist.md`):
125
125
  - Handler 层 → 读 `handler.md`
@@ -130,7 +130,7 @@ seam 标注: "只改 OrderWorkflow.process()"
130
130
  - 有分页 → 读 `pagination.md`
131
131
 
132
132
  **经验教训**(目录存在时读取):
133
- - `.context/lessons/README.md`(如存在)— 项目积累的踩坑经验;不存在时跳过,不阻塞审查
133
+ - `.devflow/context/lessons/README.md`(如存在)— 项目积累的踩坑经验;不存在时跳过,不阻塞审查
134
134
 
135
135
  ### 第三步:逐层执行审查
136
136
 
@@ -150,7 +150,7 @@ seam 标注: "只改 OrderWorkflow.process()"
150
150
  **⛔ Gate 合规检查:** 审查输出中,每个涉及源码的结论必须附带 code-index 符号引用(格式:`[符号名 @ path:line]`)。若审查全程未出现 code-index 查询操作,或输出中的源码引用无 code-index 依据,则在问题清单最上方追加:
151
151
 
152
152
  ```
153
- ⛔ SOURCE-READ GATE VIOLATION — 本次审查未走 .planning/code-index/ gate。
153
+ ⛔ SOURCE-READ GATE VIOLATION — 本次审查未走 .devflow/planning/code-index/ gate。
154
154
  审查结论降级为"未经索引验证",需重新执行。
155
155
  ```
156
156
 
@@ -244,7 +244,7 @@ seam 标注: "只改 OrderWorkflow.process()"
244
244
  ```markdown
245
245
  ## 完成标准验证
246
246
 
247
- > **来源**:`.planning/features/{功能名}/变更清单.md`
247
+ > **来源**:`.devflow/planning/features/{功能名}/变更清单.md`
248
248
  > **格式**:checkbox(N 条)/ legacy(M 条)
249
249
  > **总结**:{passed}/{total} 通过,{failed} 未通过,{unverifiable} 待人工,{skipped} 跳过
250
250
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## 规范文件路径
6
6
 
7
- 所有规范文件位于 `.context/spec/backend/` 目录下。
7
+ 所有规范文件位于 `.devflow/context/spec/backend/` 目录下。
8
8
 
9
9
  ## 加载矩阵
10
10
 
@@ -13,22 +13,22 @@ description: "Use after integration verification and before change planning to d
13
13
 
14
14
  1. 先调用 `devflow_contract(action="status")` 检查当前会话是否有 active contract;
15
15
  2. 未激活时调用 `devflow_contract(action="activate", feature="<feature>", step="acceptance-test-design")` 合成并激活(planning / waiting-user / awaiting-approval,或 Runtime 已触发当前步骤的 executing 回合均可;Core 校验 STATE 当前 feature/step 与图谱 revision 后由用户确认);
16
- 3. 会话中断后 contract 由 runtime 在 `session_start` 时从 `.planning/contracts/{feature}/EC-*.json` 自动恢复;恢复时校验 state/graph revision,推进后自动失效,需重新合成。
16
+ 3. 会话中断后 contract 由 runtime 在 `session_start` 时从 `.devflow/planning/contracts/{feature}/EC-*.json` 自动恢复;恢复时校验 state/graph revision,推进后自动失效,需重新合成。
17
17
 
18
18
  ## 输入
19
19
 
20
20
  按顺序读取:
21
21
 
22
22
  1. `devflow_requirement_graph(action="inspect")` 的已确认 `REQ/BR/BC/AC` 节点与当前 revision;
23
- 2. `.planning/features/{feature}/integration-report.md`、API 契约、UI 方案、前后端技术方案;
23
+ 2. `.devflow/planning/features/{feature}/integration-report.md`、API 契约、UI 方案、前后端技术方案;
24
24
  3. 当前图谱中的 `RISK/WSH/WLC/DECISION` 节点;
25
- 4. `.planning/toolchain.md`、`.planning/execution-contract.md` 和项目测试能力。
25
+ 4. `.devflow/planning/toolchain.md`、`.devflow/planning/execution-contract.md` 和项目测试能力。
26
26
 
27
27
  若需求、契约或架构事实不足以写出可观察 oracle,记录缺口并回流到上游;不得用实现猜测补全。
28
28
 
29
29
  ## 生成规则
30
30
 
31
- 先调用 `devflow_api_test_matrix(action="compile", feature="...")`(无 API 时也会写 no-op 测试资产),检查 `.planning/features/{feature}/完整API验收测试用例.md` 中的契约缺口;存在 `API-*` 时通过后调用 `devflow_api_test_matrix(action="import", feature="...")`。Core 会一次性生成并导入全部 API `TC-*`:
31
+ 先调用 `devflow_api_test_matrix(action="compile", feature="...")`(无 API 时也会写 no-op 测试资产),检查 `.devflow/planning/features/{feature}/完整API验收测试用例.md` 中的契约缺口;存在 `API-*` 时通过后调用 `devflow_api_test_matrix(action="import", feature="...")`。Core 会一次性生成并导入全部 API `TC-*`:
32
32
 
33
33
  - 每个字段的缺失、`null`、错误类型、最小/最大(长度、数值、数组项)、超长、非法格式/模式、非法枚举;
34
34
  - 仅由有效等价类构成的 pairwise 组合(负向值一项一测,避免错误码歧义);
@@ -43,6 +43,7 @@ description: "Use after integration verification and before change planning to d
43
43
  "acceptance_refs": ["AC-0001"],
44
44
  "requirement_refs": ["REQ-0001", "BR-0001"],
45
45
  "test_type": "api|page|permission|boundary|resilience|migration|performance",
46
+ "execution_surface": "http|ui|api_flow|project_test",
46
47
  "target": "外部可观察的 API、页面或运行边界",
47
48
  "preconditions": ["身份、数据和环境前置条件"],
48
49
  "steps": ["测试操作"],
@@ -52,6 +53,8 @@ description: "Use after integration verification and before change planning to d
52
53
  }
53
54
  ```
54
55
 
56
+ - `execution_surface` 必须显式填写:单个 Core HTTP 请求且断言来自 `execution` 用 `http`;真实页面交互用 `ui`;受限 DSL 中的多步骤 API 或 UI/API 组合用 `api_flow`;项目自有测试命令、权限、边界、韧性、迁移和性能专项用 `project_test`。`page` 必须对应 `ui`,带 `execution.protocol: http` 的 Core API TC 必须对应 `http`;新冻结 TC 缺失或冲突会被 CP-3 拒绝。
57
+ - `automated` 的 `ui` / `api_flow` TC 在 `run-acceptance-tests` 绑定阶段必须有 v1 DSL(`workflow-generate-mainflow-cases` 生成,`covers` 逐条映射 `preconditions[i]`、`steps[i]` 和 `oracle`)并经用户批准 `execution_plan`,否则只会 blocked。因此每个前置条件和步骤要写成可单独映射的原子条目,oracle 要写成确定性的可观察结果(具体文案、URL、响应字段);需要纯视觉判断、缺少稳定 locator 或无法准备/隔离数据的场景,现在就标 `manual` 或 `blocked`,不要标 `automated`。
55
58
  - `manual` 额外写 `manual_reason` 和 `owner`;`blocked` 额外写 `blocked_by` 和 `owner`。
56
59
  - `replay`:可用稳定步骤再次触发,必须写 `replay_scope`(`component|page|api|integration`)。页面优先拆到组件、页面、接口或集成边界,不要求 AI 在真实环境盲目重试。
57
60
  - `causal`:用于已由 HAR、控制台、DOM 快照、服务日志或请求链路证明首个偏差、但暂不能稳定重放的缺陷。必须写 `causal_evidence_refs`(已有 `SRC-*` / `CODE-*`)和 `first_divergence`;后续执行绑定还必须提供实际证据文件,Core 会哈希留档。没有这些证据不能称为“已证实”。
@@ -62,13 +65,13 @@ description: "Use after integration verification and before change planning to d
62
65
 
63
66
  ## 输出
64
67
 
65
- 写 `.planning/features/{feature}/验收测试设计.md` 作为派生视图,包含:TC 覆盖矩阵、自动/人工/阻塞数量、每项专项义务的 TC/环境前提和当前图谱 revision。写对应 `.meta.json`,其 revision/fingerprint 必须来自 Core 的 `tests.json` 视图。
68
+ 写 `.devflow/planning/features/{feature}/验收测试设计.md` 作为派生视图,包含:TC 覆盖矩阵、自动/人工/阻塞数量、每项专项义务的 TC/环境前提和当前图谱 revision。写对应 `.meta.json`,其 revision/fingerprint 必须来自 Core 的 `tests.json` 视图。
66
69
 
67
70
  API 完整测试资产由 Core 额外写入:
68
71
 
69
- - `.planning/requirements/{feature}/api-test-matrix.json`:机器可读的请求、预期和派生义务;
70
- - `.planning/features/{feature}/完整API验收测试用例.md`:可审查的人类视图;
71
- - `.planning/features/{feature}/api-acceptance-bindings.template.json`:导入后的 TC 与 HTTP 执行绑定模板。
72
+ - `.devflow/planning/requirements/{feature}/api-test-matrix.json`:机器可读的请求、预期和派生义务;
73
+ - `.devflow/planning/features/{feature}/完整API验收测试用例.md`:可审查的人类视图;
74
+ - `.devflow/planning/features/{feature}/api-acceptance-bindings.template.json`:导入后的 TC 与 HTTP 执行绑定模板。
72
75
 
73
76
  运行 `devflow_requirement_graph(action="validate")` 和 machine evidence。通过后交给 `workflow-change-plan` 绑定实现任务。
74
77
 
@@ -14,17 +14,17 @@ description: "根据功能点梳理和需求基线生成检查点树形态的测
14
14
 
15
15
  必须先读取 `legacy/SKILL.md`,再按其中引用的相对 `references/`、`assets/` 规则生成:
16
16
 
17
- `.planning/features/{feature}/测试指导书.md`
17
+ `.devflow/planning/features/{feature}/测试指导书.md`
18
18
 
19
19
  当前 Devflow 输入路径映射如下(旧版 Skill 的 WORKSPACE_ROOT 逻辑已由适配器显式映射):
20
20
 
21
- - `.planning/requirements/baseline.md`
22
- - `.planning/features/{feature}/功能点梳理.md`
23
- - `.planning/PROJECT.md`
24
- - `.planning/navigation/INDEX.md`
21
+ - `.devflow/planning/requirements/baseline.md`
22
+ - `.devflow/planning/features/{feature}/功能点梳理.md`
23
+ - `.devflow/planning/PROJECT.md`
24
+ - `.devflow/planning/navigation/INDEX.md`
25
25
 
26
26
  旧版 Skill 中的旧目录和外部 PRD URL 约定不能直接写入项目;以本适配器列出的
27
- `.planning/` 路径为准。若旧版资源要求读取不存在的文档,必须在“待确认/缺少内容”分支记录,不得伪造文件或事实。
27
+ `.devflow/planning/` 路径为准。若旧版资源要求读取不存在的文档,必须在“待确认/缺少内容”分支记录,不得伪造文件或事实。
28
28
 
29
29
  该步骤只生成检查点树文档,不生成或修改 Core 所有的 `tests.json`、`api-test-matrix.json`、需求图谱和验收测试冻结事实。结构化 `TC-*` 测试仍由后续 `workflow-acceptance-test-design` 负责。
30
30
 
@@ -5,11 +5,11 @@ argument-hint: "<功能名> [@PRD文档.md 或 语雀URL] [--auto]"
5
5
  user-invocable: true
6
6
  pattern: generator
7
7
  inputs:
8
- - ".planning/features/{feature}/功能点梳理.md"
9
- - ".planning/requirements/baseline.md"
10
- - ".planning/PROJECT.md"
8
+ - ".devflow/planning/features/{feature}/功能点梳理.md"
9
+ - ".devflow/planning/requirements/baseline.md"
10
+ - ".devflow/planning/PROJECT.md"
11
11
  - "可选 PRD 原文(仅在当前步骤明确提供时读取)"
12
- output: ".planning/features/{feature}/测试指导书.md"
12
+ output: ".devflow/planning/features/{feature}/测试指导书.md"
13
13
  allowed-tools:
14
14
  - Read
15
15
  - Write
@@ -20,7 +20,7 @@ allowed-tools:
20
20
 
21
21
  # 检查点树生成 Skill
22
22
 
23
- > Devflow 适配说明:本文件随插件分发,由上层适配器调用。项目事实统一位于 `.planning/`;执行时以本文件的 Devflow 路径和适配器传入的输入为准,不解析旧版的 `_shared/` 或机器本地路径。
23
+ > Devflow 适配说明:本文件随插件分发,由上层适配器调用。项目事实统一位于 `.devflow/planning/`;执行时以本文件的 Devflow 路径和适配器传入的输入为准,不解析旧版的 `_shared/` 或机器本地路径。
24
24
 
25
25
  This skill consumes 需求(PRD/baseline/功能点梳理) and creates a **检查点树**(checkpoint tree)——每个可测点展平成树的叶子检查点(一句话,可勾可数),**不是**用例字段块形态。Do not re-discuss requirements or generate technical plans.
26
26
 
@@ -32,21 +32,21 @@ This skill consumes 需求(PRD/baseline/功能点梳理) and creates a **检查
32
32
  Devflow 由 Runtime 传入当前项目根目录和 feature,不再解析旧版 `WORKSPACE_ROOT` 参数。
33
33
 
34
34
  路径约定:
35
- - **共享文件**: `.planning/` — PROJECT.md, STATE.md, navigation/
36
- - **功能文件**: `.planning/features/{feature}/` — baseline.md, 功能点梳理.md, 测试指导书.md, etc.
35
+ - **共享文件**: `.devflow/planning/` — PROJECT.md, STATE.md, navigation/
36
+ - **功能文件**: `.devflow/planning/features/{feature}/` — baseline.md, 功能点梳理.md, 测试指导书.md, etc.
37
37
  </workspace_config>
38
38
 
39
39
  ## Outputs
40
40
 
41
41
  Always create or update:
42
42
 
43
- - `.planning/features/{feature}/测试指导书.md`(**检查点树形态**,非用例字段块形态。供 change-xmind 转 xmind)
43
+ - `.devflow/planning/features/{feature}/测试指导书.md`(**检查点树形态**,非用例字段块形态。供 change-xmind 转 xmind)
44
44
 
45
45
  > 本 skill 产出**检查点树**:每个可测点是树的一句话叶子,按 `测试视角层→功能模块→子模块/组件→状态/维度分叉→条件→叶子` 组织,**标题纯语义名(无 FP/章节号)**。**不产**用例字段块形态(无 优先级/关联/前置/步骤/预期 块)。
46
46
 
47
47
  ## Argument Handling
48
48
 
49
- - `<功能名>`: 由 Devflow 当前 feature 提供,用于定位 `.planning/features/{feature}/` 和输出路径。
49
+ - `<功能名>`: 由 Devflow 当前 feature 提供,用于定位 `.devflow/planning/features/{feature}/` 和输出路径。
50
50
  - `@PRD文档.md` 或 `语雀URL`: 可选,PRD 原文(feature-breakdown 缺失时作为可测点源头,有则始终读作覆盖核对基准)。
51
51
  - `--auto`: do not ask for supplementary information; mark gaps as `待确认` 进 PT-xxx 分支。
52
52
 
@@ -83,9 +83,9 @@ Load bundled resources only when needed:
83
83
 
84
84
  源头优先级(feature-breakdown > baseline > PRD 原文),按可用性读:
85
85
 
86
- 1. Read `.planning/features/{feature}/功能点梳理.md` — 首选(字段级三维叶子,可测点素材)。
87
- 2. Read `.planning/requirements/baseline.md` — FP/BR/BC/CR 清单 + 澄清过的规则。
88
- 3. Read `.planning/PROJECT.md` — 项目上下文 + 代码路径(Phase 1.5 用)。
86
+ 1. Read `.devflow/planning/features/{feature}/功能点梳理.md` — 首选(字段级三维叶子,可测点素材)。
87
+ 2. Read `.devflow/planning/requirements/baseline.md` — FP/BR/BC/CR 清单 + 澄清过的规则。
88
+ 3. Read `.devflow/planning/PROJECT.md` — 项目上下文 + 代码路径(Phase 1.5 用)。
89
89
  4. **Read PRD 原文**(语雀 URL 或 `@文件.md`)— 始终读,作为覆盖核对的基准。feature-breakdown/baseline 缺失时,PRD 是可测点的唯一源头。
90
90
  5. 若 feature-breakdown 和 baseline 都缺失且无 PRD → 报错,要求用户提供需求来源。
91
91
 
@@ -96,7 +96,7 @@ This phase runs ONLY when PROJECT.md "Project Locations" table contains at least
96
96
  ### 1.5.1 Load Navigation Files
97
97
 
98
98
  If code paths exist:
99
- 1. Read `.planning/navigation/INDEX.md`.
99
+ 1. Read `.devflow/planning/navigation/INDEX.md`.
100
100
  2. Follow only navigation documents linked from INDEX.md; do not require fixed FRONTEND.md, ADMIN.md, or BACKEND.md filenames.
101
101
  3. Extract concrete directory paths for components, pages, routes, controllers, services, models/entities, and enums/constants from the available navigation documents.
102
102
  4. If a category is absent, record it as unavailable rather than inventing a path.
@@ -264,7 +264,7 @@ Consolidate findings into an internal "Code Context Summary" (NOT written to dis
264
264
 
265
265
  ## Phase 5 — 输出检查点树
266
266
 
267
- 加载 `assets/output-template.md`。按其层级约定写 `.planning/features/{feature}/测试指导书.md`(文件名保留,内容是检查点树形态):
267
+ 加载 `assets/output-template.md`。按其层级约定写 `.devflow/planning/features/{feature}/测试指导书.md`(文件名保留,内容是检查点树形态):
268
268
 
269
269
  1. 来源信息
270
270
  2. 检查点树(Phase 3-4 组织的 **测试视角层→功能模块→子模块/组件→状态/维度分叉→条件→叶子** 缩进结构,标题纯语义名)
@@ -1,127 +1,140 @@
1
1
  ---
2
2
  name: workflow-generate-mainflow-cases
3
- description: "Use after workflow-execute-phase to bind frozen API/page TC acceptance intent to importable positive mainflow automation cases."
3
+ description: "Use after code review, as the binding-phase prerequisite of run-acceptance-tests, to compile one deterministic devflow-test-dsl/v1 file per frozen automated ui/api_flow TC, validate the whole generated-cases directory, get an independent AI review, and propose execution_plan approvals for the user."
4
4
  ---
5
5
 
6
- # 主流程自动化用例生成
6
+ # 主流程自动化用例生成(Playwright DSL)
7
7
 
8
- 在 `execute` 完成后运行本 skill,生成当前测试聚合平台可导入的正向主流程自动化用例。只生成 `api-mainflow` 和 `ui-mainflow` 用例,不生成异常、边界、权限、安全、性能专项。
8
+ 为冻结套件中 `automation_mode: automated` 且 `execution_surface` 为 `ui` 或 `api_flow` 的正向主流程 TC 生成确定性的 `devflow-test-dsl/v1`,每个 TC 一个文件,交给 Devflow Playwright Runtime 执行。**这是 `run-acceptance-tests` 的真实前置条件**:没有 DSL 并经用户批准 `execution_plan` 的自动化 ui/api_flow TC 只会 `blocked(dsl_not_approved)`,不能进入收口。不生成异常、边界、权限、安全、性能专项;这些 TC 按 `run-acceptance-tests` 的降级规则处理。
9
9
 
10
10
  ## Hard Rules
11
11
 
12
12
  - MUST NOT hardcode `platform-backend` or `platform-frontend`.
13
- - MUST derive code roots from `.planning/navigation` and `.context/spec`.
14
- - MUST use `.planning/code-index/` for fine-grained entrypoint, route, component, API, call, import, and data-flow evidence when present.
15
- - MUST only generate `api-mainflow` and `ui-mainflow` cases.
16
- - MUST read the frozen `.planning/requirements/{feature}/tests.json` before selecting case scope. Only frozen positive `TC-*` with `test_type: api` or `page` may produce mainflow cases. Core-generated API TC carrying `execution.expect.error_code` is a negative/exception case and is excluded here; it is executed by `run-acceptance-tests`.
17
- - MUST NOT read `SUMMARY.md`, delivery self-reports, or diffs to decide what to test. Current code is allowed only to bind an already frozen TC to an entrypoint, selector, request, or runner adapter.
18
- - MUST run `scripts/compile_dsl.py` before final output.
19
- - MUST run `scripts/validate_case_payloads.py` before reporting success.
13
+ - MUST derive code roots from `.devflow/planning/navigation` and `.devflow/context/spec`.
14
+ - MUST use `.devflow/planning/code-index/` for fine-grained entrypoint, route, component, API, call, import, and data-flow evidence when present.
15
+ - MUST read the frozen `.devflow/planning/requirements/{feature}/tests.json` before selecting scope. Only frozen, `confirmed`, `automation_mode: automated` TCs whose `execution_surface` is `ui` or `api_flow` get a DSL (legacy `page` TCs derive to `ui`). `http` TCs (including Core-generated API TCs with `execution.expect.error_code`) and `project_test` TCs are executed by their own adapters, not here.
16
+ - MUST NOT read `SUMMARY.md`, delivery self-reports, or diffs to decide what to test. Current code is allowed only to bind an already frozen TC to an entrypoint, `data-testid`/locator, request path, or test data; it must never change the TC's steps or oracle.
17
+ - MUST NOT hand-write or hand-edit `TC-xxxx.json`. Write `case-descriptions.json` and run `compile_dsl.py`; the compiler owns `tc_sha256`, target/driver generation, and hard rejections (`ai_only`, Midscene, xpath, scripts, token injection, fixed waits).
18
+ - MUST run `compile_dsl.py`, then `validate_case_payloads.py` on the whole `generated-cases/{feature}` directory, before reporting success. Block if either exits non-zero.
20
19
  - MUST block if codebase discovery fails.
21
- - MUST block if generated DSL fails validation.
20
+ - MUST get an independent AI review of every DSL against its TC oracle (advisory) before proposing approvals. The reviewer must not be the agent that wrote the descriptions.
21
+ - MUST propose one `execution_plan` approval per automated TC with `devflow_approval`; only the user can approve it, in `/devflow` → “待审批”. The agent cannot confirm, must not write approval records, and must not treat an unapproved DSL as accepted.
22
+ - MUST NOT create `case-import-payloads.json`. That name belongs only to the explicit legacy TestAgent export and is never a Runtime DSL artifact (see Legacy export).
22
23
 
23
24
  ## Workflow Position
24
25
 
25
- This step sits between code execution and frozen acceptance execution. It runs after `execute` alongside `code-review`; `run-acceptance-tests` consumes both gates:
26
+ This skill is not a workflow step and must not appear in `pending_steps` or participate in main-chain ordering. It runs inside the binding phase of `run-acceptance-tests`:
26
27
 
27
- `execute -> code-review + generate-mainflow-cases -> run-acceptance-tests -> release-closeout`
28
+ `execute -> code-review -> [human acceptance] -> generate DSL (this skill) -> bind + user approves execution plans -> run-acceptance-tests -> release closeout`
28
29
 
29
- The workflow step id is `generate-mainflow-cases`, order `86`, and it depends on `execute`.
30
+ Before running, verify that the current feature's `code-review` is completed and the frozen TC suite is fresh (`devflow_acceptance_tests(feature)`). A generation, validation, or approval failure means the affected TCs cannot run as `devflow_playwright`; report it and either fix it or downgrade the TC (`manual` with a `mode_override` approval, or `blocked` with owner/reason). It never mutates workflow state itself.
30
31
 
31
32
  ## Required Outputs
32
33
 
33
- Always create or update:
34
+ Always create or update, under `.devflow/planning/generated-cases/{feature}/`:
34
35
 
35
- - `.planning/generated-cases/{feature}/source-map.md`
36
- - `.planning/generated-cases/{feature}/mainflow-analysis.md`
37
- - `.planning/generated-cases/{feature}/case-descriptions.json`
38
- - `.planning/generated-cases/{feature}/case-import-payloads.json`
39
- - `.planning/generated-cases/{feature}/validation-report.md`
40
- - `.planning/phases/{phase}/MAINFLOW-CASES.md`
36
+ - `source-map.md` — frozen TC ID, planning evidence, code-index evidence, source files, and the source of every non-testid locator.
37
+ - `mainflow-analysis.md` — included/excluded TCs with reasons (including TCs that need downgrade), assumptions, traceability.
38
+ - `case-descriptions.json` — the AI-written input (`references/intermediate-format.md`).
39
+ - `TC-xxxx.json` — one v1 DSL per automated ui/api_flow TC, written by `compile_dsl.py` only.
40
+ - `validation-report.md` — output of the directory validation.
41
+ - `ai-review.md` — the independent review findings per TC (advisory).
41
42
 
42
- The discovery script also writes support artifact `.planning/generated-cases/{feature}/codebase-discovery.json`.
43
+ Also `.devflow/planning/phases/{phase}/MAINFLOW-CASES.md` (summary) and support artifact `codebase-discovery.json` (written by the discovery script).
44
+
45
+ `case-import-payloads.json` is **not** an output of this skill.
43
46
 
44
47
  ## Resource Loading
45
48
 
46
49
  Read these references before generating cases:
47
50
 
48
51
  - `references/codebase-discovery.md` before scanning any source file.
49
- - `references/mainflow-selection.md` before deciding which flows become cases.
50
- - `references/intermediate-format.md` before writing `case-descriptions.json`.
51
- - `references/api-mainflow-rules.md` before generating API cases.
52
- - `references/ui-mainflow-rules.md` before generating UI cases.
52
+ - `references/mainflow-selection.md` before deciding which TCs become DSL.
53
+ - `references/intermediate-format.md` before writing `case-descriptions.json` (the exact accepted format).
54
+ - `references/project-dsl-contract.md` for the v1 DSL shape, `covers`, and the approval/hash rules.
55
+ - `references/api-mainflow-rules.md` before generating `api_flow` cases.
56
+ - `references/ui-mainflow-rules.md` before generating `ui` cases.
53
57
 
54
58
  ## Process
55
59
 
56
- 1. Read `.planning/STATE.md` and resolve `{feature}` and `{phase}`.
60
+ 1. Read `.devflow/planning/STATE.md` and resolve `{feature}` and `{phase}`.
57
61
  2. Run codebase discovery:
58
62
 
59
63
  ```text
60
- devflow_mainflow(action="discover", args=["--output", ".planning/generated-cases/{feature}/codebase-discovery.json"])
64
+ devflow_mainflow(action="discover", args=["--output", ".devflow/planning/generated-cases/{feature}/codebase-discovery.json"])
61
65
  ```
62
66
 
63
67
  Stop if it exits non-zero.
64
68
 
65
- 3. Read the frozen TC suite first. Record the source `TC-*` for every selected mainflow case; a missing or stale source TC is a blocker. Then read planning inputs when present:
66
- - `.planning/requirements/baseline.md`
67
- - `.planning/features/{feature}/功能点梳理.md`
68
- - `.planning/features/{feature}/UI-SPEC.md`
69
- - `.planning/features/{feature}/前端技术方案.md`
70
- - `.planning/features/{feature}/后端技术方案.md`
71
- - `.planning/features/{feature}/变更清单.md`
72
- - `.planning/features/{feature}/PROGRESS.md`
69
+ 3. Read the frozen TC suite first and list every `automated` TC whose surface is `ui` or `api_flow`. Record the source `TC-*` for each; a missing or stale TC is a blocker. Then read planning inputs when present:
70
+ - `.devflow/planning/requirements/baseline.md`
71
+ - `.devflow/planning/features/{feature}/功能点梳理.md`
72
+ - `.devflow/planning/features/{feature}/UI-SPEC.md`
73
+ - `.devflow/planning/features/{feature}/前端技术方案.md`
74
+ - `.devflow/planning/features/{feature}/后端技术方案.md`
75
+ - `.devflow/planning/features/{feature}/变更清单.md`
76
+ - `.devflow/planning/features/{feature}/PROGRESS.md`
73
77
 
74
- 4. Read discovery output, then read each discovered codebase's navigation and spec files. Select scan targets by codebase type:
78
+ 4. Read discovery output, then each discovered codebase's navigation and spec files. Select scan targets by codebase type:
75
79
  - Backend: router/controller, service/usecase, schema/dto/request/response, model/entity, API entry.
76
80
  - Frontend: router, pages/views, api/client, types/contracts, stores/hooks/components related to the feature.
77
81
 
78
- 5. If `.planning/code-index/` exists, query symbols and relations for candidate entrypoints and mainflow paths:
82
+ 5. If `.devflow/planning/code-index/` exists, query symbols and relations for candidate entrypoints and flows:
79
83
  - Backend/API: `routes_to`, `calls`, `reads`, `writes`, `config_uses`, `tested_by`.
80
84
  - Frontend/UI: route/page/component symbols, `routes_to`, `imports`, `calls` into API clients, store/hook relations.
81
- Read `evidence_path:evidence_line` before using an edge in case selection.
82
- 6. Inspect actual code paths that are both relevant to `{feature}` and reachable from navigation/spec/code-index. Do not scan excluded historical modules.
83
- 7. Write `source-map.md` with the frozen TC ID, planning evidence, code-index evidence when used, source evidence, and selected source files for each candidate case.
84
- 8. Write `mainflow-analysis.md` with included API/UI positive mainflows, excluded non-mainflows, assumptions, and traceability to frozen TC plus source evidence.
85
- 9. Write `case-descriptions.json` using the simplified format in `references/intermediate-format.md`. **Do NOT write raw DSL** — use locator strings like `"text:编辑"`, `"placeholder:请输入名称"`, `"css:.el-dialog__footer .el-button--primary"`.
86
- 10. Compile descriptions into strict DSL:
85
+ Read `evidence_path:evidence_line` before using an edge.
86
+ 6. Inspect actual code paths that are both relevant to `{feature}` and reachable from navigation/spec/code-index. Prefer `data-testid` for locators. Do not scan excluded historical modules.
87
+ 7. Write `source-map.md`, then `mainflow-analysis.md`.
88
+ 8. Write `case-descriptions.json` using `references/intermediate-format.md`: one case per TC, locator strings such as `"testid:save-btn"`, `"role:button:确定"`, `"label:用户名"`, and a `covers` mapping that covers every precondition, every step, and the oracle of the TC. Do NOT write raw DSL.
89
+ 9. Compile (writes one `TC-xxxx.json` per TC into `.devflow/planning/generated-cases/{feature}/`; all-or-nothing):
87
90
 
88
91
  ```text
89
- devflow_mainflow(action="compile", args=[".planning/generated-cases/{feature}/case-descriptions.json", "--output", ".planning/generated-cases/{feature}/case-import-payloads.json"])
92
+ devflow_mainflow(action="compile", args=[".devflow/planning/generated-cases/{feature}/case-descriptions.json", "--feature", "{feature}"])
90
93
  ```
91
94
 
92
- Stop if it exits non-zero. The compiler owns all target key selection, strategy decisions, and assertion formatting.
95
+ Stop and fix the descriptions if it exits non-zero. Do not pass `--output`: it no longer exists (only `--output-dir`, whose default is already the directory above) and the compiler rejects it. Compiler warnings (non-testid locators, high-risk texts) go into `source-map.md`/the handoff; prefer replacing them by a `data-testid`.
93
96
 
94
- 11. Validate compiled payloads:
97
+ 10. Validate the whole directory (pure data, never loads project code):
95
98
 
96
99
  ```text
97
- devflow_mainflow(action="validate", args=[".planning/generated-cases/{feature}/case-import-payloads.json", "--discovery", ".planning/generated-cases/{feature}/codebase-discovery.json", "--output", ".planning/generated-cases/{feature}/validation-report.md"])
100
+ devflow_mainflow(action="validate", args=[".devflow/planning/generated-cases/{feature}", "--suite", ".devflow/planning/requirements/{feature}/tests.json", "--output", ".devflow/planning/generated-cases/{feature}/validation-report.md"])
98
101
  ```
99
102
 
100
- Stop if it exits non-zero.
103
+ Stop if it exits non-zero. Read the warnings: an automated ui/api_flow TC listed as having no DSL will be blocked as `dsl_not_approved`.
104
+
105
+ 11. Independent AI review (advisory). Have a different agent than the author review each DSL against its frozen TC: read only the TC (`preconditions`, `steps`, `oracle`) and the DSL, and list omissions, weak assertions, assertions on the wrong object, ambiguous or unstable locators, missing data isolation, and any step that does not follow from the TC. Write the findings per TC to `ai-review.md`. Serious findings should be fixed by editing `case-descriptions.json` and repeating steps 9–11; any DSL byte change invalidates approval for that TC. The review never counts as a pass.
106
+
107
+ 12. Propose an execution plan per automated TC (one item per TC; `dsl_file` defaults to `.devflow/planning/generated-cases/{feature}/{tc_id}.json`):
108
+
109
+ ```text
110
+ devflow_approval(action="propose", feature="{feature}", kind="execution_plan",
111
+ items=[{"subject":"TC-0001","dsl_file":".devflow/planning/generated-cases/{feature}/TC-0001.json","review_issues":["<advisory issue from ai-review.md>"],"note":"<optional context>"}])
112
+ ```
101
113
 
102
- 11. Write `.planning/phases/{phase}/MAINFLOW-CASES.md` summarizing:
103
- - Generated case count by tag.
104
- - Import payload path.
105
- - Validation status.
106
- - Source evidence index.
107
- - Any environment data needed before execution.
114
+ Core pins `suite_graph_revision`, `suite_fingerprint`, `tc_sha256` and `dsl_sha256` and re-runs structural validation; the proposal is all-or-nothing. It requires database authority. Then ask the user to review each TC (oracle text, covering assertions, review issues) and decide in `/devflow` → “待审批”. Re-running `devflow_approval(action="list", feature="{feature}")` shows proposal status; do not wait on, simulate, or write approvals.
108
115
 
109
- 12. Report success only after compilation and validation pass.
116
+ 13. Write `.devflow/planning/phases/{phase}/MAINFLOW-CASES.md` summarizing: TC IDs and DSL paths, validation status, review issues, approval proposal status, downgrade candidates, environment data/profile needed.
117
+ 14. Report success only after compile, validate, and propose succeeded. Return a handoff containing the source TC IDs, DSL directory, `validation-report.md` and `ai-review.md` paths, proposal IDs/status, required environment/test data, TCs without DSL, and any gaps. Do not advance workflow state.
118
+
119
+ If a TC's DSL needs to change after it was approved (TC refrozen, code changed, review findings), recompile, revalidate, re-review, and propose again. Recompiling an unchanged description yields byte-identical output, so existing approvals stay valid.
110
120
 
111
121
  ## AI Scope
112
122
 
113
123
  AI is responsible for semantic judgment only:
114
124
 
115
- - Determine API/page test scope from frozen `TC-*`, not from implementation delivery prose.
116
- - Confirm implemented behavior from actual code.
117
- - Identify positive API mainflows.
118
- - Identify positive UI mainflows.
119
- - Generate `case-descriptions.json` in simplified intermediate format.
120
- - Record source evidence for each case.
121
-
122
- AI is NOT responsible for DSL formatting. The `compile_dsl.py` script owns:
123
- - Target key selection (`label`, `css`, `placeholder`, etc.)
124
- - Strategy decisions (`structured_first` vs `ai_only`)
125
- - Assertion type selection and formatting
126
- - Auth step generation
127
- - Step ID assignment and dependency wiring
125
+ - Decide which frozen TCs are eligible and which need downgrade.
126
+ - Confirm implemented behavior from actual code and bind entrypoints, locators, request paths, and data.
127
+ - Write `case-descriptions.json` faithful to each TC and its `covers`.
128
+ - Record source evidence in `source-map.md`.
129
+ - Review (as a different agent) each DSL against the oracle.
130
+
131
+ AI is NOT responsible for, and cannot override:
132
+
133
+ - DSL formatting, `tc_sha256`, target key selection, and step ID assignment (`compile_dsl.py`).
134
+ - Schema, semantic, secret-literal, and structural coverage checks (Core `dsl_v1`/`dsl_coverage` via `validate_case_payloads.py`).
135
+ - The approval of an execution plan or environment profile (only the user, in `/devflow`).
136
+ - Any pass/fail verdict (only Core's `run-acceptance-tests`).
137
+
138
+ ## Legacy export
139
+
140
+ Only when a developer explicitly asks for a TestAgent import file, run `scripts/export_legacy_testagent.py` directly with a separate legacy-format input and an explicit `--output` (for example `.devflow/planning/generated-cases/{feature}/legacy-testagent-import.json`). It is not exposed by `devflow_mainflow`, is not part of the gate, and its output cannot be bound to `devflow_playwright`, approved as an execution plan, or counted as an acceptance result. Never write its output as `TC-xxxx.json` and never describe it as a Runtime DSL artifact.
@@ -1,27 +1,32 @@
1
1
  # API Mainflow Rules
2
2
 
3
- API cases validate successful backend behavior through importable DSL.
3
+ 这里的 API 用例指冻结的、自动化的 `execution_surface: api_flow` TC:需要多步骤链式请求(变量提取、前后依赖)或 UI/API 组合,用 v1 DSL 表达。单个 Core HTTP 请求且断言来自冻结 TC 的 `execution` 的 API TC 是 `execution_surface: http`,由 Core 的 `http` adapter 直接执行,**不**生成 DSL;带 `execution.expect.error_code` 的异常码 TC 同理,本 Skill 不处理。
4
+
5
+ AI 写 `case-descriptions.json`(`intermediate-format.md`),`compile_dsl.py` 生成 `TC-xxxx.json`(`project-dsl-contract.md`)。
4
6
 
5
7
  ## Step Rules
6
8
 
7
- - Use `driver: "api"`.
8
- - Use HTTP method as `action`: `get`, `post`, `put`, `patch`, `delete`, `head`, or `options`.
9
- - Set `params.url` for every API step.
10
- - Put query values under `params.params`.
11
- - Put JSON request payloads under `params.json` or `params.body`.
12
- - Add success assertions for status code and key response fields where code/planning provide them.
13
- - Extract ids or tokens only into variables, never literal secrets.
14
- - Use `depends_on` to model required execution order.
9
+ - 每个请求是一个 API 步骤:`action` 写 `request` 并给 `method`,或直接写 `get`/`post`/`put`/`patch`/`delete`(`head`/`options` 不支持)。
10
+ - `url` 必填:以 `/` 开头相对已批准 profile 的 `api_base_url`(缺省 `base_url`);绝对 URL 的 origin 必须在 profile `api_origins` 中。不要把环境相关主机写死,也不要写变量 `${base_url}`(不是内置变量)。
11
+ - 查询参数写 `query`(标量),请求体写 `json`,请求头写 `headers`。
12
+ - 成功断言:`expect_status`,以及响应体断言 `assertions: [{ "pointer": "/data/status", "op": "equals", "value": "created" }]`(`op`:`equals`/`not_equals`/`contains`/`exists`/`not_exists`,JSON Pointer)。只写 `expect_status: 200` 且没有响应体断言,覆盖 oracle 时会被判为弱断言。没有 `status_code`/`json_path_*`/`regex` 之类旧断言类型。
13
+ - 用 `extract: { "order_id": "/data/id" }` 把 id 提取成变量,后续步骤用 `${order_id}`。只支持 JSON Pointer;提取到的令牌等敏感值写 `{ "pointer": "...", "sensitive": true }`。
14
+ - 步骤按写入顺序执行,没有 `depends_on`;失败即停止。
15
+ - 默认不重试;只有传输失败才可声明 `retry`,POST/PATCH 还需 `idempotent: true`。
16
+ - 凭据用 `variables` 的 `{ "secret": "ENV_KEY" }`,请求头写 `"Authorization": "Bearer ${auth_token}"`;不得出现 token/密码/cookie 字面量。
17
+ - 需要前置数据用 `data.setup`,清理用 `data.cleanup`(都只能是 API 步骤)。
15
18
 
16
- ## Source Evidence
19
+ ## covers 与 TC 忠实性
17
20
 
18
- Cite at least one planning artifact and one code artifact per case:
21
+ - TC 的每个前置条件(对应 `data.setup` 或步骤的 `covers.preconditions`)、每个步骤都要被某个 DSL 步骤覆盖,oracle 要被带 `assertions`/`expect_status` 的主流程 API 步骤覆盖:`covers: ["oracle"]`。
22
+ - DSL 不得增删或改写 TC 的步骤与 oracle;源码只补充路径、字段名和请求体。
23
+
24
+ ## Source Evidence
19
25
 
20
- - Planning: backend tech spec, change list, feature breakdown, or requirement baseline.
21
- - Code: router/controller and service/usecase, plus schema/model when they define the contract.
26
+ 每个 case 在 `source-map.md` 里至少引用一份规划产物(后端技术方案、变更清单、功能点梳理或需求基线)和一份代码产物(路由/控制器、service/usecase,以及定义契约的 schema/model)。证据不写入 DSL。
22
27
 
23
28
  ## Positive Mainflow Boundary
24
29
 
25
- Allowed: create/list/detail/update/execute success flow for the current feature.
30
+ 生成范围:当前功能的创建/查询/详情/更新/执行成功链路。
26
31
 
27
- Not allowed: invalid request, unauthorized access, missing resource, validation error, conflict, retry, timeout, or performance scenario.
32
+ 不生成:非法请求、未授权、资源缺失、校验错误、冲突、重试/超时场景、性能场景。这些 TC 走 Core HTTP adapter、项目自有 command 或降级为 `manual`/`blocked`。
@@ -1,16 +1,18 @@
1
1
  # Codebase Discovery
2
2
 
3
- Use discovery before reading feature source files. The goal is to make the skill portable across projects that have valid `.planning` and `.context/spec` initialization artifacts.
3
+ Use discovery before reading feature source files. The goal is to make the skill portable across projects that have valid `.devflow/planning` and `.devflow/context/spec` initialization artifacts.
4
+
5
+ Discovery only locates code roots so that entrypoints, `data-testid`s, routes, and request shapes can be read for the frozen TCs. It is **not** an input to compilation or validation: `validate_case_payloads.py` is pure data and never loads project code (`--discovery` is deprecated and ignored).
4
6
 
5
7
  ## Required Sources
6
8
 
7
9
  Read and cross-check:
8
10
 
9
- - `.planning/STATE.md`
10
- - `.planning/navigation/INDEX.md`
11
- - `.context/spec/index.md`
12
- - `.planning/navigation/{CODEBASE}.md`
13
- - `.context/spec/{domain}/{CODEBASE}.md`
11
+ - `.devflow/planning/STATE.md`
12
+ - `.devflow/planning/navigation/INDEX.md`
13
+ - `.devflow/context/spec/index.md`
14
+ - `.devflow/planning/navigation/{CODEBASE}.md`
15
+ - `.devflow/context/spec/{domain}/{CODEBASE}.md`
14
16
 
15
17
  Do not infer code roots from common directory names. Treat the navigation/spec registry as the source of truth.
16
18
 
@@ -19,13 +21,13 @@ Do not infer code roots from common directory names. Treat the navigation/spec r
19
21
  Run:
20
22
 
21
23
  ```text
22
- devflow_mainflow(action="discover", args=["--output", ".planning/generated-cases/{feature}/codebase-discovery.json"])
24
+ devflow_mainflow(action="discover", args=["--output", ".devflow/planning/generated-cases/{feature}/codebase-discovery.json"])
23
25
  ```
24
26
 
25
27
  The script must fail if:
26
28
 
27
- - `.planning/navigation/INDEX.md` is missing.
28
- - `.context/spec/index.md` is missing.
29
+ - `.devflow/planning/navigation/INDEX.md` is missing.
30
+ - `.devflow/context/spec/index.md` is missing.
29
31
  - A registered codebase lacks a root path, navigation path, or spec path.
30
32
  - A registered root path does not exist.
31
33
  - A registered navigation/spec file does not exist.
@@ -43,7 +45,7 @@ Use `codebase-discovery.json` fields:
43
45
  - `codebases[].stack_key`
44
46
  - `codebases[].scan_profile`
45
47
 
46
- Current project discovery should resolve `BACKEND` and `FRONTEND`, but this is an output fact, not a skill rule.
48
+ Current project discovery should resolve `BACKEND` and `FRONTEND`, but this is an output fact, not a skill rule. Reading a codebase only supplies binding facts (entry URL, locator, request path); it never changes a frozen TC's steps or oracle.
47
49
 
48
50
  ## Scan Range By Type
49
51