@azure-id/orc 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2017 -0
- package/README-id.md +521 -0
- package/README.md +485 -0
- package/bin/build-agents.js +86 -0
- package/bin/cli.js +29050 -0
- package/bin/mockrun-catalog.js +267 -0
- package/bin/onboarding-content.js +172 -0
- package/bin/pricing.json +200 -0
- package/bin/providers.json +437 -0
- package/bin/ui.js +95 -0
- package/bin/verify-contracts.js +3277 -0
- package/bin/verify-package.js +498 -0
- package/bin/webui/api.js +1163 -0
- package/bin/webui/app.html +198 -0
- package/bin/webui/css/00-tokens.css +92 -0
- package/bin/webui/css/01-base.css +42 -0
- package/bin/webui/css/02-shell.css +103 -0
- package/bin/webui/css/03-components.css +462 -0
- package/bin/webui/css/04-motion.css +91 -0
- package/bin/webui/css/05-tour.css +100 -0
- package/bin/webui/css/06-responsive.css +108 -0
- package/bin/webui/css/panels/boundary.css +26 -0
- package/bin/webui/css/panels/challenge.css +151 -0
- package/bin/webui/css/panels/crosslink.css +194 -0
- package/bin/webui/css/panels/docs.css +254 -0
- package/bin/webui/css/panels/experiment.css +23 -0
- package/bin/webui/css/panels/extra.css +536 -0
- package/bin/webui/css/panels/flow.css +177 -0
- package/bin/webui/css/panels/handoff.css +67 -0
- package/bin/webui/css/panels/knowledge.css +86 -0
- package/bin/webui/css/panels/learn.css +154 -0
- package/bin/webui/css/panels/maintenance.css +55 -0
- package/bin/webui/css/panels/mockrun.css +268 -0
- package/bin/webui/css/panels/overview.css +100 -0
- package/bin/webui/css/panels/pact.css +43 -0
- package/bin/webui/css/panels/runs.css +105 -0
- package/bin/webui/css/panels/settings.css +227 -0
- package/bin/webui/css/panels/stats.css +87 -0
- package/bin/webui/fixtures/boundary.js +92 -0
- package/bin/webui/fixtures/challenge.js +825 -0
- package/bin/webui/fixtures/crosslink.js +31 -0
- package/bin/webui/fixtures/docs.js +982 -0
- package/bin/webui/fixtures/extra.js +1934 -0
- package/bin/webui/fixtures/flow.js +81 -0
- package/bin/webui/fixtures/handoff.js +35 -0
- package/bin/webui/fixtures/index.js +486 -0
- package/bin/webui/fixtures/knowledge.js +291 -0
- package/bin/webui/fixtures/maintenance.js +42 -0
- package/bin/webui/fixtures/mockrun.js +36 -0
- package/bin/webui/fixtures/pact.js +111 -0
- package/bin/webui/fixtures/runs.js +109 -0
- package/bin/webui/fixtures/settings.js +78 -0
- package/bin/webui/fixtures/shell.js +48 -0
- package/bin/webui/fixtures/stats.js +104 -0
- package/bin/webui/i18n/TERMS.md +134 -0
- package/bin/webui/i18n/en/banner.json +29 -0
- package/bin/webui/i18n/en/boundary.json +20 -0
- package/bin/webui/i18n/en/challenge.json +106 -0
- package/bin/webui/i18n/en/common.json +69 -0
- package/bin/webui/i18n/en/crosslink.json +69 -0
- package/bin/webui/i18n/en/docs.json +175 -0
- package/bin/webui/i18n/en/experiment.json +17 -0
- package/bin/webui/i18n/en/extra.json +313 -0
- package/bin/webui/i18n/en/flow.json +30 -0
- package/bin/webui/i18n/en/handoff.json +37 -0
- package/bin/webui/i18n/en/knowledge.json +141 -0
- package/bin/webui/i18n/en/learn.json +16 -0
- package/bin/webui/i18n/en/maintenance.json +52 -0
- package/bin/webui/i18n/en/mockrun.json +19 -0
- package/bin/webui/i18n/en/nav.json +19 -0
- package/bin/webui/i18n/en/overview.json +89 -0
- package/bin/webui/i18n/en/pact.json +36 -0
- package/bin/webui/i18n/en/runs.json +51 -0
- package/bin/webui/i18n/en/settings.json +49 -0
- package/bin/webui/i18n/en/stats.json +69 -0
- package/bin/webui/i18n/en/tour.json +33 -0
- package/bin/webui/i18n/id/banner.json +29 -0
- package/bin/webui/i18n/id/boundary.json +20 -0
- package/bin/webui/i18n/id/challenge.json +106 -0
- package/bin/webui/i18n/id/common.json +70 -0
- package/bin/webui/i18n/id/crosslink.json +69 -0
- package/bin/webui/i18n/id/docs.json +175 -0
- package/bin/webui/i18n/id/experiment.json +17 -0
- package/bin/webui/i18n/id/extra.json +313 -0
- package/bin/webui/i18n/id/flow.json +30 -0
- package/bin/webui/i18n/id/handoff.json +37 -0
- package/bin/webui/i18n/id/knowledge.json +141 -0
- package/bin/webui/i18n/id/learn.json +16 -0
- package/bin/webui/i18n/id/maintenance.json +52 -0
- package/bin/webui/i18n/id/mockrun.json +19 -0
- package/bin/webui/i18n/id/nav.json +19 -0
- package/bin/webui/i18n/id/overview.json +89 -0
- package/bin/webui/i18n/id/pact.json +36 -0
- package/bin/webui/i18n/id/runs.json +51 -0
- package/bin/webui/i18n/id/settings.json +49 -0
- package/bin/webui/i18n/id/stats.json +69 -0
- package/bin/webui/i18n/id/tour.json +33 -0
- package/bin/webui/js/00-core.js +115 -0
- package/bin/webui/js/01-i18n.js +149 -0
- package/bin/webui/js/02-ui.js +211 -0
- package/bin/webui/js/03-md.js +286 -0
- package/bin/webui/js/04-router.js +51 -0
- package/bin/webui/js/05-banners.js +172 -0
- package/bin/webui/js/06-edit.js +183 -0
- package/bin/webui/js/90-tour.js +488 -0
- package/bin/webui/js/91-shortcuts.js +126 -0
- package/bin/webui/js/99-boot.js +118 -0
- package/bin/webui/js/panels/boundary.js +104 -0
- package/bin/webui/js/panels/challenge.js +781 -0
- package/bin/webui/js/panels/crosslink.js +654 -0
- package/bin/webui/js/panels/docs.js +1338 -0
- package/bin/webui/js/panels/experiment.js +98 -0
- package/bin/webui/js/panels/extra.js +3011 -0
- package/bin/webui/js/panels/flow.js +297 -0
- package/bin/webui/js/panels/handoff.js +169 -0
- package/bin/webui/js/panels/knowledge.js +890 -0
- package/bin/webui/js/panels/learn.js +220 -0
- package/bin/webui/js/panels/maintenance.js +235 -0
- package/bin/webui/js/panels/mockrun.js +227 -0
- package/bin/webui/js/panels/overview.js +447 -0
- package/bin/webui/js/panels/pact.js +189 -0
- package/bin/webui/js/panels/runs.js +416 -0
- package/bin/webui/js/panels/settings.js +573 -0
- package/bin/webui/js/panels/stats.js +378 -0
- package/bin/webui/serve.js +557 -0
- package/mock-run/INDEX.md +106 -0
- package/mock-run/a-normal-day.md +587 -0
- package/mock-run/context-combiner.md +100 -0
- package/mock-run/extra-recovery.md +330 -0
- package/mock-run/extra-slots.md +177 -0
- package/mock-run/media/README.md +43 -0
- package/mock-run/orc-aftermath.md +392 -0
- package/mock-run/orc-boundary.md +356 -0
- package/mock-run/orc-brainstorm.md +177 -0
- package/mock-run/orc-budget.md +534 -0
- package/mock-run/orc-challenge-council.md +262 -0
- package/mock-run/orc-challenge.md +416 -0
- package/mock-run/orc-cli.md +200 -0
- package/mock-run/orc-diy.md +129 -0
- package/mock-run/orc-doc.md +448 -0
- package/mock-run/orc-explain.md +86 -0
- package/mock-run/orc-export.md +423 -0
- package/mock-run/orc-extra.md +392 -0
- package/mock-run/orc-fast.md +106 -0
- package/mock-run/orc-grill.md +151 -0
- package/mock-run/orc-handoff.md +480 -0
- package/mock-run/orc-pact.md +421 -0
- package/mock-run/orc-pattern.md +112 -0
- package/mock-run/orc-plan.md +108 -0
- package/mock-run/orc-pr-setup.md +126 -0
- package/mock-run/orc-quick.md +113 -0
- package/mock-run/orc-route.md +93 -0
- package/mock-run/orc-ui.md +125 -0
- package/mock-run/orc-ultra.md +103 -0
- package/mock-run/orc.md +157 -0
- package/mock-run/the-example-project.md +55 -0
- package/package.json +39 -0
- package/templates/agents/MODEL-MAPPING.md +168 -0
- package/templates/agents/orc-advisor-fable-5.md +50 -0
- package/templates/agents/orc-advisor-opus-5-xhigh.md +56 -0
- package/templates/agents/orc-analyst-fable-5.md +115 -0
- package/templates/agents/orc-analyze-mini-opus-5-med.md +60 -0
- package/templates/agents/orc-analyze-mini-sonnet-5-high.md +58 -0
- package/templates/agents/orc-challenge-advisor-opus-5-med.md +75 -0
- package/templates/agents/orc-challenge-contrarian-opus-5-high.md +110 -0
- package/templates/agents/orc-challenge-executor-opus-5-med.md +114 -0
- package/templates/agents/orc-challenge-expansionist-opus-5-med.md +112 -0
- package/templates/agents/orc-challenge-judge-opus-5-high.md +132 -0
- package/templates/agents/orc-challenge-outsider-opus-5-low.md +109 -0
- package/templates/agents/orc-challenge-principles-opus-5-high.md +109 -0
- package/templates/agents/orc-challenge-reader-opus-5-low.md +90 -0
- package/templates/agents/orc-claude-writer-opus-4-8-high.md +53 -0
- package/templates/agents/orc-claude-writer-opus-5-med.md +55 -0
- package/templates/agents/orc-context-combiner-opus-5-high.md +88 -0
- package/templates/agents/orc-doc-checker-opus-5-low.md +108 -0
- package/templates/agents/orc-doc-writer-opus-5-med.md +134 -0
- package/templates/agents/orc-executor-haiku-4-5.md +113 -0
- package/templates/agents/orc-executor-opus-4-7-high.md +114 -0
- package/templates/agents/orc-executor-opus-4-7-med.md +114 -0
- package/templates/agents/orc-executor-opus-4-8-high.md +114 -0
- package/templates/agents/orc-executor-opus-5-high.md +114 -0
- package/templates/agents/orc-executor-opus-5-low.md +114 -0
- package/templates/agents/orc-executor-opus-5-med.md +114 -0
- package/templates/agents/orc-executor-sonnet-4-6-high.md +114 -0
- package/templates/agents/orc-executor-sonnet-4-6-med.md +114 -0
- package/templates/agents/orc-executor-sonnet-5-high.md +114 -0
- package/templates/agents/orc-judge-fable-5.md +79 -0
- package/templates/agents/orc-judge-opus-5-xhigh.md +85 -0
- package/templates/agents/orc-learn-writer-opus-5-low.md +73 -0
- package/templates/agents/orc-pattern-codifier-opus-5-med.md +65 -0
- package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +63 -0
- package/templates/agents/orc-planner-fable-5.md +152 -0
- package/templates/agents/orc-planner-mini-opus-5-med.md +69 -0
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +67 -0
- package/templates/agents/orc-planner-opus-5-med.md +160 -0
- package/templates/agents/orc-retro-opus-5-med.md +73 -0
- package/templates/agents/orc-retro-sonnet-5-high.md +72 -0
- package/templates/agents/orc-reviewer-fable-5.md +57 -0
- package/templates/agents/orc-reviewer-opus-5-med.md +60 -0
- package/templates/agents/orc-scout-opus-5-low.md +40 -0
- package/templates/agents/orc-scout-sonnet-4-6-high.md +39 -0
- package/templates/agents/orc-system-analyst-opus-5-high.md +120 -0
- package/templates/agents/orc-test-author-opus-5-med.md +71 -0
- package/templates/agents/orc-trace-writer-haiku-4-5.md +107 -0
- package/templates/agents/orc-verifier-opus-5-med.md +69 -0
- package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +79 -0
- package/templates/agents/orc-wiki-scanner-opus-5-med.md +81 -0
- package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +106 -0
- package/templates/commands/orc-aftermath.md +49 -0
- package/templates/commands/orc-analyze.md +21 -0
- package/templates/commands/orc-boundary.md +46 -0
- package/templates/commands/orc-brainstorm.md +51 -0
- package/templates/commands/orc-budget.md +54 -0
- package/templates/commands/orc-challenge.md +58 -0
- package/templates/commands/orc-claude.md +14 -0
- package/templates/commands/orc-diy.md +13 -0
- package/templates/commands/orc-doc.md +128 -0
- package/templates/commands/orc-explain.md +20 -0
- package/templates/commands/orc-export.md +46 -0
- package/templates/commands/orc-fast.md +15 -0
- package/templates/commands/orc-grill.md +40 -0
- package/templates/commands/orc-handoff.md +52 -0
- package/templates/commands/orc-learn.md +17 -0
- package/templates/commands/orc-mini.md +12 -0
- package/templates/commands/orc-pact.md +44 -0
- package/templates/commands/orc-pattern.md +15 -0
- package/templates/commands/orc-plan.md +22 -0
- package/templates/commands/orc-poly.md +21 -0
- package/templates/commands/orc-pr-driver.md +30 -0
- package/templates/commands/orc-pr-setup.md +31 -0
- package/templates/commands/orc-quick.md +33 -0
- package/templates/commands/orc-retro.md +17 -0
- package/templates/commands/orc-route.md +41 -0
- package/templates/commands/orc-ultra.md +17 -0
- package/templates/commands/orc-verify.md +11 -0
- package/templates/commands/orc-wiki.md +42 -0
- package/templates/commands/orc.md +16 -0
- package/templates/hooks/orc-effort-guard.js +178 -0
- package/templates/hooks/orc-statusline.js +305 -0
- package/templates/hooks/orc-trace.js +471 -0
- package/templates/hooks/orc-update-lib.js +125 -0
- package/templates/skills/_shared/README.md +50 -0
- package/templates/skills/_shared/detecting-artifacts.md +90 -0
- package/templates/skills/_shared/drift-recovery.md +98 -0
- package/templates/skills/_shared/extra-dispatch.md +1051 -0
- package/templates/skills/_shared/fable5-override.md +56 -0
- package/templates/skills/_shared/fallback-handoff.md +42 -0
- package/templates/skills/_shared/gh-stack-commands.md +65 -0
- package/templates/skills/_shared/gotchas.md +177 -0
- package/templates/skills/_shared/interview.md +144 -0
- package/templates/skills/_shared/lane-suspend.md +82 -0
- package/templates/skills/_shared/opus5-only.md +131 -0
- package/templates/skills/_shared/pr-templates.md +106 -0
- package/templates/skills/_shared/read-ladder.md +54 -0
- package/templates/skills/_shared/return-validation.md +145 -0
- package/templates/skills/_shared/smoke-gate.md +28 -0
- package/templates/skills/_shared/stack-plan.md +135 -0
- package/templates/skills/_shared/untrusted-input.md +63 -0
- package/templates/skills/context-combiner/SKILL.md +187 -0
- package/templates/skills/context-combiner/schemas/combined-report.md +78 -0
- package/templates/skills/context-combiner/schemas/combined-requirement-spec.md +87 -0
- package/templates/skills/orc/README.md +150 -0
- package/templates/skills/orc/SKILL.md +526 -0
- package/templates/skills/orc/config.md +389 -0
- package/templates/skills/orc/examples/full-run-mock.md +73 -0
- package/templates/skills/orc/references/analyst-gates.md +124 -0
- package/templates/skills/orc/references/effort-and-mode.md +224 -0
- package/templates/skills/orc/references/house-rules.md +20 -0
- package/templates/skills/orc/references/intake.md +120 -0
- package/templates/skills/orc/references/log-protocol.md +39 -0
- package/templates/skills/orc/references/pattern-gate.md +89 -0
- package/templates/skills/orc/references/plan-handoff.md +84 -0
- package/templates/skills/orc/references/preflight-report.md +220 -0
- package/templates/skills/orc/references/security-checklist.md +39 -0
- package/templates/skills/orc/references/stop-and-resume.md +160 -0
- package/templates/skills/orc/references/trace-protocol.md +314 -0
- package/templates/skills/orc/references/ultra-mode.md +123 -0
- package/templates/skills/orc/references/wave-grouping.md +121 -0
- package/templates/skills/orc/references/wiki-consult.md +177 -0
- package/templates/skills/orc/schemas/checkpoint.md +122 -0
- package/templates/skills/orc/schemas/intent-spec.md +42 -0
- package/templates/skills/orc/schemas/planning-output.md +279 -0
- package/templates/skills/orc/subskills/orc-checkpoint/SKILL.md +55 -0
- package/templates/skills/orc/subskills/orc-execution/SKILL.md +72 -0
- package/templates/skills/orc/subskills/orc-execution/core.md +151 -0
- package/templates/skills/orc/subskills/orc-execution/subagent.md +13 -0
- package/templates/skills/orc/subskills/orc-planner/SKILL.md +264 -0
- package/templates/skills/orc/subskills/orc-planner-mini/SKILL.md +121 -0
- package/templates/skills/orc/subskills/orc-pr/SKILL.md +51 -0
- package/templates/skills/orc/subskills/orc-pr/pr.md +22 -0
- package/templates/skills/orc/subskills/orc-pr/stack-gate.md +108 -0
- package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +76 -0
- package/templates/skills/orc/subskills/orc-review-verify/core.md +135 -0
- package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -0
- package/templates/skills/orc/subskills/orc-testgen/SKILL.md +45 -0
- package/templates/skills/orc/subskills/orc-testgen/core.md +59 -0
- package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -0
- package/templates/skills/orc-advisor/SKILL.md +60 -0
- package/templates/skills/orc-aftermath/SKILL.md +136 -0
- package/templates/skills/orc-aftermath/references/report.md +95 -0
- package/templates/skills/orc-analyze/SKILL.md +220 -0
- package/templates/skills/orc-analyze/examples/analyze-mock.md +42 -0
- package/templates/skills/orc-analyze/references/branching.md +51 -0
- package/templates/skills/orc-analyze/references/deep-mode.md +27 -0
- package/templates/skills/orc-analyze/references/thin-input.md +77 -0
- package/templates/skills/orc-analyze/schemas/report-audit.md +83 -0
- package/templates/skills/orc-analyze/schemas/report-prose.md +63 -0
- package/templates/skills/orc-analyze/schemas/report-requirement.md +78 -0
- package/templates/skills/orc-analyze/schemas/requirement-spec.md +77 -0
- package/templates/skills/orc-analyze-mini/SKILL.md +112 -0
- package/templates/skills/orc-analyze-mini/examples/quick-analysis-mock.md +31 -0
- package/templates/skills/orc-boundary/SKILL.md +208 -0
- package/templates/skills/orc-boundary/references/card.md +78 -0
- package/templates/skills/orc-boundary/references/gate.md +113 -0
- package/templates/skills/orc-brainstorm/SKILL.md +339 -0
- package/templates/skills/orc-brainstorm/references/brainstorm-doc.md +133 -0
- package/templates/skills/orc-brainstorm/references/lenses.md +152 -0
- package/templates/skills/orc-budget/SKILL.md +225 -0
- package/templates/skills/orc-budget/references/corpus.md +87 -0
- package/templates/skills/orc-challenge/README.md +142 -0
- package/templates/skills/orc-challenge/SKILL.md +255 -0
- package/templates/skills/orc-challenge/examples/code-module.md +110 -0
- package/templates/skills/orc-challenge/examples/council-full-roster.md +273 -0
- package/templates/skills/orc-challenge/examples/tsd-two-iterations.md +213 -0
- package/templates/skills/orc-challenge/references/conservation.md +107 -0
- package/templates/skills/orc-challenge/references/council.md +315 -0
- package/templates/skills/orc-challenge/references/cycle-state.md +185 -0
- package/templates/skills/orc-challenge/references/dimensions.md +121 -0
- package/templates/skills/orc-challenge/references/fix-brief.md +130 -0
- package/templates/skills/orc-challenge/references/intake.md +171 -0
- package/templates/skills/orc-challenge/references/kinds.md +44 -0
- package/templates/skills/orc-challenge/references/plain-english.md +98 -0
- package/templates/skills/orc-challenge/references/rubric.md +109 -0
- package/templates/skills/orc-challenge/references/sealed-slice.md +97 -0
- package/templates/skills/orc-challenge/references/verdict-doc.md +154 -0
- package/templates/skills/orc-claude/SKILL.md +199 -0
- package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -0
- package/templates/skills/orc-claude/references/refresh.md +76 -0
- package/templates/skills/orc-claude/references/template.md +109 -0
- package/templates/skills/orc-diy/README.md +142 -0
- package/templates/skills/orc-diy/SKILL.md +70 -0
- package/templates/skills/orc-diy/references/blocks/analyze.md +24 -0
- package/templates/skills/orc-diy/references/blocks/execution.md +42 -0
- package/templates/skills/orc-diy/references/blocks/extra.md +55 -0
- package/templates/skills/orc-diy/references/blocks/header.md +55 -0
- package/templates/skills/orc-diy/references/blocks/mock-example.md +22 -0
- package/templates/skills/orc-diy/references/blocks/pattern.md +18 -0
- package/templates/skills/orc-diy/references/blocks/planning.md +34 -0
- package/templates/skills/orc-diy/references/blocks/review.md +18 -0
- package/templates/skills/orc-diy/references/blocks/scoring.md +16 -0
- package/templates/skills/orc-diy/references/blocks/security.md +25 -0
- package/templates/skills/orc-diy/references/blocks/ship.md +25 -0
- package/templates/skills/orc-diy/references/blocks/summary.md +18 -0
- package/templates/skills/orc-diy/references/blocks/testgen.md +17 -0
- package/templates/skills/orc-diy/references/blocks/trace.md +28 -0
- package/templates/skills/orc-diy/references/blocks/verify.md +25 -0
- package/templates/skills/orc-diy/references/blocks/wiki.md +26 -0
- package/templates/skills/orc-diy/references/compile.md +59 -0
- package/templates/skills/orc-diy/references/flow-schema.md +100 -0
- package/templates/skills/orc-diy/references/locked-blocks.md +37 -0
- package/templates/skills/orc-doc/README.md +229 -0
- package/templates/skills/orc-doc/SKILL.md +444 -0
- package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +325 -0
- package/templates/skills/orc-doc/references/chunking.md +527 -0
- package/templates/skills/orc-doc/references/gates.md +311 -0
- package/templates/skills/orc-doc/references/generation-rules.md +122 -0
- package/templates/skills/orc-doc/references/house-rules.md +170 -0
- package/templates/skills/orc-doc/references/import-targets.md +40 -0
- package/templates/skills/orc-doc/references/plain-language.md +66 -0
- package/templates/skills/orc-doc/references/portable-markdown.md +74 -0
- package/templates/skills/orc-doc/references/resume-protocol.md +228 -0
- package/templates/skills/orc-doc/references/templates/collaboration.md +118 -0
- package/templates/skills/orc-doc/references/templates/prd.md +133 -0
- package/templates/skills/orc-doc/references/templates/report.md +102 -0
- package/templates/skills/orc-doc/references/templates/tsd.md +122 -0
- package/templates/skills/orc-doc/references/templates/workflow.md +112 -0
- package/templates/skills/orc-explain/SKILL.md +57 -0
- package/templates/skills/orc-export/SKILL.md +154 -0
- package/templates/skills/orc-fast/SKILL.md +188 -0
- package/templates/skills/orc-grill/SKILL.md +207 -0
- package/templates/skills/orc-grill/references/grill-doc.md +105 -0
- package/templates/skills/orc-handoff/SKILL.md +204 -0
- package/templates/skills/orc-handoff/references/handoff-log.md +67 -0
- package/templates/skills/orc-handoff/references/surfaces.md +88 -0
- package/templates/skills/orc-judge/SKILL.md +82 -0
- package/templates/skills/orc-learn/SKILL.md +156 -0
- package/templates/skills/orc-learn/examples/learn-run-mock.md +61 -0
- package/templates/skills/orc-learn/references/deepen.md +70 -0
- package/templates/skills/orc-learn/references/refresh.md +65 -0
- package/templates/skills/orc-learn/references/template-knowledge.md +83 -0
- package/templates/skills/orc-learn/references/template-learning.md +67 -0
- package/templates/skills/orc-mini/SKILL.md +226 -0
- package/templates/skills/orc-mini/examples/mini-run-mock.md +50 -0
- package/templates/skills/orc-pact/SKILL.md +218 -0
- package/templates/skills/orc-pact/references/gate.md +70 -0
- package/templates/skills/orc-pact/references/ledger.md +99 -0
- package/templates/skills/orc-pattern/SKILL.md +124 -0
- package/templates/skills/orc-pattern/references/INDEX.md +73 -0
- package/templates/skills/orc-pattern/references/be-django.md +80 -0
- package/templates/skills/orc-pattern/references/be-express.md +82 -0
- package/templates/skills/orc-pattern/references/be-fastapi.md +107 -0
- package/templates/skills/orc-pattern/references/be-go.md +96 -0
- package/templates/skills/orc-pattern/references/be-nestjs.md +86 -0
- package/templates/skills/orc-pattern/references/be-postgres.md +98 -0
- package/templates/skills/orc-pattern/references/fe-a11y.md +36 -0
- package/templates/skills/orc-pattern/references/fe-angular.md +87 -0
- package/templates/skills/orc-pattern/references/fe-nextjs.md +65 -0
- package/templates/skills/orc-pattern/references/fe-perf.md +39 -0
- package/templates/skills/orc-pattern/references/fe-react.md +83 -0
- package/templates/skills/orc-pattern/references/fe-vue.md +75 -0
- package/templates/skills/orc-pattern/schemas/pattern-doc.md +62 -0
- package/templates/skills/orc-poly/SKILL.md +216 -0
- package/templates/skills/orc-poly/examples/poly-run-mock.md +51 -0
- package/templates/skills/orc-poly/references/gather.md +70 -0
- package/templates/skills/orc-poly/references/poly-spec.md +84 -0
- package/templates/skills/orc-pr-driver/README.md +349 -0
- package/templates/skills/orc-pr-driver/SKILL.md +167 -0
- package/templates/skills/orc-pr-driver/references/conflict-playbook.md +78 -0
- package/templates/skills/orc-pr-driver/references/green-gate.md +105 -0
- package/templates/skills/orc-pr-driver/references/orc-run-split.md +99 -0
- package/templates/skills/orc-pr-setup/README.md +436 -0
- package/templates/skills/orc-pr-setup/SKILL.md +184 -0
- package/templates/skills/orc-pr-setup/references/certainty-gate.md +66 -0
- package/templates/skills/orc-pr-setup/references/layer-taxonomy.md +67 -0
- package/templates/skills/orc-quick/README.md +423 -0
- package/templates/skills/orc-quick/SKILL.md +306 -0
- package/templates/skills/orc-quick/references/context-doc.md +114 -0
- package/templates/skills/orc-quick/references/dispatch-gate.md +163 -0
- package/templates/skills/orc-quick/references/gh-mode.md +127 -0
- package/templates/skills/orc-retro/SKILL.md +222 -0
- package/templates/skills/orc-retro/examples/retro-mock.md +171 -0
- package/templates/skills/orc-route/SKILL.md +165 -0
- package/templates/skills/orc-verify/SKILL.md +86 -0
- package/templates/skills/orc-verify/examples/verify-mock.md +33 -0
- package/templates/skills/orc-wiki/README.md +325 -0
- package/templates/skills/orc-wiki/SKILL.md +322 -0
- package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -0
- package/templates/skills/orc-wiki/references/claude-md-injection.md +61 -0
- package/templates/skills/orc-wiki/references/crosslink-compile.md +39 -0
- package/templates/skills/orc-wiki/references/crosslink-kinds.md +57 -0
- package/templates/skills/orc-wiki/references/crosslink.md +284 -0
- package/templates/skills/orc-wiki/references/extra.md +79 -0
- package/templates/skills/orc-wiki/references/integrity-check.md +86 -0
- package/templates/skills/orc-wiki/references/orientation.md +51 -0
- package/templates/skills/orc-wiki/references/partial-refresh.md +203 -0
- package/templates/skills/orc-wiki/references/pattern-prewarm.md +19 -0
- package/templates/skills/orc-wiki/references/staleness.md +288 -0
- package/templates/skills/orc-wiki/schemas/crosslink-tag.md +166 -0
- package/templates/skills/orc-wiki/schemas/wiki-doc.md +120 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
# Reference — Behavior-Trace Protocol
|
|
2
|
+
|
|
3
|
+
How ORC records its own behavior for later review. **Behavior-trace logging is
|
|
4
|
+
PERMANENT (always on) — there is no config toggle.** Every ORC run traces.
|
|
5
|
+
|
|
6
|
+
Purpose: capture the flow of a run — phases, spawns, the model that actually
|
|
7
|
+
answered, scoring decisions, user questions, review/verify outcomes — so the
|
|
8
|
+
skills can be improved from real traces. This is NOT the decision log
|
|
9
|
+
(`run/…md`, agent knowledge, deleted on success). The trace is a separate,
|
|
10
|
+
**persistent** artifact and the two never mix.
|
|
11
|
+
|
|
12
|
+
## Always on
|
|
13
|
+
|
|
14
|
+
There is no gate. Behavior-trace logging is PERMANENT — every run traces. The
|
|
15
|
+
`orc-trace.js` hook is the deterministic guarantee: on the first ORC-agent
|
|
16
|
+
dispatch it bootstraps `log_dir` + the run pointer itself, so a `.txt` is created
|
|
17
|
+
for every run even if the orchestrator never writes a rich marker. Only
|
|
18
|
+
`log_dir` (default `.claude/orc/logs`) is configurable.
|
|
19
|
+
|
|
20
|
+
## Narration is DISPATCHED, not remembered (v0.32.0 — the core rule)
|
|
21
|
+
|
|
22
|
+
Two earlier fixes bet on the orchestrator remembering to append rich lines; both
|
|
23
|
+
failed under real load (long runs, compaction, parallel waves), leaving traces
|
|
24
|
+
with nothing but the hook's `SPAWN`/`RETURN` skeleton. The one behavior a run
|
|
25
|
+
performs reliably is **dispatching agents**. So narration moved onto it:
|
|
26
|
+
|
|
27
|
+
> **Phase close = build the phase packet + dispatch `orc-trace-writer-haiku-4-5`.**
|
|
28
|
+
|
|
29
|
+
The orchestrator supplies the facts; the pinned Haiku writer holds the pen and
|
|
30
|
+
appends the block. Three properties make this hold:
|
|
31
|
+
|
|
32
|
+
- **Pairing rule (the anti-forget mechanism).** The writer dispatch for phase N
|
|
33
|
+
is issued **in the same tool block as phase N+1's first dispatch** — logging
|
|
34
|
+
piggybacks on the very action the model reliably performs. A phase with no next
|
|
35
|
+
dispatch (FINISH, an abort, a pure-question phase) dispatches the writer SOLO,
|
|
36
|
+
before printing that phase's user-facing output.
|
|
37
|
+
- **First dispatch is solo and synchronous** — before the planner/analyst goes
|
|
38
|
+
out. It carries `run_meta` and performs the rename repair (below) while nothing
|
|
39
|
+
else is in flight.
|
|
40
|
+
- **Last dispatch (run end).** The FINISH packet (final report summary, ship
|
|
41
|
+
state, verdict totals) goes out and RETURNS before you delete `.current`.
|
|
42
|
+
|
|
43
|
+
The writer's own `SPAWN`/`RETURN` are logged like any `orc*` agent — deliberately:
|
|
44
|
+
**a writer SPAWN per phase is the deterministic proof that narration happened**,
|
|
45
|
+
and that is exactly what `/orc-retro` audits (narration coverage).
|
|
46
|
+
|
|
47
|
+
### Phase packet (passed inline in the dispatch prompt — small, plain YAML)
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
phase: execution wave 2
|
|
51
|
+
run_meta: # FIRST packet of the run ONLY; omit thereafter
|
|
52
|
+
lane: orc # orc | ultra | mini | fast | diy | wiki | analyze |
|
|
53
|
+
# plan | claude | poly | learn | verify | pattern |
|
|
54
|
+
# prsetup | prdriver | quick | grill | route |
|
|
55
|
+
# brainstorm | pact | boundary | handoff | budget |
|
|
56
|
+
# aftermath | export | challenge | doc
|
|
57
|
+
# (`ultra` = an /orc-ultra run; the ONLY lane the orc
|
|
58
|
+
# spine can emit besides `orc`. No other value here
|
|
59
|
+
# is legal — a lane no entry point opens is a lane
|
|
60
|
+
# every counting tool reports as permanently zero.)
|
|
61
|
+
slug: cas-multi-exchange-withdrawal
|
|
62
|
+
trace_path: .claude/orc/logs/run-orc-cas-multi-exchange-withdrawal-240726-002352.txt
|
|
63
|
+
events: # each {ts, verb, tail}; verb from the CLOSED set below
|
|
64
|
+
- {ts: "240726 00:28:16.220", verb: "DISPATCH orc-executor-sonnet-4-6-high",
|
|
65
|
+
tail: "T2 pairs expect=claude-sonnet-4-6/high"}
|
|
66
|
+
- {ts: "240726 00:30:39.881", verb: "VERIFY T2", tail: "actual=claude-sonnet-4-6/high ✅ MATCH"}
|
|
67
|
+
decisions: > # free text — the WHY layer
|
|
68
|
+
T2 kept at band [40,55) despite fan_out=3: the three consumers are
|
|
69
|
+
generated. User answered "no new deps" verbatim; rejected the adapter split.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- The packet is built from the phase's **actual working state as the phase
|
|
73
|
+
closes** — never reconstructed later from memory.
|
|
74
|
+
- `ts` is each event's REAL time. The writer stamps nothing itself: the block is
|
|
75
|
+
a faithful late append of events that happened seconds ago, not an end-of-run
|
|
76
|
+
summary. Retro sorts by stamp, not by file order.
|
|
77
|
+
- Subagent-returned markers (`QUESTION`, `FINDING`, `VERDICT`, a return's
|
|
78
|
+
`actual_model`) are folded into the NEXT packet, never written directly.
|
|
79
|
+
- `VERIFY` stays an orchestrator OBLIGATION — you compare claimed vs actual and
|
|
80
|
+
surface any ⛔ DOWNGRADE to the user in chat; only the LINE travels by packet.
|
|
81
|
+
- The writer NEVER invents: an absent field is omitted, never guessed.
|
|
82
|
+
|
|
83
|
+
### How many packets per lane (three tiers — EVERY trace-owning lane narrates)
|
|
84
|
+
|
|
85
|
+
| Tier | Lanes | Packets |
|
|
86
|
+
|------|-------|---------|
|
|
87
|
+
| Build lanes | `orc` (incl. ultra), `orc-mini`, `orc-fast` | per phase — full orc ≈ 7–9 (ultra adds U0 + judge packets); orc-mini batches to 3 (intake+plan, execution, ship); orc-fast to 2 (preflight+dispatch, gate+ship) |
|
|
88
|
+
| Multi-dispatch | `orc-wiki`, `orc-pr-driver` (lane `prdriver`) | orc-wiki: one per scan-batch boundary (the points that already run the registration sync / offer the pause) + the end-of-run packet. orc-pr-driver: one per LAYER boundary (each layer's green gate closes) + the end-of-run packet |
|
|
89
|
+
| Composed | `orc-diy` | one packet per ENABLED phase group, **minimum 2** — the flow shape is user-composed, so the count is too (the compiled flow carries this block automatically) |
|
|
90
|
+
| Iterative | `orc-quick`, `orc-challenge` (lane `challenge`), `orc-doc` (lane `doc`) | **one packet per completed numbered entry** + the end-of-run `FINISH` packet — the lane loops on user requests, so the count follows entries, not phases. For `orc-challenge` the unit is one completed ITERATION (C2→C8), and the packet goes out at the stop; on a PASS it is the `FINISH` packet. **Several trace files for one cycle is CORRECT** — several sessions ran, and `orc stats` counts several. For `orc-doc` the unit is one completed WAVE, and the packet is the LAST step of the stop sequence |
|
|
91
|
+
| Single-dispatch | `orc-claude`, `orc-plan`, `orc-analyze` (+ mini), `orc-pattern`, `orc-verify`, `orc-learn`, `orc-poly`, `orc-pr-setup` (lane `prsetup`), `orc-grill`, `orc-route`, `orc-brainstorm` (lane `brainstorm`), `orc-pact` (lane `pact`), `orc-boundary` (lane `boundary`), `orc-handoff` (lane `handoff`), `orc-budget` (lane `budget`), `orc-aftermath` (lane `aftermath`), `orc-export` (lane `export`) | **exactly ONE mandatory end-of-run packet** |
|
|
92
|
+
|
|
93
|
+
**`context-combiner` is NOT a lane — it is a PHASE inside the analyze run.** It
|
|
94
|
+
has no slash command and no entry point of its own: `orc-analyze` Phase F
|
|
95
|
+
dispatches it while `.current` still points at that run's `run-analyze-…` file.
|
|
96
|
+
So it never writes a pointer, never touches a trace file, and never emits its own
|
|
97
|
+
`FINISH`; its `DISPATCH`/`RETURN`, its Phase D challenge verdicts and its
|
|
98
|
+
conservation-gate result all fold into **orc-analyze's** end-of-run packet. The
|
|
99
|
+
hook agrees — `context-combiner` maps to its own `PHASE-EDGE` role family
|
|
100
|
+
(`combine`), which segments the phase *within* that trace. Listing it as a lane
|
|
101
|
+
(as this table did before v0.42.0) declared a run nothing could ever open.
|
|
102
|
+
|
|
103
|
+
**The single-packet obligation is defined HERE, once** (every trace-owning lane
|
|
104
|
+
already loads this reference) — micro-lane spines keep only their existing trace
|
|
105
|
+
pointer. That packet is dispatched SOLO after the lane's main return validates
|
|
106
|
+
and BEFORE `.current` is deleted; it carries `run_meta` (so the rename repair
|
|
107
|
+
works there too) plus the lane's whole event list: intake decisions, the user's
|
|
108
|
+
answers, `DISPATCH`/`VERIFY`, gate/verdict lines, `FINISH`. One Haiku call per
|
|
109
|
+
run buys the WHY layer for every lane. Haiku cost is noise against any run's
|
|
110
|
+
executor spend.
|
|
111
|
+
|
|
112
|
+
`/orc-retro` is the ONE exception: it mines traces and writes none (its hard
|
|
113
|
+
rule 4). The hook enforces this — `orc-retro-*` dispatches never bootstrap a
|
|
114
|
+
trace and never emit `SPAWN`/`RETURN`.
|
|
115
|
+
|
|
116
|
+
## Files & lifecycle
|
|
117
|
+
|
|
118
|
+
- Folder: `log_dir` (default `.claude/orc/logs/`). Persistent — **never deleted**
|
|
119
|
+
(deliberate opposite of the decision log). Top level holds the run `.txt` plus
|
|
120
|
+
its sidecars (`.pending.json`, `.jsonl`); generated reports live in
|
|
121
|
+
subfolders (`retro/`).
|
|
122
|
+
- One file per run: **`run-<lane>-<slug>-<DDMMYY>-<HHMMSS>.txt`**, append-only.
|
|
123
|
+
- `lane` — the trace-owning skill's short name (`orc`, `ultra`, `mini`, `fast`,
|
|
124
|
+
`diy`, `wiki`, `analyze`, `plan`, `claude`, `poly`, `learn`, `verify`,
|
|
125
|
+
`pattern`, `prsetup`, `prdriver`, `quick`, `grill`, `route`,
|
|
126
|
+
`brainstorm`, `challenge`). Every value
|
|
127
|
+
here is a lane some entry point actually opens — keep it that way: this
|
|
128
|
+
list IS the lane vocabulary `orc stats` and `/orc-retro` count against.
|
|
129
|
+
- `slug` — kebab-cased short user context from the intent (`[a-z0-9-]`, ≤32
|
|
130
|
+
chars, filesystem-safe, no trailing hyphen) — same derivation as the
|
|
131
|
+
run-folder slug.
|
|
132
|
+
- `HHMMSS` — so two same-day runs never collide.
|
|
133
|
+
- e.g. `run-orc-cas-multi-exchange-withdrawal-240726-002352.txt`.
|
|
134
|
+
- The name is DATA: `/orc-retro` aggregates per lane straight from it, without
|
|
135
|
+
parsing content.
|
|
136
|
+
- Run pointer: at run start, write `log_dir/.current` containing just the trace
|
|
137
|
+
filename **and `touch the trace file` of that name in the SAME step**. Both, or
|
|
138
|
+
neither — a pointer naming a file that does not exist yet is indistinguishable
|
|
139
|
+
from a dangling one by content alone, and that is what used to split a run
|
|
140
|
+
across two files (a generic bootstrap holding the hook skeleton + a rich file
|
|
141
|
+
holding every narrated line, each looking correct alone). Delete the pointer at
|
|
142
|
+
run end (success or abort). The `orc-trace.js` hook reads it to know which file
|
|
143
|
+
to append to, and since v0.34.2 it also honors a POINTER whose mtime is fresh
|
|
144
|
+
even when the file is not there yet — the two fixes are independent on purpose.
|
|
145
|
+
- **A SUSPENDED lane re-writes its pointer on RESUME.** When a lane hands control
|
|
146
|
+
to another lane and expects it back (`_shared/lane-suspend.md`, `RETURN-TO`),
|
|
147
|
+
the receiving lane DELETES `.current` at its own `FINISH`. So on return the
|
|
148
|
+
suspending lane re-writes `.current` and must `touch the trace file` it names,
|
|
149
|
+
in the SAME step — both, or neither. Otherwise every line it writes after the
|
|
150
|
+
return goes nowhere: the v0.34.2 split-run signature, reached by a different
|
|
151
|
+
road. Two traces for a suspend is CORRECT — two lanes ran, and `orc stats`
|
|
152
|
+
counts two.
|
|
153
|
+
- **Rename repair (deterministic-with-repair, not memory-only).** When no usable
|
|
154
|
+
pointer exists as the first ORC-agent dispatch fires, the hook creates the
|
|
155
|
+
folder + a generic `run-<DDMMYY>-<HHMMSS>.txt` and points at it. The FIRST
|
|
156
|
+
writer dispatch repairs that. **The trigger is a DISK COMPARISON, not a
|
|
157
|
+
remembered state:** repair when `.current` on disk DISAGREES with the packet's
|
|
158
|
+
`run_meta.trace_path` — a rich packet name beside a generic pointer IS the
|
|
159
|
+
clobber signature, every time — regardless of whether the pointer was ever
|
|
160
|
+
missing. (Stated the old way — "if the pointer is missing" — writers correctly
|
|
161
|
+
declined to repair, because that is not the state the hook actually leaves.)
|
|
162
|
+
The repair is a **MOVE** of the `.txt` plus its `.pending.json` / `.jsonl`
|
|
163
|
+
siblings, then a rewrite of `.current` — never a fresh create beside the
|
|
164
|
+
bootstrap file, which splits the run's evidence in two. Non-ORC Tasks never
|
|
165
|
+
trace — the hook only bootstraps for agent names starting with `orc`.
|
|
166
|
+
|
|
167
|
+
## Structured companion (`<trace>.jsonl`)
|
|
168
|
+
|
|
169
|
+
The `.txt` stays the canonical, human-skimmable trace. The writer ALSO appends
|
|
170
|
+
each packet event as one JSON line to `<trace>.jsonl`:
|
|
171
|
+
`{ts, actor, phase, verb, tail, …verb-specific fields}`. `/orc-retro` mines the
|
|
172
|
+
`.jsonl` when present — `SCORE`/`OUTCOME`/`VERIFY` aggregation becomes robust
|
|
173
|
+
without regex over free tail text — and falls back to `.txt` parsing for older
|
|
174
|
+
traces. Hook lines stay `.txt`-only; the two are read together.
|
|
175
|
+
|
|
176
|
+
## Write cadence — append AS THE RUN GOES, never in one batch at the end
|
|
177
|
+
|
|
178
|
+
The trace is a **running record**, not an end-of-run report. Each phase's packet
|
|
179
|
+
goes out AT that phase's close — coupled to the next phase's first dispatch:
|
|
180
|
+
|
|
181
|
+
| Moment | Packet carries |
|
|
182
|
+
|--------|----------------|
|
|
183
|
+
| a phase closes | that phase's events + the decisions behind them |
|
|
184
|
+
| dispatching an agent | the `DISPATCH` line (folded into the closing phase's packet) |
|
|
185
|
+
| a return validates | its `VERIFY` + any subagent-returned marker |
|
|
186
|
+
| a task closes | its `OUTCOME` |
|
|
187
|
+
| review/verify verdict | `FINDING` / `VERDICT` |
|
|
188
|
+
| run end | `FINISH` — dispatched SOLO and returned before `.current` is deleted |
|
|
189
|
+
|
|
190
|
+
**Self-check:** a phase that ends with
|
|
191
|
+
`zero new trace lines is a protocol violation`.
|
|
192
|
+
The failure this prevents is a fully-executed run behind a one-line trace. If a
|
|
193
|
+
phase went by without its packet, dispatch the writer NOW with the events' real
|
|
194
|
+
timestamps rather than skipping them — a late block with true stamps is a late
|
|
195
|
+
record; a block stamped "now" is a FALSE one. Batching everything at `FINISH` is
|
|
196
|
+
the classic failure: by then the run's context is compacted and the detail is gone.
|
|
197
|
+
|
|
198
|
+
## Line format
|
|
199
|
+
|
|
200
|
+
`[DDMMYY HH:MM:SS.mmm] <actor> <VERB> :: <free tail>`
|
|
201
|
+
|
|
202
|
+
Fixed columns → human-skimmable now, column-parseable by a future mining tool.
|
|
203
|
+
Actors: `hook`, `orc` (the default for a packet event with no actor), a role/agent
|
|
204
|
+
short name (`analyst`, `planner`, `reviewer`, `verifier`, `T<n>` for an executor
|
|
205
|
+
task), or `writer` — which means the narration agent speaking for ITSELF (its
|
|
206
|
+
`NOTE` line), never a blanket stamp on events it was handed. **The actor is
|
|
207
|
+
per-EVENT.** The writer copies `events[].actor` into both the `.txt` column and
|
|
208
|
+
the `.jsonl` `actor` field, so the pair can never disagree about the same event
|
|
209
|
+
(they did, and retro reads the `.jsonl` first).
|
|
210
|
+
|
|
211
|
+
## Verb set (CLOSED — never invent new verbs)
|
|
212
|
+
|
|
213
|
+
"Emitted by" now reads **orc → writer** for the narrated verbs: the orchestrator
|
|
214
|
+
supplies the fact in a packet, the writer writes the line. `SPAWN`, `RETURN` and
|
|
215
|
+
`PHASE-EDGE` stay hook-owned and need no cooperation at all.
|
|
216
|
+
|
|
217
|
+
| Verb | Emitted by | Meaning |
|
|
218
|
+
|------|-----------|---------|
|
|
219
|
+
| `PHASE <name> start\|end` | orc → writer | phase transition |
|
|
220
|
+
| `PHASE-EDGE <role-family> :: first=<agent>` | hook | **deterministic phase inference.** ORC agent names encode their role, so when a SPAWN's role family differs from the previous SPAWN's, the hook segments the run itself — families: `analyst\|scout → analysis`, `planner → planning`, `executor → execution`, `reviewer → review`, `verifier → verify`, `test-author → testgen`, `advisor\|judge → ultra-gate` (the trace writer never opens an edge). Zero model dependence: even a run where every writer dispatch was forgotten still reads planning → execution → review → verify, and `/orc-retro` computes NARRATION COVERAGE from edges with vs without a writer `SPAWN` between them |
|
|
221
|
+
| `CONFIG <key=value …>` | orc → writer | Phase 1 — the resolved config values this run will consume (incl. `fable5_*` when enabled, and ALWAYS `opus5_only` — it selects the executor table AND every fixed role, so retro can segment outcomes by dispatch mode). Runtime proof that the run honored the config; `/orc-retro` audits it against behavior |
|
|
222
|
+
| `WIKI-CONSULT <tier> :: docs=<list>` | orc → writer | project wiki consulted for grounding (full/mini at planning; fast at slice-build) — tier ∈ `fresh` \| `aging` \| `stale` \| `absent` \| `empty`; `docs=` the pages pulled/handed to the executor (comma list) or `none`. Records whether the run grounded in the wiki and whether it was stale (surfaces grounding + staleness for later audit) |
|
|
223
|
+
| `CROSSLINK <state> :: boundaries=<n> peers=<names>` | orc → writer | cross-repo peer-knowledge state at the consult point — state ∈ `cached` (peer cache present) \| `configured-no-cache` (crosslink configured but the cache is not built) \| `none`. Per-task `CROSSLINK inject task=<id> :: <boundary>` when a slice receives a linked contract. Records whether peer contracts were injected this run (full orc consumes only the pre-built crosslink cache — it never reads peer source live; mechanism in `references/wiki-consult.md`) |
|
|
224
|
+
| `SPAWN <agent>` | hook | an agent dispatch was observed (skeleton) |
|
|
225
|
+
| `RETURN <agent> :: <desc> dur=<m>m<s>s [model=<id>]` | hook | a subagent finished (skeleton). The hook attributes the RETURN to the finishing agent from the SubagentStop payload (`~<agent>` = approximate FIFO match on older Claude Code that omits `agent_type`; `~agent :: unattributed` = ≥2 agents in flight, so it deliberately claimed NO pending record rather than starve the right one), echoes the SPAWN's desc + wall-clock duration, and appends `model=<id>` when the return's `actual_model` is visible in the last message. A duplicate stop for an agent whose record was already consumed is DROPPED, never written as a desc-less RETURN. Still hook-written skeleton — NOT an orchestrator obligation; the authoritative model check is the `VERIFY` line |
|
|
226
|
+
| `DISPATCH <agent> :: <task> expect=<model>/<effort>` | orc → writer | orchestrator dispatched a named agent (the claim). **A FOREIGN dispatch appends `via=extra:<profile>`** and its `expect=` names the profile's model rather than a Claude tier — additive, the way `/orc-doc`'s `sections=` was. A foreign worker is not a Claude subagent, so the hook emits NO `SPAWN` and NO `RETURN` for it (P7, the `/orc-quick` ad-hoc-recon precedent): this line and `EXTRA` are the whole record, which is why neither is optional. **The `/orc-doc` lane's tail NAMES ITS SECTIONS** (v0.49.2) — `doc write sections=03-scope,04-risks part=sections/03-scope.md`, `doc check sections=03-goals`, `doc digest source=<path>` — which is the only thing that makes `orc doc cost`'s per-section attribution honest rather than a guess. It is additive: the tail was already captured whole |
|
|
227
|
+
| `SCORE task=<id> score=<n> band=<range> model=<m> facets=<compact-vector> :: <reason>` | orc → writer | scoring decision (tunes the rubric). **A task the resolver sent foreign appends `via=extra:<profile>`**, and `model=` is the foreign model id — so `/orc-retro` can segment a band's outcomes by WHO ran it. `facets=` is the planner-emitted vector (breadth·novelty·logic·test·fan·unc·risk) the score was computed from — `/orc-retro` reads it to recalibrate the formula. Fix-cycle dispatches emit `SCORE task=fix-<n> …` the same way |
|
|
228
|
+
| `VERIFY <task> actual=<model>/<effort> ✅ MATCH` / `⛔ DOWNGRADE expected=<m>/<e>` | orc → writer | claimed-vs-actual model check (the COMPARISON stays the orchestrator's obligation — surface a downgrade to the user, not just the trace) |
|
|
229
|
+
| `QUESTION count=<n> :: <topic>` | subagent→orc → writer | stopped to ask the user |
|
|
230
|
+
| `CONTEXT-GAP :: <what was already known>` | subagent→orc → writer | asked/re-derived something already in context |
|
|
231
|
+
| `REPLAN wave=<n> :: <reason>` | orc → writer | re-planned after a conflict/failure |
|
|
232
|
+
| `GATE <name> pass\|bounce\|escalate :: <detail>` | orc → writer | exit-gate result — name ∈ grounding \| coverage \| graph \| evidence \| derivation \| facet (the plan's facet-vocabulary check, `effort-and-mode.md`) \| schema (the plan-handoff schema check) \| judgment (ultra; `escalate` is judgment-only) \| wave-boundary \| budget (the Phase-1 `run_budget_dispatches` forecast gate — `pass` or the `stop` that blocks wave 1; emitted only when the key is > 0) \| stack-gate (Phase 8 stacked-PR threshold + handoff) \| stack-certainty (a stacked-PR seam decision) \| layer-green (one layer's green-gate ladder). The shared-band SIBLING-CONSISTENCY determination is NOT a gate name — carry it in the packet's `decisions`, never as an invented verb. Bounce detail lists the misses (feeds `/orc-retro` gate-bounce rates) |
|
|
233
|
+
| `ADVISE :: brief=<path> questions=<n>` | orc → writer | ultra Phase U0 — advisor brief received, clarification round relayed |
|
|
234
|
+
| `JUDGE <gate> <verdict> round=<n> blocking=<n> advisory=<n> downgraded=<n>` | orc → writer | ultra judgment verdict (gate ∈ analysis \| plan \| implementation) |
|
|
235
|
+
| `OUTCOME task=<id> score=<n> band=<range> model=<m> retries=<n> requeues=<n> needs_context=<n> unmet=<n>` | orc → writer | task closed — links the scoring band to what it actually took (feeds `/orc-retro` calibration) |
|
|
236
|
+
| `FINDING p0=<n> p1=<n> p2=<n> p3=<n>` | reviewer→orc → writer | review outcome (P0–P3 severity ladder) |
|
|
237
|
+
| `VERDICT pass\|fail :: <detail>` | verifier→orc → writer | verification outcome |
|
|
238
|
+
| `DRIFT loop=<n> :: <user description, compressed>` | orc → writer | mock-example drift-recovery loop opened (`PHASE mock-example`; canonical `_shared/drift-recovery.md`; hard cap 2 loops) |
|
|
239
|
+
| `TDD-RED task=<id> iter=<n> :: <failing tests>` | executor→orc → writer | TDD repair-loop iteration — the plan's acceptance tests still red (cap `tdd_loop_max`; a paired TDD task's red proof also emits iter=0) |
|
|
240
|
+
| `TDD-GREEN task=<id> iter=<n>` | executor→orc → writer | the task's TDD acceptance tests pass (the non-exempt definition-of-done) |
|
|
241
|
+
| `NOTE :: <decisions>` | writer | the packet's `decisions` field — the WHY layer (scoring rationale, user answers verbatim, what was rejected). One line per packet, only when `decisions` is non-empty |
|
|
242
|
+
| `STATS lane=<l> slug=<s> dispatches=<n> waves=<n> tasks=<n> bands=<h:n,m:n,l:n> downgrades=<n> duration_ms=<n>` | orc → writer | ONE deterministic summary line per run, in the `FINISH` packet, immediately BEFORE the `FINISH` line. This is what `orc stats` reads — one line per file, never a parse of the whole trace. Omit a field you genuinely do not have (a lane with no waves omits `waves=`); never guess one. Every trace-owning lane emits it, not just `orc` |
|
|
243
|
+
| `PACT <state> :: <ids>` | orc → writer | invariant-ledger state at the Phase-1 probe (`pact_gate`), and `PACT inject task=<id> :: <PACT-id>` when a DRIFTED/BROKEN promise is appended to a task's `constraints[]`. `PACT recheck pass\|fail :: <ids>` at Phase 6. Records whether last month's decisions constrained this month's plan |
|
|
244
|
+
| `BOUNDARY <verdict> task=<id> :: <area>` | orc → writer | per-task boundary verdict (verdict ∈ `EXECUTE` \| `ESCALATE` \| `REFUSE` \| `unknown` — an uncarded area is UNKNOWN, never REFUSE), plus `BOUNDARY lift task=<id> :: <area>` when `boundary_gate: block` removes ONE task from a wave (the wave still runs). `/orc-retro` reads these to answer the question the lane exists for: how much work did we stop attempting, and was that right |
|
|
245
|
+
| `CHALLENGE iter=<n> findings=P0:<n>/P1:<n>/P2:<n> coverage=<n>% verdict=PASS\|FAIL` | orc → writer | one line per completed `/orc-challenge` iteration boundary. **Copy `orc challenge record`'s `trace_line` verbatim** — the CLI assembles it so the lane never composes a second wording for the same number. Plus `CHALLENGE accept :: <id>` and `CHALLENGE rebut :: <id>` when an escape valve is used, and `CHALLENGE regoal\|retemplate :: v<n>` on a re-freeze. `/orc-retro` reads the sequence to answer whether a cycle converged or stalled |
|
|
246
|
+
| `EXTRA <profile>/<model> engine=<api\|claude-shim\|cli> task=<id> band=[lo,hi) tok=in/cw/cr/out outcome=<done\|partial\|failed\|fallback> dur=<m>m<s>s` | orc → writer | one line per FOREIGN dispatch — a slice that executed on a non-Claude worker (`_shared/extra-dispatch.md`). **Copy `orc extra dispatch`'s `trace_line` verbatim** — the CLI assembles it, exactly as `orc challenge record` does, so the lane never composes a second wording for the same numbers. Plus `EXTRA fallback task=<id> :: <reason> → <agent>` when a failed foreign dispatch re-dispatches to Claude (P6), `EXTRA substitution task=<id> :: requested=<m> reported=<m>` / `EXTRA reroute task=<id> :: <providers>` when the endpoint answered with a different model, or the same model served by a different company, and — v0.54.0 — `EXTRA resume task=<id> attempt=<n> :: from=<reason> attribution=<verdict> target=<extra:profile\|agent> files_preexisting=<n>` when a dispatch CONTINUES a position an earlier attempt left on disk, plus `EXTRA orphan task=<id> :: attempt=<n> lease-expired files_changed=<n> state=<state>` when preflight reports a dispatch that never reported back. **A resume that leaves no line cannot be counted** — neither `orc extra stats` nor `/orc-retro` can then learn whether resuming works, or which providers ignore the resume preamble. `EXTRA resume` rides in the resumed dispatch's own `trace_extras[]`; `EXTRA orphan` is the LANE's to emit after it reports, the same ownership rule as `EXTRA fallback`. **`tok=none` is a real value** and the ONLY correct one when the worker reported no counts (engine `cli` often does not): `tok=0/0/0/0` would tell `/orc-budget` the run was free, while a measured zero — engine `api`'s `cw`, always — is a different fact. **On a lane with no score `band=` carries `slot:<slot>`** (v0.55.0 — `slot:doc-writer`, `slot:wiki-scanner-light`): the field NAME is unchanged, so this parser, the eight-field dedupe and the ` :: ` tolerance are untouched, and `orc extra stats` gives each POSITION its own row for free. This is the verb `/orc-retro` reads to answer the only question that matters: is the cheap model actually cheaper once you count the repairs |
|
|
247
|
+
| `FINISH :: <detail>` | orc → writer | run ended |
|
|
248
|
+
|
|
249
|
+
`SPAWN`/`RETURN`/`PHASE-EDGE` come from the hook automatically. Every other verb
|
|
250
|
+
reaches the file through a packet — you never append lines by hand.
|
|
251
|
+
|
|
252
|
+
### Why `STATS` exists as its own line (v0.42.0)
|
|
253
|
+
|
|
254
|
+
`orc stats` counts usage from these files. Lane and date are free — they are in
|
|
255
|
+
the filename, which is already DATA. Everything else would cost a full parse of
|
|
256
|
+
a 20-minute trace, per run, forever. One deterministic line at a step that
|
|
257
|
+
already exists makes the depth free instead: `orc stats` reads the tail of each
|
|
258
|
+
file and nothing more.
|
|
259
|
+
|
|
260
|
+
Two consequences to keep true, because a counting tool built on a drifting log
|
|
261
|
+
produces confident WRONG numbers, which is worse than no numbers:
|
|
262
|
+
|
|
263
|
+
- **A run with no `FINISH` is counted as unfinished, permanently.** That is
|
|
264
|
+
correct behaviour and it is why `FINISH` is mandatory even on an abort.
|
|
265
|
+
- **A trace older than v0.42.0 has no `STATS` line.** `orc stats` falls back to
|
|
266
|
+
counting `DISPATCH` lines — orchestrator-written and present in every lane
|
|
267
|
+
(including `/orc-quick`, whose ad-hoc recon emits no `SPAWN`/`RETURN`). Old
|
|
268
|
+
traces still count, with less detail. Never back-fill a `STATS` line into an
|
|
269
|
+
old trace: the numbers would be invented, and the trace is append-only.
|
|
270
|
+
|
|
271
|
+
**Skeleton caveat (read every retro metric with it):** the hook only sees a NEW
|
|
272
|
+
dispatch. CONTINUING an already-running agent fires no PreToolUse/SubagentStop
|
|
273
|
+
pair, so a lane driven by continuing one agent produces fewer `SPAWN`/`RETURN`
|
|
274
|
+
lines than it did real work. The skeleton is a FLOOR on dispatch volume, never a
|
|
275
|
+
census — narration coverage computed from it reads low, not wrong.
|
|
276
|
+
|
|
277
|
+
## Model source of truth — the claimed-vs-actual check
|
|
278
|
+
|
|
279
|
+
A hook cannot read a subagent's model id (it lives only in the subagent's system
|
|
280
|
+
prompt). So each dispatched agent returns two fields (see each agent's return
|
|
281
|
+
contract):
|
|
282
|
+
|
|
283
|
+
- `actual_model` — **quoted verbatim** from the agent's injected system-prompt
|
|
284
|
+
model-id line ("The exact model ID is …"). Never a guess; `unknown` if absent.
|
|
285
|
+
- `actual_effort` — the value of `$CLAUDE_EFFORT` (env var, read via Bash).
|
|
286
|
+
|
|
287
|
+
For each spawn the orchestrator:
|
|
288
|
+
1. Derives the **expected** `(model, effort)` from the dispatched agent NAME via
|
|
289
|
+
the `config.md` score→model table / `MODEL-MAPPING.md`.
|
|
290
|
+
2. Compares against the returned `actual_*` and puts a `VERIFY` line in the next
|
|
291
|
+
packet — `✅ MATCH` or `⛔ DOWNGRADE`. A downgrade (the harness capped a high
|
|
292
|
+
pin to the main-session tier) is surfaced to the user, not just logged.
|
|
293
|
+
|
|
294
|
+
## Announce-on-spawn
|
|
295
|
+
|
|
296
|
+
When dispatching, announce the model to the user, derived from the agent NAME
|
|
297
|
+
(e.g. "Spawning orc-executor-opus-4-7-high → claude-opus-4-7 / high"). Derive it
|
|
298
|
+
from the name — do NOT pass the coarse `sonnet|opus|haiku` dispatch arg, which
|
|
299
|
+
cannot express 4-7 vs 4-8 and would override the frontmatter pin.
|
|
300
|
+
|
|
301
|
+
## Compaction safety
|
|
302
|
+
|
|
303
|
+
The checkpoint carries `logging_enabled` + `trace_path`. On resume, re-read them
|
|
304
|
+
and continue dispatching packets against the same file. The hook backbone keeps
|
|
305
|
+
emitting `SPAWN`/`RETURN`/`PHASE-EDGE` regardless of orchestrator memory, so a
|
|
306
|
+
compacted run is never blind — at worst it loses the WHY layer for one phase.
|
|
307
|
+
`/orc-ultra` is the `orc` skill with `ultra_mode: true`; its packets are just
|
|
308
|
+
orc's plus the U0/judge ones.
|
|
309
|
+
|
|
310
|
+
## Write discipline
|
|
311
|
+
|
|
312
|
+
- Append-only; one whole block per append (never edit prior lines).
|
|
313
|
+
- The trace records behavior faithfully — including the ugly bits (over-asking,
|
|
314
|
+
downgrades, failed waves). That honesty is the whole value.
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Reference — Ultra Lane (load only when `ultra_mode: true`)
|
|
2
|
+
|
|
3
|
+
`/orc-ultra` runs the FULL pipeline with maximum rigor for complex and
|
|
4
|
+
ultra-complex requests. Everything in SKILL.md still applies; this file adds
|
|
5
|
+
the ultra deltas. Ultra exists ONLY here — never in orc-mini, never on a plain
|
|
6
|
+
`/orc` run.
|
|
7
|
+
|
|
8
|
+
Cost stance: ultra is costly by definition. State it once at intake
|
|
9
|
+
("ultra adds an Opus 5 xhigh advisor + up to 3 judge dispatches + revision
|
|
10
|
+
loops"), then never prompt about cost again.
|
|
11
|
+
|
|
12
|
+
## Forced overrides (run-scoped — NEVER written to the user's config file)
|
|
13
|
+
|
|
14
|
+
Apply at Phase 0, on top of the normal config resolution:
|
|
15
|
+
- analysis depth = **deep**, no ask (the analyst's standard/deep gate is
|
|
16
|
+
bypassed; `default_analysis_depth` is ignored; scouts dispatch as usual).
|
|
17
|
+
- `pattern_findings` = on · `generate_tests` = on · `security_review` = on.
|
|
18
|
+
- Executor **tier floor**: remap the resolved score→model table so no task
|
|
19
|
+
dispatches below `orc-executor-sonnet-5-high`; bands at/above the preset's
|
|
20
|
+
opus boundary rise to at least `orc-executor-opus-4-8-high` — the floor only
|
|
21
|
+
ever raises a band, so the top `[90,100]` band keeps `orc-executor-opus-5-high`.
|
|
22
|
+
**Under `opus5_only` the floor raises EFFORT, not model** (every band
|
|
23
|
+
is already Opus 5, so there is no model left to raise): the `[0,40)` band rises
|
|
24
|
+
low → medium, and the other two are already at/above it. It is still a floor —
|
|
25
|
+
it never lowers a band, and it never raises `[80,100]` past high.
|
|
26
|
+
Show the remapped table with the Phase 2 scoring table.
|
|
27
|
+
|
|
28
|
+
> Opus-5-only mode: if `opus5_only`, every role this lane dispatches is already
|
|
29
|
+
> Opus 5 (advisor and judge are pinned there by default) and the scouts rise to
|
|
30
|
+
> `orc-scout-opus-5-low`. It FORCES — the Fable 5 note below does not apply
|
|
31
|
+
> while it is on. See `../../_shared/opus5-only.md`.
|
|
32
|
+
|
|
33
|
+
> Fable 5 role override: (INERT while `opus5_only`) if `fable5_enabled` and
|
|
34
|
+
> `advisor` / `judge` are in `fable5_roles`, dispatch the `orc-advisor-fable-5` /
|
|
35
|
+
> `orc-judge-fable-5` variant instead of the Opus 5 xhigh default — same slice,
|
|
36
|
+
> same contract. See `../../_shared/fable5-override.md`.
|
|
37
|
+
|
|
38
|
+
## Phase U0 — Advisor (after intake sign-off, before the analyst)
|
|
39
|
+
|
|
40
|
+
Dispatch `orc-advisor-opus-5-xhigh` (see `../../orc-advisor/SKILL.md`) with
|
|
41
|
+
the request, the run-folder path, and the detected stack. Validate the return
|
|
42
|
+
(`brief_path`, `open_questions[]`, `assumptions[]`, actual model/effort
|
|
43
|
+
fields). Then:
|
|
44
|
+
|
|
45
|
+
1. Relay `open_questions[]` to the user in ONE batched round. Fold answers
|
|
46
|
+
into the intent-spec; unanswered questions fall back to the advisor's
|
|
47
|
+
proposed default and enter the ledger as UNCONFIRMED.
|
|
48
|
+
2. Create `run/{run-slug}/ultra/assumption-ledger.md` from `assumptions[]`.
|
|
49
|
+
Every later phase appends: `assumption → confirmed-by-user |
|
|
50
|
+
confirmed-by-code-evidence (anchor) | UNCONFIRMED`. You alone write it
|
|
51
|
+
(workers return candidate entries; you record them).
|
|
52
|
+
3. Inject the brief VERBATIM (never a pointer) into the analyst slice, the
|
|
53
|
+
planner slice, every judge slice, and — as advisory notes — every executor
|
|
54
|
+
slice. The rubric section is what the judges score against.
|
|
55
|
+
|
|
56
|
+
The advisor runs once; it is never re-dispatched. Record `ADVISE` into the U0
|
|
57
|
+
packet — ultra adds ONE writer packet for U0 and one per judge gate on top of
|
|
58
|
+
orc's phase packets (`../references/trace-protocol.md`), so the advisory brief,
|
|
59
|
+
the questions relayed, and each verdict round are narrated like any other phase.
|
|
60
|
+
|
|
61
|
+
## The three judgment gates (dispatch `orc-judge-opus-5-xhigh`)
|
|
62
|
+
|
|
63
|
+
Shared mechanics — verdict validation, blocking-finding downgrade enforcement,
|
|
64
|
+
REVISE loops (author echo `finding_id → resolution`, re-judge convergence
|
|
65
|
+
rule, hard cap 2 per gate), the ESCALATE menu, advisory carry-forward, verdict
|
|
66
|
+
persistence (`run/{run-slug}/ultra/verdict-<gate>-<round>.md`), and the
|
|
67
|
+
`JUDGE` / `GATE judgment` trace events (packet-carried) — live in
|
|
68
|
+
`../../orc-judge/SKILL.md`.
|
|
69
|
+
Load it at the first gate. Loop counters + the ultra artifact paths go in the
|
|
70
|
+
checkpoint (`ultra` block) so a resumed run continues mid-loop.
|
|
71
|
+
|
|
72
|
+
Judge slices ALWAYS carry: the advisor brief (with rubric), the original
|
|
73
|
+
request, the assumption ledger, and gate-specific evidence below. Never the
|
|
74
|
+
author's reasoning or self-assessment.
|
|
75
|
+
|
|
76
|
+
- **Gate 1 (analysis)** — after the analyst-return deterministic gates pass
|
|
77
|
+
(evidence spot-check + derivation lint) and the user's challenge round is
|
|
78
|
+
resolved. Slice adds: report + spec paths. REVISE → bounce to the analyst.
|
|
79
|
+
Gate approval does NOT replace the user's take-into-build choice.
|
|
80
|
+
- **Gate 2 (plan)** — after the Phase 1 exit gate passes. FIRST build the
|
|
81
|
+
**blast-radius map** (deterministic, yours): for each task's declared
|
|
82
|
+
files, Grep the importers/callers of the symbols it touches; list any
|
|
83
|
+
caller file no task covers. Slice adds: planning-output + the map. REVISE →
|
|
84
|
+
bounce to the planner. Gate approval does not replace plan sign-off.
|
|
85
|
+
- **Gate 3 (implementation)** — after Phase 6 (and 6.5). FIRST build two
|
|
86
|
+
deterministic inputs:
|
|
87
|
+
1. **Traceability matrix** (`run/{run-slug}/ultra/traceability-matrix.md`):
|
|
88
|
+
`R# → task → declared files → actual diff hunks (git diff) → verify
|
|
89
|
+
evidence`. An R# with an EMPTY diff column is a deterministically caught
|
|
90
|
+
missing implementation — dispatch the fix wave directly, no judge needed
|
|
91
|
+
for that miss.
|
|
92
|
+
2. **Static analysis**: run the project's own tooling on the changed files
|
|
93
|
+
when the stack detection found any (linter, sonar-scanner,
|
|
94
|
+
type-checker) — never install tooling. Inject results into the slice;
|
|
95
|
+
tool findings on changed lines are blocking input the judge triages.
|
|
96
|
+
Slice adds: matrix, changed-file LIST (never an inlined diff — the judge
|
|
97
|
+
reads matrix-guided via its own Read/Grep), verify report, static-analysis
|
|
98
|
+
results, the resolved pattern's blocking invariants. REVISE → scored
|
|
99
|
+
executor **fix wave** for only the affected tasks (findings verbatim in
|
|
100
|
+
slices) → re-verify → re-judge. All clear → Phase 7.
|
|
101
|
+
|
|
102
|
+
## Verdict contract cross-check (validate like any worker return)
|
|
103
|
+
|
|
104
|
+
`verdict` ∈ APPROVE|REVISE|ESCALATE · every blocking finding has a verbatim
|
|
105
|
+
anchor + class-appropriate justification (`failure_consequence` for
|
|
106
|
+
correctness/security; named category + concrete alternative for
|
|
107
|
+
smell/simplification/placement) · `rubric_items_checked[]` covers the gate's
|
|
108
|
+
rubric lines · `unconfirmed_assumptions_touched[]` present. Malformed →
|
|
109
|
+
requeue the judge once, then escalate. Security findings with a concrete
|
|
110
|
+
consequence are always blocking. APPROVE with zero findings is legitimate.
|
|
111
|
+
|
|
112
|
+
## Phase 6.7 / 7 / 8 deltas
|
|
113
|
+
|
|
114
|
+
The mock-example phase (spine Phase 6.7, `../../_shared/drift-recovery.md`)
|
|
115
|
+
runs in ultra too — AFTER Gate 3 approves (an example of an unapproved
|
|
116
|
+
implementation would demo drift the judge already caught); same `mock_example`
|
|
117
|
+
config, same never-committed rule, same 2-loop drift cap. A drift-recovery
|
|
118
|
+
patch wave re-enters Gate 3 (a changed implementation is re-judged).
|
|
119
|
+
|
|
120
|
+
The summary additionally reports: per-gate verdicts + rounds, findings by
|
|
121
|
+
severity and class, auto-downgrades, the assumption ledger's final state
|
|
122
|
+
(UNCONFIRMED entries highlighted), and the traceability matrix path. Ship is
|
|
123
|
+
unchanged — but never offer commit while a gate is unresolved.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Reference — Wave Grouping & Conflict Graph
|
|
2
|
+
|
|
3
|
+
Turn the tagged task list into conflict-free waves. Load during Phase 3.
|
|
4
|
+
|
|
5
|
+
## Waves are computed for EVERY run — dispatch style is intra-wave only
|
|
6
|
+
|
|
7
|
+
Wave computation is NOT a parallel-mode concern. It runs for **every run with ≥2
|
|
8
|
+
tasks, sequential included** (dependency layers + conflict graph +
|
|
9
|
+
`max_wave_tasks` cap). **Dispatch style controls only INTRA-WAVE concurrency:**
|
|
10
|
+
|
|
11
|
+
- **parallel** → a wave's non-conflicting tasks dispatch at once (up to
|
|
12
|
+
`max_wave_tasks`);
|
|
13
|
+
- **sequential** → the SAME waves, but a wave's tasks dispatch one at a time, in
|
|
14
|
+
order; the wave still closes only when all its tasks close.
|
|
15
|
+
|
|
16
|
+
Either way the **wave-boundary gate fires identically** (the deterministic batch
|
|
17
|
+
pause below binds to wave numbers, not to a dispatch style). A sequential run
|
|
18
|
+
therefore never degenerates to "no waves / per-task pauses" — a 5-task plan
|
|
19
|
+
becomes e.g. `[T1] [T2 T3 T4] [T5]`, not five ad-hoc stops. **Show the wave plan
|
|
20
|
+
(wave → tasks → pause marks) to the user BEFORE wave 1 in BOTH styles.**
|
|
21
|
+
|
|
22
|
+
## The principle
|
|
23
|
+
|
|
24
|
+
Two tasks may share a wave ONLY if their `declared_files` don't overlap AND
|
|
25
|
+
neither depends on the other. Conflicts are designed out by scheduling — never
|
|
26
|
+
negotiated at runtime.
|
|
27
|
+
|
|
28
|
+
## Algorithm
|
|
29
|
+
|
|
30
|
+
1. **Dependency edges:** a task's earliest wave = max(wave of its deps) + 1.
|
|
31
|
+
2. **Conflict edges:** for every pair, mark conflict if `declared_files` globs
|
|
32
|
+
intersect (expand against the repo tree; unresolvable globs conflict on
|
|
33
|
+
their literal prefix).
|
|
34
|
+
3. **Assign greedily in topological order:** place each task in the earliest
|
|
35
|
+
wave where (a) all deps are earlier and (b) nothing in that wave conflicts.
|
|
36
|
+
Otherwise open a new wave.
|
|
37
|
+
4. **Cap concurrency at `config.max_wave_tasks`** (default 3): a wave NEVER
|
|
38
|
+
exceeds this many tasks, even if more are conflict-free. Overflow moves to the
|
|
39
|
+
next wave. This is the efficiency cap — 3 parallel subagents by default.
|
|
40
|
+
5. **Mark batch pauses:** compute the pause schedule from the user's Phase 2
|
|
41
|
+
answer — mark `is_batch_pause: true` on wave W when `W % N == 0` AND a later
|
|
42
|
+
wave exists (`W < total_waves`); the last wave is NEVER a pause (nothing
|
|
43
|
+
remains to gate). The resulting wave indices are the `pause_schedule` stored
|
|
44
|
+
in the checkpoint. A pause so marked is a HARD gate (stop-and-resume.md), not
|
|
45
|
+
an orchestrator judgment call.
|
|
46
|
+
|
|
47
|
+
## Same-feature collision
|
|
48
|
+
|
|
49
|
+
If two tasks own the same feature/files with no dependency between them, the
|
|
50
|
+
graph auto-serializes them — but that's a planning smell. Surface it: suggest
|
|
51
|
+
merging them into one task rather than silently serializing duplicate work.
|
|
52
|
+
|
|
53
|
+
## TDD tasks are ORDINARY tasks (v0.41.0)
|
|
54
|
+
|
|
55
|
+
TDD red proofs are **planner-emitted tasks**, not an orchestrator-synthesized
|
|
56
|
+
Wave 0. Each one materializes the `tdd_spec` entries of the implementation task
|
|
57
|
+
it guards, and that task lists it in `depends_on`. Nothing here special-cases
|
|
58
|
+
them:
|
|
59
|
+
|
|
60
|
+
- they enter the same conflict graph via their `declared_files` (their test
|
|
61
|
+
files), so **independent TDD tasks share a wave and run in parallel** — the
|
|
62
|
+
red proofs for two unrelated features are one wave, not two;
|
|
63
|
+
- `depends_on` guarantees **a red proof is always in an earlier wave than the
|
|
64
|
+
code it proves** — a proof can never land beside its implementation;
|
|
65
|
+
- they are scored from **their own planner-emitted `facets`**, like any task, so
|
|
66
|
+
no derived-vector rule is needed;
|
|
67
|
+
- `max_wave_tasks`, `is_batch_pause` and `pause_schedule` bind to them unchanged.
|
|
68
|
+
|
|
69
|
+
**A TDD task does NOT inherit the risk floor** of the task it guards: it
|
|
70
|
+
transcribes planner-authored skeletons, writes no production code, and its output
|
|
71
|
+
is asserted RED before anything is believed. The planner reflects that in the
|
|
72
|
+
task's own facets (`novelty: mechanical`, `logic: none`, `risk: []`). Stated here
|
|
73
|
+
so it is not re-litigated per run — the alternative is a Haiku-sized
|
|
74
|
+
transcription job dispatched at floor 70 because the requirement it proves is
|
|
75
|
+
auth-flavoured.
|
|
76
|
+
|
|
77
|
+
**If no task carries `new-surface` or `behavior-change` entries, no TDD task
|
|
78
|
+
exists and no extra wave is created.**
|
|
79
|
+
|
|
80
|
+
## Orchestrator-synthesized tasks (the mock example, any future one)
|
|
81
|
+
|
|
82
|
+
Some dispatched tasks appear in no `tasks[]` because the ORCHESTRATOR synthesized
|
|
83
|
+
them — the mock example (`_shared/drift-recovery.md`). They still obey hard rule
|
|
84
|
+
1: **dispatched like any other task, never done by you.** But they have no
|
|
85
|
+
planner-emitted `facets`, and the orchestrator is by definition the party that
|
|
86
|
+
did NOT read the code — inventing a vector for them is judgment wearing
|
|
87
|
+
arithmetic's clothes, the exact thing the facet redesign removed.
|
|
88
|
+
|
|
89
|
+
So their vector is **DERIVED, never judged**:
|
|
90
|
+
|
|
91
|
+
| Facet | Value |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `breadth` | `len(files the synthesized task will touch)` |
|
|
94
|
+
| `novelty` | `mechanical` — it transcribes planner-authored material |
|
|
95
|
+
| `logic` | `none` |
|
|
96
|
+
| `test_surface` | per the task |
|
|
97
|
+
| `risk` | `[]` — unless the synthesized task itself inherits a CITED risk |
|
|
98
|
+
|
|
99
|
+
## Post-wave worktree audit (a GATE, not a report)
|
|
100
|
+
|
|
101
|
+
Declarations can be wrong, and a return can be honest and still miss what
|
|
102
|
+
happened. Capture `git status --short` BEFORE the wave dispatches and again
|
|
103
|
+
after every task returns, then diff the two:
|
|
104
|
+
- **Any path whose state changed and is in NO task's `declared_files`** → name
|
|
105
|
+
the path and the likely task, and get an explicit user decision BEFORE the
|
|
106
|
+
wave closes. A wave never closes over an unexplained worktree delta.
|
|
107
|
+
- **A file that became LESS modified is as much a violation as one that became
|
|
108
|
+
more modified.** That is the revert signature — an executor made an
|
|
109
|
+
unsatisfiable assertion true by `git checkout`-ing another task's completed
|
|
110
|
+
work, returned a literally-true report, and left a CLEAN tree. Nothing that
|
|
111
|
+
reads returns can see it.
|
|
112
|
+
- **Stray files count** — a path that appears at the repo root (a stdout dump, a
|
|
113
|
+
mangled-path artifact) is undeclared output, not noise to ignore.
|
|
114
|
+
- Two agents in one wave touched the same undeclared file → record
|
|
115
|
+
`failure_reason: "file-collision:<file> with <agent>"`, set the
|
|
116
|
+
later-finishing task to `requeued`, re-dispatch in a later wave so it sees
|
|
117
|
+
the other's committed changes.
|
|
118
|
+
- Declarations are the plan, `actual_files` is the ATTESTATION, and
|
|
119
|
+
`git status` is the AUDIT — same instruction → contract → attestation →
|
|
120
|
+
spot-check pattern the plan applies to `grounding[]`.
|
|
121
|
+
- Canonical cross-lane wording: `_shared/return-validation.md` §6.
|