self-evolving-workflow 0.0.0-stage → 0.1.4

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 (375) hide show
  1. package/LICENSE +27 -0
  2. package/README.md +195 -2
  3. package/dist/agent-memory-prompts.d.ts +13 -0
  4. package/dist/agent-memory-prompts.js +55 -0
  5. package/dist/cli.d.ts +2 -0
  6. package/dist/cli.js +6 -0
  7. package/dist/closeout.d.ts +105 -0
  8. package/dist/closeout.js +473 -0
  9. package/dist/code.d.ts +39 -0
  10. package/dist/code.js +124 -0
  11. package/dist/codex-memory.d.ts +24 -0
  12. package/dist/codex-memory.js +217 -0
  13. package/dist/common.d.ts +16 -0
  14. package/dist/common.js +52 -0
  15. package/dist/context-envelope.d.ts +59 -0
  16. package/dist/context-envelope.js +23 -0
  17. package/dist/host-adapters.d.ts +34 -0
  18. package/dist/host-adapters.js +151 -0
  19. package/dist/http.d.ts +3 -0
  20. package/dist/http.js +90 -0
  21. package/dist/index.d.ts +16 -0
  22. package/dist/index.js +13 -0
  23. package/dist/knowledge-cli.d.ts +198 -0
  24. package/dist/knowledge-cli.js +761 -0
  25. package/dist/knowledge-reads.d.ts +72 -0
  26. package/dist/knowledge-reads.js +201 -0
  27. package/dist/memory-config.d.ts +44 -0
  28. package/dist/memory-config.js +204 -0
  29. package/dist/memory-evidence.d.ts +13 -0
  30. package/dist/memory-evidence.js +40 -0
  31. package/dist/memory-history.d.ts +46 -0
  32. package/dist/memory-history.js +432 -0
  33. package/dist/memory.d.ts +96 -0
  34. package/dist/memory.js +362 -0
  35. package/dist/retrospective.d.ts +57 -0
  36. package/dist/retrospective.js +240 -0
  37. package/dist/search.d.ts +36 -0
  38. package/dist/search.js +112 -0
  39. package/dist/skill-addition.d.ts +25 -0
  40. package/dist/skill-addition.js +89 -0
  41. package/dist/skill-design.d.ts +96 -0
  42. package/dist/skill-design.js +226 -0
  43. package/dist/skill-replay.d.ts +55 -0
  44. package/dist/skill-replay.js +448 -0
  45. package/dist/skill-route.d.ts +30 -0
  46. package/dist/skill-route.js +75 -0
  47. package/dist/transcript-evidence.d.ts +3 -0
  48. package/dist/transcript-evidence.js +58 -0
  49. package/dist/upstream/chunker.d.ts +24 -0
  50. package/dist/upstream/chunker.js +96 -0
  51. package/dist/upstream/file-protocol.d.ts +45 -0
  52. package/dist/upstream/file-protocol.js +117 -0
  53. package/dist/upstream/frontmatter.d.ts +47 -0
  54. package/dist/upstream/frontmatter.js +86 -0
  55. package/dist/upstream/graph-search.d.ts +33 -0
  56. package/dist/upstream/graph-search.js +67 -0
  57. package/dist/upstream/l1-extraction.d.ts +26 -0
  58. package/dist/upstream/l1-extraction.js +405 -0
  59. package/dist/upstream/llm.d.ts +8 -0
  60. package/dist/upstream/llm.js +1 -0
  61. package/dist/upstream/merge.d.ts +50 -0
  62. package/dist/upstream/merge.js +153 -0
  63. package/dist/upstream/prompts.d.ts +53 -0
  64. package/dist/upstream/prompts.js +181 -0
  65. package/dist/upstream/search-utils.d.ts +34 -0
  66. package/dist/upstream/search-utils.js +55 -0
  67. package/dist/upstream/slug.d.ts +26 -0
  68. package/dist/upstream/slug.js +103 -0
  69. package/dist/upstream/template.d.ts +29 -0
  70. package/dist/upstream/template.js +80 -0
  71. package/dist/upstream/tokenize.d.ts +4 -0
  72. package/dist/upstream/tokenize.js +29 -0
  73. package/dist/wiki-change.d.ts +76 -0
  74. package/dist/wiki-change.js +299 -0
  75. package/dist/wiki-entry.d.ts +26 -0
  76. package/dist/wiki-entry.js +93 -0
  77. package/dist/wiki-ingest.d.ts +12 -0
  78. package/dist/wiki-ingest.js +126 -0
  79. package/dist/wiki-migration.d.ts +16 -0
  80. package/dist/wiki-migration.js +268 -0
  81. package/dist/wiki-tokens.d.ts +1 -0
  82. package/dist/wiki-tokens.js +46 -0
  83. package/dist/wiki.d.ts +103 -0
  84. package/dist/wiki.js +330 -0
  85. package/dist/workflow-cli.d.ts +2 -0
  86. package/dist/workflow-cli.js +319 -0
  87. package/dist/workflow-install.d.ts +37 -0
  88. package/dist/workflow-install.js +148 -0
  89. package/dist/workflow-knowledge.d.ts +18 -0
  90. package/dist/workflow-knowledge.js +32 -0
  91. package/dist/workflow-mcp.d.ts +2 -0
  92. package/dist/workflow-mcp.js +137 -0
  93. package/dist/workflow-names.d.ts +4 -0
  94. package/dist/workflow-names.js +31 -0
  95. package/dist/workflow-runtime.d.ts +735 -0
  96. package/dist/workflow-runtime.js +747 -0
  97. package/dist/workflow-skills.d.ts +48 -0
  98. package/dist/workflow-skills.js +141 -0
  99. package/docs/images/impeccable-skill.png +0 -0
  100. package/docs/images/workflow-overview.png +0 -0
  101. package/docs/images/workflow-skills.png +0 -0
  102. package/package.json +77 -4
  103. package/skills/ew-impeccable/LICENSE +191 -0
  104. package/skills/ew-impeccable/NOTICE.md +19 -0
  105. package/skills/ew-impeccable/SKILL.md +91 -0
  106. package/skills/ew-impeccable/UPSTREAM.md +23 -0
  107. package/skills/ew-impeccable/reference/adapt.md +314 -0
  108. package/skills/ew-impeccable/reference/adapt.native.md +60 -0
  109. package/skills/ew-impeccable/reference/android.md +46 -0
  110. package/skills/ew-impeccable/reference/animate.md +91 -0
  111. package/skills/ew-impeccable/reference/audit.md +138 -0
  112. package/skills/ew-impeccable/reference/audit.native.md +141 -0
  113. package/skills/ew-impeccable/reference/bolder.md +35 -0
  114. package/skills/ew-impeccable/reference/clarify.md +96 -0
  115. package/skills/ew-impeccable/reference/colorize.md +88 -0
  116. package/skills/ew-impeccable/reference/craft-floor.md +44 -0
  117. package/skills/ew-impeccable/reference/craft.md +5 -0
  118. package/skills/ew-impeccable/reference/critique.md +808 -0
  119. package/skills/ew-impeccable/reference/degraded/asset-producer.md +36 -0
  120. package/skills/ew-impeccable/reference/degraded/documenter.md +23 -0
  121. package/skills/ew-impeccable/reference/degraded/finish-reviewer.md +72 -0
  122. package/skills/ew-impeccable/reference/degraded/manual-edit-applier.md +91 -0
  123. package/skills/ew-impeccable/reference/delight.md +72 -0
  124. package/skills/ew-impeccable/reference/distill.md +113 -0
  125. package/skills/ew-impeccable/reference/doctor.md +56 -0
  126. package/skills/ew-impeccable/reference/document.md +418 -0
  127. package/skills/ew-impeccable/reference/extract.md +68 -0
  128. package/skills/ew-impeccable/reference/harden.md +338 -0
  129. package/skills/ew-impeccable/reference/hooks.md +113 -0
  130. package/skills/ew-impeccable/reference/init.md +133 -0
  131. package/skills/ew-impeccable/reference/ios.md +51 -0
  132. package/skills/ew-impeccable/reference/layout.md +86 -0
  133. package/skills/ew-impeccable/reference/live-setup.md +102 -0
  134. package/skills/ew-impeccable/reference/live.md +326 -0
  135. package/skills/ew-impeccable/reference/new-work.md +209 -0
  136. package/skills/ew-impeccable/reference/onboard.md +236 -0
  137. package/skills/ew-impeccable/reference/operate.md +61 -0
  138. package/skills/ew-impeccable/reference/optimize.md +260 -0
  139. package/skills/ew-impeccable/reference/overdrive.md +127 -0
  140. package/skills/ew-impeccable/reference/polish.md +105 -0
  141. package/skills/ew-impeccable/reference/quieter.md +101 -0
  142. package/skills/ew-impeccable/reference/routing.md +20 -0
  143. package/skills/ew-impeccable/reference/shape.md +59 -0
  144. package/skills/ew-impeccable/reference/typeset.md +82 -0
  145. package/skills/ew-impeccable/reference/visualize.md +46 -0
  146. package/skills/ew-impeccable/scripts/build-phase.mjs +1022 -0
  147. package/skills/ew-impeccable/scripts/command-metadata.json +94 -0
  148. package/skills/ew-impeccable/scripts/comp-diff.mjs +391 -0
  149. package/skills/ew-impeccable/scripts/comp-spec.mjs +513 -0
  150. package/skills/ew-impeccable/scripts/concept-seed.mjs +814 -0
  151. package/skills/ew-impeccable/scripts/context-signals.mjs +325 -0
  152. package/skills/ew-impeccable/scripts/context.mjs +1521 -0
  153. package/skills/ew-impeccable/scripts/critique-storage.mjs +473 -0
  154. package/skills/ew-impeccable/scripts/data/font-index-failures.json +121 -0
  155. package/skills/ew-impeccable/scripts/data/font-index.json +1 -0
  156. package/skills/ew-impeccable/scripts/detect-csp.mjs +246 -0
  157. package/skills/ew-impeccable/scripts/detect.mjs +30 -0
  158. package/skills/ew-impeccable/scripts/detector/browser/injected/index.mjs +2580 -0
  159. package/skills/ew-impeccable/scripts/detector/cli/main.mjs +498 -0
  160. package/skills/ew-impeccable/scripts/detector/design-system.mjs +1311 -0
  161. package/skills/ew-impeccable/scripts/detector/detect-antipatterns-browser.js +9486 -0
  162. package/skills/ew-impeccable/scripts/detector/detect-antipatterns.mjs +51 -0
  163. package/skills/ew-impeccable/scripts/detector/engines/browser/detect-url.mjs +434 -0
  164. package/skills/ew-impeccable/scripts/detector/engines/regex/detect-text.mjs +1439 -0
  165. package/skills/ew-impeccable/scripts/detector/engines/static-html/css-cascade.mjs +1242 -0
  166. package/skills/ew-impeccable/scripts/detector/engines/static-html/detect-html.mjs +263 -0
  167. package/skills/ew-impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +189 -0
  168. package/skills/ew-impeccable/scripts/detector/findings.mjs +23 -0
  169. package/skills/ew-impeccable/scripts/detector/node/file-system.mjs +225 -0
  170. package/skills/ew-impeccable/scripts/detector/profile/profiler.mjs +166 -0
  171. package/skills/ew-impeccable/scripts/detector/registry/antipatterns.mjs +636 -0
  172. package/skills/ew-impeccable/scripts/detector/rules/checks.mjs +5750 -0
  173. package/skills/ew-impeccable/scripts/detector/shared/color.mjs +596 -0
  174. package/skills/ew-impeccable/scripts/detector/shared/constants.mjs +127 -0
  175. package/skills/ew-impeccable/scripts/detector/shared/fonts.mjs +30 -0
  176. package/skills/ew-impeccable/scripts/detector/shared/inline-ignores.mjs +148 -0
  177. package/skills/ew-impeccable/scripts/detector/shared/page.mjs +7 -0
  178. package/skills/ew-impeccable/scripts/detector/vendor/MDN-DATA-LICENSE +116 -0
  179. package/skills/ew-impeccable/scripts/detector/vendor/THIRD_PARTY_LICENSES.md +227 -0
  180. package/skills/ew-impeccable/scripts/detector/vendor/static-html-parser.build-entry.txt +11 -0
  181. package/skills/ew-impeccable/scripts/detector/vendor/static-html-parser.bundle.mjs +9121 -0
  182. package/skills/ew-impeccable/scripts/doctor.mjs +330 -0
  183. package/skills/ew-impeccable/scripts/embed-prompt.mjs +166 -0
  184. package/skills/ew-impeccable/scripts/font-match.mjs +457 -0
  185. package/skills/ew-impeccable/scripts/generate-image.mjs +447 -0
  186. package/skills/ew-impeccable/scripts/hook-admin.mjs +829 -0
  187. package/skills/ew-impeccable/scripts/hook-before-edit.mjs +538 -0
  188. package/skills/ew-impeccable/scripts/hook-lib.mjs +2493 -0
  189. package/skills/ew-impeccable/scripts/hook.mjs +79 -0
  190. package/skills/ew-impeccable/scripts/lib/artifact-schema.mjs +93 -0
  191. package/skills/ew-impeccable/scripts/lib/composition-catalog.mjs +200 -0
  192. package/skills/ew-impeccable/scripts/lib/concept-catalog.mjs +395 -0
  193. package/skills/ew-impeccable/scripts/lib/design-parser.mjs +880 -0
  194. package/skills/ew-impeccable/scripts/lib/font-fingerprint.mjs +564 -0
  195. package/skills/ew-impeccable/scripts/lib/font-index.mjs +130 -0
  196. package/skills/ew-impeccable/scripts/lib/hero-checks.mjs +246 -0
  197. package/skills/ew-impeccable/scripts/lib/image-metrics.mjs +306 -0
  198. package/skills/ew-impeccable/scripts/lib/impeccable-config.mjs +640 -0
  199. package/skills/ew-impeccable/scripts/lib/impeccable-paths.mjs +137 -0
  200. package/skills/ew-impeccable/scripts/lib/is-generated.mjs +72 -0
  201. package/skills/ew-impeccable/scripts/lib/live-path-globs.mjs +37 -0
  202. package/skills/ew-impeccable/scripts/lib/open-system-browser.mjs +26 -0
  203. package/skills/ew-impeccable/scripts/lib/png.mjs +281 -0
  204. package/skills/ew-impeccable/scripts/lib/provider.mjs +5 -0
  205. package/skills/ew-impeccable/scripts/lib/raster.mjs +194 -0
  206. package/skills/ew-impeccable/scripts/lib/roll-selection.mjs +369 -0
  207. package/skills/ew-impeccable/scripts/lib/staleness-deep.mjs +491 -0
  208. package/skills/ew-impeccable/scripts/lib/staleness-notice.mjs +169 -0
  209. package/skills/ew-impeccable/scripts/lib/staleness.mjs +532 -0
  210. package/skills/ew-impeccable/scripts/lib/surface-briefs.mjs +149 -0
  211. package/skills/ew-impeccable/scripts/lib/target-args.mjs +42 -0
  212. package/skills/ew-impeccable/scripts/lib/target-slug.mjs +33 -0
  213. package/skills/ew-impeccable/scripts/lib/template-extensions.mjs +146 -0
  214. package/skills/ew-impeccable/scripts/live/accept-css.mjs +617 -0
  215. package/skills/ew-impeccable/scripts/live/accept-verify.mjs +60 -0
  216. package/skills/ew-impeccable/scripts/live/browser-script-parts.mjs +84 -0
  217. package/skills/ew-impeccable/scripts/live/completion.mjs +28 -0
  218. package/skills/ew-impeccable/scripts/live/event-validation.mjs +199 -0
  219. package/skills/ew-impeccable/scripts/live/frameworks/astro.mjs +47 -0
  220. package/skills/ew-impeccable/scripts/live/frameworks/detect-utils.mjs +73 -0
  221. package/skills/ew-impeccable/scripts/live/frameworks/index.mjs +143 -0
  222. package/skills/ew-impeccable/scripts/live/frameworks/journal.mjs +197 -0
  223. package/skills/ew-impeccable/scripts/live/frameworks/nextjs.mjs +49 -0
  224. package/skills/ew-impeccable/scripts/live/frameworks/nuxt.mjs +161 -0
  225. package/skills/ew-impeccable/scripts/live/frameworks/script-src.mjs +17 -0
  226. package/skills/ew-impeccable/scripts/live/frameworks/static-html.mjs +26 -0
  227. package/skills/ew-impeccable/scripts/live/frameworks/sveltekit.mjs +71 -0
  228. package/skills/ew-impeccable/scripts/live/frameworks/tag-strategy.mjs +247 -0
  229. package/skills/ew-impeccable/scripts/live/frameworks/tanstack-start.mjs +70 -0
  230. package/skills/ew-impeccable/scripts/live/frameworks/vite-generic.mjs +42 -0
  231. package/skills/ew-impeccable/scripts/live/generation-preflight.mjs +149 -0
  232. package/skills/ew-impeccable/scripts/live/insert-ui.mjs +458 -0
  233. package/skills/ew-impeccable/scripts/live/instructions.mjs +142 -0
  234. package/skills/ew-impeccable/scripts/live/manual-apply.mjs +939 -0
  235. package/skills/ew-impeccable/scripts/live/manual-edit-routes.mjs +357 -0
  236. package/skills/ew-impeccable/scripts/live/manual-edits-buffer.mjs +152 -0
  237. package/skills/ew-impeccable/scripts/live/poll-lanes.mjs +14 -0
  238. package/skills/ew-impeccable/scripts/live/project-ignores.mjs +139 -0
  239. package/skills/ew-impeccable/scripts/live/roots.mjs +508 -0
  240. package/skills/ew-impeccable/scripts/live/session-store.mjs +563 -0
  241. package/skills/ew-impeccable/scripts/live/source-lock.mjs +105 -0
  242. package/skills/ew-impeccable/scripts/live/source-search.mjs +105 -0
  243. package/skills/ew-impeccable/scripts/live/svelte-ast.mjs +969 -0
  244. package/skills/ew-impeccable/scripts/live/svelte-component.mjs +1366 -0
  245. package/skills/ew-impeccable/scripts/live/sveltekit-adapter.mjs +304 -0
  246. package/skills/ew-impeccable/scripts/live/tanstack-adapter.mjs +259 -0
  247. package/skills/ew-impeccable/scripts/live/ui-surfaces.mjs +75 -0
  248. package/skills/ew-impeccable/scripts/live/vocabulary.mjs +171 -0
  249. package/skills/ew-impeccable/scripts/live-accept.mjs +938 -0
  250. package/skills/ew-impeccable/scripts/live-browser-dom.js +167 -0
  251. package/skills/ew-impeccable/scripts/live-browser-ignores.js +242 -0
  252. package/skills/ew-impeccable/scripts/live-browser-session.js +144 -0
  253. package/skills/ew-impeccable/scripts/live-browser.js +12851 -0
  254. package/skills/ew-impeccable/scripts/live-commit-manual-edits.mjs +1200 -0
  255. package/skills/ew-impeccable/scripts/live-complete.mjs +107 -0
  256. package/skills/ew-impeccable/scripts/live-copy-edit-agent.mjs +800 -0
  257. package/skills/ew-impeccable/scripts/live-discard-manual-edits.mjs +51 -0
  258. package/skills/ew-impeccable/scripts/live-inject.mjs +463 -0
  259. package/skills/ew-impeccable/scripts/live-insert.mjs +292 -0
  260. package/skills/ew-impeccable/scripts/live-manual-edit-evidence.mjs +368 -0
  261. package/skills/ew-impeccable/scripts/live-poll.mjs +430 -0
  262. package/skills/ew-impeccable/scripts/live-resume.mjs +123 -0
  263. package/skills/ew-impeccable/scripts/live-server.mjs +1698 -0
  264. package/skills/ew-impeccable/scripts/live-status.mjs +71 -0
  265. package/skills/ew-impeccable/scripts/live-target.mjs +30 -0
  266. package/skills/ew-impeccable/scripts/live-wrap.mjs +927 -0
  267. package/skills/ew-impeccable/scripts/live.mjs +334 -0
  268. package/skills/ew-impeccable/scripts/modern-screenshot.umd.js +14 -0
  269. package/skills/ew-impeccable/scripts/palette.mjs +628 -0
  270. package/skills/ew-impeccable/scripts/pin.mjs +352 -0
  271. package/skills/ew-impeccable/scripts/serve-question.mjs +1783 -0
  272. package/skills/ew-impeccable/scripts/surface-brief.mjs +74 -0
  273. package/skills/ew-knowledge/SKILL.md +35 -0
  274. package/skills/ew-knowledge/references/closeout-protocol.md +68 -0
  275. package/skills/ew-knowledge/references/knowledge-route.md +73 -0
  276. package/skills/ew-knowledge/references/wiki-maintenance.md +27 -0
  277. package/skills/ew-odyssey/SKILL.md +106 -0
  278. package/skills/ew-odyssey/references/audit-artifacts.md +7 -0
  279. package/skills/ew-odyssey/references/odyssey-base.md +104 -0
  280. package/skills/ew-odyssey/references/odyssey-debug.md +264 -0
  281. package/skills/ew-odyssey/references/odyssey-defensive.md +351 -0
  282. package/skills/ew-odyssey/references/odyssey-improve.md +230 -0
  283. package/skills/ew-odyssey/references/odyssey-planex.md +294 -0
  284. package/skills/ew-odyssey/references/odyssey-review.md +233 -0
  285. package/skills/ew-odyssey/references/odyssey-security.md +231 -0
  286. package/skills/ew-odyssey/references/odyssey-ui.md +232 -0
  287. package/skills/ew-odyssey/references/prepare/odyssey-debug.md +102 -0
  288. package/skills/ew-odyssey/references/prepare/odyssey-defensive.md +117 -0
  289. package/skills/ew-odyssey/references/prepare/odyssey-improve.md +95 -0
  290. package/skills/ew-odyssey/references/prepare/odyssey-planex.md +105 -0
  291. package/skills/ew-odyssey/references/prepare/odyssey-review.md +105 -0
  292. package/skills/ew-odyssey/references/prepare/odyssey-security.md +91 -0
  293. package/skills/ew-odyssey/references/prepare/odyssey-ui.md +88 -0
  294. package/skills/ew-odyssey/references/runtime-adapters.md +31 -0
  295. package/skills/ew-orchestrate/SKILL.md +89 -0
  296. package/skills/ew-orchestrate/references/auto-policy.md +66 -0
  297. package/skills/ew-orchestrate/references/boundary-grill.md +51 -0
  298. package/skills/ew-orchestrate/references/companion-route.md +40 -0
  299. package/skills/ew-orchestrate/references/ew-orchestrate.md +44 -0
  300. package/skills/ew-orchestrate/references/goal.md +51 -0
  301. package/skills/ew-orchestrate/references/orchestrator-run-loop.md +33 -0
  302. package/skills/ew-orchestrate/references/planning.md +54 -0
  303. package/skills/ew-orchestrate/steps/ew-analyze/SKILL.md +70 -0
  304. package/skills/ew-orchestrate/steps/ew-analyze/references/issue-gaps-analyze.md +24 -0
  305. package/skills/ew-orchestrate/steps/ew-analyze/references/prepare.md +8 -0
  306. package/skills/ew-orchestrate/steps/ew-analyze/references/workflow.md +138 -0
  307. package/skills/ew-orchestrate/steps/ew-auto-test/SKILL.md +80 -0
  308. package/skills/ew-orchestrate/steps/ew-auto-test/references/prepare.md +23 -0
  309. package/skills/ew-orchestrate/steps/ew-auto-test/references/workflow.md +31 -0
  310. package/skills/ew-orchestrate/steps/ew-blueprint/SKILL.md +122 -0
  311. package/skills/ew-orchestrate/steps/ew-blueprint/references/prepare.md +21 -0
  312. package/skills/ew-orchestrate/steps/ew-blueprint/references/workflow.md +28 -0
  313. package/skills/ew-orchestrate/steps/ew-brainstorm/SKILL.md +49 -0
  314. package/skills/ew-orchestrate/steps/ew-companion/SKILL.md +50 -0
  315. package/skills/ew-orchestrate/steps/ew-debug/SKILL.md +85 -0
  316. package/skills/ew-orchestrate/steps/ew-debug/references/prepare.md +27 -0
  317. package/skills/ew-orchestrate/steps/ew-debug/references/workflow.md +31 -0
  318. package/skills/ew-orchestrate/steps/ew-execute/SKILL.md +74 -0
  319. package/skills/ew-orchestrate/steps/ew-execute/references/prepare.md +27 -0
  320. package/skills/ew-orchestrate/steps/ew-execute/references/workflow.md +87 -0
  321. package/skills/ew-orchestrate/steps/ew-grill/SKILL.md +62 -0
  322. package/skills/ew-orchestrate/steps/ew-grill/references/prepare.md +26 -0
  323. package/skills/ew-orchestrate/steps/ew-grill/references/workflow.md +31 -0
  324. package/skills/ew-orchestrate/steps/ew-init/SKILL.md +56 -0
  325. package/skills/ew-orchestrate/steps/ew-init/references/prepare.md +25 -0
  326. package/skills/ew-orchestrate/steps/ew-init/references/workflow.md +28 -0
  327. package/skills/ew-orchestrate/steps/ew-plan/SKILL.md +131 -0
  328. package/skills/ew-orchestrate/steps/ew-plan/references/prepare.md +8 -0
  329. package/skills/ew-orchestrate/steps/ew-plan/references/tdd.md +53 -0
  330. package/skills/ew-orchestrate/steps/ew-plan/references/workflow.md +100 -0
  331. package/skills/ew-orchestrate/steps/ew-retrospective/SKILL.md +68 -0
  332. package/skills/ew-orchestrate/steps/ew-retrospective/references/prepare.md +18 -0
  333. package/skills/ew-orchestrate/steps/ew-retrospective/references/workflow.md +34 -0
  334. package/skills/ew-orchestrate/steps/ew-review/SKILL.md +45 -0
  335. package/skills/ew-orchestrate/steps/ew-review/references/prepare.md +17 -0
  336. package/skills/ew-orchestrate/steps/ew-review/references/workflow.md +116 -0
  337. package/skills/ew-orchestrate/steps/ew-roadmap/SKILL.md +62 -0
  338. package/skills/ew-orchestrate/steps/ew-roadmap/references/prepare.md +27 -0
  339. package/skills/ew-orchestrate/steps/ew-roadmap/references/workflow.md +28 -0
  340. package/skills/ew-orchestrate/steps/ew-test/SKILL.md +99 -0
  341. package/skills/ew-orchestrate/steps/ew-test/references/prepare.md +23 -0
  342. package/skills/ew-orchestrate/steps/ew-test/references/workflow.md +23 -0
  343. package/skills/ew-orchestrate/steps/ew-verify/SKILL.md +73 -0
  344. package/skills/ew-orchestrate/steps/ew-verify/references/prepare.md +21 -0
  345. package/skills/ew-orchestrate/steps/ew-verify/references/workflow.md +29 -0
  346. package/skills/ew-skill-design/SKILL.md +30 -0
  347. package/skills/ew-skill-design/references/package-contract.md +40 -0
  348. package/skills/ew-skill-design/references/validation.md +21 -0
  349. package/skills/team-swarm/SKILL.md +68 -0
  350. package/skills/team-swarm/references/mcp-coordination.md +14 -0
  351. package/skills/team-swarm/roles/analyst/role.md +181 -0
  352. package/skills/team-swarm/roles/ant/role.md +149 -0
  353. package/skills/team-swarm/roles/coordinator/commands/converge.md +112 -0
  354. package/skills/team-swarm/roles/coordinator/commands/init-swarm.md +136 -0
  355. package/skills/team-swarm/roles/coordinator/commands/iterate.md +171 -0
  356. package/skills/team-swarm/roles/coordinator/role.md +170 -0
  357. package/skills/team-swarm/roles/scorer/role.md +150 -0
  358. package/skills/team-swarm/scripts/aco.py +646 -0
  359. package/skills/team-swarm/scripts/pheromone.py +144 -0
  360. package/skills/team-swarm/scripts/scoring.py +111 -0
  361. package/skills/team-swarm/scripts/test_aco.py +606 -0
  362. package/skills/team-swarm/specs/ant-output-schema.md +127 -0
  363. package/skills/team-swarm/specs/convergence-criteria.md +108 -0
  364. package/skills/team-swarm/specs/pheromone-schema.md +125 -0
  365. package/skills/team-swarm/specs/swarm-config-template.json +71 -0
  366. package/skills/team-swarm/specs/swarm-protocol.md +119 -0
  367. package/skills/workflow-evolve/SKILL.md +64 -0
  368. package/skills/workflow-evolve/references/agy-gate.md +27 -0
  369. package/skills/workflow-evolve/references/auto-loop.md +23 -0
  370. package/skills/workflow-evolve/references/history-review.md +15 -0
  371. package/skills/workflow-evolve/scripts/codex-memory-replay.mjs +86 -0
  372. package/skills/workflow-evolve/scripts/codex-replay.mjs +1 -0
  373. package/skills/workflow-evolve/scripts/evolve-loop.mjs +260 -0
  374. package/skills/workflow-evolve/scripts/memory-codex-mcp.mjs +124 -0
  375. package/workflows/index.json +33 -0
@@ -0,0 +1,51 @@
1
+ # Boundary Grill — Embedded Mini-Review Protocol
2
+
3
+ ## Conflict Types
4
+
5
+ | ID | Signal | Example |
6
+ |----|--------|---------|
7
+ | `RSC` | Decision outside command's scope guard | `ew-analyze` outputs task-level details (`ew-plan` scope) |
8
+ | `MOD` | Changes cross 2+ module boundaries | Task touches `commands/` and `hooks/` without declaring cross-module |
9
+ | `DEC` | Upstream locked decision contradicts code | Locked "use EventEmitter" but code uses `Subject` at `file:line` |
10
+
11
+ ## Trigger
12
+
13
+ Run boundary grill when ANY of:
14
+ - **RSC**: produced decision matches another command's scope guard keywords
15
+ - **MOD**: module boundary Wiki entries or code boundaries exist AND changes touch 2+ top-level modules
16
+ - **DEC**: upstream Locked decisions AND code search show contradicting patterns
17
+
18
+ Priority when >3 conflicts: `DEC > RSC > MOD`.
19
+
20
+ ## Protocol
21
+
22
+ Per conflict (max 3 conflicts × 3 questions = 9 total):
23
+ 1. State the conflict with `file:line` evidence.
24
+ 2. Ask 2-3 adversarial questions via a structured user prompt (e.g. `ask_question` in Antigravity, or the host's equivalent) — challenge with code reality.
25
+ 3. Resolve: `RESOLVED` (evidence-based) / `DEFERRED` (needs escalation) / `ACCEPTED_RISK`.
26
+
27
+ **Auto mode (`-y`)**: skip questions, resolve via code evidence weighting:
28
+ - `RSC` → defer to target scope
29
+ - `MOD` → follow existing cross-module pattern (or flag as risk)
30
+ - `DEC` → code wins (current code = ground truth)
31
+
32
+ ## Output
33
+
34
+ Record results as structured fields without corrupting JSON outputs:
35
+ - Add `boundary_grill: [{ id, type, conflict, resolution, evidence }]` inside `{run_dir}/outputs/findings.json` (`ew-analyze`) or `{run_dir}/outputs/plan.json` (`ew-plan`). **Never append raw Markdown text into `.json` files.**
36
+ - Also include the summary table inside `{run_dir}/report.md`:
37
+
38
+ ```markdown
39
+ ## Boundary Grill Results
40
+
41
+ | # | Type | Conflict | Resolution | Evidence |
42
+ |---|------|----------|------------|----------|
43
+ ```
44
+
45
+ Resolved `DEC` amends Locked decisions; unresolved items are recorded with `status: "deferred"` and `boundary_grill: true`.
46
+
47
+ ## Constraints
48
+
49
+ - Non-blocking — warnings + resolutions, never hard stops
50
+ - Evidence MUST include `file:line` — generic assertions invalid
51
+ - Results visible in command output — no silent swallowing
@@ -0,0 +1,40 @@
1
+ # Evolve Companion 内部路由
2
+
3
+ `ew-companion` 是 Evolve 内部的轻量单步执行通道,使用同一套 Session/Run 生命周期,省略多阶段拆解与复杂决策门;它是 `ew-orchestrate/steps/ew-companion/` 中的真实可绑定步骤,不创建第二套状态协议。
4
+
5
+ ## `END` 与 `ew-companion` 边界
6
+
7
+ | 条件 | 路由 | 说明 |
8
+ | --- | --- | --- |
9
+ | 纯问答、只读解释或状态查询(零文件改写) | `END` | 不打开 Session,直接基于只读工具与 Knowledge Gate 作答 |
10
+ | 单关注点改动或状态变更检查(<=2 文件、明确位置、可直接验证) | `ew-companion` | 打开单步 Session 并走完整 Run 封存与证据留存 |
11
+ | 需架构/方案权衡、多任务分解、`>2` 文件修改或独立评审 | 主编排链 | `ew-analyze` / `ew-plan` / `ew-execute` / `ew-verify` / `ew-review` |
12
+
13
+ ## 最小生命周期
14
+
15
+ 1. 确认满足单步条件(目标明确、单一关注点、无需下游类型化工件消费、可由直接检查/测试验证)。
16
+ 2. 通过 `evolve capabilities` 校验能力,打开仅含 `ew-companion` 步骤的 Session 并派发:
17
+
18
+ ```text
19
+ evolve session open "<intent>" --id <slug> --actor <actor> --chain ew-companion
20
+ evolve run next --session <session-id> --actor <actor> --expected-orchestration-revision <revision>
21
+ ```
22
+
23
+ 3. 读取 `evolve run skill-read <run_id> --session <session-id>`、加载项目知识(Run MCP 或 CLI `--reads`),如有 `latest-review` / `latest-debug` 上游输入通过 `evolve run artifact-read` 读取。
24
+ 4. 按边界改动并执行最窄验证命令;将操作记录与验证命令写入 `{run_dir}/outputs/companion-log.md`(带匹配 `companion-log/1.0` 的 YAML frontmatter),然后封存 Run 并完成终态 Session:
25
+
26
+ ```text
27
+ evolve run complete <run_id> --session <session-id> --actor <actor> --expected-orchestration-revision <rev> --expected-run-revision <run_rev> --summary "<observed change and verification>" --verdict done|done_with_concerns
28
+ evolve session complete --session <session-id> --actor <actor> --expected-orchestration-revision <rev>
29
+ ```
30
+
31
+ 5. Session 完成后转交 `ew-knowledge`(`evolve workflows show knowledge`)处理候选知识;候选为零同样正常完结。
32
+
33
+ ## 退出与升级
34
+
35
+ | 发现 | 处理 |
36
+ | --- | --- |
37
+ | 目标不明确或缺少完成条件 | `run cancel` 或记录阻塞并请求澄清后重规划 |
38
+ | 需要调查根因或跨模块影响 | 保留当前发现,通过 `ew-analyze` 或 `ew-debug` 展开 |
39
+ | 需要拆解任务或多步实现/审查 | 改由 `ew-plan` → `ew-execute` → `ew-verify` / `ew-review` |
40
+ | 需要长期多轮审计或并行探索 | 转交 `ew-odyssey` 或 `team-swarm` |
@@ -0,0 +1,44 @@
1
+ # Evolve chain catalog
2
+
3
+ Match the intent to the smallest Evolve chain that can produce and verify the requested result. Confirm the boundary, completion criteria, and required handoffs before opening the Session. The execution guide owns dispatch and recovery.
4
+
5
+ ## Exact-Match Short-Circuits
6
+
7
+ - **`status` / `状态` / `dashboard`** -> **Read-only short-circuit (no chain creation)**: run `evolve session status --session <id>` (or `evolve session list --status open`), present the result, and stop for user input without inferring or launching a chain.
8
+ - **`continue` / `next` / `go` / `继续` / `下一步`** -> Resume the unique open Session (`nextAction`).
9
+ - **Cold-start fallback (no open Session exists)**: check `.agent-memory/`, `wiki/`, and `.codegraph/` -> if uninitialized, route to `ew-init`; if a bound `current-roadmap` / `current-blueprint` exists, propose the first pending Session/spec scope; otherwise route through `ew-analyze` / `ew-plan` or ask what to build (`S_FALLBACK`).
10
+
11
+ ## Semantic Intent -> Route Matrix
12
+
13
+ | Intent | Exact Route | Prerequisites & Thresholds |
14
+ | --- | --- | --- |
15
+ | Read-only Q&A, factual lookup, or status check | `END` (no Session) | Zero repository mutations needed |
16
+ | Small bounded edit + direct verification (1 concern, <=2 files) | `ew-companion` | No downstream typed artifact, gate, or multi-step coordination |
17
+ | Initialize or onboard project (greenfield / brownfield / legacy) | `ew-init` → `ew-roadmap` or `ew-blueprint` | Skip interactive Q&A when `--from` supplies `upstream-context` |
18
+ | Explore open alternatives or compare approaches | `ew-brainstorm` | Proposes continuation only when durable artifacts are needed |
19
+ | Pressure-test an idea/proposal against codebase reality | `ew-grill` | Grounded Socratic branches; runs before `ew-brainstorm` / `ew-plan` |
20
+ | Formal multi-phase spec package (Brief -> PRD -> Arch -> Epics) | `ew-blueprint` | Pure spec outputs; feeds `ew-roadmap` or `ew-plan` |
21
+ | Decompose multi-release requirements into a Session DAG | `ew-roadmap` | Only split >1 Session when hard runtime coupling holds |
22
+ | Investigate codebase or analyze existing plan (`-q`, macro, `--gaps`) | `ew-analyze` | Pass `-q` for fast decision extraction; `--gaps` for backlog gaps |
23
+ | Plan or revise an implementation (`--gaps`, `--tdd`, `--revise`) | `ew-plan` | Produces `current-plan`; use `--gaps` after failed review/verify/debug/test |
24
+ | Execute an existing confirmed `current-plan` | `ew-execute` | Requires bound `current-plan` (if missing, run `ew-plan` first or `ew-companion`) |
25
+ | Implement or refactor with known scope (`>2` files) | `ew-analyze -q` (if impact unclear) → `ew-plan` → `ew-execute` → `ew-verify` → `ew-review` | Omit `ew-analyze -q` when scope and patterns are already settled |
26
+ | Independently verify requirement & wiring coverage | `ew-verify` | **Requires bound `current-plan` + `current-execution`** (`required: true`) |
27
+ | Run conversational UAT, `--smoke`, or `--frontend-verify` browser check | `ew-test` | Behavioral acceptance + UAT; consumes verification, execution, or review |
28
+ | Generate and converge layered automated tests (`L0->L3`) | `ew-auto-test` | Suites missing or low coverage; distinct from UAT/browser acceptance |
29
+ | Audit diff, file/dir, or `current-execution` across 4 quality dimensions | `ew-review` | Works standalone (`HEAD`/`staged`/path) OR inside a Session after `ew-execute` |
30
+ | Diagnose broken behavior inside an orchestration chain (`<=2–3` modules) | `ew-debug` → `ew-plan --gaps` → `ew-execute` → `ew-verify` | Single bounded root-cause isolation (`latest-debug` / `latest-fix-directions`) |
31
+ | Heavyweight multi-iteration audit, bug-hunt, or security campaign | `ew-odyssey --mode <debug\|improve\|planex\|review\|security\|defensive\|ui>` (`ew-odyssey-<mode>`) | Explicit standalone iterative loop across entire modules/campaigns |
32
+ | Post-execution four-lens retrospective | `ew-retrospective` | Consumes sealed execution/verification/review artifacts |
33
+ | UI design, rebuild, audit, or finish polish | `ew-impeccable` | Or chain `ew-impeccable` / `ew-plan` → `ew-execute` → `ew-test --frontend-verify` |
34
+ | Explore and score competing hypotheses/paths in parallel | `team-swarm` | Only when user requests Swarm / parallel ACO exploration |
35
+ | Analyze & fix a tracked issue (from user's tracker ID/context) | `ew-analyze --gaps` → `ew-plan --gaps` → `ew-execute` → `ew-verify` | Keep issue reference in tasks; update tracker only with user authorization |
36
+ | Knowledge Gate lookup inside an active Run | Run MCP (`wiki_context` / `wiki_reference`) or CLI `--reads` | Keep Run evidence bound inside `{run_dir}`; do not spawn `ew-knowledge` |
37
+ | Post-seal closeout harvesting, Wiki publish/audit, memory sync, legacy import | `ew-knowledge` (`evolve workflows show knowledge`) | Run after `session complete` or on standalone knowledge requests |
38
+ | Rebuild code index / install Skills / Git worktree | `evolve code build` / `evolve skills install` / `git worktree` | Direct CLI or authorized repo operations |
39
+
40
+ ## Validation & Continuation Rules
41
+
42
+ 1. Validate every selected step contract with `evolve skills validate <command>` before building chains (`ew-knowledge` runs with `session-mode: none`).
43
+ 2. Record concrete step arguments cleanly (`{session}` and `{intent}` placeholders are expanded by Runtime on `run next`); use target scope/issue/Session IDs instead of legacy milestone/phase numbering.
44
+ 3. Carry `--goal-ref` when decomposing `--goal` chains and insert `--decision-only --decision-ref <gate>` checkpoints where coordinator verdicts are required.
@@ -0,0 +1,51 @@
1
+ Read the [Run loop](orchestrator-run-loop.md) when resuming the Session after the amendment.
2
+ # Evolve Goal Amendment Flow
3
+
4
+ Under `evolve-session/1.0`, goal, boundary, decomposition and pending-tail changes belong to the Session chain and this Evolve policy. They never become a separate Execution or durable Session metadata command. Runs advance through fenced `evolve run next` and `evolve run complete`.
5
+
6
+ ## 1. Capability and Snapshot
7
+
8
+ 1. Read the Evolve capability receipt and retain the Session ID and current revision.
9
+ 2. Resolve exactly one compatible Session through read-only recall, then read `evolve session status --session {session_id}`.
10
+ 3. Retain exact `session_id + orchestration_revision` (plus `run_revision` for run-target mutations) and one authorized `actor_id`; pass it to `--actor` (`--participant` defaults to it). Never infer current authority from Session status.
11
+ 1. Snapshot current Session objective, `definition_of_done`, `boundary_contract`, `goals[]`, `amendments[]`, sealed Run handoffs, pending chain, decisions, and revision via `evolve session status` / `evolve run brief`. Apply amendments to an open Session.
12
+
13
+ ## 2. Parse and Assess
14
+
15
+ Use remaining `--amend` text as `change_request`; ask when empty. Classify `modify|add|remove|boundary` and derive affected goals, invalidated steps, new gaps, boundary additions, risk, reason, and evidence.
16
+
17
+ Assessment is read-only. Completed Run evidence remains immutable. High risk always requires explicit confirmation; `-y` cannot bypass it.
18
+
19
+ ## 3. Build the Pending-Tail Chain Change
20
+
21
+ Construct the pending-tail chain change in memory:
22
+
23
+ - Append one `CHG-NNN` entry with before/after goals, reason, risk, and evidence.
24
+ - Supersede only unfinished affected goals; completed goals remain immutable evidence.
25
+ - Give modified goals versioned IDs and added goals the next `G{n}` ID.
26
+ - Add boundaries without deleting historical constraints.
27
+ - Preserve the chain step shape: `command/args?/stage?/goal_ref?/decision_ref?`.
28
+
29
+ Do not edit protocol JSON or issue direct chain mutations from a Skill. The orchestrator applies the pending-tail change through the fenced chain surface after Skill assessment:
30
+
31
+ `evolve session chain replace --session {session_id} --step-id <id> --command <name> --actor {actor_id} --expected-orchestration-revision {orchestration_revision}`
32
+
33
+ or `evolve session chain insert --session {session_id} --step-id <id> --command <name> [--arg <value> ...] [--after-step <id>] [--goal-ref <id>] [--stage <name>] [--decision-ref <id>] --actor {actor_id} --expected-orchestration-revision {orchestration_revision}` for added steps. Skipping a non-running step uses the fully fenced `session chain skip` form with evidence.
34
+
35
+ ## 4. Commit the Amendment
36
+
37
+ 3. After confirmation, record the new objective and completion criteria with `evolve session amend "<objective>" --definition-of-done "<criteria>" --session <session> --actor <actor> --expected-orchestration-revision <revision> --evidence <confirmation>` (Runtime appends `CHG-NNN` automatically to `Session.amendments[]`). Apply approved pending-tail changes (supporting `--retry-max <n>` and `--decision-only` on `session chain insert`) and dispatch with the current fence:
38
+
39
+ `evolve run next --session {session_id} --actor {actor_id} --expected-orchestration-revision {orchestration_revision}`
40
+
41
+ and complete it with:
42
+
43
+ `evolve run complete {run_id} --session {session_id} --actor {actor_id} --expected-orchestration-revision {orchestration_revision} --expected-run-revision {run_revision} --summary "<summary>" --verdict {done|done_with_concerns}`
44
+
45
+ Runtime must atomically validate and seal the Run plus advance the chain step and return `Evolve mutation receipt`. Consume its fresh `orchestration_revision` before continuing. Reject by recording a blocking concern; revise by re-reading `evolve session status` and applying another fenced chain mutation.
46
+
47
+ If the installed Runtime cannot express the complete goal/decomposition replacement as a Session-chain pending-tail change, stop with a capability blocker. Do not silently call a Session metadata command in the canonical branch.
48
+
49
+ ## 5. Continue
50
+
51
+ Display amendment ID, risk, superseded/added goal counts, and chain disposition. Re-read exact `evolve session status`, then continue through fenced `evolve run next`. Recovery reads `evolve run check {run_id} --session {session_id}` and transitions/cancels the stuck Run; final completion remains `evolve session complete`.
@@ -0,0 +1,33 @@
1
+ # Evolve Session Execution and Recovery
2
+
3
+ Use the bundled `evolve` CLI (in this source checkout, run `node dist/workflow-cli.js`). Session/Run state, `boundary_contract`, `goals[]`, `amendments[]`, requests, and sealed artifact bytes share `.agent-memory/workflow.db`; working outputs live under the `run_dir` returned by the controller.
4
+
5
+ ## Start and Dispatch
6
+
7
+ 1. **Install & validate**: Run `evolve install` (`--scope project --yes` for project setup), **commit Skill packages to Git `HEAD`** so Runs bind cleanly, list docs via `evolve workflows`, and validate contracts via `evolve skills validate <command>`.
8
+ 2. **Open Session & chain**:
9
+ - Argument-free chain: `evolve session open "<objective>" --id <session> --actor <actor> [--definition-of-done "<text>"] [--boundary-contract '<json>'] [--goals '<json>'] [--auto] [--goal-mode] --chain "ew-analyze,ew-plan,ew-execute,ew-verify"`.
10
+ - Step with args / retries / gates: `evolve session chain insert --session <session> --step-id <id> --command <command> [--arg "<val>" ...] [--retry-max <n>] [--goal-ref <id>] [--stage <name>] [--decision-ref <id>] [--after-step <id>] --actor <actor> --expected-orchestration-revision <revision>` (pass `-`-prefixed values as `--arg=VALUE`).
11
+ - Standalone decision gate (`decision-only`): add `--decision-only --decision-ref <gate-id>` instead of `--command`.
12
+ 3. **Dispatch Run**: `evolve run next --session <session> --actor <actor> --expected-orchestration-revision <revision>` — passes `run_id`, `run_dir`, `skill_ref`, bound `upstream` (primary + sibling attachments/evidence), `boundary_contract`, `goals`, and `gates` (Runtime expands `{session}` and `{intent}` in `task.args` automatically).
13
+ 4. **Concurrency & idempotency**: Advance `--expected-orchestration-revision` (and `--expected-run-revision` for Run mutations) from each receipt; keep the same `--request-id` when retrying an uncertain call, and re-read `evolve session status` on `REVISION_CONFLICT`.
14
+
15
+ ## Read and Execute
16
+
17
+ - **Skill reads**: Open entry with `evolve run skill-read <run> --session <session>`, and package-relative `.md` links (zero `..` segments) with `evolve run skill-read <run> <destination> --from <source> --session <session>`.
18
+ - **Artifacts**: Read bound inputs via `evolve run artifact-read <run> <alias-or-id> --session <session>` (`--scope <JSON>` for `session-priors`). JSON artifacts MUST carry `_meta: { kind, schema, role, alias? }` and Markdown artifacts matching YAML frontmatter; NEVER append raw Markdown into `.json` files.
19
+ - **Knowledge Gate inside a Run** (choose one receipt source per Run):
20
+ - **Run MCP** (`evolve mcp --root <project> --session <session> --run <run>`): open `session-priors` via `read_artifact` ONLY when its recorded `lookup_scopes` matches the current scope; otherwise search with `wiki_context` and open hits with `wiki_reference`.
21
+ - **CLI fallback**: `evolve context "<topic>" --session <session> --include-memory --reads "<run_dir>/knowledge-reads.json"`, then inspect exact IDs with `--from-search <search-id>`. For steps declaring `outputs/priors.json`, Runtime snapshots CLI-read Wiki entries cleanly at `run complete` too.
22
+
23
+ ## Verify, Continue and Recover
24
+
25
+ - **Seal Run**: `evolve run complete <run> --session <session> --actor <actor> --expected-orchestration-revision <rev> --expected-run-revision <rev> --summary "<observed result>" --gate <id>... [--verdict done|done_with_concerns]`. Run `evolve run check` first to preflight gates, outputs, and `report.md` `next` commands. Use `--verdict done_with_concerns` for non-fatal findings (downstream `consumes[]` slots expecting failed artifacts must declare `accepts_negative_evidence: true`).
26
+ - **Follow `continuation.action` & `authority`**:
27
+ - When `continuation.authority === "automatic"` (`--auto`), keep executing satisfiable actions (`next` / `decide` / `complete`) in the same turn rather than stopping between steps (unless hit by a user gate, drift/confidence halt, or unrecoverable failure).
28
+ - `execute` -> inspect/resume active Run via `evolve run brief` + `evolve run check`.
29
+ - `recover` -> handle `blocked` Run via `evolve run transition` (or `cancel`) before retrying.
30
+ - `decide` -> `evolve run decide <decision-id> --session <session> --actor <actor> --expected-orchestration-revision <rev> --verdict proceed|fix|escalate [--confidence <0-100>] [--target-step <step-id>] --summary "<evidence>"` (`--target-step` reopens the target step through the gate when `verdict=fix`).
31
+ - `next` -> allocate next pending step via `evolve run next`.
32
+ - `complete` -> `evolve session complete --session <session> --actor <actor> --expected-orchestration-revision <rev>`, then hand off closeout review/harvesting to standalone `ew-knowledge` (`evolve workflows show knowledge`).
33
+ - **Crash / Stuck-Run Recovery**: Read `evolve session list --status open [--query <text>]`, `evolve session status --session <session>`, `evolve run brief <run> --session <session>`, and `evolve run check <run> --session <session>`. Use `evolve run transition <run> running|blocked|failed --session <session> --actor <actor> --expected-orchestration-revision <rev> --expected-run-revision <run_rev> --reason "<why>"` (or `evolve run cancel ...`) with current fences before allocating a retry via `evolve run next`.
@@ -0,0 +1,54 @@
1
+ # Planning & Chain Creation
2
+
3
+ 本文件定义意图分类(`S_CLASSIFY`)、建链(`S_CREATE`)与分解(`S_DECOMPOSE`)协议。完整步骤路由与前置阈值见 [意图分类目录](ew-orchestrate.md),长链与决策门策略见 [自动与 Goal 策略](auto-policy.md),分派/恢复命令见 [执行循环](orchestrator-run-loop.md)。
4
+
5
+ ## Classification Protocol
6
+
7
+ 1. **Exact match**:
8
+ - `status` / `状态` / `dashboard` → 只读执行 `evolve session status`(无则 `evolve session list --status open`),呈现后即止,不推断开链。
9
+ - `continue` / `next` / `go` / `继续` / `下一步` → `S_CONTINUE`(无活跃 Session 时走 [意图分类目录](ew-orchestrate.md) 的冷启动回退规则)。
10
+ 2. **Selection priorities**: tracked issue (`--gaps`) > Swarm (`team-swarm`) > UI/设计 (`ew-impeccable`) > 多步骤工程链 > 单步强契约任务 > `ew-companion`(单关注点轻量改动/验证)> `END`(零修改纯问答)。
11
+ 3. **契约前置校验**:
12
+ - `ew-verify` 在契约层面强依赖 `current-plan` + `current-execution`;缺任一上游时禁止单排 `ew-verify`(改走 `ew-review`,或先补 `ew-plan` → `ew-execute`)。
13
+ - `ew-execute` 缺 `current-plan` 时前置 `ew-plan`(或降级为 `ew-companion`)。
14
+ - `ew-test` 无 `latest-verification` 时至少需有 `current-execution` + `current-plan`、`latest-review` 或显式 `<scope>`。
15
+ 4. **留痕要求**: 必须记录匹配证据、排除备选方案与置信度;无记录不可进入 `S_CREATE`。
16
+
17
+ | 意图证据 | 初始链 |
18
+ | --- | --- |
19
+ | 零修改纯问答 | `END`(不开 Session) |
20
+ | 轻量明确单步改/验(1 关注点,<=2 文件) | `ew-companion` |
21
+ | 项目冷启动 / 存量接入 / 旧知识检测 | `ew-init` → `ew-roadmap` / `ew-blueprint` |
22
+ | 探索开放方案 / 压测假设 | `ew-brainstorm` / `ew-grill` → 仅按 Skill 提议续接 |
23
+ | 正式规格文档包 | `ew-blueprint` → `ew-roadmap` / `ew-plan` |
24
+ | 多 Session 需求拆解 | `ew-roadmap` → `ew-plan` |
25
+ | 已知计划直接执行 | `ew-execute` → `ew-verify` / `ew-review` |
26
+ | 常规功能开发 / 重构(>2 文件) | `[ew-analyze -q]` → `ew-plan` → `ew-execute` → `ew-verify` → `ew-review` |
27
+ | 广泛重写 / 宏架构迁移 | `ew-analyze`(宏分析)→ `--decision-only` (`post-analyze-scope`) → `ew-roadmap` / `ew-plan` |
28
+ | 独立代码审查 / 覆盖验证 / UAT / 自动化测试 | `ew-review` / `ew-verify` / `ew-test` / `ew-auto-test` |
29
+ | 链内缺陷排查与修复 | `ew-debug` → `ew-plan --gaps` → `ew-execute` → `ew-verify` |
30
+ | Tracked Issue / Review Gap 闭环修复 | `ew-analyze --gaps` → `ew-plan --gaps` → `ew-execute` → `ew-verify` |
31
+ | 阶段多视角复盘 | `ew-retrospective` |
32
+ | 已有 compatible open Session | 不重建,直接进入共享执行循环 |
33
+
34
+ ## Decomposition Protocol (`S_DECOMPOSE`)
35
+
36
+ 1. narrow / 单步链跳过分解,直接构造最小 `boundary_contract`(`in_scope: [intent]`、`definition_of_done: "step completed with passing gates"`)。
37
+ 2. broad/medium 意图(影响 >=3 个模块、需跨包接口变更、或范围/约束/完成标准中 >=2 项不明确)最多询问 3 轮;`-y` 不跳过广泛歧义。
38
+ 3. 派生面向结果的 `boundary_contract` 与 `goals[]`(含 `id`、`goal`、`boundary`、`done_when`、`evidence`、`lifecycle`、`status: "pending"`)。
39
+ 4. 有分解时在 `session complete` 前插入 `--decision-only --decision-ref post-goal-audit` 决策门;多里程碑拆分仅在多 release 证据时先走 `ew-roadmap`。
40
+
41
+ ## Chain Creation (`S_CREATE`)
42
+
43
+ 1. **Knowledge Gate**: 建链前通过 `evolve context "<query>" --include-memory` 检索适用 Wiki 约束并记录读取。
44
+ 2. **Skill 契约校验**: 通过 `evolve skills` 与 `evolve skills validate <command>` 确认目标项目提交中的步骤契约(所有新增或修改的步骤必须先已提交进 Git `HEAD`)。
45
+ 3. **持久化 Session 与 Chain**:
46
+ - 通过 `evolve session open "<intent>" --id ew-<slug> [--definition-of-done "<text>"] [--boundary-contract '<json>'] [--goals '<json>'] [--auto] [--goal-mode] [--chain <commands...>] --actor <actor> --request-id <req_id> --reason "<reason>"` 持久化目标、边界与策略(不再停留在对话内存)。
47
+ - 带领域参数、`--retry-max`、`--goal-ref`、`--stage`、`--decision-ref` 或 `--decision-only` 的步骤,使用 open 返回的 `orchestration_revision` 通过 `evolve session chain insert` 逐条写入。
48
+ - 分解完成后可在回复中简要列出 `G1..Gn` 子目标及其 `done_when` 供用户确认(不要输出 `/goal` 斜杠命令)。
49
+
50
+ ## Target Scope Resolution 优先级
51
+
52
+ 1. 明确传入的目标路径、Session ID、Issue ID 或 `--from <alias>` 产物。
53
+ 2. 当前项目活跃 Session 的 `goals[]` / 未完成步骤。
54
+ 3. 多步链默认以 `{run_dir}` 隔离交付物;仍无法确定范围时使用宿主结构化提问工具(Antigravity 为 `ask_question`)向用户确认。
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: ew-analyze
3
+ wiki_categories: [arch]
4
+ search_profile:
5
+ wiki: [constraints, references]
6
+ memory: [correction, error, verified_fix]
7
+ description: Perform multi-dimensional analysis of a topic or existing implementation, producing findings and a risk-matrix consumable by plan
8
+ argument-hint: '[topic] [-y] [-q] [--from <artifact-alias>] [--gaps [ISS-ID]]'
9
+ required_links:
10
+ - references/prepare.md
11
+ - references/workflow.md
12
+ contract:
13
+ consumes:
14
+ - kind: context-package
15
+ alias: upstream-context
16
+ required: false
17
+ schema: context-package/1.0
18
+ role: attachment
19
+ accepts_negative_evidence: true
20
+ - kind: blueprint
21
+ alias: current-blueprint
22
+ required: false
23
+ schema: blueprint/1.0
24
+ role: primary
25
+ accepts_negative_evidence: true
26
+ - kind: diagnosis
27
+ alias: latest-debug
28
+ required: false
29
+ schema: diagnosis/1.0
30
+ role: primary
31
+ accepts_negative_evidence: true
32
+ - kind: priors
33
+ alias: session-priors
34
+ required: false
35
+ schema: priors/1.0
36
+ role: evidence
37
+ produces:
38
+ - path: outputs/findings.json
39
+ kind: findings
40
+ alias: current-analysis
41
+ role: primary
42
+ required: true
43
+ schema: findings/1.0
44
+ - path: outputs/risk-matrix.json
45
+ kind: risk-matrix
46
+ role: evidence
47
+ required: false
48
+ schema: risk-matrix/1.0
49
+ - path: outputs/priors.json
50
+ kind: priors
51
+ alias: session-priors
52
+ role: evidence
53
+ required: false
54
+ schema: priors/1.0
55
+ gates:
56
+ exit:
57
+ - exploration-done
58
+ - discussion-round
59
+ - scoring-complete
60
+ - intent-covered
61
+ contract_version: 2.1
62
+ session-mode: run
63
+ ---
64
+
65
+ # Analyze
66
+
67
+ Read [preparation](references/prepare.md), then follow the [analysis workflow](references/workflow.md).
68
+
69
+ - Follow `skills/ew-orchestrate/references/boundary-grill.md` when a responsibility conflict is found (write findings into `findings.json#boundary_grill[]` + `report.md`; never append raw Markdown into `.json`).
70
+ - Read [issue gap analysis](references/issue-gaps-analyze.md) for the --gaps branch.
@@ -0,0 +1,24 @@
1
+ # Issue Gaps Analysis — Root-Cause Protocol
2
+
3
+ Root-cause analysis for registered issues, triggered by `ew-analyze --gaps [ISS-ID]`. Supports a single issue (`ISS-ID`) or batch (all `open` / `registered`) with grouping and parallel analysis, writing `analysis` enrichment per issue plus `outputs/findings.json` for downstream `ew-plan --gaps`.
4
+
5
+ ## Input
6
+
7
+ - `ISS-ID` (optional): specific issue to analyze; if omitted, analyze all `open` / `registered` issues.
8
+ - `DEPTH`: `standard` or `deep` (default `standard`).
9
+
10
+ ## Pipeline
11
+
12
+ ```
13
+ Load Issues -> Classify & Group -> Gather Context -> Parallel Analysis -> Enrich Issue Records -> Write outputs/findings.json
14
+ ```
15
+
16
+ 1. **Load issues**: if `ISS-ID` is given, load that record (`E_ISSUE_NOT_FOUND` if missing) and skip grouping; otherwise load all `open`/`registered` records (`E_NO_ISSUES` if none).
17
+ 2. **Classify & group (batch only)**: group by same location prefix (first 2 path segments) or shared `affected_components`; ungrouped items stay 1-issue groups `{ group_id, label, issues[], shared_context_keywords[] }`. Display breakdown unless `-y`.
18
+ 3. **Gather codebase context (per group)** — run Knowledge Gate lookup first, then merge keywords (`title`, `description`, `location`, `affected_components`):
19
+ - **standard**: `evolve code search` per group + targeted file reads.
20
+ - **deep**: multi-query `evolve code search` + parallel `research` subagent exploration (error handling, data flow, dependencies); join all subagents before proceeding.
21
+ 4. **Parallel analysis (per group)** — mandatory, not substitutable by manual reads alone:
22
+ Dispatch per group via host subagent (e.g. `invoke_subagent`, joining every spawned subagent before advancing) or `evolve delegate "<group prompt>" --to codex|agy --mode analysis` (pass `--session <session> --run <run>` when using `--to codex` in a Run). For each issue output `{ iss_id, root_cause, impact, related_files[], confidence, suggested_approach, cross_refs[] }` backed by `file:line` evidence. Retry once with a narrowed prompt or fallback executor on failure, noting any unverified scope explicitly.
23
+ 5. **Write issue analysis**: set `issue.analysis = { root_cause, affected_files, impact_scope, fix_direction, confidence, cross_refs, analyzed_at, tool, depth }`, update `updated_at`, append `{ action: "analyzed" }` history (status unchanged), and re-read to confirm persistence.
24
+ 6. **Output `outputs/findings.json` & `report.md`**: aggregate grouped root-cause findings, cross-group dependencies, and **Locked** (evidence-derived) / **Free** (planner discretion) decisions into `outputs/findings.json` (`mode: "gaps"`), summarizing highlights in `report.md`.
@@ -0,0 +1,8 @@
1
+ # Pre-flight: ew-analyze
2
+
3
+ Confirm goal clarity and branch routing before entering [workflow](workflow.md):
4
+
5
+ - **Mode check**: pure digits -> micro milestone deep-dive; text -> macro topic analysis; `--gaps [ISS-ID]` -> [issue gap analysis](issue-gaps-analyze.md); `-q` -> decision extraction only (must not be omitted).
6
+ - **Upstream `--from` alias**: read only via injected paths (`current-guidance`, `current-blueprint`, `latest-debug`); keep already-locked decisions invariant and focus open decisions/questions. If `latest-debug` is present, treat the diagnosis as confirmed symptom and analyze impact/fix direction rather than re-diagnosing.
7
+ - **Knowledge & scope invariants**: satisfy the Knowledge Gate first (`wiki_context`/`wiki_reference` or CLI `--reads`); record new domain terms in `report.md`; never modify source files during analysis.
8
+ - **Evidence & convergence**: exploration subagents (`invoke_subagent` or host subagent, always joined before advancing) + independent `evolve delegate` analysis provide required evidence — manual reads alone do not satisfy scoring gates. Ground `scope_verdict` (`small|medium|large`) accurately to guide downstream `ew-plan` decomposition.
@@ -0,0 +1,138 @@
1
+ # Workflow: Analyze
2
+
3
+ Multi-dimensional iterative analysis: exploration -> multi-perspective synthesis -> discussion timeline -> intent tracking -> six-dimension scoring -> decision extraction.
4
+
5
+ ## Mode & Pipeline
6
+
7
+ ```
8
+ First positional arg matches ^\d+$ -> micro (milestone deep-dive)
9
+ First positional arg is non-numeric -> macro (topic impact; mixed text counts as macro)
10
+ No arg + active milestone -> current milestone micro; else macro
11
+ --gaps [ISS-ID] -> gaps ([issue gap analysis](issue-gaps-analyze.md))
12
+ -q -> quick (skip Steps 2-5, jump from Step 1 to Step 6)
13
+ ```
14
+
15
+ Full mode (`-q` and `--gaps` absent):
16
+ 1. **Setup & Scoping** -> Knowledge/upstream load, scoping, `report.md` discussion init
17
+ 2. **Exploration & Perspectives** -> `evidence/exploration-codebase.json`, `evidence/perspectives.json`
18
+ 3. **Interactive Discussion** -> up to 5 rounds in `report.md` (with pressure pass & intent tracking)
19
+ 4. **Six-Dimension Scoring** -> 6 dimensions (1-5) + risk matrix
20
+ 5. **Synthesis & Conclusion** -> `outputs/findings.json`, `outputs/risk-matrix.json`, `report.md`
21
+ 6. **Decision Extraction** -> `findings.json#decisions[]` (Locked/Free/Deferred)
22
+
23
+ In macro mode, Step 5 sets `scope_verdict`:
24
+ - `large`: 3+ independent subsystems or hard serial barrier -> downstream `ew-plan` with multi-subsystem decomposition
25
+ - `medium`: 1-2 parallelizable subsystems -> downstream `ew-plan`
26
+ - `small`: single or few-file change -> downstream `ew-plan`
27
+
28
+ ## Blocking Step Gates (Full mode only)
29
+
30
+ | Gate | Requirement to advance |
31
+ |------|------------------------|
32
+ | `exploration-done` (2 -> 3) | Exploration subagent joined; `evidence/exploration-codebase.json` has >=1 code anchor; >=1 `evolve delegate` (or independent subagent) pass written to `evidence/perspectives.json`; baseline confidence recorded |
33
+ | `discussion-round` (3 -> 4) | >=1 interactive round with user feedback recorded; confidence re-scored >=1 time with delta; >=1 pressure pass completed |
34
+ | `scoring-complete` (4 -> 5) | All 6 dimensions scored citing exploration/perspective evidence (**manual Read alone is invalid**) |
35
+ | `intent-covered` (5 -> 6) | `outputs/findings.json` written; Intent Coverage Matrix has zero unhandled ❌ (or user-confirmed deferral) |
36
+
37
+ ---
38
+
39
+ ## Process
40
+
41
+ ### Step 1: Setup & Scoping
42
+
43
+ 1. **Upstream typed artifacts**: read only via injected alias->path (`upstream-context`, `current-blueprint`, `latest-debug`), never guess latest by mtime. Keep locked constraints fixed; prioritize open constraints/questions. Reuse `architecture_template_evidence` when present without re-searching.
44
+ 2. **Project knowledge**: reuse `session-priors` when the scope matches; otherwise query `wiki_context` / `memory_search` and open hits with `wiki_reference` / `memory_get`. In CLI-only hosts, run `evolve context "<query>" --session <session> --include-memory --reads "<run_dir>/knowledge-reads.json"` and open selected IDs with `--reads ... --from-search ...`.
45
+ 3. **Domain terminology & prior runs**: align with `arch` Wiki references, record new term candidates in `report.md`, and skip already-decided areas from same-milestone analyses.
46
+
47
+ **Quick routing (`-q`)**: jump directly to Step 6.
48
+
49
+ **Scoping** (skip if `-c`/`-y`; otherwise use a structured prompt such as `ask_question`, up to 3 questions):
50
+ 1. **Analysis dimensions** (multiSelect, pick 3-4):
51
+ - `architecture`: System Design, Component Interactions, Technology Choices, Design Patterns
52
+ - `implementation`: Code Structure, Patterns, Error Handling, Algorithm Analysis
53
+ - `performance`: Bottlenecks, Optimization, Resource Utilization, Concurrency
54
+ - `security`: Vulnerabilities, Auth, Data Protection, Input Validation
55
+ - `concept`: Foundation, Core Mechanisms, Patterns, Trade-offs
56
+ - `comparison`: Solution Comparison, Pros/Cons, Technology Evaluation
57
+ - `decision`: Criteria, Trade-off Analysis, Risk Assessment, Impact
58
+ - `external_research`: Standard Stack, Architecture Patterns, Don't Hand-Roll, Common Pitfalls (auto-suggest for unfamiliar domains or empty codebase search)
59
+ 2. **Analysis perspectives** (multiSelect, up to 4): Technical (implementation/feasibility), Architectural (design/scalability), Product/Business (value/impact), Domain Expert (standards/best practices).
60
+ 3. **Depth** (single): Quick Overview / Standard / Deep Dive. (`-y` defaults: all relevant dimensions, single synthesis perspective, Standard depth.)
61
+
62
+ Initialize `report.md`: metadata, original User Intent, replaceable `Current Understanding` block, empty discussion timeline, dimension rationale.
63
+
64
+ ### Step 2: Exploration & Multi-Perspective Analysis
65
+
66
+ **2.0 Research handoff** (only when `external_research` is active, or architecture patterns are active without upstream `architecture_template_evidence`):
67
+ 1. If `external_research` is selected, run 2-3 targeted web searches (`search_web` in Antigravity or host equivalent) for stack, architecture patterns, and pitfalls.
68
+ 2. Delegate synthesis (plus one focused architecture-template lookup if absent) to a `research` subagent (joined before proceeding) returning markdown only: `## Standard Stack`, `## Architecture Patterns`, `## Don't Hand-Roll`, `## Common Pitfalls`, and optional `## Architecture Template Evidence` (preserve `no_match`/`load_failed` status cleanly). Store as in-memory `researchContext`.
69
+
70
+ **2.1 Codebase exploration** (mandatory subagent, not manual Read/Grep):
71
+ Launch exploration subagent(s) (`invoke_subagent` with `research` or host subagent; join all before advancing) across three layers:
72
+ - **L1 Breadth**: relevant files and module boundaries (`relevant_files[]`)
73
+ - **L2 Depth**: top 3-5 files, 2-3 call/data-flow layers (`call_chains[]`, `data_flows[]`)
74
+ - **L3 Anchors**: 20-50 line `file:line` snippets (`code_anchors[]`)
75
+
76
+ Write merged anchors to `evidence/exploration-codebase.json` (plus optional per-perspective files `evidence/explorations/{perspective}.json` when running multi-perspective up to 4 parallel subagents).
77
+
78
+ **2.2 Cross-perspective analysis** (mandatory independent pass):
79
+ Run >=1 `evolve delegate "<exploration context prompt>" --to codex|agy --mode analysis` (pass `--session <session> --run <run>` when using `--to codex` inside a bound Run; note `--to agy` runs standalone without `--session`/`--run`). Append `researchContext` as non-binding recommendations if present. For multi-perspective runs, fan out up to 4 parallel subagents/`evolve delegate` calls and wait/join all before continuing.
80
+
81
+ **2.3 Aggregation & Round 1**: merge into `evidence/perspectives.json` (including `technical_solutions[]`: `{round, solution, problem, rationale, alternatives, status: proposed|validated|rejected, evidence_refs[], next_action}`), append Round 1 to `report.md`, check initial Intent coverage (✅/🔄/❌), and score baseline confidence across weights (`findings_depth .30`, `evidence_strength .25`, `coverage_breadth .20`, `user_validation .15`, `consistency .10`). `<60%` continue; `60-80%` confirm before converging; `>80%` ready for synthesis.
82
+
83
+ ### Step 3: Interactive Discussion Loop (up to 5 rounds)
84
+
85
+ Per round:
86
+ 1. State `Current Understanding` (Round >= 2) and present latest findings.
87
+ 2. Prompt via structured choice (`ask_question` / host equivalent, skipped in `-y` which auto-deepens <=3 rounds) with header `Round {N} | Confidence: {overall}% | Weakest: {weakest_dim} ({dim_score}%)`:
88
+ - **Go deeper** (recommended): pick sub-direction (up to 4 choices) -> targeted exploration -> merge
89
+ - **Adjust direction**: capture new focus -> re-explore -> log decision delta
90
+ - **Supplement information**: integrate user constraints/corrections -> verify via subagent/delegate if needed
91
+ - **Analysis complete**: run readiness check -> proceed to Step 4
92
+ 3. Record Round N narrative synthesis (`Starting point`, `Key progress`, `Decision impact`, `Current understanding`, `Remaining questions`), Intent Drift checks (❌/⚠️ surfaced next round), updated `technical_solutions[]`, confidence delta, and quality guards:
93
+ - **Pressure Pass** (mandatory >=1 before Step 4): challenge highest-confidence finding (`evidence demand -> assumption probe -> boundary/tradeoff -> root cause`) under `#### Pressure Test`.
94
+ - **Devil's Advocate** (dim > 0.7), **Scope Minimizer** (>5 findings), **Stall Detection** (2 rounds delta < 5%).
95
+ 4. **Readiness Gate**: block "Analysis complete" if unhandled ❌, any dim < 40%, no pressure pass, unresolved contradiction, or overall < 80% (unless user explicitly accepts into `residual_risks[]`, or `-y` finishes 3 auto-rounds and records gaps in `residual_risks[]`).
96
+
97
+ ### Step 4: Six-Dimension Scoring
98
+
99
+ Score each dimension 1-5 (`Feasibility`, `Impact`, `Risk`, `Complexity`, `Dependencies`, plus `Alternatives` with >=2 options N/A), citing exploration/delegate evidence and per-dimension confidence %. Build probability-impact risk matrix (`outputs/risk-matrix.json`), form `go | go_with_conditions | no_go` verdict, and write confidence + pressure summary to `report.md`.
100
+
101
+ ### Step 5: Synthesis & Conclusion
102
+
103
+ 1. **Intent Coverage Matrix**: verify every original intent item is `✅ Addressed`, `🔀 Transformed`, or `❌ Missed` (each ❌ requires an extra round or user-confirmed deferral).
104
+ 2. **Write `outputs/findings.json`** (with `_meta: { kind: "findings", schema: "findings/1.0", role: "primary", alias: "current-analysis" }`, `outputs/risk-matrix.json` when scored): merge validated `technical_solutions[]` into prioritized recommendations, record Decision Trail, `architecture_template_evidence`, `scope_verdict`, and `recommendation`. Run interactive recommendation review (skipped in `-y`).
105
+ 3. **Seal `session-priors`**: Runtime auto-snapshots `outputs/priors.json` from opened Wiki entries (`wiki_reference` / `wiki_context`, or CLI `knowledge-reads.json` Wiki reads at completion).
106
+ 4. **Update `report.md`**: conclusion, recommendations, Decision Trail, Intent Coverage Matrix, session stats.
107
+
108
+ ### Step 6: Decision Extraction (Always runs — main step in `-q`)
109
+
110
+ 1. Identify 3-5 undecided domain gray areas (SEE / CALL / RUN / READ / ORGANIZE), skipping upstream locked items.
111
+ 2. Let user select areas to discuss (`-y` skips interactive prompts and auto-resolves discussion rounds from code evidence; choosing "Skip" writes empty decision lists).
112
+ 3. Discuss selected areas with Option A/B/C trade-offs (respect upstream milestone boundaries; new out-of-scope features go to `Deferred`).
113
+ 4. Write `findings.json#decisions[]` as `{title, class: locked|free|deferred, context, options[], chosen, reason}` (attach `researchContext` hints to `free` items if present).
114
+ 5. Record `deferred` decisions in `findings.json#decisions[]` and `report.md` (only invoke an external issue tracker with explicit user authorization).
115
+
116
+ ### Wrap-up
117
+
118
+ Write `report.md` with frontmatter (`verdict: ready`, `summary`, `constraints`, `decisions`, `concerns`, `next: [{ command: ew-plan, reason: ..., needs: [current-analysis] }]`) and sections (`## Summary`, `## Conclusion/Verdict`, `## Discussion/Retrospective`, `## Artifacts`, `## Handoff/Next`). Use `{{aref:current-analysis#/...}}` instead of copying JSON values.
119
+ Seal via fenced `evolve run complete <run_id> --session <session> --actor <actor> --expected-orchestration-revision <rev> --expected-run-revision <rev> --gate exploration-done --gate discussion-round --gate scoring-complete --gate intent-covered --summary "<summary>" --verdict done|done_with_concerns` (for `-q` / `--gaps`, confirm `outputs/findings.json` and pass the exit gates with quick/gap mode evidence summary; recover blockers via `evolve run check` + `evolve run transition`). Hand off closeout candidate staging afterward to `ew-knowledge` (`evolve workflows show knowledge`).
120
+
121
+ ---
122
+
123
+ ## Recording Formats
124
+
125
+ **Decision Record**:
126
+ > **Decision**: [Description] | **Context**: [Trigger] | **Options**: [...] | **Chosen**: [Approach] (**Reason**: ...) | **Rejected**: [...] | **Evidence Source**: [subagent / `evolve delegate` / user / `file:line`] | **Impact**: [...]
127
+
128
+ **Technical Solution**:
129
+ > **Solution**: [Approach] | **Status**: [Proposed/Validated/Rejected] | **Problem**: [...] | **Rationale**: [...] | **Alternatives**: [...] | **Evidence**: [`file:line`] | **Next Action**: [...]
130
+
131
+ ## Error Codes
132
+
133
+ | Code | Condition | Recovery |
134
+ |------|-----------|----------|
135
+ | `E001` | No relevant findings | Broaden search or ask user to clarify |
136
+ | `W001` | Exploration subagent failed | Retry once with narrowed scope; escalate or mark unverified dimensions explicitly |
137
+ | `W002` | `evolve delegate` timeout/error | Narrow prompt and retry, switch executor, or mark perspective unverified |
138
+ | `W003` | Max rounds reached (5) | Force synthesis and offer follow-up continuation |
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: ew-auto-test
3
+ description: Layered automated test generation and execution pipeline (L0-L3) with RED-GREEN integrity and bounded convergence
4
+ argument-hint: '[scope] [-y] [-c] [--max-iter N] [--layer L0|L1|L2|L3] [--dry-run] [--re-run]'
5
+ wiki_categories: [test, coding]
6
+ search_profile:
7
+ wiki: [constraints, references]
8
+ memory: [error, verified_fix]
9
+ session-mode: run
10
+ required_links:
11
+ - references/prepare.md
12
+ - references/workflow.md
13
+ contract:
14
+ consumes:
15
+ - kind: blueprint
16
+ alias: current-blueprint
17
+ required: false
18
+ schema: blueprint/1.0
19
+ role: primary
20
+ accepts_negative_evidence: true
21
+ - kind: plan
22
+ alias: current-plan
23
+ required: false
24
+ schema: plan/1.0
25
+ role: primary
26
+ accepts_negative_evidence: true
27
+ - kind: verification
28
+ alias: latest-verification
29
+ required: false
30
+ schema: verification/1.0
31
+ role: primary
32
+ accepts_negative_evidence: true
33
+ - kind: artifact
34
+ alias: current-execution
35
+ required: false
36
+ schema: artifacts/1.0
37
+ role: primary
38
+ accepts_negative_evidence: true
39
+ - kind: review-findings
40
+ alias: latest-review
41
+ required: false
42
+ schema: review-findings/1.0
43
+ role: primary
44
+ accepts_negative_evidence: true
45
+ - kind: diagnosis
46
+ alias: latest-debug
47
+ required: false
48
+ schema: diagnosis/1.0
49
+ role: primary
50
+ accepts_negative_evidence: true
51
+ - kind: priors
52
+ alias: session-priors
53
+ required: false
54
+ schema: priors/1.0
55
+ role: evidence
56
+ produces:
57
+ - path: outputs/auto-test-report.json
58
+ kind: auto-test-report
59
+ alias: latest-auto-test
60
+ role: primary
61
+ required: true
62
+ schema: auto-test-report/1.0
63
+ - path: outputs/traceability.md
64
+ kind: traceability
65
+ role: evidence
66
+ required: false
67
+ schema: traceability/1.0
68
+ gates:
69
+ exit:
70
+ - tests-generated
71
+ - execution-converged
72
+ contract_version: 2.1
73
+ ---
74
+
75
+ # Auto-Test
76
+
77
+ Read [preparation](references/prepare.md), then follow the [auto-test workflow](references/workflow.md).
78
+
79
+ - Layered automated test generation & execution pipeline (`L0 -> L1 -> L2 -> L3`, fail-fast) with RED-first verification, parallel scenario authoring/diagnosis, and bounded `--max-iter` convergence.
80
+ - Keeps existing test files untouched and never modifies production code to force green runs.