@sienklogic/plan-build-run 2.53.0 → 2.55.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 (165) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/package.json +2 -2
  3. package/plugins/codex-pbr/agents/audit.md +223 -0
  4. package/plugins/codex-pbr/agents/codebase-mapper.md +196 -0
  5. package/plugins/codex-pbr/agents/debugger.md +245 -0
  6. package/plugins/codex-pbr/agents/dev-sync.md +142 -0
  7. package/plugins/codex-pbr/agents/executor.md +429 -0
  8. package/plugins/codex-pbr/agents/general.md +131 -0
  9. package/plugins/codex-pbr/agents/integration-checker.md +178 -0
  10. package/plugins/codex-pbr/agents/plan-checker.md +253 -0
  11. package/plugins/codex-pbr/agents/planner.md +343 -0
  12. package/plugins/codex-pbr/agents/researcher.md +253 -0
  13. package/plugins/codex-pbr/agents/synthesizer.md +183 -0
  14. package/plugins/codex-pbr/agents/verifier.md +352 -0
  15. package/plugins/codex-pbr/commands/audit.md +5 -0
  16. package/plugins/codex-pbr/commands/begin.md +5 -0
  17. package/plugins/codex-pbr/commands/build.md +5 -0
  18. package/plugins/codex-pbr/commands/config.md +5 -0
  19. package/plugins/codex-pbr/commands/continue.md +5 -0
  20. package/plugins/codex-pbr/commands/dashboard.md +5 -0
  21. package/plugins/codex-pbr/commands/debug.md +5 -0
  22. package/plugins/codex-pbr/commands/discuss.md +5 -0
  23. package/plugins/codex-pbr/commands/do.md +5 -0
  24. package/plugins/codex-pbr/commands/explore.md +5 -0
  25. package/plugins/codex-pbr/commands/health.md +5 -0
  26. package/plugins/codex-pbr/commands/help.md +5 -0
  27. package/plugins/codex-pbr/commands/import.md +5 -0
  28. package/plugins/codex-pbr/commands/milestone.md +5 -0
  29. package/plugins/codex-pbr/commands/note.md +5 -0
  30. package/plugins/codex-pbr/commands/pause.md +5 -0
  31. package/plugins/codex-pbr/commands/plan.md +5 -0
  32. package/plugins/codex-pbr/commands/quick.md +5 -0
  33. package/plugins/codex-pbr/commands/resume.md +5 -0
  34. package/plugins/codex-pbr/commands/review.md +5 -0
  35. package/plugins/codex-pbr/commands/scan.md +5 -0
  36. package/plugins/codex-pbr/commands/setup.md +5 -0
  37. package/plugins/codex-pbr/commands/status.md +5 -0
  38. package/plugins/codex-pbr/commands/statusline.md +5 -0
  39. package/plugins/codex-pbr/commands/test.md +5 -0
  40. package/plugins/codex-pbr/commands/todo.md +5 -0
  41. package/plugins/codex-pbr/commands/undo.md +5 -0
  42. package/plugins/codex-pbr/references/agent-contracts.md +324 -0
  43. package/plugins/codex-pbr/references/agent-teams.md +54 -0
  44. package/plugins/codex-pbr/references/common-bug-patterns.md +13 -0
  45. package/plugins/codex-pbr/references/config-reference.md +552 -0
  46. package/plugins/codex-pbr/references/continuation-format.md +212 -0
  47. package/plugins/codex-pbr/references/deviation-rules.md +112 -0
  48. package/plugins/codex-pbr/references/git-integration.md +256 -0
  49. package/plugins/codex-pbr/references/integration-patterns.md +117 -0
  50. package/plugins/codex-pbr/references/model-profiles.md +99 -0
  51. package/plugins/codex-pbr/references/model-selection.md +31 -0
  52. package/plugins/codex-pbr/references/pbr-tools-cli.md +400 -0
  53. package/plugins/codex-pbr/references/plan-authoring.md +246 -0
  54. package/plugins/codex-pbr/references/plan-format.md +313 -0
  55. package/plugins/codex-pbr/references/questioning.md +235 -0
  56. package/plugins/codex-pbr/references/reading-verification.md +127 -0
  57. package/plugins/codex-pbr/references/signal-files.md +41 -0
  58. package/plugins/codex-pbr/references/stub-patterns.md +160 -0
  59. package/plugins/codex-pbr/references/ui-formatting.md +444 -0
  60. package/plugins/codex-pbr/references/wave-execution.md +95 -0
  61. package/plugins/codex-pbr/skills/audit/SKILL.md +346 -0
  62. package/plugins/codex-pbr/skills/begin/SKILL.md +800 -0
  63. package/plugins/codex-pbr/skills/build/SKILL.md +958 -0
  64. package/plugins/codex-pbr/skills/config/SKILL.md +267 -0
  65. package/plugins/codex-pbr/skills/continue/SKILL.md +172 -0
  66. package/plugins/codex-pbr/skills/dashboard/SKILL.md +44 -0
  67. package/plugins/codex-pbr/skills/debug/SKILL.md +530 -0
  68. package/plugins/codex-pbr/skills/discuss/SKILL.md +355 -0
  69. package/plugins/codex-pbr/skills/do/SKILL.md +68 -0
  70. package/plugins/codex-pbr/skills/explore/SKILL.md +407 -0
  71. package/plugins/codex-pbr/skills/health/SKILL.md +300 -0
  72. package/plugins/codex-pbr/skills/help/SKILL.md +229 -0
  73. package/plugins/codex-pbr/skills/import/SKILL.md +538 -0
  74. package/plugins/codex-pbr/skills/milestone/SKILL.md +620 -0
  75. package/plugins/codex-pbr/skills/note/SKILL.md +215 -0
  76. package/plugins/codex-pbr/skills/pause/SKILL.md +258 -0
  77. package/plugins/codex-pbr/skills/plan/SKILL.md +650 -0
  78. package/plugins/codex-pbr/skills/quick/SKILL.md +417 -0
  79. package/plugins/codex-pbr/skills/resume/SKILL.md +403 -0
  80. package/plugins/codex-pbr/skills/review/SKILL.md +669 -0
  81. package/plugins/codex-pbr/skills/scan/SKILL.md +325 -0
  82. package/plugins/codex-pbr/skills/setup/SKILL.md +169 -0
  83. package/plugins/codex-pbr/skills/shared/commit-planning-docs.md +35 -0
  84. package/plugins/codex-pbr/skills/shared/config-loading.md +102 -0
  85. package/plugins/codex-pbr/skills/shared/context-budget.md +77 -0
  86. package/plugins/codex-pbr/skills/shared/context-loader-task.md +86 -0
  87. package/plugins/codex-pbr/skills/shared/digest-select.md +79 -0
  88. package/plugins/codex-pbr/skills/shared/domain-probes.md +125 -0
  89. package/plugins/codex-pbr/skills/shared/error-reporting.md +59 -0
  90. package/plugins/codex-pbr/skills/shared/gate-prompts.md +388 -0
  91. package/plugins/codex-pbr/skills/shared/phase-argument-parsing.md +45 -0
  92. package/plugins/codex-pbr/skills/shared/revision-loop.md +81 -0
  93. package/plugins/codex-pbr/skills/shared/state-update.md +169 -0
  94. package/plugins/codex-pbr/skills/shared/universal-anti-patterns.md +43 -0
  95. package/plugins/codex-pbr/skills/status/SKILL.md +449 -0
  96. package/plugins/codex-pbr/skills/statusline/SKILL.md +149 -0
  97. package/plugins/codex-pbr/skills/test/SKILL.md +210 -0
  98. package/plugins/codex-pbr/skills/todo/SKILL.md +281 -0
  99. package/plugins/codex-pbr/skills/undo/SKILL.md +172 -0
  100. package/plugins/codex-pbr/templates/CONTEXT.md.tmpl +52 -0
  101. package/plugins/codex-pbr/templates/INTEGRATION-REPORT.md.tmpl +167 -0
  102. package/plugins/codex-pbr/templates/RESEARCH-SUMMARY.md.tmpl +97 -0
  103. package/plugins/codex-pbr/templates/ROADMAP.md.tmpl +47 -0
  104. package/plugins/codex-pbr/templates/SUMMARY-complex.md.tmpl +95 -0
  105. package/plugins/codex-pbr/templates/SUMMARY-minimal.md.tmpl +48 -0
  106. package/plugins/codex-pbr/templates/SUMMARY.md.tmpl +81 -0
  107. package/plugins/codex-pbr/templates/VERIFICATION-DETAIL.md.tmpl +117 -0
  108. package/plugins/codex-pbr/templates/codebase/ARCHITECTURE.md.tmpl +98 -0
  109. package/plugins/codex-pbr/templates/codebase/CONCERNS.md.tmpl +93 -0
  110. package/plugins/codex-pbr/templates/codebase/CONVENTIONS.md.tmpl +104 -0
  111. package/plugins/codex-pbr/templates/codebase/INTEGRATIONS.md.tmpl +78 -0
  112. package/plugins/codex-pbr/templates/codebase/STACK.md.tmpl +78 -0
  113. package/plugins/codex-pbr/templates/codebase/STRUCTURE.md.tmpl +80 -0
  114. package/plugins/codex-pbr/templates/codebase/TESTING.md.tmpl +107 -0
  115. package/plugins/codex-pbr/templates/continue-here.md.tmpl +73 -0
  116. package/plugins/codex-pbr/templates/pr-body.md.tmpl +22 -0
  117. package/plugins/codex-pbr/templates/prompt-partials/phase-project-context.md.tmpl +37 -0
  118. package/plugins/codex-pbr/templates/research/ARCHITECTURE.md.tmpl +124 -0
  119. package/plugins/codex-pbr/templates/research/STACK.md.tmpl +71 -0
  120. package/plugins/codex-pbr/templates/research/SUMMARY.md.tmpl +112 -0
  121. package/plugins/codex-pbr/templates/research-outputs/phase-research.md.tmpl +81 -0
  122. package/plugins/codex-pbr/templates/research-outputs/project-research.md.tmpl +99 -0
  123. package/plugins/codex-pbr/templates/research-outputs/synthesis.md.tmpl +36 -0
  124. package/plugins/copilot-pbr/commands/setup.md +1 -1
  125. package/plugins/copilot-pbr/commands/undo.md +5 -0
  126. package/plugins/copilot-pbr/plugin.json +1 -1
  127. package/plugins/copilot-pbr/skills/begin/SKILL.md +170 -17
  128. package/plugins/copilot-pbr/skills/build/SKILL.md +73 -8
  129. package/plugins/copilot-pbr/skills/plan/SKILL.md +67 -17
  130. package/plugins/copilot-pbr/skills/review/SKILL.md +12 -1
  131. package/plugins/copilot-pbr/skills/setup/SKILL.md +66 -214
  132. package/plugins/copilot-pbr/skills/shared/context-budget.md +27 -0
  133. package/plugins/copilot-pbr/skills/status/SKILL.md +44 -2
  134. package/plugins/copilot-pbr/skills/undo/SKILL.md +172 -0
  135. package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
  136. package/plugins/cursor-pbr/commands/setup.md +1 -1
  137. package/plugins/cursor-pbr/commands/undo.md +5 -0
  138. package/plugins/cursor-pbr/skills/begin/SKILL.md +170 -17
  139. package/plugins/cursor-pbr/skills/build/SKILL.md +73 -8
  140. package/plugins/cursor-pbr/skills/plan/SKILL.md +67 -17
  141. package/plugins/cursor-pbr/skills/review/SKILL.md +12 -1
  142. package/plugins/cursor-pbr/skills/setup/SKILL.md +66 -214
  143. package/plugins/cursor-pbr/skills/shared/context-budget.md +27 -0
  144. package/plugins/cursor-pbr/skills/status/SKILL.md +44 -2
  145. package/plugins/cursor-pbr/skills/undo/SKILL.md +173 -0
  146. package/plugins/jules-pbr/AGENTS.md +600 -0
  147. package/plugins/pbr/.claude-plugin/plugin.json +1 -1
  148. package/plugins/pbr/commands/setup.md +1 -1
  149. package/plugins/pbr/commands/undo.md +5 -0
  150. package/plugins/pbr/scripts/config-schema.json +5 -1
  151. package/plugins/pbr/scripts/lib/alternatives.js +203 -0
  152. package/plugins/pbr/scripts/lib/preview.js +174 -0
  153. package/plugins/pbr/scripts/lib/skill-section.js +99 -0
  154. package/plugins/pbr/scripts/lib/step-verify.js +149 -0
  155. package/plugins/pbr/scripts/pbr-tools.js +122 -2
  156. package/plugins/pbr/scripts/validate-commit.js +2 -2
  157. package/plugins/pbr/skills/begin/SKILL.md +170 -17
  158. package/plugins/pbr/skills/begin/templates/config.json.tmpl +5 -1
  159. package/plugins/pbr/skills/build/SKILL.md +73 -8
  160. package/plugins/pbr/skills/plan/SKILL.md +67 -17
  161. package/plugins/pbr/skills/review/SKILL.md +12 -1
  162. package/plugins/pbr/skills/setup/SKILL.md +66 -214
  163. package/plugins/pbr/skills/shared/context-budget.md +27 -0
  164. package/plugins/pbr/skills/status/SKILL.md +44 -2
  165. package/plugins/pbr/skills/undo/SKILL.md +174 -0
@@ -0,0 +1,417 @@
1
+ ---
2
+ name: quick
3
+ description: "Execute an ad-hoc task with atomic commits. Skips full plan/review."
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
+ # $pbr-quick — Quick Ad-Hoc Task Execution
9
+
10
+ You are running the **quick** skill. Your job is to execute a small, self-contained task outside the normal plan/build/review cycle. Quick tasks get their own tracking, atomic commits, and state integration, but skip the overhead of full planning.
11
+
12
+ This skill **spawns a single Task(subagent_type: "pbr:executor")** for execution.
13
+
14
+ ---
15
+
16
+ ## Step 0 — Immediate Output
17
+
18
+ **Before ANY tool calls**, display this banner:
19
+
20
+ ```
21
+ ╔══════════════════════════════════════════════════════════════╗
22
+ ║ PLAN-BUILD-RUN ► QUICK TASK ║
23
+ ╚══════════════════════════════════════════════════════════════╝
24
+ ```
25
+
26
+ Then proceed to Step 1.
27
+
28
+ ## Context Budget
29
+
30
+ Reference: `skills/shared/context-budget.md` for the universal orchestrator rules.
31
+
32
+ Additionally for this skill:
33
+ - **Never** implement the task yourself — you are a router, not a builder. ALL code changes go through a spawned `Task(subagent_type: "pbr:executor")`
34
+ - **Never** skip creating `.planning/quick/{NNN}-{slug}/` and writing PLAN.md — even trivial tasks need tracking artifacts
35
+ - **Minimize** reading executor output into main context — read only SUMMARY.md frontmatter
36
+
37
+ ## Core Principle
38
+
39
+ **Quick tasks are for small, well-defined work.** If the user describes something that would take more than 3-5 tasks or touches multiple subsystems, suggest using the full plan/build cycle instead.
40
+
41
+ ---
42
+
43
+ ## Flow
44
+
45
+ ### Step 1: Check Project Context
46
+
47
+ **Init-first pattern**: When spawning agents, pass the output of `node plugins/pbr/scripts/pbr-tools.js init quick "{description}"` as context rather than having the agent read multiple files separately. This reduces file reads and prevents context-loading failures.
48
+
49
+ 1. Check if `.planning/` directory exists
50
+ - If yes: read config.json for settings
51
+ - If no: create **both** `.planning/` and `.planning/quick/` directories, then warn "No Plan-Build-Run project found. This will create a standalone quick task. Consider running `$pbr-begin` first for full project tracking."
52
+
53
+ 2. If `.planning/` exists but `.planning/quick/` does not: create `.planning/quick/` now. **Every quick task gets tracked in `.planning/quick/` — this directory MUST exist before Step 4.**
54
+
55
+ 3. **After** confirming both directories exist, write `.planning/.active-skill` with the content `quick` (single word, no newline). This registers you with the workflow enforcement hook — it will block source code writes until PLAN.md exists.
56
+
57
+ 4. Check if ROADMAP.md exists
58
+ - If yes: note the current phase context (quick tasks may relate to the active phase)
59
+ - If no: proceed without phase context
60
+
61
+ ### Step 2: Get Task Description
62
+
63
+ If `$ARGUMENTS` is provided and non-empty:
64
+ - Use `$ARGUMENTS` as the task description
65
+
66
+ If `$ARGUMENTS` is empty:
67
+ - Ask the user: "What do you need done? Describe the task in a sentence or two."
68
+ This is a freeform text prompt — do NOT use AskUserQuestion here. Task descriptions require arbitrary text input, not option selection.
69
+
70
+ ### Step 3: Validate Scope
71
+
72
+ Analyze the task description. If it appears to involve:
73
+ - More than ~5 files
74
+ - Multiple independent subsystems
75
+ - Significant architectural decisions
76
+ - Complex multi-step workflows
77
+
78
+ Then use the **scope-confirm** pattern (see `skills/shared/gate-prompts.md`):
79
+
80
+ Use AskUserQuestion:
81
+ question: "This task looks complex. Quick tasks work best for bug fixes, small features, config changes, and single-module refactors. How would you like to proceed?"
82
+ header: "Scope"
83
+ options:
84
+ - label: "Quick task" description: "Execute as lightweight task"
85
+ - label: "Full plan" description: "Switch to $pbr-plan for proper planning"
86
+ - label: "Revise" description: "Let me rewrite the task description"
87
+ multiSelect: false
88
+
89
+ If user selects "Quick task": continue to Step 4.
90
+ If user selects "Full plan": clean up `.active-skill` if it exists, then chain directly: `Skill({ skill: "pbr:plan", args: "" })`. The user's task description carries over in conversation context — the plan skill will pick it up.
91
+ If user selects "Revise": go back to Step 2 to get a new task description.
92
+ If user types something else (freeform): interpret their response and proceed accordingly.
93
+
94
+ ### Step 4: Generate Slug and Task Number
95
+
96
+ **CRITICAL (no hook): You MUST complete Steps 4, 5, and 6 before any executor is spawned. If you skip these steps, the quick task will have no tracking artifacts and no PLAN.md for the executor to follow. This is the #1 failure mode of this skill.**
97
+
98
+ **Generate slug:**
99
+ - Take the first 4-5 meaningful words from the description
100
+ - Lowercase, hyphen-separated
101
+ - Remove articles (a, an, the) and prepositions
102
+ - Example: "Fix auth bug in login flow" -> "fix-auth-bug-login"
103
+
104
+ **Find next task number:**
105
+ 1. Scan `.planning/quick/` directory for existing quick task directories
106
+ 2. Extract the NNN prefix from directory names (pattern: `{NNN}-{slug}/`)
107
+ 3. Next number = highest existing NNN + 1
108
+ 4. If no existing tasks: start at 001
109
+ 5. Zero-pad to 3 digits
110
+
111
+ ### Step 5: Create Quick Task Directory
112
+
113
+ **STOP — Use the Write or Bash tool RIGHT NOW to create this directory. Do not skip this step.**
114
+
115
+ Create: `.planning/quick/{NNN}-{slug}/`
116
+
117
+ Verify the directory exists with `ls .planning/quick/{NNN}-{slug}/` before proceeding. If the directory doesn't exist, you have a bug — go back and create it.
118
+
119
+ ### Step 6: Create Minimal PLAN.md
120
+
121
+ Write `.planning/quick/{NNN}-{slug}/PLAN.md`:
122
+
123
+ Read `references/plan-format.md` for the plan file format. Fill in all `{variable}` placeholders with actual task data from the user's description and project context.
124
+
125
+ **Plan generation rules:**
126
+ - Break the task into 1-3 tasks maximum (prefer fewer)
127
+ - Each task should be atomic (one commit per task)
128
+ - Infer file paths from the description and project context
129
+ - Include concrete verification commands
130
+ - If verification is unclear, use `echo "Manual verification needed"` and add a note
131
+
132
+ **For multi-task quick tasks**, add sequential tasks:
133
+
134
+ ```markdown
135
+ <task name="{task 1}" type="auto">
136
+ ...
137
+ </task>
138
+
139
+ <task name="{task 2}" type="auto">
140
+ ...
141
+ </task>
142
+ ```
143
+
144
+ **PLANNING GATE — verify before spawning executor:**
145
+
146
+ Before proceeding to Step 7, confirm these exist on disk:
147
+ 1. `.planning/quick/{NNN}-{slug}/` directory exists
148
+ 2. `.planning/quick/{NNN}-{slug}/PLAN.md` exists, is non-empty, and contains at least one `<task>` block
149
+
150
+ If either check fails, you have skipped steps. Go back and complete Steps 4-6. Do NOT proceed to spawning an executor.
151
+
152
+ ### Step 6b: Local LLM Task Validation (optional, advisory)
153
+
154
+ If `config.local_llm.enabled` is `true`, run a quick scope validation before spawning:
155
+
156
+ ```bash
157
+ node ${PLUGIN_ROOT}/scripts/pbr-tools.js llm classify PLAN ".planning/quick/{NNN}-{slug}/PLAN.md"
158
+ ```
159
+
160
+ - If classification is `"stub"` with confidence >= 0.7: warn `"⚠ Plan looks like a stub — executor may struggle. Consider adding more detail to task descriptions."`
161
+ - If the command fails or returns null: skip silently (local LLM unavailable)
162
+ - This is advisory only — never block on the result
163
+
164
+ ### Step 7: Spawn Executor
165
+
166
+ **Pre-spawn check** — Verify `.planning/quick/{NNN}-{slug}/PLAN.md` exists and contains at least one `<task>` block. If missing, STOP and complete Steps 4-6 first.
167
+
168
+ Display to the user: `◐ Spawning executor...`
169
+
170
+ Spawn a `Task(subagent_type: "pbr:executor")` with the following prompt:
171
+
172
+ > **Completion markers**: After executor completes, check for `## PLAN COMPLETE` or `## PLAN FAILED`. Route accordingly.
173
+
174
+ ```
175
+ You are executor. Execute the following quick task plan.
176
+
177
+ <files_to_read>
178
+ CRITICAL (no hook): Read these files BEFORE any other action:
179
+ 1. .planning/quick/{NNN}-{slug}/PLAN.md — the quick task plan with task details
180
+ 2. .planning/STATE.md — current project state and progress (if exists)
181
+ </files_to_read>
182
+
183
+ Plan file: .planning/quick/{NNN}-{slug}/PLAN.md
184
+ Phase: quick
185
+ Plan ID: {NNN}
186
+
187
+ Read the plan file and execute all tasks sequentially. Follow all executor protocols:
188
+ - Atomic commits per task
189
+ - Commit format: fix(quick-{NNN}): {description} (or feat/refactor/test as appropriate)
190
+ - Run verify commands
191
+ - Create SUMMARY.md at .planning/quick/{NNN}-{slug}/SUMMARY.md
192
+
193
+ Execute now.
194
+ ```
195
+
196
+ ### Step 8: Read Results
197
+
198
+ After the executor completes:
199
+ 1. Read `.planning/quick/{NNN}-{slug}/SUMMARY.md`
200
+ 2. Check the status field:
201
+ - `completed` — task succeeded
202
+ - `partial` — some tasks completed, others failed
203
+ - `failed` — task failed entirely
204
+
205
+ ### Step 8b: Spot-Check Executor Output
206
+
207
+ CRITICAL (no hook): Verify executor output before proceeding.
208
+
209
+ 1. **SUMMARY.md exists**: Check `.planning/quick/{NNN}-{slug}/SUMMARY.md` exists
210
+ 2. **Key files exist**: Verify first 2 files from SUMMARY.md `key_files` frontmatter exist on disk
211
+ 3. **Commits present**: Run `git log --oneline -5` and verify at least one commit matches the task scope
212
+ 4. **Self-check status**: Look for `## Self-Check: FAILED` in SUMMARY.md — if present, warn the user
213
+
214
+ If ANY spot-check fails, present the user with options: **Retry** / **Continue anyway** / **Abort**
215
+
216
+ ### Step 9: Update STATE.md
217
+
218
+ If STATE.md exists, update the Quick Tasks section.
219
+
220
+ **If the section doesn't exist, create it:**
221
+
222
+ ```markdown
223
+ ### Quick Tasks
224
+
225
+ | # | Description | Status | Commit |
226
+ |---|-------------|--------|--------|
227
+ ```
228
+
229
+ **Add the new entry:**
230
+
231
+ ```markdown
232
+ | {NNN} | {description} | {status indicator} | {commit hash or "N/A"} |
233
+ ```
234
+
235
+ Status indicators:
236
+ - Completed: checkmark
237
+ - Partial: warning indicator
238
+ - Failed: X indicator
239
+
240
+ ### Step 10: Clean Up Active Skill
241
+
242
+ Delete `.planning/.active-skill` if it exists. This must happen on all paths (success, partial, and failure) before reporting results.
243
+
244
+ ### Step 11: Commit Planning Docs
245
+
246
+ Reference: `skills/shared/commit-planning-docs.md` for the standard commit pattern.
247
+
248
+ If `planning.commit_docs: true` in config.json:
249
+ - Stage the quick task directory files (PLAN.md, SUMMARY.md)
250
+ - Stage STATE.md changes
251
+ - Commit: `docs(planning): quick task {NNN} - {slug}`
252
+
253
+ ### Step 11b: Check Pending Todos
254
+
255
+ After completing work, check if any pending todos are now satisfied:
256
+
257
+ 1. Check if `.planning/todos/pending/` exists and contains files
258
+ 2. If no pending todos: skip to Step 12
259
+ 3. If pending todos exist:
260
+ a. Read the title and description from each pending todo's YAML frontmatter
261
+ b. Compare each todo against the work just completed (the task description, files changed, commits made)
262
+ c. If a todo is **clearly satisfied** by the work (the todo's goal matches what was built):
263
+ - Move it: read the file, update `status: done`, add `completed: {YYYY-MM-DD}`, write to `.planning/todos/done/{filename}`, delete from `pending/` via Bash `rm`
264
+ - Display: `✓ Auto-closed todo {NNN}: {title} (satisfied by quick task {NNN})`
265
+ d. If a todo is **partially related** but not fully satisfied: do NOT close it, but mention it:
266
+ - Display: `ℹ Related pending todo {NNN}: {title} — may be partially addressed`
267
+ e. If a todo is unrelated: skip silently
268
+
269
+ **Important:** Only auto-close todos where the match is unambiguous. When in doubt, leave it open — false closures are worse than missed closures.
270
+
271
+ ### Step 12: Report Results
272
+
273
+ **Artifact check** — Before reporting, verify all required artifacts exist:
274
+ 1. `.planning/quick/{NNN}-{slug}/PLAN.md` exists
275
+ 2. `.planning/quick/{NNN}-{slug}/SUMMARY.md` exists and is non-empty
276
+ 3. STATE.md contains a quick task entry for {NNN} (if STATE.md exists)
277
+
278
+ If SUMMARY.md is missing: the executor may have failed — re-read executor output and report the failure.
279
+ If STATE.md entry is missing: write it now (Step 9 was skipped).
280
+
281
+ Display results to the user with branded output:
282
+
283
+ **If completed:**
284
+ ```
285
+ ╔══════════════════════════════════════════════════════════════╗
286
+ ║ PLAN-BUILD-RUN ► QUICK TASK COMPLETE ✓ ║
287
+ ╚══════════════════════════════════════════════════════════════╝
288
+
289
+ **Quick Task {NNN}:** {description}
290
+ Commit: {hash} — {commit message}
291
+ Files: {list of files changed}
292
+
293
+
294
+
295
+ ╔══════════════════════════════════════════════════════════════╗
296
+ ║ ▶ NEXT UP ║
297
+ ╚══════════════════════════════════════════════════════════════╝
298
+
299
+ **Continue your workflow** — task complete
300
+
301
+ `$pbr-status`
302
+
303
+ <sub>`/clear` first → fresh context window</sub>
304
+
305
+
306
+
307
+ **Also available:**
308
+ - `$pbr-continue` — execute next logical step
309
+ - `$pbr-todo list` — see pending todos
310
+
311
+
312
+ ```
313
+
314
+ **If partial:**
315
+ ```
316
+ ╔══════════════════════════════════════════════════════════════╗
317
+ ║ PLAN-BUILD-RUN ► QUICK TASK {NNN} PARTIAL ⚠ ║
318
+ ╚══════════════════════════════════════════════════════════════╝
319
+
320
+ Completed: {N} of {M} tasks
321
+ Failed task: {task name} — {failure reason}
322
+
323
+ → Re-run with `$pbr-quick` to retry
324
+ → `$pbr-debug` to investigate the failure
325
+ ```
326
+
327
+ **If failed:**
328
+ ```
329
+ ╔══════════════════════════════════════════════════════════════╗
330
+ ║ ERROR ║
331
+ ╚══════════════════════════════════════════════════════════════╝
332
+
333
+ Quick Task {NNN} failed: {failure details}
334
+
335
+ **To fix:** {what to try next}
336
+ ```
337
+
338
+ ---
339
+
340
+ ## Quick Task Plan Generation
341
+
342
+ ### Inferring File Paths
343
+
344
+ When the user describes a task, infer file paths from:
345
+ 1. The project structure (use Glob to find existing files matching keywords)
346
+ 2. The tech stack (from prior SUMMARY.md files or package.json/requirements.txt)
347
+ 3. Naming conventions in the codebase
348
+ 4. Explicit file mentions in the description
349
+
350
+ ### Inferring Verification
351
+
352
+ Choose verification based on context:
353
+
354
+ | Context | Verification Command |
355
+ |---------|---------------------|
356
+ | TypeScript project | `npx tsc --noEmit` |
357
+ | Has test files | `npm test` or `pytest` |
358
+ | Has ESLint | `npx eslint {files}` |
359
+ | Python project | `python -c "import {module}"` |
360
+ | Config change | `cat {file}` to verify content |
361
+ | Script | Run the script with safe args |
362
+ | Unknown | `echo "Manual verification needed"` |
363
+
364
+ ### Commit Type Selection
365
+
366
+ | Task Nature | Commit Type |
367
+ |-------------|-------------|
368
+ | Bug fix | `fix` |
369
+ | New feature/functionality | `feat` |
370
+ | Code restructuring | `refactor` |
371
+ | Adding tests | `test` |
372
+ | Config/tooling changes | `chore` |
373
+ | Documentation | `docs` |
374
+
375
+ ---
376
+
377
+ ## Edge Cases
378
+
379
+ ### No `.planning/` directory
380
+ - Create `.planning/quick/` directory
381
+ - Proceed without STATE.md integration
382
+ - Warn user about limited tracking
383
+
384
+ ### Executor fails entirely
385
+ - Delete `.planning/.active-skill` before reporting the error
386
+ - Read error output
387
+ - Present to user with suggestion
388
+ - Do NOT auto-retry — let the user decide
389
+
390
+ ### Task description is too vague
391
+ - Ask clarifying questions as plain text prompts (do NOT use AskUserQuestion — these require freeform text answers):
392
+ - "Which file(s) need to change?"
393
+ - "What should the end result look like?"
394
+ - "Is there a specific error to fix?"
395
+
396
+ ### User provides a file path in the description
397
+ - Use it directly in the plan
398
+ - Read the file first to understand its context
399
+ - Tailor the plan to the specific file
400
+
401
+ ---
402
+
403
+ ## Anti-Patterns
404
+
405
+ **These are the most common failure modes. If you violate any of these, the skill has not executed correctly.**
406
+
407
+ 1. **DO NOT** implement the task yourself — you MUST spawn a `Task(subagent_type: "pbr:executor")`. This is the single most important rule.
408
+ 2. **DO NOT** skip creating `.planning/quick/{NNN}-{slug}/` — every quick task gets a tracking directory
409
+ 3. **DO NOT** skip writing PLAN.md — the executor needs a plan file to follow
410
+ 4. **DO NOT** create elaborate multi-wave plans — quick tasks should be 1-3 tasks max
411
+ 5. **DO NOT** spawn multiple executors — one executor for the whole quick task
412
+ 6. **DO NOT** skip the SUMMARY.md — even quick tasks need documentation
413
+ 7. **DO NOT** use `git add .` — stage specific files only
414
+ 8. **DO NOT** skip verification — every task needs a verify step
415
+ 9. **DO NOT** create a quick task for something that needs planning — suggest `$pbr-plan`
416
+ 10. **DO NOT** modify STATE.md if it doesn't exist (other than warning)
417
+ 11. **DO NOT** break the numbering sequence — always find the next number