원클릭으로
compact-prepare
Mid-session compact prep — force-commit the handoff, flush coord work, write continuation-framed handoff, direct to /compact.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Mid-session compact prep — force-commit the handoff, flush coord work, write continuation-framed handoff, direct to /compact.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Captain-only. Quality-check, commit, push, create PR, and cut a release in one flow. The "code is ready" command for captain-owned branches. Every PR is a release. Formerly `/release` — v2 rename to captain-actor-verb.
Captain-only. Fetch, merge origin into master, merge unique worktree work into master, and sync all worktrees. The daily rhythm command. NEVER pushes to remote. NEVER rebases. NEVER resets to origin. Formerly `/sync-all` — v2 rename to captain-actor-verb.
Post-compact pickup — read continuation handoff, verify state (tree clean, monitors alive, dispatch drift), resume next-action.
Run the quality gate after completing an iteration — review, fix, test, report, auto-commit. No principal approval needed (iteration boundary is auto-approved). Auto-emits a structured dispatch to captain so the small-batch-cadence daemon can pick up for PR landing.
Run the full deep quality gate after completing an implementation phase — review, fix, test, report, squash-commit. Principal approval REQUIRED before commit (phase boundary is NOT auto-approved). Auto-emits phase-complete dispatch to captain for PR landing.
Captain-only. Land an agent's prepared branch — switch, verify receipt, bump agency_version, create PR, watch CI, merge, release, notify agent. The single-writer serialization point for agency_version and PR creation. Companion to /pr-submit (the-agency#296 Phase 1 pilot). The `captain-` qualifier in the name signals scope at a glance (complements `paths: []` scoping and the Step-1 runtime precondition).
| name | compact-prepare |
| description | Mid-session compact prep — force-commit the handoff, flush coord work, write continuation-framed handoff, direct to /compact. |
| agency-skill-version | 2 |
| when_to_use | Context window is filling and you want to keep working after /compact. Runs the PAUSE primitive in continuation framing, writes a handoff the post-compact session will pick up. |
| paths | [] |
| required_reading | ["agency/REFERENCE/REFERENCE-HANDOFF-SPEC.md","agency/REFERENCE/REFERENCE-SKILL-CONVENTIONS.md"] |
| argument-hint | [reason] |
Claude Code's /compact summarizes the conversation to free context, but a summary is lossy. The guarantee "I'll remember what I was doing after compact" holds only if a disciplined handoff is written BEFORE compact. This skill is that discipline for mid-session compaction — you commit current coord work, write a continuation-framed handoff, then run /compact.
Framework: this is the PAUSE-for-compact surface. It shells to agency/tools/session-pause --framing continuation. Paired with /compact-resume on the other side.
agency/REFERENCE/REFERENCE-HANDOFF-SPEC.md — handoff frontmatter shape, mode: enum (continuation for this skill)agency/REFERENCE/REFERENCE-SKILL-CONVENTIONS.md — primitive-composition pattern (skills shell to bash tools per agency#348)/compact-prepare
/compact-prepare "context heavy — deep investigation paused"
/compact-prepare "mid-iteration refresh before QG"
[reason] (optional): short label for telemetry + handoff frontmatter. Defaults to compact-prepare.
After this skill reports clean state + handoff written, run /compact next. The skill does not invoke /compact — you do.
/compact. If you don't, use /session-end instead.Idempotent: safe to run multiple times. Archives and re-writes each time.
./agency/tools/session-pause --framing continuation --trigger "${REASON:-compact-prepare}"
The primitive (v1.2.0+) force-commits the handoff in its own commit if the tree has non-coord framework files dirty — so the handoff is durable even when the overall PAUSE aborts on framework-code gate. Parse the emitted key=value output:
schema_version, tool_version — output contract versions.handoff_path — path to the new empty handoff you must author in Step 2.archived_previous_handoff — archive path of the prior handoff (or none).commit_sha — coord checkpoint commit (or none if tree was clean).handoff_commit_sha — force-commit SHA when the tool force-committed the handoff alone (abort path); none on the happy path.framing=continuation — confirms the tool read the flag correctly.status — ok or aborted.If status=aborted AND handoff_commit_sha is non-none, the handoff was persisted but framework code is dirty — surface error_reason (which includes the handoff SHA) and stop. Run /quality-gate + /iteration-complete on the framework code, then re-run /compact-prepare.
If status=aborted AND handoff_commit_sha=none, the PAUSE aborted before any commit — surface error_reason and stop. Do NOT author a handoff on an aborted PAUSE.
Write the handoff file at handoff_path. Use the standard handoff template with:
type: sessionagent: <org>/<principal>/<agent> (from agent-identity)date: <UTC timestamp>trigger: compact-preparebranch: <current branch>mode: continuation — REQUIRED. Tells /compact-resume this is mid-session.next-action: — the SINGLE most important thing to do immediately after /compact. Not a backlog; the very next step.pause_commit_sha: <commit_sha from Step 2> — lets /compact-resume compute dispatch drift deterministically.Body:
next-action, elaborated).Frame for continuation, not resumption. The agent keeps working after compact — doesn't start fresh.
./agency/tools/handoff read
Confirm the handoff was written correctly and next-action is clear.
Report to the user:
./agency/tools/git-safe branch --show-current./agency/tools/git-safe log --oneline -1Then the directive:
Run
/compactnow.
handoff_commit_sha) — the handoff is safe. Run /quality-gate + /iteration-complete on the framework code, then re-run /compact-prepare./compact itself./compact. It prepares; the user runs compact. Intentional — the skill must never surprise-compact.session-pause; run QG before re-trying./sync or /release.active (v2, shipped session-lifecycle-refactor Phase 3 Iteration 3.1). Paired with /compact-resume, /session-end, /session-resume.
/compact-resume — PICKUP companion (post-compact)./session-end — end-of-session PAUSE (resumption framing)./session-resume — fresh-session PICKUP.agency/tools/session-pause — primitive this skill shells to.agency/tools/handoff — handoff read/write tool.the-agency#355 — upstream tracker for handoff force-commit landing in the primitive (when that lands, Step 1 is retired per Plan HG-7).OFFENDERS WILL BE FED TO THE — CUTE — ATTACK KITTENS!