checkpoint
Save bounded progress as kernel.checkpoint/v1 for exact resume after reset. Triggers: checkpoint, save progress, context reset, compact soon, long task.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 1.6k
- Forks
- 491
01 前言 Front Matter
- name
- checkpoint
- kernel
- { "kind": "state_transition", "version": 1, "produces": [ "kernel.checkpoint/v1" ], "confirmation": "none", "side_effects": "writes_meta" }
- description
- Save bounded progress as kernel.checkpoint/v1 for exact resume after reset. Triggers: checkpoint, save progress, context reset, compact soon, long task.
- allowed-tools
- Read, Bash, Grep, Glob, Write
- user-invocable
- true
03 SKILL.md 正文
<skill id="checkpoint">
<purpose> The small resumable manifest. A handoff transfers a whole session; a checkpoint records bounded progress INSIDE a long-running task so work can continue after a context reset with a fresh, minimal context instead of an inherited transcript.
When to fire (EXP-L21: attention efficiency decays to ~11% late-session; a reset from a checkpoint restores the flat ~50-70k load-bearing line):
- a long task crosses a natural boundary (a commit lands, a phase completes)
- context is about to compact, or the session is degrading (anchor-drift, I0.13)
- the manifest's execution.checkpoints list says so
Checkpoint vs handoff: same task + same session continuation → checkpoint. Ending the session / transferring to a future session with decisions and policy → handoff. </purpose>
<flow>
-
Gather provenance:
git branch --show-current && git rev-parse HEAD && git status --short -
Write
_meta/checkpoints/{task}-{timestamp}.jsonper schemas/kernel.checkpoint.v1.schema.json:- task: goal + handoff_ref/contract_ref if they exist
- steps_completed: each with EVIDENCE (commit sha, test output, command result), never intent. Receipts describe intent; files describe reality.
- current_outputs: files produced so far
- provenance.dirty_tree_sha256: when dirty, sha256 of
git diff --binary HEAD - pending_steps: what remains, in order
- resume: position (exact place in the work), entrypoint (skill to re-enter), next_operation (the LITERAL first action — "retarget tests/run-tests.sh lines ~1250 registration tests", not "continue the migration")
- context (optional): required selectors + budget if the resume should be bounded
Quote every sha/commit string (all-digit shas parse as integers and fail validation).
-
Validate — MANDATORY:
"${CLAUDE_PLUGIN_ROOT:-.}/orchestration/manifest/kernel-manifest" validate _meta/checkpoints/{file}.json -
Record:
agentdb write-end '{"skill":"checkpoint","saved_to":"_meta/checkpoints/{file}.json","position":"..."}'
Resume path: /kernel:ingest discovers the newest manifest automatically
(kernel-manifest latest — checkpoints and handoffs share discovery), or accepts an
explicit path.
</flow>
<hard_stops>
- steps_completed without evidence → not a checkpoint, a hope. Add evidence or move the step to pending_steps.
- unvalidated json → does not exist. Validate before reporting done. </hard_stops>
</skill>
04 同仓库更多 Skills
worktable-review-with-annotations
Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.
worktable-find-and-synthesize-context
Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.
worktable-create-or-update-docs
Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.
worktable-create-or-manage-records
Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.
worktable-create-or-manage-interactive-html
Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.
worktable-collaborate-threads
Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.