panopticon-cli 0.1.6 → 0.3.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.
- package/README.md +596 -22
- package/dist/{chunk-RM3WGTFO.js → chunk-B2JBBOJN.js} +531 -120
- package/dist/chunk-B2JBBOJN.js.map +1 -0
- package/dist/chunk-PSJRCUOA.js +177 -0
- package/dist/chunk-PSJRCUOA.js.map +1 -0
- package/dist/chunk-SG7O6I7R.js +155 -0
- package/dist/chunk-SG7O6I7R.js.map +1 -0
- package/dist/cli/index.js +5143 -2391
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +42 -3
- package/dist/index.js +43 -25
- package/dist/index.js.map +1 -1
- package/dist/projects-6JVKIYIH.js +34 -0
- package/dist/projects-6JVKIYIH.js.map +1 -0
- package/package.json +17 -4
- package/templates/claude-md/sections/beads.md +32 -0
- package/templates/claude-md/sections/commands-skills.md +15 -0
- package/templates/claude-md/sections/warnings.md +35 -0
- package/templates/claude-md/sections/workspace-info.md +12 -0
- package/templates/context/CLAUDE.md.template +81 -0
- package/templates/context/STATE.md.template +106 -0
- package/templates/context/WORKSPACE.md.template +90 -0
- package/templates/docker/dotnet/Dockerfile.dev +22 -0
- package/templates/docker/dotnet/README.md +111 -0
- package/templates/docker/dotnet/docker-compose.yml +55 -0
- package/templates/docker/monorepo/Dockerfile.backend +15 -0
- package/templates/docker/monorepo/Dockerfile.frontend +17 -0
- package/templates/docker/monorepo/README.md +208 -0
- package/templates/docker/monorepo/docker-compose.yml +88 -0
- package/templates/docker/nextjs/Dockerfile.dev +20 -0
- package/templates/docker/nextjs/README.md +103 -0
- package/templates/docker/nextjs/docker-compose.yml +30 -0
- package/templates/docker/python-fastapi/Dockerfile.dev +22 -0
- package/templates/docker/python-fastapi/README.md +148 -0
- package/templates/docker/python-fastapi/docker-compose.yml +65 -0
- package/templates/docker/react-vite/Dockerfile.dev +20 -0
- package/templates/docker/react-vite/README.md +94 -0
- package/templates/docker/react-vite/docker-compose.yml +29 -0
- package/templates/docker/spring-boot/Dockerfile.dev +24 -0
- package/templates/docker/spring-boot/README.md +111 -0
- package/templates/docker/spring-boot/docker-compose.yml +71 -0
- package/dist/chunk-RM3WGTFO.js.map +0 -1
package/README.md
CHANGED
|
@@ -19,12 +19,142 @@ Panopticon is a unified orchestration layer for AI coding assistants. It works w
|
|
|
19
19
|
### Features
|
|
20
20
|
|
|
21
21
|
- **Multi-agent orchestration** - Spawn and manage multiple AI agents in tmux sessions
|
|
22
|
+
- **Cloister AI Lifecycle Manager** - Automatic model routing, stuck detection, and specialist handoffs
|
|
22
23
|
- **Universal skills** - One SKILL.md format works across all supported tools
|
|
23
|
-
- **
|
|
24
|
+
- **Heartbeat Hooks** - Real-time agent activity monitoring via Claude Code hooks
|
|
25
|
+
- **Multi-project support** - YAML-based project registry with label-based issue routing
|
|
24
26
|
- **Health Monitoring** - Deacon-style stuck detection with auto-recovery
|
|
25
27
|
- **Context Engineering** - Structured state management (STATE.md, WORKSPACE.md)
|
|
26
28
|
- **Agent CVs** - Work history tracking for capability-based routing
|
|
27
29
|
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Legacy Codebase Support
|
|
33
|
+
|
|
34
|
+
> **"AI works great on greenfield projects, but it's hopeless on our legacy code."**
|
|
35
|
+
>
|
|
36
|
+
> Sound familiar? Your developers aren't wrong. But they're not stuck, either.
|
|
37
|
+
|
|
38
|
+
### The Problem Every Enterprise Faces
|
|
39
|
+
|
|
40
|
+
AI coding assistants are trained on modern, well-documented open-source code. When they encounter your 15-year-old monolith with:
|
|
41
|
+
|
|
42
|
+
- Mixed naming conventions (some `snake_case`, some `camelCase`, some `SCREAMING_CASE`)
|
|
43
|
+
- Undocumented tribal knowledge ("we never touch the `processUser()` function directly")
|
|
44
|
+
- Schemas that don't match the ORM ("the `accounts` table is actually users")
|
|
45
|
+
- Three different async patterns in the same codebase
|
|
46
|
+
- Build systems that require arcane incantations
|
|
47
|
+
|
|
48
|
+
...they stumble. Repeatedly. Every session starts from zero.
|
|
49
|
+
|
|
50
|
+
### Panopticon's Unique Solution: Adaptive Learning
|
|
51
|
+
|
|
52
|
+
Panopticon includes two AI self-monitoring skills that **no other orchestration framework provides**:
|
|
53
|
+
|
|
54
|
+
| Skill | What It Does | Business Impact |
|
|
55
|
+
|-------|--------------|-----------------|
|
|
56
|
+
| **Knowledge Capture** | Detects when AI makes mistakes or gets corrected, prompts to document the learning | AI gets smarter about YOUR codebase over time |
|
|
57
|
+
| **Refactor Radar** | Identifies systemic code issues causing repeated AI confusion, creates actionable proposals | Surfaces technical debt that's costing you AI productivity |
|
|
58
|
+
|
|
59
|
+
#### How It Works
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
Session 1: AI queries users.created_at → Error (column is "createdAt")
|
|
63
|
+
→ Knowledge Capture prompts: "Document this convention?"
|
|
64
|
+
→ User: "Yes, create skill"
|
|
65
|
+
→ Creates project-specific skill documenting naming conventions
|
|
66
|
+
|
|
67
|
+
Session 2: AI knows to use camelCase for this project
|
|
68
|
+
No more mistakes on column names
|
|
69
|
+
|
|
70
|
+
Session 5: Refactor Radar detects: "Same entity called 'user', 'account', 'member'
|
|
71
|
+
across layers - this is causing repeated confusion"
|
|
72
|
+
→ Offers to create issue with refactoring proposal
|
|
73
|
+
→ Tech lead reviews and schedules cleanup sprint
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### The Compound Effect
|
|
77
|
+
|
|
78
|
+
| Week | Without Panopticon | With Panopticon |
|
|
79
|
+
|------|-------------------|-----------------|
|
|
80
|
+
| 1 | AI makes 20 mistakes/day on conventions | AI makes 20 mistakes, captures 8 learnings |
|
|
81
|
+
| 2 | AI makes 20 mistakes/day (no memory) | AI makes 12 mistakes, captures 5 more |
|
|
82
|
+
| 4 | AI makes 20 mistakes/day (still no memory) | AI makes 3 mistakes, codebase improving |
|
|
83
|
+
| 8 | Developers give up on AI for legacy code | AI is productive, tech debt proposals in backlog |
|
|
84
|
+
|
|
85
|
+
#### Shared Team Knowledge
|
|
86
|
+
|
|
87
|
+
**When one developer learns, everyone benefits.**
|
|
88
|
+
|
|
89
|
+
Captured skills live in your project's `.claude/skills/` directory - they're version-controlled alongside your code. When Sarah documents that "we use camelCase columns" after hitting that error, every developer on the team - and every AI session from that point forward - inherits that knowledge automatically.
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
myproject/
|
|
93
|
+
├── .claude/skills/
|
|
94
|
+
│ └── project-knowledge/ # ← Git-tracked, shared by entire team
|
|
95
|
+
│ └── SKILL.md # "Database uses camelCase, not snake_case"
|
|
96
|
+
├── src/
|
|
97
|
+
└── ...
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
No more repeating the same corrections to AI across 10 different developers. No more tribal knowledge locked in one person's head. The team's collective understanding of your codebase becomes permanent, searchable, and automatically applied.
|
|
101
|
+
|
|
102
|
+
**New hire onboarding?** The AI already knows your conventions from day one.
|
|
103
|
+
|
|
104
|
+
#### For Technical Leaders
|
|
105
|
+
|
|
106
|
+
**What gets measured gets managed.** Panopticon's Refactor Radar surfaces the specific patterns that are costing you AI productivity:
|
|
107
|
+
|
|
108
|
+
- "Here are the 5 naming inconsistencies causing 40% of AI errors"
|
|
109
|
+
- "These 3 missing FK constraints led to 12 incorrect deletions last month"
|
|
110
|
+
- "Mixed async patterns in payments module caused 8 rollbacks"
|
|
111
|
+
|
|
112
|
+
Each proposal includes:
|
|
113
|
+
- **Evidence**: Specific file paths and examples
|
|
114
|
+
- **Impact**: How this affects AI (and new developers)
|
|
115
|
+
- **Migration path**: Incremental fix that won't break production
|
|
116
|
+
|
|
117
|
+
#### For Executives
|
|
118
|
+
|
|
119
|
+
**ROI is simple:**
|
|
120
|
+
|
|
121
|
+
- $200K/year senior developer spends 2 hours/day correcting AI on legacy code
|
|
122
|
+
- That's $50K/year in wasted productivity per developer
|
|
123
|
+
- Team of 10 = **$500K/year** in AI friction
|
|
124
|
+
|
|
125
|
+
Panopticon's learning system:
|
|
126
|
+
- Captures corrections once, applies them forever
|
|
127
|
+
- Identifies root causes (not just symptoms)
|
|
128
|
+
- Creates actionable improvement proposals
|
|
129
|
+
- Works across your entire AI toolchain (Claude, Codex, Cursor, Gemini)
|
|
130
|
+
|
|
131
|
+
**This isn't "AI for greenfield only." This is AI that learns your business.**
|
|
132
|
+
|
|
133
|
+
#### Configurable Per Team and Per Developer
|
|
134
|
+
|
|
135
|
+
Different teams have different ownership boundaries. Individual developers have different preferences. Panopticon respects both:
|
|
136
|
+
|
|
137
|
+
```markdown
|
|
138
|
+
# In ~/.claude/CLAUDE.md (developer's personal config)
|
|
139
|
+
|
|
140
|
+
## AI Suggestion Preferences
|
|
141
|
+
|
|
142
|
+
### refactor-radar
|
|
143
|
+
skip: database-migrations, infrastructure # DBA/Platform team handles these
|
|
144
|
+
welcome: naming, code-organization # Always happy for these
|
|
145
|
+
|
|
146
|
+
### knowledge-capture
|
|
147
|
+
skip: authentication # Security team owns this
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
- **"Skip database migrations"** - Your DBA has a change management process
|
|
151
|
+
- **"Skip infrastructure"** - Platform team owns that
|
|
152
|
+
- **"Welcome naming fixes"** - Low risk, high value, always appreciated
|
|
153
|
+
|
|
154
|
+
The AI adapts to your org structure, not the other way around.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
28
158
|
## Quick Start
|
|
29
159
|
|
|
30
160
|
```bash
|
|
@@ -107,8 +237,22 @@ Create `~/.panopticon.env`:
|
|
|
107
237
|
```bash
|
|
108
238
|
LINEAR_API_KEY=lin_api_xxxxx
|
|
109
239
|
GITHUB_TOKEN=ghp_xxxxx # Optional: for GitHub-tracked projects
|
|
240
|
+
RALLY_API_KEY=_xxxxx # Optional: for Rally as secondary tracker
|
|
110
241
|
```
|
|
111
242
|
|
|
243
|
+
### Issue Trackers
|
|
244
|
+
|
|
245
|
+
Panopticon supports multiple issue trackers:
|
|
246
|
+
|
|
247
|
+
| Tracker | Role | Configuration |
|
|
248
|
+
|---------|------|---------------|
|
|
249
|
+
| **Linear** | Primary tracker | `LINEAR_API_KEY` in `.panopticon.env` |
|
|
250
|
+
| **GitHub Issues** | Secondary tracker | `GITHUB_TOKEN` or `gh auth login` |
|
|
251
|
+
| **GitLab Issues** | Secondary tracker | `glab auth login` |
|
|
252
|
+
| **Rally** | Secondary tracker | `RALLY_API_KEY` in `.panopticon.env` |
|
|
253
|
+
|
|
254
|
+
Secondary trackers sync issues to the dashboard alongside Linear issues, allowing unified project management.
|
|
255
|
+
|
|
112
256
|
### Register Projects
|
|
113
257
|
|
|
114
258
|
Register your local project directories so Panopticon knows where to create workspaces:
|
|
@@ -144,18 +288,184 @@ If you have multiple Linear projects, configure which local directory each maps
|
|
|
144
288
|
|
|
145
289
|
The dashboard uses this mapping to determine where to create workspaces when you click "Create Workspace" or "Start Agent" for an issue.
|
|
146
290
|
|
|
291
|
+
## Cloister: AI Lifecycle Manager
|
|
292
|
+
|
|
293
|
+
Cloister is Panopticon's intelligent agent lifecycle manager. It monitors all running agents and automatically handles:
|
|
294
|
+
|
|
295
|
+
- **Model Routing** - Routes tasks to appropriate models based on complexity
|
|
296
|
+
- **Stuck Detection** - Identifies agents that have stopped making progress
|
|
297
|
+
- **Automatic Handoffs** - Escalates to specialists when needed
|
|
298
|
+
- **Specialist Coordination** - Manages test-agent, review-agent, and merge-agent
|
|
299
|
+
|
|
300
|
+
### How Cloister Works
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
304
|
+
│ CLOISTER SERVICE │
|
|
305
|
+
│ │
|
|
306
|
+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
|
|
307
|
+
│ │ Heartbeat │───▶│ Trigger │───▶│ Handoff │ │
|
|
308
|
+
│ │ Monitor │ │ Detector │ │ Manager │ │
|
|
309
|
+
│ └─────────────┘ └─────────────┘ └─────────────┘ │
|
|
310
|
+
│ │ │ │ │
|
|
311
|
+
│ ▼ ▼ ▼ │
|
|
312
|
+
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
|
|
313
|
+
│ │ Agent │ │ Complexity │ │ Specialists │ │
|
|
314
|
+
│ │ Health │ │ Analysis │ │ │ │
|
|
315
|
+
│ └─────────────┘ └─────────────┘ └─────────────┘ │
|
|
316
|
+
└─────────────────────────────────────────────────────────────┘
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### Starting Cloister
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# Via dashboard - click "Start" in the Cloister status bar
|
|
323
|
+
# Or via CLI:
|
|
324
|
+
pan cloister start
|
|
325
|
+
|
|
326
|
+
# Check status
|
|
327
|
+
pan cloister status
|
|
328
|
+
|
|
329
|
+
# Stop monitoring
|
|
330
|
+
pan cloister stop
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Specialists
|
|
334
|
+
|
|
335
|
+
Cloister manages specialized agents that handle specific phases of the development lifecycle:
|
|
336
|
+
|
|
337
|
+
| Specialist | Purpose | Trigger |
|
|
338
|
+
|------------|---------|---------|
|
|
339
|
+
| **test-agent** | Runs test suite after implementation | `implementation_complete` signal |
|
|
340
|
+
| **review-agent** | Code review before merge | After tests pass (manual trigger) |
|
|
341
|
+
| **merge-agent** | Handles git merge and conflict resolution | "Approve & Merge" button |
|
|
342
|
+
|
|
343
|
+
### Automatic Handoffs
|
|
344
|
+
|
|
345
|
+
Cloister detects situations that require intervention:
|
|
346
|
+
|
|
347
|
+
| Trigger | Condition | Action |
|
|
348
|
+
|---------|-----------|--------|
|
|
349
|
+
| **stuck_escalation** | No activity for 30+ minutes | Escalate to more capable model |
|
|
350
|
+
| **complexity_upgrade** | Task complexity exceeds model capability | Route to Opus |
|
|
351
|
+
| **implementation_complete** | Agent signals work is done | Wake test-agent |
|
|
352
|
+
| **merge_requested** | User clicks "Approve & Merge" | Wake merge-agent |
|
|
353
|
+
|
|
354
|
+
### Heartbeat Monitoring
|
|
355
|
+
|
|
356
|
+
Agents send heartbeats via Claude Code hooks. Cloister tracks:
|
|
357
|
+
|
|
358
|
+
- Last tool use and timestamp
|
|
359
|
+
- Current task being worked on
|
|
360
|
+
- Git branch and workspace
|
|
361
|
+
- Process health
|
|
362
|
+
|
|
363
|
+
Heartbeat files are stored in `~/.panopticon/heartbeats/`:
|
|
364
|
+
|
|
365
|
+
```json
|
|
366
|
+
{
|
|
367
|
+
"timestamp": "2024-01-22T10:30:00-08:00",
|
|
368
|
+
"agent_id": "agent-min-123",
|
|
369
|
+
"tool_name": "Edit",
|
|
370
|
+
"last_action": "{\"file_path\":\"/path/to/file.ts\"...}",
|
|
371
|
+
"git_branch": "feature/min-123",
|
|
372
|
+
"workspace": "/home/user/projects/myapp/workspaces/feature-min-123"
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Configuration
|
|
377
|
+
|
|
378
|
+
Cloister configuration lives in `~/.panopticon/cloister/config.json`:
|
|
379
|
+
|
|
380
|
+
```json
|
|
381
|
+
{
|
|
382
|
+
"monitoring": {
|
|
383
|
+
"heartbeat_interval_ms": 5000,
|
|
384
|
+
"stuck_threshold_minutes": 30,
|
|
385
|
+
"health_check_interval_ms": 30000
|
|
386
|
+
},
|
|
387
|
+
"specialists": {
|
|
388
|
+
"test_agent": { "enabled": true, "auto_wake": true },
|
|
389
|
+
"review_agent": { "enabled": true, "auto_wake": false },
|
|
390
|
+
"merge_agent": { "enabled": true, "auto_wake": false }
|
|
391
|
+
},
|
|
392
|
+
"triggers": {
|
|
393
|
+
"stuck_escalation": { "enabled": true },
|
|
394
|
+
"complexity_upgrade": { "enabled": true }
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
## Multi-Project Support
|
|
402
|
+
|
|
403
|
+
Panopticon supports managing multiple projects with intelligent issue routing.
|
|
404
|
+
|
|
405
|
+
### Project Registry
|
|
406
|
+
|
|
407
|
+
Projects are registered in `~/.panopticon/projects.yaml`:
|
|
408
|
+
|
|
409
|
+
```yaml
|
|
410
|
+
projects:
|
|
411
|
+
myn:
|
|
412
|
+
name: "Mind Your Now"
|
|
413
|
+
path: /home/user/projects/myn
|
|
414
|
+
linear_team: MIN
|
|
415
|
+
issue_routing:
|
|
416
|
+
- labels: [splash, landing-pages, seo]
|
|
417
|
+
path: /home/user/projects/myn/splash
|
|
418
|
+
- labels: [docs, marketing]
|
|
419
|
+
path: /home/user/projects/myn/docs
|
|
420
|
+
- default: true
|
|
421
|
+
path: /home/user/projects/myn
|
|
422
|
+
|
|
423
|
+
panopticon:
|
|
424
|
+
name: "Panopticon"
|
|
425
|
+
path: /home/user/projects/panopticon
|
|
426
|
+
linear_team: PAN
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
### Label-Based Routing
|
|
430
|
+
|
|
431
|
+
Issues are routed to different subdirectories based on their labels:
|
|
432
|
+
|
|
433
|
+
1. **Labeled issues** - Matched against `issue_routing` rules in order
|
|
434
|
+
2. **Default route** - Issues without matching labels use the `default: true` path
|
|
435
|
+
3. **Fallback** - If no default, uses the project root path
|
|
436
|
+
|
|
437
|
+
Example: An issue with label "splash" in the MIN team would create its workspace at `/home/user/projects/myn/splash/workspaces/feature-min-xxx/`.
|
|
438
|
+
|
|
439
|
+
### Managing Projects
|
|
440
|
+
|
|
441
|
+
```bash
|
|
442
|
+
# List registered projects
|
|
443
|
+
pan project list
|
|
444
|
+
|
|
445
|
+
# Add a project
|
|
446
|
+
pan project add /path/to/project --name myproject --linear-team PRJ
|
|
447
|
+
|
|
448
|
+
# Remove a project
|
|
449
|
+
pan project remove myproject
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
147
454
|
## Commands
|
|
148
455
|
|
|
149
456
|
### Core Commands
|
|
150
457
|
|
|
151
458
|
```bash
|
|
152
459
|
pan init # Initialize ~/.panopticon/
|
|
153
|
-
pan sync # Sync skills to all AI tools
|
|
460
|
+
pan sync # Sync skills, commands, agents, AND hooks to all AI tools
|
|
461
|
+
pan sync --dry-run # Preview what will be synced
|
|
154
462
|
pan doctor # Check system health
|
|
155
463
|
pan skills # List available skills
|
|
156
464
|
pan status # Show running agents
|
|
157
465
|
```
|
|
158
466
|
|
|
467
|
+
> **Note:** `pan sync` now automatically syncs heartbeat hooks to `~/.panopticon/bin/`. This happens automatically on `npm install/upgrade` as well.
|
|
468
|
+
|
|
159
469
|
### Agent Management
|
|
160
470
|
|
|
161
471
|
```bash
|
|
@@ -210,6 +520,11 @@ This allows multiple agents to work on different features simultaneously without
|
|
|
210
520
|
|
|
211
521
|
#### Git-Backed Collaborative Planning
|
|
212
522
|
|
|
523
|
+
| Start Planning | Codebase Exploration | Discovery Questions |
|
|
524
|
+
|----------------|---------------------|---------------------|
|
|
525
|
+
|  |  |  |
|
|
526
|
+
| Click to create workspace and start AI planning | Claude explores the codebase, reads docs, understands patterns | Interactive questions to clarify requirements and approach |
|
|
527
|
+
|
|
213
528
|
Planning artifacts are stored **inside the workspace**, making them part of the feature branch:
|
|
214
529
|
|
|
215
530
|
```
|
|
@@ -222,6 +537,13 @@ workspaces/feature-min-123/
|
|
|
222
537
|
└── ... (code)
|
|
223
538
|
```
|
|
224
539
|
|
|
540
|
+

|
|
541
|
+
|
|
542
|
+
When the planning session completes, the AI generates:
|
|
543
|
+
- **STATE.md** - Current understanding, decisions made, and implementation plan
|
|
544
|
+
- **Beads tasks** - Trackable sub-tasks with dependencies for the implementation
|
|
545
|
+
- **Feature PRD** - Copied to `docs/prds/active/{issue}-plan.md` for documentation
|
|
546
|
+
|
|
225
547
|
**This enables:**
|
|
226
548
|
|
|
227
549
|
1. **Collaborative async planning** - Push your branch, someone else pulls and continues the planning session with full context
|
|
@@ -319,8 +641,35 @@ pan work recover min-123
|
|
|
319
641
|
pan work recover --all
|
|
320
642
|
```
|
|
321
643
|
|
|
644
|
+
### Cloister Commands
|
|
645
|
+
|
|
646
|
+
```bash
|
|
647
|
+
# Start Cloister monitoring service
|
|
648
|
+
pan cloister start
|
|
649
|
+
|
|
650
|
+
# Stop Cloister
|
|
651
|
+
pan cloister stop
|
|
652
|
+
|
|
653
|
+
# Check Cloister status
|
|
654
|
+
pan cloister status
|
|
655
|
+
|
|
656
|
+
# List all specialists
|
|
657
|
+
pan specialists list
|
|
658
|
+
|
|
659
|
+
# Wake a specific specialist
|
|
660
|
+
pan specialists wake merge-agent --issue MIN-123
|
|
661
|
+
|
|
662
|
+
# View specialist queue
|
|
663
|
+
pan specialists queue
|
|
664
|
+
|
|
665
|
+
# Reset specialist state
|
|
666
|
+
pan specialists reset merge-agent
|
|
667
|
+
```
|
|
668
|
+
|
|
322
669
|
## Dashboard
|
|
323
670
|
|
|
671
|
+

|
|
672
|
+
|
|
324
673
|
Start the monitoring dashboard:
|
|
325
674
|
|
|
326
675
|
```bash
|
|
@@ -337,36 +686,239 @@ This runs everything in Docker containers, avoiding port conflicts with your oth
|
|
|
337
686
|
```bash
|
|
338
687
|
pan up --minimal
|
|
339
688
|
```
|
|
340
|
-
- Dashboard: http://localhost:
|
|
689
|
+
- Dashboard: http://localhost:3010
|
|
341
690
|
|
|
342
691
|
Stop with `pan down`.
|
|
343
692
|
|
|
693
|
+
### Dashboard Tabs
|
|
694
|
+
|
|
695
|
+
| Tab | Purpose |
|
|
696
|
+
|-----|---------|
|
|
697
|
+
| **Board** | Kanban view of Linear issues with drag-and-drop status changes |
|
|
698
|
+
| **Agents** | Running agent sessions with terminal output |
|
|
699
|
+
| **Activity** | Real-time `pan` command output log |
|
|
700
|
+
| **Metrics** | Runtime comparison and cost tracking |
|
|
701
|
+
| **Skills** | Available skills and their descriptions |
|
|
702
|
+
| **Health** | System health checks and diagnostics |
|
|
703
|
+
|
|
704
|
+
### Issue Cards
|
|
705
|
+
|
|
706
|
+
Issue cards on the Kanban board display:
|
|
707
|
+
|
|
708
|
+
- **Cost badges** - Color-coded by amount ($0-5 green, $5-20 yellow, $20+ red)
|
|
709
|
+
- **Container status** - Shows if workspace has Docker containers (running/stopped)
|
|
710
|
+
- **Agent status** - Indicates if an agent is currently working on the issue
|
|
711
|
+
- **Workspace status** - Shows if workspace exists, is corrupted, or needs creation
|
|
712
|
+
|
|
713
|
+
### Workspace Actions
|
|
714
|
+
|
|
715
|
+
Click an issue card to open the workspace detail panel:
|
|
716
|
+
|
|
717
|
+
| Button | Action |
|
|
718
|
+
|--------|--------|
|
|
719
|
+
| **Create Workspace** | Creates git worktree for the issue |
|
|
720
|
+
| **Containerize** | Adds Docker containers to an existing workspace |
|
|
721
|
+
| **Start Containers** | Starts stopped Docker containers |
|
|
722
|
+
| **Start Planning** | Opens interactive planning session with AI |
|
|
723
|
+
| **Start Agent** | Spawns autonomous agent in tmux |
|
|
724
|
+
| **Approve & Merge** | Triggers merge-agent to handle PR merge |
|
|
725
|
+
|
|
726
|
+
### Interactive Planning
|
|
727
|
+
|
|
728
|
+
The planning dialog provides a real-time terminal for collaborative planning:
|
|
729
|
+
|
|
730
|
+
- **Discovery questions** - AI asks clarifying questions before implementation
|
|
731
|
+
- **Codebase exploration** - AI reads files and understands patterns
|
|
732
|
+
- **Pull/Push buttons** - Git operations to share planning context with teammates
|
|
733
|
+
- **AskUserQuestion rendering** - Questions from the AI appear as interactive prompts
|
|
734
|
+
|
|
735
|
+
### Metrics & Cost Tracking
|
|
736
|
+
|
|
737
|
+
The **Metrics** tab provides insights into AI agent performance and costs:
|
|
738
|
+
|
|
739
|
+
- **Per-issue cost badges** - See costs directly on Kanban cards (color-coded by amount)
|
|
740
|
+
- **Issue cost breakdown** - Click an issue to see detailed costs by model and session
|
|
741
|
+
- **Runtime comparison** - Compare success rates, duration, and costs across runtimes (Claude, Codex, etc.)
|
|
742
|
+
- **Capability analysis** - See how different task types (feature, bugfix, refactor) perform
|
|
743
|
+
|
|
744
|
+
Cost data is stored in `~/.panopticon/`:
|
|
745
|
+
- `session-map.json` - Links Claude Code sessions to issues
|
|
746
|
+
- `runtime-metrics.json` - Aggregated runtime performance data
|
|
747
|
+
- `costs/` - Raw cost logs
|
|
748
|
+
|
|
749
|
+
**API Endpoints:**
|
|
750
|
+
|
|
751
|
+
| Endpoint | Description |
|
|
752
|
+
|----------|-------------|
|
|
753
|
+
| `GET /api/costs/summary` | Overall cost summary (today/week/month) |
|
|
754
|
+
| `GET /api/costs/by-issue` | Costs grouped by issue |
|
|
755
|
+
| `GET /api/issues/:id/costs` | Cost details for a specific issue |
|
|
756
|
+
| `GET /api/metrics/runtimes` | Runtime comparison metrics |
|
|
757
|
+
| `GET /api/metrics/tasks` | Recent task history |
|
|
758
|
+
|
|
344
759
|
## Skills
|
|
345
760
|
|
|
346
|
-
Panopticon ships with
|
|
761
|
+
Panopticon ships with 25+ skills organized into categories:
|
|
762
|
+
|
|
763
|
+
### Development Workflows
|
|
347
764
|
|
|
348
765
|
| Skill | Description |
|
|
349
766
|
|-------|-------------|
|
|
350
767
|
| `feature-work` | Standard feature development workflow |
|
|
351
768
|
| `bug-fix` | Systematic bug investigation and fix |
|
|
769
|
+
| `refactor` | Safe refactoring with test coverage |
|
|
352
770
|
| `code-review` | Comprehensive code review checklist |
|
|
353
771
|
| `code-review-security` | OWASP Top 10 security analysis |
|
|
354
772
|
| `code-review-performance` | Algorithm and resource optimization |
|
|
355
|
-
| `refactor` | Safe refactoring with test coverage |
|
|
356
773
|
| `release` | Step-by-step release process |
|
|
357
|
-
| `incident-response` | Production incident handling |
|
|
358
774
|
| `dependency-update` | Safe dependency updates |
|
|
775
|
+
| `incident-response` | Production incident handling |
|
|
359
776
|
| `onboard-codebase` | Understanding new codebases |
|
|
777
|
+
| `work-complete` | Checklist for completing agent work |
|
|
360
778
|
|
|
361
|
-
###
|
|
779
|
+
### AI Self-Monitoring
|
|
780
|
+
|
|
781
|
+
| Skill | Description |
|
|
782
|
+
|-------|-------------|
|
|
783
|
+
| `knowledge-capture` | Captures learnings when AI gets confused or corrected |
|
|
784
|
+
| `refactor-radar` | Detects systemic issues causing AI confusion |
|
|
785
|
+
| `session-health` | Detect and clean up stuck sessions |
|
|
786
|
+
|
|
787
|
+
### Panopticon Operations (pan-*)
|
|
362
788
|
|
|
363
|
-
|
|
789
|
+
| Skill | Description |
|
|
790
|
+
|-------|-------------|
|
|
791
|
+
| `pan-help` | Show all Panopticon commands |
|
|
792
|
+
| `pan-up` | Start dashboard and services |
|
|
793
|
+
| `pan-down` | Stop dashboard and services |
|
|
794
|
+
| `pan-status` | Show running agents |
|
|
795
|
+
| `pan-issue` | Spawn agent for an issue |
|
|
796
|
+
| `pan-plan` | Create execution plan for issue |
|
|
797
|
+
| `pan-tell` | Send message to running agent |
|
|
798
|
+
| `pan-kill` | Kill a running agent |
|
|
799
|
+
| `pan-approve` | Approve agent work and merge |
|
|
800
|
+
| `pan-health` | Check system health |
|
|
801
|
+
| `pan-sync` | Sync skills to AI tools |
|
|
802
|
+
| `pan-install` | Install prerequisites |
|
|
803
|
+
| `pan-setup` | Initial setup wizard |
|
|
804
|
+
| `pan-quickstart` | Quick start guide |
|
|
805
|
+
| `pan-projects` | Manage registered projects |
|
|
806
|
+
| `pan-tracker` | Issue tracker operations |
|
|
807
|
+
| `pan-logs` | View agent logs |
|
|
808
|
+
| `pan-rescue` | Recover crashed agents |
|
|
809
|
+
| `pan-diagnose` | Diagnose agent issues |
|
|
810
|
+
| `pan-docker` | Docker operations |
|
|
811
|
+
| `pan-network` | Network diagnostics |
|
|
812
|
+
| `pan-config` | Configuration management |
|
|
813
|
+
| `pan-restart` | Safely restart Panopticon dashboard and services |
|
|
814
|
+
| `pan-code-review` | Orchestrate parallel code review (3 reviewers + synthesis) |
|
|
815
|
+
| `pan-convoy-synthesis` | Synthesize convoy coordination |
|
|
816
|
+
| `pan-subagent-creator` | Create specialized subagents |
|
|
817
|
+
| `pan-skill-creator` | Create new skills (guided) |
|
|
818
|
+
|
|
819
|
+
### Utilities
|
|
820
|
+
|
|
821
|
+
| Skill | Description |
|
|
822
|
+
|-------|-------------|
|
|
823
|
+
| `beads` | Git-backed issue tracking with dependencies |
|
|
824
|
+
| `skill-creator` | Guide for creating new skills |
|
|
825
|
+
| `web-design-guidelines` | UI/UX review checklist |
|
|
826
|
+
|
|
827
|
+
## Subagents
|
|
828
|
+
|
|
829
|
+
Panopticon includes specialized subagent templates for common development tasks. Subagents are invoked via the Task tool or convoy orchestration for parallel execution.
|
|
830
|
+
|
|
831
|
+
### Code Review Subagents
|
|
832
|
+
|
|
833
|
+
| Subagent | Model | Focus | Output |
|
|
834
|
+
|----------|-------|-------|--------|
|
|
835
|
+
| `code-review-correctness` | haiku | Logic errors, edge cases, type safety | `.claude/reviews/<timestamp>-correctness.md` |
|
|
836
|
+
| `code-review-security` | sonnet | OWASP Top 10, vulnerabilities | `.claude/reviews/<timestamp>-security.md` |
|
|
837
|
+
| `code-review-performance` | haiku | Algorithms, N+1 queries, memory | `.claude/reviews/<timestamp>-performance.md` |
|
|
838
|
+
| `code-review-synthesis` | sonnet | Combines all findings into unified report | `.claude/reviews/<timestamp>-synthesis.md` |
|
|
839
|
+
|
|
840
|
+
**Usage Example:**
|
|
841
|
+
```bash
|
|
842
|
+
/pan-code-review --files "src/auth/*.ts"
|
|
843
|
+
```
|
|
364
844
|
|
|
365
|
-
|
|
366
|
-
|
|
845
|
+
This spawns all three reviewers in parallel, then synthesizes their findings into a prioritized report.
|
|
846
|
+
|
|
847
|
+
### Planning & Exploration Subagents
|
|
848
|
+
|
|
849
|
+
| Subagent | Model | Focus | Permission Mode |
|
|
850
|
+
|----------|-------|-------|-----------------|
|
|
851
|
+
| `planning-agent` | sonnet | Codebase research, execution planning | `plan` (read-only) |
|
|
852
|
+
| `codebase-explorer` | haiku | Fast architecture discovery, pattern finding | `plan` (read-only) |
|
|
853
|
+
| `triage-agent` | haiku | Issue categorization, complexity estimation | default |
|
|
854
|
+
| `health-monitor` | haiku | Agent stuck detection, log analysis | default |
|
|
855
|
+
|
|
856
|
+
**Usage Examples:**
|
|
857
|
+
```bash
|
|
858
|
+
# Explore codebase architecture
|
|
859
|
+
Task(subagent_type='codebase-explorer', prompt='Map out the authentication system')
|
|
860
|
+
|
|
861
|
+
# Triage an issue
|
|
862
|
+
Task(subagent_type='triage-agent', prompt='Categorize and estimate ISSUE-123')
|
|
863
|
+
|
|
864
|
+
# Check agent health
|
|
865
|
+
Task(subagent_type='health-monitor', prompt='Check status of all running agents')
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
### Parallel Code Review Workflow
|
|
869
|
+
|
|
870
|
+
The `/pan-code-review` skill orchestrates a comprehensive parallel review:
|
|
871
|
+
|
|
872
|
+
```
|
|
873
|
+
1. Determine scope (git diff, files, or branch)
|
|
874
|
+
2. Spawn 3 parallel reviewers:
|
|
875
|
+
├─→ correctness (logic, types)
|
|
876
|
+
├─→ security (vulnerabilities)
|
|
877
|
+
└─→ performance (bottlenecks)
|
|
878
|
+
3. Each writes findings to .claude/reviews/
|
|
879
|
+
4. Spawn synthesis agent
|
|
880
|
+
5. Synthesis combines all findings
|
|
881
|
+
6. Present unified, prioritized report
|
|
882
|
+
```
|
|
883
|
+
|
|
884
|
+
**Benefits:**
|
|
885
|
+
- **3x faster** than sequential reviews
|
|
886
|
+
- **Comprehensive coverage** across all dimensions
|
|
887
|
+
- **Prioritized findings** (blocker > critical > high > medium > low)
|
|
888
|
+
- **Actionable recommendations** with code examples
|
|
889
|
+
|
|
890
|
+
**Review Output:**
|
|
891
|
+
```markdown
|
|
892
|
+
# Code Review - Complete Analysis
|
|
893
|
+
|
|
894
|
+
## Executive Summary
|
|
895
|
+
**Overall Assessment:** Needs Major Revisions
|
|
896
|
+
**Key Findings:**
|
|
897
|
+
- 1 blocker (SQL injection)
|
|
898
|
+
- 4 critical issues
|
|
899
|
+
- 6 high-priority items
|
|
900
|
+
|
|
901
|
+
## Blocker Issues
|
|
902
|
+
### 1. [Security] SQL Injection in login endpoint
|
|
903
|
+
...
|
|
904
|
+
|
|
905
|
+
## Critical Issues
|
|
906
|
+
...
|
|
907
|
+
```
|
|
908
|
+
|
|
909
|
+
### Creating Custom Subagents
|
|
910
|
+
|
|
911
|
+
Use the `/pan-subagent-creator` skill to create project-specific subagents:
|
|
912
|
+
|
|
913
|
+
```bash
|
|
914
|
+
/pan-subagent-creator
|
|
915
|
+
```
|
|
916
|
+
|
|
917
|
+
Subagent templates live in `~/.panopticon/agents/` and sync to `~/.claude/agents/`.
|
|
918
|
+
|
|
919
|
+
### Reserved Skill Names
|
|
367
920
|
|
|
368
|
-
**
|
|
369
|
-
`beads`, `bug-fix`, `code-review`, `code-review-performance`, `code-review-security`, `dependency-update`, `feature-work`, `incident-response`, `onboard-codebase`, `refactor`, `release`, `session-health`, `skill-creator`, `web-design-guidelines`, `work-complete`
|
|
921
|
+
Panopticon reserves all skill names listed above. **Do not use these names for project-specific skills** to avoid conflicts.
|
|
370
922
|
|
|
371
923
|
**Recommendation:** Use a project-specific prefix for your skills (e.g., `myn-standards`, `acme-deployment`) to avoid namespace collisions.
|
|
372
924
|
|
|
@@ -458,17 +1010,39 @@ This ensures every Panopticon-managed project has a well-defined canonical PRD t
|
|
|
458
1010
|
|
|
459
1011
|
```
|
|
460
1012
|
~/.panopticon/
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
1013
|
+
config.toml # Main configuration
|
|
1014
|
+
projects.yaml # Multi-project registry with issue routing
|
|
1015
|
+
project-mappings.json # Linear project → local path mappings (legacy)
|
|
1016
|
+
session-map.json # Claude sessions → issue linking
|
|
1017
|
+
runtime-metrics.json # Runtime performance metrics
|
|
1018
|
+
|
|
1019
|
+
skills/ # Shared skills (SKILL.md format)
|
|
1020
|
+
commands/ # Slash commands
|
|
1021
|
+
agents/ # Subagent templates (.md files)
|
|
1022
|
+
bin/ # Hook scripts (synced via pan sync)
|
|
1023
|
+
heartbeat-hook # Real-time activity monitoring hook
|
|
1024
|
+
|
|
1025
|
+
agents/ # Per-agent runtime state
|
|
464
1026
|
agent-min-123/
|
|
465
|
-
state.json
|
|
466
|
-
health.json
|
|
467
|
-
hook.json
|
|
468
|
-
cv.json
|
|
469
|
-
mail/
|
|
470
|
-
|
|
471
|
-
|
|
1027
|
+
state.json # Agent state (model, phase, complexity)
|
|
1028
|
+
health.json # Health status
|
|
1029
|
+
hook.json # GUPP work queue
|
|
1030
|
+
cv.json # Work history
|
|
1031
|
+
mail/ # Incoming messages
|
|
1032
|
+
|
|
1033
|
+
cloister/ # Cloister AI lifecycle manager
|
|
1034
|
+
config.json # Cloister settings
|
|
1035
|
+
state.json # Running state
|
|
1036
|
+
events.jsonl # Handoff event log
|
|
1037
|
+
|
|
1038
|
+
heartbeats/ # Real-time agent activity
|
|
1039
|
+
agent-min-123.json # Last heartbeat from agent
|
|
1040
|
+
|
|
1041
|
+
costs/ # Raw cost logs (JSONL)
|
|
1042
|
+
backups/ # Sync backups
|
|
1043
|
+
traefik/ # Traefik reverse proxy config
|
|
1044
|
+
dynamic/ # Dynamic route configs
|
|
1045
|
+
certs/ # TLS certificates
|
|
472
1046
|
```
|
|
473
1047
|
|
|
474
1048
|
## Health Monitoring (Deacon Pattern)
|