panopticon-cli 0.5.9 → 0.5.11

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 (70) hide show
  1. package/dist/{agents-M2ZOZL3P.js → agents-RL2KUSP3.js} +3 -3
  2. package/dist/{archive-planning-U3AZAKWI.js → archive-planning-54J6EP6A.js} +3 -3
  3. package/dist/{chunk-WEQW3EAT.js → chunk-F4XS2FQN.js} +3 -2
  4. package/dist/chunk-F4XS2FQN.js.map +1 -0
  5. package/dist/{chunk-OJF4QS3S.js → chunk-GIW2TUWI.js} +2 -2
  6. package/dist/{chunk-GM22HPYS.js → chunk-H7T35QDO.js} +21 -3
  7. package/dist/chunk-H7T35QDO.js.map +1 -0
  8. package/dist/{chunk-MJXYTGK5.js → chunk-JZWCL5S5.js} +2 -2
  9. package/dist/{chunk-3WDSD2VK.js → chunk-NLN3ZLCN.js} +186 -88
  10. package/dist/chunk-NLN3ZLCN.js.map +1 -0
  11. package/dist/{chunk-QQ27EVBD.js → chunk-OMOEGJDB.js} +3 -3
  12. package/dist/{chunk-4R6ATXYI.js → chunk-PFA5XE2V.js} +1 -37
  13. package/dist/chunk-PFA5XE2V.js.map +1 -0
  14. package/dist/{chunk-6OYUJ4AJ.js → chunk-R47UJWF6.js} +2 -2
  15. package/dist/{chunk-KPGVCGST.js → chunk-S7EJ2OLR.js} +10 -4
  16. package/dist/chunk-S7EJ2OLR.js.map +1 -0
  17. package/dist/{chunk-R4KPLLRB.js → chunk-SFX3BG6N.js} +1 -1
  18. package/dist/chunk-SFX3BG6N.js.map +1 -0
  19. package/dist/clean-planning-V4SSVU26.js +9 -0
  20. package/dist/cli/index.js +1111 -901
  21. package/dist/cli/index.js.map +1 -1
  22. package/dist/close-issue-5OMOP2FU.js +9 -0
  23. package/dist/compact-beads-YQDVF6FQ.js +9 -0
  24. package/dist/dashboard/prompts/merge-agent.md +11 -0
  25. package/dist/dashboard/prompts/review-agent.md +9 -0
  26. package/dist/dashboard/prompts/test-agent.md +9 -0
  27. package/dist/dashboard/prompts/work-agent.md +10 -2
  28. package/dist/dashboard/public/assets/index-5hYjhhGn.js +826 -0
  29. package/dist/dashboard/public/assets/index-DIFh3T1V.css +32 -0
  30. package/dist/dashboard/public/index.html +2 -2
  31. package/dist/dashboard/server.js +2405 -1754
  32. package/dist/index.d.ts +8 -3
  33. package/dist/index.js +3 -3
  34. package/dist/{label-cleanup-4HJVX6NP.js → label-cleanup-4IVZIPGK.js} +2 -2
  35. package/dist/{merge-agent-756U4NPX.js → merge-agent-7L7MWJEC.js} +12 -12
  36. package/dist/{specialist-context-UBVUUFJV.js → specialist-context-L37RF6Z5.js} +3 -3
  37. package/dist/{specialist-logs-FQRI3AIS.js → specialist-logs-B7UC3UDO.js} +3 -3
  38. package/dist/{specialists-CXRGSJY3.js → specialists-X4OGA7WX.js} +3 -3
  39. package/dist/{workspace-manager-OWHLR5BL.js → workspace-manager-6RP5A5HF.js} +2 -2
  40. package/package.json +1 -1
  41. package/skills/pan-new-project/SKILL.md +1 -1
  42. package/skills/pan-oversee/SKILL.md +45 -10
  43. package/skills/plan/SKILL.md +336 -0
  44. package/dist/chunk-3WDSD2VK.js.map +0 -1
  45. package/dist/chunk-4R6ATXYI.js.map +0 -1
  46. package/dist/chunk-GM22HPYS.js.map +0 -1
  47. package/dist/chunk-KPGVCGST.js.map +0 -1
  48. package/dist/chunk-R4KPLLRB.js.map +0 -1
  49. package/dist/chunk-WEQW3EAT.js.map +0 -1
  50. package/dist/clean-planning-7Z5YY64X.js +0 -9
  51. package/dist/close-issue-CTZK777I.js +0 -9
  52. package/dist/compact-beads-72SHALOL.js +0 -9
  53. package/dist/dashboard/public/assets/index-Bx4NCn9A.css +0 -32
  54. package/dist/dashboard/public/assets/index-DqPey4Of.js +0 -756
  55. package/skills/opus-plan/SKILL.md +0 -400
  56. /package/dist/{agents-M2ZOZL3P.js.map → agents-RL2KUSP3.js.map} +0 -0
  57. /package/dist/{archive-planning-U3AZAKWI.js.map → archive-planning-54J6EP6A.js.map} +0 -0
  58. /package/dist/{chunk-OJF4QS3S.js.map → chunk-GIW2TUWI.js.map} +0 -0
  59. /package/dist/{chunk-MJXYTGK5.js.map → chunk-JZWCL5S5.js.map} +0 -0
  60. /package/dist/{chunk-QQ27EVBD.js.map → chunk-OMOEGJDB.js.map} +0 -0
  61. /package/dist/{chunk-6OYUJ4AJ.js.map → chunk-R47UJWF6.js.map} +0 -0
  62. /package/dist/{clean-planning-7Z5YY64X.js.map → clean-planning-V4SSVU26.js.map} +0 -0
  63. /package/dist/{close-issue-CTZK777I.js.map → close-issue-5OMOP2FU.js.map} +0 -0
  64. /package/dist/{compact-beads-72SHALOL.js.map → compact-beads-YQDVF6FQ.js.map} +0 -0
  65. /package/dist/{label-cleanup-4HJVX6NP.js.map → label-cleanup-4IVZIPGK.js.map} +0 -0
  66. /package/dist/{merge-agent-756U4NPX.js.map → merge-agent-7L7MWJEC.js.map} +0 -0
  67. /package/dist/{specialist-context-UBVUUFJV.js.map → specialist-context-L37RF6Z5.js.map} +0 -0
  68. /package/dist/{specialist-logs-FQRI3AIS.js.map → specialist-logs-B7UC3UDO.js.map} +0 -0
  69. /package/dist/{specialists-CXRGSJY3.js.map → specialists-X4OGA7WX.js.map} +0 -0
  70. /package/dist/{workspace-manager-OWHLR5BL.js.map → workspace-manager-6RP5A5HF.js.map} +0 -0
@@ -0,0 +1,336 @@
1
+ ---
2
+ name: plan
3
+ description: >
4
+ Opus-driven planning for issues before Sonnet implementation. Creates workspace,
5
+ STATE.md, plan.vbrief.json with beads, and updates issue tracker. Ensures
6
+ strategic decisions are made by Opus, not cheaper models.
7
+ triggers:
8
+ - plan
9
+ - /plan
10
+ - create plan
11
+ allowed-tools:
12
+ - Read
13
+ - Write
14
+ - Bash
15
+ - Task
16
+ - Grep
17
+ - Glob
18
+ - ToolSearch
19
+ version: "2.0.0"
20
+ author: "Ed Becker"
21
+ license: "MIT"
22
+ ---
23
+
24
+ # Plan Skill
25
+
26
+ **Trigger:** `/plan <issue-id>`
27
+
28
+ **CRITICAL:** This skill MUST be run by Opus. The entire point is that Opus does ALL the thinking so Sonnet just executes. If you are Sonnet or Haiku, STOP and tell the user to switch to Opus.
29
+
30
+ ## Core Principle
31
+
32
+ **Opus plans EVERYTHING. Sonnet executes.**
33
+
34
+ Do NOT leave any decisions for the implementation agent. Every architectural choice, every file path, every function name, every edge case - all decided here. The implementation agent should be able to work through beads mechanically without making any design decisions.
35
+
36
+ ---
37
+
38
+ ## EXECUTION STEPS
39
+
40
+ ### Step 1: Parse Issue ID and Create Workspace
41
+
42
+ ```bash
43
+ # PAN-XXX -> /home/eltmon/projects/panopticon (GitHub)
44
+ # MIN-XXX -> /home/eltmon/projects/myn (Linear)
45
+ # HH-XXX -> /home/eltmon/projects/househunt (Linear)
46
+ # JH-XXX -> /home/eltmon/projects/jobhunt (Linear)
47
+
48
+ # CRITICAL: Create a proper git worktree with feature branch
49
+ # DO NOT use mkdir -p - that creates a directory without git tracking!
50
+ cd <project>
51
+ pan workspace <issue-id> # Creates workspaces/feature-<id>/ with feature branch
52
+
53
+ # Then create planning directory inside the workspace
54
+ mkdir -p workspaces/feature-<issue-id-lowercase>/.planning
55
+ ```
56
+
57
+ **IMPORTANT:** The `pan workspace` command creates a git worktree on a feature branch.
58
+ This is REQUIRED so that work agents don't commit directly to main.
59
+ If `pan workspace` fails, fix the issue before continuing.
60
+
61
+ ### Step 2: Fetch Issue Details
62
+
63
+ **GitHub (PAN-*):** `gh issue view <number>`
64
+ **Linear:** Use `mcp__linear__get_issue` tool
65
+
66
+ Read the FULL issue. Understand what's being asked.
67
+
68
+ ### Step 3: Deep Discovery
69
+
70
+ **YOU MUST** thoroughly explore the codebase. Use `Task` tool with `subagent_type=Explore` or manually:
71
+
72
+ 1. Find ALL related files:
73
+ - Where does the feature touch?
74
+ - What patterns exist?
75
+ - What tests exist?
76
+
77
+ 2. Read key files completely:
78
+ - Don't skim - read line by line
79
+ - Understand the data flow
80
+ - Note function signatures
81
+
82
+ 3. Identify:
83
+ - Files to create (new)
84
+ - Files to modify (existing)
85
+ - Files to delete (cleanup)
86
+ - Tests to write/update
87
+
88
+ ### Step 4: Write STATE.md
89
+
90
+ Create `.planning/STATE.md` with COMPLETE planning context:
91
+
92
+ ```markdown
93
+ # <issue-id>: <Title>
94
+
95
+ **Status:** Plan Approved
96
+ **Planned by:** Claude Opus 4.6
97
+ **Date:** <date>
98
+
99
+ ---
100
+
101
+ ## Discovery Summary
102
+ <What you learned - specific file paths, patterns, gotchas>
103
+
104
+ ## Key Architectural Decisions
105
+
106
+ ### D1: <Topic>
107
+ **Decision:** <What we're doing>
108
+ **Rationale:** <Why this choice, not alternatives>
109
+
110
+ ### D2: ...
111
+
112
+ ## Architecture
113
+
114
+ ### What's Being Changed
115
+ <Table of components, files, and what changes>
116
+
117
+ ### Key Touch Points
118
+ <Specific file:line references for important changes>
119
+
120
+ ## Service URLs (if applicable)
121
+ <If this issue involves services with URLs, list them here:>
122
+ Frontend: https://...
123
+ API: https://...
124
+
125
+ ## Remaining Work
126
+ See plan.vbrief.json for the complete bead breakdown.
127
+ ```
128
+
129
+ ### Step 5: Produce plan.vbrief.json
130
+
131
+ Create `.planning/plan.vbrief.json` following the vBRIEF schema. This replaces the manual `bd create` loop — the Panopticon complete-planning pipeline reads this file and creates beads automatically.
132
+
133
+ ```json
134
+ {
135
+ "vBRIEFInfo": {
136
+ "version": "0.5",
137
+ "created": "<ISO timestamp>"
138
+ },
139
+ "plan": {
140
+ "id": "<ISSUE-ID>",
141
+ "title": "<Full issue title>",
142
+ "status": "approved",
143
+ "author": "plan",
144
+ "tags": ["<relevant>", "<tags>"],
145
+ "narratives": {
146
+ "Problem": "<What problem this solves>",
147
+ "Proposal": "<How we solve it>",
148
+ "Constraint": "<Any constraints>",
149
+ "Risk": "<Key risks>",
150
+ "Alternative": "<What alternatives were considered>"
151
+ },
152
+ "items": [
153
+ {
154
+ "id": "<kebab-case-id>",
155
+ "title": "<ISSUE-ID>: <Specific task name>",
156
+ "status": "pending",
157
+ "priority": "high",
158
+ "metadata": {
159
+ "difficulty": "simple|medium|complex",
160
+ "issueLabel": "<issue-id-lowercase>"
161
+ },
162
+ "narrative": {
163
+ "Action": "<Exact what to do: file paths, function names, specific changes>"
164
+ },
165
+ "subItems": [
166
+ {
167
+ "id": "<parent-id>.<ac-name>",
168
+ "title": "<Specific testable acceptance criterion>",
169
+ "status": "pending",
170
+ "metadata": { "kind": "acceptance_criterion" }
171
+ }
172
+ ]
173
+ }
174
+ ],
175
+ "edges": [
176
+ {
177
+ "from": "<item-id>",
178
+ "to": "<item-id>",
179
+ "type": "blocks"
180
+ }
181
+ ]
182
+ }
183
+ }
184
+ ```
185
+
186
+ **CRITICAL vBRIEF Structure Rules:**
187
+
188
+ 1. **Acceptance criteria MUST be subItems, NEVER top-level items.** Each AC is nested under its parent task/requirement as a `subItems` entry. Top-level items with `kind: "acceptance_criterion"` will fail vBRIEF Studio validation.
189
+
190
+ 2. **Hierarchical IDs required.** SubItem IDs must use dot-notation from the parent: `parent-id.ac-name`. Example: `work-prompt-ac.injects-ac-per-bead`. The parent prefix is mandatory.
191
+
192
+ 3. **Only actionable tasks are top-level items.** Requirements, tasks, and architectural decisions go in `items[]`. Acceptance criteria go in `subItems[]` under their parent.
193
+
194
+ 4. **Every task SHOULD have at least one acceptance criterion** in `subItems` to define "done."
195
+
196
+ **Bead sizing guidance:**
197
+ - Each item should be completable in one focused session
198
+ - Include exact file paths and function names in the Action field
199
+ - Set `edges` to capture blocking relationships between items
200
+ - `difficulty`: trivial (typo/config), simple (1 file), medium (2-3 files), complex (multi-system)
201
+ - 10-40 items for a typical feature; more for large refactors
202
+ - SubItems (acceptance criteria) are NOT converted to beads — they're verification checklists
203
+
204
+ **After writing the JSON file:**
205
+ ```bash
206
+ # Mark planning complete so the pipeline picks it up
207
+ touch workspaces/feature-<issue-id-lowercase>/.planning/.planning-complete
208
+ ```
209
+
210
+ **Cloister hand-off:** When the `.planning-complete` marker is created, Cloister automatically:
211
+ 1. Reads `plan.vbrief.json` from the workspace
212
+ 2. Calls `createBeadsFromVBrief()` to convert vBRIEF items into beads tasks
213
+ 3. Preserves dependency relationships from `edges` (blocking order)
214
+ 4. Includes acceptance criteria in bead descriptions
215
+ 5. Starts the work agent with the beads ready for implementation
216
+
217
+ You do NOT need to run `bd create` manually — Cloister handles the full conversion.
218
+
219
+ ### Step 6: Stitch Integration (UI Work)
220
+
221
+ If issue involves UI, YOU MUST use Stitch:
222
+
223
+ ```bash
224
+ # Load Stitch tools
225
+ ToolSearch query: "+stitch"
226
+
227
+ # Create project
228
+ mcp__stitch__create_project name="<issue-id>-design"
229
+
230
+ # Design each screen
231
+ mcp__stitch__generate_screen_from_text ...
232
+ ```
233
+
234
+ Document all designs in `.planning/STITCH_DESIGNS.md`.
235
+
236
+ ### Step 7: Update Issue Tracker
237
+
238
+ **GitHub (PAN-*):**
239
+ ```bash
240
+ gh label create "planned" --color "0E8A16" 2>/dev/null || true
241
+ gh label create "ready-for-implementation" --color "1D76DB" 2>/dev/null || true
242
+ gh label create "opus-planned" --color "7057FF" 2>/dev/null || true
243
+
244
+ gh issue edit <number> --add-label "planned,ready-for-implementation,opus-planned"
245
+
246
+ gh issue comment <number> --body "## Planning Complete
247
+ **Planned by:** Claude Opus 4.6
248
+ **Workspace:** workspaces/feature-<issue-id>/
249
+
250
+ ### Beads: <N> items in plan.vbrief.json
251
+ ### Next: /work-issue <ISSUE-ID>"
252
+ ```
253
+
254
+ ### Step 8: Output Summary
255
+
256
+ ```
257
+ ## Planning Complete for <ISSUE-ID>
258
+
259
+ **Workspace:** <path>
260
+ **STATE.md:** decisions log, architecture, key touch points
261
+ **plan.vbrief.json:** <N> items, <M> edges
262
+
263
+ **Unblocked Items:**
264
+ 1. <item-id>: <title> [P<n>]
265
+ ...
266
+
267
+ **Next:** /work-issue <ISSUE-ID>
268
+ ```
269
+
270
+ ---
271
+
272
+ ## Task Breakdown Templates
273
+
274
+ ### For Backend API Work:
275
+
276
+ ```
277
+ Items:
278
+ - Define types/interfaces in types.ts
279
+ - Create endpoint handler function
280
+ - Add route registration
281
+ - Add request validation
282
+ - Add error handling
283
+ - Write unit tests for handler
284
+ - Write integration tests for endpoint
285
+ ```
286
+
287
+ ### For React Component Work:
288
+
289
+ ```
290
+ Items:
291
+ - Create component file with shell
292
+ - Add props interface
293
+ - Implement render logic
294
+ - Add state management (if needed)
295
+ - Add event handlers
296
+ - Style with Tailwind/CSS
297
+ - Add loading/error states
298
+ - Write unit tests
299
+ - Wire into parent component
300
+ ```
301
+
302
+ ### For Bug Fixes:
303
+
304
+ ```
305
+ Items:
306
+ - Write failing test that reproduces bug
307
+ - Identify root cause (document in Action field)
308
+ - Implement fix
309
+ - Verify test passes
310
+ - Add regression tests
311
+ ```
312
+
313
+ ### For Refactoring:
314
+
315
+ ```
316
+ Items:
317
+ - Write tests for current behavior (if missing)
318
+ - Extract function/module
319
+ - Update all call sites
320
+ - Run tests, fix failures
321
+ - Remove old code
322
+ ```
323
+
324
+ ---
325
+
326
+ ## Quality Checklist
327
+
328
+ Before completing /plan, verify:
329
+
330
+ - [ ] STATE.md has complete discovery, decisions, and architecture
331
+ - [ ] plan.vbrief.json is valid JSON with all required fields
332
+ - [ ] Each item has exact file paths in Action field
333
+ - [ ] Dependencies (edges) are set correctly
334
+ - [ ] .planning-complete marker created
335
+ - [ ] Issue tracker updated
336
+ - [ ] No decisions left for implementation agent