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,74 @@
1
+ #!/usr/bin/env node
2
+ import fs from 'node:fs';
3
+ import path from 'node:path';
4
+ import { fileURLToPath, pathToFileURL } from 'node:url';
5
+ import { resolveProjectRoot } from './context.mjs';
6
+ import {
7
+ listSurfaceBriefs,
8
+ resolveSurfaceBrief,
9
+ surfaceBriefPathForTarget,
10
+ writeSurfaceBrief,
11
+ } from './lib/surface-briefs.mjs';
12
+
13
+ function summary(brief, projectRoot) {
14
+ return {
15
+ slug: brief.slug,
16
+ path: path.relative(projectRoot, brief.path).split(path.sep).join('/'),
17
+ primaryTarget: brief.primaryTarget,
18
+ relatedTargets: brief.relatedTargets,
19
+ };
20
+ }
21
+
22
+ function main(argv) {
23
+ const [command, target, bodyFile, ...relatedTargets] = argv;
24
+ const projectRoot = resolveProjectRoot(process.cwd(), target ? { targetPath: target } : {});
25
+ if (command === 'path') {
26
+ const filePath = surfaceBriefPathForTarget(target, { projectRoot });
27
+ if (!filePath) throw new Error('surface brief path requires a concrete target');
28
+ process.stdout.write(`${path.relative(process.cwd(), filePath) || filePath}\n`);
29
+ return;
30
+ }
31
+ if (command === 'list') {
32
+ process.stdout.write(`${JSON.stringify(listSurfaceBriefs(projectRoot).map((brief) => summary(brief, projectRoot)), null, 2)}\n`);
33
+ return;
34
+ }
35
+ if (command === 'read') {
36
+ const result = resolveSurfaceBrief(projectRoot, target || null);
37
+ if (result.brief) {
38
+ process.stdout.write(result.brief.text);
39
+ return;
40
+ }
41
+ if (result.candidates.length) process.stderr.write(`${JSON.stringify(result.candidates.map((brief) => summary(brief, projectRoot)), null, 2)}\n`);
42
+ process.exit(2);
43
+ }
44
+ if (command === 'write') {
45
+ if (!target || !bodyFile) throw new Error('usage: surface-brief.mjs write <primary-target> <body-file>');
46
+ const filePath = writeSurfaceBrief({
47
+ projectRoot,
48
+ primaryTarget: target,
49
+ relatedTargets,
50
+ body: fs.readFileSync(bodyFile, 'utf-8'),
51
+ });
52
+ process.stdout.write(`${path.relative(process.cwd(), filePath) || filePath}\n`);
53
+ return;
54
+ }
55
+ throw new Error('usage: surface-brief.mjs <path|list|read|write> [target] [body-file] [related-target ...]');
56
+ }
57
+
58
+ function isMainModule() {
59
+ if (!process.argv[1]) return false;
60
+ try {
61
+ return fs.realpathSync(fileURLToPath(import.meta.url)) === fs.realpathSync(process.argv[1]);
62
+ } catch {
63
+ return import.meta.url === pathToFileURL(process.argv[1]).href;
64
+ }
65
+ }
66
+
67
+ if (isMainModule()) {
68
+ try {
69
+ main(process.argv.slice(2));
70
+ } catch (error) {
71
+ process.stderr.write(`${error?.message || error}\n`);
72
+ process.exit(1);
73
+ }
74
+ }
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: ew-knowledge
3
+ description: Unified project knowledge governance — Knowledge Gate retrieval, working memory sync, Session/Skill closeout harvesting, candidate review, Wiki publication, and legacy migration.
4
+ argument-hint: "[intent — e.g. 'read <query>' | 'closeout <session-id>' | 'review' | 'publish' | 'migrate' | 'sync']"
5
+ session-mode: none
6
+ version: 0.2.0
7
+ ---
8
+
9
+ # Evolve 知识治理
10
+
11
+ 本 Skill 独立承担项目知识全生命周期治理,覆盖检索门禁、工作记忆、收尾沉淀、候选审查、Wiki 变更、历史迁移以及向 `workflow-evolve` / `ew-skill-design` 的分流。详细规范按需加载:
12
+
13
+ - [知识路由与规则](references/knowledge-route.md) — 统一 Wiki 模型(`mode: constraint|reference`)、ID 边界、`knowledge-reads/1.0` 回执、L3 初始化、旧知识迁移与分流标准。
14
+ - [收尾与候选晋升协议](references/closeout-protocol.md) — `Read → Refresh → Present → Ask → Execute → Verify` 收尾流程与权限边界。
15
+ - [Wiki 与记忆维护参考](references/wiki-maintenance.md) — `evolve wiki` / `evolve memory` 常用维护与多宿主历史提取命令。
16
+
17
+ ## 意图路由
18
+
19
+ | 用户意图 | 路由 | 默认权限 | 主要入口 |
20
+ | --- | --- | --- | --- |
21
+ | 查约束、查参考、查术语、查 Wiki / 记忆 | `read` | 只读 | `evolve context` / `wiki constraints` / `wiki references` / `wiki get` / `memory search` |
22
+ | 记录或同步多宿主工作记忆 | `memory` | 显式写入记忆库 | `evolve memory put\|extract\|config\|sync` |
23
+ | Session 或独立 Skill 完成后的收尾沉淀 | `closeout` | 生成候选(不写 Wiki) | `evolve closeout session\|skill\|harvest\|scan` |
24
+ | 审查重复、重叠、冲突与证据 | `review` | 只读 | `evolve closeout show`、`evolve wiki get\|search` |
25
+ | 批准并发布 / 更新 Wiki 候选 | `publish` | 需明确人类授权 | `evolve wiki propose` → `evolve wiki apply` 或 `evolve closeout publish` |
26
+ | 迁移 Maestro Flow 旧知识目录 | `migrate` | 先预览再 `--apply` | `evolve knowledge import` / `evolve wiki migrate` |
27
+ | 归因于具体 Skill 的问题或新流程需求 | `evolve` / `skill-design` | 只读回溯 / 路由 | `evolve session review` / `skills review` / `closeout route` → 交由 `workflow-evolve` 或 `ew-skill-design` |
28
+
29
+ ## 核心不变式
30
+
31
+ 1. **只读优先**:先识别操作与目标;检索结果、Closeout 候选、审计与回溯信号均只是证据,仅在明确授权发布时写入 `wiki/`。
32
+ 2. **禁止绕过治理写入**:正式知识统一通过 `evolve wiki` / `evolve closeout` 写入,严禁直接创建或修改 `wiki/entries/`、`.workflow/specs/` 或 `.workflow/knowhow/`。
33
+ 3. **`-y` 不是发布授权**:自动模式、高重要性标记、机器推荐或一般性同意审查均不授权 Wiki 发布;发布必须确认固定候选 ID、关系/目标与动作,否则保留待处理清单并延期(defer)。
34
+ 4. **收尾与发布解耦**:零候选、拒绝或延期均可正常完成任务与 Session;禁止为凑条目把缺参考或一次性过程写成规则。
35
+ 5. **不越权开启新链**:执行知识操作时不擅自新建 `Session` / `Run`,也不把未授权工作区自由文本混入收尾证据。
@@ -0,0 +1,68 @@
1
+ # 收尾与候选晋升协议
2
+
3
+ 本文件定义任务 / Session 结束或独立知识收尾时,完成责任人(Completion Owner)遵循的规范流程:`Read → Refresh → Present → Ask → Execute → Verify`。
4
+
5
+ ## 所有权与时机
6
+
7
+ - Run 完成阶段仅允许沉淀候选;已采纳决策或锁定约束不等同于 Wiki 发布授权。
8
+ - 长链中间 Run 继续推进既有链,不在中途插入发布审批;整体终端收尾或显式知识管理请求时执行本协议。
9
+ - `ew-knowledge` 自身与 `workflow-evolve` 的执行记录不进入自动沉淀,防止递归。
10
+
11
+ ## 执行步骤
12
+
13
+ ### 1. Read internally(只读收集与查重)
14
+
15
+ 先消费已提交回执并查看现有候选与对照关系,不把人类用户直接打发去运行 CLI:
16
+
17
+ ```text
18
+ evolve --root <project> closeout session <session-id> --project <source-project-id> --receipt <receipt-id>
19
+ evolve --root <project> closeout skill <execution-id> --skill <skill-id> --skill-version <version> --status <status> --transcript <messages.json> --project <source-project-id>
20
+ evolve --root <project> closeout scan <source-project-root> --project <source-project-id>
21
+ evolve --root <project> closeout show <receipt-id> --project <source-project-id>
22
+ ```
23
+
24
+ - 重复投递按回执身份幂等处理;模型抽取失败时沿用同一回执重试,不重构或扩大证据范围。
25
+ - 先用 `evolve wiki search` / `evolve wiki get` 核对每条候选与现有活跃 Wiki 的重复、重叠或冲突,保留双方证据并先于发布生成预览:
26
+
27
+ ```text
28
+ evolve --root <project> wiki propose <change.json> --closeout <closeout-id> --candidate <candidate-id>
29
+ evolve --root <project> wiki propose <change.json> --evidence <receipt-id>
30
+ evolve --root <project> wiki changes [<change-id>]
31
+ ```
32
+
33
+ - 没有合格候选时直接记录零候选回执并正常结束。
34
+
35
+ ### 2. Present(结构化呈现)
36
+
37
+ 向用户逐条展示每个可处理候选的:
38
+ - 精确 `candidate-id`、建议动作(新增 / 更新 / 追加来源 / 标记冲突 / 跳过)与理由;
39
+ - 真实验证证据锚点(完成回执、消息 ID、命令结果);
40
+ - 与既有 Wiki 条目的命中对照关系(不要将不可信原始对话摘录直接当作已验证正文)。
41
+
42
+ ### 3. Ask(人类审查与固定授权)
43
+
44
+ 通过宿主结构化提问工具(Antigravity 使用 `ask_question`,或宿主等效工具)一次性收集**固定候选 ID 列表、关系裁决与发布/分流动作**的明确授权:
45
+ - 必须提供选择、拒绝与延期选项;群组确认仅对本次展示的固定 ID 列表生效。
46
+ - `-y`、高重要性标记或机器建议**不能**替代人类发布确认;无提问工具且无先前针对同批固定 ID 的显式授权时,直接延期保留待审查清单,不要输出裸命令敷衍了事。
47
+ - 不得为清空待办而伪造 `duplicate` 等裁决。
48
+
49
+ ### 4. Execute(按固定授权逐项执行)
50
+
51
+ 仅对明确批准的固定 ID 执行对应操作(禁止 `--all` 扩大选择范围):
52
+
53
+ ```text
54
+ # 路径 A:对审核通过的变更执行 Wiki 应用或直接发布
55
+ evolve --root <project> wiki apply <change-id>
56
+ evolve --root <project> closeout publish <closeout-id> <candidate-id> "<title>"
57
+
58
+ # 路径 B:问题可归因于具体 Skill 或需要新流程包时进行分流
59
+ evolve --root <project> closeout route <closeout-id> <candidate-id> --skill <skill-id> --skill-version <version>
60
+ evolve --root <project> session review <session-id>
61
+ evolve --root <project> skills review <execution-id> --project <source-project-id>
62
+ ```
63
+
64
+ 若候选在 `closeout route` 后达到元 Skill 设计条件,再显式转交 `ew-skill-design`(`skill-design task|run|review|replay|apply`);若仅是既有 Skill 指令或边界缺陷,则转交 `workflow-evolve`。
65
+
66
+ ### 5. Verify(回读确认)
67
+
68
+ 执行后回读 `evolve wiki get <id>` / `evolve wiki changes <change-id>` / `evolve closeout show <receipt-id>`,如实报告成功发布的条目 ID 与仍处于待审查/延期/阻塞状态的候选项。
@@ -0,0 +1,73 @@
1
+ # Evolve 知识路由与规则
2
+
3
+ 本文件定义 Evolve 统一知识模型、ID 边界、搜索回执、L3 初始化、旧知识迁移与自进化分流规则。Wiki、Session/Skill 收尾沉淀、候选审查和发布共用统一 Wiki 与 `evolve` CLI(源码仓库内使用 `node dist/workflow-cli.js`)。
4
+
5
+ ## 统一 Wiki 条目
6
+
7
+ 正式知识只进入 Wiki 条目,原 Spec 和 Knowhow 通过属性表达差异:
8
+
9
+ - `mode: constraint` — 执行约束、质量门禁和适用规则。
10
+ - `mode: reference` — 经验、方法、模板、术语和可选建议。
11
+ - `status: active|needs_review|deprecated` — 生命周期状态。
12
+ - `scope` — 默认 `project`,也可用 `task:<kind>` 或 `path:<glob>` 限定适用范围。
13
+ - `categories`、`tags`、`keywords` — 用于查询和路由,不能替代 `mode` 与 `scope`。
14
+ - `sources` — 必须可回查到完成回执、消息锚点或迁移来源。
15
+
16
+ 正式知识统一通过 `evolve wiki` 命令写入 `wiki/`,禁止直接创建或修改历史知识目录或 `wiki/entries/`。
17
+
18
+ ## 核心规则
19
+
20
+ 1. 先识别操作,再识别目标:`查、搜索、读取、引用` 进入 `read`;`收尾、沉淀、harvest` 进入 `closeout`;`审查、重复、冲突、候选` 进入 `review`;`发布、批准、应用` 进入 `publish`;`迁移、导入` 进入 `migrate`。
21
+ 2. 只有明确要求发布或应用时才执行写入。检索结果、Closeout 候选、审计结果和回溯信号都只是证据。
22
+ 3. Session 收尾和独立 Skill 收尾进入同一 Closeout 流程,只使用完成回执中的证据范围,不从未授权工作区文本补证。
23
+ 4. Closeout 提取可复用方法后,先核对适用条件、验证证据和现有条目关系,再决定追加来源、创建候选、更新条目或标记冲突。
24
+ 5. 同一内容在唯一活跃 `reference` 条目中重复验证时,可以只追加 `sources`;正文、作用域和模式变化必须走 Wiki 提案。
25
+ 6. `constraint` 与 `reference` 发生冲突时保留双方证据并创建待审查关系,不自动覆盖活跃条目。
26
+ 7. 归因到具体 Skill、版本、读取文件与证据的信号转交 `workflow-evolve`;项目级规则与跨任务经验留在 Wiki。
27
+ 8. 候选只有在需要新契约、新产物、跨 Skill 路由、至少 3 个稳定步骤或明确要求新增 Skill 时才进入 `ew-skill-design`;单条指令与条件链接继续由 `workflow-evolve` 处理。
28
+
29
+ ## Read 与 ID 边界
30
+
31
+ 按查询类型选择最窄入口;约束读取带适用上下文,参考读取保留条目 ID 和来源。
32
+
33
+ ```text
34
+ evolve --root <project> wiki constraints --category <category>
35
+ evolve --root <project> wiki references "<topic>" --task <kind>
36
+ evolve --root <project> wiki get <entry-id> --resolved --task <kind>
37
+ evolve --root <project> wiki search "<query>"
38
+ evolve --root <project> context "<query>" --task <kind> --session <session-id> --include-memory
39
+ evolve --root <project> context "<query>" --session <current-session-id> --memory-session <historical-session-id> --include-memory
40
+ evolve --root <project> context "<query>" --context-file <context.json> --include-memory
41
+ evolve --root <project> search "<query>" --scope memory --scene <scene> --type <type> --reads <knowledge-reads.json>
42
+ ```
43
+
44
+ - 标准顺序为 `search → get`:搜索返回摘要与稳定 `knowledge_id`,精确读取(`wiki get <id> --resolved` / `memory get <id>`)才返回完整正文、作用域和来源。
45
+ - 写入接口(`propose`、`changes`、`apply`)必须使用规范化条目 ID、候选 ID 或变更 ID 并校验基线哈希,不接受别名。
46
+ - 零命中时保留查询条件与空结果,禁止把“缺少参考”误写成新的 `constraint`。
47
+
48
+ ## 搜索回执与 `session-priors`
49
+
50
+ Run MCP 的 `wiki_context` 与 `wiki_reference` 自动记录 `knowledge_reads/1.0` 并在封存时写入回执。分析 Run 还会把已读 Wiki 正文和约束封存为 `session-priors`;后续 Run 通过 `artifact-read` 打开该产物后,`priors_reuse` 自动记录产物 ID、哈希和原 Run ID。
51
+
52
+ - `searches[]` 记录查询词、阶段过滤条件、返回 ID 与命中数。
53
+ - `reads[]` 记录精确读取及其 `from_search_id`(或 `priors` 来源)、`content_sha256` 与 `version`。
54
+ - CLI 模式下跨调用复用同一个 `--reads <run_dir>/knowledge-reads.json`,并在精确读取时传入 `--from-search <search-id>`;无搜索时不伪造记录,零命中保留 `returned_ids: []`。
55
+
56
+ ## L3 初始化与无侵入回溯
57
+
58
+ - 初始化时调用 `evolve context` 加载 L3 Wiki 约束与参考(返回 `agent-memory-envelope/1.0`),不读取宿主原始历史文件。
59
+ - `context --session` 只标记当前上下文;筛选历史工作记忆需显式使用 `--memory-session`。
60
+ - 回溯优先消费已提交的 Session/Run 回执;需要补充对话历史时再按显式配置的 `host_kind` 与根目录读取并转换为 `transcript-evidence/1.0`。
61
+
62
+ ## 迁移旧 Spec 与 Knowhow
63
+
64
+ 在旧项目根目录预览迁移条目与待审查数,核对后追加 `--apply` 写入并建索引:
65
+
66
+ ```text
67
+ evolve knowledge import [<source-project>] [--root <target-project>] [--project <source-id>] [--knowhow-only] [--apply]
68
+ evolve knowledge import --global [--knowhow-only] [--apply]
69
+ evolve wiki migrate <legacy-root> [--scope project|global|team|personal] [--knowhow-only] [--apply]
70
+ ```
71
+
72
+ - `--knowhow-only` 仅迁移 `.workflow/knowhow/`;`--global --apply` 导入用户全局 `~/.evolve` Wiki(用 `evolve --root "<home>/.evolve" context "<query>"` 查阅)。
73
+ - 重复导入保留既有相同条目并保留原文件出处;带仓库限制的条目可用 `--repository "<repo-uuid>"` 检索。
@@ -0,0 +1,27 @@
1
+ # Wiki 与记忆维护参考
2
+
3
+ 本文件汇总 `evolve wiki` 与 `evolve memory` 的日常检索、索引、摄入与跨宿主记忆提取操作。
4
+
5
+ ## Wiki 索引、查询与摄入
6
+
7
+ | 操作 | 命令 | 说明 |
8
+ | --- | --- | --- |
9
+ | 重建 / 更新 Wiki 索引 | `evolve wiki build` | 扫描并索引 `wiki/` 下的 Markdown 页面与依赖关系 |
10
+ | 从源文档生成/合并 Wiki 页 | `evolve wiki ingest <file.md\|file.txt>` | 需配置 OpenAI 兼容模型接口;保留来源归属与已锁定页面 |
11
+ | 检索与图谱展开 | `evolve wiki search "<query>"` | 支持全文与关系检索 |
12
+ | 按范围列出约束 | `evolve wiki constraints [--task <kind>] [--path <glob>] [--category <cat>]` | 解析对当前上下文生效的 `mode: constraint` 条目 |
13
+ | 按范围查询参考 | `evolve wiki references "<query>" [--task <kind>] [--path <glob>] [--repository <uuid>]` | 解析活跃 `mode: reference` 条目 |
14
+ | 精确读取条目与历史 | `evolve wiki get <entry-id> [--resolved]` | 读取完整正文、作用域与修订历史 |
15
+
16
+ ## 工作记忆写入、检索与多宿主同步
17
+
18
+ 本地工作记忆保存在 `<root>/.agent-memory/memory.db`,可通过以下 CLI 直接读写或配置自动提取:
19
+
20
+ | 操作 | 命令 | 说明 |
21
+ | --- | --- | --- |
22
+ | 手工写入记忆 | `evolve memory put "<text>" [--id <id>] [--type <type>] [--scene <scene>] [--session <session>]` | 立即保存工作经验并可供 `context` 召回 |
23
+ | 分页检索记忆 | `evolve memory search "<query>" [--type <t>] [--scene <s>] [--session <id>] [--page <n>] [--limit <n>]` | 返回短预览与后续读取参数,避免一次拉爆上下文 |
24
+ | 精确读取单条记忆 | `evolve memory get <memory-id>` | 按需展开全文 |
25
+ | 追溯原始对话来源 | `evolve memory sources <memory-id>` / `evolve memory conversation <id> --host <host> [--page <n>]` | 分页查看原始对话上下文 |
26
+ | 从消息文件抽取 L1 记忆 | `evolve memory extract <messages.json> --session <id> [--mode chat\|code]` | 需配置模型接口(`AGENT_MEMORY_LLM_BASE_URL`、`AGENT_MEMORY_LLM_MODEL`、`AGENT_MEMORY_LLM_API_KEY`) |
27
+ | 配置与同步多宿主会话 | `evolve memory config --host <codex\|claude\|agy\|all\|off>`、`evolve memory sync --host <codex\|claude\|agy\|all> [--session <id>]` | 支持 Codex CLI、Claude Code 与 Antigravity 会话历史增量抽取 |
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: ew-odyssey
3
+ disable-model-invocation: true
4
+ description: Long-running iterative cycle — one entry, seven modes (debug|improve|planex|review|security|defensive|ui). Shared archaeology/audit → fix → verify → generalize → discover → persist skeleton with mode-specific dimensions. User-invoked campaign entry; single-step fixes route via /ew-orchestrate
5
+ argument-hint: <intent> --mode debug|improve|planex|review|security|defensive|ui [-y] [-c]
6
+ session-mode: run
7
+ contract:
8
+ discovery: self-described
9
+ consumes: []
10
+ produces: []
11
+ version: 0.6.0
12
+ ---
13
+
14
+ For Evolve Session/Run dispatch, decisions, and recovery, inspect `evolve workflows show session-run` (repo source: `skills/ew-orchestrate/references/orchestrator-run-loop.md`).
15
+
16
+ ## Mode documents
17
+
18
+ - Shared phases — [shared base](references/odyssey-base.md) | [runtime adapters](references/runtime-adapters.md)
19
+ - Debug — [prepare](references/prepare/odyssey-debug.md), [workflow](references/odyssey-debug.md)
20
+ - Improve — [prepare](references/prepare/odyssey-improve.md), [workflow](references/odyssey-improve.md)
21
+ - Plan and execute — [prepare](references/prepare/odyssey-planex.md), [workflow](references/odyssey-planex.md)
22
+ - Review — [prepare](references/prepare/odyssey-review.md), [workflow](references/odyssey-review.md)
23
+ - Security — [prepare](references/prepare/odyssey-security.md), [workflow](references/odyssey-security.md)
24
+ - Defensive — [prepare](references/prepare/odyssey-defensive.md), [workflow](references/odyssey-defensive.md)
25
+ - UI — [prepare](references/prepare/odyssey-ui.md), [workflow](references/odyssey-ui.md)
26
+
27
+ <purpose>
28
+ Long-running, evidence-driven iterative campaign across seven modes sharing one backbone (`discovery → audit → fix → verify → GENERALIZE → DISCOVER → RECORD → END`) until mode exit criteria pass or escalation is required.
29
+ </purpose>
30
+
31
+ <mode_dispatch>
32
+
33
+ **Mode selection precedence:** explicit `--mode <name>` > intent keyword auto-detection (first match wins, case-insensitive) > structured prompt (Normal) / `E000` (`-y`).
34
+
35
+ | Keywords in intent | Mode | Discovery / Audit | Fix → Verify |
36
+ |---|---|---|---|
37
+ | bug, crash, error, broken, fails, regression, race, leak, "why does" | `debug` | `ARCHAEOLOGY, EXPLORE` / `DIAGNOSE` | `FIX → CONFIRM` (`ESCALATE_DIAGNOSIS`) |
38
+ | requirement, implement, build, add feature, deliver feature, user story | `planex` | `—` / `PLAN + EXECUTE` | `VERIFY ↔ FIX` |
39
+ | ui, visual, layout, style, component, page, responsive, a11y, design system, design tokens | `ui` | `SURVEY` / `AUDIT (6 dims) + DIVERGE` | `FIX → VERIFY` |
40
+ | security audit, OWASP, vulnerability, CVE, secrets scan, STRIDE, threat model, supply chain | `security` | `RECON` / `SCAN (OWASP+deps+secrets+CI+STRIDE+git)` | *(read-only)* |
41
+ | defensive programming/code, exception swallowing, silent failure, fallback/default risk, error suppression, 防御性编程, 防御性代码, 异常吞噬, 兜底风险 | `defensive` | `ANCHOR, SLICE` / `SCAN (8 patterns) + PROPAGATE` | *(read-only)* |
42
+ | improve, optimize, performance, refactor quality, reliability, observability | `improve` | `SURVEY` / `AUDIT (6 dims) + DIAGNOSE` | `FIX → VERIFY` (`ESCALATE_DIAGNOSIS`) |
43
+ | review, audit, code check, inspect changes, "look over", zero-residual | `review` | `ARCHAEOLOGY, EXPLORE` / `REVIEW (4 dims)` | `FIX → CONFIRM` |
44
+
45
+ (`CONFIRM` and `VERIFY` are synonymous post-fix gates. All modes share `S_GENERALIZE → S_DISCOVER → S_RECORD → END` in [shared base](references/odyssey-base.md) §Shared Back-Half.)
46
+
47
+ - **New campaign**: resolve mode, open an Evolve Session (`ew-odyssey-<mode>` + `--arg`), dispatch `evolve run next`, and read the selected mode's `prepare/odyssey-<mode>.md`, `odyssey-<mode>.md`, [shared base](references/odyssey-base.md), and [runtime adapters](references/runtime-adapters.md).
48
+ - **Resume / Run brief**: use the exact `ew-odyssey-<mode>` command from the Resume Packet (`evolve run brief`), verify `skill_ref` / `required_links`, and continue from `outputs/session.json` (`--mode` mismatch with `-c` fails with `E003`; no prior session starts fresh).
49
+
50
+ </mode_dispatch>
51
+
52
+ <context>
53
+ $ARGUMENTS
54
+
55
+ **Universal flags:** `--mode <name>` | `--skip-fix` *(audit/diagnose only; ignored in read-only `security`/`defensive`; skips FIX loop in `planex`, leaving EXECUTE+VERIFY; with `--skip-verify` in `planex`, runs PLAN only)* | `--skip-generalize` | `-y` *(skip confirmation prompts, log `deferred`; never bypasses `E000`, INTAKE blockers, or escalation)* | `-c` *(resume latest unfinished same-mode Session via `evolve session list` -> `evolve session status` -> `evolve session resume-view` -> `evolve run brief`)* | `--heartbeat`
56
+
57
+ **Mode-scoped flags** *(inapplicable flag emits `W008` and is ignored)*:
58
+
59
+ | Flag | Modes | Description | Default |
60
+ |------|-------|-------------|---------|
61
+ | `--template <name>` | debug, planex | Predefined investigation or criteria template | — |
62
+ | `--dimensions <list>` | improve, review, ui | Audit dimension subset | all |
63
+ | `--fix-threshold <sev>` | improve, review, ui | Severity cutoff (`critical\|high\|medium\|low\|all`) | all |
64
+ | `--tier quick\|standard\|deep` | security, defensive | Audit depth tier | standard |
65
+ | `--sink-depth <list>` | defensive | Sink layer focus (`1\|2\|3\|all`) | all |
66
+ | `--max-iterations N` | planex | Max verify-fix cycles before escalation | 3 |
67
+ | `--method agent\|cli\|auto` | planex | Task execution method | auto |
68
+ | `--executor <tool>` | planex | Explicit CLI executor | first enabled |
69
+ | `--skip-verify` | planex | Skip post-execution validation gate | false |
70
+
71
+ **Run outputs (`{run_dir}/outputs/` only)**: `session.json` | `evidence.ndjson` | `understanding.md` | `explore.json` (`debug`/`review`) | `anchors.json` (`defensive`). Never write session artifacts outside `{run_dir}/outputs/`. Keep Run lifecycle state in the Evolve Run store and seal via `evolve run complete`.
72
+
73
+ **Commit convention (mutable modes only)**: `"odyssey-{mode}({slug}): {STATE} — {summary}"` for workspace code edits (`outputs/*` seal via Evolve Run store, never committed to git).
74
+ </context>
75
+
76
+ <invariants>
77
+ All base invariants in [shared base](references/odyssey-base.md) apply (`evidence.ndjson` append-only, `phase_goals[]` tracking, mandatory 3-layer `GENERALIZE` unless `--skip-generalize`, zero-residual on mutable audit modes, read-only guarantee on `security`/`defensive`, sacred criteria in `planex`, rendered browser truth in `ui`). Do not fabricate `/goal` text or recreate host UI state cleared by the user.
78
+ </invariants>
79
+
80
+ <execution>
81
+ Follow [shared base](references/odyssey-base.md) + the selected mode workflow. Three shared blocking gates apply to every mode:
82
+
83
+ - **INTAKE gate**: mode + target/requirement resolved, Run outputs initialized (`session.json` with mode baseline/criteria, `phase_goals[]`, `understanding.md §1`). Blockers: `E000` / `E001` / `E002`.
84
+ - **GENERALIZE gate**: all 3 layers (`syntax`/`semantic`/`structural`) attempted and logged in `generalization_stats.by_layer` unless `--skip-generalize`.
85
+ - **DISCOVER gate**: every hit triaged with classification + reason (`remaining_actionable == 0` or `cross_phase_loops >= max_loops` with per-item reasons).
86
+ </execution>
87
+
88
+ <error_codes>
89
+ Mode warnings (`W001-W007`) are owned per mode; shared entry/base errors:
90
+
91
+ | Code | Condition | Recovery |
92
+ |------|-----------|----------|
93
+ | `E000` | Mode unresolved (`-y`, ambiguous intent, no `--mode`) | Pass `--mode <name>` |
94
+ | `E001` | Missing target, requirement (`planex`), or issue (`debug`) | Supply target/intent or `-c` |
95
+ | `E002` | Target path or required entry anchor not found | Check target path/scope |
96
+ | `E003` | `-c` mode mismatch with resumed Session | Match `--mode` or omit `-c` |
97
+ | `E004` | Selected mode workflow/prepare document unreadable | Reinstall Skill package or restore Run commit |
98
+ | `W008` | Flag inapplicable to active mode | Warn and ignore flag |
99
+ </error_codes>
100
+
101
+ <success_criteria>
102
+ - [ ] Mode resolved; Knowledge Gate satisfied before code exploration; Run outputs initialized
103
+ - [ ] Mode discovery, audit/diagnosis, and (unless `--skip-fix` or read-only) verified fixes completed cleanly
104
+ - [ ] Mandatory 3-layer `GENERALIZE` + per-item `DISCOVER` triage completed (unless `--skip-generalize`)
105
+ - [ ] `phase_goals[]` audited, `session.json` set to `END`, sealed via `evolve run complete`, and reusable findings staged per `evolve workflows show knowledge`
106
+ </success_criteria>
@@ -0,0 +1,7 @@
1
+ # Read-only Odyssey audit artifacts
2
+
3
+ Resume the exact Evolve Run, then read `outputs/session.json` for the audit phase, target, tier and findings already recorded. Store audit progress in that file and keep lifecycle state in the Evolve Run store.
4
+
5
+ Use the selected mode's artifact contract for `kind`, `schema`, `role` and `alias`. Put those fields in `_meta` for `session.json` and, in Defensive mode, `anchors.json`. Put `_meta` in the first record of `evidence.ndjson` and append subsequent observations. Put the report metadata in the YAML frontmatter of `understanding.md`.
6
+
7
+ At report time, reconcile the severity counts with the evidenced findings. Record unverified categories and unresolved reviews explicitly. Check that the audited files have the same bytes as at intake, then seal with `evolve run complete` and follow the returned continuation.
@@ -0,0 +1,104 @@
1
+ # Odyssey Shared Base
2
+
3
+ Shared by all seven Odyssey modes (`debug`, `improve`, `planex`, `review`, `security`, `defensive`, `ui`). Mode files own their front-half state machine, pattern source, category table, completion summary, and `W001-W007` warnings. Everything below is single-source; map host tools via [runtime adapters](runtime-adapters.md).
4
+
5
+ <execution_discipline>
6
+
7
+ 1. **Workspace commits (mutable modes only)** — in mutable modes when code changes are made, commit workspace source changes per phase (`git commit -m "odyssey-{mode}({slug}): {phase} — {summary}"`). Never commit `{run_dir}/outputs/*` (`session.json`, `evidence.ndjson`, `understanding.md`) to git; register them atomically via `evolve run complete`. Read-only `security` and `defensive` modes never touch source files or commits.
8
+ 2. **Confident edits vs decision gate** — implement confident fixes immediately; record ambiguous tradeoffs as `evidence.ndjson {"phase":"decision","status":"pending"}` without modifying code. Only these justify waiting on a decision: cross-module architecture tradeoffs | business-semantics ambiguity | new dependency or breaking API. ("Unsure how", "too big", "pre-existing" are NOT valid triggers.)
9
+ 3. **Subagent & CLI assist** — parallelize independent scans/dimensions cleanly via host subagents (always joining/cancelling every spawned subagent — see [runtime adapters](runtime-adapters.md)) and run `evolve delegate "<prompt>" --to codex|agy --mode analysis|write` for cross-angle checks.
10
+ 4. **No context-exhaustion aborts** — complete every campaign cleanly through `S_RECORD -> END`.
11
+ 5. **Zero-residual** — every finding needs a concrete disposition (fix / issue / decision); "report only" and blanket "pre-existing" skips are forbidden.
12
+
13
+ </execution_discipline>
14
+
15
+ <shared_invariants>
16
+
17
+ Mode `prepare/odyssey-<mode>.md` files restate these as pre-flight guardrails; keep wording aligned:
18
+
19
+ - **Generalize is mandatory** unless `skip_generalize == true`; prior-phase convergence is NOT a valid skip reason.
20
+ - **Thoroughness floor** — all 3 generalization layers (syntax/semantic/structural) must be attempted and logged. A single-layer quick grep does NOT satisfy it.
21
+ - **Evidence append-only** — evidence.ndjson entries are immutable observations; modifying or deleting them is forbidden.
22
+ - **Per-item justification** — when `cross_phase_loops >= max_loops`, every unfixed finding needs its own reason. A blanket "pre-existing" is forbidden.
23
+
24
+ </shared_invariants>
25
+
26
+ <shared_schemas>
27
+
28
+ Artifact paths and `_meta` (`kind`, `schema`, `role`, `alias`) come from `references/prepare/odyssey-<mode>.md`. Attach `_meta` at top-level on JSON outputs (`session.json`, `explore.json`, `anchors.json`), on the first record of `evidence.ndjson`, and in YAML frontmatter of `understanding.md`. Set `current_state = "END"` before `evolve run complete`.
29
+
30
+ - **`session.json` core**: `{ current_state: "S_INTAKE", flags: { skip_fix: false, skip_generalize: false, auto_confirm: false }, phase_goals: [], phase_goals_all_done: false, self_iteration_log: [], cross_phase_loops: 0, max_loops: 5, created_at: "", updated_at: "" }` + mode fields.
31
+ - **`evidence.ndjson` line**: `{ ts, phase, type, source, content, note }` + phase fields.
32
+ - **`generalization_stats`**: `{ patterns_extracted, total_hits, cross_layer_confirmed, regression_risks, by_layer: { syntax, semantic, structural }, deepening_triggered }`.
33
+
34
+ </shared_schemas>
35
+
36
+ <anti_stall>
37
+
38
+ Track `progress_metrics: { phase_stats: {}, stale_count: 0, last_productive_phase: "", convergence_trend: "unknown" }` and `directions_tried: []` (`{ phase, round, strategy_type: "scope_widen|perspective_shift|tool_switch|structural_pivot", strategy_desc, result }`):
39
+ - After each analytical phase, count deduplicated `new_findings` vs `repeated`: `new == 0` -> `stale_count++`, `stalling`; `new > 0` -> reset `stale_count`, update `last_productive_phase`; 2 declining phases -> `diminishing`.
40
+ - New self-iteration strategies must differ from same-phase `directions_tried` (`stale_count`: 1 = shift perspective, 2 = structural pivot, 3 = structured user escalation or `-y` `INCONCLUSIVE`).
41
+ - Optional `--heartbeat`: update `session.json.updated_at` each phase (see [runtime adapters](runtime-adapters.md)).
42
+
43
+ </anti_stall>
44
+
45
+ <self_iteration>
46
+
47
+ Evaluate every analytical stage + `S_GENERALIZE` across three checks: **Coverage** (related files covered), **Depth** (`>=80%` with `file:line`), **Actionability** (concrete next step). If any fails and `stale_count < 3`, pick an untried strategy (`scope_widen` | `perspective_shift` | `tool_switch` | `structural_pivot`) and log to `evidence.ndjson {"phase":"self-iteration"}` + `session.json`. Exit when all suffice or `stale_count >= 3`.
48
+
49
+ </self_iteration>
50
+
51
+ ## Shared Back-Half
52
+
53
+ `S_GENERALIZE -> S_DISCOVER -> S_RECORD -> END` runs cleanly at the end of every mode.
54
+
55
+ <shared_actions>
56
+
57
+ ### A_GENERALIZE
58
+
59
+ 1. **3-layer pattern extraction** from each mode's `## Generalize Source` into `session.json.patterns[]` (`[{ id, source, layer, signature, description, risk, fix_template, confidence }]`):
60
+ - **Syntax**: regex/grep signature (`eval(`, missing `await`, etc.)
61
+ - **Semantic**: anti-pattern reasoning across related modules
62
+ - **Structural**: parallel file/import/override structures
63
+ 2. **4-way parallel scan** (Syntax grep, Semantic scan, Structural match, Historical `git log -S`; join all workers before deduplicating) -> multi-layer boost / single-layer `needs_review` / prior-fix `regression_risk`; >=3 hits in one module triggers 1 targeted deep scan.
64
+ 3. Log `session.json.generalization_stats` + `understanding.md` generalization section. Zero hits after attempting all 3 layers emits the mode's zero-hit warning, never blocks `S_RECORD`.
65
+
66
+ ### A_DISCOVER
67
+
68
+ 1. Triage every scan hit (`±10` lines context) as `bug` / `risk` / `safe`:
69
+ - `bug` + `fix_template` -> fix & return to `S_FIX` (mutable modes)
70
+ - `bug` needing decision / read-only mode -> record issue / decision
71
+ - `risk` -> add guard if safe (mutable) or record issue/decision
72
+ - `safe` -> skip
73
+ *(Use structured prompt in Normal mode; follow mode's `-y` table when `-y`.)*
74
+ 2. Increment `cross_phase_loops`; if `>= max_loops`, record per-item justification for every unfixed finding. Update `evidence.ndjson` + `understanding.md`.
75
+
76
+ ### A_RECORD
77
+
78
+ 1. Finalize `understanding.md` summary/learnings per the mode's `## Knowledge Persistence` table; resolve pending decisions and audit `phase_goals[]` (`pending -> done|skipped|failed`, `phase_goals_all_done = true` iff all confirmed).
79
+ 2. Set `current_state = "END"` in `outputs/session.json`, emit the mode's Completion Summary, and seal atomically with fenced `evolve run complete` including verified reusable findings in `--summary`.
80
+ 3. Follow `evolve workflows show knowledge` (repo: `skills/ew-knowledge/SKILL.md`) — stage candidates post-seal via `evolve closeout session <session-id>` and `evolve wiki propose` / `apply` (never direct corpus writes).
81
+
82
+ </shared_actions>
83
+
84
+ <shared_appendix>
85
+
86
+ ### Phase Initialization & Pre-load
87
+
88
+ Initialize `phase_goals[]` in `session.json` after INTAKE and mirror cleanly via [runtime adapters](runtime-adapters.md). Under `-y`: pending decisions -> default + `deferred`; 3-strike -> `INCONCLUSIVE`; goal audit -> auto-accept.
89
+
90
+ Before discovery or code search, satisfy the **Knowledge Gate** (`AGENTS.md`):
91
+ 1. Call Run MCP `wiki_context` + `wiki_reference` / `memory_search` + `memory_get` (or CLI fallback `evolve context "<keywords>" --session <id> --include-memory --reads "<run_dir>/knowledge-reads.json"` + `evolve wiki get <id> --resolved --reads ... --from-search ...`).
92
+ 2. After the Knowledge Gate, inspect the codebase with `evolve code search "<keywords>"` and check `evolve session list` when `-c` or prior scope overlap may exist.
93
+
94
+ ### Error Codes & Shared Next-Step Routing
95
+
96
+ `E000-E004` and `W008` are unified in [SKILL.md](../SKILL.md). `W001-W007` are owned per mode (the same warning code has mode-specific meaning; never assume cross-mode equivalence).
97
+
98
+ | Outcome | Recommended follow-up |
99
+ |---|---|
100
+ | Reusable patterns/rules ready to publish | Follow `evolve workflows show knowledge` (`evolve closeout session` -> `evolve wiki propose`) |
101
+ | Independent second opinion needed | `evolve delegate "<review prompt>" --to codex\|agy --mode analysis` |
102
+ | Pending `phase=decision` items remain | Filter `evidence.ndjson` (`phase == "decision" && status == "pending"`) |
103
+
104
+ </shared_appendix>