@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,105 @@
|
|
|
1
|
+
# Reference — the per-layer GREEN GATE (mandatory)
|
|
2
|
+
|
|
3
|
+
Loaded at Phase D2, run once per layer and again after every rebase above a
|
|
4
|
+
changed layer.
|
|
5
|
+
|
|
6
|
+
**Rule: no layer is submitted, pushed or merged until its own gate is green at
|
|
7
|
+
its OWN base.** Never `git commit --no-verify`. Never `gh stack submit` over a red
|
|
8
|
+
layer. "Green when the whole stack is applied" is not green.
|
|
9
|
+
|
|
10
|
+
## The ladder — all four steps, in order, per layer
|
|
11
|
+
|
|
12
|
+
Detect the stack from the repo (never ask what the repo can tell you) and run the
|
|
13
|
+
four rungs. The commands below are the common shapes; the repo's own scripts win.
|
|
14
|
+
|
|
15
|
+
| # | Rung | Go | Node/TS | Java/Kotlin | Python | Rust |
|
|
16
|
+
|---|------|----|---------|-------------|--------|------|
|
|
17
|
+
| 1 | **build** at this layer's base | `go build ./...` | `npm run build` | `./gradlew compileJava` / `mvn -q compile` | `python -m compileall` / type-check | `cargo build` |
|
|
18
|
+
| 2 | **tests** for the layer's scope | `go test ./<pkgs>/...` | `npm test -- <paths>` | `./gradlew test --tests …` | `pytest <paths>` | `cargo test <filter>` |
|
|
19
|
+
| 3 | **lint scoped to THIS layer's base** | `golangci-lint run --new-from-rev <base> ./<pkgs>/...` | `eslint <changed files>` | `./gradlew checkstyleMain` / detekt | `ruff check <paths>` | `cargo clippy -- -D warnings` |
|
|
20
|
+
| 4 | **the repo's own pre-commit hooks, unbypassed** | `git commit` (hooks run) | same | same | same | same |
|
|
21
|
+
|
|
22
|
+
Mocks/codegen first when the project needs them (`mockery`, `go generate`,
|
|
23
|
+
`protoc`, `npm run codegen`) — a missing generated file reads as a compile error
|
|
24
|
+
and sends you hunting the wrong thing. Platform quirks belong here too: e.g. on
|
|
25
|
+
macOS, Go tests that monkey-patch need `GOARCH=amd64 … -gcflags=all=-l`.
|
|
26
|
+
|
|
27
|
+
Any rung red → **stop, fix, re-run the whole ladder from rung 1** for that layer.
|
|
28
|
+
Do not proceed to the next layer. Do not push.
|
|
29
|
+
|
|
30
|
+
## Attribution — the stacked-specific trap
|
|
31
|
+
|
|
32
|
+
Many repos pin their linter's "new code" baseline to the trunk (e.g.
|
|
33
|
+
`issues.new-from-rev: origin/main` in `.golangci.yml`). On layer 4 that flags
|
|
34
|
+
layers 1–3's diff too: noisy and **misattributed**. Override per layer with
|
|
35
|
+
`--new-from-rev <that layer's base>` (or the equivalent) so each layer is judged
|
|
36
|
+
on **its own** diff.
|
|
37
|
+
|
|
38
|
+
## Code-quality scans (SonarQube and friends) are a STACK-LEVEL gate
|
|
39
|
+
|
|
40
|
+
A scan that analyzes the project key directly, with no PR decoration, measures
|
|
41
|
+
the **cumulative** L1..LN diff against the trunk — not layer N's diff. So:
|
|
42
|
+
|
|
43
|
+
- per-layer new-code coverage from such a scan is **not a trustworthy per-layer
|
|
44
|
+
signal** — verify coverage locally, per layer;
|
|
45
|
+
- treat the scan as a **stack-level** gate;
|
|
46
|
+
- a scan reported as `SKIPPED` on a layer usually means that layer's test job
|
|
47
|
+
failed first — the gate never ran. Read it as red, not as flaky.
|
|
48
|
+
|
|
49
|
+
Keep each layer's tests **with its code** for exactly this reason: a FOUNDATION
|
|
50
|
+
layer with no tests can red-gate on its own coverage rule.
|
|
51
|
+
|
|
52
|
+
## Dead-code / `unused` on a FOUNDATION layer — a P0 QUESTION, never auto-fixed
|
|
53
|
+
|
|
54
|
+
Linters flag declared-but-unreferenced identifiers (Go's `unused`, TS
|
|
55
|
+
`noUnusedLocals`, Rust `dead_code`) even when the compiler is happy. A FOUNDATION
|
|
56
|
+
layer that declares something only a LATER layer calls will go RED. **That is a
|
|
57
|
+
real signal about the seam**, so stop and ask:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
L2 declares repo.FindByRef()
|
|
61
|
+
L4 (handler) is its only caller
|
|
62
|
+
lint --new-from-rev <L2 base>: unused → RED
|
|
63
|
+
|
|
64
|
+
ASK: [a] merge L2 into L4 (one layer, no dead code) ← recommended
|
|
65
|
+
[b] keep the split, land the first caller in L2
|
|
66
|
+
[c] accept it: one suppression, with a reason naming the consumer layer
|
|
67
|
+
(user override only)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Never silently add a suppression, never invent a fake caller, never delete the
|
|
71
|
+
identifier to go green. Record the answer under the plan's `## Decisions`.
|
|
72
|
+
|
|
73
|
+
## Re-verification after ANY lower-layer change (the rule people get wrong)
|
|
74
|
+
|
|
75
|
+
Amending layer N rewrites every branch above it, so previously-green upper layers
|
|
76
|
+
can go red:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
amend L2 → gh stack rebase --upstack
|
|
80
|
+
for layer in L2..Ltop, bottom-up:
|
|
81
|
+
run the FULL ladder (codegen + build + tests + lint + hooks)
|
|
82
|
+
RED → stop, fix, restart from that layer
|
|
83
|
+
all green → gh stack push / gh stack submit
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The same applies after `gh stack sync` when the trunk moves, and after
|
|
87
|
+
`gh stack modify` (insert / reorder / drop / combine).
|
|
88
|
+
|
|
89
|
+
## Merge-time gate
|
|
90
|
+
|
|
91
|
+
Bottom-up only. Before `gh stack merge`, confirm the layer's own CI is green
|
|
92
|
+
(`gh stack view --json` + `gh pr view <n> --json statusCheckRollup`); after each
|
|
93
|
+
merge, confirm the upper layers auto-retargeted and their CI re-ran.
|
|
94
|
+
|
|
95
|
+
## Gate red flags
|
|
96
|
+
|
|
97
|
+
| Excuse | Reality |
|
|
98
|
+
|---|---|
|
|
99
|
+
| "Tests pass on the top layer, the stack is fine" | The gate is per-layer at its own base. Merging L1 alone must not break the trunk. |
|
|
100
|
+
| "The build is clean, lint is cosmetic" | Lint blocks the repo's pre-commit hook. Clean build ≠ committable. |
|
|
101
|
+
| "I'll `--no-verify` and fix lint in a follow-up" | Forbidden. The hooks are the gate; bypassing means the PR cannot land. |
|
|
102
|
+
| "It was green before the rebase" | A rebase rewrites every upper branch. Re-run the ladder at every tip above the change. |
|
|
103
|
+
| "`unused` is a false positive — the caller is in layer 4" | It is a TRUE positive about layer 2 *as a standalone PR*. That is the P0 question, not a suppression. |
|
|
104
|
+
| "The scan says new coverage is fine on layer 3" | Layer 3's scan measures L1..L3 cumulatively. Verify per-layer coverage locally. |
|
|
105
|
+
| "The scan was SKIPPED — it's flaky" | The layer's test job failed first; the gate never ran. Red. |
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Reference — splitting an already-built worktree (entry mode `orc-run`)
|
|
2
|
+
|
|
3
|
+
Loaded at Phase D1/D2 when the change ALREADY exists — the normal case when
|
|
4
|
+
ORC's ship phase hands the stack over. The code is written; the job is to
|
|
5
|
+
distribute it across layer branches **without losing a byte and without hunk
|
|
6
|
+
surgery**.
|
|
7
|
+
|
|
8
|
+
## Invariants
|
|
9
|
+
|
|
10
|
+
- **File-granular only.** Every changed path belongs to exactly ONE layer. A file
|
|
11
|
+
whose content seems to belong in two layers is an UNCERTAIN → ask; the default
|
|
12
|
+
option offered is "the whole file lands in the LOWEST layer that needs it".
|
|
13
|
+
- **The snapshot exists before any branch switch.** The user's work is never held
|
|
14
|
+
only by the worktree once branch surgery starts.
|
|
15
|
+
- **Nothing is lost:** after the last layer, the union of the layers' files must
|
|
16
|
+
equal the snapshot's changed-file set, exactly. That equality is a GATE.
|
|
17
|
+
|
|
18
|
+
## Step 1 — snapshot the change
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
git status --short > /tmp/orc-stack-surface.txt # the authoritative surface list
|
|
22
|
+
git checkout -b orc-stack-snapshot/<slug> # keeps the worktree as-is
|
|
23
|
+
git add -A # tracked + untracked
|
|
24
|
+
git commit -m "<TICKET> snapshot: pre-stack state (temporary, not for review)"
|
|
25
|
+
SNAPSHOT=$(git rev-parse HEAD)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Then **verify the snapshot is complete** before going further:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git diff --name-status <trunk>..$SNAPSHOT # must cover every path in the surface list
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Any path in `git status --short` that is missing from that diff → **STOP**. Do not
|
|
35
|
+
proceed with a partial snapshot.
|
|
36
|
+
|
|
37
|
+
Note the excluded-but-listed paths (generated code, lockfiles, vendored trees —
|
|
38
|
+
`../_shared/stack-plan.md`): they are still real files that must land in some
|
|
39
|
+
layer, they just do not count toward a budget.
|
|
40
|
+
|
|
41
|
+
## Step 2 — start the stack from the trunk
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
git checkout <trunk> && git pull --ff-only
|
|
45
|
+
gh stack init -b <trunk>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The worktree now shows trunk state. The change is safe in `$SNAPSHOT`.
|
|
49
|
+
|
|
50
|
+
## Step 3 — materialize each layer, bottom-up
|
|
51
|
+
|
|
52
|
+
Per layer, from the plan's explicit file list:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
gh stack add -m "<TICKET> <layer title>" <layer-branch>
|
|
56
|
+
|
|
57
|
+
# additions + modifications for THIS layer only
|
|
58
|
+
git checkout $SNAPSHOT -- <file> <file> ...
|
|
59
|
+
|
|
60
|
+
# deletions this layer owns (checkout cannot delete)
|
|
61
|
+
git rm <deleted-file> ...
|
|
62
|
+
|
|
63
|
+
git status --short # sanity: nothing from another layer
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Then run the full green-gate ladder (`green-gate.md`) and commit through the
|
|
67
|
+
repo's hooks. Never `--no-verify`.
|
|
68
|
+
|
|
69
|
+
**A moved/renamed file** is one unit: its delete and its add land in the SAME
|
|
70
|
+
layer, always.
|
|
71
|
+
|
|
72
|
+
## Step 4 — completeness gate (before `gh stack submit`)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
git diff --name-only <trunk>..<top layer branch> | sort > /tmp/stacked.txt
|
|
76
|
+
git diff --name-only <trunk>..$SNAPSHOT | sort > /tmp/snapshot.txt
|
|
77
|
+
diff /tmp/stacked.txt /tmp/snapshot.txt # MUST be empty
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Non-empty → a file was dropped or duplicated. Fix it before submitting: an
|
|
81
|
+
unreviewed missing file is exactly the failure stacking is supposed to prevent.
|
|
82
|
+
|
|
83
|
+
## Step 5 — the snapshot branch stays
|
|
84
|
+
|
|
85
|
+
Keep `orc-stack-snapshot/<slug>` until the last layer merges — it is the undo
|
|
86
|
+
button, and it is also how you re-cut a seam without re-deriving the change. It
|
|
87
|
+
is **never pushed** and never becomes a PR. Delete it (after asking) when the
|
|
88
|
+
stack is fully merged.
|
|
89
|
+
|
|
90
|
+
## When the change is already committed on a feature branch
|
|
91
|
+
|
|
92
|
+
Same procedure with `$SNAPSHOT` = that branch's tip; skip the `add`/`commit`.
|
|
93
|
+
Leave the original branch untouched — it is the snapshot.
|
|
94
|
+
|
|
95
|
+
## What this reference does NOT do
|
|
96
|
+
|
|
97
|
+
- No hunk splitting, no interactive `git add -p`, no manual patch editing.
|
|
98
|
+
- No retrofitting an already-open PR into a stack (`gh stack link`) — out of
|
|
99
|
+
scope; ship it as one regular PR instead.
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
# ORC-PR-SETUP — plan your stacked pull requests
|
|
2
|
+
|
|
3
|
+
**Guide for humans.** Plain, simple English. Read this once, and you will know
|
|
4
|
+
what stacked pull requests are, when to use them, what this skill asks you, and
|
|
5
|
+
what it writes.
|
|
6
|
+
|
|
7
|
+
Companion guide: **[ORC-PR-DRIVER README](../orc-pr-driver/README.md)** — the
|
|
8
|
+
skill that builds the layers after this one plans them.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. The short version
|
|
13
|
+
|
|
14
|
+
A very big pull request (PR) is hard to review. If a PR changes 2,000 lines in
|
|
15
|
+
40 files, most reviewers stop reading. They click "approve" because they are
|
|
16
|
+
tired, not because the code is correct.
|
|
17
|
+
|
|
18
|
+
A **stack** solves this. You cut one big change into a chain of small PRs. Each
|
|
19
|
+
small PR is easy to read. Reviewers can review them at the same time.
|
|
20
|
+
|
|
21
|
+
This skill does the **thinking** part: it decides *where to cut*. It writes a
|
|
22
|
+
plan file. It does **not** touch git.
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
one big change ──▶ /orc-pr-setup ──▶ stack-plan.md ──▶ /orc-pr-driver ──▶ 3–6 small PRs
|
|
26
|
+
(this skill: (the other skill:
|
|
27
|
+
plan the cuts) make the branches)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Run it with:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
/orc-pr-setup
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 2. Words you will see here
|
|
39
|
+
|
|
40
|
+
| Word | Simple meaning |
|
|
41
|
+
|---|---|
|
|
42
|
+
| **trunk** | Your main branch. Usually `main` or `master`. |
|
|
43
|
+
| **stack** | A chain of PRs in one repository. Each PR sits on top of the one below. |
|
|
44
|
+
| **layer** | One PR inside the stack. Layer 1 is at the bottom. |
|
|
45
|
+
| **base** | The branch a PR wants to merge into. Layer 1's base is the trunk. Layer 2's base is layer 1. |
|
|
46
|
+
| **retarget** | When you merge a layer, GitHub automatically points the layers above it to the new base. You do nothing. |
|
|
47
|
+
| **restack / rebase** | Moving the layers above a change so they sit on the new version of it. |
|
|
48
|
+
| **seam** | The place where you cut. "Where does layer 1 end and layer 2 start?" |
|
|
49
|
+
| **budget** | The maximum size of one layer (lines and files). |
|
|
50
|
+
| **value class** | What a layer is worth to somebody. See section 7. |
|
|
51
|
+
| **LoC** | Lines of code. Here it means added lines **plus** deleted lines. |
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 3. Why bother? (what you get, what it costs)
|
|
56
|
+
|
|
57
|
+
**You get:**
|
|
58
|
+
|
|
59
|
+
- Small diffs. A reviewer can hold 300 lines in their head. Not 2,000.
|
|
60
|
+
- Parallel review. Three people can review three layers at the same time.
|
|
61
|
+
- Safer releases. You can merge the safe layer (a database migration) today and
|
|
62
|
+
the risky layer (the new endpoint) tomorrow.
|
|
63
|
+
- Easy revert. If one layer breaks production, you revert one small PR.
|
|
64
|
+
|
|
65
|
+
**It costs:**
|
|
66
|
+
|
|
67
|
+
- **Every layer runs the full CI pipeline.** 5 layers = 5 CI runs. This is real
|
|
68
|
+
money and real waiting time.
|
|
69
|
+
- More PRs to open, watch, and merge.
|
|
70
|
+
|
|
71
|
+
So: more layers is **not** better. The skill keeps the number small on purpose
|
|
72
|
+
(default maximum 6 layers).
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## 4. Before you start
|
|
77
|
+
|
|
78
|
+
You need these things. The skill checks all of them for you first and tells you
|
|
79
|
+
if one is missing.
|
|
80
|
+
|
|
81
|
+
| Need | How to check | If missing |
|
|
82
|
+
|---|---|---|
|
|
83
|
+
| `gh` (GitHub CLI), version 2.0 or newer | `gh --version` | install `gh`, then log in with `gh auth login` |
|
|
84
|
+
| Logged in | `gh auth status` | run `gh auth login` |
|
|
85
|
+
| The stack extension | `gh extension list` | run `gh extension install github/gh-stack` |
|
|
86
|
+
| Your repo is **not** a fork | `gh repo view --json isFork` | **Stop.** Stacks cannot cross forks. Use one normal PR. |
|
|
87
|
+
| A ticket number | you know it | the skill asks you; without one it stops and suggests one normal PR |
|
|
88
|
+
|
|
89
|
+
If something is missing, the skill will not pretend. It says which check failed
|
|
90
|
+
and recommends **one normal PR** instead. That is a normal, safe result — not an
|
|
91
|
+
error you must fix today.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 5. Three ways to start
|
|
96
|
+
|
|
97
|
+
**Way 1 — you have a spec, no code yet (the cleanest way).**
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
/orc-pr-setup → plan the layers first
|
|
101
|
+
/orc-pr-driver → build each layer, one at a time
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Way 2 — ORC already built the change.** At the end of a `/orc` run, if the
|
|
105
|
+
change is big, ORC asks you one question: *stack it, or one normal PR?* If you
|
|
106
|
+
say "stack it", ORC writes a small handoff file and tells you to run this skill.
|
|
107
|
+
Nothing is lost — your code is already committed on your branch.
|
|
108
|
+
|
|
109
|
+
**Way 3 — you already know your own layers.** You do not need this skill at
|
|
110
|
+
all. Generate a blank plan and fill it in yourself:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
orc pr stack template my-feature # writes stacked-pr/my-feature/stack-plan.md
|
|
114
|
+
# open the file, fill in every <...>
|
|
115
|
+
orc pr stack status my-feature # says READY, or tells you what is missing
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Then go straight to `/orc-pr-driver`.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 6. How to use it, step by step
|
|
123
|
+
|
|
124
|
+
You type `/orc-pr-setup`. Then this happens.
|
|
125
|
+
|
|
126
|
+
### Step 1 — it checks your tools
|
|
127
|
+
|
|
128
|
+
It runs the checks from section 4 and prints a short report. It also tells you
|
|
129
|
+
if your trunk branch has protection rules, because that decides how much CI
|
|
130
|
+
each layer will run.
|
|
131
|
+
|
|
132
|
+
### Step 2 — it asks you a few things
|
|
133
|
+
|
|
134
|
+
- **Ticket number.** Required. Branch names and PR titles use it.
|
|
135
|
+
- **PR description template.** It looks for one, in this order:
|
|
136
|
+
1. your team's template inside ORC (`skills/orc/subskills/orc-pr/pr.md`),
|
|
137
|
+
2. your project's template (`.github/pull_request_template.md`, or files in
|
|
138
|
+
`.github/PULL_REQUEST_TEMPLATE/`, or `docs/`),
|
|
139
|
+
3. a "PR template" section in your `CLAUDE.md`,
|
|
140
|
+
4. if there is none: it shows you **three ready-made templates** and you pick
|
|
141
|
+
one (`minimal`, `context-first`, `risk-and-rollback`).
|
|
142
|
+
|
|
143
|
+
If you do not want any template, the skill stops the stack and you ship one
|
|
144
|
+
normal PR. This is on purpose: 5 layers with no template means 5 walls of
|
|
145
|
+
text, and nobody reads them.
|
|
146
|
+
|
|
147
|
+
### Step 3 — it looks at the change
|
|
148
|
+
|
|
149
|
+
If the code already exists, it reads the real numbers from git
|
|
150
|
+
(`git diff --numstat`). If the code does not exist yet, it estimates from your
|
|
151
|
+
spec and says clearly that these are estimates.
|
|
152
|
+
|
|
153
|
+
It ignores some files when counting (but still lists them, so reviewers know
|
|
154
|
+
they exist):
|
|
155
|
+
|
|
156
|
+
- generated code (`*.pb.go`, `*_gen.go`, mocks, OpenAPI/Swagger output)
|
|
157
|
+
- lock files (`go.sum`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, …)
|
|
158
|
+
- `vendor/`, `node_modules/`, `testdata/`
|
|
159
|
+
- pure file moves and renames with no content change
|
|
160
|
+
|
|
161
|
+
Tests **do** count. Tests are code that reviewers read.
|
|
162
|
+
|
|
163
|
+
### Step 4 — it groups files into layers
|
|
164
|
+
|
|
165
|
+
It puts each file into a "kind of work" group (database, storage, logic,
|
|
166
|
+
adapter, wiring, HTTP handler, background worker, docs), then builds layers from
|
|
167
|
+
those groups, bottom to top. See section 7.
|
|
168
|
+
|
|
169
|
+
### Step 5 — it asks you when it is not sure
|
|
170
|
+
|
|
171
|
+
This is the most important part. Read section 8.
|
|
172
|
+
|
|
173
|
+
### Step 6 — it writes the plan and stops
|
|
174
|
+
|
|
175
|
+
It writes `stacked-pr/<slug>/stack-plan.md`, shows you a table of the layers,
|
|
176
|
+
and says clearly: **nothing has been created yet.** No branches. No PRs.
|
|
177
|
+
|
|
178
|
+
You read the plan. If you like it, you run `/orc-pr-driver`.
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 7. The rules it follows
|
|
183
|
+
|
|
184
|
+
### Rule 1 — bottom layers first, dependencies decide the order
|
|
185
|
+
|
|
186
|
+
A layer may only use code from the layers **below** it. So the order is:
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
layer 5 docs, dashboards, turn the feature on (smallest risk, top)
|
|
190
|
+
layer 4 HTTP handler / route / API shape
|
|
191
|
+
layer 3 business logic
|
|
192
|
+
layer 2 database queries / storage
|
|
193
|
+
layer 1 database migration (schema) (biggest risk, bottom)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Frontend version: types + API client → component → state/store → page and
|
|
197
|
+
wiring → turn the feature on.
|
|
198
|
+
|
|
199
|
+
If your project is not one of the known shapes, it falls back to a simple four
|
|
200
|
+
step order: **data → logic → transport → wiring**.
|
|
201
|
+
|
|
202
|
+
### Rule 2 — one layer, one kind of work
|
|
203
|
+
|
|
204
|
+
A UI component and its backend handler are **different layers by default**, even
|
|
205
|
+
when both are small, even when you wrote them in the same hour. The same is true
|
|
206
|
+
for:
|
|
207
|
+
|
|
208
|
+
- a handler and a background/webhook worker,
|
|
209
|
+
- a database migration and the code that reads the new column,
|
|
210
|
+
- an external API client and the business logic that calls it.
|
|
211
|
+
|
|
212
|
+
Why: different reviewers, different risk, different revert.
|
|
213
|
+
|
|
214
|
+
### Rule 3 — size limits (a ceiling, not a target)
|
|
215
|
+
|
|
216
|
+
| Limit | Default | Config key |
|
|
217
|
+
|---|---|---|
|
|
218
|
+
| lines per layer | 1000 | `stacked_pr_loc` |
|
|
219
|
+
| files per layer | 20 (aim for 10) | `stacked_pr_files` |
|
|
220
|
+
| layers per stack | 6 | `stacked_pr_max_layers` |
|
|
221
|
+
|
|
222
|
+
Change them with `orc config set stacked_pr_loc 1500`.
|
|
223
|
+
|
|
224
|
+
Important: staying under the limit does **not** make a layer good. A layer with
|
|
225
|
+
999 lines that mixes a migration and a handler still fails rule 2. The size
|
|
226
|
+
limit only stops layers from getting too big.
|
|
227
|
+
|
|
228
|
+
If the smallest possible piece of work is still too big (for example, one huge
|
|
229
|
+
generated file), the skill does **not** fake a split. It tells you, explains
|
|
230
|
+
why, and asks you to accept the oversized layer.
|
|
231
|
+
|
|
232
|
+
### Rule 4 — every layer must be worth something
|
|
233
|
+
|
|
234
|
+
Each layer gets one **value class**:
|
|
235
|
+
|
|
236
|
+
| Class | Meaning | Example |
|
|
237
|
+
|---|---|---|
|
|
238
|
+
| `USER` | a real user or customer sees a change | the new checkout button works |
|
|
239
|
+
| `OPERATOR` | your ops / on-call team gains something | a new dashboard or alert |
|
|
240
|
+
| `CONTRACT` | another team or repo can now build against it | the API endpoint exists |
|
|
241
|
+
| `FOUNDATION` | nobody sees it yet; it enables a later layer | the database table |
|
|
242
|
+
|
|
243
|
+
`FOUNDATION` is allowed — layer 1 is almost always foundation. But it must
|
|
244
|
+
**name the layer that uses it**, and you may not have more than 2 foundation
|
|
245
|
+
layers in a row. A foundation layer with no user gets merged into the layer that
|
|
246
|
+
uses it.
|
|
247
|
+
|
|
248
|
+
If a layer has no purpose you can write in one line, it is not a layer.
|
|
249
|
+
|
|
250
|
+
### Rule 5 — each layer must build and test **alone**
|
|
251
|
+
|
|
252
|
+
A layer must be green on its own base, not only when the whole stack is applied.
|
|
253
|
+
Why: you might merge layer 1 today and layer 2 next week. If layer 1 alone
|
|
254
|
+
breaks the trunk, the stack was a lie.
|
|
255
|
+
|
|
256
|
+
This skill *reasons* about it. `/orc-pr-driver` *proves* it by really running
|
|
257
|
+
build, tests, and lint for each layer.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## 8. The questions it asks you (and why)
|
|
262
|
+
|
|
263
|
+
The skill never guesses a cut line. If it is not sure, it **stops and asks**.
|
|
264
|
+
One question at a time. Every question shows the cost of each option and a
|
|
265
|
+
recommendation.
|
|
266
|
+
|
|
267
|
+
**It does not ask** (it is sure) when:
|
|
268
|
+
|
|
269
|
+
- the files live in clearly different folders (`migrations/` vs `handler/`),
|
|
270
|
+
- it can prove file A is only used by later layers,
|
|
271
|
+
- the change is only a database migration, or only configuration/wiring,
|
|
272
|
+
- the layer is already small and does one kind of work.
|
|
273
|
+
|
|
274
|
+
**It asks** when:
|
|
275
|
+
|
|
276
|
+
- two files do the same kind of work and could be one layer or two (two
|
|
277
|
+
handlers, two providers, two components),
|
|
278
|
+
- a shared helper is used by two layers (put it at the bottom, or duplicate it
|
|
279
|
+
now and clean up later?),
|
|
280
|
+
- a rename/refactor is mixed with a behavior change in the same file,
|
|
281
|
+
- two layers depend on each other in a circle,
|
|
282
|
+
- splitting would make a layer that cannot build alone,
|
|
283
|
+
- the smallest piece is bigger than the size limit,
|
|
284
|
+
- two layers do not depend on each other, so **you** decide which comes first,
|
|
285
|
+
- a feature flag could live in the bottom layer or in the top layer.
|
|
286
|
+
|
|
287
|
+
A real question looks like this:
|
|
288
|
+
|
|
289
|
+
```
|
|
290
|
+
Seam between the refund store and the refund handler.
|
|
291
|
+
|
|
292
|
+
[a] two layers (recommended)
|
|
293
|
+
L2 store 9 files / 640 lines
|
|
294
|
+
L3 handler 8 files / 520 lines
|
|
295
|
+
cost: +1 CI run. Reviewer of L3 sees a store function that already exists.
|
|
296
|
+
|
|
297
|
+
[b] one layer
|
|
298
|
+
17 files / 1160 lines — over the 1000-line limit, needs your approval.
|
|
299
|
+
cost: one review context, but the storage reviewer must read HTTP code too.
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Your answer is written into the plan under `## Decisions`, with your reason.
|
|
303
|
+
That record is why the plan still makes sense next week, or to a colleague.
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## 9. What the plan file looks like
|
|
308
|
+
|
|
309
|
+
Path: `stacked-pr/<slug>/stack-plan.md` — in your project, visible, and meant to
|
|
310
|
+
be committed. It is **not** hidden inside `.claude/`.
|
|
311
|
+
|
|
312
|
+
```markdown
|
|
313
|
+
# Stack plan: refund adapter
|
|
314
|
+
|
|
315
|
+
- ticket: PAY-4211
|
|
316
|
+
- repo: acme/payment_service
|
|
317
|
+
- trunk: main
|
|
318
|
+
- entry mode: orc-run
|
|
319
|
+
- pr template: project:.github/pull_request_template.md
|
|
320
|
+
- totals: 1840 LoC · 31 files · 3 layers
|
|
321
|
+
|
|
322
|
+
## Layers
|
|
323
|
+
| # | branch | purpose | value class | files | LoC | depends on | build-alone? |
|
|
324
|
+
|
|
325
|
+
## Layer 1 — refund schema
|
|
326
|
+
- Purpose: land reversible database changes before any code
|
|
327
|
+
- Value class: FOUNDATION (consumer: layer 2)
|
|
328
|
+
- Files: migrations/0042_refunds.up.sql, migrations/0042_refunds.down.sql
|
|
329
|
+
- Excluded-from-budget files: none
|
|
330
|
+
- Deliberately NOT here: the queries → layer 2
|
|
331
|
+
- Green-gate commands: build … · tests … · lint … --new-from-rev main
|
|
332
|
+
- Gate status: NOT RUN
|
|
333
|
+
- Risk / rollback: the down migration reverts cleanly
|
|
334
|
+
|
|
335
|
+
## Decisions
|
|
336
|
+
<every question you answered, and why>
|
|
337
|
+
|
|
338
|
+
## Accepted exceptions
|
|
339
|
+
<oversize layers you approved, and why>
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
Field meanings:
|
|
343
|
+
|
|
344
|
+
| Field | What it is for |
|
|
345
|
+
|---|---|
|
|
346
|
+
| `ticket` | branch names, PR titles, tracking |
|
|
347
|
+
| `entry mode` | `greenfield` = code not written yet · `orc-run` = code already in your working tree |
|
|
348
|
+
| `pr template` | which template the driver uses for every PR body |
|
|
349
|
+
| `Deliberately NOT here` | stops a reviewer from rejecting a layer for something the next layer fixes |
|
|
350
|
+
| `Gate status` | filled in by the driver: `GREEN`, `RED <step>`, or `NOT RUN` |
|
|
351
|
+
| `Decisions` | your answers — the audit trail |
|
|
352
|
+
|
|
353
|
+
Check the plan at any time:
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
orc pr stack status # exit code 0 = ready, 1 = missing or not filled in
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## 10. When it says "do not stack this"
|
|
362
|
+
|
|
363
|
+
These are normal answers, not failures:
|
|
364
|
+
|
|
365
|
+
| Situation | What happens |
|
|
366
|
+
|---|---|
|
|
367
|
+
| your repo is a fork | stop — GitHub cannot stack across forks; use one normal PR |
|
|
368
|
+
| no `gh` or no `gh-stack` | stop — one normal PR (never build a fake stack by hand) |
|
|
369
|
+
| you have no ticket number | stop — one normal PR |
|
|
370
|
+
| you refuse every PR template | stop — one normal PR |
|
|
371
|
+
| the change needs more than 8 layers | stop — split the work into several stacks, or release in phases |
|
|
372
|
+
| the change is small | you did not need a stack anyway |
|
|
373
|
+
| a PR is already open with all the code | out of scope in this version — ship it as one normal PR |
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## 11. FAQ
|
|
378
|
+
|
|
379
|
+
**Do I have to run `/orc-pr-setup` before `/orc-pr-driver`?**
|
|
380
|
+
No. If you already know your layers, run `orc pr stack template`, fill in the
|
|
381
|
+
file, and start at the driver.
|
|
382
|
+
|
|
383
|
+
**Does this change my code?**
|
|
384
|
+
No. This skill only reads and writes one markdown file. It never runs git
|
|
385
|
+
commands that change anything.
|
|
386
|
+
|
|
387
|
+
**Does ORC always ask me to stack?**
|
|
388
|
+
Only in the full `/orc` and `/orc-ultra` lanes, and only when the change is
|
|
389
|
+
bigger than the limit. `orc-mini` and `orc-fast` never ask. Turn the question
|
|
390
|
+
off completely with `orc config set stacked_pr off`.
|
|
391
|
+
|
|
392
|
+
**Can I stack across two repositories?**
|
|
393
|
+
No. GitHub stacks live in one repository. For a change across repos, use
|
|
394
|
+
`/orc-poly` — it plans one change over several repos.
|
|
395
|
+
|
|
396
|
+
**What if I disagree with a layer after the plan is written?**
|
|
397
|
+
Edit the plan file, or run the skill again. Nothing exists in git yet, so
|
|
398
|
+
changing your mind is free at this point. After the driver runs, changes cost
|
|
399
|
+
force-pushes.
|
|
400
|
+
|
|
401
|
+
**My team squashes commits. Does that work?**
|
|
402
|
+
Yes. `gh stack merge` supports merge, squash, and rebase.
|
|
403
|
+
|
|
404
|
+
**Is the number of layers a score? More is better?**
|
|
405
|
+
No. Each layer costs a full CI run and a review context. Fewer, meaningful
|
|
406
|
+
layers beat many tiny ones.
|
|
407
|
+
|
|
408
|
+
---
|
|
409
|
+
|
|
410
|
+
## 12. What this skill never does
|
|
411
|
+
|
|
412
|
+
- Never creates a branch, commit, push, or PR.
|
|
413
|
+
- Never guesses a cut line — it asks you instead.
|
|
414
|
+
- Never fakes a split of something that cannot be split.
|
|
415
|
+
- Never plans a stack across forks or across repositories.
|
|
416
|
+
- Never edits an already-open pull request into a stack.
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## 13. Next step
|
|
421
|
+
|
|
422
|
+
Read **[ORC-PR-DRIVER README](../orc-pr-driver/README.md)** and run:
|
|
423
|
+
|
|
424
|
+
```
|
|
425
|
+
/orc-pr-driver
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
Reference files for the details (loaded by the skill when needed):
|
|
429
|
+
|
|
430
|
+
| File | Contains |
|
|
431
|
+
|---|---|
|
|
432
|
+
| `references/layer-taxonomy.md` | the full list of layer kinds, per language, and value classes |
|
|
433
|
+
| `references/certainty-gate.md` | the sure/not-sure rules and the "do not talk yourself out of asking" table |
|
|
434
|
+
| `../_shared/stack-plan.md` | the plan format, the size rules, the handoff file |
|
|
435
|
+
| `../_shared/gh-stack-commands.md` | every `gh stack` command, and what to do if GitHub renames one |
|
|
436
|
+
| `../_shared/pr-templates.md` | how a PR description is chosen, plus the three ready-made templates |
|