panopticon-cli 0.4.6 → 0.4.8
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 +3 -2
- package/scripts/heartbeat-hook +149 -0
- package/scripts/install-git-hooks.sh +66 -0
- package/scripts/notify-complete +79 -0
- package/scripts/postinstall.mjs +49 -0
- package/scripts/pre-tool-hook +60 -0
- package/scripts/record-cost-event.js +94 -0
- package/scripts/record-cost-event.ts +113 -0
- package/scripts/restart-dashboard.sh +59 -0
- package/scripts/setup-certs.sh +66 -0
- package/scripts/specialist-stop-hook +106 -0
- package/scripts/stop-hook +58 -0
- package/scripts/validate-merge.sh +119 -0
- 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,303 @@
|
|
|
1
|
+
# Pan Workspace Config
|
|
2
|
+
|
|
3
|
+
Configure workspace settings for polyrepo projects, DNS, Docker, services, and more.
|
|
4
|
+
|
|
5
|
+
## Trigger Patterns
|
|
6
|
+
|
|
7
|
+
- "configure workspace"
|
|
8
|
+
- "setup polyrepo"
|
|
9
|
+
- "workspace template"
|
|
10
|
+
- "multi-repo workspace"
|
|
11
|
+
- "configure services"
|
|
12
|
+
|
|
13
|
+
## What This Skill Does
|
|
14
|
+
|
|
15
|
+
Guides you through configuring workspace settings in `~/.panopticon/projects.yaml`:
|
|
16
|
+
|
|
17
|
+
1. **Workspace Type** - Monorepo (single git repo) or Polyrepo (multiple repos)
|
|
18
|
+
2. **Git Repositories** - Configure which repos to include for polyrepo projects
|
|
19
|
+
3. **Services** - Define how to start each service (API, frontend, etc.)
|
|
20
|
+
4. **DNS Configuration** - Set up local domains for development (WSL2/macOS/Linux)
|
|
21
|
+
5. **Port Management** - Configure port assignments for services like Redis
|
|
22
|
+
6. **Docker Templates** - Set up devcontainer templates
|
|
23
|
+
7. **Agent Templates** - Configure AI agent settings (CLAUDE.md, .mcp.json)
|
|
24
|
+
8. **Environment Variables** - Template for .env files
|
|
25
|
+
|
|
26
|
+
## Configuration Schema
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
projects:
|
|
30
|
+
myproject:
|
|
31
|
+
name: "My Project"
|
|
32
|
+
path: /home/user/projects/myproject
|
|
33
|
+
linear_team: PRJ
|
|
34
|
+
|
|
35
|
+
workspace:
|
|
36
|
+
# 'polyrepo' = multiple git repos, 'monorepo' = single repo (default)
|
|
37
|
+
type: polyrepo
|
|
38
|
+
|
|
39
|
+
# Where to create workspaces (relative to project path)
|
|
40
|
+
workspaces_dir: workspaces
|
|
41
|
+
|
|
42
|
+
# Git repositories (for polyrepo)
|
|
43
|
+
repos:
|
|
44
|
+
- name: fe # Name in workspace
|
|
45
|
+
path: frontend # Source repo relative to project root
|
|
46
|
+
branch_prefix: "feature/"
|
|
47
|
+
- name: api
|
|
48
|
+
path: api
|
|
49
|
+
branch_prefix: "feature/"
|
|
50
|
+
|
|
51
|
+
# Service definitions - how to start each service
|
|
52
|
+
services:
|
|
53
|
+
- name: api
|
|
54
|
+
path: api
|
|
55
|
+
start_command: ./mvnw spring-boot:run # or use template
|
|
56
|
+
docker_command: ./mvnw spring-boot:run
|
|
57
|
+
health_url: "https://api-{{FEATURE_FOLDER}}.{{DOMAIN}}/health"
|
|
58
|
+
port: 8080
|
|
59
|
+
- name: frontend
|
|
60
|
+
path: fe
|
|
61
|
+
start_command: pnpm start
|
|
62
|
+
docker_command: pnpm start
|
|
63
|
+
health_url: "https://{{FEATURE_FOLDER}}.{{DOMAIN}}"
|
|
64
|
+
port: 3000
|
|
65
|
+
|
|
66
|
+
# DNS configuration
|
|
67
|
+
dns:
|
|
68
|
+
domain: myproject.test
|
|
69
|
+
entries:
|
|
70
|
+
- "{{FEATURE_FOLDER}}.{{DOMAIN}}"
|
|
71
|
+
- "api-{{FEATURE_FOLDER}}.{{DOMAIN}}"
|
|
72
|
+
sync_method: wsl2hosts # or: hosts_file, dnsmasq
|
|
73
|
+
|
|
74
|
+
# Port assignments
|
|
75
|
+
ports:
|
|
76
|
+
redis:
|
|
77
|
+
range: [6380, 6499]
|
|
78
|
+
|
|
79
|
+
# Docker configuration
|
|
80
|
+
docker:
|
|
81
|
+
traefik: infra/docker-compose.traefik.yml
|
|
82
|
+
compose_template: infra/.devcontainer-template
|
|
83
|
+
|
|
84
|
+
# Agent configuration
|
|
85
|
+
agent:
|
|
86
|
+
template_dir: infra/.agent-template
|
|
87
|
+
templates:
|
|
88
|
+
- source: CLAUDE.md.template
|
|
89
|
+
target: CLAUDE.md
|
|
90
|
+
- source: .mcp.json.template
|
|
91
|
+
target: .mcp.json
|
|
92
|
+
symlinks:
|
|
93
|
+
- .claude/commands
|
|
94
|
+
- .claude/skills
|
|
95
|
+
|
|
96
|
+
# Environment template
|
|
97
|
+
env:
|
|
98
|
+
template: |
|
|
99
|
+
COMPOSE_PROJECT_NAME={{COMPOSE_PROJECT}}
|
|
100
|
+
FEATURE_FOLDER={{FEATURE_FOLDER}}
|
|
101
|
+
FRONTEND_URL=https://{{FEATURE_FOLDER}}.{{DOMAIN}}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Service Templates
|
|
105
|
+
|
|
106
|
+
Panopticon provides built-in templates for common frameworks. Use these to avoid boilerplate:
|
|
107
|
+
|
|
108
|
+
### Frontend Frameworks
|
|
109
|
+
|
|
110
|
+
| Template | Start Command | Port |
|
|
111
|
+
|----------|--------------|------|
|
|
112
|
+
| `react` | `npm start` | 3000 |
|
|
113
|
+
| `react-vite` | `npm run dev` | 5173 |
|
|
114
|
+
| `react-pnpm` | `pnpm start` | 3000 |
|
|
115
|
+
| `nextjs` | `npm run dev` | 3000 |
|
|
116
|
+
| `vue` | `npm run dev` | 5173 |
|
|
117
|
+
| `angular` | `ng serve` | 4200 |
|
|
118
|
+
|
|
119
|
+
### Backend Frameworks
|
|
120
|
+
|
|
121
|
+
| Template | Start Command | Port |
|
|
122
|
+
|----------|--------------|------|
|
|
123
|
+
| `spring-boot-maven` | `./mvnw spring-boot:run` | 8080 |
|
|
124
|
+
| `spring-boot-gradle` | `./gradlew bootRun` | 8080 |
|
|
125
|
+
| `express` | `npm start` | 3000 |
|
|
126
|
+
| `fastapi` | `uvicorn main:app --reload` | 8000 |
|
|
127
|
+
| `django` | `python manage.py runserver` | 8000 |
|
|
128
|
+
| `rails` | `rails server` | 3000 |
|
|
129
|
+
| `go` | `go run .` | 8080 |
|
|
130
|
+
| `rust-cargo` | `cargo run` | 8080 |
|
|
131
|
+
|
|
132
|
+
### Using Templates
|
|
133
|
+
|
|
134
|
+
You can reference templates by name and override specific fields:
|
|
135
|
+
|
|
136
|
+
```yaml
|
|
137
|
+
services:
|
|
138
|
+
- name: api
|
|
139
|
+
template: spring-boot-maven # Use template defaults
|
|
140
|
+
path: api
|
|
141
|
+
health_url: "https://api-{{FEATURE_FOLDER}}.myapp.test/health"
|
|
142
|
+
- name: frontend
|
|
143
|
+
template: react-vite
|
|
144
|
+
path: fe
|
|
145
|
+
start_command: pnpm dev # Override template default
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Template Placeholders
|
|
149
|
+
|
|
150
|
+
| Placeholder | Example | Description |
|
|
151
|
+
|------------|---------|-------------|
|
|
152
|
+
| `{{FEATURE_NAME}}` | `min-123` | Normalized issue ID |
|
|
153
|
+
| `{{FEATURE_FOLDER}}` | `feature-min-123` | Workspace folder name |
|
|
154
|
+
| `{{BRANCH_NAME}}` | `feature/min-123` | Git branch name |
|
|
155
|
+
| `{{COMPOSE_PROJECT}}` | `myproject-feature-min-123` | Docker Compose project name |
|
|
156
|
+
| `{{DOMAIN}}` | `myproject.test` | DNS domain |
|
|
157
|
+
| `{{PROJECT_NAME}}` | `myproject` | Project name |
|
|
158
|
+
| `{{PROJECT_PATH}}` | `/home/user/projects/myproject` | Project root path |
|
|
159
|
+
| `{{WORKSPACE_PATH}}` | `/home/.../workspaces/feature-min-123` | Full workspace path |
|
|
160
|
+
|
|
161
|
+
## Quick Start Examples
|
|
162
|
+
|
|
163
|
+
### Simple Monorepo (Default)
|
|
164
|
+
|
|
165
|
+
```yaml
|
|
166
|
+
projects:
|
|
167
|
+
myapp:
|
|
168
|
+
name: "My App"
|
|
169
|
+
path: /home/user/projects/myapp
|
|
170
|
+
linear_team: APP
|
|
171
|
+
# No workspace config needed - uses defaults
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### React + Express Monorepo
|
|
175
|
+
|
|
176
|
+
```yaml
|
|
177
|
+
projects:
|
|
178
|
+
myapp:
|
|
179
|
+
name: "My App"
|
|
180
|
+
path: /home/user/projects/myapp
|
|
181
|
+
linear_team: APP
|
|
182
|
+
workspace:
|
|
183
|
+
services:
|
|
184
|
+
- name: api
|
|
185
|
+
template: express
|
|
186
|
+
path: server
|
|
187
|
+
- name: frontend
|
|
188
|
+
template: react-vite
|
|
189
|
+
path: client
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Spring Boot + React Polyrepo
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
projects:
|
|
196
|
+
myapp:
|
|
197
|
+
name: "My App"
|
|
198
|
+
path: /home/user/projects/myapp
|
|
199
|
+
linear_team: APP
|
|
200
|
+
workspace:
|
|
201
|
+
type: polyrepo
|
|
202
|
+
repos:
|
|
203
|
+
- name: fe
|
|
204
|
+
path: frontend
|
|
205
|
+
- name: api
|
|
206
|
+
path: backend
|
|
207
|
+
services:
|
|
208
|
+
- name: api
|
|
209
|
+
template: spring-boot-maven
|
|
210
|
+
path: api
|
|
211
|
+
health_url: "https://api-{{FEATURE_FOLDER}}.myapp.test/actuator/health"
|
|
212
|
+
- name: frontend
|
|
213
|
+
template: react-pnpm
|
|
214
|
+
path: fe
|
|
215
|
+
dns:
|
|
216
|
+
domain: myapp.test
|
|
217
|
+
entries:
|
|
218
|
+
- "{{FEATURE_FOLDER}}.myapp.test"
|
|
219
|
+
- "api-{{FEATURE_FOLDER}}.myapp.test"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Full Configuration (MYN-style)
|
|
223
|
+
|
|
224
|
+
See the Mind Your Now project for a complete example:
|
|
225
|
+
```bash
|
|
226
|
+
cat ~/.panopticon/projects.yaml
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Custom Workspace Scripts
|
|
230
|
+
|
|
231
|
+
For complex projects, you can provide custom scripts instead of using built-in workspace creation:
|
|
232
|
+
|
|
233
|
+
```yaml
|
|
234
|
+
projects:
|
|
235
|
+
myproject:
|
|
236
|
+
workspace_command: /path/to/my-new-feature-script
|
|
237
|
+
workspace_remove_command: /path/to/my-remove-feature-script
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Your custom script receives:
|
|
241
|
+
- `$1`: Feature name (e.g., `min-123`)
|
|
242
|
+
- `--docker`: Flag to start Docker containers
|
|
243
|
+
|
|
244
|
+
Example script structure:
|
|
245
|
+
```bash
|
|
246
|
+
#!/bin/bash
|
|
247
|
+
FEATURE_NAME="$1"
|
|
248
|
+
START_DOCKER=false
|
|
249
|
+
[[ "$*" == *"--docker"* ]] && START_DOCKER=true
|
|
250
|
+
|
|
251
|
+
# Your workspace creation logic here...
|
|
252
|
+
|
|
253
|
+
if [ "$START_DOCKER" = true ]; then
|
|
254
|
+
docker compose up -d
|
|
255
|
+
fi
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## DNS Setup
|
|
259
|
+
|
|
260
|
+
### WSL2 (Windows Subsystem for Linux)
|
|
261
|
+
|
|
262
|
+
Uses `~/.wsl2hosts` file which syncs to Windows hosts file:
|
|
263
|
+
|
|
264
|
+
1. Add entries to `~/.wsl2hosts` (one hostname per line)
|
|
265
|
+
2. Run PowerShell scheduled task to sync to Windows
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
# Entries are added automatically by pan workspace create
|
|
269
|
+
cat ~/.wsl2hosts
|
|
270
|
+
# feature-min-123.myapp.test
|
|
271
|
+
# api-feature-min-123.myapp.test
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### macOS
|
|
275
|
+
|
|
276
|
+
Uses `/etc/hosts` directly (requires sudo for initial setup).
|
|
277
|
+
|
|
278
|
+
### Linux
|
|
279
|
+
|
|
280
|
+
Uses `/etc/hosts` or dnsmasq depending on configuration.
|
|
281
|
+
|
|
282
|
+
## Related Commands
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
# Create workspace (uses configuration from projects.yaml)
|
|
286
|
+
pan workspace create MIN-123
|
|
287
|
+
|
|
288
|
+
# Create with Docker startup
|
|
289
|
+
pan workspace create MIN-123 --docker
|
|
290
|
+
|
|
291
|
+
# Remove workspace
|
|
292
|
+
pan workspace destroy MIN-123
|
|
293
|
+
|
|
294
|
+
# List workspaces across all projects
|
|
295
|
+
pan workspace list --all
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Related Skills
|
|
299
|
+
|
|
300
|
+
- `/pan-docker` - Docker template selection
|
|
301
|
+
- `/pan-network` - Traefik and networking setup
|
|
302
|
+
- `/pan-projects` - Project management
|
|
303
|
+
- `/pan-test-config` - Test suite configuration
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refactor
|
|
3
|
+
description: Safe refactoring approach with test coverage first
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Refactoring
|
|
7
|
+
|
|
8
|
+
When refactoring code:
|
|
9
|
+
|
|
10
|
+
## Before Starting
|
|
11
|
+
1. Ensure tests exist for code being refactored
|
|
12
|
+
2. Run tests to establish baseline (must pass)
|
|
13
|
+
3. If test coverage is low, ADD TESTS FIRST
|
|
14
|
+
|
|
15
|
+
## During Refactoring
|
|
16
|
+
- Make ONE type of change at a time
|
|
17
|
+
- Keep tests green after EACH change
|
|
18
|
+
- Commit frequently with clear messages
|
|
19
|
+
|
|
20
|
+
## Refactoring Types
|
|
21
|
+
- **Extract**: Pull code into new function/class
|
|
22
|
+
- **Inline**: Remove unnecessary indirection
|
|
23
|
+
- **Rename**: Improve naming clarity
|
|
24
|
+
- **Move**: Relocate to better home
|
|
25
|
+
- **Simplify**: Reduce complexity
|
|
26
|
+
|
|
27
|
+
## After Refactoring
|
|
28
|
+
- All tests must still pass
|
|
29
|
+
- Behavior must be unchanged
|
|
30
|
+
- Review diff for unintended changes
|