Skip to content

j-mauro-r/SAT-Dengue-V2 / .agents/skills/deepworkplan/resume

deepworkplan-resume

Verified

Resume interrupted Lite or Full Deep Work Plans from durable Markdown and state, including safe recovery of promotions without duplicating completed work or gates.

FileKindSize
SKILL.mdskill md19.0 KB
v6.mdmarkdown4.3 KB
# v6 resumption — the journal is the truth

> Loaded only when Step 2.0 detects a v6 plan (manifest contract pointer /
> `contract.json` / `contracts/` chain). A v5 plan never reads this file; its
> recovery is the v5 protocol inline in the parent SKILL. The normative text
> is [`../spec/V6_LIFECYCLE.md`](../spec/V6_LIFECYCLE.md) §8–§9.

In a v6 plan, `state.json` and `views/` are **derived** — projections the
ledger recomputes from `journal.ndjson` + the live contract. Recovery
therefore never reconciles markdown against a projection by hand: it
verifies the records, reprojects, and reports.

## The recovery ladder

Run these in order; stop at the first boundary that fails and report it —
never "fix" a record by hand.

0. **Pending handoff packet.** `python3 ../shared/swarm.py handoff show
   --plan <dir> --pending`; when one exists, `handoff accept --plan <dir> --pane <pane>`
   before anything else. A refusal (plan, contract, branch, head or dirty
   set differ; the caller is the packet's author, its pane is unknown, or
   the packet has no `from.pane`) is reported to the lead, never worked
   around; an accepted
   packet's `not_verified[]` gates are re-run (`../guide/swarm.md` §17.6).

1. **Inspect (read-only).** `python3 ../shared/ledger.py --plan <dir>
   inspect` — contract id, event count, torn-tail flag. A **torn tail**
   (crash mid-append) is repaired by the next write through the writer's
   framing recovery; it is not data loss.
2. **Validate (read-only).** `python3 ../shared/contract_v6.py
   validate-journal <dir>/journal.ndjson --contract <dir>/contract.json`
   (or the live `contracts/` head). Findings are reported, never repaired.
3. **Reproject.** A missing, stale, or hand-edited `state.json` is **not an
   incident**: `python3 ../shared/ledger.py --plan <dir> project`
   regenerates it from the records. The same applies after any crash
   window — the journal, not the projection, carries the state.
4. **Re-render views.** Intact generated views refresh in place:
   `python3 ../shared/views.py --plan <dir> render --all`. Partially
   published or hand-edited views (bytes no recorded render produced) are
   reconciled explicitly: `... render --all --reconcile
   human-wins|generated-wins` — never a silent overwrite; the choice and
   its authority are recorded.
5. **Freshness.** Dirty files, a moved workspace, or a different checked-out
   revision make recorded fingerprints **stale**: prior evidence no longer
   proves anything about this world. `python3
   ../shared/context_manifest.py --plan <dir> --task <id>` exits 1 on
   stale and says so. Stale evidence is re-run, never argued away.

## Cross-agent and cold resume

`.dwp/` is gitignored by design, so a second host (another agent, model, or
machine) has **nothing** until the plan is handed over explicitly. The
handoff artifact is the export bundle:

- Sender: `python3 ../shared/ledger.py --plan <dir> export --dest <path>` —
  journal, snapshot, the contract (or `contracts/` chain), and every
  evidence artifact a record cites; a cited pointer that does not resolve
  is recorded missing, never silently dropped.
- Receiver: copy the plan folder (README, task files, `PROGRESS.md`,
  evidence), check out the recorded repository revision, then run the
  ladder above. A missing `state.json` is expected on a cold host — step 3
  rebuilds it; the journal is the truth both hosts share.
- Resumption continues through [`../execute/v6.md`](../execute/v6.md)
  (Step 2.0 of execute), with the per-task context manifest deciding what
  history is loaded — the journal is **not** replayed as context.

## Boundaries

- **A v6 plan under the v5 runner is unsupported (D2-10):** the v5
  finalization refuses it naming the contract pointer
  (`verify/plan_contract.py` verifies it read-only against its v6 records);
  open it with the v6 flow instead. The reverse does not exist either — a v5 plan
  is migrated forward only through the explicit migration surface
  (`refine` → `../shared/migrate_v6.py`, preview first), never by resume,
  never silently, and a v6 plan is never migrated back (rollback restores
  the v5 bytes only from the migration's own verified backup).
- **Never:** hand-edit `state.json` or a view, replay the journal as
  conversation context, re-run gates whose evidence is fresh, or treat a
  derived file as authoritative over the records it was derived from.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall