Source index · Technical reference · Home

UNRELEASED DEVELOPMENT SNAPSHOT · READ-ONLY EXCERPT

skills/resume/SKILL.md

This is the cited technical source at local revision 275a354, inspected on 22 September 2026. It differs from the public release. This reference publishes only the cited sections, not an installable release or the development branch.

Line numbers refer to the complete recorded file. Uncited lines are omitted. Full-file SHA-256: 12fd42a3b5362f66cedcadf1bc9131fb2d2acbef99463af766c09dead5c82b37.

1---
2name: resume
3layer: foundation
4description: Use at the start of a fresh session to pick up work left in flight — reads 00-state.md and resumes the cycle at the next recommended phase, or one you name. The cross-session continuity entry point when a prior task was interrupted mid-cycle.
5color: cyan
6tools: Read, Bash, Grep, Glob
7voice: internal
8cli_support: [claude-code, codex, copilot]
9---
11You are the RESUME skill — cross-session continuity for Lintel cycle.
13## What this skill does
15Reads `.claude/runtime/state/00-state.md` from cwd, determines where the prior session ended, and routes operator to the next-recommended phase (or operator-specified override). Handles:
16- Resume mid-cycle (paused/aborted before)
… omitted uncited lines …
37### Step 1 — Locate state
39RESUME has **three** prior-work sources: committed work maps/plans, local cycle ledgers and checkpoints. The committed fallback below survives a fresh clone. Historically there were only two sources, and historically it only saw one of them: the
40cycle ledger (`00-state.md`). The other is a `/li:context-save` **checkpoint** — written
41to `.claude/runtime/sessions/<branch>/`. A session that ended with `/li:context-save` (not
42mid-cycle) leaves a checkpoint but no `00-state.md` entry; resume must discover it and
43hand off to `/li:context-restore` rather than misdirect the operator to a fresh cycle.
45```bash
46STATE_FILE=".claude/runtime/state/00-state.md"
47if [ ! -f "$STATE_FILE" ]; then
48 # No state from this repo
49 echo "NO_PRIOR_STATE_LOCAL"
51 # Check cross-machine sync
52 if [ -d "~/.lintel/lessons-vault" ]; then
53 # Try to find this repo's state in synced lessons vault
54 repo_slug=$(basename "$(git rev-parse --show-toplevel 2>/dev/null)")
55 cross_state=$(find ~/.lintel/lessons-vault -name "00-state-$repo_slug-*.md" 2>/dev/null | head -1)
56 [ -n "$cross_state" ] && {
57 echo "CROSS_MACHINE_STATE_FOUND: $cross_state"
58 cp "$cross_state" "$STATE_FILE"
59 }
60 fi
… omitted uncited lines …
89 (Or start fresh: /li:cycle for new work · /li:sense for a diagnostic.)
90 ```
92- **Neither local source present** → first run Step 1c below. Only if it finds no committed work, surface "No prior state found. Run `/li:cycle` for new work or
93 `/li:sense` for diagnostic."
95> **Paired with `/li:context-save`.** Resume discovers the checkpoints that `/li:context-save`
96> writes; `/li:context-restore` is the skill that reads one back in. Resume *routes* to restore —
97> it does not re-implement checkpoint parsing.
99### Step 1c — Resume from committed work in a fresh clone
101The local ledger and session saves are gitignored. Their absence is expected on another
102machine and does not mean the initiative is new. Follow the
103[shared work-map contract](../spec-kit/references/work-map.md): use an operator-named map,
104then an unambiguous active map linked from `.claude/plans/todo.md` or working-state.md.
105Validate it with `bin/li-work-artifacts.py --repo <working-repo> --map <selected-path>`.
107If no map exists, inspect explicit links to committed plan/spec/prompt artifacts in todo.md
108and working-state.md. Follow one unambiguous unfinished initiative; ask when several remain.
109Never choose by newest timestamp. Read its real tasks, decisions and recorded authorization;
110write a map when useful within scope. For Spec Kit, tasks.md owns checkbox state and task IDs.
112Compare completed cards against committed code and referenced verification evidence. Identify
113the first unfinished card whose dependencies are satisfied, or REVIEW if all cards are built.
114Report any missing evidence rather than converting checked boxes into a claim that tests ran.
115Recreate only local runtime bookkeeping after reconciling the selected work with the checkout.
116An APPROVED map records prior scope; verify current user authority before external actions.
117Continue at the selected BUILD/REVIEW phase using the mapped artifacts, without requiring an
118old machine's 00-state.md, private checkpoint or a duplicate Lintel task list.
120#### Swarm-aware committed resume
122If the selected map declares `execution_mode: "swarm"` and `coordination`, use the same committed
123artifacts rather than reconstructing lane state from chat or the local ledger:
125```bash
126repo="${LINTEL_REPO_ROOT:-$(git rev-parse --show-toplevel)}"
127if [ -n "${LINTEL_SOURCE_ROOT:-}" ]; then
128 source_root="$LINTEL_SOURCE_ROOT"
129elif [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then
130 source_root="$CLAUDE_PLUGIN_ROOT"
131else
132 echo "NEEDS_CONTEXT: trusted Lintel source root unavailable; set LINTEL_SOURCE_ROOT" >&2
133 exit 1
134fi
135[ -f "$source_root/bin/li-work-artifacts.py" ] && [ -f "$source_root/bin/li-swarm.py" ] || {
136 echo "NEEDS_CONTEXT: Lintel resume helpers missing under trusted source root" >&2
137 exit 1
139python3 "$source_root/bin/li-work-artifacts.py" --repo "$repo" --map "$selected_map"
140python3 "$source_root/bin/li-swarm.py" status --repo "$repo" --coord "$coordination"
141python3 "$source_root/bin/li-swarm.py" wave --repo "$repo" --coord "$coordination"
142```
144Claude may provide `CLAUDE_PLUGIN_ROOT`; other adapters substitute/export their installed bundle as
145`LINTEL_SOURCE_ROOT`. Tests and self-checks set it explicitly. The working repo is only `--repo` and
146never a trusted helper source.
148Surface the lane states, earliest incomplete wave, ready task IDs, and actual host execution tier.
149`awaiting_review` resumes at the lane's independent review, while `rework_required` returns to the
150same card. A complete frontier routes to the integrated REVIEW close gate.
152Runtime loss cancels attempts, not committed work. Treat an unreported worker process as unfinished.
153If an isolated worktree or patch survives, preserve it, derive its exact changed paths, run
154`check-scope`, and finish the declared report/review. If the change cannot be attributed to one lane,
155surface the discrepancy and sequence a clean retry; never infer completion or silently discard it.
156Do not select another initiative by modification time.
… omitted uncited lines …
326- AskUserQuestion: "Continue with imported state? (Y/n)"
327- If yes: `state_append RESUME IMPORTED source="<machine-id or path>"`
329### Step 6 — Invoke chosen phase
331Based on operator's choice (Step 3 + 4):
332- If A (next recommended): `/li:<recommended-phase>`
333- If B (restart prior): `/li:<last-phase>` (re-runs from start)
334- If C (specific): `/li:<chosen-phase>`
335- If D (full cycle): `/li:cycle` (from start, ignoring prior state)
336- If E (abort): `state_append RESUME ABORTED cycle_aborted=true`, archive to `~/.lintel/archive/`
338### Step 7 — 00-state.md append
340RESUME is a utility, not a cycle phase. Mechanical since v5.0 (ADR-0008) — one command, not a YAML obligation:
342```bash
343_sl="${LINTEL_SOURCE_ROOT:-${LINTEL_REPO_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null)}}/lib/state.sh"
344[ -f "$_sl" ] || _sl="$HOME/.lintel/lib/state.sh"; source "$_sl" # installed by install.sh in consumer repos
345state_append RESUME DONE prior_last_phase=<phase> operator_choice=<A|B|C|D|E> next_invoked=<phase> cross_machine=<yes|no>
346```
348## Status protocol
350- **DONE** — operator chose, next phase invoked
… omitted uncited lines …
360## Hop-in support
362n/a — RESUME is itself the hop-in mechanism.
364## Integration
366**Reads:**
367- `.claude/runtime/state/00-state.md` (PRIMARY)
368- `.claude/runtime/sessions/<branch>/*-context-save.md` (checkpoint discovery via `context_latest` — routes to `/li:context-restore`)
369- `~/.lintel/lessons-vault/00-state-<repo>-*.md` (cross-machine fallback)
370- `.claude/runtime/jobs/<id>/job.yaml` `steps[]` (job-scoped resume — node-path via `job_resume_point`)
371- `.claude/plans/<slug>/scope.md` `depth_schema` (selects node-path vs current_step resume)
372- `plan.md`, `spec.md`, `review-report.md` (for precondition checks)
373- selected `work.json` and optional swarm coordination/charter/briefs/reports/reviews
374- recent git log
376**Calls into:**
377- `bin/_jobs.sh` — `job_resume_point` (tree node-path), `job_can_start` (skip blocked leaves), `job_path`
378- `bin/_context.sh` — `context_latest` (newest checkpoint for the branch; offers `/li:context-restore`)
380**Writes:**
381- `.claude/runtime/state/00-state.md` (RESUME entry)
382- `~/.lintel/archive/<cycle-id>/` (if operator aborts)
384**Triggers:**
385- Invokes operator's chosen phase-skill
387## Anti-patterns
389- **Auto-resume without confirmation** — always show prior state, let operator decide
390- **Loading full prior session conversation history** — read just 00-state.md, not the whole context
391- **Ignoring stale state** (>30 days old) — surface age, ask operator if still valid
392- **Resuming with corrupt state file silently** — explicit error, don't guess
393- **Trusting a lost worker attempt as completed swarm work** — only attributable changes plus valid
394 committed report/review evidence advance the frontier