spectre-capture
Capture durable project decisions, accepted corrections, verified reusable patterns or gotchas, disproved guidance, and changed…
Save a quiet, branch-keyed session snapshot with continuity, active work, and optional task/todo state for automatic resume. Use when ending or pausing a coding session; do not use for project documentation or workflow routing.
$ npx -y skills add joenandez/spectre --skill spectre-handoff --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/spectre-handoffContext preview
The summary Claude sees to decide when to auto-load this skill.
Save a quiet, branch-keyed session snapshot with continuity, active work, and optional task/todo state for automatic resume. Use when ending or pausing a coding session; do not use for project documentation or workflow routing.
name: "spectre-handoff" description: "Save a quiet, branch-keyed session snapshot with continuity, active work, and optional task/todo state for automatic resume. Use when ending or pausing a coding session; do not use for project documentation or workflow routing." user-invocable: true disable-model-invocation: true
Persist the smallest complete state needed to resume the current branch. Finish in 2–3 tool calls and emit only the final confirmation.
Write `{timestamp}_handoff.json` as valid JSON with this exact v1.1 shape:
{
"version": "1.1",
"timestamp": "YYYY-MM-DD-HHMMSS",
"branch_name": "raw branch",
"task_name": "argument or raw branch",
"session_number": 1,
"progress_update": {
"summary": "string",
"goal": "string",
"accomplished": [],
"now": "string",
"next_steps": [],
"confidence": "high|medium|low",
"constraints": [],
"decisions": [],
"blockers": [],
"open_questions": [],
"risks": []
},
"working_set": {
"key_files": [],
"active_ids": [],
"recent_commands": []
},
"beads": {
"available": true,
"workspace_label": "raw branch",
"task_count": 1,
"epic_id": null,
"epic_title": null,
"tasks": [{"id":"", "title":"", "status":"", "type":"", "parent":null, "children":[], "labels":[]}]
},
"context": {
"wip_state": "uncommitted|clean",
"last_commit": "short SHA"
}
}Use “we” voice and empty arrays when optional content is absent. `now` identifies the exact interrupted work. Omit `beads` unless `bd doctor` succeeds and matching `open|in_progress|blocked` tasks exist. On continuations, `@spectre_sync` may add `continuity` while preserving current-session priority and schema.
When a nonempty agent-native todo list exists, also write its exact statuses to `{timestamp}_todos.json` and update `todos_history.json` to retain the five newest snapshots. Otherwise create neither file.
DONE when paths/numbering follow the selected-history rule; current `summary`, `now`, `accomplished`, `next_steps`, confidence, working set, and session number are preserved; optional `beads` is omitted when unavailable/empty; JSON reparses; and only the applicable canonical files changed.
1. Gather repository/history/task state in one shell call: resolve raw branch (fallback `unknown`), short HEAD, worktree count, canonical and legacy counts, selected history, next session number, timestamp/output path, and healthy branch-labeled `bd` tasks. Create only `CANONICAL_DIR`. 2. Compose the current snapshot from session memory. Preserve the outer workflow’s already-selected `Next (recommended)` skill and observed reason verbatim as the first next step; include its canonical artifacts in `key_files`. Do not independently reroute or invent todo state. 3. If selected `session_count = 0`, write the handoff directly. Otherwise dispatch exactly one `@spectre_sync` with the full current JSON inside `<current_session>`, plus the literal selected history directory and canonical output file inside `<session_history_path>` and `<handoff_output_path>`. It reads at most the three newest prior handoffs and writes the final file. 4. Treat canonical artifacts as shared state; write no intermediate documents. Verify the final JSON and any todo-history retention before claiming success.
| Handoff | Details | |---|---| | 🧭 **Current phase** | Done | | 📦 **What was just done** | Result | | ▶️ **Proposed next step** | Render resolved action. |
First: path/first-session notice; continuation: path/session/continuity counts. Output only applicable table.
Next step: resume from the saved canonical handoff.
SPECTRE is an Agentic Engineering workflow for Claude Code and Codex designed to help you do ONE THING more, faster, and with higher quality.
Capture durable project decisions, accepted corrections, verified reusable patterns or gotchas, disproved guidance, and changed…
Run final adversarial review through a pinned high-effort opposing runtime with one native fallback. Use at the final boundary to…
Generate a grounded draft pull request from the actual diff and open it via gh. Use when wrapping up a branch or writing a PR…
Assess and repair a project's Spectre knowledge, work history, tags, and retrieval quality through primary-led decisions,…
Execute tasks/plans with checks/reviews/proof. Use after planning/resume. Not for planning, unplanned fixes, or pruning.
Internal initializer for a missing Spectre feature root. Invoke only from a standalone workflow with no confirmed managed root.…