@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,346 @@
1
+ ---
2
+ name: audit
3
+ description: "Review past Claude Code sessions for PBR workflow compliance and UX quality."
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 tokens. Begin executing Step 0 immediately.**
7
+
8
+ ## Step 0 — Immediate Output
9
+
10
+ **Before ANY tool calls**, display this banner:
11
+
12
+ ```
13
+ ╔══════════════════════════════════════════════════════════════╗
14
+ ║ PLAN-BUILD-RUN ► SESSION AUDIT ║
15
+ ╚══════════════════════════════════════════════════════════════╝
16
+ ```
17
+
18
+ Then proceed to Step 1.
19
+
20
+ # $pbr-audit — Session Compliance & UX Review
21
+
22
+ You are running the **audit** skill. Your job is to analyze past Claude Code session logs for this project, checking PBR workflow compliance (STATE.md updates, hook firing, commit format, skill usage) and user experience quality (flow choice, friction, unmet expectations). You produce a comprehensive report document.
23
+
24
+ This skill uses **parallel Task() delegation** to analyze multiple sessions simultaneously, keeping main context lean.
25
+
26
+ ---
27
+
28
+ ## Context Budget
29
+
30
+ Reference: `skills/shared/context-budget.md` for the universal orchestrator rules.
31
+
32
+ Additionally for this skill:
33
+ - **Delegate ALL session analysis** to audit agents — do NOT read JSONL files in main context
34
+ - Main context handles: argument parsing, session discovery, agent orchestration, report synthesis
35
+ - Target: main context stays under 20% utilization
36
+
37
+ ---
38
+
39
+ ## Step 1 — Parse Arguments
40
+
41
+ Parse `$ARGUMENTS` for:
42
+
43
+ | Argument | Default | Description |
44
+ |----------|---------|-------------|
45
+ | `--from DATE` | Start of today | Start of audit window (ISO date or natural language) |
46
+ | `--to DATE` | Now | End of audit window |
47
+ | `--today` | false | Shorthand for `--from` start of today `--to` now |
48
+ | `--mode MODE` | `full` | `compliance` = workflow only, `ux` = user experience only, `full` = both |
49
+
50
+ **Natural language parsing**: Accept formats like:
51
+ - `--today` or just `today`
52
+ - `--from 2026-02-21` or `--from "yesterday"`
53
+ - `--from "3 days ago"` or `--from "last monday"`
54
+ - A bare date like `02/21` implies `--from 02/21 --to 02/21` (full day)
55
+ - A bare `3` implies last 3 days
56
+
57
+ If no arguments provided, default to `--today --mode full`.
58
+
59
+ Display the parsed time range to the user:
60
+
61
+ ```
62
+ Audit window: {from} → {to}
63
+ Mode: {mode}
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Step 2 — Discover Session Logs
69
+
70
+ Session JSONL files live at:
71
+ ```
72
+ ~/.claude/projects/{encoded-project-path}/*.jsonl
73
+ ```
74
+
75
+ Where `{encoded-project-path}` encodes the project directory path (e.g., `D:\Repos\plan-build-run` → `D--Repos-plan-build-run`).
76
+
77
+ **CRITICAL**: Determine the correct encoded path for the current project by listing `~/.claude/projects/` and finding the directory that matches.
78
+
79
+ Use Bash to find sessions in the audit window:
80
+
81
+ ```bash
82
+ find ~/.claude/projects/{encoded-path}/ -name "*.jsonl" -maxdepth 1 \
83
+ -newermt "{from_datetime}" ! -newermt "{to_datetime}" | sort
84
+ ```
85
+
86
+ For each session file found, also check for subagent logs:
87
+ ```bash
88
+ ls ~/.claude/projects/{encoded-path}/{session-id}/agents/*.jsonl 2>/dev/null
89
+ ```
90
+
91
+ Display discovery results:
92
+
93
+ ```
94
+ Found {N} sessions in audit window:
95
+ {session-id-1} ({size}, {date})
96
+ {session-id-2} ({size}, {date})
97
+ ...
98
+ ```
99
+
100
+ If no sessions found, display an error and exit:
101
+ ```
102
+ ╔══════════════════════════════════════════════════════════════╗
103
+ ║ ERROR ║
104
+ ╚══════════════════════════════════════════════════════════════╝
105
+
106
+ No session logs found between {from} and {to}.
107
+ Check: ~/.claude/projects/{encoded-path}/
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Step 3 — Discover Git Activity
113
+
114
+ In parallel with session analysis (Step 4), gather git commit data for the audit window:
115
+
116
+ ```bash
117
+ git log --since="{from_iso}" --until="{to_iso}" --format="%h %s %an %ai" --all
118
+ ```
119
+
120
+ Check for:
121
+ - Conventional commit format violations
122
+ - Forbidden `Co-Authored-By` lines
123
+ - Release-please automated commits
124
+
125
+ This data feeds into the final report synthesis.
126
+
127
+ ---
128
+
129
+ ## Step 4 — Spawn Audit Agents
130
+
131
+ **CRITICAL**: Spawn one `pbr:audit` agent per session, ALL in parallel. Do NOT analyze sessions sequentially.
132
+
133
+ For each session:
134
+
135
+ ```
136
+ Task({
137
+ subagent_type: "pbr:audit",
138
+ prompt: "<files_to_read>
139
+ CRITICAL: Read these files BEFORE any other action:
140
+ 1. {absolute_path_to_session.jsonl} — session log to analyze
141
+ 2. {subagent log paths, if any} — subagent session logs
142
+ </files_to_read>
143
+ <audit_assignment>
144
+ Session JSONL: {absolute_path_to_session.jsonl}
145
+ Subagent logs: {list of subagent jsonl paths, or 'none'}
146
+ Audit mode: {mode}
147
+ Output path: DO NOT write to disk — return findings inline.
148
+
149
+ Analyze this session for PBR workflow compliance and/or UX quality
150
+ per your audit checklists. Return your full findings as structured
151
+ markdown in your response.
152
+ </audit_assignment>"
153
+ })
154
+ ```
155
+
156
+ Also spawn a git analysis agent (can use a Bash agent or general-purpose):
157
+
158
+ ```
159
+ Task({
160
+ subagent_type: "Bash",
161
+ model: "haiku",
162
+ prompt: "Run these git commands in {project_dir}:
163
+ 1. git log --since='{from}' --until='{to}' --format='%h|%s|%an|%ai' --all
164
+ 2. git log --since='{from}' --until='{to}' --all --format='%B' | grep -i 'co-authored-by' || echo 'None found'
165
+ Report: all commits, any format violations against pattern {type}({scope}): {desc}, any co-author lines."
166
+ })
167
+ ```
168
+
169
+ Display progress:
170
+
171
+ ```
172
+ ◐ Analyzing {N} sessions in parallel...
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Step 5 — Collect and Synthesize
178
+
179
+ As agents complete, check each audit agent's Task() output for `## AUDIT COMPLETE`. If the marker is absent, mark that session as "analysis failed" in the synthesis and skip its findings — do not treat incomplete output as valid analysis. Log: `⚠ Session {id}: audit agent did not return completion marker — skipping.`
180
+
181
+ Wait for all agents before proceeding.
182
+
183
+ Synthesize across all sessions:
184
+
185
+ ### 5a. Executive Summary
186
+ - Total sessions, total commits, releases
187
+ - Overall compliance: how many sessions passed/failed
188
+ - Headline finding (the most important issue)
189
+
190
+ ### 5b. Per-Session Summary Table
191
+ | Session | Duration | Commands | Compliance | UX Rating |
192
+ |---------|----------|----------|------------|-----------|
193
+
194
+ ### 5c. Cross-Session Patterns
195
+ - Recurring issues (e.g., STATE.md never read across multiple sessions)
196
+ - Hook coverage gaps
197
+ - Common flow mistakes
198
+
199
+ ### 5d. Consolidated Findings
200
+ Merge and deduplicate findings across sessions. Categorize by severity:
201
+ - **CRITICAL**: Workflow bypassed despite user requests, hooks not firing
202
+ - **HIGH**: State files not consulted, missing artifacts
203
+ - **MEDIUM**: Suboptimal flow choice, missing feedback
204
+ - **LOW**: Minor ceremony issues, informational
205
+
206
+ ### 5e. Recommendations
207
+ Prioritize as:
208
+ - **Immediate**: Fix in next session
209
+ - **Short-term**: Fix in next sprint/milestone
210
+ - **Medium-term**: Architectural improvements
211
+
212
+ ---
213
+
214
+ ## Step 6 — Write Report
215
+
216
+ **CRITICAL**: Write the full report to disk. Do NOT just display it inline.
217
+
218
+ Write to: `.planning/audits/{YYYY-MM-DD}-session-audit.md`
219
+
220
+ Create `.planning/audits/` directory if it doesn't exist.
221
+
222
+ The report should follow this structure:
223
+
224
+ ```markdown
225
+ # PBR Session Audit Report — {date range}
226
+
227
+ **Audit Period:** {from} – {to}
228
+ **Sessions Analyzed:** {N}
229
+ **Commits:** {N}
230
+ **Mode:** {mode}
231
+
232
+ ---
233
+
234
+ ## Executive Summary
235
+ {2-3 sentence overview}
236
+
237
+ ## Session Summary
238
+ {per-session table}
239
+
240
+ ## Detailed Session Analysis
241
+ {per-session findings}
242
+
243
+ ## Git Activity
244
+ {commit summary, format compliance}
245
+
246
+ ## Cross-Session Patterns
247
+ {recurring issues}
248
+
249
+ ## Consolidated Findings
250
+ ### Critical
251
+ ### High
252
+ ### Medium
253
+ ### Low
254
+
255
+ ## Recommendations
256
+ ### Immediate
257
+ ### Short-Term
258
+ ### Medium-Term
259
+
260
+ ---
261
+ *Generated by $pbr-audit on {date}*
262
+ ```
263
+
264
+ ---
265
+
266
+ ## Step 6b — Spot-Check Artifacts
267
+
268
+ **Before displaying results, verify the report landed on disk:**
269
+
270
+ 1. Glob `.planning/audits/{YYYY-MM-DD}-session-audit.md` to confirm the file exists
271
+ 2. If missing: re-attempt the write (Step 6). If still missing, display an error and include findings inline instead.
272
+
273
+ ---
274
+
275
+ ## Step 7 — Display Summary
276
+
277
+ After writing the report, display inline (keep it concise — the full report is on disk):
278
+
279
+ ```
280
+ ╔══════════════════════════════════════════════════════════════╗
281
+ ║ PLAN-BUILD-RUN ► AUDIT COMPLETE ✓ ║
282
+ ╚══════════════════════════════════════════════════════════════╝
283
+
284
+ {N} sessions analyzed, {N} commits reviewed
285
+
286
+ Compliance: {X}/{N} sessions passed
287
+ UX Rating: {average or per-session ratings}
288
+
289
+ Top findings:
290
+ 1. {headline finding 1}
291
+ 2. {headline finding 2}
292
+ 3. {headline finding 3}
293
+
294
+ Full report: .planning/audits/{filename}
295
+
296
+
297
+ ╔══════════════════════════════════════════════════════════════╗
298
+ ║ ▶ NEXT UP ║
299
+ ╚══════════════════════════════════════════════════════════════╝
300
+
301
+ {Smart routing based on findings:}
302
+ - If critical issues found: **Fix workflow** → `$pbr-quick`
303
+ - If todos identified: **Create todos** → `$pbr-todo add "{description}"`
304
+ - Default: **See project status** → `$pbr-status`
305
+
306
+ <sub>`/clear` first → fresh context window</sub>
307
+ ```
308
+
309
+ ---
310
+
311
+ ## Error Handling
312
+
313
+ ### Agent fails to analyze a session
314
+ If an audit agent fails:
315
+ ```
316
+ ⚠ Failed to analyze session {id}: {error}
317
+ Continuing with remaining {N-1} sessions.
318
+ ```
319
+
320
+ Include a note in the final report that session was skipped.
321
+
322
+ ### No sessions found
323
+ Display error (Step 2) and exit gracefully.
324
+
325
+ ### Very large session files (>5MB)
326
+ Warn the agent to sample rather than read the full log:
327
+ ```
328
+ Note: Session {id} is {size}MB. Sampling key sections (first 200 lines, last 200 lines, user messages, hook events).
329
+ ```
330
+
331
+ ---
332
+
333
+ ## Anti-Patterns
334
+
335
+ Reference: `skills/shared/universal-anti-patterns.md` for rules that apply to ALL skills.
336
+
337
+ Additionally for this skill:
338
+
339
+ 1. **DO NOT** read JSONL files in main context — always delegate to audit agents
340
+ 2. **DO NOT** display the full report inline — write to disk, show summary
341
+ 3. **DO NOT** analyze sessions sequentially — spawn all agents in parallel
342
+ 4. **DO NOT** report findings without evidence (line numbers, timestamps, quotes)
343
+ 5. **DO NOT** judge explore sessions for missing STATE.md updates (explore is read-only)
344
+ 6. **DO NOT** flag release-please/merge commits as format violations
345
+ 7. **DO NOT** fabricate UX ratings — base them on concrete evidence (user repetitions, escalations, course-corrections)
346
+ 8. **DO NOT** exceed 5 headline findings in the inline summary — full details go in the report file