원클릭으로
wrap-up
Summarize this memhub session, route updates into the database, then re-render PROJECT.md and PROJECT_LEDGER.md
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Summarize this memhub session, route updates into the database, then re-render PROJECT.md and PROJECT_LEDGER.md
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | wrap-up |
| description | Summarize this memhub session, route updates into the database, then re-render PROJECT.md and PROJECT_LEDGER.md |
| framework | memhub |
| framework_version | 1.0.0 |
| last_updated | "2026-07-14T00:00:00.000Z" |
Wrap up the current session against the memhub repo. Memhub's SQLite
database is the source of truth; the rendered markdown files
(.memhub/rendered/PROJECT.md and
.memhub/rendered/PROJECT_LEDGER.md by default) are local output of
memhub render, not a parallel narrative. Your job is to draft
updates, get approval per item, write to the DB, then re-render.
This is the Codex counterpart to the Claude Code /wrap-up skill.
Both invoke the same memhub CLI against the same .memhub/project.sqlite;
they differ only in the agent identifier passed via --actor and
--source. Writes from this skill are attributed as
agent:codex / codex:wrap-up.
It is a thin executor (Q10, issue #99): the step-by-step policy —
detection, read window, draft assembly, approval gate — is rendered
from one canonical source in the binary by memhub wrapup-policy, not
duplicated here. What follows is (1) the pre-flight this skill needs
before it can even run that command, (2) a handful of repo-specific
additions the generic policy text doesn't know about yet, and (3) the
concrete, Codex-attributed DB-write sequence.
Run this once, before anything else — it only covers what has to be
true before memhub wrapup-policy can even run; schema currency is
checked as part of the policy text itself, not here.
.memhub/ exists in the repo root.
test -d .memhub && echo present || echo absentif (Test-Path .memhub -PathType Container) { "present" } else { "absent" }
absent → stop. Tell the user: "No .memhub/ in this repo. Run
memhub init (or /init-project) first." Do not proceed.memhub is on PATH.
command -v memhub >/dev/null 2>&1 && echo present || echo absentif (Get-Command memhub -ErrorAction SilentlyContinue) { "present" } else { "absent" }
absent → stop. Tell the user to put memhub on PATH, then
re-run.Run whichever variant matches the current shell — there is no bash or
WSL dependency here, this preflight must work on native Windows.
Use the exact syntax shown for each command. Every mutating CLI command
below that exposes --actor passes --actor codex:wrap-up so
writes_log distinguishes wrap-up writes from raw CLI use. Read-only
commands omit it, and any other exception is called out beside that
command. Fact and decision adds also pass --source user+agent:codex
so the durable rows preserve both the user-approval signal and the
mediating agent.
Run memhub wrapup-policy (human-readable) or
memhub wrapup-policy --json (the wrapped
{"wrapup_policy": {"verbosity": ..., "instructions": "..."}} form —
no --actor, it's read-only and never opens the DB). It renders this
repo's full wrap-up policy — the schema-currency check, the read
window, the draft-assembly items for this repo's [wrap_up] verbosity
(.memhub/config.toml; minimal / standard / full /
transcript), and the approval-gate rule — from one source. Follow
the returned instructions text for all of that. It supersedes
anything you remember from a previous session or a different repo,
since both the level and the text can differ.
The policy text is agent-agnostic and, as of this build, doesn't yet
know about a few newer surfaces. Layer these on top of what it says —
they refine its draft assembly, they don't replace it. They apply
wherever the policy actually drafts decisions/facts at all — at
minimal it drafts neither (state + task closures only), so none of
these apply there either:
--summary — a natural-language
paraphrase of the title. On memhub's own golden set this lifted
Recall@3 on jargon-titled decisions from 76.5% to 100%; the policy
text calls it mandatory at full/transcript verbosity, but draft
one regardless of level — it's cheap and it's what actually moves
the number. Facts have no --summary field; don't add one there.memhub command verify instead (DB
writes, below). This is go-forward only: do not backfill existing
command-shaped facts into the commands table.memhub doc add <path> item alongside the others./global: one bad global write pollutes every repo on the machine.Non-negotiable at every verbosity level. Show all drafts in one block, grouped by kind. The user approves, edits, or rejects each item individually — wait for explicit approval per item, or a clear "all good", before writing anything. A rejected draft is dropped; do not retry without their saying so.
This numbered list is not a second, competing policy — it's the
concrete command mechanics for executing whatever the policy text
(above) and the approved drafts actually called for; skip any step
nothing was drafted for. Once approved, invoke each write in this
order. Every command takes --json --actor codex:wrap-up so the
response is parseable and the audit row is correctly attributed. Fact
and decision adds also pass --source user+agent:codex so the durable
source column records both the user approval and the mediating
agent.
# 1. State (only if changed)
memhub state set "<approved body>" --json --actor codex:wrap-up
# 2. Pending-write promotions / rejections (also where any global
# proposal from step 3 becomes durable, once the user has confirmed it)
memhub review accept <id> --json --actor codex:wrap-up
memhub review reject <id> --reason "<reason>" --json --actor codex:wrap-up
# 3. New decisions (repo-scoped) -- always draft --summary (decision 72)
memhub decision add "<title>" --rationale "<rationale>" --summary "<summary>" --source user+agent:codex --json --actor codex:wrap-up
# 4. New tasks + closures
memhub task add "<title>" --notes "<notes>" --json --actor codex:wrap-up
memhub task done <id> --json --actor codex:wrap-up
# 5. New facts (repo-scoped; --kind optional: gotcha | env | preference | command | constraint)
memhub fact add "<key>" "<value>" [--kind <kind>] --source user+agent:codex --json --actor codex:wrap-up
# 6. Verified commands (Q11 -- not facts; no --json/--actor on this one)
memhub command verify <build|test|run|lint|other> "<cmdline>" --exit-code <n>
# 7. New or revised reference docs (repo-scoped)
memhub doc add "<path>" [--title "<title>"] --json --actor codex:wrap-up
# 8. Session summary (always, unless the user rejected it; length
# follows the resolved verbosity level -- standard's two-to-four
# sentences, or full/transcript's richer account)
memhub note add "<summary>" --json --actor codex:wrap-up
# 9. Architecture (only if approved this session)
memhub arch set "<approved body>" --json --actor codex:wrap-up
# 10. Stale-fact re-verifications -- one invocation per approved fact,
# never a bulk "verify all" pass
memhub fact verify <id> --json --actor codex:wrap-up
For multi-line state or arch bodies, write the body to a temp file and
pass --from-file <path> instead of inlining.
Halt on first non-zero exit. Do not retry, do not skip, do not
proceed to render. Tell the user which command failed and what stderr
said. The writes that succeeded are durable in writes_log and the
target tables — they can fix the cause and re-run /wrap-up to pick
up the rest.
For any fact or decision the user explicitly flagged as global during
approval, do not run its repo-scoped line above. An agent never
writes --global directly (same rule as /global) — stage it
instead, and let step 2 above accept it once the user has confirmed:
memhub.propose_fact(key=..., value=..., rationale=..., kind=..., global=true)
memhub.propose_decision(title=..., rationale=..., global=true)
This lands in this repo's pending_writes tagged target:"global"
and becomes durable in ~/.memhub/global.sqlite only via
memhub review accept <id> (step 2), and only while this repo still
has memhub global enabled. propose_decision has no --summary
field yet — if a global decision had one approved, backfill it after
acceptance: memhub decision set-summary <id> "<summary>" --json --actor codex:wrap-up.
Docs have no agent-mediated global path at all — there is no global
parameter on memhub.doc_add. If the user wants a doc promoted to
global, tell them to run memhub doc add <path> --global (or
/global) themselves; you keep ingesting it repo-scoped as in step 7.
Once every approved write above succeeds, pick the policy text back up
for Render and Cross-machine sync — run
memhub render --actor codex:wrap-up, then the sync steps if this repo
has sync enabled, exactly as it describes them. If render fails, stop
before sync. When all approved DB writes already succeeded, resume at
render after fixing the cause; do not repeat draft assembly or the
durable writes. The policy also covers the closing reminder (audit
trail, rendered files aren't a commit, start a new session anytime) —
including that you never run git commit, which holds regardless
of verbosity level; that's the user's call.
project_state.created_at). No
explicit memhub session command exists, by design.docs/reference/memhub-prd-source-vocabulary-addendum.md if a
question arises about which value to pass..memhub/.
In a repo without .memhub/, Detection stops here.Read-only health check of the memhub project in this repo — schema version, render freshness, write-log activity
Bootstrap memhub in this repo — initialize the SQLite store, seed starter state and architecture narratives, render PROJECT.md and PROJECT_LEDGER.md
Initialize memhub for a repo in OpenCode; use when the user asks to bootstrap project memory.
Rebuild + install memhub and bring every memhub instance on this machine (each known repo DB + the machine-global store) to head schema, resync installed agent skill wrappers, with a one-time fix for the ~/.local/bin PATH shadow. Run from the memhub source repo.
Wrap up an OpenCode memhub session; run the binary-rendered policy, draft updates, get per-item approval, write, and render.
Run memhub's read-only CLAUDE.md/AGENTS.md drift-and-bloat audit (`memhub audit md`) and interpret the findings — size, generated-file drift, managed-block version, keystone phrases, opt-in user-global size — recommending concrete fixes without rewriting anything itself. Trigger on: "audit CLAUDE.md", "check for CLAUDE.md drift", "is CLAUDE.md bloated", "run the md audit", "/audit-md".