emperor-forge
Ship software: finish menu (merge locally / PR / keep), then public PR with consent when chosen. Use when tests pass, implementation is complete, user says finish, ship, PR, merge, or open a pull requ
SKILL.mdskills/emperor-forge/SKILL.md
GitHubEmperor Forge — the software leaves the machine
Code that sits on a branch is not software. Software is merged or offered as a PR the client can merge without babysitting comments.
Before forge: finish menu
When implementation is complete (G4 PASS, suite green on this tree), do not
jump straight to a PR. Open finish-menu.md and/or run
scripts/emperor finish --require-green <task-dir> (HARD-GATE: refuses menu
without green DONE probes / eval):
- Fresh suite on this tree (quote the tail;
--require-greenor stop). - Detect normal repo vs linked worktree vs detached HEAD.
- Present the exact menu (3 options, or 2 if detached). Wait.
- Execute the choice:
- Merge locally → merge into confirmed base, re-verify, cleanup owned worktree.
- Pull Request → continue with forge steps below (consent still required).
- Keep as-is → report path; stop.
- Discard only if the client asks and types
discard. Never offer it unprompted.
Forge (option 2 — Push and create a Pull Request)
scripts/emperor done <task-dir>must exit 0. Quote the tail.scripts/emperor gate g5 <task-dir>must exit 0 (callsverdict.py— deliverable Verdict with citations; no empty/theater Breach Register rows). Or runscripts/emperor verdict <task-dir>first. Doctrine:chains/judgment-chain/verdicts-and-breaches.md.- Consent HARD-GATE: ledger must contain a quoted client yes or
EMPEROR_CONSENT_PR=1. Otherwise stop and ask. Mechanical peers:scripts/emperor forge --reject-no-pr-consent(always fail) /scripts/emperor forge --check-pr-consent <task-dir>(vacuous PASS when no forge/PR activity). Steal enlistment--reject-no-consentis a different gate. - Run
scripts/emperor forge <task-dir>(Python corescripts/lib/forge.py; thinforge.sh/forge.ps1). G5 also calls--check-pr-consent. - PR body is generated from G1 + DONE probes + out-of-scope. No essay.
- After the URL is printed, keep the worktree for review feedback, then
scripts/emperor queue nextwhen the client is done with this task.
If gh is missing: print the exact commands for the client. Do not pretend
the PR exists.