panopticon-cli 0.4.6 → 0.4.7
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/package.json +2 -1
- package/skills/beads/README.md +120 -0
- package/skills/beads/SKILL.md +214 -0
- package/skills/beads/adr/0001-bd-prime-as-source-of-truth.md +59 -0
- package/skills/beads/resources/AGENTS.md +62 -0
- package/skills/beads/resources/ASYNC_GATES.md +168 -0
- package/skills/beads/resources/BOUNDARIES.md +469 -0
- package/skills/beads/resources/CHEMISTRY_PATTERNS.md +197 -0
- package/skills/beads/resources/CLI_REFERENCE.md +558 -0
- package/skills/beads/resources/DEPENDENCIES.md +747 -0
- package/skills/beads/resources/INTEGRATION_PATTERNS.md +407 -0
- package/skills/beads/resources/ISSUE_CREATION.md +139 -0
- package/skills/beads/resources/MOLECULES.md +354 -0
- package/skills/beads/resources/PATTERNS.md +341 -0
- package/skills/beads/resources/RESUMABILITY.md +207 -0
- package/skills/beads/resources/STATIC_DATA.md +54 -0
- package/skills/beads/resources/TROUBLESHOOTING.md +489 -0
- package/skills/beads/resources/WORKFLOWS.md +623 -0
- package/skills/beads/resources/WORKTREES.md +94 -0
- package/skills/beads-completion-check/SKILL.md +90 -0
- package/skills/beads-panopticon-guide/SKILL.md +171 -0
- package/skills/bug-fix/SKILL.md +32 -0
- package/skills/clear-writing/SKILL.md +105 -0
- package/skills/clear-writing/references/elements-of-style/01-introductory.md +3 -0
- package/skills/clear-writing/references/elements-of-style/02-elementary-rules-of-usage.md +214 -0
- package/skills/clear-writing/references/elements-of-style/03-elementary-principles-of-composition.md +398 -0
- package/skills/clear-writing/references/elements-of-style/04-a-few-matters-of-form.md +89 -0
- package/skills/clear-writing/references/elements-of-style/05-words-and-expressions-commonly-misused.md +342 -0
- package/skills/clear-writing/references/signs-of-ai-writing.md +901 -0
- package/skills/code-review/SKILL.md +37 -0
- package/skills/code-review-performance/SKILL.md +53 -0
- package/skills/code-review-security/SKILL.md +35 -0
- package/skills/dependency-update/SKILL.md +30 -0
- package/skills/feature-work/SKILL.md +39 -0
- package/skills/incident-response/SKILL.md +32 -0
- package/skills/knowledge-capture/SKILL.md +463 -0
- package/skills/onboard-codebase/SKILL.md +34 -0
- package/skills/opus-plan/SKILL.md +400 -0
- package/skills/pan-approve/SKILL.md +136 -0
- package/skills/pan-code-review/SKILL.md +249 -0
- package/skills/pan-config/SKILL.md +164 -0
- package/skills/pan-convoy-synthesis/SKILL.md +249 -0
- package/skills/pan-diagnose/SKILL.md +360 -0
- package/skills/pan-docker/SKILL.md +279 -0
- package/skills/pan-docs/SKILL.md +113 -0
- package/skills/pan-down/SKILL.md +434 -0
- package/skills/pan-health/SKILL.md +240 -0
- package/skills/pan-help/SKILL.md +237 -0
- package/skills/pan-install/SKILL.md +339 -0
- package/skills/pan-issue/SKILL.md +596 -0
- package/skills/pan-kill/SKILL.md +172 -0
- package/skills/pan-logs/SKILL.md +255 -0
- package/skills/pan-network/SKILL.md +320 -0
- package/skills/pan-oversee/SKILL.md +290 -0
- package/skills/pan-plan/SKILL.md +521 -0
- package/skills/pan-projects/SKILL.md +239 -0
- package/skills/pan-quickstart/SKILL.md +440 -0
- package/skills/pan-reload/SKILL.md +44 -0
- package/skills/pan-rescue/SKILL.md +271 -0
- package/skills/pan-restart/SKILL.md +53 -0
- package/skills/pan-setup/SKILL.md +478 -0
- package/skills/pan-skill-creator/SKILL.md +168 -0
- package/skills/pan-skill-creator/references/output-patterns.md +141 -0
- package/skills/pan-skill-creator/references/workflows.md +90 -0
- package/skills/pan-skill-creator/scripts/init_skill.py +176 -0
- package/skills/pan-status/SKILL.md +493 -0
- package/skills/pan-subagent-creator/SKILL.md +295 -0
- package/skills/pan-subagent-creator/assets/validate-readonly-query.sh +35 -0
- package/skills/pan-subagent-creator/references/example-agents.md +308 -0
- package/skills/pan-subagent-creator/scripts/init_agent.py +126 -0
- package/skills/pan-sync/SKILL.md +272 -0
- package/skills/pan-tell/SKILL.md +157 -0
- package/skills/pan-test-config/SKILL.md +208 -0
- package/skills/pan-tracker/SKILL.md +288 -0
- package/skills/pan-up/SKILL.md +458 -0
- package/skills/pan-workspace-config/SKILL.md +303 -0
- package/skills/refactor/SKILL.md +30 -0
- package/skills/refactor-radar/SKILL.md +475 -0
- package/skills/release/SKILL.md +25 -0
- package/skills/send-feedback-to-agent/SKILL.md +98 -0
- package/skills/session-health/SKILL.md +76 -0
- package/skills/session-health/scripts/check_sessions.py +166 -0
- package/skills/skill-creator/SKILL.md +92 -0
- package/skills/skill-creator/scripts/init_skill.py +152 -0
- package/skills/skill-creator/scripts/package_skill.py +123 -0
- package/skills/stitch-design-md/README.md +34 -0
- package/skills/stitch-design-md/SKILL.md +172 -0
- package/skills/stitch-design-md/examples/DESIGN.md +154 -0
- package/skills/stitch-react-components/README.md +36 -0
- package/skills/stitch-react-components/SKILL.md +47 -0
- package/skills/stitch-react-components/examples/gold-standard-card.tsx +80 -0
- package/skills/stitch-react-components/package-lock.json +231 -0
- package/skills/stitch-react-components/package.json +16 -0
- package/skills/stitch-react-components/resources/architecture-checklist.md +15 -0
- package/skills/stitch-react-components/resources/component-template.tsx +37 -0
- package/skills/stitch-react-components/resources/stitch-api-reference.md +14 -0
- package/skills/stitch-react-components/resources/style-guide.json +27 -0
- package/skills/stitch-react-components/scripts/fetch-stitch.sh +30 -0
- package/skills/stitch-react-components/scripts/validate.js +68 -0
- package/skills/stitch-setup/SKILL.md +94 -0
- package/skills/web-design-guidelines/SKILL.md +39 -0
- package/skills/work-complete/SKILL.md +79 -0
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pan-issue
|
|
3
|
+
description: Create workspace and spawn autonomous agent for an issue
|
|
4
|
+
triggers:
|
|
5
|
+
- work on issue
|
|
6
|
+
- create workspace
|
|
7
|
+
- spawn agent
|
|
8
|
+
- pan work issue
|
|
9
|
+
- start working on
|
|
10
|
+
allowed-tools:
|
|
11
|
+
- Bash
|
|
12
|
+
- Read
|
|
13
|
+
- AskUserQuestion
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Create Workspace and Spawn Agent
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
This skill guides you through creating an isolated workspace for an issue and spawning an autonomous AI agent to work on it. The agent will work independently in a tmux session with full access to code, Docker containers, and development tools.
|
|
21
|
+
|
|
22
|
+
## When to Use
|
|
23
|
+
|
|
24
|
+
- User wants to start working on an issue
|
|
25
|
+
- User wants AI agent to implement a feature
|
|
26
|
+
- User has an issue ready for development
|
|
27
|
+
- User wants to create isolated development environment
|
|
28
|
+
- User asks "how do I start working on this issue?"
|
|
29
|
+
|
|
30
|
+
## What This Does
|
|
31
|
+
|
|
32
|
+
`pan work issue <id>` creates a complete development environment:
|
|
33
|
+
|
|
34
|
+
1. **Workspace directory** - Isolated clone of codebase
|
|
35
|
+
2. **Git branch** - Feature branch for the issue
|
|
36
|
+
3. **Docker containers** - Application services (if configured)
|
|
37
|
+
4. **tmux session** - Interactive terminal for the agent
|
|
38
|
+
5. **AI agent** - Autonomous assistant that implements the issue
|
|
39
|
+
6. **Beads tracking** - Persistent task tracking (if enabled)
|
|
40
|
+
|
|
41
|
+
## Basic Usage
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Create workspace and spawn agent for issue
|
|
45
|
+
pan work issue PAN-3
|
|
46
|
+
|
|
47
|
+
# Create workspace with existing plan
|
|
48
|
+
pan work issue PAN-3 --with-plan
|
|
49
|
+
|
|
50
|
+
# Create workspace with specific branch
|
|
51
|
+
pan work issue PAN-3 --branch feature/custom-name
|
|
52
|
+
|
|
53
|
+
# Create workspace without spawning agent
|
|
54
|
+
pan workspace create PAN-3
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Complete Workflow
|
|
58
|
+
|
|
59
|
+
### Step 1: Verify Prerequisites
|
|
60
|
+
|
|
61
|
+
Before creating workspace:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Check Panopticon is running
|
|
65
|
+
pan status
|
|
66
|
+
|
|
67
|
+
# Verify issue exists
|
|
68
|
+
pan work list | grep PAN-3
|
|
69
|
+
|
|
70
|
+
# Check Docker is running
|
|
71
|
+
docker ps
|
|
72
|
+
|
|
73
|
+
# Verify disk space
|
|
74
|
+
df -h ~/panopticon/workspaces/
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Step 2: Optional - Create Plan First
|
|
78
|
+
|
|
79
|
+
For complex issues, plan first:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Create execution plan
|
|
83
|
+
pan work plan PAN-3
|
|
84
|
+
|
|
85
|
+
# Review plan in dashboard or:
|
|
86
|
+
cat ~/.panopticon/planning/PAN-3/PLANNING.md
|
|
87
|
+
|
|
88
|
+
# If approved, proceed to create workspace
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 3: Create Workspace and Spawn Agent
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
pan work issue PAN-3
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**What happens (detailed):**
|
|
98
|
+
|
|
99
|
+
1. **Fetch issue details** from Linear/GitHub/GitLab
|
|
100
|
+
- Issue title, description, labels
|
|
101
|
+
- Acceptance criteria
|
|
102
|
+
- Related issues/PRs
|
|
103
|
+
|
|
104
|
+
2. **Create workspace directory**
|
|
105
|
+
```
|
|
106
|
+
~/panopticon/workspaces/feature-pan-3/
|
|
107
|
+
├── .git/ # Git repository
|
|
108
|
+
├── src/ # Source code
|
|
109
|
+
├── docker-compose.yml # Docker services (if using Docker)
|
|
110
|
+
├── CLAUDE.md # Workspace instructions for agent
|
|
111
|
+
├── PLANNING.md # Execution plan (if created)
|
|
112
|
+
└── .panopticon/ # Workspace metadata
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
3. **Create feature branch**
|
|
116
|
+
```bash
|
|
117
|
+
# Branch name based on issue type and ID
|
|
118
|
+
git checkout -b feature/pan-3 # For features
|
|
119
|
+
git checkout -b bug/pan-3 # For bugs
|
|
120
|
+
git checkout -b refactor/pan-3 # For refactors
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
4. **Start Docker containers** (if configured)
|
|
124
|
+
```bash
|
|
125
|
+
# Services defined in Docker template
|
|
126
|
+
docker-compose up -d
|
|
127
|
+
# Examples: app, database, redis, etc.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
5. **Create tmux session**
|
|
131
|
+
```bash
|
|
132
|
+
tmux new-session -d -s agent-PAN-3
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
6. **Spawn AI agent** in tmux session
|
|
136
|
+
- Agent runs Claude Code CLI
|
|
137
|
+
- Full access to Read, Write, Edit, Bash tools
|
|
138
|
+
- Can run tests, commit code, ask questions
|
|
139
|
+
- Works autonomously toward issue completion
|
|
140
|
+
|
|
141
|
+
7. **Initialize beads tracking** (if enabled)
|
|
142
|
+
```bash
|
|
143
|
+
# Create beads database for task tracking
|
|
144
|
+
bd init
|
|
145
|
+
# Agent can use bd to track sub-tasks
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**Expected output:**
|
|
149
|
+
```
|
|
150
|
+
✓ Fetched issue PAN-3 from Linear
|
|
151
|
+
✓ Created workspace: ~/panopticon/workspaces/feature-pan-3
|
|
152
|
+
✓ Created branch: feature/pan-3
|
|
153
|
+
✓ Started Docker containers (app, db, redis)
|
|
154
|
+
✓ Created tmux session: agent-PAN-3
|
|
155
|
+
✓ Spawned AI agent
|
|
156
|
+
|
|
157
|
+
Workspace: ~/panopticon/workspaces/feature-pan-3
|
|
158
|
+
Branch: feature/pan-3
|
|
159
|
+
Session: agent-PAN-3
|
|
160
|
+
Dashboard: http://localhost:3001/agents/PAN-3
|
|
161
|
+
|
|
162
|
+
Monitor agent:
|
|
163
|
+
pan status # Check status
|
|
164
|
+
pan work tell PAN-3 "message" # Send message
|
|
165
|
+
tmux attach -t agent-PAN-3 # Watch live (Ctrl+b d to detach)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Step 4: Monitor Agent
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Check agent status
|
|
172
|
+
pan status
|
|
173
|
+
|
|
174
|
+
# Watch in dashboard
|
|
175
|
+
# Visit http://localhost:3001/agents/PAN-3
|
|
176
|
+
|
|
177
|
+
# Attach to tmux session
|
|
178
|
+
tmux attach -t agent-PAN-3
|
|
179
|
+
# Press Ctrl+b d to detach
|
|
180
|
+
|
|
181
|
+
# View recent output
|
|
182
|
+
tmux capture-pane -t agent-PAN-3 -p | tail -20
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Step 5: Interact with Agent (if needed)
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Send message to agent
|
|
189
|
+
pan work tell PAN-3 "Make sure to add tests"
|
|
190
|
+
|
|
191
|
+
# Ask agent a question
|
|
192
|
+
pan work tell PAN-3 "What's your current progress?"
|
|
193
|
+
|
|
194
|
+
# Give guidance
|
|
195
|
+
pan work tell PAN-3 "Use the UserService pattern from src/services/"
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Step 6: Review Completed Work
|
|
199
|
+
|
|
200
|
+
When agent finishes:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# Check pending work
|
|
204
|
+
pan work pending
|
|
205
|
+
|
|
206
|
+
# Review in dashboard
|
|
207
|
+
# Visit http://localhost:3001/pending
|
|
208
|
+
|
|
209
|
+
# Review code changes
|
|
210
|
+
cd ~/panopticon/workspaces/feature-pan-3
|
|
211
|
+
git diff main
|
|
212
|
+
|
|
213
|
+
# Review tests
|
|
214
|
+
# Check test output in agent session
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Step 7: Approve or Request Changes
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# If work looks good, approve and merge
|
|
221
|
+
pan work approve PAN-3
|
|
222
|
+
|
|
223
|
+
# If changes needed, send feedback
|
|
224
|
+
pan work tell PAN-3 "Please add error handling for null users"
|
|
225
|
+
|
|
226
|
+
# If starting over, kill and restart
|
|
227
|
+
pan work kill PAN-3
|
|
228
|
+
pan work issue PAN-3
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## Workspace Configuration
|
|
232
|
+
|
|
233
|
+
### Default Workspace Settings
|
|
234
|
+
|
|
235
|
+
Edit `~/.panopticon.env`:
|
|
236
|
+
|
|
237
|
+
```env
|
|
238
|
+
# Where workspaces are created
|
|
239
|
+
WORKSPACE_ROOT=~/panopticon/workspaces
|
|
240
|
+
|
|
241
|
+
# Default Docker template (spring-boot, react-vite, nextjs, etc.)
|
|
242
|
+
DEFAULT_DOCKER_TEMPLATE=spring-boot
|
|
243
|
+
|
|
244
|
+
# Branch naming pattern
|
|
245
|
+
BRANCH_PREFIX=feature # Creates feature/<issue-id>
|
|
246
|
+
|
|
247
|
+
# Enable beads tracking in workspaces
|
|
248
|
+
WORKSPACE_BEADS=true
|
|
249
|
+
|
|
250
|
+
# Auto-run tests before marking complete
|
|
251
|
+
AUTO_TEST=true
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Per-Issue Docker Template
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
# Use specific Docker template for an issue
|
|
258
|
+
pan work issue PAN-3 --template react-vite
|
|
259
|
+
|
|
260
|
+
# Available templates:
|
|
261
|
+
# - spring-boot (Java/Spring + PostgreSQL + Redis)
|
|
262
|
+
# - react-vite (React + Vite + hot-reload)
|
|
263
|
+
# - nextjs (Next.js + app router)
|
|
264
|
+
# - dotnet (.NET Core + SQL Server)
|
|
265
|
+
# - python-fastapi (FastAPI + uvicorn)
|
|
266
|
+
# - monorepo (Frontend + backend combo)
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Workspace Isolation
|
|
270
|
+
|
|
271
|
+
Each workspace is completely isolated:
|
|
272
|
+
|
|
273
|
+
- ✅ **Separate git branch** - No conflicts with main
|
|
274
|
+
- ✅ **Separate Docker containers** - Own database, services
|
|
275
|
+
- ✅ **Separate tmux session** - Independent agent
|
|
276
|
+
- ✅ **Separate dependencies** - Own node_modules, packages
|
|
277
|
+
- ✅ **Separate environment** - Custom .env files
|
|
278
|
+
|
|
279
|
+
You can run multiple agents in parallel:
|
|
280
|
+
```bash
|
|
281
|
+
pan work issue PAN-3 # Agent working on auth
|
|
282
|
+
pan work issue PAN-5 # Agent working on billing
|
|
283
|
+
pan work issue PAN-7 # Agent working on dashboard
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Advanced Usage
|
|
287
|
+
|
|
288
|
+
### Create Workspace Without Agent
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
# Just create workspace, no agent
|
|
292
|
+
pan workspace create PAN-3
|
|
293
|
+
|
|
294
|
+
# Then spawn agent later
|
|
295
|
+
cd ~/panopticon/workspaces/feature-pan-3
|
|
296
|
+
claude --config ~/.panopticon/claude.config.json
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
### Create Workspace With Plan
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
# Plan first
|
|
303
|
+
pan work plan PAN-3
|
|
304
|
+
|
|
305
|
+
# Then create workspace with plan context
|
|
306
|
+
pan work issue PAN-3 --with-plan
|
|
307
|
+
|
|
308
|
+
# Agent will have PLANNING.md as reference
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
### Custom Branch Name
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# Use custom branch name
|
|
315
|
+
pan work issue PAN-3 --branch custom/my-feature
|
|
316
|
+
|
|
317
|
+
# Or set via env var
|
|
318
|
+
BRANCH_NAME=custom/my-feature pan work issue PAN-3
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Resume Existing Workspace
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
# List existing workspaces
|
|
325
|
+
pan workspace list
|
|
326
|
+
|
|
327
|
+
# If workspace exists, agent will resume
|
|
328
|
+
pan work issue PAN-3
|
|
329
|
+
|
|
330
|
+
# Or explicitly resume
|
|
331
|
+
pan work issue PAN-3 --resume
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
## Troubleshooting
|
|
335
|
+
|
|
336
|
+
### Workspace creation fails
|
|
337
|
+
|
|
338
|
+
**Problem:** `pan work issue` fails with error
|
|
339
|
+
|
|
340
|
+
**Solutions:**
|
|
341
|
+
```bash
|
|
342
|
+
# Check issue exists
|
|
343
|
+
pan work list | grep PAN-3
|
|
344
|
+
|
|
345
|
+
# Check disk space
|
|
346
|
+
df -h ~/panopticon/workspaces/
|
|
347
|
+
|
|
348
|
+
# Check Docker is running
|
|
349
|
+
docker ps
|
|
350
|
+
|
|
351
|
+
# Check for port conflicts
|
|
352
|
+
pan workspace list # See what ports are in use
|
|
353
|
+
|
|
354
|
+
# Try with verbose output
|
|
355
|
+
pan work issue PAN-3 --verbose
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Docker containers won't start
|
|
359
|
+
|
|
360
|
+
**Problem:** Workspace created but containers failed
|
|
361
|
+
|
|
362
|
+
**Solutions:**
|
|
363
|
+
```bash
|
|
364
|
+
# Check Docker daemon
|
|
365
|
+
docker ps
|
|
366
|
+
|
|
367
|
+
# Check container logs
|
|
368
|
+
cd ~/panopticon/workspaces/feature-pan-3
|
|
369
|
+
docker-compose logs
|
|
370
|
+
|
|
371
|
+
# Check port conflicts
|
|
372
|
+
lsof -i :8080
|
|
373
|
+
lsof -i :5432
|
|
374
|
+
|
|
375
|
+
# Restart containers
|
|
376
|
+
docker-compose down
|
|
377
|
+
docker-compose up -d
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### Agent session not starting
|
|
381
|
+
|
|
382
|
+
**Problem:** Workspace created but no tmux session
|
|
383
|
+
|
|
384
|
+
**Solutions:**
|
|
385
|
+
```bash
|
|
386
|
+
# Check tmux is installed
|
|
387
|
+
which tmux
|
|
388
|
+
|
|
389
|
+
# List tmux sessions
|
|
390
|
+
tmux list-sessions
|
|
391
|
+
|
|
392
|
+
# Check agent logs
|
|
393
|
+
cat ~/.panopticon/logs/agent-PAN-3.log
|
|
394
|
+
|
|
395
|
+
# Manually start session
|
|
396
|
+
cd ~/panopticon/workspaces/feature-pan-3
|
|
397
|
+
tmux new-session -s agent-PAN-3
|
|
398
|
+
claude
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### Workspace already exists
|
|
402
|
+
|
|
403
|
+
**Problem:** `pan work issue` says workspace exists
|
|
404
|
+
|
|
405
|
+
**Solutions:**
|
|
406
|
+
```bash
|
|
407
|
+
# Option 1: Resume existing workspace
|
|
408
|
+
pan work issue PAN-3 --resume
|
|
409
|
+
|
|
410
|
+
# Option 2: Destroy and recreate
|
|
411
|
+
pan workspace destroy PAN-3
|
|
412
|
+
pan work issue PAN-3
|
|
413
|
+
|
|
414
|
+
# Option 3: Use existing workspace manually
|
|
415
|
+
cd ~/panopticon/workspaces/feature-pan-3
|
|
416
|
+
tmux attach -t agent-PAN-3
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### Branch already exists
|
|
420
|
+
|
|
421
|
+
**Problem:** Error: branch `feature/pan-3` already exists
|
|
422
|
+
|
|
423
|
+
**Solutions:**
|
|
424
|
+
```bash
|
|
425
|
+
# Check if branch has work
|
|
426
|
+
cd ~/panopticon/workspaces/feature-pan-3
|
|
427
|
+
git status
|
|
428
|
+
git log
|
|
429
|
+
|
|
430
|
+
# If branch is clean, delete and retry
|
|
431
|
+
git checkout main
|
|
432
|
+
git branch -D feature/pan-3
|
|
433
|
+
pan work issue PAN-3
|
|
434
|
+
|
|
435
|
+
# If branch has work, use different branch name
|
|
436
|
+
pan work issue PAN-3 --branch feature/pan-3-v2
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
### Out of disk space
|
|
440
|
+
|
|
441
|
+
**Problem:** Workspace creation fails with disk space error
|
|
442
|
+
|
|
443
|
+
**Solutions:**
|
|
444
|
+
```bash
|
|
445
|
+
# Check disk usage
|
|
446
|
+
df -h ~/panopticon/workspaces/
|
|
447
|
+
|
|
448
|
+
# Clean up old workspaces
|
|
449
|
+
pan workspace list
|
|
450
|
+
pan workspace destroy <old-workspace-id>
|
|
451
|
+
|
|
452
|
+
# Clean Docker resources
|
|
453
|
+
docker system prune -a
|
|
454
|
+
|
|
455
|
+
# Move workspace root to larger disk
|
|
456
|
+
# Edit ~/.panopticon.env:
|
|
457
|
+
WORKSPACE_ROOT=/mnt/large-disk/panopticon/workspaces
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
## Workspace Directory Structure
|
|
461
|
+
|
|
462
|
+
After `pan work issue PAN-3`:
|
|
463
|
+
|
|
464
|
+
```
|
|
465
|
+
~/panopticon/workspaces/feature-pan-3/
|
|
466
|
+
├── .git/ # Git repository
|
|
467
|
+
├── .panopticon/ # Workspace metadata
|
|
468
|
+
│ ├── issue.json # Issue details from tracker
|
|
469
|
+
│ ├── workspace.json # Workspace configuration
|
|
470
|
+
│ └── agent.json # Agent state
|
|
471
|
+
├── src/ # Source code (cloned from main)
|
|
472
|
+
├── tests/ # Tests
|
|
473
|
+
├── docker-compose.yml # Docker services (if using Docker)
|
|
474
|
+
├── .env # Environment variables (workspace-specific)
|
|
475
|
+
├── CLAUDE.md # Instructions for agent
|
|
476
|
+
├── PLANNING.md # Execution plan (if created with pan work plan)
|
|
477
|
+
├── .beads/ # Beads tracking (if enabled)
|
|
478
|
+
│ └── workspace.db # Task database
|
|
479
|
+
└── README.md # Project README
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
## Agent Capabilities
|
|
483
|
+
|
|
484
|
+
The spawned agent can:
|
|
485
|
+
|
|
486
|
+
### Code Operations
|
|
487
|
+
- ✅ Read any file
|
|
488
|
+
- ✅ Edit files
|
|
489
|
+
- ✅ Create new files
|
|
490
|
+
- ✅ Search codebase (Glob, Grep)
|
|
491
|
+
- ✅ Understand architecture
|
|
492
|
+
|
|
493
|
+
### Development Operations
|
|
494
|
+
- ✅ Run tests
|
|
495
|
+
- ✅ Run build
|
|
496
|
+
- ✅ Start dev server
|
|
497
|
+
- ✅ Run linters
|
|
498
|
+
- ✅ Format code
|
|
499
|
+
|
|
500
|
+
### Git Operations
|
|
501
|
+
- ✅ Make commits
|
|
502
|
+
- ✅ Create branches
|
|
503
|
+
- ✅ View diffs
|
|
504
|
+
- ✅ Resolve conflicts
|
|
505
|
+
|
|
506
|
+
### Docker Operations
|
|
507
|
+
- ✅ Start/stop containers
|
|
508
|
+
- ✅ View logs
|
|
509
|
+
- ✅ Run database migrations
|
|
510
|
+
- ✅ Execute commands in containers
|
|
511
|
+
|
|
512
|
+
### Task Management
|
|
513
|
+
- ✅ Break down work into sub-tasks (using beads)
|
|
514
|
+
- ✅ Track progress
|
|
515
|
+
- ✅ Update status
|
|
516
|
+
|
|
517
|
+
### Communication
|
|
518
|
+
- ✅ Ask clarifying questions
|
|
519
|
+
- ✅ Report progress
|
|
520
|
+
- ✅ Explain decisions
|
|
521
|
+
|
|
522
|
+
## Best Practices
|
|
523
|
+
|
|
524
|
+
### 1. Use Planning for Complex Issues
|
|
525
|
+
|
|
526
|
+
```bash
|
|
527
|
+
# For complex issues, plan first
|
|
528
|
+
pan work plan PAN-3
|
|
529
|
+
# Review and approve plan
|
|
530
|
+
pan work issue PAN-3 --with-plan
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
### 2. Monitor Agent Progress
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
# Check status regularly
|
|
537
|
+
watch -n 10 pan status
|
|
538
|
+
|
|
539
|
+
# Or use dashboard
|
|
540
|
+
# http://localhost:3001/agents/PAN-3
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### 3. Provide Context to Agent
|
|
544
|
+
|
|
545
|
+
```bash
|
|
546
|
+
# Send helpful context early
|
|
547
|
+
pan work tell PAN-3 "Follow the pattern in src/services/UserService.ts"
|
|
548
|
+
pan work tell PAN-3 "Make sure all tests pass before committing"
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
### 4. Run Multiple Agents in Parallel
|
|
552
|
+
|
|
553
|
+
```bash
|
|
554
|
+
# Agents work independently
|
|
555
|
+
pan work issue PAN-3 # Feature work
|
|
556
|
+
pan work issue PAN-5 # Bug fix
|
|
557
|
+
pan work issue PAN-7 # Refactoring
|
|
558
|
+
|
|
559
|
+
# Monitor all
|
|
560
|
+
pan status
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
### 5. Clean Up Completed Workspaces
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
# After approving work, clean up
|
|
567
|
+
pan workspace destroy PAN-3
|
|
568
|
+
|
|
569
|
+
# Or keep for reference (disk permitting)
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
## Next Steps
|
|
573
|
+
|
|
574
|
+
After spawning agent:
|
|
575
|
+
|
|
576
|
+
1. **Monitor progress**: `pan status` or dashboard
|
|
577
|
+
2. **Review work**: When agent completes, `pan work pending`
|
|
578
|
+
3. **Approve**: `pan work approve PAN-3`
|
|
579
|
+
4. **Clean up**: `pan workspace destroy PAN-3`
|
|
580
|
+
|
|
581
|
+
## Related Skills
|
|
582
|
+
|
|
583
|
+
- `/pan-plan` - Create execution plan before implementation
|
|
584
|
+
- `/pan-status` - Monitor running agents
|
|
585
|
+
- `/pan-approve` - Approve completed work (coming soon)
|
|
586
|
+
- `/pan-tell` - Send messages to agents (coming soon)
|
|
587
|
+
- `/pan-kill` - Stop agents (coming soon)
|
|
588
|
+
- `/feature-work` - Feature implementation workflow
|
|
589
|
+
- `/bug-fix` - Bug fixing workflow
|
|
590
|
+
|
|
591
|
+
## More Information
|
|
592
|
+
|
|
593
|
+
- Workspace root: `~/panopticon/workspaces/` (configurable)
|
|
594
|
+
- Dashboard: http://localhost:3001/agents/<issue-id>
|
|
595
|
+
- Run `pan work issue --help` for more options
|
|
596
|
+
- Run `pan workspace --help` for workspace management
|