@sienklogic/plan-build-run 2.3.1 → 2.4.1

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 (146) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +54 -20
  3. package/dashboard/src/services/dashboard.service.js +24 -1
  4. package/dashboard/src/services/milestone.service.js +68 -17
  5. package/package.json +1 -1
  6. package/plugins/copilot-pbr/CHANGELOG.md +19 -0
  7. package/plugins/copilot-pbr/README.md +129 -0
  8. package/plugins/copilot-pbr/agents/codebase-mapper.agent.md +109 -0
  9. package/plugins/copilot-pbr/agents/debugger.agent.md +169 -0
  10. package/plugins/copilot-pbr/agents/executor.agent.md +237 -0
  11. package/plugins/copilot-pbr/agents/general.agent.md +88 -0
  12. package/plugins/copilot-pbr/agents/integration-checker.agent.md +88 -0
  13. package/plugins/copilot-pbr/agents/plan-checker.agent.md +199 -0
  14. package/plugins/copilot-pbr/agents/planner.agent.md +181 -0
  15. package/plugins/copilot-pbr/agents/researcher.agent.md +163 -0
  16. package/plugins/copilot-pbr/agents/synthesizer.agent.md +102 -0
  17. package/plugins/copilot-pbr/agents/verifier.agent.md +194 -0
  18. package/plugins/copilot-pbr/hooks/hooks.json +144 -0
  19. package/plugins/copilot-pbr/plugin.json +30 -0
  20. package/plugins/copilot-pbr/references/agent-anti-patterns.md +25 -0
  21. package/plugins/copilot-pbr/references/agent-interactions.md +135 -0
  22. package/plugins/copilot-pbr/references/agent-teams.md +55 -0
  23. package/plugins/copilot-pbr/references/checkpoints.md +158 -0
  24. package/plugins/copilot-pbr/references/common-bug-patterns.md +14 -0
  25. package/plugins/copilot-pbr/references/config-reference.md +442 -0
  26. package/plugins/copilot-pbr/references/continuation-format.md +213 -0
  27. package/plugins/copilot-pbr/references/deviation-rules.md +113 -0
  28. package/plugins/copilot-pbr/references/git-integration.md +227 -0
  29. package/plugins/copilot-pbr/references/integration-patterns.md +118 -0
  30. package/plugins/copilot-pbr/references/model-profiles.md +100 -0
  31. package/plugins/copilot-pbr/references/model-selection.md +32 -0
  32. package/plugins/copilot-pbr/references/pbr-rules.md +194 -0
  33. package/plugins/copilot-pbr/references/plan-authoring.md +182 -0
  34. package/plugins/copilot-pbr/references/plan-format.md +288 -0
  35. package/plugins/copilot-pbr/references/planning-config.md +214 -0
  36. package/plugins/copilot-pbr/references/questioning.md +215 -0
  37. package/plugins/copilot-pbr/references/reading-verification.md +128 -0
  38. package/plugins/copilot-pbr/references/stub-patterns.md +161 -0
  39. package/plugins/copilot-pbr/references/subagent-coordination.md +120 -0
  40. package/plugins/copilot-pbr/references/ui-formatting.md +462 -0
  41. package/plugins/copilot-pbr/references/verification-patterns.md +199 -0
  42. package/plugins/copilot-pbr/references/wave-execution.md +96 -0
  43. package/plugins/copilot-pbr/rules/pbr-workflow.mdc +48 -0
  44. package/plugins/copilot-pbr/setup.ps1 +93 -0
  45. package/plugins/copilot-pbr/setup.sh +92 -0
  46. package/plugins/copilot-pbr/skills/begin/SKILL.md +566 -0
  47. package/plugins/copilot-pbr/skills/begin/templates/PROJECT.md.tmpl +34 -0
  48. package/plugins/copilot-pbr/skills/begin/templates/REQUIREMENTS.md.tmpl +19 -0
  49. package/plugins/copilot-pbr/skills/begin/templates/STATE.md.tmpl +50 -0
  50. package/plugins/copilot-pbr/skills/begin/templates/config.json.tmpl +64 -0
  51. package/plugins/copilot-pbr/skills/begin/templates/researcher-prompt.md.tmpl +20 -0
  52. package/plugins/copilot-pbr/skills/begin/templates/roadmap-prompt.md.tmpl +31 -0
  53. package/plugins/copilot-pbr/skills/begin/templates/synthesis-prompt.md.tmpl +17 -0
  54. package/plugins/copilot-pbr/skills/build/SKILL.md +901 -0
  55. package/plugins/copilot-pbr/skills/config/SKILL.md +253 -0
  56. package/plugins/copilot-pbr/skills/continue/SKILL.md +159 -0
  57. package/plugins/copilot-pbr/skills/dashboard/SKILL.md +31 -0
  58. package/plugins/copilot-pbr/skills/debug/SKILL.md +511 -0
  59. package/plugins/copilot-pbr/skills/debug/templates/continuation-prompt.md.tmpl +17 -0
  60. package/plugins/copilot-pbr/skills/debug/templates/initial-investigation-prompt.md.tmpl +28 -0
  61. package/plugins/copilot-pbr/skills/discuss/SKILL.md +343 -0
  62. package/plugins/copilot-pbr/skills/discuss/templates/CONTEXT.md.tmpl +62 -0
  63. package/plugins/copilot-pbr/skills/discuss/templates/decision-categories.md +10 -0
  64. package/plugins/copilot-pbr/skills/do/SKILL.md +66 -0
  65. package/plugins/copilot-pbr/skills/explore/SKILL.md +374 -0
  66. package/plugins/copilot-pbr/skills/health/SKILL.md +218 -0
  67. package/plugins/copilot-pbr/skills/health/templates/check-pattern.md.tmpl +31 -0
  68. package/plugins/copilot-pbr/skills/health/templates/output-format.md.tmpl +64 -0
  69. package/plugins/copilot-pbr/skills/help/SKILL.md +152 -0
  70. package/plugins/copilot-pbr/skills/import/SKILL.md +498 -0
  71. package/plugins/copilot-pbr/skills/milestone/SKILL.md +703 -0
  72. package/plugins/copilot-pbr/skills/milestone/templates/audit-report.md.tmpl +49 -0
  73. package/plugins/copilot-pbr/skills/milestone/templates/stats-file.md.tmpl +31 -0
  74. package/plugins/copilot-pbr/skills/note/SKILL.md +227 -0
  75. package/plugins/copilot-pbr/skills/pause/SKILL.md +246 -0
  76. package/plugins/copilot-pbr/skills/pause/templates/continue-here.md.tmpl +72 -0
  77. package/plugins/copilot-pbr/skills/plan/SKILL.md +649 -0
  78. package/plugins/copilot-pbr/skills/plan/templates/checker-prompt.md.tmpl +22 -0
  79. package/plugins/copilot-pbr/skills/plan/templates/gap-closure-prompt.md.tmpl +33 -0
  80. package/plugins/copilot-pbr/skills/plan/templates/planner-prompt.md.tmpl +39 -0
  81. package/plugins/copilot-pbr/skills/plan/templates/researcher-prompt.md.tmpl +20 -0
  82. package/plugins/copilot-pbr/skills/plan/templates/revision-prompt.md.tmpl +24 -0
  83. package/plugins/copilot-pbr/skills/quick/SKILL.md +351 -0
  84. package/plugins/copilot-pbr/skills/resume/SKILL.md +399 -0
  85. package/plugins/copilot-pbr/skills/review/SKILL.md +648 -0
  86. package/plugins/copilot-pbr/skills/review/templates/debugger-prompt.md.tmpl +61 -0
  87. package/plugins/copilot-pbr/skills/review/templates/gap-planner-prompt.md.tmpl +41 -0
  88. package/plugins/copilot-pbr/skills/review/templates/verifier-prompt.md.tmpl +116 -0
  89. package/plugins/copilot-pbr/skills/scan/SKILL.md +301 -0
  90. package/plugins/copilot-pbr/skills/scan/templates/mapper-prompt.md.tmpl +202 -0
  91. package/plugins/copilot-pbr/skills/setup/SKILL.md +250 -0
  92. package/plugins/copilot-pbr/skills/shared/commit-planning-docs.md +36 -0
  93. package/plugins/copilot-pbr/skills/shared/config-loading.md +103 -0
  94. package/plugins/copilot-pbr/skills/shared/context-budget.md +41 -0
  95. package/plugins/copilot-pbr/skills/shared/context-loader-task.md +87 -0
  96. package/plugins/copilot-pbr/skills/shared/digest-select.md +80 -0
  97. package/plugins/copilot-pbr/skills/shared/domain-probes.md +126 -0
  98. package/plugins/copilot-pbr/skills/shared/error-reporting.md +80 -0
  99. package/plugins/copilot-pbr/skills/shared/gate-prompts.md +389 -0
  100. package/plugins/copilot-pbr/skills/shared/phase-argument-parsing.md +46 -0
  101. package/plugins/copilot-pbr/skills/shared/progress-display.md +54 -0
  102. package/plugins/copilot-pbr/skills/shared/revision-loop.md +82 -0
  103. package/plugins/copilot-pbr/skills/shared/state-loading.md +63 -0
  104. package/plugins/copilot-pbr/skills/shared/state-update.md +162 -0
  105. package/plugins/copilot-pbr/skills/shared/universal-anti-patterns.md +34 -0
  106. package/plugins/copilot-pbr/skills/status/SKILL.md +362 -0
  107. package/plugins/copilot-pbr/skills/todo/SKILL.md +256 -0
  108. package/plugins/copilot-pbr/templates/CONTEXT.md.tmpl +53 -0
  109. package/plugins/copilot-pbr/templates/INTEGRATION-REPORT.md.tmpl +152 -0
  110. package/plugins/copilot-pbr/templates/RESEARCH-SUMMARY.md.tmpl +98 -0
  111. package/plugins/copilot-pbr/templates/ROADMAP.md.tmpl +41 -0
  112. package/plugins/copilot-pbr/templates/SUMMARY.md.tmpl +82 -0
  113. package/plugins/copilot-pbr/templates/VERIFICATION-DETAIL.md.tmpl +117 -0
  114. package/plugins/copilot-pbr/templates/codebase/ARCHITECTURE.md.tmpl +98 -0
  115. package/plugins/copilot-pbr/templates/codebase/CONCERNS.md.tmpl +93 -0
  116. package/plugins/copilot-pbr/templates/codebase/CONVENTIONS.md.tmpl +104 -0
  117. package/plugins/copilot-pbr/templates/codebase/INTEGRATIONS.md.tmpl +78 -0
  118. package/plugins/copilot-pbr/templates/codebase/STACK.md.tmpl +78 -0
  119. package/plugins/copilot-pbr/templates/codebase/STRUCTURE.md.tmpl +80 -0
  120. package/plugins/copilot-pbr/templates/codebase/TESTING.md.tmpl +107 -0
  121. package/plugins/copilot-pbr/templates/continue-here.md.tmpl +74 -0
  122. package/plugins/copilot-pbr/templates/prompt-partials/phase-project-context.md.tmpl +38 -0
  123. package/plugins/copilot-pbr/templates/research/ARCHITECTURE.md.tmpl +124 -0
  124. package/plugins/copilot-pbr/templates/research/STACK.md.tmpl +71 -0
  125. package/plugins/copilot-pbr/templates/research/SUMMARY.md.tmpl +112 -0
  126. package/plugins/copilot-pbr/templates/research-outputs/phase-research.md.tmpl +81 -0
  127. package/plugins/copilot-pbr/templates/research-outputs/project-research.md.tmpl +99 -0
  128. package/plugins/copilot-pbr/templates/research-outputs/synthesis.md.tmpl +36 -0
  129. package/plugins/cursor-pbr/.cursor-plugin/plugin.json +13 -3
  130. package/plugins/cursor-pbr/skills/dashboard/SKILL.md +14 -4
  131. package/plugins/cursor-pbr/skills/milestone/SKILL.md +10 -7
  132. package/plugins/cursor-pbr/templates/codebase/ARCHITECTURE.md.tmpl +98 -0
  133. package/plugins/cursor-pbr/templates/codebase/CONCERNS.md.tmpl +93 -0
  134. package/plugins/cursor-pbr/templates/codebase/CONVENTIONS.md.tmpl +104 -0
  135. package/plugins/cursor-pbr/templates/codebase/INTEGRATIONS.md.tmpl +78 -0
  136. package/plugins/cursor-pbr/templates/codebase/STACK.md.tmpl +78 -0
  137. package/plugins/cursor-pbr/templates/codebase/STRUCTURE.md.tmpl +80 -0
  138. package/plugins/cursor-pbr/templates/codebase/TESTING.md.tmpl +107 -0
  139. package/plugins/cursor-pbr/templates/research/ARCHITECTURE.md.tmpl +124 -0
  140. package/plugins/cursor-pbr/templates/research/STACK.md.tmpl +71 -0
  141. package/plugins/cursor-pbr/templates/research/SUMMARY.md.tmpl +112 -0
  142. package/plugins/cursor-pbr/templates/research-outputs/phase-research.md.tmpl +81 -0
  143. package/plugins/cursor-pbr/templates/research-outputs/project-research.md.tmpl +99 -0
  144. package/plugins/cursor-pbr/templates/research-outputs/synthesis.md.tmpl +36 -0
  145. package/plugins/pbr/.claude-plugin/plugin.json +7 -2
  146. package/plugins/pbr/skills/milestone/SKILL.md +10 -7
@@ -0,0 +1,33 @@
1
+ <\!-- canonical: ../../../../pbr/skills/plan/templates/gap-closure-prompt.md.tmpl -->
2
+ <!-- Source: plan/SKILL.md | Purpose: Prompt template for planner gap closure mode -->
3
+
4
+ You are the planner agent operating in Gap Closure mode.
5
+
6
+ <verification_report>
7
+ Read the verification report for gap details:
8
+ File: {absolute path to VERIFICATION.md}
9
+ </verification_report>
10
+
11
+ <existing_plans>
12
+ Read existing plans for context on what was already built:
13
+
14
+ | Plan | File Path |
15
+ |------|-----------|
16
+ {For each PLAN.md in the phase directory:}
17
+ | {plan_id} | {absolute path to PLAN.md} |
18
+ </existing_plans>
19
+
20
+ <project_context>
21
+ {If CONTEXT.md exists:}
22
+ Project context (locked decisions, constraints): {absolute path to CONTEXT.md}
23
+ Read this file for locked decisions that must be honored in gap-closure plans.
24
+ {If not: "No CONTEXT.md found."}
25
+ </project_context>
26
+
27
+ <gap_closure_instructions>
28
+ Read the verification report and create targeted plans to close each gap.
29
+ Follow your Gap Closure Mode instructions.
30
+ Number new plans starting after the last existing plan number.
31
+ Set gap_closure: true in the frontmatter of each new plan.
32
+ Write gap-closure plan files to: .planning/phases/{NN}-{slug}/
33
+ </gap_closure_instructions>
@@ -0,0 +1,39 @@
1
+ <\!-- canonical: ../../../../pbr/skills/plan/templates/planner-prompt.md.tmpl -->
2
+ <!-- Source: plan/SKILL.md | Purpose: Prompt template for spawning planner agent during phase planning -->
3
+ <!-- Depends on: templates/prompt-partials/phase-project-context.md.tmpl -->
4
+
5
+ You are the planner agent operating in Standard Planning mode.
6
+
7
+ <!-- Context blocks: Read and fill templates/prompt-partials/phase-project-context.md.tmpl -->
8
+ <!-- Include all 3 blocks: phase_context, project_context, prior_work -->
9
+
10
+ <research>
11
+ {If RESEARCH.md exists:}
12
+ Phase research available at: {absolute path to RESEARCH.md}
13
+ Read this file for technology recommendations, implementation patterns, and pitfalls.
14
+ {If not: "No phase-specific research conducted."}
15
+ {If research SUMMARY.md exists:}
16
+ Research summary available at: {absolute path to research SUMMARY.md}
17
+ </research>
18
+
19
+ <config>
20
+ Max tasks per plan: {from config.json}
21
+ Parallelization enabled: {from config.json}
22
+ TDD mode: {from config.json}
23
+ </config>
24
+
25
+ <planning_instructions>
26
+ Create executable plans for this phase following your Standard Planning mode instructions.
27
+
28
+ Key rules:
29
+ 1. Apply goal-backward methodology — derive must-haves first
30
+ 2. 2-3 tasks per plan, 5-8 files per plan maximum
31
+ 3. Assign wave numbers for parallel execution
32
+ 4. Every task needs all 5 elements: name, files, action, verify, done
33
+ 5. Honor all locked decisions from CONTEXT.md
34
+ 6. Do NOT include deferred ideas
35
+ 7. Write plan files to: .planning/phases/{NN}-{slug}/{phase}-{plan_num}-PLAN.md
36
+ 8. If any task requires env vars, API keys, or external service setup, note it in the task's <action> — the executor will generate USER-SETUP.md automatically
37
+
38
+ Use the Write tool to create each plan file.
39
+ </planning_instructions>
@@ -0,0 +1,20 @@
1
+ <\!-- canonical: ../../../../pbr/skills/plan/templates/researcher-prompt.md.tmpl -->
2
+ <!-- Source: plan/SKILL.md | Purpose: Prompt template for spawning researcher agent during phase planning -->
3
+ <!-- Depends on: templates/prompt-partials/phase-project-context.md.tmpl -->
4
+
5
+ You are the researcher agent operating in Phase Research mode.
6
+
7
+ <!-- Context blocks: Read and fill templates/prompt-partials/phase-project-context.md.tmpl -->
8
+ <!-- Include the filled <phase_context> and <project_context> blocks here. -->
9
+ <!-- Omit <prior_work> and deferred ideas -- researcher doesn't need them -->
10
+
11
+ <research_questions>
12
+ Research these specific questions for this phase:
13
+ 1. What is the best implementation approach for {phase goal}?
14
+ 2. What libraries/packages are needed?
15
+ 3. What are the common pitfalls for this type of work?
16
+ 4. What configuration is needed?
17
+ 5. How does this integrate with what's already been built?
18
+ </research_questions>
19
+
20
+ Write your findings to .planning/phases/{NN}-{slug}/RESEARCH.md using the Phase Research output format. Use the Write tool.
@@ -0,0 +1,24 @@
1
+ <\!-- canonical: ../../../../pbr/skills/plan/templates/revision-prompt.md.tmpl -->
2
+ <!-- Source: plan/SKILL.md | Purpose: Prompt template for planner revision mode when checker finds issues -->
3
+
4
+ You are the planner agent operating in Revision Mode.
5
+
6
+ <original_plans>
7
+ Read the current plan files that need revision:
8
+
9
+ | Plan | File Path |
10
+ |------|-----------|
11
+ {For each PLAN.md in the phase directory:}
12
+ | {plan_id} | {absolute path to PLAN.md} |
13
+
14
+ Read each plan file using the Read tool before revising.
15
+ </original_plans>
16
+
17
+ <checker_feedback>
18
+ [Inline the checker's issue report]
19
+ </checker_feedback>
20
+
21
+ <revision_instructions>
22
+ Revise the plans to address all BLOCKER and WARNING issues. Follow your Revision Mode instructions.
23
+ Preserve task IDs that don't need changes. Write updated plan files to the same paths.
24
+ </revision_instructions>
@@ -0,0 +1,351 @@
1
+ ---
2
+ name: quick
3
+ description: "Execute an ad-hoc task with atomic commits. Skips full plan/review."
4
+ ---
5
+
6
+ # /pbr:quick — Quick Ad-Hoc Task Execution
7
+
8
+ 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.
9
+
10
+ This skill **spawns a single Task(subagent_type: "pbr:executor")** for execution.
11
+
12
+ ---
13
+
14
+ ## Step 0 — Immediate Output
15
+
16
+ **Before ANY tool calls**, display this banner:
17
+
18
+ ```
19
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
20
+ PLAN-BUILD-RUN ► QUICK TASK
21
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
22
+ ```
23
+
24
+ Then proceed to Step 1.
25
+
26
+ ## Context Budget
27
+
28
+ Reference: `skills/shared/context-budget.md` for the universal orchestrator rules.
29
+
30
+ Additionally for this skill:
31
+ - **Never** implement the task yourself — you are a router, not a builder. ALL code changes go through a spawned `Task(subagent_type: "pbr:executor")`
32
+ - **Never** skip creating `.planning/quick/{NNN}-{slug}/` and writing PLAN.md — even trivial tasks need tracking artifacts
33
+ - **Minimize** reading executor output into main context — read only SUMMARY.md frontmatter
34
+
35
+ ## Core Principle
36
+
37
+ **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.
38
+
39
+ ---
40
+
41
+ ## Flow
42
+
43
+ ### Step 1: Check Project Context
44
+
45
+ 1. Check if `.planning/` directory exists
46
+ - If yes: read config.json for settings
47
+ - If no: create `.planning/` directory first, then warn "No Plan-Build-Run project found. This will create a standalone quick task. Consider running `/pbr:begin` first for full project tracking."
48
+
49
+ 2. **After** confirming `.planning/` directory exists (created in step 1 if needed), 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.
50
+
51
+ 3. Check if ROADMAP.md exists
52
+ - If yes: note the current phase context (quick tasks may relate to the active phase)
53
+ - If no: proceed without phase context
54
+
55
+ ### Step 2: Get Task Description
56
+
57
+ If `$ARGUMENTS` is provided and non-empty:
58
+ - Use `$ARGUMENTS` as the task description
59
+
60
+ If `$ARGUMENTS` is empty:
61
+ - Ask the user: "What do you need done? Describe the task in a sentence or two."
62
+ This is a freeform text prompt — do NOT use AskUserQuestion here. Task descriptions require arbitrary text input, not option selection.
63
+
64
+ ### Step 3: Validate Scope
65
+
66
+ Analyze the task description. If it appears to involve:
67
+ - More than ~5 files
68
+ - Multiple independent subsystems
69
+ - Significant architectural decisions
70
+ - Complex multi-step workflows
71
+
72
+ Then use the **scope-confirm** pattern (see `skills/shared/gate-prompts.md`):
73
+
74
+ Use AskUserQuestion:
75
+ 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?"
76
+ header: "Scope"
77
+ options:
78
+ - label: "Quick task" description: "Execute as lightweight task"
79
+ - label: "Full plan" description: "Switch to /pbr:plan for proper planning"
80
+ - label: "Revise" description: "Let me rewrite the task description"
81
+ multiSelect: false
82
+
83
+ If user selects "Quick task": continue to Step 4.
84
+ If user selects "Full plan": respond "Use `/pbr:plan` to create a full planning cycle for this task." and stop.
85
+ If user selects "Revise": go back to Step 2 to get a new task description.
86
+ If user types something else (freeform): interpret their response and proceed accordingly.
87
+
88
+ ### Step 4: Generate Slug and Task Number
89
+
90
+ **Generate slug:**
91
+ - Take the first 4-5 meaningful words from the description
92
+ - Lowercase, hyphen-separated
93
+ - Remove articles (a, an, the) and prepositions
94
+ - Example: "Fix auth bug in login flow" -> "fix-auth-bug-login"
95
+
96
+ **Find next task number:**
97
+ 1. Scan `.planning/quick/` directory for existing quick task directories
98
+ 2. Extract the NNN prefix from directory names (pattern: `{NNN}-{slug}/`)
99
+ 3. Next number = highest existing NNN + 1
100
+ 4. If no existing tasks: start at 001
101
+ 5. Zero-pad to 3 digits
102
+
103
+ ### Step 5: Create Quick Task Directory
104
+
105
+ Create: `.planning/quick/{NNN}-{slug}/`
106
+
107
+ ### Step 6: Create Minimal PLAN.md
108
+
109
+ Write `.planning/quick/{NNN}-{slug}/PLAN.md`:
110
+
111
+ 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.
112
+
113
+ **Plan generation rules:**
114
+ - Break the task into 1-3 tasks maximum (prefer fewer)
115
+ - Each task should be atomic (one commit per task)
116
+ - Infer file paths from the description and project context
117
+ - Include concrete verification commands
118
+ - If verification is unclear, use `echo "Manual verification needed"` and add a note
119
+
120
+ **For multi-task quick tasks**, add sequential tasks:
121
+
122
+ ```markdown
123
+ <task name="{task 1}" type="auto">
124
+ ...
125
+ </task>
126
+
127
+ <task name="{task 2}" type="auto">
128
+ ...
129
+ </task>
130
+ ```
131
+
132
+ **PLANNING GATE — verify before spawning executor:**
133
+
134
+ Before proceeding to Step 7, confirm these exist on disk:
135
+ 1. `.planning/quick/{NNN}-{slug}/` directory exists
136
+ 2. `.planning/quick/{NNN}-{slug}/PLAN.md` exists, is non-empty, and contains at least one `<task>` block
137
+
138
+ If either check fails, you have skipped steps. Go back and complete Steps 4-6. Do NOT proceed to spawning an executor.
139
+
140
+ ### Step 7: Spawn Executor
141
+
142
+ **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.
143
+
144
+ Display to the user: `◐ Spawning executor...`
145
+
146
+ Spawn a `Task(subagent_type: "pbr:executor")` with the following prompt:
147
+
148
+ ```
149
+ You are executor. Execute the following quick task plan.
150
+
151
+ Plan file: .planning/quick/{NNN}-{slug}/PLAN.md
152
+ Phase: quick
153
+ Plan ID: {NNN}
154
+
155
+ Read the plan file and execute all tasks sequentially. Follow all executor protocols:
156
+ - Atomic commits per task
157
+ - Commit format: fix(quick-{NNN}): {description} (or feat/refactor/test as appropriate)
158
+ - Run verify commands
159
+ - Create SUMMARY.md at .planning/quick/{NNN}-{slug}/SUMMARY.md
160
+
161
+ Execute now.
162
+ ```
163
+
164
+ ### Step 8: Read Results
165
+
166
+ After the executor completes:
167
+ 1. Read `.planning/quick/{NNN}-{slug}/SUMMARY.md`
168
+ 2. Check the status field:
169
+ - `completed` — task succeeded
170
+ - `partial` — some tasks completed, others failed
171
+ - `failed` — task failed entirely
172
+
173
+ ### Step 9: Update STATE.md
174
+
175
+ If STATE.md exists, update the Quick Tasks section.
176
+
177
+ **If the section doesn't exist, create it:**
178
+
179
+ ```markdown
180
+ ### Quick Tasks
181
+
182
+ | # | Description | Status | Commit |
183
+ |---|-------------|--------|--------|
184
+ ```
185
+
186
+ **Add the new entry:**
187
+
188
+ ```markdown
189
+ | {NNN} | {description} | {status indicator} | {commit hash or "N/A"} |
190
+ ```
191
+
192
+ Status indicators:
193
+ - Completed: checkmark
194
+ - Partial: warning indicator
195
+ - Failed: X indicator
196
+
197
+ ### Step 10: Clean Up Active Skill
198
+
199
+ Delete `.planning/.active-skill` if it exists. This must happen on all paths (success, partial, and failure) before reporting results.
200
+
201
+ ### Step 11: Commit Planning Docs
202
+
203
+ Reference: `skills/shared/commit-planning-docs.md` for the standard commit pattern.
204
+
205
+ If `planning.commit_docs: true` in config.json:
206
+ - Stage the quick task directory files (PLAN.md, SUMMARY.md)
207
+ - Stage STATE.md changes
208
+ - Commit: `docs(planning): quick task {NNN} - {slug}`
209
+
210
+ ### Step 12: Report Results
211
+
212
+ **Artifact check** — Before reporting, verify all required artifacts exist:
213
+ 1. `.planning/quick/{NNN}-{slug}/PLAN.md` exists
214
+ 2. `.planning/quick/{NNN}-{slug}/SUMMARY.md` exists and is non-empty
215
+ 3. STATE.md contains a quick task entry for {NNN} (if STATE.md exists)
216
+
217
+ If SUMMARY.md is missing: the executor may have failed — re-read executor output and report the failure.
218
+ If STATE.md entry is missing: write it now (Step 9 was skipped).
219
+
220
+ Display results to the user with branded output:
221
+
222
+ **If completed:**
223
+ ```
224
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
225
+ PLAN-BUILD-RUN ► QUICK TASK COMPLETE ✓
226
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
227
+
228
+ **Quick Task {NNN}:** {description}
229
+ Commit: {hash} — {commit message}
230
+ Files: {list of files changed}
231
+
232
+ ───────────────────────────────────────────────────────────────
233
+
234
+ ## ▶ Next Up
235
+
236
+ **Continue your workflow** — task complete
237
+
238
+ `/pbr:status`
239
+
240
+ <sub>`/clear` first → fresh context window</sub>
241
+
242
+ ───────────────────────────────────────────────────────────────
243
+
244
+ **Also available:**
245
+ - `/pbr:continue` — execute next logical step
246
+ - `/pbr:todo list` — see pending todos
247
+
248
+ ───────────────────────────────────────────────────────────────
249
+ ```
250
+
251
+ **If partial:**
252
+ ```
253
+ ⚠ Quick Task {NNN}: {description}
254
+ Completed: {N} of {M} tasks
255
+ Failed task: {task name} — {failure reason}
256
+
257
+ → Re-run with `/pbr:quick` to retry
258
+ → `/pbr:debug` to investigate the failure
259
+ ```
260
+
261
+ **If failed:**
262
+ ```
263
+ ╔══════════════════════════════════════════════════════════════╗
264
+ ║ ERROR ║
265
+ ╚══════════════════════════════════════════════════════════════╝
266
+
267
+ Quick Task {NNN} failed: {failure details}
268
+
269
+ **To fix:** {what to try next}
270
+ ```
271
+
272
+ ---
273
+
274
+ ## Quick Task Plan Generation
275
+
276
+ ### Inferring File Paths
277
+
278
+ When the user describes a task, infer file paths from:
279
+ 1. The project structure (use Glob to find existing files matching keywords)
280
+ 2. The tech stack (from prior SUMMARY.md files or package.json/requirements.txt)
281
+ 3. Naming conventions in the codebase
282
+ 4. Explicit file mentions in the description
283
+
284
+ ### Inferring Verification
285
+
286
+ Choose verification based on context:
287
+
288
+ | Context | Verification Command |
289
+ |---------|---------------------|
290
+ | TypeScript project | `npx tsc --noEmit` |
291
+ | Has test files | `npm test` or `pytest` |
292
+ | Has ESLint | `npx eslint {files}` |
293
+ | Python project | `python -c "import {module}"` |
294
+ | Config change | `cat {file}` to verify content |
295
+ | Script | Run the script with safe args |
296
+ | Unknown | `echo "Manual verification needed"` |
297
+
298
+ ### Commit Type Selection
299
+
300
+ | Task Nature | Commit Type |
301
+ |-------------|-------------|
302
+ | Bug fix | `fix` |
303
+ | New feature/functionality | `feat` |
304
+ | Code restructuring | `refactor` |
305
+ | Adding tests | `test` |
306
+ | Config/tooling changes | `chore` |
307
+ | Documentation | `docs` |
308
+
309
+ ---
310
+
311
+ ## Edge Cases
312
+
313
+ ### No `.planning/` directory
314
+ - Create `.planning/quick/` directory
315
+ - Proceed without STATE.md integration
316
+ - Warn user about limited tracking
317
+
318
+ ### Executor fails entirely
319
+ - Delete `.planning/.active-skill` before reporting the error
320
+ - Read error output
321
+ - Present to user with suggestion
322
+ - Do NOT auto-retry — let the user decide
323
+
324
+ ### Task description is too vague
325
+ - Ask clarifying questions as plain text prompts (do NOT use AskUserQuestion — these require freeform text answers):
326
+ - "Which file(s) need to change?"
327
+ - "What should the end result look like?"
328
+ - "Is there a specific error to fix?"
329
+
330
+ ### User provides a file path in the description
331
+ - Use it directly in the plan
332
+ - Read the file first to understand its context
333
+ - Tailor the plan to the specific file
334
+
335
+ ---
336
+
337
+ ## Anti-Patterns
338
+
339
+ **These are the most common failure modes. If you violate any of these, the skill has not executed correctly.**
340
+
341
+ 1. **DO NOT** implement the task yourself — you MUST spawn a `Task(subagent_type: "pbr:executor")`. This is the single most important rule.
342
+ 2. **DO NOT** skip creating `.planning/quick/{NNN}-{slug}/` — every quick task gets a tracking directory
343
+ 3. **DO NOT** skip writing PLAN.md — the executor needs a plan file to follow
344
+ 4. **DO NOT** create elaborate multi-wave plans — quick tasks should be 1-3 tasks max
345
+ 5. **DO NOT** spawn multiple executors — one executor for the whole quick task
346
+ 6. **DO NOT** skip the SUMMARY.md — even quick tasks need documentation
347
+ 7. **DO NOT** use `git add .` — stage specific files only
348
+ 8. **DO NOT** skip verification — every task needs a verify step
349
+ 9. **DO NOT** create a quick task for something that needs planning — suggest `/pbr:plan`
350
+ 10. **DO NOT** modify STATE.md if it doesn't exist (other than warning)
351
+ 11. **DO NOT** break the numbering sequence — always find the next number