Loading...
Loading...
Save and mutate workflow state — init a workflow, update fields, transition phases, and capture a structured handoff before context exhaustion. Use when the user says 'save progress', 'checkpoint', 'I need to stop', or runs /checkpoint. Writes current workflow phase, task progress, and artifacts to the event store for later resumption. Do NOT use for restoring/reading state after a session break (that is /rehydrate) or for workflow initialization framing handled by ideate/debug/refactor commands.
npx skill4agent add lvlup-sw/exarchos checkpoint@skills/rehydrate/SKILL.mdideatecheckpointreferences/phase-transitions.mdaction: "update"action: "transition"phaseaction: "update"RESERVED_FIELDtransitionexarchos_workflow({ action: "describe", actions: ["update", "init", "get"] })exarchos_workflow({ action: "describe", playbook: "feature" })implementing → synthesize|completedsynthesisPolicyexarchos_workflow({ action: "describe", playbook: "oneshot" })exarchos_event({ action: "describe", eventTypes: ["workflow.transition", "task.completed"] })exarchos_workflow getexarchos_view pipelineunscopedTotalpage.totalscope: "all"~/.claude/workflow-state/*.state.jsonreferences/mcp-tool-reference.mdideateexarchos:exarchos_workflowaction: "init"featureId"user-authentication"workflowType"feature""debug""refactor""oneshot"synthesisPolicy"always""never""on-request""on-request"workflowTypefeatureplandebugtriagerefactorexploreoneshotplanfeatureplan → plan-review → delegate → review → synthesizedebugtriage → investigate → (thorough | hotfix)refactorexplore → brief → (polish | overhaul)oneshotplan → implementing → (completed | synthesize)synthesisPolicysynthesize.requested@skills/oneshot/SKILL.mdfinalize_oneshotexarchos:exarchos_workflowaction: "update"featureIdupdatesphaseworkflowTypefeatureIdcreatedAtversionupdates: { "artifacts.spec": "docs/specs/2026-01-05-feature.md" }updates: { "tasks[0].status": "complete", "tasks[0].completedAt": "<timestamp>" }updates: { "worktrees.wt-001": { "branch": "feature/001-types", "taskId": "001", "status": "active" } }'active' | 'merged' | 'removed'exarchos:exarchos_workflowaction: "transition"featureIdtargettarget: "delegate"workflow.transitionupdateupdates: {...}tasksset updatestasks[0]tasks[1]tasks[id=T-001]INVALID_INPUTsuccess: trueexarchos_workflow({
action: "update",
featureId: "<id>",
updates: { tasks: [
{ id: "T-001", title: "...", status: "pending" },
{ id: "T-002", title: "...", status: "pending" },
]},
})exarchos_workflow({
action: "update",
featureId: "<id>",
updates: { "tasks[0].status": "complete", "tasks[0].completedAt": "<ts>" },
})tasksaction: "get", query: "tasks"Ntasks[N]// Suppose tasks already contains T-001 and T-002 (length 2). To append:
exarchos_workflow({
action: "update",
featureId: "<id>",
updates: { "tasks[2]": { id: "T-003", title: "Follow-up", status: "pending" } },
})MAX_ARRAY_GAP = 1tasks[5]INVALID_INPUTtasks| Event | State Update |
|---|---|
| |
| Design & Rationale authored | |
| Decomposition added | |
| Plan-review gaps found | |
| Plan-review approved | |
| Task dispatched | Set task |
| Task complete | Set task |
| Worktree created | Add to |
| Review complete | Update |
| PR created | Set |
| PR feedback | Append to |
| Phase | State updates | Events emitted |
|---|---|---|
| | |
| | |
| | |
| — | |
implementing → synthesize | completedfinalize_oneshotsynthesisOptedInsynthesisPolicysynthesize.requested@skills/oneshot/SKILL.mdAfter authoring the Design & Rationale section of the unified docs/specs/ artifact:
- `action: "update"` — `updates: { "artifacts.spec": "<path>" }`
(no transition — `plan` is the initial phase; continue to decomposition in the same phase)After saving plan:
1. `action: "update"` — `updates: { "artifacts.plan": "<path>", "tasks": [...] }`
2. `action: "transition"` — `target: "plan-review"`On task dispatch:
- Update task status to "in_progress"
- Add worktree to state if created
On task complete:
- Update task status to "complete"
- Check if all tasks done, suggest checkpointdocs/schemas/workflow-state.schema.jsonversionfeatureIdworkflowTypephaseartifactstasksworktreesplanReviewgapsapprovedreviewssynthesisexarchos:exarchos_workflowaction: "update"RESERVED_FIELDphaseworkflowTypefeatureIdcreatedAtversion__version_checkpoint.summary_eventHintsphaseexarchos:exarchos_workflowaction: "transition"target: "<phase>"exarchos:exarchos_eventaction: "append"checkpointstate.patchedworkflowTypefeatureIdcreatedAtversionRESERVED_FIELDdata{
"success": false,
"error": {
"code": "RESERVED_FIELD",
"message": "Cannot update reserved field: phase",
"data": {
"rejectedPath": "phase",
"rule": "`phase` is top-level immutable — set once at init, never directly mutated thereafter.",
"alternateWritePath": "Use `exarchos:exarchos_workflow` with `action: \"transition\"` and `target: \"<phase>\"` — phase changes are HSM-validated and emit transition events."
}
}
}exarchos:exarchos_workflowaction: "describe"actions: ["update"]reservedFieldscheckpoint### House Rulesrehydrate@skills/rehydrate/SKILL.md## Checkpoint Saved
**Feature:** <feature-id>
**Phase:** <current-phase>
### Progress
- Tasks: X/Y complete
- Current: <what's in progress>
- Next: <suggested next action>
### House Rules (apply every action this turn forward)
**Skill:** <phasePlaybook.skillRef or "(no playbook for this phase)">
**Tools:** <phasePlaybook.tools rendered as bullets>
**Required model-emitted events:** <phasePlaybook.events rendered as bullets — e.g. `task.progressed`, `phase.advanced`>
**Auto-emitted events (runtime fires these):** <phasePlaybook.autoEmittedEvents rendered as bullets>
**Transition:** <phasePlaybook.transitionCriteria> | Guard: <phasePlaybook.guardPrerequisites>
**Validation scripts:** <phasePlaybook.validationScripts joined>
### Event Emission Hints
<_eventHints.missing rendered as bullets, or "(none — phase machinery satisfied)">
### Resume Instructions
To continue this workflow in a new session, run `rehydrate` — or start the harness fresh, and the SessionStart hook will auto-discover active workflows.
> **Discipline reminder:** every task transition this turn forward MUST land on the workflow event stream via `exarchos_event.append` or `delegate` subagent emission. Direct `Edit` / `Bash` / `git` actions on task branches without corresponding events will desync the workflow tracker (see RCA `docs/rca/2026-05-08-rehydrate-behavioral-gap.md`).delegatesynthesize@skills/rehydrate/SKILL.md@skills/rehydrate/SKILL.mdexarchos:exarchos_workflowaction: "get"exarchos:exarchos_workflowaction: "cancel"dryRun: truecheckpointexarchos:exarchos_workflowaction: "list"listexarchos:exarchos_workflowaction: "get"featureIdexarchos:exarchos_workflowaction: "init"featureId: "user-authentication"workflowType: "feature"planaction: "update"featureId: "user-authentication"updates: { "artifacts.spec": "docs/specs/2026-01-05-user-auth.md" }checkpointrehydrate@skills/rehydrate/SKILL.md