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.
- package/LICENSE +27 -0
- package/README.md +195 -2
- package/dist/agent-memory-prompts.d.ts +13 -0
- package/dist/agent-memory-prompts.js +55 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +6 -0
- package/dist/closeout.d.ts +105 -0
- package/dist/closeout.js +473 -0
- package/dist/code.d.ts +39 -0
- package/dist/code.js +124 -0
- package/dist/codex-memory.d.ts +24 -0
- package/dist/codex-memory.js +217 -0
- package/dist/common.d.ts +16 -0
- package/dist/common.js +52 -0
- package/dist/context-envelope.d.ts +59 -0
- package/dist/context-envelope.js +23 -0
- package/dist/host-adapters.d.ts +34 -0
- package/dist/host-adapters.js +151 -0
- package/dist/http.d.ts +3 -0
- package/dist/http.js +90 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +13 -0
- package/dist/knowledge-cli.d.ts +198 -0
- package/dist/knowledge-cli.js +761 -0
- package/dist/knowledge-reads.d.ts +72 -0
- package/dist/knowledge-reads.js +201 -0
- package/dist/memory-config.d.ts +44 -0
- package/dist/memory-config.js +204 -0
- package/dist/memory-evidence.d.ts +13 -0
- package/dist/memory-evidence.js +40 -0
- package/dist/memory-history.d.ts +46 -0
- package/dist/memory-history.js +432 -0
- package/dist/memory.d.ts +96 -0
- package/dist/memory.js +362 -0
- package/dist/retrospective.d.ts +57 -0
- package/dist/retrospective.js +240 -0
- package/dist/search.d.ts +36 -0
- package/dist/search.js +112 -0
- package/dist/skill-addition.d.ts +25 -0
- package/dist/skill-addition.js +89 -0
- package/dist/skill-design.d.ts +96 -0
- package/dist/skill-design.js +226 -0
- package/dist/skill-replay.d.ts +55 -0
- package/dist/skill-replay.js +448 -0
- package/dist/skill-route.d.ts +30 -0
- package/dist/skill-route.js +75 -0
- package/dist/transcript-evidence.d.ts +3 -0
- package/dist/transcript-evidence.js +58 -0
- package/dist/upstream/chunker.d.ts +24 -0
- package/dist/upstream/chunker.js +96 -0
- package/dist/upstream/file-protocol.d.ts +45 -0
- package/dist/upstream/file-protocol.js +117 -0
- package/dist/upstream/frontmatter.d.ts +47 -0
- package/dist/upstream/frontmatter.js +86 -0
- package/dist/upstream/graph-search.d.ts +33 -0
- package/dist/upstream/graph-search.js +67 -0
- package/dist/upstream/l1-extraction.d.ts +26 -0
- package/dist/upstream/l1-extraction.js +405 -0
- package/dist/upstream/llm.d.ts +8 -0
- package/dist/upstream/llm.js +1 -0
- package/dist/upstream/merge.d.ts +50 -0
- package/dist/upstream/merge.js +153 -0
- package/dist/upstream/prompts.d.ts +53 -0
- package/dist/upstream/prompts.js +181 -0
- package/dist/upstream/search-utils.d.ts +34 -0
- package/dist/upstream/search-utils.js +55 -0
- package/dist/upstream/slug.d.ts +26 -0
- package/dist/upstream/slug.js +103 -0
- package/dist/upstream/template.d.ts +29 -0
- package/dist/upstream/template.js +80 -0
- package/dist/upstream/tokenize.d.ts +4 -0
- package/dist/upstream/tokenize.js +29 -0
- package/dist/wiki-change.d.ts +76 -0
- package/dist/wiki-change.js +299 -0
- package/dist/wiki-entry.d.ts +26 -0
- package/dist/wiki-entry.js +93 -0
- package/dist/wiki-ingest.d.ts +12 -0
- package/dist/wiki-ingest.js +126 -0
- package/dist/wiki-migration.d.ts +16 -0
- package/dist/wiki-migration.js +268 -0
- package/dist/wiki-tokens.d.ts +1 -0
- package/dist/wiki-tokens.js +46 -0
- package/dist/wiki.d.ts +103 -0
- package/dist/wiki.js +330 -0
- package/dist/workflow-cli.d.ts +2 -0
- package/dist/workflow-cli.js +319 -0
- package/dist/workflow-install.d.ts +37 -0
- package/dist/workflow-install.js +148 -0
- package/dist/workflow-knowledge.d.ts +18 -0
- package/dist/workflow-knowledge.js +32 -0
- package/dist/workflow-mcp.d.ts +2 -0
- package/dist/workflow-mcp.js +137 -0
- package/dist/workflow-names.d.ts +4 -0
- package/dist/workflow-names.js +31 -0
- package/dist/workflow-runtime.d.ts +735 -0
- package/dist/workflow-runtime.js +747 -0
- package/dist/workflow-skills.d.ts +48 -0
- package/dist/workflow-skills.js +141 -0
- package/docs/images/impeccable-skill.png +0 -0
- package/docs/images/workflow-overview.png +0 -0
- package/docs/images/workflow-skills.png +0 -0
- package/package.json +77 -4
- package/skills/ew-impeccable/LICENSE +191 -0
- package/skills/ew-impeccable/NOTICE.md +19 -0
- package/skills/ew-impeccable/SKILL.md +91 -0
- package/skills/ew-impeccable/UPSTREAM.md +23 -0
- package/skills/ew-impeccable/reference/adapt.md +314 -0
- package/skills/ew-impeccable/reference/adapt.native.md +60 -0
- package/skills/ew-impeccable/reference/android.md +46 -0
- package/skills/ew-impeccable/reference/animate.md +91 -0
- package/skills/ew-impeccable/reference/audit.md +138 -0
- package/skills/ew-impeccable/reference/audit.native.md +141 -0
- package/skills/ew-impeccable/reference/bolder.md +35 -0
- package/skills/ew-impeccable/reference/clarify.md +96 -0
- package/skills/ew-impeccable/reference/colorize.md +88 -0
- package/skills/ew-impeccable/reference/craft-floor.md +44 -0
- package/skills/ew-impeccable/reference/craft.md +5 -0
- package/skills/ew-impeccable/reference/critique.md +808 -0
- package/skills/ew-impeccable/reference/degraded/asset-producer.md +36 -0
- package/skills/ew-impeccable/reference/degraded/documenter.md +23 -0
- package/skills/ew-impeccable/reference/degraded/finish-reviewer.md +72 -0
- package/skills/ew-impeccable/reference/degraded/manual-edit-applier.md +91 -0
- package/skills/ew-impeccable/reference/delight.md +72 -0
- package/skills/ew-impeccable/reference/distill.md +113 -0
- package/skills/ew-impeccable/reference/doctor.md +56 -0
- package/skills/ew-impeccable/reference/document.md +418 -0
- package/skills/ew-impeccable/reference/extract.md +68 -0
- package/skills/ew-impeccable/reference/harden.md +338 -0
- package/skills/ew-impeccable/reference/hooks.md +113 -0
- package/skills/ew-impeccable/reference/init.md +133 -0
- package/skills/ew-impeccable/reference/ios.md +51 -0
- package/skills/ew-impeccable/reference/layout.md +86 -0
- package/skills/ew-impeccable/reference/live-setup.md +102 -0
- package/skills/ew-impeccable/reference/live.md +326 -0
- package/skills/ew-impeccable/reference/new-work.md +209 -0
- package/skills/ew-impeccable/reference/onboard.md +236 -0
- package/skills/ew-impeccable/reference/operate.md +61 -0
- package/skills/ew-impeccable/reference/optimize.md +260 -0
- package/skills/ew-impeccable/reference/overdrive.md +127 -0
- package/skills/ew-impeccable/reference/polish.md +105 -0
- package/skills/ew-impeccable/reference/quieter.md +101 -0
- package/skills/ew-impeccable/reference/routing.md +20 -0
- package/skills/ew-impeccable/reference/shape.md +59 -0
- package/skills/ew-impeccable/reference/typeset.md +82 -0
- package/skills/ew-impeccable/reference/visualize.md +46 -0
- package/skills/ew-impeccable/scripts/build-phase.mjs +1022 -0
- package/skills/ew-impeccable/scripts/command-metadata.json +94 -0
- package/skills/ew-impeccable/scripts/comp-diff.mjs +391 -0
- package/skills/ew-impeccable/scripts/comp-spec.mjs +513 -0
- package/skills/ew-impeccable/scripts/concept-seed.mjs +814 -0
- package/skills/ew-impeccable/scripts/context-signals.mjs +325 -0
- package/skills/ew-impeccable/scripts/context.mjs +1521 -0
- package/skills/ew-impeccable/scripts/critique-storage.mjs +473 -0
- package/skills/ew-impeccable/scripts/data/font-index-failures.json +121 -0
- package/skills/ew-impeccable/scripts/data/font-index.json +1 -0
- package/skills/ew-impeccable/scripts/detect-csp.mjs +246 -0
- package/skills/ew-impeccable/scripts/detect.mjs +30 -0
- package/skills/ew-impeccable/scripts/detector/browser/injected/index.mjs +2580 -0
- package/skills/ew-impeccable/scripts/detector/cli/main.mjs +498 -0
- package/skills/ew-impeccable/scripts/detector/design-system.mjs +1311 -0
- package/skills/ew-impeccable/scripts/detector/detect-antipatterns-browser.js +9486 -0
- package/skills/ew-impeccable/scripts/detector/detect-antipatterns.mjs +51 -0
- package/skills/ew-impeccable/scripts/detector/engines/browser/detect-url.mjs +434 -0
- package/skills/ew-impeccable/scripts/detector/engines/regex/detect-text.mjs +1439 -0
- package/skills/ew-impeccable/scripts/detector/engines/static-html/css-cascade.mjs +1242 -0
- package/skills/ew-impeccable/scripts/detector/engines/static-html/detect-html.mjs +263 -0
- package/skills/ew-impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +189 -0
- package/skills/ew-impeccable/scripts/detector/findings.mjs +23 -0
- package/skills/ew-impeccable/scripts/detector/node/file-system.mjs +225 -0
- package/skills/ew-impeccable/scripts/detector/profile/profiler.mjs +166 -0
- package/skills/ew-impeccable/scripts/detector/registry/antipatterns.mjs +636 -0
- package/skills/ew-impeccable/scripts/detector/rules/checks.mjs +5750 -0
- package/skills/ew-impeccable/scripts/detector/shared/color.mjs +596 -0
- package/skills/ew-impeccable/scripts/detector/shared/constants.mjs +127 -0
- package/skills/ew-impeccable/scripts/detector/shared/fonts.mjs +30 -0
- package/skills/ew-impeccable/scripts/detector/shared/inline-ignores.mjs +148 -0
- package/skills/ew-impeccable/scripts/detector/shared/page.mjs +7 -0
- package/skills/ew-impeccable/scripts/detector/vendor/MDN-DATA-LICENSE +116 -0
- package/skills/ew-impeccable/scripts/detector/vendor/THIRD_PARTY_LICENSES.md +227 -0
- package/skills/ew-impeccable/scripts/detector/vendor/static-html-parser.build-entry.txt +11 -0
- package/skills/ew-impeccable/scripts/detector/vendor/static-html-parser.bundle.mjs +9121 -0
- package/skills/ew-impeccable/scripts/doctor.mjs +330 -0
- package/skills/ew-impeccable/scripts/embed-prompt.mjs +166 -0
- package/skills/ew-impeccable/scripts/font-match.mjs +457 -0
- package/skills/ew-impeccable/scripts/generate-image.mjs +447 -0
- package/skills/ew-impeccable/scripts/hook-admin.mjs +829 -0
- package/skills/ew-impeccable/scripts/hook-before-edit.mjs +538 -0
- package/skills/ew-impeccable/scripts/hook-lib.mjs +2493 -0
- package/skills/ew-impeccable/scripts/hook.mjs +79 -0
- package/skills/ew-impeccable/scripts/lib/artifact-schema.mjs +93 -0
- package/skills/ew-impeccable/scripts/lib/composition-catalog.mjs +200 -0
- package/skills/ew-impeccable/scripts/lib/concept-catalog.mjs +395 -0
- package/skills/ew-impeccable/scripts/lib/design-parser.mjs +880 -0
- package/skills/ew-impeccable/scripts/lib/font-fingerprint.mjs +564 -0
- package/skills/ew-impeccable/scripts/lib/font-index.mjs +130 -0
- package/skills/ew-impeccable/scripts/lib/hero-checks.mjs +246 -0
- package/skills/ew-impeccable/scripts/lib/image-metrics.mjs +306 -0
- package/skills/ew-impeccable/scripts/lib/impeccable-config.mjs +640 -0
- package/skills/ew-impeccable/scripts/lib/impeccable-paths.mjs +137 -0
- package/skills/ew-impeccable/scripts/lib/is-generated.mjs +72 -0
- package/skills/ew-impeccable/scripts/lib/live-path-globs.mjs +37 -0
- package/skills/ew-impeccable/scripts/lib/open-system-browser.mjs +26 -0
- package/skills/ew-impeccable/scripts/lib/png.mjs +281 -0
- package/skills/ew-impeccable/scripts/lib/provider.mjs +5 -0
- package/skills/ew-impeccable/scripts/lib/raster.mjs +194 -0
- package/skills/ew-impeccable/scripts/lib/roll-selection.mjs +369 -0
- package/skills/ew-impeccable/scripts/lib/staleness-deep.mjs +491 -0
- package/skills/ew-impeccable/scripts/lib/staleness-notice.mjs +169 -0
- package/skills/ew-impeccable/scripts/lib/staleness.mjs +532 -0
- package/skills/ew-impeccable/scripts/lib/surface-briefs.mjs +149 -0
- package/skills/ew-impeccable/scripts/lib/target-args.mjs +42 -0
- package/skills/ew-impeccable/scripts/lib/target-slug.mjs +33 -0
- package/skills/ew-impeccable/scripts/lib/template-extensions.mjs +146 -0
- package/skills/ew-impeccable/scripts/live/accept-css.mjs +617 -0
- package/skills/ew-impeccable/scripts/live/accept-verify.mjs +60 -0
- package/skills/ew-impeccable/scripts/live/browser-script-parts.mjs +84 -0
- package/skills/ew-impeccable/scripts/live/completion.mjs +28 -0
- package/skills/ew-impeccable/scripts/live/event-validation.mjs +199 -0
- package/skills/ew-impeccable/scripts/live/frameworks/astro.mjs +47 -0
- package/skills/ew-impeccable/scripts/live/frameworks/detect-utils.mjs +73 -0
- package/skills/ew-impeccable/scripts/live/frameworks/index.mjs +143 -0
- package/skills/ew-impeccable/scripts/live/frameworks/journal.mjs +197 -0
- package/skills/ew-impeccable/scripts/live/frameworks/nextjs.mjs +49 -0
- package/skills/ew-impeccable/scripts/live/frameworks/nuxt.mjs +161 -0
- package/skills/ew-impeccable/scripts/live/frameworks/script-src.mjs +17 -0
- package/skills/ew-impeccable/scripts/live/frameworks/static-html.mjs +26 -0
- package/skills/ew-impeccable/scripts/live/frameworks/sveltekit.mjs +71 -0
- package/skills/ew-impeccable/scripts/live/frameworks/tag-strategy.mjs +247 -0
- package/skills/ew-impeccable/scripts/live/frameworks/tanstack-start.mjs +70 -0
- package/skills/ew-impeccable/scripts/live/frameworks/vite-generic.mjs +42 -0
- package/skills/ew-impeccable/scripts/live/generation-preflight.mjs +149 -0
- package/skills/ew-impeccable/scripts/live/insert-ui.mjs +458 -0
- package/skills/ew-impeccable/scripts/live/instructions.mjs +142 -0
- package/skills/ew-impeccable/scripts/live/manual-apply.mjs +939 -0
- package/skills/ew-impeccable/scripts/live/manual-edit-routes.mjs +357 -0
- package/skills/ew-impeccable/scripts/live/manual-edits-buffer.mjs +152 -0
- package/skills/ew-impeccable/scripts/live/poll-lanes.mjs +14 -0
- package/skills/ew-impeccable/scripts/live/project-ignores.mjs +139 -0
- package/skills/ew-impeccable/scripts/live/roots.mjs +508 -0
- package/skills/ew-impeccable/scripts/live/session-store.mjs +563 -0
- package/skills/ew-impeccable/scripts/live/source-lock.mjs +105 -0
- package/skills/ew-impeccable/scripts/live/source-search.mjs +105 -0
- package/skills/ew-impeccable/scripts/live/svelte-ast.mjs +969 -0
- package/skills/ew-impeccable/scripts/live/svelte-component.mjs +1366 -0
- package/skills/ew-impeccable/scripts/live/sveltekit-adapter.mjs +304 -0
- package/skills/ew-impeccable/scripts/live/tanstack-adapter.mjs +259 -0
- package/skills/ew-impeccable/scripts/live/ui-surfaces.mjs +75 -0
- package/skills/ew-impeccable/scripts/live/vocabulary.mjs +171 -0
- package/skills/ew-impeccable/scripts/live-accept.mjs +938 -0
- package/skills/ew-impeccable/scripts/live-browser-dom.js +167 -0
- package/skills/ew-impeccable/scripts/live-browser-ignores.js +242 -0
- package/skills/ew-impeccable/scripts/live-browser-session.js +144 -0
- package/skills/ew-impeccable/scripts/live-browser.js +12851 -0
- package/skills/ew-impeccable/scripts/live-commit-manual-edits.mjs +1200 -0
- package/skills/ew-impeccable/scripts/live-complete.mjs +107 -0
- package/skills/ew-impeccable/scripts/live-copy-edit-agent.mjs +800 -0
- package/skills/ew-impeccable/scripts/live-discard-manual-edits.mjs +51 -0
- package/skills/ew-impeccable/scripts/live-inject.mjs +463 -0
- package/skills/ew-impeccable/scripts/live-insert.mjs +292 -0
- package/skills/ew-impeccable/scripts/live-manual-edit-evidence.mjs +368 -0
- package/skills/ew-impeccable/scripts/live-poll.mjs +430 -0
- package/skills/ew-impeccable/scripts/live-resume.mjs +123 -0
- package/skills/ew-impeccable/scripts/live-server.mjs +1698 -0
- package/skills/ew-impeccable/scripts/live-status.mjs +71 -0
- package/skills/ew-impeccable/scripts/live-target.mjs +30 -0
- package/skills/ew-impeccable/scripts/live-wrap.mjs +927 -0
- package/skills/ew-impeccable/scripts/live.mjs +334 -0
- package/skills/ew-impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/skills/ew-impeccable/scripts/palette.mjs +628 -0
- package/skills/ew-impeccable/scripts/pin.mjs +352 -0
- package/skills/ew-impeccable/scripts/serve-question.mjs +1783 -0
- package/skills/ew-impeccable/scripts/surface-brief.mjs +74 -0
- package/skills/ew-knowledge/SKILL.md +35 -0
- package/skills/ew-knowledge/references/closeout-protocol.md +68 -0
- package/skills/ew-knowledge/references/knowledge-route.md +73 -0
- package/skills/ew-knowledge/references/wiki-maintenance.md +27 -0
- package/skills/ew-odyssey/SKILL.md +106 -0
- package/skills/ew-odyssey/references/audit-artifacts.md +7 -0
- package/skills/ew-odyssey/references/odyssey-base.md +104 -0
- package/skills/ew-odyssey/references/odyssey-debug.md +264 -0
- package/skills/ew-odyssey/references/odyssey-defensive.md +351 -0
- package/skills/ew-odyssey/references/odyssey-improve.md +230 -0
- package/skills/ew-odyssey/references/odyssey-planex.md +294 -0
- package/skills/ew-odyssey/references/odyssey-review.md +233 -0
- package/skills/ew-odyssey/references/odyssey-security.md +231 -0
- package/skills/ew-odyssey/references/odyssey-ui.md +232 -0
- package/skills/ew-odyssey/references/prepare/odyssey-debug.md +102 -0
- package/skills/ew-odyssey/references/prepare/odyssey-defensive.md +117 -0
- package/skills/ew-odyssey/references/prepare/odyssey-improve.md +95 -0
- package/skills/ew-odyssey/references/prepare/odyssey-planex.md +105 -0
- package/skills/ew-odyssey/references/prepare/odyssey-review.md +105 -0
- package/skills/ew-odyssey/references/prepare/odyssey-security.md +91 -0
- package/skills/ew-odyssey/references/prepare/odyssey-ui.md +88 -0
- package/skills/ew-odyssey/references/runtime-adapters.md +31 -0
- package/skills/ew-orchestrate/SKILL.md +89 -0
- package/skills/ew-orchestrate/references/auto-policy.md +66 -0
- package/skills/ew-orchestrate/references/boundary-grill.md +51 -0
- package/skills/ew-orchestrate/references/companion-route.md +40 -0
- package/skills/ew-orchestrate/references/ew-orchestrate.md +44 -0
- package/skills/ew-orchestrate/references/goal.md +51 -0
- package/skills/ew-orchestrate/references/orchestrator-run-loop.md +33 -0
- package/skills/ew-orchestrate/references/planning.md +54 -0
- package/skills/ew-orchestrate/steps/ew-analyze/SKILL.md +70 -0
- package/skills/ew-orchestrate/steps/ew-analyze/references/issue-gaps-analyze.md +24 -0
- package/skills/ew-orchestrate/steps/ew-analyze/references/prepare.md +8 -0
- package/skills/ew-orchestrate/steps/ew-analyze/references/workflow.md +138 -0
- package/skills/ew-orchestrate/steps/ew-auto-test/SKILL.md +80 -0
- package/skills/ew-orchestrate/steps/ew-auto-test/references/prepare.md +23 -0
- package/skills/ew-orchestrate/steps/ew-auto-test/references/workflow.md +31 -0
- package/skills/ew-orchestrate/steps/ew-blueprint/SKILL.md +122 -0
- package/skills/ew-orchestrate/steps/ew-blueprint/references/prepare.md +21 -0
- package/skills/ew-orchestrate/steps/ew-blueprint/references/workflow.md +28 -0
- package/skills/ew-orchestrate/steps/ew-brainstorm/SKILL.md +49 -0
- package/skills/ew-orchestrate/steps/ew-companion/SKILL.md +50 -0
- package/skills/ew-orchestrate/steps/ew-debug/SKILL.md +85 -0
- package/skills/ew-orchestrate/steps/ew-debug/references/prepare.md +27 -0
- package/skills/ew-orchestrate/steps/ew-debug/references/workflow.md +31 -0
- package/skills/ew-orchestrate/steps/ew-execute/SKILL.md +74 -0
- package/skills/ew-orchestrate/steps/ew-execute/references/prepare.md +27 -0
- package/skills/ew-orchestrate/steps/ew-execute/references/workflow.md +87 -0
- package/skills/ew-orchestrate/steps/ew-grill/SKILL.md +62 -0
- package/skills/ew-orchestrate/steps/ew-grill/references/prepare.md +26 -0
- package/skills/ew-orchestrate/steps/ew-grill/references/workflow.md +31 -0
- package/skills/ew-orchestrate/steps/ew-init/SKILL.md +56 -0
- package/skills/ew-orchestrate/steps/ew-init/references/prepare.md +25 -0
- package/skills/ew-orchestrate/steps/ew-init/references/workflow.md +28 -0
- package/skills/ew-orchestrate/steps/ew-plan/SKILL.md +131 -0
- package/skills/ew-orchestrate/steps/ew-plan/references/prepare.md +8 -0
- package/skills/ew-orchestrate/steps/ew-plan/references/tdd.md +53 -0
- package/skills/ew-orchestrate/steps/ew-plan/references/workflow.md +100 -0
- package/skills/ew-orchestrate/steps/ew-retrospective/SKILL.md +68 -0
- package/skills/ew-orchestrate/steps/ew-retrospective/references/prepare.md +18 -0
- package/skills/ew-orchestrate/steps/ew-retrospective/references/workflow.md +34 -0
- package/skills/ew-orchestrate/steps/ew-review/SKILL.md +45 -0
- package/skills/ew-orchestrate/steps/ew-review/references/prepare.md +17 -0
- package/skills/ew-orchestrate/steps/ew-review/references/workflow.md +116 -0
- package/skills/ew-orchestrate/steps/ew-roadmap/SKILL.md +62 -0
- package/skills/ew-orchestrate/steps/ew-roadmap/references/prepare.md +27 -0
- package/skills/ew-orchestrate/steps/ew-roadmap/references/workflow.md +28 -0
- package/skills/ew-orchestrate/steps/ew-test/SKILL.md +99 -0
- package/skills/ew-orchestrate/steps/ew-test/references/prepare.md +23 -0
- package/skills/ew-orchestrate/steps/ew-test/references/workflow.md +23 -0
- package/skills/ew-orchestrate/steps/ew-verify/SKILL.md +73 -0
- package/skills/ew-orchestrate/steps/ew-verify/references/prepare.md +21 -0
- package/skills/ew-orchestrate/steps/ew-verify/references/workflow.md +29 -0
- package/skills/ew-skill-design/SKILL.md +30 -0
- package/skills/ew-skill-design/references/package-contract.md +40 -0
- package/skills/ew-skill-design/references/validation.md +21 -0
- package/skills/team-swarm/SKILL.md +68 -0
- package/skills/team-swarm/references/mcp-coordination.md +14 -0
- package/skills/team-swarm/roles/analyst/role.md +181 -0
- package/skills/team-swarm/roles/ant/role.md +149 -0
- package/skills/team-swarm/roles/coordinator/commands/converge.md +112 -0
- package/skills/team-swarm/roles/coordinator/commands/init-swarm.md +136 -0
- package/skills/team-swarm/roles/coordinator/commands/iterate.md +171 -0
- package/skills/team-swarm/roles/coordinator/role.md +170 -0
- package/skills/team-swarm/roles/scorer/role.md +150 -0
- package/skills/team-swarm/scripts/aco.py +646 -0
- package/skills/team-swarm/scripts/pheromone.py +144 -0
- package/skills/team-swarm/scripts/scoring.py +111 -0
- package/skills/team-swarm/scripts/test_aco.py +606 -0
- package/skills/team-swarm/specs/ant-output-schema.md +127 -0
- package/skills/team-swarm/specs/convergence-criteria.md +108 -0
- package/skills/team-swarm/specs/pheromone-schema.md +125 -0
- package/skills/team-swarm/specs/swarm-config-template.json +71 -0
- package/skills/team-swarm/specs/swarm-protocol.md +119 -0
- package/skills/workflow-evolve/SKILL.md +64 -0
- package/skills/workflow-evolve/references/agy-gate.md +27 -0
- package/skills/workflow-evolve/references/auto-loop.md +23 -0
- package/skills/workflow-evolve/references/history-review.md +15 -0
- package/skills/workflow-evolve/scripts/codex-memory-replay.mjs +86 -0
- package/skills/workflow-evolve/scripts/codex-replay.mjs +1 -0
- package/skills/workflow-evolve/scripts/evolve-loop.mjs +260 -0
- package/skills/workflow-evolve/scripts/memory-codex-mcp.mjs +124 -0
- package/workflows/index.json +33 -0
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# Workflow: Odyssey UI
|
|
2
|
+
|
|
3
|
+
6-dimension visual experience audit — survey design context → audit dimensions → divergent exploration → fix → verify → generalize. Follow [shared phases](odyssey-base.md) and [runtime adapters](runtime-adapters.md).
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## State Chain
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
S_INTAKE → S_SURVEY → S_AUDIT → S_DIVERGE → S_FIX → S_VERIFY → [back-half]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Back-half: `S_GENERALIZE → S_DISCOVER → S_RECORD → END` (see [shared phases](odyssey-base.md) §Shared Back-Half).
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Boundary
|
|
18
|
+
|
|
19
|
+
**In scope:** Target component/page visual experience optimization — audit 6 dimensions, divergent exploration, fix, generalize to sibling components.
|
|
20
|
+
**Out of scope:** Backend/data/API → `--mode planex` | Deep bug investigation → `--mode debug` | Code quality review → `--mode review`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Decision Gate
|
|
25
|
+
|
|
26
|
+
ONLY these qualify as decisions: brand/style direction requiring human creative judgment | layout restructuring that significantly changes user flow | requires new design tokens or breaking component API.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Context
|
|
31
|
+
|
|
32
|
+
### Target Resolution
|
|
33
|
+
|
|
34
|
+
| Input | Resolution |
|
|
35
|
+
|-------|-----------|
|
|
36
|
+
| Component path | Audit component |
|
|
37
|
+
| Page/route | Audit page |
|
|
38
|
+
| `staged` / `HEAD` | Diff UI changes |
|
|
39
|
+
| Feature area | Resolve to components/pages |
|
|
40
|
+
|
|
41
|
+
### Dimensions (6)
|
|
42
|
+
|
|
43
|
+
| Dimension | Focus |
|
|
44
|
+
|-----------|-------|
|
|
45
|
+
| visual_hierarchy | Spacing, typography scale, color contrast, alignment, whitespace, visual weight |
|
|
46
|
+
| interaction_states | Hover, focus, active, disabled, loading, error, empty, selected states |
|
|
47
|
+
| accessibility | WCAG AA contrast, focus management, aria labels, keyboard nav, screen reader |
|
|
48
|
+
| responsiveness | Breakpoints, overflow, touch targets, fluid typography, container queries |
|
|
49
|
+
| micro_interactions | Transitions, animations, feedback indicators, loading states, progress |
|
|
50
|
+
| edge_cases | Long text truncation, empty data, error states, extreme values, i18n, RTL |
|
|
51
|
+
|
|
52
|
+
### Session Fields
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{ "target": "", "dimensions": [],
|
|
56
|
+
"audit_result": { "dimensions_audited": 0, "finding_count": 0, "severity_distribution": {} },
|
|
57
|
+
"diverge_result": { "improvements_proposed": 0, "creative_ideas": 0 },
|
|
58
|
+
"patterns": [], "confirmation": null, "generalization_stats": null }
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### evidence.ndjson Phases
|
|
62
|
+
|
|
63
|
+
`survey|audit|diverge|fix|discovery|decision|self-iteration`
|
|
64
|
+
|
|
65
|
+
### phase_goals[]
|
|
66
|
+
|
|
67
|
+
| ID | Goal | Phase | skip_when |
|
|
68
|
+
|----|------|-------|-----------|
|
|
69
|
+
| G1 | Survey completed | S_SURVEY | — |
|
|
70
|
+
| G2 | Audit completed | S_AUDIT | — |
|
|
71
|
+
| G3 | Divergent exploration done | S_DIVERGE | — |
|
|
72
|
+
| G4 | Zero remaining: all findings/ideas fixed and verified | S_VERIFY | skip_fix |
|
|
73
|
+
| G5 | Pattern generalized | S_GENERALIZE | skip_generalize |
|
|
74
|
+
| G6 | Discoveries triaged | S_DISCOVER | skip_generalize |
|
|
75
|
+
| G7 | Learnings persisted | S_RECORD | — |
|
|
76
|
+
|
|
77
|
+
### understanding.md — 8 Sections
|
|
78
|
+
|
|
79
|
+
1. Target & Design Context
|
|
80
|
+
2. Survey
|
|
81
|
+
3. Audit
|
|
82
|
+
4. Diverge
|
|
83
|
+
5. Verify
|
|
84
|
+
6. Generalize
|
|
85
|
+
7. Discover
|
|
86
|
+
8. Learnings
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## State Machine
|
|
91
|
+
|
|
92
|
+
### Transitions
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
S_SURVEY → S_AUDIT : complete
|
|
96
|
+
S_AUDIT → S_DIVERGE : complete
|
|
97
|
+
S_DIVERGE → S_FIX : !skip_fix AND actionable findings/ideas
|
|
98
|
+
S_DIVERGE → S_GENERALIZE : (skip_fix OR no actionable) AND !skip_generalize
|
|
99
|
+
S_DIVERGE → S_RECORD : (skip_fix OR no actionable) AND skip_generalize
|
|
100
|
+
S_FIX → S_VERIFY : fix implemented
|
|
101
|
+
S_VERIFY → S_GENERALIZE : verified, !skip_generalize
|
|
102
|
+
S_VERIFY → S_RECORD : verified, skip_generalize
|
|
103
|
+
S_VERIFY → S_FIX : needs_rework
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Discover routes: new component to audit → S_AUDIT; fixable sibling → S_FIX.
|
|
107
|
+
|
|
108
|
+
### Actions
|
|
109
|
+
|
|
110
|
+
**A_SURVEY** — (1) Design system inventory: scan for design tokens, CSS variables, theme imports. (2) Current state analysis: styling patterns, layout strategy, component hierarchy. (3) CLI-assisted: `evolve delegate "Survey design tokens, spacing, typography, hierarchy, and visual consistency for {target}" --to codex --mode analysis`. (4) Evidence phase=survey. Update §2. Mark G1.
|
|
111
|
+
|
|
112
|
+
Commit: `"odyssey-ui({slug}): SURVEY — design context survey complete"`
|
|
113
|
+
|
|
114
|
+
**A_AUDIT** — Run 6 parallel subagents (one per dimension, or `--dimensions` subset; join all before advancing — see [runtime adapters](runtime-adapters.md)). Each returns `[{title, severity, file, line, description, suggestion, dimension}]`. Merge → evidence phase=audit. Write `audit_result`. Update §3 severity matrix. Mark G2.
|
|
115
|
+
|
|
116
|
+
**GATE: all-dimensions-audited** — all 6 dimensions (or `--dimensions` subset) completed with structured findings, merged into severity matrix, evidence phase=audit logged per dimension. Zero dimensions reviewed is BLOCKED (W002 partial from agent failure is a warning).
|
|
117
|
+
|
|
118
|
+
Commit: `"odyssey-ui({slug}): AUDIT — dimension audit complete"`
|
|
119
|
+
|
|
120
|
+
**A_DIVERGE** — Goes beyond defect fixing — "what would make this delightful?"
|
|
121
|
+
|
|
122
|
+
**Step 1 — 2 parallel subagents** *(joined before consolidating)*:
|
|
123
|
+
- **Polish Agent**: shadows, borders, transitions, hover, feedback, empty states, skeleton loading, scroll behavior.
|
|
124
|
+
- **Delight Agent**: motion design, progressive disclosure, smart defaults, contextual hints, celebratory feedback, personality in copy.
|
|
125
|
+
|
|
126
|
+
Each returns `[{idea, category (polish|delight), impact, effort, description, inspiration}]`.
|
|
127
|
+
|
|
128
|
+
**Step 2 — CLI-assisted:** `evolve delegate "Explore polish opportunities, micro-interactions, visual rhythm, and delight moments for {target}" --to codex --mode analysis`.
|
|
129
|
+
|
|
130
|
+
**Step 3 — Consolidate:** merge audit findings + divergent ideas → prioritized list (severity × impact × effort). Evidence phase=diverge. Update §4. Mark G3.
|
|
131
|
+
|
|
132
|
+
**GATE: diverge-explored** — both Polish and Delight agents completed, returning distinct `[{idea, category, impact, effort, description, inspiration}]` entries; CLI-assisted analysis completed; all outputs consolidated with audit findings into a prioritized list (severity × impact × effort); evidence phase=diverge logged; understanding.md §4 written.
|
|
133
|
+
|
|
134
|
+
Commit: `"odyssey-ui({slug}): DIVERGE — divergent exploration complete"`
|
|
135
|
+
|
|
136
|
+
**A_FIX** — Skip if `--skip-fix`. (1) Exhaustive fix: ALL findings/ideas by priority tier (critical → high → medium → low + high-impact ideas). After each tier, re-review — new findings append. (2) Each fix → evidence phase=fix. (3) Normal: structured prompt per-fix | `-y`: auto-proceed, record `deferred`.
|
|
137
|
+
|
|
138
|
+
Commit: `"odyssey-ui({slug}): FIX — {tier} tier addressed"`
|
|
139
|
+
|
|
140
|
+
**A_VERIFY** — (1) Run tests (lint, unit, visual regression). (2) `evolve delegate "Review UI fixes for {target} across visual correctness, interaction states, accessibility, and responsiveness" --to codex --mode analysis`. (3) `needs_rework` → S_FIX; `verified` → mark G4. Update §5, write `confirmation`.
|
|
141
|
+
|
|
142
|
+
**GATE: zero-remaining-verified** — every prioritized finding and idea is fixed and verified, individually classified (issue / decision), or skipped via `--skip-fix`; tests pass (lint, unit, visual regression); confirmation written; no unaddressed actionable findings; understanding.md §5 updated. `needs_rework` routes back to FIX.
|
|
143
|
+
|
|
144
|
+
Commit: `"odyssey-ui({slug}): VERIFY — fix verification complete"`
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Generalize Source
|
|
149
|
+
|
|
150
|
+
Audit findings + diverge ideas (severity >= medium OR impact = high).
|
|
151
|
+
|
|
152
|
+
**Discover routing:** new component → S_AUDIT; fixable sibling → S_FIX.
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Knowledge Persistence (§8)
|
|
157
|
+
|
|
158
|
+
Include verified reusable findings in the Run summary and harvest the completed Session through `evolve workflows show knowledge` (`evolve closeout session` → `evolve wiki propose`).
|
|
159
|
+
|
|
160
|
+
| Category | Content | Follow-up |
|
|
161
|
+
|----------|---------|-----------|
|
|
162
|
+
| Design pattern | Component pattern + applicable scenarios + token references | `evolve closeout session` → `evolve wiki propose` (`category: ui`) |
|
|
163
|
+
| Interaction spec | State definitions + transition rules + feedback patterns | `evolve closeout session` → `evolve wiki propose` (`category: ui`) |
|
|
164
|
+
| Accessibility rule | WCAG requirement + implementation approach | `evolve closeout session` → `evolve wiki propose` (`category: ui`) |
|
|
165
|
+
| Reusable generalization pattern | Pattern signature + application scope | `evolve closeout session` → `evolve wiki propose` (`category: coding`) |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Completion Summary
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
--- UI ODYSSEY COMPLETE ---
|
|
173
|
+
Target: {target} | Dimensions: {dimensions_audited}
|
|
174
|
+
Findings: {C}C {H}H {M}M {L}L | Diverge: {improvements} polish + {creative} delight
|
|
175
|
+
Fix: {fixed_count} applied, verified={yes|skipped}
|
|
176
|
+
Patterns: {extracted} ({by_layer})
|
|
177
|
+
Scan hits: {total} ({cross_layer} cross-layer)
|
|
178
|
+
Issues: {N} created
|
|
179
|
+
Decisions: {N} resolved, {M} pending, {K} deferred
|
|
180
|
+
Learnings: {N} persisted
|
|
181
|
+
Self-iter: {N} rounds
|
|
182
|
+
Goals: {done}/{total} ({skipped} skipped)
|
|
183
|
+
---
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Mode `-y` Points
|
|
189
|
+
|
|
190
|
+
| Decision Point | Normal | `-y` |
|
|
191
|
+
|---------------|--------|------|
|
|
192
|
+
| A_FIX confirmation | structured prompt | auto-proceed `deferred` |
|
|
193
|
+
| A_DISCOVER routing | structured prompt | auto-fix w/ template, issue for rest |
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Phase Gates
|
|
198
|
+
|
|
199
|
+
- **Discovery gate** (SURVEY): evidence logged, understanding.md updated. Survey requires all scan types attempted.
|
|
200
|
+
- **Audit gate** (AUDIT+DIVERGE): all dimension agents completed, findings merged. Diverge agents completed, ideas consolidated. Zero dimensions reviewed is BLOCKED (W002 partial allowed).
|
|
201
|
+
- **FIX gate:** current priority tier fully addressed. Per-fix evidence logged. Auto-commit per tier.
|
|
202
|
+
- **VERIFY gate:** tests pass; confirmation written, understanding.md updated, verify goal marked. needs_rework → route back to FIX.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Error Codes
|
|
207
|
+
|
|
208
|
+
| Code | Severity | Condition | Recovery |
|
|
209
|
+
|------|----------|-----------|----------|
|
|
210
|
+
| E001 | error | No target provided | Provide target or -c |
|
|
211
|
+
| E002 | error | Target path not found | Check path |
|
|
212
|
+
| W002 | warning | Some dimension agents failed | Partial coverage accepted |
|
|
213
|
+
| W004 | warning | Generalization 0 hits after full 3-layer scan | Advance to S_RECORD |
|
|
214
|
+
| W005 | warning | Pending decisions | Filter evidence phase=decision |
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Success Criteria
|
|
219
|
+
|
|
220
|
+
- [ ] Target resolved; session + output files created
|
|
221
|
+
- [ ] Survey completed with design system inventory + current state analysis
|
|
222
|
+
- [ ] 6-dimension audit completed with structured findings + severity matrix
|
|
223
|
+
- [ ] Divergent exploration: polish + delight ideas consolidated with audit findings
|
|
224
|
+
- [ ] understanding.md 8 sections written progressively (§1–§8)
|
|
225
|
+
- [ ] Fix + verify (unless --skip-fix); all findings/ideas addressed by priority
|
|
226
|
+
- [ ] Multi-layer generalization + discovery triage (unless --skip-generalize)
|
|
227
|
+
- [ ] phase_goals derived, tracked, and hardened-audited; goal_mode injected via prepare goal:true
|
|
228
|
+
- [ ] Session resumable via -c; completion summary emitted
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
See [shared base](odyssey-base.md) for generic follow-up routing (`Next Step Routing`). Related transitions: `/ew-odyssey <target> --mode planex` (backend/data), `/ew-odyssey <target> --mode debug` (deep bug), `/ew-odyssey <changed-files> --mode review` (code review).
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ew-odyssey-debug
|
|
3
|
+
description: "Odyssey debug mode — symptom-driven investigation through archaeology, exploration, hypothesis testing, fix, and confirmation, producing diagnosis with full evidence trail"
|
|
4
|
+
argument-hint: "<issue> [--template performance|memory-leak|race-condition|regression|crash] [--skip-fix] [--skip-generalize] [-y] [-c]"
|
|
5
|
+
contract:
|
|
6
|
+
contract_version: 2.1
|
|
7
|
+
produces:
|
|
8
|
+
- path: outputs/session.json
|
|
9
|
+
kind: session
|
|
10
|
+
schema: session/1.0
|
|
11
|
+
role: primary
|
|
12
|
+
alias: debug-session
|
|
13
|
+
required: true
|
|
14
|
+
- path: outputs/evidence.ndjson
|
|
15
|
+
kind: evidence
|
|
16
|
+
schema: evidence/1.0
|
|
17
|
+
role: evidence
|
|
18
|
+
alias: debug-evidence
|
|
19
|
+
required: true
|
|
20
|
+
- path: outputs/understanding.md
|
|
21
|
+
kind: diagnosis-report
|
|
22
|
+
schema: diagnosis-report/1.0
|
|
23
|
+
role: primary
|
|
24
|
+
alias: debug-understanding
|
|
25
|
+
required: true
|
|
26
|
+
- path: outputs/explore.json
|
|
27
|
+
kind: exploration
|
|
28
|
+
schema: exploration/1.0
|
|
29
|
+
role: evidence
|
|
30
|
+
alias: debug-explore
|
|
31
|
+
required: false
|
|
32
|
+
goal: true
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# Pre-task Thinking: odyssey-debug
|
|
36
|
+
|
|
37
|
+
## Purpose
|
|
38
|
+
|
|
39
|
+
Odyssey debug is a full-lifecycle debugging cycle: symptom intake → archaeology → code exploration → hypothesis-driven diagnosis → fix → confirmation → generalization → discovery → knowledge persistence. Unlike standalone diagnosis (`ew-analyze` / `evolve delegate`), odyssey-debug carries through to fix, confirm, generalize sibling occurrences, and persist learnings.
|
|
40
|
+
|
|
41
|
+
## Input Interpretation
|
|
42
|
+
|
|
43
|
+
Entry modes:
|
|
44
|
+
|
|
45
|
+
| Mode | Trigger | Symptom source |
|
|
46
|
+
|------|---------|----------------|
|
|
47
|
+
| standalone | issue description in `<intent>` | Parse issue description directly |
|
|
48
|
+
| template | `--template <name>` | Apply predefined investigation strategy (performance, memory-leak, race-condition, regression, crash) |
|
|
49
|
+
| continuation | `-c` | Resume via latest session, jump to `current_state` |
|
|
50
|
+
|
|
51
|
+
Template strategies:
|
|
52
|
+
|
|
53
|
+
| Template | Strategy | Use case |
|
|
54
|
+
|----------|----------|----------|
|
|
55
|
+
| `performance` | profiling → hot path → allocation → cache | Performance degradation |
|
|
56
|
+
| `memory-leak` | heap snapshot → retention chain → lifecycle | Memory leaks |
|
|
57
|
+
| `race-condition` | timeline → concurrent access → lock analysis | Race conditions |
|
|
58
|
+
| `regression` | git bisect → diff analysis → boundary check | Regressions |
|
|
59
|
+
| `crash` | stack trace → null chain → error propagation | Crashes / exceptions |
|
|
60
|
+
|
|
61
|
+
## Required Context
|
|
62
|
+
|
|
63
|
+
Satisfy the Knowledge Gate (`AGENTS.md`) before searching code:
|
|
64
|
+
|
|
65
|
+
- Wiki & Memory (first): Run MCP `wiki_context` / `memory_search` + `wiki_reference` / `memory_get`, or CLI `evolve context "<symptom keywords>" --session <session> --include-memory --reads "<run_dir>/knowledge-reads.json"` (plus `evolve wiki get <id> --resolved --reads ... --from-search ...`) for `debug` and `coding` scope.
|
|
66
|
+
- Code graph (after Knowledge Gate): `evolve code search "<symptom keywords>"` → module boundaries, call graph, ownership.
|
|
67
|
+
|
|
68
|
+
When prior debug artifacts of the same scope exist, check their root cause first to avoid re-investigating an already-confirmed root cause.
|
|
69
|
+
|
|
70
|
+
## Boundaries and Invariants
|
|
71
|
+
|
|
72
|
+
- **State chain:** `S_INTAKE → S_ARCHAEOLOGY → S_EXPLORE → S_DIAGNOSE → S_FIX → S_CONFIRM → [back-half]`
|
|
73
|
+
- **Evidence append-only** — evidence.ndjson entries are immutable observations; modifying or deleting them is forbidden.
|
|
74
|
+
- **Phase goal tracking** — mark each goal done/failed before transition; no silent skips.
|
|
75
|
+
- **Root cause confirmation requires evidence** — a hypothesis without reproduction or code/log evidence stays "suspected", never promoted to confirmed.
|
|
76
|
+
- **3-strike escalation** — stop after 3 failed hypotheses and escalate (delegate or ask user); do not free-associate a 4th.
|
|
77
|
+
- **Backward trace** from where the error first appears to where correct data turned wrong; fix at the source, not at the symptom.
|
|
78
|
+
- **Generalize is mandatory** unless `skip_generalize == true`; prior-phase convergence is NOT a valid skip reason.
|
|
79
|
+
- **Fix scope:** source code modifications during fix phase are in-scope but MUST be committed per action. Session artifacts target `{run_dir}/outputs/` only.
|
|
80
|
+
- **In scope:** Single bug/issue full loop. **Out of scope:** Features → `--mode planex` | Quality review → `--mode review` | UI → `--mode ui` | Architecture → `/ew-orchestrate --goal plan`.
|
|
81
|
+
|
|
82
|
+
## Run Artifact Metadata
|
|
83
|
+
|
|
84
|
+
Keep domain progress in `outputs/session.json`. Keep the Run identity in the Evolve Session receipt. Resume Debug from the domain checkpoint after attaching to the exact Run.
|
|
85
|
+
|
|
86
|
+
Use the artifact identities in the contract above. For `session.json` and `explore.json`, put `kind`, `schema`, `role` and `alias` in the top-level `_meta` object. Put the same fields in the first JSON record of `evidence.ndjson` under `_meta`, and append later observations as separate lines. Put those fields in the YAML frontmatter of `understanding.md`. Keep the Debug phase fields alongside the artifact metadata. `evolve run complete` validates artifact identities and availability as part of sealing.
|
|
87
|
+
|
|
88
|
+
## Risk Checklist
|
|
89
|
+
|
|
90
|
+
- Is every confirmed root cause backed by a reproduction or code/log evidence? A hypothesis without evidence must stay "suspected", never promoted to confirmed.
|
|
91
|
+
- Did you change only one variable at a time during diagnosis? Simultaneous changes make attribution impossible.
|
|
92
|
+
- Have 3 hypotheses failed? Stop and escalate to architecture inspection — do not propose a 4th hypothesis on your own.
|
|
93
|
+
- Did the trace reach the true source? Fixing at the symptom rather than where correct data first turned wrong leaves the root cause live.
|
|
94
|
+
- Are archaeology/explore results properly logged even on partial failure (W003/W006)? Missing evidence must be flagged, not silently omitted.
|
|
95
|
+
- Is every discovery hit individually classified with a reason? Blanket "pre-existing" skips are forbidden.
|
|
96
|
+
- Are all 3 generalization layers (syntax/semantic/structural) attempted? A single-layer quick grep does NOT satisfy the thoroughness floor.
|
|
97
|
+
|
|
98
|
+
## Gate Intent
|
|
99
|
+
|
|
100
|
+
- `discovery-complete`: archaeology and/or exploration phases have logged evidence, understanding.md §2-§3 are updated, and discovery goal (G2) is marked. Log W003 on partial archaeology failure or W006 when no CLI exploration executor is available, and record what was covered.
|
|
101
|
+
- `diagnosis-confirmed`: all hypotheses are tested with evidence logged (phase=diagnosis), root cause is confirmed with reproduction or code/log evidence (or INCONCLUSIVE after 3-strike escalation), and understanding.md §4-§5 are written. Zero hypotheses tested is BLOCKED.
|
|
102
|
+
- `fix-confirmed`: fix is implemented and tests pass, CLI review completed, `confirmation.overall` is set, understanding.md §6 is written, and verify goal (G3) is marked. `needs_rework` routes back to FIX. Skippable only when `skip_fix == true`.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ew-odyssey-defensive
|
|
3
|
+
description: "Odyssey defensive mode — read-only defensive-programming risk audit driven by business anchors: identify critical business sinks, backward-slice to defensive nodes, scan 8 defensive patterns (broad catch, exception swallowing, defaults, null fallback, auto-correction/clamp, silent conversion, duplicate constraints, duplicate defaults), forward-propagate to business sinks, classify exception semantics, and score risk R=S×P×B×H. Produces severity matrix report with full propagation chains. No fix loop."
|
|
4
|
+
argument-hint: "<target: file|dir|HEAD|staged|phase#|PR#> [--tier quick|standard|deep] [--sink-depth <list>] [--skip-generalize] [-y] [-c]"
|
|
5
|
+
contract:
|
|
6
|
+
contract_version: 2.1
|
|
7
|
+
produces:
|
|
8
|
+
- path: outputs/session.json
|
|
9
|
+
kind: defensive-audit-result
|
|
10
|
+
schema: defensive-audit-result/1.0
|
|
11
|
+
role: primary
|
|
12
|
+
alias: defensive-session
|
|
13
|
+
required: true
|
|
14
|
+
- path: outputs/evidence.ndjson
|
|
15
|
+
kind: evidence
|
|
16
|
+
schema: evidence/1.0
|
|
17
|
+
role: evidence
|
|
18
|
+
alias: defensive-evidence
|
|
19
|
+
required: true
|
|
20
|
+
- path: outputs/understanding.md
|
|
21
|
+
kind: defensive-report
|
|
22
|
+
schema: defensive-report/1.0
|
|
23
|
+
role: primary
|
|
24
|
+
alias: defensive-understanding
|
|
25
|
+
required: true
|
|
26
|
+
- path: outputs/anchors.json
|
|
27
|
+
kind: defensive-anchors
|
|
28
|
+
schema: defensive-anchors/1.0
|
|
29
|
+
role: evidence
|
|
30
|
+
alias: defensive-anchors
|
|
31
|
+
required: false
|
|
32
|
+
goal: true
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# Pre-task Thinking: odyssey-defensive
|
|
36
|
+
|
|
37
|
+
## Purpose
|
|
38
|
+
|
|
39
|
+
Odyssey defensive performs a systematic read-only audit of defensive-programming risk in a target module or project. Its core question is NOT "does defensive code exist", but:
|
|
40
|
+
|
|
41
|
+
> Does defensive logic transform an exception state, illegal state, or system error into an apparently-normal business state that then influences a critical business result?
|
|
42
|
+
|
|
43
|
+
The audit follows the canonical investigation path — **business-anchor driven + local program slicing + bidirectional propagation**:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
业务关键结果 → 业务流恢复 → 反向数据追踪 → 识别防御性代码
|
|
47
|
+
→ 识别状态转换 → 正向传播分析 → 业务影响判断 → 风险分级与定位
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
It covers 8 defensive patterns (broad exception catch, exception swallowing, defaults, null fallback, auto-correction/clamp, silent conversion, duplicate constraints, duplicate defaults), 6 failure→value state transformations, exception semantic classification (A/B/C/D), and risk scoring `R = S × P × B × H`. Unlike other Odyssey modes, defensive is strictly read-only: it produces a severity matrix report with full propagation chains and remediation suggestions, but NEVER modifies source code. Before starting, establish the target scope, audit tier, and business anchors (critical variables + sink layering).
|
|
51
|
+
|
|
52
|
+
## Input Interpretation
|
|
53
|
+
|
|
54
|
+
Target resolution determines what gets audited:
|
|
55
|
+
|
|
56
|
+
| Input | Resolution |
|
|
57
|
+
|-------|-----------|
|
|
58
|
+
| File/dir path | Audit those files |
|
|
59
|
+
| `HEAD` / `staged` | Review changes in diff for defensive patterns introduced/modified |
|
|
60
|
+
| Session/Run or commit range | Evolve Run artifacts / `git diff <base>..<head>` |
|
|
61
|
+
| PR number | `git diff main...HEAD` |
|
|
62
|
+
| Project root (default) | Full project scan |
|
|
63
|
+
| continuation (`-c`) | Resume latest session, jump to `current_state` |
|
|
64
|
+
|
|
65
|
+
Tier selection (default: `standard`):
|
|
66
|
+
|
|
67
|
+
| Tier | ANCHOR | SLICE | SCAN | PROPAGATE | 一致性检查 | 异常分类 |
|
|
68
|
+
|------|--------|-------|------|-----------|-----------|---------|
|
|
69
|
+
| quick | ✓ (top sinks) | ✓ (shallow) | 4 类核心 (P1-P4) | ✓ (sink only) | — | — |
|
|
70
|
+
| standard | ✓ | ✓ | 全 8 类 (P1-P8) | ✓ | ✓ | ✓ (A/B/C/D) |
|
|
71
|
+
| deep | ✓ (全量) | ✓ (deep) | 全 8 类 + 历史考古 | ✓ + cross-module | ✓ + 单位校验 | ✓ 全 4 类 |
|
|
72
|
+
|
|
73
|
+
`--sink-depth <list>` explicitly constrains propagation analysis to given sink layers (1|2|3|all). Default `all` — full three-tier sink analysis.
|
|
74
|
+
|
|
75
|
+
## Required Context
|
|
76
|
+
|
|
77
|
+
Satisfy the Knowledge Gate (`AGENTS.md`) before searching code:
|
|
78
|
+
|
|
79
|
+
- Wiki & Memory (first): Run MCP `wiki_context` / `memory_search` + `wiki_reference` / `memory_get`, or CLI `evolve context "<target keywords>" --session <session> --include-memory --reads "<run_dir>/knowledge-reads.json"` (plus `evolve wiki get <id> --resolved --reads ... --from-search ...`) for `coding` and `review` scope.
|
|
80
|
+
- Code graph (after Knowledge Gate): `evolve code search "<target keywords>"` → module boundaries, business-semantic layer, ownership.
|
|
81
|
+
|
|
82
|
+
When prior defensive-audit sessions of the same target exist, check their findings first to avoid re-reporting already-documented defensive patterns.
|
|
83
|
+
|
|
84
|
+
Use [read-only audit artifacts](../audit-artifacts.md) for the checkpoint and output metadata.
|
|
85
|
+
|
|
86
|
+
## Boundaries and Invariants
|
|
87
|
+
|
|
88
|
+
- **Read-only** — NEVER modify source code, configuration, or dependencies during audit. Defensive audit produces reports only. All file writes target `{run_dir}/outputs/` exclusively. Fixes route to `--mode improve` or `--mode debug`.
|
|
89
|
+
- **Findings require a complete propagation chain** — every finding MUST reference a specific file:line, declare its trigger pattern (P1-P8), the original failure type, the failure→value state transformation, the full forward propagation chain, and the business impact. Vague or location-only findings are not actionable. The §14 standard report format is the mandatory template.
|
|
90
|
+
- **Risk scoring is mandatory** — every finding MUST carry the four-dimensional score `R = S × P × B × H` (S = defensive-code severity, P = propagation range, B = business criticality, H = error-hiding degree) and a final level (Critical/High/Medium/Low per §13 thresholds). Findings without a score are rejected.
|
|
91
|
+
- **8-pattern coverage is mandatory (standard+)** — all scan patterns required by the selected tier MUST complete. NEVER skip a tier-required pattern silently; failures are logged as W0xx warnings. quick tier covers only the 4 core patterns (P1-P4).
|
|
92
|
+
- **Exception semantic classification is mandatory (standard+)** — every swallowed exception MUST be classified as A (business illegal) / B (numerical/algorithm) / C (system environment) / D (program defect) per §9. Classifying all exceptions as "computation failure" is forbidden (it is the exact anti-pattern — 异常语义坍缩).
|
|
93
|
+
- **Q4 signal is mandatory** — for every finding, the §18 Q4 question ("can the downstream still know the upstream error occurred?") MUST be answered. Q4 = "不能" (cannot) is a high-risk signal and MUST be explicitly flagged in the report and the completion summary.
|
|
94
|
+
- **No fix loop** — this mode has NO S_FIX or S_CONFIRM states. Findings are reported with remediation suggestions; actual fixes route to `--mode improve` (fix defensive defect) or `--mode debug` (root-cause).
|
|
95
|
+
- **Local slicing, not full propagation graph** — per §2, do NOT construct a complete whole-repo propagation graph. A_SLICE is local to each critical_var; A_PROPAGATE forwards only along the sliced chain.
|
|
96
|
+
- **Evidence append-only** — evidence.ndjson entries are immutable observations; modifying or deleting them is forbidden.
|
|
97
|
+
- **Generalize is mandatory** unless `skip_generalize == true`; prior-phase convergence is NOT a valid skip reason.
|
|
98
|
+
|
|
99
|
+
## Risk Checklist
|
|
100
|
+
|
|
101
|
+
- Is every finding anchored to `file:line` with trigger pattern, original failure type, state transformation, full propagation chain, Q4 signal, and R=S×P×B×H score? Unanchored or unscored findings are not actionable.
|
|
102
|
+
- Were all tier-required scan patterns (P1-P8 for standard+) attempted? Missing patterns mean incomplete coverage.
|
|
103
|
+
- Was exception semantic classification (A/B/C/D) applied to every swallowed exception? Treating all exceptions as one class is the anti-pattern being audited for.
|
|
104
|
+
- Was the Q4 signal explicitly answered for every finding reaching a sink? "Cannot detect upstream error" must be flagged.
|
|
105
|
+
- Did the audit remain strictly read-only? Any source modification is a violation.
|
|
106
|
+
- Is every discovery hit individually classified with a reason? Blanket skips are forbidden.
|
|
107
|
+
- Are all 3 generalization layers (syntax/semantic/structural) attempted? A single-layer quick grep does NOT satisfy the thoroughness floor.
|
|
108
|
+
- Did A_SLICE stay local to critical_vars instead of building a whole-repo propagation graph? Over-broad slicing violates the §2 methodology.
|
|
109
|
+
- Was the §14 standard report format used for every finding? Ad-hoc formats lose the propagation-chain evidence trail.
|
|
110
|
+
- Are duplicate constraints/defaults (P7/P8) cross-module aggregated when the tier requires it? Local-only aggregation misses the §10 consistency check.
|
|
111
|
+
|
|
112
|
+
## Gate Intent
|
|
113
|
+
|
|
114
|
+
- `anchor-identified`: at least 1 critical variable identified AND at least 1 level-1 (business-critical) sink present in `sink_layers`. Evidence phase=anchor logged. Understanding.md §2 updated. Cannot audit without a business-critical result to protect — BLOCKED if no critical vars / no level-1 sink (E002).
|
|
115
|
+
- `scan-complete`: all tier-required scan patterns completed (P1-P4 for quick; P1-P8 for standard; + historical archaeology for deep). Evidence phase=scan logged per pattern. Findings merged into per-pattern buckets. Understanding.md §4 + §7 updated. Tier-required pattern not attempted is BLOCKED (W001/W002 partial from tool failure is a warning).
|
|
116
|
+
- `propagation-verified`: every scan candidate has a `reaches_critical_sink` verdict, a failure→value state transformation type, a Q4 signal, a four-dimensional score (S/P/B/H), a risk level, and an exception classification (A/B/C/D). No-score / no-sink-verdict candidate is BLOCKED (W003 per-item needs_review acceptable only when truly undecidable).
|
|
117
|
+
- `report-produced`: severity matrix with §14 standard report entries (DEF-NNN / risk / location / trigger pattern / original failure type / state transformation / full propagation chain / business impact / remediation) for every finding. Summary statistics computed. Understanding.md §8 written. Session.json `audit_result` populated. Read-only invariant verified (no source modifications in session).
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ew-odyssey-improve
|
|
3
|
+
description: 6-dimension runtime quality audit → diagnose → fix → verify cycle with baseline metrics tracking and zero-residual enforcement
|
|
4
|
+
argument-hint: "<target> [--dimensions <list>] [--fix-threshold <severity>] [--skip-fix] [--skip-generalize] [-y] [-c]"
|
|
5
|
+
contract:
|
|
6
|
+
contract_version: 2.1
|
|
7
|
+
produces:
|
|
8
|
+
- path: outputs/session.json
|
|
9
|
+
kind: session
|
|
10
|
+
schema: session/1.0
|
|
11
|
+
role: primary
|
|
12
|
+
alias: improve-session
|
|
13
|
+
required: true
|
|
14
|
+
- path: outputs/evidence.ndjson
|
|
15
|
+
kind: evidence
|
|
16
|
+
schema: evidence/1.0
|
|
17
|
+
role: evidence
|
|
18
|
+
alias: improve-evidence
|
|
19
|
+
required: false
|
|
20
|
+
- path: outputs/understanding.md
|
|
21
|
+
kind: understanding
|
|
22
|
+
schema: understanding/1.0
|
|
23
|
+
role: primary
|
|
24
|
+
alias: improve-understanding
|
|
25
|
+
required: false
|
|
26
|
+
goal: true
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Pre-task Thinking: odyssey-improve
|
|
30
|
+
|
|
31
|
+
## Purpose
|
|
32
|
+
|
|
33
|
+
Odyssey improve performs a systematic 6-dimension quality audit of a target module or changeset, diagnoses root causes for critical/high findings, applies exhaustive fixes by severity tier, and verifies improvements against a captured baseline. Before starting, establish the target scope, dimension coverage, and baseline metrics.
|
|
34
|
+
|
|
35
|
+
## Input Interpretation
|
|
36
|
+
|
|
37
|
+
Target resolution determines what gets audited:
|
|
38
|
+
|
|
39
|
+
| Input | Resolution |
|
|
40
|
+
|-------|-----------|
|
|
41
|
+
| Module/dir path | Audit that module |
|
|
42
|
+
| `HEAD` / `staged` | Review changes in diff |
|
|
43
|
+
| Feature area keyword | Resolve to related files |
|
|
44
|
+
| `--all` | Full project scan (use with caution) |
|
|
45
|
+
|
|
46
|
+
The six dimensions (default all, overridable via `--dimensions`): performance, security, architecture, reliability, observability, maintainability. `--fix-threshold` controls the minimum severity that triggers a fix (default: all).
|
|
47
|
+
|
|
48
|
+
## Required Context
|
|
49
|
+
|
|
50
|
+
Satisfy the Knowledge Gate (`AGENTS.md`) before searching code:
|
|
51
|
+
|
|
52
|
+
- Wiki & Memory (first): Run MCP `wiki_context` / `memory_search` + `wiki_reference` / `memory_get`, or CLI `evolve context "<target keywords>" --session <session> --include-memory --reads "<run_dir>/knowledge-reads.json"` (plus `evolve wiki get <id> --resolved --reads ... --from-search ...`) for `coding` and `debug` scope.
|
|
53
|
+
- Code graph (after Knowledge Gate): `evolve code search "<target keywords>"` → module boundaries, layering rules.
|
|
54
|
+
- Baseline metrics: capture current test pass rate, bundle size, dependency count, complexity hotspots before any changes — these form `session.json.baseline_metrics` for before/after comparison.
|
|
55
|
+
|
|
56
|
+
When prior improve sessions of the same target exist, check their audit results and fixes first to avoid re-diagnosing already-resolved issues.
|
|
57
|
+
|
|
58
|
+
## Run Artifact Metadata
|
|
59
|
+
|
|
60
|
+
Attach `kind`, `schema`, `role`, and `alias` from `produces` to top-level `_meta` in `outputs/session.json`, the first JSON record in `outputs/evidence.ndjson`, and YAML frontmatter in `outputs/understanding.md` (`current_state: "END"` before `evolve run complete`).
|
|
61
|
+
|
|
62
|
+
## Boundaries and Invariants
|
|
63
|
+
|
|
64
|
+
- **Zero-residual** — every finding MUST have a concrete action (fix / issue / decision). "Report and shelve" and blanket "pre-existing" skips are forbidden.
|
|
65
|
+
- **Dimension independence** — each of the 6 dimensions produces findings independently; one dimension's result must not suppress or override another's.
|
|
66
|
+
- **No partial-tier advancement** — each severity tier (critical → high → medium → low) must be fully addressed before advancing to the next; blanket "pre-existing" skip forbidden.
|
|
67
|
+
- **Baseline integrity** — `baseline_metrics` captured at INTAKE are immutable throughout the session; before/after comparison in §8 uses these exact values.
|
|
68
|
+
- **Fix scope** — fixes target diagnosed root causes, not symptoms. Symptoms may indicate a deeper architectural issue requiring `--mode debug` escalation.
|
|
69
|
+
- **Evidence append-only** — evidence.ndjson entries are immutable observations; modifying or deleting them is forbidden.
|
|
70
|
+
- **Generalize is mandatory** unless `skip_generalize == true`; prior-phase convergence is NOT a valid skip reason.
|
|
71
|
+
- **Exhaustive audit** — all 6 dimensions (or `--dimensions` subset) must be attempted. Zero dimensions reviewed is BLOCKED, not a warning.
|
|
72
|
+
- **Behavioral equivalence** — fixes MUST preserve existing behavior. All tests MUST pass after each individual change, not just at the end of a tier.
|
|
73
|
+
- **Scope locked after confirmation** — once the fix plan is confirmed (or auto-proceeded via `-y`), no scope expansion to additional files without re-confirmation.
|
|
74
|
+
- **Incremental verification** — each discrete fix step MUST be verified (tests run) before proceeding. NEVER batch multiple unrelated changes into a single verification.
|
|
75
|
+
- **No feature creep** — fixes MUST NOT add new functionality, change APIs, or alter public interfaces. Beneficial changes discovered → evidence phase=decision as recommendations, NOT applied.
|
|
76
|
+
- **Rollback safety** — if any test fails after a fix step, revert that specific change before attempting alternatives. NEVER proceed with failing tests.
|
|
77
|
+
|
|
78
|
+
## Risk Checklist
|
|
79
|
+
|
|
80
|
+
- Is every finding anchored to `file:line` with severity, dimension, description, and measurement? Unanchored findings are not actionable.
|
|
81
|
+
- Were baseline metrics captured before any changes? Without a baseline, the before/after comparison in §8 is meaningless.
|
|
82
|
+
- Are all 6 dimensions (or the `--dimensions` subset) audited with independent agents? Missing dimensions mean incomplete coverage.
|
|
83
|
+
- Does root cause diagnosis trace to the true source, not the symptom? Fixing symptoms leaves the root cause live.
|
|
84
|
+
- After each severity tier fix, was re-verification scoped to the current tier's dimension only? Cross-dimension regression checks belong at S_VERIFY.
|
|
85
|
+
- Were 3 diagnosis retries exhausted before marking INCONCLUSIVE? Premature escalation misses solvable issues.
|
|
86
|
+
- Is zero-residual enforced — every finding has fix / issue / decision, with no blanket skips?
|
|
87
|
+
- Are all 3 generalization layers (syntax/semantic/structural) attempted? A single-layer quick grep does NOT satisfy the thoroughness floor.
|
|
88
|
+
- Does each fix preserve behavioral equivalence? A fix that changes observable behavior (API shape, return values, side effects) is scope creep, not a fix.
|
|
89
|
+
- Was each fix step individually verified before proceeding? Batched changes make regression attribution impossible.
|
|
90
|
+
- If a test failed after a fix, was that specific change reverted before trying alternatives? Proceeding with failing tests compounds risk.
|
|
91
|
+
|
|
92
|
+
## Gate Intent
|
|
93
|
+
|
|
94
|
+
- `all-dimensions-audited`: all 6 dimensions (or `--dimensions` subset) completed audit with structured findings (`[{title, severity, dimension, file, line, description, suggestion, measurement}]`), merged into severity matrix, and evidence phase=audit logged for each. Zero dimensions reviewed is BLOCKED (W002 partial coverage from agent failure is a warning, not a block).
|
|
95
|
+
- `zero-remaining-verified`: all diagnosed findings are either fixed and verified, individually classified with justification (issue created / decision recorded), or legitimately skipped via `--skip-fix` flag. Tests pass over modified areas. Metrics re-captured and compared against `baseline_metrics`. No unaddressed actionable findings remain. Before/after improvement metrics table written to understanding.md §8.
|