一键导入
session-end
Clean session teardown — commit all work, write a resumption-framed handoff, stop monitors, report readiness. Leaves a clean working tree. No asking.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Clean session teardown — commit all work, write a resumption-framed handoff, stop monitors, report readiness. Leaves a clean working tree. No asking.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
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.
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.
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).
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. Review all draft PRs (or a specified PR / project) and generate per-workstream dispatch files routing findings to worktree agents. Formerly `/captain-review` v1 — v2 migration preserves semantics.
Captain-only. Merge a PR safely — true merge commit (never squash, never rebase), branch protection respected, --principal-approved gate for --admin override. Prevents the "accidentally squashed via the wide GitHub UI button" failure mode that has burned the fleet.
| name | session-end |
| description | Clean session teardown — commit all work, write a resumption-framed handoff, stop monitors, report readiness. Leaves a clean working tree. No asking. |
| agency-skill-version | 2 |
| when_to_use | End of a working session, switching to a different workstream or repo, or any point where the session will not be resumed in continuation. Anti-triggers: do NOT use mid-sprint when you plan to keep working after /compact (use /compact-prepare — it writes a continuation-framed handoff). Do NOT use for captain fleet-wide shutdown (there is no such skill — each worktree session ends independently). |
| argument-hint | [trigger-reason] |
| paths | [] |
| required_reading | ["agency/REFERENCE/REFERENCE-HANDOFF-SPEC.md","agency/REFERENCE/REFERENCE-SKILL-CONVENTIONS.md"] |
The next session starts from the handoff. A session that ends with a dirty tree, unsent dispatches, or a stale handoff leaves the next agent reverse-engineering what was in flight. This skill forces the three end-of-session preconditions and shells to agency/tools/session-pause --framing resumption for the mechanics — commit, archive, stop monitors, emit new handoff path.
PAUSE-for-end surface. Paired with /session-resume on the other side.
agency/REFERENCE/REFERENCE-HANDOFF-SPEC.md — handoff frontmatter, mode: resumption enum value.agency/REFERENCE/REFERENCE-SKILL-CONVENTIONS.md — primitive-composition pattern./session-end
/session-end "end-of-day"
/session-end "switching-context"
[trigger-reason] (optional): short tag for telemetry + handoff frontmatter. Defaults to session-end.
/compact-prepare.Idempotent: safe to run multiple times. Archives + re-writes each run.
./agency/tools/session-pause --framing resumption --trigger "${REASON:-session-end}"
--framing resumption tells the tool: stop monitors (registry-driven SIGTERM), fire SessionEnd hooks naturally on process exit, archive prior handoff, emit new path. If framework code is dirty, the tool force-commits the handoff alone first (handoff_commit_sha set), then aborts on the framework-code gate. Handoff is always persisted.
Parse the emitted key=value output. Key fields: handoff_path, archived_previous_handoff, commit_sha, handoff_commit_sha, status.
On status=aborted, surface error_reason. If handoff_commit_sha is non-none the handoff is safe — run /quality-gate + /iteration-complete on the framework code and re-run /session-end.
Write the handoff file at handoff_path. Frontmatter:
type: sessionagent: <org>/<principal>/<agent>date: <UTC>trigger: session-endbranch: <current>mode: resumption — REQUIRED. Tells /session-resume this is a fresh-session pickup.next-action: — the concrete first step of the next session. Not a backlog.Body: phase/iteration status, what was done, what's next, decisions/context the next session needs, open blockers. Frame for resumption — a future session will read this after a break.
./agency/tools/handoff read
Report: branch, last commit, handoff_path, "Handoff: written ✓", then:
Safe to
/compactand/or/exit.
/quality-gate + /iteration-complete, then re-run /session-end./exit or /compact. It prepares; the user exits./sync or /release.active (v2 refactored in session-lifecycle-refactor Phase 3 Iteration 3.3 — body collapsed from ~145 lines to ~60, now shells to session-pause). Paired with /session-resume, /compact-prepare.
/session-resume — fresh-session PICKUP (opposite bookend)./compact-prepare — mid-session PAUSE (continuation framing)./compact-resume — post-compact PICKUP.agency/tools/session-pause — primitive this skill shells to.agency/tools/handoff — handoff read/write tool.OFFENDERS WILL BE FED TO THE — CUTE — ATTACK KITTENS!
基于 SOC 职业分类