ワンクリックで
wrap-up
End-of-session cleanup, optional debrief, self-improve, commit, and push in one command.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
End-of-session cleanup, optional debrief, self-improve, commit, and push in one command.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Run the author side of the review loop: request review, poll for feedback, optionally delegate triage or isolated fixes to Codex subagents, address findings, and report progress through inbox plus PR comments.
Run the author side of the review loop — address findings and drive to LGTM. Single-pass by default (exits after sending messages); use --poll for in-session polling. Hybrid split — leader handles Bash I/O, subagent does code fixes only.
Run the reviewer side of the review loop: gather PR context, optionally delegate read-only review analysis to a Codex subagent, write findings packets, and send feedback or LGTM.
Run the reviewer side of the review loop — review PR diffs, produce findings, and evaluate quality gate. Single-pass by default (exits after verdict); use --poll for in-session round 2 polling. Hybrid split — leader handles Bash I/O, subagent does analysis only.
Synthesize org-memory — fold new events into recent.md, promote cross-repo patterns to decisions.md and rules.md, and audit for staleness, cross-file conflicts, and drift. Invoke whenever the user asks "synthesize org-memory", "fold events", "is recent.md stale", "audit org-memory", or any phrasing like "did we synthesize org-memory" — even if they do not explicitly type the slash command.
Synthesize org-memory — fold new events into recent.md, promote cross-repo patterns to decisions.md and rules.md, and audit for staleness, cross-file conflicts, and drift. Invoke whenever the user asks "synthesize org-memory", "fold events", "is recent.md stale", "audit org-memory", or any phrasing like "did we synthesize org-memory" — even if they don't explicitly type the slash command.
| name | wrap-up |
| description | End-of-session cleanup, optional debrief, self-improve, commit, and push in one command. |
Composes end-of-session steps into a single command: cleanup stale artifacts, optional debrief, self-improve (with approval pause), commit, and push.
/wrap-up — full wrap-up sequence/wrap-up --dry-run — run cleanup + debrief + self-improve but skip commit and pushWhen the user runs /wrap-up, execute these steps in strict order:
Scope: merged branches, stale worktrees, processed inbox messages.
git worktree remove <path>git branch -d <branch>git branch -d <branch> fails because the repo uses squash-only merges and the branch tip is not an ancestor of main, keep the branch and report it as a squash-merged local leftover instead of forcing -DList local branches merged into main:
git branch --merged main | command grep -v '^\*\|main'
Delete each with git branch -d <branch> (safe delete only — never -D)
Report: "Deleted N merged branches: list" or "No merged branches to clean"
git worktree prune to clean up missing worktreesgit worktree list.claude/worktrees/:
git worktree remove <path>git branch -d <branch> only when Git reports the branch as merged. Never force-delete a leftover local branch during wrap-up.Resolve project from .oacp marker in repo root:
[ -f ".oacp" ] && python3 -c "import json, sys; print(json.load(open('.oacp'))['project_name'])"
If no marker found, skip inbox cleanup
Inbox dir: $OACP_HOME/projects/<project>/agents/<agent>/inbox/
List YAML files with command ls -1 <dir> | command grep '\.yaml$' (not *.yaml glob — zsh nomatch errors when empty; command ls because ls may be aliased to eza; -1 required — without it, multi-column output breaks grep)
If files exist: report them to the user but do NOT auto-delete (they may be unprocessed)
If inbox is empty: report "Inbox clean"
/debrief skill is installed, invoke it. Otherwise, skip with a one-line note.Write events for the session's significant outcomes to the org-level memory log. This feeds the cross-project knowledge layer that other agents read for org context.
Skip this step if $OACP_HOME/org-memory/events/ does not exist (org-memory not initialized — run oacp org-memory init to set up).
[ -d "$OACP_HOME/org-memory/events" ] && echo "org-memory active" || echo "SKIP"
What to write: Only events that matter to other agents and projects — not routine task completion.
| Write an event for | Type | Example |
|---|---|---|
| PR merged | event | "PR #44 merged: org-level memory spec + CLI" |
| Architecture/design decision | decision | "Standardized on REST for public APIs" |
| New standing rule or convention | rule | "All repos in this org require signed commits" |
| Release or deployment | event | "v0.2.0 published" |
Do NOT write events for: routine code fixes, test additions, doc typos, inbox messages processed, self-improve findings.
How: Use oacp write-event. Auto-detect project from git repo basename. Use the debrief (step 2) as source material if available.
oacp write-event --agent <agent> --project <project> \
--type <decision|event|rule> --slug <short-slug> \
--body "<one-line description>" \
[--related "PR #N,..."] \
[--oacp-dir "$OACP_HOME"]
Slug constraint: lowercase alphanumeric + hyphens only, 1-64 chars, must start and end with alphanumeric. No dots — convert version segments to hyphens (e.g.,
release-0-2-3notrelease-0.2.3).
Keep it lightweight: 3-5 events max per session. If the session was trivial (only reading files, answering questions), write zero events and report "No org-memory events (routine session)."
Report: "Wrote N org-memory events" or "Skipped (org-memory not initialized)" or "No org-memory events (routine session)".
/self-improve skillAfter step 3 completes, run /self-improve self-improve — a targeted review of the self-improve skill itself. This catches issues with the review process that only surface during execution (e.g., missed edge cases, incorrect analysis patterns, user corrections during step 3).
git status to check for uncommitted changesgit add -A or git add .).env, credentials, secrets, settings.jsonwrap-up: <brief summary of changes>--dry-run: show what would be committed but do not commitPush the cross-machine memory snapshot if memory sync is active. Captures new org-memory/events/ entries from step 2b plus any session memory edits.
test -f "$OACP_HOME/.oacp-memory-repo" || { echo "memory sync: not active (skip)"; exit 0; }
oacp memory push
.oacp-memory-repo marker absent — memory sync not initialized on this machine. Run oacp memory init (or oacp memory clone --remote <url> for second+ machines) to opt in.oacp memory push is idempotent: stages allowlisted files (org-memory/**, projects/*/memory/**), commits with memory: <agent>@<host> <date> (N files) format, pushes to origin/main. No-op if no changes.--dry-run: run oacp memory push --dry-run if supported; otherwise skip the push and report what would be staged.Pull-rebase before push to avoid conflicts with parallel runtimes that may have pushed:
git pull --rebase origin <branch>
If rebase fails (merge conflict), abort with git rebase --abort, warn the user, and skip push.
Push current branch to origin: git push origin <branch>
If --dry-run: skip push
Report: branch, commit SHA, remote URL
Print a final status block:
Wrap-up complete:
- Cleanup: N branches, M worktrees pruned, inbox <status>
- Debrief: <status>
- Org-memory: N events written (or "skipped" or "routine session")
- Self-improve: N findings (M applied)
- Commit: <sha> on <branch> (or "no changes")
- OACP memory: <sha> (or "clean" or "skipped (sync not active)" or "skipped (dry-run)")
- Push: <branch> -> origin (or "skipped (dry-run)")
git branch -d, not -D). Unmerged branches are never force-deleted.command grep / command ls / command find in shell commands if your shell aliases these to other tools.OACP_HOME defaults: see oacp doctor for the active path.