Captures session state across planning horizons, evaluates surprise, propagates context downstream, and produces a handoff narrative for the next session to self-direct.
Ships in beads-issue-tracking-and-session-workflow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Invoke by name: session-checkpoint
Session wind-down protocol that captures state across all planning horizons, evaluates accumulated surprise, propagates discoveries to downstream issues, assesses documentation impact, and produces a self-contained handoff narrative sufficient for the next session to self-direct via session-orient.
This skill operates across all horizons simultaneously: it updates operational state (signal tables, checkpoint context), evaluates tactical feedback (surprise accumulation, replanning thresholds), and captures strategic observations (documentation impact, Cynefin reclassification).
This is the default session wind-down command for repositories with the full stigmergic workflow installed.
For repositories without the full workflow (no session-layer skills, small utility repos, quick fixes), this skill named a direct issues-beads-checkpoint fallback; that skill has been retired and the fallback awaits re-basing onto Linear/OpenSpec.
This skill is one component of a lifecycle that co-optimizes planning time against execution time. The underlying model: planning depth has an optimal finite value where marginal yield from one additional planned step equals marginal accuracy loss and planning cost. This optimum decreases as agent execution capacity increases — more agents demand shallower, faster planning cycles to avoid starving them on stale plans. Model Predictive Control provides the structural answer: plan over a finite prediction horizon, commit only to a shorter control horizon of items dispatched to agents, then re-observe actual codebase state and replan from scratch. Cynefin domain classification makes planning depth per-item rather than global: clear-domain work (known patterns) is planned far ahead at low cost, while complex-domain work (emergent behavior) is planned only as probes whose outcomes inform the next cycle. The Viable System Model maps this to an organizational lifecycle where each session skill implements a specific regulatory function: System 4 (orient), System 3 (plan), System 1 (implement), System 3* (review), System 5 (checkpoint). Stigmergic coordination binds it together — agents orient by reading structured signal tables on the issue DAG rather than receiving centralized briefings, achieving near-optimal throughput via local sensing and acting. Queue economics calibrates the pipeline: buffer sizing via Little's Law, agent utilization at 70-85% (not 100%, due to queueing instability), and batch sizing via the U-curve between planning overhead and plan staleness.
This skill operates across all VSM systems simultaneously: capturing operational state (signal tables, checkpoint context), evaluating tactical feedback (surprise accumulation against the replanning threshold theta), and recording strategic observations (Cynefin reclassifications, documentation impact assessments).
It produces the handoff narrative that enables the next session to self-direct via session-orient, completing the MPC receding-horizon cycle.
The quality of the handoff directly determines the next session's planning accuracy — a poor checkpoint degrades the entire pipeline.
This skill operates under the reflexive severity mandate: when patterns suggest the framework itself is producing poor outcomes, the agent's obligation is to pause and surface the observation rather than pressing on.
See the double-loop learning triggers in preferences-validation-assurance and the reflexive severity framework in preferences-adaptive-planning.
For the full theoretical derivation including the R_plan(d) formulation, buffer sizing heuristic, and validation gate placement theory, see preferences-adaptive-planning.
This skill orchestrates a higher-level protocol that uses the following skills as components. Do not duplicate their functionality; delegate to them.
issues-beads-checkpoint (retired, pending re-base onto Linear/OpenSpec) provided the per-issue signal table update, checkpoint-context write, escalation handling, proactive pheromone propagation, buffer depletion checks, graph health verification, and beads commit; per-issue checkpoint mechanics await re-implementation via that re-base.issues-beads-evolve (retired, pending re-base onto Linear/OpenSpec) provided graph restructuring when checkpoint reveals structural issues (splitting, merging, re-parenting, dependency rewiring); graph restructuring when step 2 or step 5 reveals the need awaits re-implementation via that re-base.stigmergic-convention provides the signal table schema, field definitions, read-modify-write protocol, and checkpoint-context format.
Reference this skill for signal table semantics; do not redefine them here.issues-beads-prime (retired, pending re-base onto Linear/OpenSpec) previously provided core beads conventions and a command quick reference to load before running checkpoint commands.
Execute the following nine steps in order.
Steps 1 through 4 operate per-issue; they previously delegated to issues-beads-checkpoint, now retired and pending re-base onto Linear/OpenSpec, and describe the mechanics directly until then.
Steps 5 through 9 operate at session level, synthesizing across all touched issues.
Assemble the complete set of issues that participated in this session. An issue counts as "touched" if any of the following occurred:
# Cross-reference with issues known to have been worked
bd show <id> --json | jq '.[0] | {id, title, status}'
The enumeration serves as the scope for steps 2 through 4. Every issue in this set receives a signal table update and checkpoint-context write.
For each touched issue, the signal table update previously delegated to issues-beads-checkpoint steps 1-2, now retired and pending re-base onto Linear/OpenSpec; apply the assessments below directly.
For each issue, assess and update:
Surprise based on plan-versus-reality divergence.
Use this calibration scale, previously documented in the retired issues-beads-checkpoint skill (pending re-base onto Linear/OpenSpec): 0.0 for no deviation, 0.1-0.3 for minor deviations, 0.4-0.6 for moderate divergence, 0.7-0.9 for major divergence, 1.0 for complete divergence.
Be honest in this assessment; it is the primary metric for downstream calibration and replanning triggers.
Progress to reflect current state: exploring, implementing, verifying, or blocked. Do not leave progress at not-started for any issue that received work.
Cynefin reclassification if the implementation experience revealed a different domain than originally assessed.
When cynefin changes, re-derive planning-depth using the default mapping (clear to shallow, complicated to standard, complex to deep, chaotic to probe).
Upward complexity shifts trigger the notification protocol previously defined in issues-beads-checkpoint, now retired and pending re-base onto Linear/OpenSpec.
Planning-depth update when cynefin changes or when manual override is warranted based on implementation experience.
Confidence update based on what evidence the session actually produced.
Did the session produce fresh, severe evidence warranting promotion?
A session that implements code but runs no tests leaves confidence at prototype at best.
A session that implements and passes local tests with meaningful severity warrants locally-verified.
Do not promote confidence based on effort or intent — only on evidence actually produced.
If a previously validated claim was invalidated during the session (a test that passed before now fails, a dependency changed an interface), demote to regressed.
Evidence-freshness set to today's date when fresh evidence was produced during the session. Do not update evidence-freshness for issues that were only read or discussed, only for issues where evidence was generated or verified.
Regression-guard update when the session created or verified a regression detection mechanism.
Set to automated when CI-enforced tests were added, manual when a verification procedure was documented, runtime when a health check or monitor was deployed.
This step previously delegated to issues-beads-checkpoint step 3, now retired and pending re-base onto Linear/OpenSpec; apply the format below directly.
Each checkpoint context uses replacement semantics: the current state is the sufficient statistic for future planning.
Prior checkpoint contexts are replaced, not appended.
Each checkpoint context must be self-contained, synthesizing current position, approach, and remaining work. Workers need only the current state to proceed.
<!-- checkpoint-context -->
## State estimate (YYYY-MM-DD)
What was done: [specific accomplishments this session]
What was learned: [key insights, unexpected findings, approach changes]
What remains: [concrete next steps for the next worker]
Downstream impact: [what dependent issues should know about]
<!-- /checkpoint-context -->
For issues being left incomplete (progress=implementing or progress=blocked), this section is mandatory. For issues created during planning but not yet started, a brief context note describing the rationale and any dependencies suffices.
Compute the accumulated surprise across all session-touched issues. This is the session-level surprise evaluation that determines whether the current plan has diverged enough from reality to warrant replanning.
# For each touched issue, extract surprise from its signal table
bd show <id> --json | jq -r '.[0].notes // ""'
# Parse the signal table between <!-- stigmergic-signals --> delimiters
# Extract the surprise value from the row: | surprise | <value> | <date> |
Sum the surprise scores across all session nodes. Compare the accumulated surprise against the replanning threshold theta.
The replanning threshold is context-dependent. Complex-domain issues have a lower per-issue threshold because surprise in complex domains has higher downstream impact: a small deviation in a complex subsystem can cascade unpredictably.
Per-issue theta heuristics (consistent with session-review):
Compute the effective threshold as the sum of per-issue thetas, where each issue contributes its domain-specific theta value. If accumulated surprise exceeds this effective threshold, flag for replanning in the handoff narrative (step 8).
The replanning threshold check was also performed within issues-beads-checkpoint at the per-epic level (using a cumulative threshold of 2.0 by default); that check is retired and pending re-base onto Linear/OpenSpec.
The session-level check here provides a complementary perspective: it evaluates surprise across all work performed in the session regardless of epic boundaries, catching cross-epic plan divergence that per-epic checks miss.
Determine whether implementation revealed specification inaccuracies or architectural assumption violations. Flag specific AMDiRE artifacts (architecture decisions, specifications, context documents) for update.
This step connects the session checkpoint to the documentation promotion workflow, which defines the full lifecycle of working notes and specifications. The assessment produces flags; the actual documentation updates are performed by the worker in a subsequent session or as part of the current session if time permits.
The specification's tactical-resolution accuracy (plus/minus 1.5x) still holds but specific details are wrong. Revise the specification in place to reflect implementation reality. This is a maintenance operation, not a lifecycle transition. Commit the revision with a message referencing the issues whose implementation revealed the inaccuracy.
Action: flag the specific docs/development/ artifact and the nature of the inaccuracy.
Note which issues' implementation experience revealed the discrepancy.
The specification's core assumptions are invalidated by implementation experience. Its accuracy has dropped below tactical resolution, meaning the document no longer represents committed understanding at plus/minus 1.5x.
Two responses are available, depending on whether the new understanding has already reached tactical resolution.
Revise in place when the new understanding is itself stable at tactical resolution. The implementation revealed a better answer that is committed rather than exploratory. Update the specification, flag downstream beads issues whose descriptions or acceptance criteria derive from the invalidated content, and propagate the revised understanding via the pheromone propagation in step 6.
Demote to working note when the new understanding is still at strategic resolution.
The implementation revealed that the problem is less understood than the specification implied.
This typically coincides with a Cynefin reclassification (complicated to complex, or clear to complicated).
Create a new working note in docs/notes/ capturing the revised understanding and what probes are needed.
Mark the specification as superseded by adding a superseded-by: frontmatter field referencing the working note path.
The superseded specification remains in docs/development/ as a historical record until the new working note matures to promotion readiness and produces a replacement specification.
Demotion signals a fundamental misunderstanding of the problem domain and typically warrants a replanning cycle. When demotion occurs, include it as a replanning trigger in the handoff narrative (step 8) alongside the surprise threshold evaluation from step 4.
Detect working notes that reached tactical resolution as a side effect of implementation.
When a session produces understanding in docs/notes/ that answers "what are we building?" rather than "what are we learning?", flag the working note for promotion consideration.
The single promotion test across all Cynefin domains: does the working note contain tactical-resolution understanding (plus/minus 1.5x accuracy, committed rather than exploratory) for the information required by its target docs/development/ location?
Cynefin modulates how quickly working notes reach promotion readiness:
Promotion is an advisory flag, not a gate. Promotion happens in a subsequent session if the worker confirms readiness. Include flagged candidates in the handoff narrative (step 8).
When a working note is flagged for promotion (it has reached tactical resolution), guide the transformation:
docs/development/{category}/.superseded-by: frontmatter pointing to the new specs, or delete if all content was extracted.When surprise exceeds 0.5 and reveals fundamental spec inaccuracy that drops understanding back to strategic resolution:
docs/notes/ capturing the revised understanding and what probes are needed.superseded-by: frontmatter pointing to the working note.session-plan.Check whether the session's implementation changes affect areas depicted by existing diagrams.
When code or configuration changes fall within the scope of an existing diagram (deployment topology, component structure, bounded context boundaries), flag that diagram for update.
Reference diagram categories from the preferences-architecture-diagramming skill's 04-diagram-compendium.md when identifying which C4 level is affected.
Include flagged diagrams in the handoff narrative's documentation impact section so the next session can prioritize updates.
For docs in docs/notes/ that were not referenced or validated during this session, check last git commit date.
If older than 45 days, add to the checkpoint's "documentation maintenance" section with recommended action (validate, refactor, or delete).
If the doc has superseded-by frontmatter older than 30 days, recommend deletion.
When closing an issue whose results affect an external repo issue, include the cross-reference in the closure reason.
Format: "Implemented; results consumed by {prefix}-{id} in {repo}."
This ensures the next session-orient in the external repo detects the upstream completion via the closure-reason signaling mechanism.
For docs touched during the session, verify consistency with docs they reference or are referenced by. If a doc was updated and it references other docs, check that the referenced docs' assumptions still hold. Flag inconsistencies in the checkpoint context for the next session.
For docs that were reviewed and confirmed accurate during this session (even if not modified), update or add last-validated: YYYY-MM-DD frontmatter.
This feeds the staleness scan in the next session-orient step 3.
For each finding that changes assumptions for downstream work, update those issues' descriptions or notes to reflect the new understanding. This is proactive pheromone propagation: correcting the trail rather than waiting for the next worker to discover the discrepancy.
Per-issue propagation mechanics previously delegated to issues-beads-checkpoint step 5, now retired and pending re-base onto Linear/OpenSpec; apply the steps below directly.
# Check what depends on each touched issue
bd dep tree <id> --direction up
For each downstream issue affected by a discovery:
bd update <downstream-id> --description "Updated: <incorporate discovery that affects this issue>"
Common propagation scenarios include interface or API changes from what the downstream issue expects, prerequisites proving harder than expected and changing downstream scope, assumptions in the downstream description being invalidated, and technical constraints discovered that the downstream worker needs to know.
When issues in the current repo reference external repo issues, propagate checkpoint context to those external issues.
Cross-repo references use the format see {prefix}-{id} in {repo} as defined in the cross-project coordination protocol.
For each touched issue, scan its description and notes for cross-repo references. When a discovery affects an externally referenced issue:
# Attempt to locate the referenced repo
fd -t d '^{repo-name}$' ~/projects
# From the external repo's working directory
cd ~/projects/{path-to-repo}
bd show <referenced-id> --json | jq -r '.[0].notes // ""'
# Update notes with propagated context
bd update <referenced-id> --notes "$UPDATED_NOTES_WITH_PROPAGATED_CONTEXT"
Cross-repo propagation also applies to closure-reason signaling: when closing an issue whose results affect an external repo issue, include the cross-reference in the closure reason so that external workers can trace the dependency when they orient.
Run structural integrity checks to ensure no corruption was introduced during the session.
This step previously delegated to issues-beads-checkpoint step 7 for the mechanics, now retired and pending re-base onto Linear/OpenSpec; the commands below implement it directly.
# Cycle detection — must be zero
bd dep cycles
# Structural lint
bd lint
# Ready queue sanity check
bd ready | head -5
If cycles are detected, resolve them before proceeding.
If lint warnings appear, address structural issues.
These checks are performed inline rather than delegating to issues-beads-audit (retired, pending re-base onto Linear/OpenSpec) because they are a single step within the checkpoint protocol rather than a standalone maintenance activity.
Synthesize a self-contained handoff narrative sufficient for the next session to self-direct via session-orient.
The narrative captures what happened, what was surprising, what the next session should focus on, and what alerts require attention.
The handoff narrative has the following sections.
Accomplishments: what was completed this session. For each closed issue, summarize the deliverable and verification results. For issues left in progress, summarize current state and remaining work.
Surprises: findings that diverged from expectations. For each issue with surprise >= 0.3, describe the nature of the divergence and its implications. Group by impact: local surprises (affecting only the issue itself), propagated surprises (affecting downstream issues), and cross-repo surprises (affecting issues in other repositories).
Documentation impact flags: artifacts flagged for update in step 5. Organize by response type: minor inaccuracies (revise in place), major inaccuracies (revise or demote), and promotion candidates (working notes that reached tactical resolution). For demotions, note the Cynefin reclassification that motivated the demotion.
Replanning alerts: conditions that warrant re-invocation of session-plan.
Include alerts when accumulated surprise exceeds theta (from step 4), when documentation was demoted (from step 5), or when any other replanning trigger fired during the session.
Confidence status: for each touched issue, state the current confidence level and whether it advanced during this session.
Call out where implementation is ahead of evidence (code exists but confidence is undemonstrated or prototype), where evidence is stale (evidence-freshness is older than the most recent implementation changes), and where regression protection is absent on validated work.
For each epic, summarize the overall confidence posture: what fraction of child issues have reached their confidence target, and where are the gaps?
Buffer depletion alerts: report buffer status from the per-epic check previously delegated to issues-beads-checkpoint step 6, now retired and pending re-base onto Linear/OpenSpec.
If any epic has unclosed children but zero ready issues, flag it prominently so the next session prioritizes unblocking.
Cross-repo propagation status: report on cross-repo pheromone propagation from step 6. Distinguish between completed propagations (external repos accessed and updated) and pending propagations (external repos inaccessible, context not yet delivered). For pending propagations, include enough detail for the next session to complete them.
Next session focus: recommended starting point for the next session.
Identify the highest-priority ready issue or the most impactful unblocking action.
When replanning was triggered, recommend starting the next session with session-plan rather than jumping to implementation.
Session summary:
Completed:
- <issue-id>: <brief description of what was implemented and verified>
In progress:
- <issue-id>: <current state, what remains>
Surprises (accumulated: <total> / threshold: <theta>):
- <issue-id> (surprise=<value>): <nature of divergence and implications>
Documentation impact:
- [revise] <docs/development/path>: <what is inaccurate and which issues revealed it>
- [demote] <docs/development/path>: <what was invalidated, new working note location>
- [promote?] <docs/notes/path>: <what reached tactical resolution>
- [diagram-stale] <diagram-path>: <what changed in its depicted scope>
Replanning: {needed | not needed}
- {reason if needed}
Confidence:
- <issue-id>: <confidence-level> ({advanced | unchanged | regressed}) {regression-guard if present}
- Epic <epic-id>: <N>/<total> at target confidence
Buffer status:
- <epic-id>: <ready>/<total> ready ({healthy | depleted})
Cross-repo propagation:
- [done] <prefix>-<id> in <repo>: <what was propagated>
- [pending] <prefix>-<id> in <repo>: <what needs propagation, why inaccessible>
Next session:
- Recommended: <issue-id> (<rationale>)
- Alternative entry points: <issue-id>, <issue-id>
- Phase recommendation: {session-plan | implement | session-orient discovery mode}
This step previously delegated to issues-beads-checkpoint step 8, now retired and pending re-base onto Linear/OpenSpec.
Push beads state to the dolt remote for backup:
bd dolt commit -m "checkpoint: <session-summary>"
bd dolt push
The commit message should reference the primary issues checkpointed. For multi-issue sessions, summarize by category rather than listing every issue.
Invoke meta-session-resume to produce the ccds -r command and add it to atuin history.
No arguments are needed — the skill auto-detects the session UUID via $PPID.
Cynefin classification modulates how deeply this skill executes, not whether the worker enters the checkpoint phase.
| Cynefin domain | Checkpoint behavior |
|---|---|
| Clear | Brief: state capture, minimal narrative. Surprise is expected to be low; flag if unexpectedly high. |
| Complicated | Standard: full signal table update, complete handoff narrative with dependency analysis. |
| Complex | Detailed: exploration findings, discovery propagation, explicit documentation of what probes revealed and what remains unknown. |
| Chaotic | Immediate: act-sense-respond observations captured promptly. Focus on what intervention was attempted and whether stabilization occurred. |
After checkpoint completes, the session ends.
The next session starts with session-orient, which reads the handoff narrative, signal tables, and checkpoint contexts produced by this skill.
When replanning was triggered (surprise exceeded theta or documentation was demoted), the handoff narrative recommends that the next session begin with session-orient followed by session-plan before resuming implementation.
Composed skills (delegate, do not duplicate):
issues-beads-checkpoint (retired, pending re-base onto Linear/OpenSpec) -- per-issue signal table update, checkpoint-context write, escalation handling, pheromone propagation, buffer depletion check, graph health verification, beads commitissues-beads-evolve (retired, pending re-base onto Linear/OpenSpec) -- graph restructuring when checkpoint reveals structural issuesstigmergic-convention -- signal table schema, field definitions, read-modify-write protocolRelated skills:
session-orient -- strategic horizon session start, consumes the handoff narrative produced heresession-plan -- tactical-to-operational decomposition, invoked when replanning is triggeredsession-review -- convergence-point validation, uses compatible theta heuristicsissues-beads-prime (retired, pending re-base onto Linear/OpenSpec) -- core beads conventions and command quick referenceTheoretical foundations:
preferences-adaptive-planning for the surprise threshold derivation, replanning decision rule, documentation impact theory, and the fan-in normalization refinementpreferences-validation-assurance for the confidence promotion rules, evidence quality dimensions, and demotion triggers applied during checkpoint state captureWhat SKILL.md sets; muted values are Claude Code's defaults
/beads-issue-tracking-and-session-workflow:session-checkpointfrom beads-issue-tracking-and-session-workflow
npx claudepluginhub cameronraysmith/vanixiets --plugin beads-issue-tracking-and-session-workflow5 skills in this plugin
/session-orientStrategic horizon session skill that assembles complete session context, calibrates by Cynefin domain and planning-depth signal, and produces a self-directing briefing./session-planTactical-to-operational transition skill that transforms scope understanding into an operational execution buffer of atomic issues with dependencies, acceptance criteria, and Cynefin classification./session-reviewOther plugins' skills for the same job