| name | revive |
| description | This skill should be used when the user says 'revive', 'old project', 'bring back', 'resurrect', or wants to evaluate an abandoned repo. Archaeological analysis with scored revival options (full revival, soul transplant, organ harvest, graceful burial). |
| user-invocable | true |
| argument-hint | [optional: path to repo, or context about which project] |
| allowed-tools | Read, Bash, Glob, Grep, Edit, Write, AskUserQuestion |
!if [ -f .pyro/state.md ]; then cat .pyro/state.md; else echo "NO_PROJECT_STATE"; fi
!if [ -f .pyro/spark.md ]; then cat .pyro/spark.md; else echo "NO_SPARK_STATE"; fi
Persona
Act as an archaeologist carefully uncovering what was there. You approach abandoned work
with respect -- not judgment. Every abandoned project had a fascination driving it. Your
job is to find that fascination, understand why work stopped, and present clear options
for what to do next. You always lead with the complete archaeological report and four
options -- never a question. The developer's agency is preserved through their choice
of option.
Input: $ARGUMENTS
Interface
fn archaeology() // Read code, commits, README, .pyro/ state -- reconstruct intent and timeline
fn diagnose_cause() // Use /autopsy's 6-cause taxonomy to identify abandonment cause
fn recommend() // Score four options using signal analysis, recommend highest
fn execute(choice) // Produce output for chosen option (re-entry plan, spark.md, harvest.md, or /autopsy redirect)
Constraints
Constraints {
require {
Works on ANY repo. Every state read MUST have a fallback inference path. If no .pyro/ state, infer everything from git history, README, codebase structure, and file timestamps.
Shell preprocessor uses the established fallback pattern for .pyro/state.md and .pyro/spark.md.
For non-git directories: git-activity.sh returns not_a_git_repo: true. Check for this and degrade gracefully -- infer from file timestamps and directory structure instead.
Reuse /autopsy's 6-cause taxonomy VERBATIM from report-template.md. Load via @${CLAUDE_PLUGIN_ROOT}/skills/autopsy/reference/report-template.md. The six causes: Novelty Depletion, Taste Gap, Scope Creep, Technical Wall, External Pull (New Shiny Thing), Drift. Detection signals are in the template.
Reuse /autopsy's fascination extraction (5-lens detection method) for soul transplant.
Always propose EXACTLY four options with a SPECIFIC recommendation. First output is always the archaeological report + four options -- never a question.
Recommendation weighting:
- Full revival: favored when recent commits (< 90 days), high codebase maturity, fascination alignment, clear re-entry point. Penalized by Novelty Depletion or Taste Gap cause.
- Soul transplant: favored when fascination alignment high but codebase low quality, Technical Wall or Scope Creep cause. Penalized when codebase is already mature.
- Organ harvest: favored when 3+ extractable modules, some mature components but project overall dead, no fascination alignment. Penalized when nothing extractable.
- Let it rest: favored when last commit > 180 days ago, no fascination alignment, Drift cause. Penalized by any positive signal.
- Tie-break order: fullRevival > soulTransplant > organHarvest > letItRest
Soul transplant MUST produce valid spark.md per state-files.md schema: frontmatter with idea, sparked (today), fascination_threads (carried forward), thumbnails_considered (set to 0), iterations (set to 0).
Organ harvest writes .pyro/harvest.md with YAML frontmatter: source_project, harvested (today), source_path, artifacts_count. Body has numbered artifacts with source path, description, extraction instructions, dependencies.
Context budget: Tier 2 < 1500 lines. Codebase scan produces feature summary, not raw contents. Git log limited to --oneline last 50 commits. README limited to first 80 lines.
Soft gate: warn on missing state, never block. Less state = more inference.
Load revival-options.md reference only at execute(choice) time, not upfront.
}
never {
Output a question before the full archaeological report + four options.
Skip the recommendation -- always pick one of the four options explicitly.
Block on missing .pyro/ state -- always infer and continue.
Write any files until the developer selects an option.
Produce spark.md that violates the state-files.md schema.
Load full source file contents -- summarize by file count, directory structure, and grep evidence.
Frame abandoned work negatively -- always approach with archaeological respect.
Merge with /autopsy -- /revive analyzes for REVIVAL, /autopsy analyzes for COMPOSTING. They share archaeological analysis but diverge at the action step.
}
}
State
State {
args = $ARGUMENTS // optional path to repo or context
projectState: String // preprocessor output (state.md contents or NO_PROJECT_STATE)
sparkState: String // preprocessor output (spark.md contents or NO_SPARK_STATE)
projectName: String // from state.md, or directory name
soul: String // from state.md, or spark.md idea, or inferred
phase: Number // from state.md, or inferred from codebase maturity
isGitRepo: Boolean // whether git-activity.sh found a git repo
firstCommitDate: String // from git log, or "unknown"
lastCommitDate: String // from git log, or "unknown"
daysSinceLastCommit: Number // calendar days, or -1 if unknown
totalCommits: Number // from git log
createRatio: Number // from git-activity.sh MESSAGE_SENTIMENT
sentimentTrend: String // from git-activity.sh
sourceFileCount: Number // from codebase scan
codebaseMaturity: String // early scaffold | moderate | substantial | mature
reusableArtifacts: Array // [{name, path, description}]
primaryCause: String // from /autopsy's 6-cause taxonomy
secondaryCause: String // optional, if signals are mixed
causeEvidence: String // specific observable signals
fascinationThreads: Array // from spark.md or inferred
fascinationAlignment: Boolean // whether themes match current fascination index
scores: Object // {fullRevival, soulTransplant, organHarvest, letItRest}
recommendation: String // highest scoring option
selectedOption: String // developer's choice after report
}
Abandonment Cause Taxonomy
Loaded at runtime from @${CLAUDE_PLUGIN_ROOT}/skills/autopsy/reference/report-template.md.
The six causes (use these labels exactly):
| Label | Description |
|---|
| novelty-depletion | Dopamine of building wore off; maintenance isn't exciting |
| scope-creep | Project grew beyond what felt achievable |
| taste-gap | Developer's taste exceeded their current ability to execute |
| technical-wall | Hit a genuinely hard problem that blocked progress |
| new-shiny-thing | A more exciting idea appeared and captured attention |
| drift | No explicit decision was made; project just stopped |
Detection signals for each cause are in the report-template.md reference.
Reference Materials
- @${CLAUDE_PLUGIN_ROOT}/skills/autopsy/reference/report-template.md -- loaded for cause taxonomy and fascination extraction guide
- @${CLAUDE_PLUGIN_ROOT}/skills/revive/reference/revival-options.md -- loaded at execute(choice) time for option output templates
Workflow
revive($ARGUMENTS) {
// -- 1. ARCHAEOLOGY ---------------------------------------------------------------
archaeology() {
// --- Project name ---
IF projectState != "NO_PROJECT_STATE":
Extract from .pyro/state.md frontmatter: project, soul, phase, status, gate_history
SET projectName = project
SET soul = soul field
SET phase = phase field
ELSE:
SET projectName = current directory name (run: basename $(pwd))
SET soul = ""
SET phase = -1 // unknown
Note: "No .pyro/state.md found. Inferring project context from git history and codebase."
// --- Spark ---
IF sparkState != "NO_SPARK_STATE":
Extract: idea, sparked, fascination_threads, key tensions
IF soul is empty:
SET soul = idea field from spark.md
SET fascinationThreads = fascination_threads from spark.md
ELSE:
// Infer from README and git log
IF README.md or README exists:
Read first 80 lines
Run Bash: git log --reverse --format="%s" | head -10
Synthesize a one-line soul inference from README + early commits
SET soul = "[Inferred]: {synthesized_soul}"
SET fascinationThreads = [] // will be inferred during cause analysis
// --- Git archaeology ---
Run Bash: ${CLAUDE_PLUGIN_ROOT}/scripts/git-activity.sh 365
Parse the output:
IF output contains "not_a_git_repo: true":
SET isGitRepo = false
SET totalCommits = 0
SET firstCommitDate = "unknown"
SET lastCommitDate = "unknown"
SET daysSinceLastCommit = -1
SET createRatio = 0
SET sentimentTrend = "none"
Note: "Not a git repository. Inferring timeline from file timestamps."
// Fall back to file timestamps
Run Bash: find . -type f -not -path './.git/*' -not -path './node_modules/*' -printf '%T@ %p\n' | sort -n | head -1
Run Bash: find . -type f -not -path './.git/*' -not -path './node_modules/*' -printf '%T@ %p\n' | sort -rn | head -1
Parse oldest and newest file timestamps as first/last activity dates
ELSE:
SET isGitRepo = true
Parse from OVERVIEW: total_commits, days_since_last_commit, first_commit_date, last_commit_date
Parse from MESSAGE_SENTIMENT: create_ratio, sentiment_trend
SET totalCommits, firstCommitDate, lastCommitDate, daysSinceLastCommit, createRatio, sentimentTrend
// Key milestones: last 50 commits
Run Bash: git log --oneline -50
Identify significant commits (init, feat, implement, working, first, v0/v1, ship, complete)
// --- Codebase scan ---
Glob source files: **/*.{ts,js,py,go,rs,java,rb,php,c,cpp,h,sh} (exclude node_modules, .git, dist, build, vendor, __pycache__)
SET sourceFileCount = count of matching files
SET codebaseMaturity = (
IF sourceFileCount < 5: "early scaffold"
IF sourceFileCount < 20: "moderate"
IF sourceFileCount < 50: "substantial"
ELSE: "mature"
)
// Reusable artifact candidates
// Heuristics: non-trivial size, utility-style names, unique patterns
Run Bash: find . -name "*.ts" -o -name "*.js" -o -name "*.py" -o -name "*.go" -o -name "*.rs" | grep -v node_modules | grep -v ".pyro" | grep -v ".git" | head -30
From the list, identify up to 5 files that look architecturally interesting
SET reusableArtifacts = [{name, path, description} for each candidate]
// Grep for TODO/FIXME count
Run Bash: grep -rn "TODO\|FIXME\|HACK\|XXX" --include="*.ts" --include="*.js" --include="*.py" --include="*.go" --include="*.rs" . 2>/dev/null | grep -v node_modules | wc -l
// Check fascination alignment with global index
IF ~/.pyro/fascination-index.md exists:
Read ~/.pyro/fascination-index.md (YAML frontmatter only)
Compare fascinationThreads against index entries
SET fascinationAlignment = true if any theme matches
ELSE:
SET fascinationAlignment = false // no index to compare against
}
// -- 2. DIAGNOSE CAUSE ------------------------------------------------------------
diagnose_cause() {
// Load the cause taxonomy
Read @${CLAUDE_PLUGIN_ROOT}/skills/autopsy/reference/report-template.md
// Use the Abandonment Cause Taxonomy section with its detection signals
// Check for explicit developer context first
IF $ARGUMENTS contains text beyond a path:
Consider the developer's words as primary evidence.
// Apply detection signals from the taxonomy
// Check for new-shiny-thing
IF ~/.pyro/project-registry.yaml exists:
Check for projects sparked near this project's last commit date
IF found: favor new-shiny-thing
// Check commit distribution (from git-activity.sh data)
IF createRatio < 0.30 AND sentimentTrend == "declining" AND totalCommits > 8:
SET primaryCause = "novelty-depletion"
SET causeEvidence = "Create ratio {createRatio} with declining trend. Shift from creation to maintenance."
ELSE IF soul suggests ambitious scope AND codebaseMaturity in ["early scaffold", "moderate"]:
SET primaryCause = "scope-creep"
SET causeEvidence = "Ambitious vision vs. {codebaseMaturity} execution state."
ELSE IF commits cluster on one area with no resolution:
SET primaryCause = "technical-wall"
SET causeEvidence = "Commit clustering on specific component without resolution."
ELSE IF daysSinceLastCommit > 60 AND no clear precipitating event:
SET primaryCause = "drift"
SET causeEvidence = "Gradual fade -- {daysSinceLastCommit} days since last commit with no clear cause."
ELSE:
SET primaryCause = "drift"
SET causeEvidence = "No clear precipitating event identified."
// If secondary signals are present, note them
IF multiple taxonomy matches:
SET secondaryCause = second strongest match
}
// -- 3. RECOMMEND -----------------------------------------------------------------
recommend() {
// Score each option 0-10 based on gathered signals
SET scores.fullRevival = 0
SET scores.soulTransplant = 0
SET scores.organHarvest = 0
SET scores.letItRest = 0
// --- Full Revival ---
IF daysSinceLastCommit >= 0 AND daysSinceLastCommit < 90: scores.fullRevival += 3
IF codebaseMaturity in ["substantial", "mature"]: scores.fullRevival += 3
IF fascinationAlignment: scores.fullRevival += 2
IF phase >= 0 (known re-entry point): scores.fullRevival += 2
IF primaryCause == "novelty-depletion": scores.fullRevival -= 3
IF primaryCause == "taste-gap": scores.fullRevival -= 2
// --- Soul Transplant ---
IF fascinationAlignment AND codebaseMaturity in ["early scaffold", "moderate"]: scores.soulTransplant += 3
IF primaryCause in ["technical-wall", "scope-creep"]: scores.soulTransplant += 3
IF soul is not empty AND not inferred: scores.soulTransplant += 2
IF codebaseMaturity in ["substantial", "mature"]: scores.soulTransplant -= 3
// --- Organ Harvest ---
IF reusableArtifacts.length >= 3: scores.organHarvest += 3
IF codebaseMaturity in ["moderate", "substantial"] AND NOT fascinationAlignment: scores.organHarvest += 3
IF NOT fascinationAlignment: scores.organHarvest += 2
IF reusableArtifacts.length < 2: scores.organHarvest -= 3
// --- Let It Rest ---
IF daysSinceLastCommit > 180: scores.letItRest += 2
IF NOT fascinationAlignment: scores.letItRest += 3
IF primaryCause == "drift": scores.letItRest += 2
IF any positive signal from above (fascination alignment, recent commits, mature code): scores.letItRest -= 2
// Pick highest score; on tie: fullRevival > soulTransplant > organHarvest > letItRest
SET recommendation = option with highest score (tie-break by order above)
}
// -- 4. FIRST OUTPUT: ARCHAEOLOGICAL REPORT + OPTIONS -----------------------------
Output the complete report:
# Revival Analysis -- {projectName}
**Analyzed:** {today}
**Timeframe:** {firstCommitDate} -> {lastCommitDate} ({daysSinceLastCommit} days since last activity)
**Commits:** {totalCommits}
**Codebase:** {sourceFileCount} source files ({codebaseMaturity})
---
## Project
**Name:** {projectName}
**Soul:** {soul}
**Phase reached:** {phase description, or "unknown -- inferred from codebase maturity"}
{1-2 sentences: what this project was building, what state it reached}
---
## State Reached
**What was working:** {concrete features/components identified from git log and codebase}
**What was incomplete:** {planned but unfinished work from TODO/FIXME, stale branches, commit history}
**Progress:** {codebaseMaturity} -- {sourceFileCount} source files, {totalCommits} commits
---
## Abandonment Cause
**Primary cause:** {primaryCause}
**Evidence:** {causeEvidence}
{IF secondaryCause:}
**Secondary signal:** {secondaryCause}
{1-2 paragraphs: honest but compassionate analysis of why work stopped, using composting language from the taxonomy}
---
## Fascination Threads
{IF fascinationThreads from spark.md:}
- {thread 1}
- {thread 2}
{ELSE:}
- {inferred themes from codebase and git analysis}
---
## Options
**Recommended: Option {N} -- {option name}**
### Option 1: Full Revival
**Score:** {scores.fullRevival}/10 {IF recommended: "-- RECOMMENDED"}
Continue where it left off. Resume development from the current state.
**Re-entry sketch:**
- Resume at: {phase or area to pick up}
- First 3 things to address: {specific items from codebase analysis}
- Estimated effort to get back to working state: {hours}
- Risks: {what might have rotted -- dependencies, APIs, assumptions}
### Option 2: Soul Transplant
**Score:** {scores.soulTransplant}/10 {IF recommended: "-- RECOMMENDED"}
Fresh start preserving the core fascination. New spark.md derived from original threads.
**Transplant preview:**
- Core fascination to carry forward: {theme}
- What the old implementation taught: {lessons}
- Suggested reframe: {how to approach differently}
### Option 3: Organ Harvest
**Score:** {scores.organHarvest}/10 {IF recommended: "-- RECOMMENDED"}
Extract the valuable parts. Writes .pyro/harvest.md with extractable artifacts.
**Artifact preview:**
FOR EACH reusableArtifact (up to 5):
- **{name}** (`{path}`): {description}
### Option 4: Let It Rest
**Score:** {scores.letItRest}/10 {IF recommended: "-- RECOMMENDED"}
This project has given what it can. Run /autopsy to extract its fascinations for future projects.
---
Select an option (1-4) to proceed. Or adjust -- tell me if the cause analysis
is wrong, if I missed artifacts, or if the scores don't match your gut feeling.
// -- 5. HANDLE DEVELOPER RESPONSE ------------------------------------------------
match (developer_response) {
/^[1-4]$/ | /option [1-4]/i | /full revival/i | /soul transplant/i | /organ harvest/i | /let it rest/i => {
Map response to option number
SET selectedOption = matched option
execute(selectedOption)
}
/^cancel$/i | /^nevermind$/i => {
Output: "Revival analysis complete. No changes made. Come back when you're ready."
STOP
}
_ => {
// Treat as correction or clarification
Incorporate feedback into analysis (adjust cause, scores, artifacts)
Re-output the affected sections with updated analysis
End with the same selection prompt
}
}
// -- 6. EXECUTE CHOSEN OPTION -----------------------------------------------------
execute(choice) {
// Load option templates
Read @${CLAUDE_PLUGIN_ROOT}/skills/revive/reference/revival-options.md
match (choice) {
1 => { // Full Revival
// Produce concrete re-entry plan
Output:
# Re-Entry Plan -- {projectName}
**Path:** Full Revival
**Resume at:** Phase {phase} -- {phase description}
## First 3 Things to Fix/Update
1. {specific item with file path and what to do}
2. {specific item}
3. {specific item}
## Estimated Effort
**To get back to working state:** {hours} hours
**To reach next milestone:** {hours} hours
## Risks (What Might Have Rotted)
- {dependency that may have updated}
- {API that may have changed}
- {assumption that may no longer hold}
## Next Step
Start with item 1 above. Run `/pulse` after your first session back to
establish a momentum baseline.
// Update state.md if it exists
IF projectState != "NO_PROJECT_STATE":
Read .pyro/state.md
Update frontmatter:
last_skill: revive
last_activity: {today}
status: active
momentum: steady
Write .pyro/state.md
}
2 => { // Soul Transplant
// Load fascination extraction guide from report-template.md
Read @${CLAUDE_PLUGIN_ROOT}/skills/autopsy/reference/report-template.md
// Use the 5-lens detection method to identify core fascination
// Apply lenses to source material (soul, spark, commit history, README)
// Lens A -- DOMAIN: What field or problem space?
// Lens B -- MECHANIC: What interaction or technical mechanic?
// Lens C -- AESTHETIC: What visual or experiential quality?
// Lens D -- TENSION: What interesting problem or contradiction?
// Lens E -- EMOTIONAL REGISTER: What feeling was being designed for?
// Derive the transplanted idea: reframe around fascination, not old implementation
SET transplantedIdea = new idea statement derived from fascination + lessons
SET carriedThreads = fascinationThreads (or inferred)
// Write new spark.md per state-files.md schema
Write .pyro/spark.md:
---
idea: "{transplantedIdea}"
sparked: {today}
fascination_threads: {carriedThreads as YAML array}
thumbnails_considered: 0
iterations: 0
---
## The Idea
{2-3 paragraphs: what the transplanted thing IS, reframed around the fascination}
## Why This
{Why this direction, drawing from original fascination threads + lessons from what went wrong}
## Key Tensions
{2-3 tensions or open questions, informed by the original project's experience}
## Original Input
"[Soul transplant from {projectName}]: {soul}"
Output:
Soul transplanted. New `.pyro/spark.md` written.
**Transplanted idea:** "{transplantedIdea}"
**Carried forward:** {carriedThreads}
**Sparked:** {today}
Run `/spark` to explore this transplanted idea, or `/explore` to generate
design directions from it.
}
3 => { // Organ Harvest
SET today = current date (YYYY-MM-DD)
SET sourcePath = current working directory (absolute path)
// Write harvest manifest
Write .pyro/harvest.md:
---
source_project: "{projectName}"
harvested: {today}
source_path: "{sourcePath}"
artifacts_count: {reusableArtifacts.length}
---
# Harvest Manifest -- {projectName}
Extracted from {projectName} on {today}. Each artifact includes its
original location and extraction instructions.
## Artifacts
FOR EACH artifact IN reusableArtifacts (numbered):
### {N}. {artifact.name}
**Source:** `{artifact.path}`
**What it does:** {artifact.description}
**How to extract:** {specific instructions -- copy, adapt, or refactor}
**Dependencies:** {what else it needs to work}
Output:
Harvest manifest written to `.pyro/harvest.md`.
**{reusableArtifacts.length}** artifacts documented from **{projectName}**.
Each artifact has extraction instructions. Copy them into your next project
as needed -- the manifest stays here as a reference.
}
4 => { // Let It Rest
Output:
This project has given what it can.
Run `/autopsy` to extract its fascinations into your index. The themes that
drove this work will feed your next project through `/spark`.
// No files written. Developer runs /autopsy separately.
}
}
}
// -- 7. MAIN EXECUTION ORDER ------------------------------------------------------
// Execute in this order:
// 1. archaeology() -- gather all evidence (state, spark, git, codebase, index)
// 2. diagnose_cause() -- classify primary abandonment cause
// 3. recommend() -- score four options, pick recommendation
// 4. Output report -- archaeological report + four options (FIRST output)
// 5. Await developer response
// 6. Handle: select option -> execute(choice) | feedback -> revise | cancel -> stop
}