prizmkit 1.0.144 → 1.0.148
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/run.sh +54 -1
- package/bundled/dev-pipeline/scripts/update-feature-status.py +287 -7
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +20 -8
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +20 -8
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +20 -8
- package/bundled/dev-pipeline/templates/feature-list-schema.json +1 -1
- package/bundled/dev-pipeline/tests/conftest.py +1 -0
- package/bundled/dev-pipeline/tests/test_auto_skip.py +446 -0
- package/bundled/skills/_metadata.json +16 -1
- package/bundled/skills/app-planner/SKILL.md +110 -28
- package/bundled/skills/app-planner/scripts/validate-and-generate.py +1 -1
- package/bundled/skills/prizm-kit/SKILL.md +3 -1
- package/bundled/skills/prizmkit-committer/SKILL.md +1 -1
- package/bundled/skills/prizmkit-deploy/SKILL.md +112 -0
- package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +108 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +30 -8
- package/bundled/skills/prizmkit-plan/assets/plan-template.md +19 -0
- package/bundled/skills/prizmkit-retrospective/SKILL.md +3 -1
- package/bundled/skills/recovery-workflow/SKILL.md +428 -0
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +483 -0
- package/package.json +1 -1
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "recovery-workflow"
|
|
3
|
+
description: "Recover and resume interrupted feature pipeline sessions. Detects partial work (code changes, spec/plan artifacts, branch state, test results) from failed or interrupted sessions and intelligently resumes from the correct phase — instead of discarding everything and restarting from scratch. Use this skill whenever a pipeline session fails mid-execution, times out, gets interrupted, or when the user wants to salvage partial work from a failed feature. Trigger on: 'recover feature', 'resume session', 'continue from where it stopped', 'salvage partial work', 'fix failed feature', 'session interrupted', 'recover F-XXX', 'resume F-XXX', 'continue F-XXX', 'feature stuck', 'pick up where it left off', 'session timed out', 'don't want to restart from scratch', 'token limit exceeded'. (project)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Recovery Workflow
|
|
7
|
+
|
|
8
|
+
Intelligently recover and resume interrupted feature pipeline sessions. Instead of discarding partial work and restarting from scratch (which wastes tokens and time), this skill inspects the actual filesystem state — code changes, artifacts, git branches, test results — and continues from the right point.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
User says:
|
|
13
|
+
- "Recover F-007", "Resume F-007", "Continue F-007 from where it stopped"
|
|
14
|
+
- "Feature session failed/timed out, salvage the work"
|
|
15
|
+
- "Pipeline interrupted, don't want to restart from scratch"
|
|
16
|
+
- "F-003 is stuck, pick up where it left off"
|
|
17
|
+
- "Session timed out but there's code already written"
|
|
18
|
+
|
|
19
|
+
**Do NOT use when:**
|
|
20
|
+
- User wants a clean retry from scratch → `retry-feature.sh` or `reset-feature.sh --clean --run`
|
|
21
|
+
- Pipeline is still running normally → `dev-pipeline-launcher` (Intent B: Check Status)
|
|
22
|
+
- User wants to fix a specific bug → `bug-fix-workflow`
|
|
23
|
+
- Feature never started (no state at all) → `dev-pipeline-launcher` (Intent E: Retry)
|
|
24
|
+
|
|
25
|
+
## Why This Skill Exists
|
|
26
|
+
|
|
27
|
+
Current retry tools have a fundamental limitation:
|
|
28
|
+
|
|
29
|
+
| Tool | What it does | What's lost |
|
|
30
|
+
|------|-------------|-------------|
|
|
31
|
+
| `retry-feature.sh` | Cleans all artifacts, resets status, spawns fresh session | All code changes, spec, plan — everything |
|
|
32
|
+
| `reset-feature.sh --clean --run` | Even more thorough clean + retry | Same, plus session history |
|
|
33
|
+
| `run.sh --resume-phase N` | Tells new session "start from phase N" via prompt | Better, but doesn't inspect actual worktree state — the new AI session has no memory of what was done |
|
|
34
|
+
|
|
35
|
+
The gap: when a session is interrupted mid-implementation, the **worktree already has real code changes** — possibly a spec, plan, partial or complete implementation, even passing tests. Discarding all of this wastes significant tokens and time. This skill bridges that gap by inspecting the actual filesystem state and resuming intelligently within the current interactive session.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Overview
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
recovery-workflow <feature-id>
|
|
43
|
+
│
|
|
44
|
+
├── Phase 0: Identify feature and gather context
|
|
45
|
+
│
|
|
46
|
+
├── Phase 1: Detect state (artifacts, code, tests, branch)
|
|
47
|
+
│
|
|
48
|
+
├── Phase 2: Diagnose and present recovery options
|
|
49
|
+
│
|
|
50
|
+
└── Phase 3: Execute recovery (chain remaining prizmkit skills)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Input
|
|
54
|
+
|
|
55
|
+
| Input | Required | Example |
|
|
56
|
+
|-------|----------|---------|
|
|
57
|
+
| Feature ID | Yes | `F-007` |
|
|
58
|
+
| Feature list path | No (default: `feature-list.json`) | `my-features.json` |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Phase 0: Feature Identification
|
|
63
|
+
|
|
64
|
+
**Goal**: Locate the feature and its context.
|
|
65
|
+
|
|
66
|
+
1. **Parse feature ID** from user input (e.g., "recover F-007", "resume F-007")
|
|
67
|
+
2. **Read feature-list.json** to get feature metadata:
|
|
68
|
+
```bash
|
|
69
|
+
python3 -c "
|
|
70
|
+
import json, re
|
|
71
|
+
with open('feature-list.json') as f:
|
|
72
|
+
data = json.load(f)
|
|
73
|
+
for feat in data.get('features', []):
|
|
74
|
+
if feat.get('id') == 'F-007':
|
|
75
|
+
print(json.dumps(feat, indent=2))
|
|
76
|
+
"
|
|
77
|
+
```
|
|
78
|
+
3. **Compute feature slug** (same algorithm the pipeline uses):
|
|
79
|
+
```python
|
|
80
|
+
# F-007 + "User Authentication" → "007-user-authentication"
|
|
81
|
+
numeric = feature_id.replace('F-', '').zfill(3)
|
|
82
|
+
slug = re.sub(r'[^a-z0-9\s-]', '', title.lower())
|
|
83
|
+
slug = re.sub(r'[\s]+', '-', slug.strip()).strip('-')
|
|
84
|
+
slug = f"{numeric}-{slug}"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If the feature is not found, ask the user for the correct ID or file path.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Phase 1: State Detection
|
|
92
|
+
|
|
93
|
+
**Goal**: Build a complete picture of what exists from the interrupted session.
|
|
94
|
+
|
|
95
|
+
Run the detection script:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
python3 ${SKILL_DIR}/scripts/detect-recovery-state.py \
|
|
99
|
+
--feature-id <FEATURE_ID> \
|
|
100
|
+
--feature-list feature-list.json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The script scans four categories of state and outputs structured JSON:
|
|
104
|
+
|
|
105
|
+
### 1.1 Pipeline State
|
|
106
|
+
- `dev-pipeline/state/features/{FEATURE_ID}/status.json` — pipeline tracking status, retry count, session history
|
|
107
|
+
- Last session directory — path for log inspection
|
|
108
|
+
|
|
109
|
+
### 1.2 PrizmKit Artifacts
|
|
110
|
+
- `.prizmkit/specs/{slug}/spec.md` — specification generated?
|
|
111
|
+
- `.prizmkit/specs/{slug}/plan.md` — plan generated?
|
|
112
|
+
- If plan.md exists: count completed vs total tasks (look for `[x]` vs `[ ]` checkboxes)
|
|
113
|
+
|
|
114
|
+
### 1.3 Git State
|
|
115
|
+
- **Feature branch**: does `feat/{slug}` exist?
|
|
116
|
+
- **Current branch**: are we already on the feature branch?
|
|
117
|
+
- **Uncommitted changes**: `git diff --stat` (working tree changes)
|
|
118
|
+
- **Staged changes**: `git diff --cached --stat`
|
|
119
|
+
- **Commits ahead of main**: `git log main..HEAD --oneline`
|
|
120
|
+
|
|
121
|
+
### 1.4 Code Changes
|
|
122
|
+
- Number of modified/added/deleted files
|
|
123
|
+
- Which directories were touched
|
|
124
|
+
- Whether test files were created/modified
|
|
125
|
+
|
|
126
|
+
### Detection Output
|
|
127
|
+
|
|
128
|
+
The script produces a structured JSON report:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"feature_id": "F-007",
|
|
133
|
+
"feature_title": "User Authentication",
|
|
134
|
+
"feature_slug": "007-user-authentication",
|
|
135
|
+
"pipeline": {
|
|
136
|
+
"status": "failed",
|
|
137
|
+
"retry_count": 1,
|
|
138
|
+
"last_session_id": "F-007-20260329101500",
|
|
139
|
+
"last_session_dir": "dev-pipeline/state/features/F-007/sessions/F-007-20260329101500"
|
|
140
|
+
},
|
|
141
|
+
"artifacts": {
|
|
142
|
+
"spec_exists": true,
|
|
143
|
+
"plan_exists": true,
|
|
144
|
+
"spec_path": ".prizmkit/specs/007-user-authentication/spec.md",
|
|
145
|
+
"plan_path": ".prizmkit/specs/007-user-authentication/plan.md",
|
|
146
|
+
"plan_tasks_total": 5,
|
|
147
|
+
"plan_tasks_completed": 3
|
|
148
|
+
},
|
|
149
|
+
"git": {
|
|
150
|
+
"feature_branch": "feat/007-user-authentication",
|
|
151
|
+
"branch_exists": true,
|
|
152
|
+
"on_feature_branch": true,
|
|
153
|
+
"uncommitted_files": 8,
|
|
154
|
+
"staged_files": 0,
|
|
155
|
+
"commits_ahead_of_main": 0
|
|
156
|
+
},
|
|
157
|
+
"code": {
|
|
158
|
+
"files_modified": 6,
|
|
159
|
+
"files_added": 4,
|
|
160
|
+
"test_files_touched": 2,
|
|
161
|
+
"directories_touched": ["src/auth/", "src/middleware/", "tests/"]
|
|
162
|
+
},
|
|
163
|
+
"recovery": {
|
|
164
|
+
"recommended_action": "continue_implementation",
|
|
165
|
+
"recommended_phase": "implement",
|
|
166
|
+
"reason": "spec and plan exist, 3/5 plan tasks completed, code changes present",
|
|
167
|
+
"remaining_work": "2 tasks + review + commit"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**CHECKPOINT CP-RW-0**: State detection complete, structured report available.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Phase 2: Diagnosis & Recovery Options
|
|
177
|
+
|
|
178
|
+
**Goal**: Present findings to user and agree on a recovery strategy.
|
|
179
|
+
|
|
180
|
+
### 2.1 Present Discovery Summary
|
|
181
|
+
|
|
182
|
+
Read the detection script output and show the user a clear summary:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
═══════════════════════════════════════════════════
|
|
186
|
+
Recovery Report: F-007 — User Authentication
|
|
187
|
+
═══════════════════════════════════════════════════
|
|
188
|
+
|
|
189
|
+
Pipeline Status: FAILED (retry 1)
|
|
190
|
+
Feature Branch: feat/007-user-authentication
|
|
191
|
+
|
|
192
|
+
Artifacts Found:
|
|
193
|
+
✓ spec.md (specification)
|
|
194
|
+
✓ plan.md (5 tasks, 3 completed)
|
|
195
|
+
✓ Code changes (10 files — 6 modified, 4 new)
|
|
196
|
+
✓ Test files (2 found)
|
|
197
|
+
|
|
198
|
+
Recommended: Continue implementation
|
|
199
|
+
Remaining: 2 tasks + review + commit
|
|
200
|
+
═══════════════════════════════════════════════════
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### 2.2 Run Tests (if code changes exist)
|
|
204
|
+
|
|
205
|
+
Before presenting options, run the project's test suite to understand the health of existing code:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# detect test command from .prizmkit/config.json or package.json
|
|
209
|
+
npm test # or the appropriate test command
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Include test results in the summary:
|
|
213
|
+
- How many tests pass/fail
|
|
214
|
+
- If there are failures — which tests and why
|
|
215
|
+
|
|
216
|
+
### 2.3 Present Recovery Options
|
|
217
|
+
|
|
218
|
+
Based on the detected state, offer the appropriate options. The most common scenarios:
|
|
219
|
+
|
|
220
|
+
**Scenario A: Implementation in progress** (spec + plan + code changes)
|
|
221
|
+
Most common case — session died mid-implementation.
|
|
222
|
+
|
|
223
|
+
| Option | Description |
|
|
224
|
+
|--------|-------------|
|
|
225
|
+
| **(a) Smart Resume** (recommended) | Fix test failures if any, complete remaining plan tasks, then review → commit |
|
|
226
|
+
| **(b) Review & Commit Only** | If implementation looks complete (all tasks done, tests passing), skip to code review |
|
|
227
|
+
| **(c) Re-implement from Plan** | Keep spec and plan, discard code changes, re-implement. Useful if partial code is low quality |
|
|
228
|
+
| **(d) Clean Restart** | Discard everything, start from scratch (equivalent to `reset-feature.sh --clean --run`) |
|
|
229
|
+
|
|
230
|
+
**Scenario B: Only planning artifacts** (spec/plan exist, no code changes)
|
|
231
|
+
Session died during or after planning, before implementation started.
|
|
232
|
+
|
|
233
|
+
| Option | Description |
|
|
234
|
+
|--------|-------------|
|
|
235
|
+
| **(a) Start Implementation** (recommended) | Plan is ready, begin implementing |
|
|
236
|
+
| **(b) Re-plan** | Keep spec, regenerate plan (useful if plan was incomplete or poor) |
|
|
237
|
+
| **(c) Clean Restart** | Discard everything and start over |
|
|
238
|
+
|
|
239
|
+
**Scenario C: Code changes but no artifacts** (git changes, no .prizmkit artifacts)
|
|
240
|
+
Unusual — might be manual work or artifacts were cleaned.
|
|
241
|
+
|
|
242
|
+
| Option | Description |
|
|
243
|
+
|--------|-------------|
|
|
244
|
+
| **(a) Adopt & Continue** | Read existing code, proceed to review + commit |
|
|
245
|
+
| **(b) Clean Restart** | Discard and restart |
|
|
246
|
+
|
|
247
|
+
**Scenario D: Already committed** (feature branch has commits ahead of main)
|
|
248
|
+
Session completed implementation but didn't finish post-commit steps.
|
|
249
|
+
|
|
250
|
+
| Option | Description |
|
|
251
|
+
|--------|-------------|
|
|
252
|
+
| **(a) Complete Post-commit** (recommended) | Run code review, retrospective, handle merge |
|
|
253
|
+
| **(b) Clean Restart** | Discard and restart |
|
|
254
|
+
|
|
255
|
+
**Scenario E: No state found** (no branch, no artifacts, no code)
|
|
256
|
+
Feature was never executed or was fully cleaned.
|
|
257
|
+
|
|
258
|
+
| Option | Description |
|
|
259
|
+
|--------|-------------|
|
|
260
|
+
| **(a) Run from Scratch** | Suggest using `dev-pipeline-launcher` (Intent E) or `retry-feature.sh` instead |
|
|
261
|
+
|
|
262
|
+
Ask the user to choose. Default to the recommended option.
|
|
263
|
+
|
|
264
|
+
**CHECKPOINT CP-RW-1**: User confirmed recovery strategy.
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Phase 3: Execute Recovery
|
|
269
|
+
|
|
270
|
+
**Goal**: Execute the remaining phases based on the user's chosen strategy.
|
|
271
|
+
|
|
272
|
+
### 3.0 Branch Setup
|
|
273
|
+
|
|
274
|
+
Ensure we're on the right branch:
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
# If feature branch exists but we're not on it:
|
|
278
|
+
git checkout feat/{slug}
|
|
279
|
+
|
|
280
|
+
# If no feature branch but code changes are on current branch:
|
|
281
|
+
git checkout -b feat/{slug}
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### 3.1 Read Existing Artifacts
|
|
285
|
+
|
|
286
|
+
Load the artifacts that were preserved, so we have full context:
|
|
287
|
+
|
|
288
|
+
1. **Read spec.md** (if exists) — understand what this feature should do
|
|
289
|
+
2. **Read plan.md** (if exists) — understand the implementation plan and task breakdown
|
|
290
|
+
3. **Scan code changes** — `git diff main --stat` to understand what was already done
|
|
291
|
+
4. **Read relevant `.prizm-docs/`** — load project context (L0 root, relevant L1)
|
|
292
|
+
|
|
293
|
+
This step replaces the Phase 0-2 that the pipeline would have done (project bootstrap, context building, planning). The artifacts serve as memory of the interrupted session.
|
|
294
|
+
|
|
295
|
+
### 3.2 Fix Existing Test Failures (if any)
|
|
296
|
+
|
|
297
|
+
If tests are failing from the interrupted session, fix them first. Continuing implementation on top of a broken state compounds errors.
|
|
298
|
+
|
|
299
|
+
1. Read the test failure output
|
|
300
|
+
2. Read the relevant source files
|
|
301
|
+
3. Apply minimal fixes to make tests pass
|
|
302
|
+
4. Verify: run test suite → all green
|
|
303
|
+
|
|
304
|
+
If failures cannot be fixed after 3 attempts, ask the user whether to:
|
|
305
|
+
- Continue anyway (if failures are unrelated to this feature)
|
|
306
|
+
- Switch to "Re-implement from Plan" strategy
|
|
307
|
+
- Clean restart
|
|
308
|
+
|
|
309
|
+
### 3.3 Continue Implementation
|
|
310
|
+
|
|
311
|
+
If plan.md exists with incomplete tasks:
|
|
312
|
+
|
|
313
|
+
1. **Read plan.md** and identify remaining tasks — look for unchecked `[ ]` items in the Tasks section
|
|
314
|
+
2. **For each remaining task**:
|
|
315
|
+
- Read the task description from plan.md
|
|
316
|
+
- Implement the change following the same approach as `/prizmkit-implement`
|
|
317
|
+
- Run full test suite after each task
|
|
318
|
+
- Mark task as complete `[x]` in plan.md
|
|
319
|
+
3. After all tasks complete → full test suite must pass
|
|
320
|
+
|
|
321
|
+
If no plan.md exists but code changes are present (Scenario C), skip this step — go straight to review.
|
|
322
|
+
|
|
323
|
+
### 3.4 Code Review
|
|
324
|
+
|
|
325
|
+
Invoke `/prizmkit-code-review` on all changes:
|
|
326
|
+
- Review scope: all files modified/added relative to main branch (`git diff main --stat`)
|
|
327
|
+
- If review returns NEEDS_FIXES → apply fixes, re-review (max 2 rounds)
|
|
328
|
+
- If review returns PASS or PASS_WITH_WARNINGS → proceed
|
|
329
|
+
|
|
330
|
+
### 3.5 User Verification
|
|
331
|
+
|
|
332
|
+
Ask user: "Implementation recovered and reviewed. Verify before committing?"
|
|
333
|
+
- **(a) Run the app** → suggest and start the dev server
|
|
334
|
+
- **(b) Run a specific command** → execute what the user specifies
|
|
335
|
+
- **(c) Skip** → proceed directly to commit
|
|
336
|
+
|
|
337
|
+
If user reports issues: return to 3.3 (max 2 additional rounds).
|
|
338
|
+
|
|
339
|
+
### 3.6 Retrospective & Commit
|
|
340
|
+
|
|
341
|
+
1. **Invoke `/prizmkit-retrospective`** — update `.prizm-docs/` for structural changes caused by this feature
|
|
342
|
+
2. **Invoke `/prizmkit-committer`** — commit with `feat(<scope>): <description>` prefix
|
|
343
|
+
3. **Update pipeline state** — mark feature as completed:
|
|
344
|
+
```bash
|
|
345
|
+
python3 dev-pipeline/scripts/update-feature-status.py \
|
|
346
|
+
--feature-list feature-list.json \
|
|
347
|
+
--state-dir dev-pipeline/state \
|
|
348
|
+
--feature-id <FEATURE_ID> \
|
|
349
|
+
--action complete
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### 3.7 Post-Recovery
|
|
353
|
+
|
|
354
|
+
1. **Ask merge preference**:
|
|
355
|
+
- (a) Merge to main and delete feature branch
|
|
356
|
+
- (b) Keep feature branch for PR review
|
|
357
|
+
- (c) Decide later
|
|
358
|
+
|
|
359
|
+
2. **Report completion**:
|
|
360
|
+
```
|
|
361
|
+
Recovery complete: F-007 — User Authentication
|
|
362
|
+
|
|
363
|
+
Recovered from: implementation phase (3/5 tasks done)
|
|
364
|
+
Completed: 2 remaining tasks + test fixes + review + commit
|
|
365
|
+
Work preserved: spec.md, plan.md, 3 completed tasks
|
|
366
|
+
|
|
367
|
+
Next: Check pipeline status for remaining features,
|
|
368
|
+
or invoke /recovery-workflow for another failed feature.
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
3. **Suggest next steps**:
|
|
372
|
+
- If other features are pending/failed → offer to check pipeline status or recover another
|
|
373
|
+
- If this was the last feature → suggest integration verification
|
|
374
|
+
|
|
375
|
+
**CHECKPOINT CP-RW-2**: Feature recovered, committed, and pipeline state updated.
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
379
|
+
## Error Handling
|
|
380
|
+
|
|
381
|
+
| Scenario | Action |
|
|
382
|
+
|----------|--------|
|
|
383
|
+
| Feature ID not found in feature-list.json | Ask user for correct ID or file path |
|
|
384
|
+
| No state to recover (never executed) | Inform user, suggest `dev-pipeline-launcher` instead |
|
|
385
|
+
| Feature branch was deleted | Check if changes exist elsewhere; if not, offer clean start |
|
|
386
|
+
| Merge conflicts on feature branch | Show conflicts, help resolve before continuing |
|
|
387
|
+
| Test failures unfixable after 3 attempts | Escalate to user, offer alternative strategies |
|
|
388
|
+
| Code quality too low to salvage | Recommend re-implement from plan |
|
|
389
|
+
| Pipeline state file inconsistent with git | Trust git and filesystem over status.json — git is the ground truth |
|
|
390
|
+
| detection script fails | Fall back to manual detection (Phase 1 checks can be done individually via bash) |
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## Relationship to Other Skills
|
|
395
|
+
|
|
396
|
+
| Skill | Relationship |
|
|
397
|
+
|-------|-------------|
|
|
398
|
+
| `dev-pipeline-launcher` | **Upstream** — launcher can suggest this skill when features fail; this skill updates pipeline state after recovery |
|
|
399
|
+
| `retry-feature.sh` | **Alternative** — full clean retry; this skill is the smart alternative |
|
|
400
|
+
| `reset-feature.sh` | **Used by option (d)** — clean restart delegates to reset-feature |
|
|
401
|
+
| `/prizmkit-implement` | **Approach shared in Phase 3.3** — same implementation methodology |
|
|
402
|
+
| `/prizmkit-code-review` | **Called in Phase 3.4** — reviews recovered code |
|
|
403
|
+
| `/prizmkit-committer` | **Called in Phase 3.6** — commits the result |
|
|
404
|
+
| `/prizmkit-retrospective` | **Called in Phase 3.6** — updates .prizm-docs/ |
|
|
405
|
+
| `feature-workflow` | **Sibling** — feature-workflow builds new features; this skill salvages interrupted ones |
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## Comparison with Existing Recovery Tools
|
|
410
|
+
|
|
411
|
+
| Dimension | recovery-workflow | retry-feature.sh | reset + run | run.sh --resume-phase |
|
|
412
|
+
|-----------|------------------|-------------------|-------------|----------------------|
|
|
413
|
+
| State inspection | Deep (git + artifacts + tests) | None | None | None |
|
|
414
|
+
| Preserves code | Yes | No (cleans) | No (cleans) | Prompt-level only |
|
|
415
|
+
| Preserves artifacts | Yes (selective) | No | No | Prompt-level |
|
|
416
|
+
| Runs tests first | Yes | No | No | No |
|
|
417
|
+
| User choice | Multiple strategies | Always clean | Always clean | Fixed phase number |
|
|
418
|
+
| Execution mode | Interactive (in-session) | Spawns new session | Spawns new session | Spawns new session |
|
|
419
|
+
| Token efficiency | High (skips done work) | Low (redo all) | Low (redo all) | Medium |
|
|
420
|
+
| Context continuity | Full (reads existing artifacts) | None (fresh AI session) | None | Partial |
|
|
421
|
+
|
|
422
|
+
## Output
|
|
423
|
+
|
|
424
|
+
- Recovered and completed feature implementation
|
|
425
|
+
- Updated pipeline state (feature marked complete)
|
|
426
|
+
- Git commit with `feat(<scope>):` prefix
|
|
427
|
+
- Updated `.prizm-docs/` (via retrospective)
|
|
428
|
+
- Recovery summary showing what was salvaged vs what was re-done
|