From hypo
Closes a session by capturing what happened into the wiki and consolidates scattered notes into stable synthesis pages on request.
How this skill is triggered — by the user, by Claude, or both
Slash command
/hypo:crystallizeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are running `/hypo:crystallize`. The command serves two modes (spec §5.2.7 / §8.3):
You are running /hypo:crystallize. The command serves two modes (spec §5.2.7 / §8.3):
/compact can pass.When invoked to close a session — via an explicit close signal ("세션 종료", "wrap up"), an accepted proactive-offer [세션 마무리], or /compact — run the session-close checklist first. Task completion alone does not put you in close mode. The synthesis scan only runs after close is confirmed and the user agrees.
/hypo:crystallize in --apply-session-close --payload=<path> mode — which runs the lint gate automatically, scoped to the files it writes (debt elsewhere is a non-blocking notice). --check-session-close is a read-only dry-run of the full PreCompact gate: close files + scoped lint + design-history + feedback projection, sharing one function (precompactGateStatus) with the gate. A green check means no gate blocker needs a human fix, so it is the signal to declare the session closed (pass --transcript-path to widen the lint scope to this session's edited files exactly as the interactive hook does). It is not a hard guarantee: the live /compact can still differ on a context-≥70% prompt, HYPO_SKIP_GATE, or a transcript-scoped lint error the check did not see.[[wikilinks]]), and draft / stub pages, then guides consolidation into pages/syntheses/<topic>.md with back-links and index.md updates.Bundled scripts here run via ${CLAUDE_PLUGIN_ROOT}/scripts/. To resolve that package root: if ${CLAUDE_PLUGIN_ROOT} is already an absolute path, use it; otherwise read pkgRoot from ~/.claude/hypo-pkg.json (only when non-empty and the target script exists under it); otherwise use the hypo@hypomnema (or legacy hypomnema@hypomnema) installPath in ~/.claude/plugins/installed_plugins.json; if none resolve, stop and tell the user to run hypomnema upgrade --apply or reinstall instead of guessing the cache layout.
If the user specified a wiki directory, pass it as --wiki-dir="<path>". Otherwise omit the flag and the script resolves the wiki root automatically via HYPO_DIR → hypo-config.md scan → ~/hypomnema.
node ${CLAUDE_PLUGIN_ROOT}/scripts/crystallize.mjs \
[--wiki-dir="<path>"] \
[--min-group=<n>] \
[--json]
Options:
--min-group=<n> — minimum pages per tag group to report (default: 2)--json — output results as JSONShow the output verbatim.
If /hypo:crystallize was invoked as a session-close action, run through this checklist before synthesizing. The mechanical checklist items (1–6 below) proceed automatically without confirmation unless the user has not said "auto"; the advisory reflections that precede them (#41~#44) always surface to the user for confirmation — they are recommendations, never auto-actions.
Surface each of these four to the user first. Every one is advisory (identity guard): the user confirms or declines, and none performs an automatic action, writes a file on its own, or bypasses the mandatory gate.
--mark-session-closed, and must not claim /compact can pass. Any real close still requires all 5 mandatory files.ADR 없음 — <one-line reason> in that same session-log entry — but gate it on #42's bar, not this one: the marker is machine-read and W8 treats a session-log entry carrying ADR 없음 (and no ADR reference) as a no-design session, excluding it from the design-history staleness check. So write ADR 없음 only when the session had no design change at all. If it had a sub-ADR design shift (background / tradeoff / differentiation), append to design-history (#42a) instead — writing the marker there would suppress the W8 nudge that shift needs. Never auto-write an ADR file — the session-log note is the only action here.projects/<name>/design-history.md does not yet reflect — including background / tradeoff / differentiation shifts that are below ADR level but still belong in the ledger — recommend appending to it now (W8 flags this mechanically; an active-project W8 hard-blocks at PreCompact — append before you commit, not after the gate fires). (b) only if this session made no design change at all does the ADR 없음 marker from #41 exempt the entry from W8 — do not touch design-history. Caution: ADR 없음 means "no design change," which is a stricter bar than "no ADR-level decision." A session with a sub-ADR design shift should take branch (a) and append; writing ADR 없음 there would suppress the W8 nudge it actually needs. If the file does not exist, skip silently — do not create it just for this check. Never auto-update it./hypo:ingest to capture it under sources/. Proceed only on the user's confirmation.When uncertain, surface the question rather than skip it. None of the four blocks the close or writes on its own.
projects/<name>/session-state.md with the next tasks list (what to tackle first next time).projects/<name>/hot.md with a session snapshot: what changed and decisions made. Keep under 500 words. Do not put next-step tasks here; those belong in session-state.md.<wiki-root>/hot.md active-projects pointer table: set the Last Session date for this project to today.projects/<name>/session-log/YYYY-MM-DD.md (daily shard; the apply path creates today's file with seeded frontmatter if it does not exist yet).pages/open-questions.md exists and questions were raised or resolved this session: move resolved ones out; add newly raised ones. Skip if unchanged.Do not hand-write the root
log.mdsession entry, and do not put alogfield in the apply payload. The## [date] session | <project>entry is a derivable artifact:--apply-session-closecallsderiveRootLogEntriesafter writing the session-log, reconstructing the canonical line from the session-log heading. (Supplylogonly for a deliberately custom line; it is now an optional payload field.)
After completing the checklist, verify it before reporting:
node ${CLAUDE_PLUGIN_ROOT}/scripts/crystallize.mjs --check-session-close [--hypo-dir="<path>"]
This runs the full PreCompact gate via the shared precompactGateStatus:
close files (missing / stale) plus lint blockers, stale
design-history, and feedback projection over-cap/conflict. Fix every ✗ it
reports and re-run until it prints "Compact-ready" — that is the signal the
session is closed. A close-files-only pass is not enough; the real /compact
also blocks on those other checks.
Optional --project=<slug> narrows the check to ONE project (close status plus
lint scope). It is a project-scoped diagnostic, not the compact-ready
signal. A green --project result (JSON scope: "project") means only that
project is close-complete; another today-active project can still block
/compact. Use the plain --check-session-close (no --project) for the
go/no-go close signal.
When using --apply-session-close --session-id=<id> (the payload-driven
path), the --session-id must be the main conversation's session id. Do NOT
extract it from a background task or Agent output path (e.g., a UUID from
/tmp/.../<uuid>/tasks/...). Such a UUID is a background task id, not the
main conversation id. Passing the wrong id causes markerWritten: false with
markerSkipReason: "transcript-unresolved" or "no-user-close-signal": the
5 mandatory files are written (ok: true) but the Stop-chain marker is withheld,
so the session is not actually closed and the Stop hook re-prompts. The correct
id comes from the [WIKI_AUTOCLOSE] block reason or $CLAUDE_SESSION_ID.
Once it passes, report each item with ✓:
--apply-session-close --session-id was used): check markerWritten in the JSON output. If true, report "session-close marker written." If false, do NOT declare the session closed or complete. Instead report: "Files applied and verified (ok: true), but the session-close marker was not written (reason: <markerSkipReason>). The Stop-chain is still active. Re-run with the correct main-conversation --session-id."If markerWritten: true (or --session-id was not passed), ask: "Session closed. Would you like to also run knowledge synthesis now, or stop here?"
If markerWritten: false, do NOT say "session closed." Surface the skip reason and instruct a re-run with the correct main-conversation --session-id (see the bullet above) before treating the session as closed.
Present the top candidates from the script output:
status: draftAsk: "Which of these would you like to crystallize now? (or 'all' / 'skip')"
For the chosen target:
pages/syntheses/<slug>.md with:---
title: <synthesis title>
type: synthesis
tags: [<shared tags>]
updated: <today YYYY-MM-DD>
evidence_strength: inferred
---
[[wikilink]].index.md under ## Pages — Syntheses.Citation convention. When you reference a wiki page in your response, link it as
[[page-slug]]. The observability audit counts citations toward the autonomy score — see [[pages/observability/_index]] (run/hypo:auditto inspect).
npx claudepluginhub sk-lim19f/hypomnema --plugin hypoCloses a Memex session cleanly: updates status.md, appends to session-log, refreshes hubs and touched _CLOSETS.md, verifies wikilinks. Run on session timeout or before a long break.
Closes a work session by scanning git activity, surfacing changes, and offering checkpoint saves with deep analysis. Use for end-of-day, research batch, or decision sprint wrap-ups.
Closes out a session cleanly by reviewing work, updating project tracking files, committing changes, and capturing session knowledge. Use when a task is complete with no passoff needed.