@sienklogic/plan-build-run 2.54.0 → 2.56.0

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.
Files changed (130) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/package.json +1 -1
  3. package/plugins/codex-pbr/.codex/config.toml +101 -0
  4. package/plugins/codex-pbr/AGENTS.md +653 -0
  5. package/plugins/codex-pbr/README.md +116 -0
  6. package/plugins/codex-pbr/agents/audit.md +223 -0
  7. package/plugins/codex-pbr/agents/codebase-mapper.md +196 -0
  8. package/plugins/codex-pbr/agents/debugger.md +245 -0
  9. package/plugins/codex-pbr/agents/dev-sync.md +142 -0
  10. package/plugins/codex-pbr/agents/executor.md +429 -0
  11. package/plugins/codex-pbr/agents/general.md +131 -0
  12. package/plugins/codex-pbr/agents/integration-checker.md +178 -0
  13. package/plugins/codex-pbr/agents/plan-checker.md +253 -0
  14. package/plugins/codex-pbr/agents/planner.md +343 -0
  15. package/plugins/codex-pbr/agents/researcher.md +253 -0
  16. package/plugins/codex-pbr/agents/synthesizer.md +183 -0
  17. package/plugins/codex-pbr/agents/verifier.md +352 -0
  18. package/plugins/codex-pbr/commands/audit.md +5 -0
  19. package/plugins/codex-pbr/commands/begin.md +5 -0
  20. package/plugins/codex-pbr/commands/build.md +5 -0
  21. package/plugins/codex-pbr/commands/config.md +5 -0
  22. package/plugins/codex-pbr/commands/continue.md +5 -0
  23. package/plugins/codex-pbr/commands/dashboard.md +5 -0
  24. package/plugins/codex-pbr/commands/debug.md +5 -0
  25. package/plugins/codex-pbr/commands/discuss.md +5 -0
  26. package/plugins/codex-pbr/commands/do.md +5 -0
  27. package/plugins/codex-pbr/commands/explore.md +5 -0
  28. package/plugins/codex-pbr/commands/health.md +5 -0
  29. package/plugins/codex-pbr/commands/help.md +5 -0
  30. package/plugins/codex-pbr/commands/import.md +5 -0
  31. package/plugins/codex-pbr/commands/milestone.md +5 -0
  32. package/plugins/codex-pbr/commands/note.md +5 -0
  33. package/plugins/codex-pbr/commands/pause.md +5 -0
  34. package/plugins/codex-pbr/commands/plan.md +5 -0
  35. package/plugins/codex-pbr/commands/quick.md +5 -0
  36. package/plugins/codex-pbr/commands/resume.md +5 -0
  37. package/plugins/codex-pbr/commands/review.md +5 -0
  38. package/plugins/codex-pbr/commands/scan.md +5 -0
  39. package/plugins/codex-pbr/commands/setup.md +5 -0
  40. package/plugins/codex-pbr/commands/status.md +5 -0
  41. package/plugins/codex-pbr/commands/statusline.md +5 -0
  42. package/plugins/codex-pbr/commands/test.md +5 -0
  43. package/plugins/codex-pbr/commands/todo.md +5 -0
  44. package/plugins/codex-pbr/commands/undo.md +5 -0
  45. package/plugins/codex-pbr/references/agent-contracts.md +324 -0
  46. package/plugins/codex-pbr/references/agent-teams.md +54 -0
  47. package/plugins/codex-pbr/references/common-bug-patterns.md +13 -0
  48. package/plugins/codex-pbr/references/config-reference.md +552 -0
  49. package/plugins/codex-pbr/references/continuation-format.md +212 -0
  50. package/plugins/codex-pbr/references/deviation-rules.md +112 -0
  51. package/plugins/codex-pbr/references/git-integration.md +256 -0
  52. package/plugins/codex-pbr/references/integration-patterns.md +117 -0
  53. package/plugins/codex-pbr/references/model-profiles.md +99 -0
  54. package/plugins/codex-pbr/references/model-selection.md +31 -0
  55. package/plugins/codex-pbr/references/pbr-tools-cli.md +400 -0
  56. package/plugins/codex-pbr/references/plan-authoring.md +246 -0
  57. package/plugins/codex-pbr/references/plan-format.md +313 -0
  58. package/plugins/codex-pbr/references/questioning.md +235 -0
  59. package/plugins/codex-pbr/references/reading-verification.md +127 -0
  60. package/plugins/codex-pbr/references/signal-files.md +41 -0
  61. package/plugins/codex-pbr/references/stub-patterns.md +160 -0
  62. package/plugins/codex-pbr/references/ui-formatting.md +444 -0
  63. package/plugins/codex-pbr/references/wave-execution.md +95 -0
  64. package/plugins/codex-pbr/skills/audit/SKILL.md +346 -0
  65. package/plugins/codex-pbr/skills/begin/SKILL.md +800 -0
  66. package/plugins/codex-pbr/skills/build/SKILL.md +958 -0
  67. package/plugins/codex-pbr/skills/config/SKILL.md +267 -0
  68. package/plugins/codex-pbr/skills/continue/SKILL.md +172 -0
  69. package/plugins/codex-pbr/skills/dashboard/SKILL.md +44 -0
  70. package/plugins/codex-pbr/skills/debug/SKILL.md +530 -0
  71. package/plugins/codex-pbr/skills/discuss/SKILL.md +355 -0
  72. package/plugins/codex-pbr/skills/do/SKILL.md +68 -0
  73. package/plugins/codex-pbr/skills/explore/SKILL.md +407 -0
  74. package/plugins/codex-pbr/skills/health/SKILL.md +300 -0
  75. package/plugins/codex-pbr/skills/help/SKILL.md +229 -0
  76. package/plugins/codex-pbr/skills/import/SKILL.md +538 -0
  77. package/plugins/codex-pbr/skills/milestone/SKILL.md +620 -0
  78. package/plugins/codex-pbr/skills/note/SKILL.md +215 -0
  79. package/plugins/codex-pbr/skills/pause/SKILL.md +258 -0
  80. package/plugins/codex-pbr/skills/plan/SKILL.md +650 -0
  81. package/plugins/codex-pbr/skills/quick/SKILL.md +417 -0
  82. package/plugins/codex-pbr/skills/resume/SKILL.md +403 -0
  83. package/plugins/codex-pbr/skills/review/SKILL.md +669 -0
  84. package/plugins/codex-pbr/skills/scan/SKILL.md +325 -0
  85. package/plugins/codex-pbr/skills/setup/SKILL.md +169 -0
  86. package/plugins/codex-pbr/skills/shared/commit-planning-docs.md +35 -0
  87. package/plugins/codex-pbr/skills/shared/config-loading.md +102 -0
  88. package/plugins/codex-pbr/skills/shared/context-budget.md +77 -0
  89. package/plugins/codex-pbr/skills/shared/context-loader-task.md +86 -0
  90. package/plugins/codex-pbr/skills/shared/digest-select.md +79 -0
  91. package/plugins/codex-pbr/skills/shared/domain-probes.md +125 -0
  92. package/plugins/codex-pbr/skills/shared/error-reporting.md +59 -0
  93. package/plugins/codex-pbr/skills/shared/gate-prompts.md +388 -0
  94. package/plugins/codex-pbr/skills/shared/phase-argument-parsing.md +45 -0
  95. package/plugins/codex-pbr/skills/shared/revision-loop.md +81 -0
  96. package/plugins/codex-pbr/skills/shared/state-update.md +169 -0
  97. package/plugins/codex-pbr/skills/shared/universal-anti-patterns.md +43 -0
  98. package/plugins/codex-pbr/skills/status/SKILL.md +449 -0
  99. package/plugins/codex-pbr/skills/statusline/SKILL.md +149 -0
  100. package/plugins/codex-pbr/skills/test/SKILL.md +210 -0
  101. package/plugins/codex-pbr/skills/todo/SKILL.md +281 -0
  102. package/plugins/codex-pbr/skills/undo/SKILL.md +172 -0
  103. package/plugins/codex-pbr/templates/CONTEXT.md.tmpl +52 -0
  104. package/plugins/codex-pbr/templates/INTEGRATION-REPORT.md.tmpl +167 -0
  105. package/plugins/codex-pbr/templates/RESEARCH-SUMMARY.md.tmpl +97 -0
  106. package/plugins/codex-pbr/templates/ROADMAP.md.tmpl +47 -0
  107. package/plugins/codex-pbr/templates/SUMMARY-complex.md.tmpl +95 -0
  108. package/plugins/codex-pbr/templates/SUMMARY-minimal.md.tmpl +48 -0
  109. package/plugins/codex-pbr/templates/SUMMARY.md.tmpl +81 -0
  110. package/plugins/codex-pbr/templates/VERIFICATION-DETAIL.md.tmpl +117 -0
  111. package/plugins/codex-pbr/templates/codebase/ARCHITECTURE.md.tmpl +98 -0
  112. package/plugins/codex-pbr/templates/codebase/CONCERNS.md.tmpl +93 -0
  113. package/plugins/codex-pbr/templates/codebase/CONVENTIONS.md.tmpl +104 -0
  114. package/plugins/codex-pbr/templates/codebase/INTEGRATIONS.md.tmpl +78 -0
  115. package/plugins/codex-pbr/templates/codebase/STACK.md.tmpl +78 -0
  116. package/plugins/codex-pbr/templates/codebase/STRUCTURE.md.tmpl +80 -0
  117. package/plugins/codex-pbr/templates/codebase/TESTING.md.tmpl +107 -0
  118. package/plugins/codex-pbr/templates/continue-here.md.tmpl +73 -0
  119. package/plugins/codex-pbr/templates/pr-body.md.tmpl +22 -0
  120. package/plugins/codex-pbr/templates/prompt-partials/phase-project-context.md.tmpl +37 -0
  121. package/plugins/codex-pbr/templates/research/ARCHITECTURE.md.tmpl +124 -0
  122. package/plugins/codex-pbr/templates/research/STACK.md.tmpl +71 -0
  123. package/plugins/codex-pbr/templates/research/SUMMARY.md.tmpl +112 -0
  124. package/plugins/codex-pbr/templates/research-outputs/phase-research.md.tmpl +81 -0
  125. package/plugins/codex-pbr/templates/research-outputs/project-research.md.tmpl +99 -0
  126. package/plugins/codex-pbr/templates/research-outputs/synthesis.md.tmpl +36 -0
  127. package/plugins/copilot-pbr/plugin.json +1 -1
  128. package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
  129. package/plugins/jules-pbr/AGENTS.md +600 -0
  130. package/plugins/pbr/.claude-plugin/plugin.json +1 -1
@@ -0,0 +1,403 @@
1
+ ---
2
+ name: resume
3
+ description: "Pick up where you left off. Restores context and suggests next action."
4
+ ---
5
+
6
+ **STOP — DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Using the Read tool on this SKILL.md file wastes ~7,600 tokens. Begin executing Step 1 immediately.**
7
+
8
+ ## Step 0 — Immediate Output
9
+
10
+ **Before ANY tool calls**, display this banner:
11
+
12
+ ```
13
+ ╔══════════════════════════════════════════════════════════════╗
14
+ ║ PLAN-BUILD-RUN ► RESUMING SESSION ║
15
+ ╚══════════════════════════════════════════════════════════════╝
16
+ ```
17
+
18
+ Then proceed to Step 1.
19
+
20
+ # $pbr-resume — Resume Previous Session
21
+
22
+ You are running the **resume** skill. Your job is to find the last pause point, restore context for the user, and suggest the next action so they can continue seamlessly.
23
+
24
+ This skill runs **inline** (no Task delegation).
25
+
26
+ ---
27
+
28
+ ## Core Principle
29
+
30
+ **Get the user back to work in under 30 seconds.** Read the handoff, show what matters, and suggest the next command. Don't make them re-discover their own project state.
31
+
32
+ ---
33
+
34
+ ## Resumption Priority Hierarchy
35
+
36
+ When resuming, scan for conditions in this priority order. Handle the HIGHEST priority item first:
37
+
38
+ ```
39
+ 1. 🔴 UAT-BLOCKER (diagnosed) → Fix must come first
40
+ 2. 🟡 Interrupted agent → Resume agent from checkpoint
41
+ 3. 🟡 .continue-here checkpoint → Resume from checkpoint
42
+ 4. 🟡 Incomplete plan → Complete plan execution
43
+ 5. 🟢 Phase complete → Transition to next phase
44
+ 6. 🟢 Ready to plan/execute → Normal workflow
45
+ ```
46
+
47
+ ### Scanning for Priority Items
48
+
49
+ Before presenting the standard resume view, check:
50
+
51
+ 1. **UAT Blockers**: Search for VERIFICATION.md files with `status: gaps_found` in any phase. If found and gaps are marked as blocking, surface them first: "Phase {N} has {count} blocking verification gaps. These should be fixed before continuing."
52
+
53
+ 2. **Interrupted Agents**: Check for `.checkpoint-manifest.json` files in phase directories with `checkpoints_pending` entries. These indicate a build was interrupted mid-checkpoint.
54
+
55
+ 3. **Stale .continue-here.md**: If the file references commits that don't exist in git log, warn about state corruption.
56
+
57
+ ### Auto-Reconcile STATE.md Against Filesystem
58
+
59
+ On every resume, reconcile STATE.md claims against filesystem reality. This catches both corruption and drift from interrupted operations.
60
+
61
+ **Step 1: Detect discrepancies** — Compare STATE.md values against the filesystem:
62
+
63
+ | STATE.md Claim | Filesystem Check |
64
+ |----------------|------------------|
65
+ | Phase number | Does `.planning/phases/{NN}-*/` exist? |
66
+ | Plan count | Count `*-PLAN.md` files in the phase directory |
67
+ | Completed plans | Count `SUMMARY.md` files in the phase directory |
68
+ | Status "verified" | Does `VERIFICATION.md` with `status: passed` exist? |
69
+ | Status "building" | Are there PLAN.md files without SUMMARY.md? |
70
+ | Progress percentage | Recalculate from completed phases / total phases |
71
+
72
+ **Step 2: Classify** — If any discrepancy found:
73
+ - **Obvious corruption** (duplicate headers, impossible percentages, phase directory missing): flag as corruption
74
+ - **Stale data** (plan count wrong, status outdated): flag as drift
75
+
76
+ **Step 3: Repair** —
77
+ - For **corruption**: Present repair and ask for confirmation: "STATE.md appears corrupted. Based on the file system, you're at Phase {N} with {M}/{T} plans complete. Should I repair STATE.md?"
78
+ - For **drift**: Auto-repair silently and note: "Updated STATE.md to match filesystem (plan count {old}→{new}, status {old}→{new})."
79
+ - Log all repairs to `.planning/logs/events.jsonl` with category `state-reconcile`
80
+
81
+ ---
82
+
83
+ ## Flow
84
+
85
+ ### Step 1: Read STATE.md
86
+
87
+ Read `.planning/STATE.md` for the last known position.
88
+
89
+ **Extract:**
90
+ - Current phase and plan
91
+ - Session Continuity section (if exists):
92
+ - Last paused date
93
+ - Continue file location
94
+ - Suggested next action
95
+
96
+ **If STATE.md doesn't exist:**
97
+ - Go to **Recovery Flow** (Step 4)
98
+
99
+ ### Step 2: Search for .continue-here.md Files
100
+
101
+ Search for `.continue-here.md` files across all phase directories:
102
+
103
+ ```
104
+ .planning/phases/**/.continue-here.md
105
+ ```
106
+
107
+ **If exactly one found:**
108
+ - This is the resume point. Go to **Normal Resume** (Step 3a).
109
+
110
+ **If multiple found:**
111
+ Use the **pause-point-select** pattern (see `skills/shared/gate-prompts.md`):
112
+
113
+ Use AskUserQuestion:
114
+ question: "Found multiple pause points. Which would you like to resume?"
115
+ header: "Resume"
116
+ options:
117
+ - label: "Phase {A}" description: "Paused {date}, {brief context}"
118
+ - label: "Phase {B}" description: "Paused {date}, {brief context}"
119
+ - label: "Phase {C}" description: "Paused {date}, {brief context}"
120
+ - label: "Phase {D}" description: "Paused {date}, {brief context}"
121
+ multiSelect: false
122
+
123
+ Build options dynamically from discovered `.continue-here.md` files. Include phase name and pause date in each option. If more than 4 pause points exist, show the 4 most recent and replace the last option with:
124
+ - label: "Show earlier" description: "See older pause points"
125
+
126
+ When "Show earlier" is selected, re-prompt with the next batch of 4.
127
+
128
+ Use the selected pause point for the rest of the resume flow.
129
+
130
+ **If none found:**
131
+ - Check STATE.md for position info
132
+ - If STATE.md has position: go to **Inferred Resume** (Step 3b)
133
+ - If STATE.md has no position: go to **Recovery Flow** (Step 4)
134
+
135
+ ### Step 3a: Normal Resume (from .continue-here.md)
136
+
137
+ 1. Read the `.continue-here.md` file completely
138
+ 2. Parse all sections:
139
+ - Position (phase, plan, status)
140
+ - Completed work
141
+ - Remaining work
142
+ - Decisions
143
+ - Blockers
144
+ - Next steps
145
+
146
+ 3. Display the resume context using the branded banner:
147
+
148
+ ```
149
+ ╔══════════════════════════════════════════════════════════════╗
150
+ ║ PLAN-BUILD-RUN ► SESSION RESTORED ✓ ║
151
+ ╚══════════════════════════════════════════════════════════════╝
152
+
153
+ Resuming session from {pause date}
154
+
155
+ Position: Phase {N} -- {name}
156
+ Plan: {M} of {total}
157
+ Status: {status}
158
+
159
+ Completed last session:
160
+ {bulleted list of completed work}
161
+
162
+ Remaining in this phase:
163
+ {bulleted list of remaining plans}
164
+
165
+ {If decisions were made:}
166
+ Key decisions:
167
+ {bulleted list of decisions}
168
+
169
+ {If blockers exist:}
170
+ Blockers:
171
+ {bulleted list of blockers}
172
+ ```
173
+
174
+ 4. Validate the resume point:
175
+ - Check that the phase directory still exists
176
+ - Check that the plan files mentioned still exist
177
+ - Check git log to verify commits mentioned in completed work
178
+ - If anything is inconsistent, warn: "Some state has changed since the pause. {details}"
179
+
180
+ 5. Present the next action from the continue-here file.
181
+
182
+ **If only one clear next action exists**, present it with branded routing:
183
+ ```
184
+
185
+
186
+ ╔══════════════════════════════════════════════════════════════╗
187
+ ║ ▶ NEXT UP ║
188
+ ╚══════════════════════════════════════════════════════════════╝
189
+
190
+ **{explanation from continue-here}**
191
+
192
+ `{suggested command}`
193
+
194
+ <sub>`/clear` first → fresh context window</sub>
195
+
196
+
197
+ ```
198
+
199
+ **If multiple reasonable actions exist** (e.g., the continue-here suggests one thing but the filesystem state suggests another), use the **action-routing** pattern (see `skills/shared/gate-prompts.md`):
200
+
201
+ Use AskUserQuestion:
202
+ question: "How would you like to proceed?"
203
+ header: "Next Step"
204
+ options:
205
+ - label: "{continue-here suggestion}" description: "Resume from pause point"
206
+ - label: "{filesystem-inferred action}" description: "Based on current state"
207
+ - label: "Show status" description: "Run $pbr-status for full overview"
208
+ - label: "Something else" description: "Enter a different command"
209
+ multiSelect: false
210
+
211
+ **After user selects an option:**
212
+ - Display "Run: `$pbr-{action} {args}`" so the user can execute it
213
+ - This skill does not auto-execute — it suggests and the user acts
214
+
215
+ 6. Clean up:
216
+ - **DO NOT** delete the .continue-here.md file yet
217
+ - It will be naturally superseded when the next pause happens
218
+ - Or it can be manually removed after the user confirms they're back on track
219
+
220
+ ### Step 3b: Inferred Resume (from STATE.md only)
221
+
222
+ When there's no .continue-here.md but STATE.md has position info:
223
+
224
+ 1. Read STATE.md position
225
+ 2. Scan the current phase directory for plan and summary files
226
+ 3. Determine what's complete vs. remaining
227
+ 4. Present a reduced resume context:
228
+
229
+ ```
230
+ Resuming from STATE.md (no pause file found)
231
+
232
+ Position: Phase {N} -- {name}
233
+ Progress: {completed}/{total} plans complete
234
+
235
+ {Plans with summaries listed as complete}
236
+ {Plans without summaries listed as remaining}
237
+
238
+ Note: No detailed pause context available. Run `$pbr-status` for a full overview.
239
+ ```
240
+
241
+ 5. Suggest the next action based on phase state using the **action-routing** pattern:
242
+
243
+ Use AskUserQuestion:
244
+ question: "What would you like to do next?"
245
+ header: "Next Step"
246
+ options: (build dynamically from phase state)
247
+ - label: "$pbr-build {N}" description: "Continue building (plans remaining)"
248
+ - label: "$pbr-review {N}" description: "Review completed phase"
249
+ - label: "$pbr-plan {N} --gaps" description: "Fix verification gaps"
250
+ - label: "$pbr-plan {N+1}" description: "Plan the next phase"
251
+ multiSelect: false
252
+
253
+ Show only the options that apply to the current state (1-3 real options + "Something else").
254
+
255
+ ### Step 4: Recovery Flow
256
+
257
+ When neither .continue-here.md nor STATE.md position data exists:
258
+
259
+ 1. Check if `.planning/` directory exists at all
260
+ - If no, display:
261
+ ```
262
+ ╔══════════════════════════════════════════════════════════════╗
263
+ ║ ERROR ║
264
+ ╚══════════════════════════════════════════════════════════════╝
265
+
266
+ No Plan-Build-Run project found.
267
+
268
+ **To fix:** Run `$pbr-begin` to start a new project, or `$pbr-scan` to analyze an existing codebase.
269
+ ```
270
+ - Stop here.
271
+
272
+ 2. If `.planning/` exists, scan for any project state:
273
+ - Check for ROADMAP.md
274
+ - Check for any phase directories
275
+ - Check for any SUMMARY.md files
276
+ - Check for config.json
277
+
278
+ 3. If some state exists:
279
+
280
+ ```
281
+ Found a Plan-Build-Run project but no pause point.
282
+
283
+ Project has:
284
+ - {count} phases in ROADMAP.md
285
+ - {count} phase directories
286
+ - {count} completed plans (SUMMARY.md files)
287
+
288
+ Attempting to determine position...
289
+ ```
290
+
291
+ 4. Infer position:
292
+ - Find the last phase with SUMMARY.md files
293
+ - Check if all plans in that phase have summaries
294
+ - Determine the next action
295
+
296
+ 5. Present recovery status:
297
+
298
+ ```
299
+ Best guess for current position:
300
+
301
+ Phase {N}: {name}
302
+ - {X} of {Y} plans completed
303
+ - Last activity: {date from most recent SUMMARY.md or git log}
304
+
305
+ Suggested: Run `$pbr-status` for a full overview, then choose your next action.
306
+ ```
307
+
308
+ ---
309
+
310
+ ## Resume Routing
311
+
312
+ After displaying context, route to the appropriate action:
313
+
314
+ | Situation | Suggested Action |
315
+ |-----------|-----------------|
316
+ | Mid-phase, plans remaining | `$pbr-build {N}` (executor will skip completed plans) |
317
+ | Phase complete, not reviewed | `$pbr-review {N}` |
318
+ | Phase reviewed, has gaps | `$pbr-plan {N} --gaps` |
319
+ | Phase complete and verified | `$pbr-plan {N+1}` |
320
+ | Between milestones | `$pbr-milestone new` |
321
+ | Active debug session | `$pbr-debug` (will offer to resume) |
322
+ | Pending todos exist | Mention: "Also {count} pending todos. `$pbr-todo list`" |
323
+
324
+ ---
325
+
326
+ ## State Validation
327
+
328
+ When resuming, validate that the project state is consistent:
329
+
330
+ ### Git State Check
331
+
332
+ ```bash
333
+ git status --short
334
+ ```
335
+
336
+ If there are uncommitted changes:
337
+ - Warn: "There are uncommitted changes in the working directory."
338
+ - List the changed files
339
+ - Suggest: "These may be from an interrupted build. Review them before continuing."
340
+
341
+ ### Plan-Summary Consistency
342
+
343
+ For each plan file in the current phase:
344
+ - Check if SUMMARY.md exists
345
+ - If SUMMARY.md exists, check its status field
346
+ - If status is `partial` or `failed`, warn
347
+
348
+ ### Continuation Context Freshness
349
+
350
+ If .continue-here.md is more than 7 days old:
351
+ - Warn: "This pause point is {N} days old. The codebase may have changed."
352
+ - Suggest: "Run `$pbr-status` to verify the current state before continuing."
353
+
354
+ ---
355
+
356
+ ## Edge Cases
357
+
358
+ ### .continue-here.md references deleted files
359
+ - Warn about each missing file
360
+ - Attempt to find equivalent files (renamed, moved)
361
+ - If phase directory is gone: "Phase {N} directory was removed. This pause point is invalid."
362
+ - Suggest `$pbr-status` for recovery
363
+
364
+ ### Git history doesn't match .continue-here.md
365
+ - Commits referenced in the handoff may have been rebased, amended, or rolled back
366
+ - Warn: "Some commits referenced in the pause file couldn't be found in git history."
367
+ - Don't treat this as fatal — the file system state matters more than commit hashes
368
+
369
+ ### User made changes between sessions (outside Plan-Build-Run)
370
+ - The user may have manually edited files, committed changes, or modified configs
371
+ - These changes won't be reflected in .continue-here.md
372
+ - Check git log for commits not referenced in the handoff
373
+ - If found: "Found {N} commits since the last pause that aren't tracked in the handoff."
374
+
375
+ ### Multiple users / branches
376
+ - If git branch has changed since the pause:
377
+ - Warn: "You're on branch `{current}` but the pause was on `{paused-branch}`."
378
+ - Suggest switching branches or starting fresh
379
+
380
+ ### Empty project (just initialized)
381
+ - If `.planning/` exists but only has config.json, display:
382
+ ```
383
+ ╔══════════════════════════════════════════════════════════════╗
384
+ ║ ERROR ║
385
+ ╚══════════════════════════════════════════════════════════════╝
386
+
387
+ Project was initialized but no work has been done.
388
+
389
+ **To fix:** Run `$pbr-plan 1` to start planning, or `$pbr-discuss 1` to talk through the first phase.
390
+ ```
391
+
392
+ ---
393
+
394
+ ## Anti-Patterns
395
+
396
+ 1. **DO NOT** auto-execute the suggested next action — just suggest it
397
+ 2. **DO NOT** delete .continue-here.md during resume — let the next pause overwrite it
398
+ 3. **DO NOT** modify any project files — resume is read-only (except cleaning up stale state)
399
+ 4. **DO NOT** assume .continue-here.md is accurate — always validate against the file system
400
+ 5. **DO NOT** show overwhelming amounts of detail — focus on actionable information
401
+ 6. **DO NOT** ignore inconsistencies — surface them as warnings
402
+ 7. **DO NOT** skip the git state check — uncommitted changes are important to surface
403
+ 8. **DO NOT** suggest multiple actions without clear priority — one primary suggestion