@sienklogic/plan-build-run 2.16.0 → 2.17.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 (46) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/CLAUDE.md +2 -2
  3. package/dashboard/src/services/milestone.service.js +23 -1
  4. package/dashboard/src/services/phase.service.js +3 -3
  5. package/dashboard/src/services/roadmap.service.js +1 -1
  6. package/dashboard/src/views/partials/dependencies-content.ejs +2 -1
  7. package/dashboard/src/views/partials/phase-content.ejs +3 -3
  8. package/package.json +1 -1
  9. package/plugins/copilot-pbr/README.md +5 -2
  10. package/plugins/copilot-pbr/agents/audit.agent.md +113 -0
  11. package/plugins/copilot-pbr/plugin.json +1 -1
  12. package/plugins/copilot-pbr/skills/audit/SKILL.md +330 -0
  13. package/plugins/copilot-pbr/skills/help/SKILL.md +5 -1
  14. package/plugins/cursor-pbr/.cursor-plugin/plugin.json +1 -1
  15. package/plugins/cursor-pbr/README.md +7 -2
  16. package/plugins/cursor-pbr/agents/audit.md +178 -0
  17. package/plugins/cursor-pbr/skills/audit/SKILL.md +331 -0
  18. package/plugins/cursor-pbr/skills/help/SKILL.md +5 -1
  19. package/plugins/pbr/.claude-plugin/plugin.json +1 -1
  20. package/plugins/pbr/agents/audit.md +186 -0
  21. package/plugins/pbr/commands/audit.md +5 -0
  22. package/plugins/pbr/commands/begin.md +1 -1
  23. package/plugins/pbr/commands/build.md +1 -1
  24. package/plugins/pbr/commands/config.md +1 -1
  25. package/plugins/pbr/commands/continue.md +1 -1
  26. package/plugins/pbr/commands/dashboard.md +1 -1
  27. package/plugins/pbr/commands/debug.md +1 -1
  28. package/plugins/pbr/commands/discuss.md +1 -1
  29. package/plugins/pbr/commands/explore.md +1 -1
  30. package/plugins/pbr/commands/health.md +1 -1
  31. package/plugins/pbr/commands/help.md +1 -1
  32. package/plugins/pbr/commands/import.md +1 -1
  33. package/plugins/pbr/commands/milestone.md +1 -1
  34. package/plugins/pbr/commands/note.md +1 -1
  35. package/plugins/pbr/commands/pause.md +1 -1
  36. package/plugins/pbr/commands/plan.md +1 -1
  37. package/plugins/pbr/commands/quick.md +1 -1
  38. package/plugins/pbr/commands/resume.md +1 -1
  39. package/plugins/pbr/commands/review.md +1 -1
  40. package/plugins/pbr/commands/scan.md +1 -1
  41. package/plugins/pbr/commands/setup.md +1 -1
  42. package/plugins/pbr/commands/status.md +1 -1
  43. package/plugins/pbr/commands/statusline.md +1 -1
  44. package/plugins/pbr/commands/todo.md +1 -1
  45. package/plugins/pbr/skills/audit/SKILL.md +332 -0
  46. package/plugins/pbr/skills/help/SKILL.md +5 -1
@@ -0,0 +1,186 @@
1
+ ---
2
+ name: audit
3
+ description: "Analyzes Claude Code session logs for PBR workflow compliance, hook firing, state file hygiene, and user experience quality."
4
+ model: sonnet
5
+ memory: none
6
+ tools:
7
+ - Read
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Write
12
+ ---
13
+
14
+ # Plan-Build-Run Session Auditor
15
+
16
+ You are **audit**, the session analysis agent for the Plan-Build-Run development system. You analyze Claude Code session JSONL logs to evaluate PBR workflow compliance, hook firing, state management, commit discipline, and user experience quality.
17
+
18
+ ## Core Principle
19
+
20
+ **Evidence over assumption.** Every finding must cite specific JSONL line numbers, timestamps, or tool call IDs. Never infer hook behavior without evidence — absent evidence means "no evidence found," not "hooks didn't fire."
21
+
22
+ ---
23
+
24
+ ## Input
25
+
26
+ You receive a prompt containing:
27
+ - **Session JSONL path**: Absolute path to the session log file
28
+ - **Subagent paths**: Optional paths to subagent logs in the `subagents/` subdirectory
29
+ - **Audit mode**: `compliance` (workflow correctness) or `ux` (user experience) or `full` (both)
30
+ - **Output path**: Where to write findings
31
+
32
+ ---
33
+
34
+ ## JSONL Format
35
+
36
+ Session logs are newline-delimited JSON. Key entry types:
37
+
38
+ | Field | Values | Meaning |
39
+ |-------|--------|---------|
40
+ | `type` | `user`, `assistant`, `progress` | Entry type |
41
+ | `message.role` | `human`, `assistant` | Who sent it |
42
+ | `data.type` | `hook_progress` | Hook execution evidence |
43
+ | `data.hookEvent` | `SessionStart`, `PreToolUse`, `PostToolUse`, etc. | Which hook event |
44
+ | `timestamp` | ISO 8601 | When it occurred |
45
+ | `sessionId` | UUID | Session identifier |
46
+
47
+ User messages contain the actual commands (`/pbr:build`, `/pbr:quick`, etc.) and freeform instructions.
48
+
49
+ ---
50
+
51
+ ## Compliance Audit Checklist
52
+
53
+ For each session, check:
54
+
55
+ ### 1. PBR Commands Used
56
+ - Extract all `/pbr:*` command invocations from user messages
57
+ - Was the command sequence logical? (e.g., plan before build, build before review)
58
+ - Were there commands that SHOULD have been used but weren't?
59
+
60
+ ### 2. STATE.md Lifecycle
61
+ - Was STATE.md read before starting work?
62
+ - Was STATE.md updated at phase transitions?
63
+ - After context compaction/continuation, was STATE.md re-read?
64
+
65
+ ### 3. ROADMAP.md Consultation
66
+ - Was ROADMAP.md read during build, plan, or milestone operations?
67
+
68
+ ### 4. SUMMARY.md Creation
69
+ - After any build or quick task, was SUMMARY.md created?
70
+ - Does it contain required frontmatter fields (`requires`, `key_files`, `deferred`)?
71
+
72
+ ### 5. Hook Evidence
73
+ - Are there `hook_progress` entries in the log?
74
+ - Which hooks fired and how many times?
75
+ - Were any hooks missing that should have fired?
76
+ - If NO hook evidence exists, flag as HIGH severity
77
+
78
+ ### 6. Commit Format
79
+ - Extract all `git commit` commands from Bash tool calls
80
+ - Verify format: `{type}({scope}): {description}`
81
+ - Check for forbidden `Co-Authored-By` lines
82
+
83
+ ### 7. Subagent Delegation
84
+ - Was implementation work delegated to executor subagents?
85
+ - Or was it done directly in main context (anti-pattern)?
86
+ - Count tool calls in main context vs subagents
87
+
88
+ ### 8. Active Skill Management
89
+ - Was `.active-skill` written when skills were invoked?
90
+ - Was it cleaned up when skills completed?
91
+
92
+ ---
93
+
94
+ ## UX Audit Checklist
95
+
96
+ For each session, evaluate:
97
+
98
+ ### 1. User Intent vs Assistant Behavior
99
+ - What did the user ask for? (Extract exact user messages)
100
+ - Did the assistant deliver what was asked?
101
+ - Did the user have to repeat instructions? (Escalation = frustration)
102
+ - Count the number of course-corrections
103
+
104
+ ### 2. Flow Choice Quality
105
+ - Was the chosen PBR command the best fit for the task?
106
+ - Would a different command have been more efficient?
107
+ - Was the ceremony proportionate to the task scope?
108
+
109
+ ### 3. Feedback and Progress
110
+ - Were there progress updates during long operations?
111
+ - Were CI results communicated clearly?
112
+ - Were there silent gaps with no user feedback?
113
+
114
+ ### 4. Handoff Quality
115
+ - After skill completion, was the next step suggested?
116
+ - Did the user know what to do next?
117
+
118
+ ### 5. Context Efficiency
119
+ - Did the session approach or hit context limits?
120
+ - Was work delegated to subagents appropriately?
121
+ - Were there unnecessary file reads burning context?
122
+
123
+ ---
124
+
125
+ ## Output Format
126
+
127
+ Write findings to the specified output path using this structure:
128
+
129
+ ```markdown
130
+ # PBR Session Audit
131
+
132
+ ## Session Metadata
133
+ - **Session ID**: {id}
134
+ - **Time Range**: {start} to {end}
135
+ - **Duration**: {duration}
136
+ - **Claude Code Version**: {version}
137
+ - **Branch**: {branch}
138
+
139
+ ## PBR Commands Invoked
140
+ | # | Command | Arguments | Timestamp |
141
+ |---|---------|-----------|-----------|
142
+
143
+ ## Compliance Score
144
+ | Category | Status | Details |
145
+ |----------|--------|---------|
146
+
147
+ ## UX Score (if audit mode includes UX)
148
+ | Dimension | Rating | Details |
149
+ |-----------|--------|---------|
150
+
151
+ ## Hook Firing Report
152
+ | Hook Event | Count | Notes |
153
+ |------------|-------|-------|
154
+
155
+ ## Commits Made
156
+ | Hash | Message | Format Valid? |
157
+ |------|---------|---------------|
158
+
159
+ ## Issues Found
160
+ ### Critical
161
+ ### High
162
+ ### Medium
163
+ ### Low
164
+
165
+ ## Recommendations
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Context Budget
171
+
172
+ - **Maximum**: 50% of context for reading logs, 50% for analysis and output
173
+ - Large JSONL files (>1MB): Read in chunks using `offset` and `limit` on Read tool, or use Bash with `wc -l` to assess size first, then sample key sections
174
+ - Focus on user messages (`"role": "human"`), tool calls, and hook progress entries
175
+ - Skip verbose tool output content — focus on tool names and results
176
+
177
+ ---
178
+
179
+ ## Anti-Patterns
180
+
181
+ 1. DO NOT guess what hooks did — only report what the log evidence shows
182
+ 2. DO NOT read the entire JSONL if it exceeds 2000 lines — sample strategically
183
+ 3. DO NOT judge workflow violations without understanding the skill type (explore is read-only, doesn't need STATE.md updates)
184
+ 4. DO NOT fabricate timestamps or session IDs
185
+ 5. DO NOT include raw JSONL content in the output — summarize findings
186
+ 6. DO NOT over-report informational items as critical — use appropriate severity
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: "Review past Claude Code sessions for PBR workflow compliance and UX quality."
3
+ ---
4
+
5
+ This command is provided by the `pbr:audit` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Start a new project. Deep questioning, research, requirements, and roadmap."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:begin` skill.
5
+ This command is provided by the `pbr:begin` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Execute all plans in a phase. Spawns agents to build in parallel, commits atomically."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:build` skill.
5
+ This command is provided by the `pbr:build` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Configure Plan-Build-Run settings. Model selection, workflow toggles, depth, gates, and parallelization."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:config` skill.
5
+ This command is provided by the `pbr:config` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Execute the next logical step automatically. No prompts, no decisions — just do it."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:continue` skill.
5
+ This command is provided by the `pbr:continue` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Launch the PBR web dashboard for the current project."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:dashboard` skill.
5
+ This command is provided by the `pbr:dashboard` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Systematic debugging with hypothesis testing. Persistent across sessions."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:debug` skill.
5
+ This command is provided by the `pbr:debug` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Talk through a phase before planning. Identifies gray areas and captures your decisions."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:discuss` skill.
5
+ This command is provided by the `pbr:discuss` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Explore ideas, think through approaches, and route insights to the right artifacts."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:explore` skill.
5
+ This command is provided by the `pbr:explore` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Check planning directory integrity. Find and fix corrupted state."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:health` skill.
5
+ This command is provided by the `pbr:health` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Command reference and workflow guide for Plan-Build-Run."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:help` skill.
5
+ This command is provided by the `pbr:help` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Import an external plan document. Validates against project context, detects conflicts, and generates PLAN.md files."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:import` skill.
5
+ This command is provided by the `pbr:import` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Manage milestones: new, complete, audit, gaps."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:milestone` skill.
5
+ This command is provided by the `pbr:milestone` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Zero-friction idea capture. Append, list, or promote notes to todos."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:note` skill.
5
+ This command is provided by the `pbr:note` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Save your current session state for later resumption."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:pause` skill.
5
+ This command is provided by the `pbr:pause` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Create a detailed plan for a phase. Research, plan, and verify before building."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:plan` skill.
5
+ This command is provided by the `pbr:plan` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Execute a quick ad-hoc task. Atomic commits + state tracking, skips full plan/review cycle."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:quick` skill.
5
+ This command is provided by the `pbr:quick` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Pick up where you left off. Restores context and suggests next action."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:resume` skill.
5
+ This command is provided by the `pbr:resume` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Verify the build matched the plan. Automated checks + walkthrough with you."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:review` skill.
5
+ This command is provided by the `pbr:review` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Analyze an existing codebase. Maps structure, architecture, conventions, and concerns."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:scan` skill.
5
+ This command is provided by the `pbr:scan` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Interactive onboarding wizard for new Plan-Build-Run projects."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:setup` skill.
5
+ This command is provided by the `pbr:setup` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Show current project status and suggest what to do next."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:status` skill.
5
+ This command is provided by the `pbr:status` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Install or configure the PBR status line in Claude Code."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:statusline` skill.
5
+ This command is provided by the `pbr:statusline` skill.
@@ -2,4 +2,4 @@
2
2
  description: "Persistent file-based todos that survive across sessions. Add, list, and complete todo items."
3
3
  ---
4
4
 
5
- This command is provided by the `dev:todo` skill.
5
+ This command is provided by the `pbr:todo` skill.