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,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: onboard-codebase
|
|
3
|
+
description: Systematic approach to understanding a new codebase
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codebase Onboarding
|
|
7
|
+
|
|
8
|
+
## 1. High-Level Structure
|
|
9
|
+
- Read README.md
|
|
10
|
+
- Map directory structure
|
|
11
|
+
- Identify main entry points
|
|
12
|
+
|
|
13
|
+
## 2. Tech Stack
|
|
14
|
+
- What languages/frameworks?
|
|
15
|
+
- What build tools?
|
|
16
|
+
- What testing frameworks?
|
|
17
|
+
- What CI/CD?
|
|
18
|
+
|
|
19
|
+
## 3. Architecture Patterns
|
|
20
|
+
- How is code organized? (layers, modules, services)
|
|
21
|
+
- How does data flow?
|
|
22
|
+
- What are the key abstractions?
|
|
23
|
+
|
|
24
|
+
## 4. Development Workflow
|
|
25
|
+
- How to run locally?
|
|
26
|
+
- How to run tests?
|
|
27
|
+
- How to deploy?
|
|
28
|
+
|
|
29
|
+
## 5. Document Findings
|
|
30
|
+
Create a summary with:
|
|
31
|
+
- Architecture diagram (ASCII or mermaid)
|
|
32
|
+
- Key files and their purposes
|
|
33
|
+
- Common patterns used
|
|
34
|
+
- Gotchas and quirks
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: opus-plan
|
|
3
|
+
description: >
|
|
4
|
+
Opus-driven planning for issues before Sonnet implementation. Creates workspace,
|
|
5
|
+
PRD.md, STATE.md, beads with dependencies, and updates issue tracker. Ensures
|
|
6
|
+
strategic decisions are made by Opus, not cheaper models.
|
|
7
|
+
triggers:
|
|
8
|
+
- opus plan
|
|
9
|
+
- opus-plan
|
|
10
|
+
- opus planning
|
|
11
|
+
- plan with opus
|
|
12
|
+
allowed-tools:
|
|
13
|
+
- Read
|
|
14
|
+
- Write
|
|
15
|
+
- Bash
|
|
16
|
+
- Task
|
|
17
|
+
- Grep
|
|
18
|
+
- Glob
|
|
19
|
+
- ToolSearch
|
|
20
|
+
version: "1.2.0"
|
|
21
|
+
author: "Ed Becker"
|
|
22
|
+
license: "MIT"
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Opus Planning Skill
|
|
26
|
+
|
|
27
|
+
**Trigger:** `/opus-plan <issue-id>`
|
|
28
|
+
|
|
29
|
+
**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.
|
|
30
|
+
|
|
31
|
+
## Core Principle
|
|
32
|
+
|
|
33
|
+
**Opus plans EVERYTHING. Sonnet executes.**
|
|
34
|
+
|
|
35
|
+
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.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## EXECUTION STEPS
|
|
40
|
+
|
|
41
|
+
### Step 1: Parse Issue ID and Create Workspace
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# PAN-XXX -> /home/eltmon/projects/panopticon (GitHub)
|
|
45
|
+
# MIN-XXX -> /home/eltmon/projects/myn (Linear)
|
|
46
|
+
# HH-XXX -> /home/eltmon/projects/househunt (Linear)
|
|
47
|
+
# JH-XXX -> /home/eltmon/projects/jobhunt (Linear)
|
|
48
|
+
|
|
49
|
+
# CRITICAL: Create a proper git worktree with feature branch
|
|
50
|
+
# DO NOT use mkdir -p - that creates a directory without git tracking!
|
|
51
|
+
cd <project>
|
|
52
|
+
pan workspace <issue-id> # Creates workspaces/feature-<id>/ with feature branch
|
|
53
|
+
|
|
54
|
+
# Then create planning directory inside the workspace
|
|
55
|
+
mkdir -p workspaces/feature-<issue-id-lowercase>/.planning
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**IMPORTANT:** The `pan workspace` command creates a git worktree on a feature branch.
|
|
59
|
+
This is REQUIRED so that work agents don't commit directly to main.
|
|
60
|
+
If `pan workspace` fails, fix the issue before continuing.
|
|
61
|
+
|
|
62
|
+
### Step 2: Fetch Issue Details
|
|
63
|
+
|
|
64
|
+
**GitHub (PAN-*):** `gh issue view <number>`
|
|
65
|
+
**Linear:** Use `mcp__linear__get_issue` tool
|
|
66
|
+
|
|
67
|
+
Read the FULL issue. Understand what's being asked.
|
|
68
|
+
|
|
69
|
+
### Step 3: Deep Discovery
|
|
70
|
+
|
|
71
|
+
**YOU MUST** thoroughly explore the codebase. Use `Task` tool with `subagent_type=Explore` or manually:
|
|
72
|
+
|
|
73
|
+
1. Find ALL related files:
|
|
74
|
+
- Where does the feature touch?
|
|
75
|
+
- What patterns exist?
|
|
76
|
+
- What tests exist?
|
|
77
|
+
|
|
78
|
+
2. Read key files completely:
|
|
79
|
+
- Don't skim - read line by line
|
|
80
|
+
- Understand the data flow
|
|
81
|
+
- Note function signatures
|
|
82
|
+
|
|
83
|
+
3. Identify:
|
|
84
|
+
- Files to create (new)
|
|
85
|
+
- Files to modify (existing)
|
|
86
|
+
- Files to delete (cleanup)
|
|
87
|
+
- Tests to write/update
|
|
88
|
+
|
|
89
|
+
### Step 4: Write PRD.md
|
|
90
|
+
|
|
91
|
+
Create `.planning/PRD.md` with ALL sections filled in completely:
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
# PRD: <Title>
|
|
95
|
+
|
|
96
|
+
**Issue:** <issue-id>
|
|
97
|
+
**Author:** Ed Becker (with Claude Opus 4.6)
|
|
98
|
+
**Created:** <date>
|
|
99
|
+
**Status:** Ready for Implementation
|
|
100
|
+
|
|
101
|
+
## Executive Summary
|
|
102
|
+
<2-3 sentences describing what we're building and why>
|
|
103
|
+
|
|
104
|
+
## Problem Statement
|
|
105
|
+
<Detailed description of the problem. Include:
|
|
106
|
+
- Current behavior
|
|
107
|
+
- Desired behavior
|
|
108
|
+
- Impact of not fixing>
|
|
109
|
+
|
|
110
|
+
## User Personas
|
|
111
|
+
<At least 3 personas with specific needs>
|
|
112
|
+
|
|
113
|
+
## User Stories
|
|
114
|
+
<10+ user stories covering all use cases>
|
|
115
|
+
|
|
116
|
+
## Functional Requirements
|
|
117
|
+
|
|
118
|
+
### FR1: <Category>
|
|
119
|
+
- FR1.1: <Specific, testable requirement>
|
|
120
|
+
- FR1.2: <Specific, testable requirement>
|
|
121
|
+
|
|
122
|
+
### FR2: <Category>
|
|
123
|
+
...
|
|
124
|
+
|
|
125
|
+
## Non-Functional Requirements
|
|
126
|
+
<Performance, accessibility, security, etc.>
|
|
127
|
+
|
|
128
|
+
## Technical Design
|
|
129
|
+
|
|
130
|
+
### Architecture Overview
|
|
131
|
+
<High-level description with diagram if helpful>
|
|
132
|
+
|
|
133
|
+
### Data Flow
|
|
134
|
+
<How data moves through the system>
|
|
135
|
+
|
|
136
|
+
### API Changes
|
|
137
|
+
<New endpoints, modified endpoints, with full signatures>
|
|
138
|
+
|
|
139
|
+
### Component Structure
|
|
140
|
+
<File tree of new/modified components>
|
|
141
|
+
|
|
142
|
+
### Database Changes
|
|
143
|
+
<Schema changes if any>
|
|
144
|
+
|
|
145
|
+
## Acceptance Criteria
|
|
146
|
+
<Numbered checkboxes - these become the final verification>
|
|
147
|
+
|
|
148
|
+
## Dependencies
|
|
149
|
+
<External dependencies, internal dependencies>
|
|
150
|
+
|
|
151
|
+
## Risks and Mitigations
|
|
152
|
+
<What could go wrong, prevention strategies>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Step 5: Write STATE.md
|
|
156
|
+
|
|
157
|
+
Create `.planning/STATE.md` with COMPLETE task breakdown:
|
|
158
|
+
|
|
159
|
+
```markdown
|
|
160
|
+
# <issue-id>: <Title>
|
|
161
|
+
|
|
162
|
+
**Status:** Ready for Implementation
|
|
163
|
+
**Planned by:** Claude Opus 4.6
|
|
164
|
+
**Date:** <date>
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Discovery Summary
|
|
169
|
+
<What you learned - specific file paths, patterns, gotchas>
|
|
170
|
+
|
|
171
|
+
## Key Architectural Decisions
|
|
172
|
+
|
|
173
|
+
### Decision 1: <Topic>
|
|
174
|
+
**Choice:** <What we're doing>
|
|
175
|
+
**Rationale:** <Why this choice, not alternatives>
|
|
176
|
+
**Implications:** <What this means for implementation>
|
|
177
|
+
|
|
178
|
+
### Decision 2: ...
|
|
179
|
+
|
|
180
|
+
## Implementation Plan
|
|
181
|
+
|
|
182
|
+
### Phase 1: <Name> (Priority: P1)
|
|
183
|
+
|
|
184
|
+
#### Task 1.1: <Specific task name>
|
|
185
|
+
**File:** `src/path/to/file.ts`
|
|
186
|
+
**Action:** Create new file / Modify existing
|
|
187
|
+
**Details:**
|
|
188
|
+
- Create function `functionName(param: Type): ReturnType`
|
|
189
|
+
- Handle edge case X
|
|
190
|
+
- Integrate with Y
|
|
191
|
+
**Tests:** `tests/path/to/test.ts`
|
|
192
|
+
|
|
193
|
+
#### Task 1.2: ...
|
|
194
|
+
|
|
195
|
+
### Phase 2: <Name> (Priority: P2)
|
|
196
|
+
...
|
|
197
|
+
|
|
198
|
+
## Task Dependencies
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
Task 1.1 ──┬── Task 2.1 ── Task 3.1
|
|
202
|
+
│
|
|
203
|
+
Task 1.2 ──┴── Task 2.2 ── Task 3.2
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
<Explicit list: "Task X blocks Task Y because...">
|
|
207
|
+
|
|
208
|
+
## Definition of Done
|
|
209
|
+
- [ ] All beads completed
|
|
210
|
+
- [ ] All tests passing
|
|
211
|
+
- [ ] No TypeScript errors
|
|
212
|
+
- [ ] Manual testing complete
|
|
213
|
+
- [ ] PR created and reviewed
|
|
214
|
+
|
|
215
|
+
## Notes for Implementation Agent
|
|
216
|
+
- Start with Phase 1 tasks (they unblock everything)
|
|
217
|
+
- Run tests after each task
|
|
218
|
+
- Don't refactor code outside the scope
|
|
219
|
+
- Ask for help if blocked
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Step 6: CREATE ALL BEADS
|
|
223
|
+
|
|
224
|
+
**This is the critical step.** Create 30-60+ beads for a typical feature. Each bead must be:
|
|
225
|
+
- Completable in 1 focused session
|
|
226
|
+
- Specific enough that no decisions are needed
|
|
227
|
+
- Include exact file paths and function names
|
|
228
|
+
|
|
229
|
+
**For each task in STATE.md, create a bead:**
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
bd create --title "<ISSUE-ID>: <exact task name>" \
|
|
233
|
+
--priority <1-4> \
|
|
234
|
+
--labels "<ISSUE-ID>,difficulty:<level>,phase-<n>,<optional-tags>" \
|
|
235
|
+
--description "<VERY detailed description:
|
|
236
|
+
File: src/exact/path/file.ts
|
|
237
|
+
|
|
238
|
+
What to do:
|
|
239
|
+
1. Create/modify function X
|
|
240
|
+
2. Add parameter Y
|
|
241
|
+
3. Handle edge case Z
|
|
242
|
+
|
|
243
|
+
Expected behavior:
|
|
244
|
+
- When A happens, B should occur
|
|
245
|
+
- If C fails, show error D
|
|
246
|
+
|
|
247
|
+
Tests:
|
|
248
|
+
- Add test in tests/path/test.ts
|
|
249
|
+
- Cover cases: E, F, G>"
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Label format:**
|
|
253
|
+
- `<ISSUE-ID>` - always include
|
|
254
|
+
- `difficulty:trivial|simple|medium|complex`
|
|
255
|
+
- `phase-1|phase-2|etc`
|
|
256
|
+
- `api` - backend work
|
|
257
|
+
- `frontend` - React components
|
|
258
|
+
- `stitch` - design work
|
|
259
|
+
- `test` - test-only tasks
|
|
260
|
+
|
|
261
|
+
**After creating beads, set dependencies:**
|
|
262
|
+
```bash
|
|
263
|
+
bd dep add <blocked-id> <blocker-id>
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**VERIFY:** `bd search "<ISSUE-ID>"` and count. Should be 30-60+ for a real feature.
|
|
267
|
+
|
|
268
|
+
### Step 7: Stitch Integration (UI Work)
|
|
269
|
+
|
|
270
|
+
If issue involves UI, YOU MUST use Stitch:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# Load Stitch tools
|
|
274
|
+
ToolSearch query: "+stitch"
|
|
275
|
+
|
|
276
|
+
# Create project
|
|
277
|
+
mcp__stitch__create_project name="<issue-id>-design"
|
|
278
|
+
|
|
279
|
+
# Design each screen
|
|
280
|
+
mcp__stitch__generate_screen_from_text ...
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Document all designs in `.planning/STITCH_DESIGNS.md`.
|
|
284
|
+
|
|
285
|
+
### Step 8: Update Issue Tracker
|
|
286
|
+
|
|
287
|
+
**GitHub (PAN-*):**
|
|
288
|
+
```bash
|
|
289
|
+
gh label create "planned" --color "0E8A16" 2>/dev/null || true
|
|
290
|
+
gh label create "ready-for-implementation" --color "1D76DB" 2>/dev/null || true
|
|
291
|
+
gh label create "opus-planned" --color "7057FF" 2>/dev/null || true
|
|
292
|
+
|
|
293
|
+
gh issue edit <number> --add-label "planned,ready-for-implementation,opus-planned"
|
|
294
|
+
|
|
295
|
+
gh issue comment <number> --body "## Planning Complete
|
|
296
|
+
**Planned by:** Claude Opus 4.6
|
|
297
|
+
**Workspace:** workspaces/feature-<issue-id>/
|
|
298
|
+
|
|
299
|
+
### Beads Created: <N> tasks
|
|
300
|
+
### Ready Work: <list unblocked beads>
|
|
301
|
+
### Next: /work-issue <ISSUE-ID>"
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
### Step 9: Output Summary
|
|
305
|
+
|
|
306
|
+
```
|
|
307
|
+
## Opus Planning Complete for <ISSUE-ID>
|
|
308
|
+
|
|
309
|
+
**Workspace:** <path>
|
|
310
|
+
**PRD:** <title> - <N> requirements
|
|
311
|
+
**STATE.md:** <N> phases, <M> tasks
|
|
312
|
+
|
|
313
|
+
**Beads Created:** <total>
|
|
314
|
+
- Ready (unblocked): <N>
|
|
315
|
+
- Blocked: <M>
|
|
316
|
+
|
|
317
|
+
**Ready Work:**
|
|
318
|
+
1. <bead-id>: <title> [P<n>]
|
|
319
|
+
...
|
|
320
|
+
|
|
321
|
+
**Next:** /work-issue <ISSUE-ID>
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## Task Breakdown Templates
|
|
327
|
+
|
|
328
|
+
### For Backend API Work:
|
|
329
|
+
|
|
330
|
+
```
|
|
331
|
+
Phase: API Implementation
|
|
332
|
+
Tasks:
|
|
333
|
+
- Define types/interfaces in types.ts
|
|
334
|
+
- Create endpoint handler function
|
|
335
|
+
- Add route registration
|
|
336
|
+
- Add request validation
|
|
337
|
+
- Add error handling
|
|
338
|
+
- Write unit tests for handler
|
|
339
|
+
- Write integration tests for endpoint
|
|
340
|
+
- Update API documentation
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### For React Component Work:
|
|
344
|
+
|
|
345
|
+
```
|
|
346
|
+
Phase: Component Implementation
|
|
347
|
+
Tasks:
|
|
348
|
+
- Create component file with shell
|
|
349
|
+
- Add props interface
|
|
350
|
+
- Implement render logic
|
|
351
|
+
- Add state management (if needed)
|
|
352
|
+
- Add event handlers
|
|
353
|
+
- Style with Tailwind/CSS
|
|
354
|
+
- Add loading states
|
|
355
|
+
- Add error states
|
|
356
|
+
- Write unit tests
|
|
357
|
+
- Wire into parent component
|
|
358
|
+
- Add to Storybook (if applicable)
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### For Bug Fixes:
|
|
362
|
+
|
|
363
|
+
```
|
|
364
|
+
Phase: Bug Fix
|
|
365
|
+
Tasks:
|
|
366
|
+
- Write failing test that reproduces bug
|
|
367
|
+
- Identify root cause (document in bead)
|
|
368
|
+
- Implement fix
|
|
369
|
+
- Verify test passes
|
|
370
|
+
- Add regression tests
|
|
371
|
+
- Check for similar issues elsewhere
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
### For Refactoring:
|
|
375
|
+
|
|
376
|
+
```
|
|
377
|
+
Phase: Refactoring
|
|
378
|
+
Tasks:
|
|
379
|
+
- Write tests for current behavior (if missing)
|
|
380
|
+
- Extract function/module
|
|
381
|
+
- Update all call sites
|
|
382
|
+
- Run tests, fix failures
|
|
383
|
+
- Update documentation
|
|
384
|
+
- Remove old code
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## Quality Checklist
|
|
390
|
+
|
|
391
|
+
Before completing /opus-plan, verify:
|
|
392
|
+
|
|
393
|
+
- [ ] PRD.md has ALL sections filled
|
|
394
|
+
- [ ] STATE.md has EVERY task detailed
|
|
395
|
+
- [ ] Each bead has exact file paths
|
|
396
|
+
- [ ] Each bead has expected behavior
|
|
397
|
+
- [ ] Dependencies are set correctly
|
|
398
|
+
- [ ] Ready tasks identified
|
|
399
|
+
- [ ] Issue tracker updated
|
|
400
|
+
- [ ] No decisions left for implementation agent
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pan-approve
|
|
3
|
+
description: Approve agent work and merge merge request
|
|
4
|
+
triggers:
|
|
5
|
+
- pan approve
|
|
6
|
+
- approve agent work
|
|
7
|
+
- merge agent mr
|
|
8
|
+
- accept work
|
|
9
|
+
- review and merge
|
|
10
|
+
allowed-tools:
|
|
11
|
+
- Bash
|
|
12
|
+
- Read
|
|
13
|
+
- mcp__linear__update_issue
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Approve Agent Work
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
This skill guides you through reviewing and approving work completed by an autonomous agent, including merging the merge request and updating the issue status.
|
|
21
|
+
|
|
22
|
+
## When to Use
|
|
23
|
+
|
|
24
|
+
- Agent has completed work and is awaiting review
|
|
25
|
+
- You've tested the changes and want to merge
|
|
26
|
+
- Closing out an issue after successful UAT
|
|
27
|
+
|
|
28
|
+
## Prerequisites
|
|
29
|
+
|
|
30
|
+
- Git credentials configured for pushing
|
|
31
|
+
- Linear API key (for status updates)
|
|
32
|
+
- Access to merge to target branch
|
|
33
|
+
|
|
34
|
+
## Workflow
|
|
35
|
+
|
|
36
|
+
### 1. Review Agent's Work
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Check agent status
|
|
40
|
+
pan work status
|
|
41
|
+
|
|
42
|
+
# View the workspace
|
|
43
|
+
cd /path/to/workspace
|
|
44
|
+
|
|
45
|
+
# Review changes
|
|
46
|
+
git log --oneline -10
|
|
47
|
+
git diff main...HEAD
|
|
48
|
+
|
|
49
|
+
# Run tests
|
|
50
|
+
npm test # or appropriate test command
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 2. Verify Quality Checklist
|
|
54
|
+
|
|
55
|
+
Before approving, ensure:
|
|
56
|
+
- [ ] Code compiles/builds successfully
|
|
57
|
+
- [ ] Tests pass
|
|
58
|
+
- [ ] No obvious security issues
|
|
59
|
+
- [ ] Changes match the issue requirements
|
|
60
|
+
- [ ] Documentation updated if needed
|
|
61
|
+
|
|
62
|
+
### 3. Merge the Changes
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Option A: Squash merge (recommended for clean history)
|
|
66
|
+
git checkout main
|
|
67
|
+
git merge --squash feature/ISSUE-123-description
|
|
68
|
+
git commit -m "feat: Description of changes (#123)"
|
|
69
|
+
git push origin main
|
|
70
|
+
|
|
71
|
+
# Option B: Regular merge (preserves commit history)
|
|
72
|
+
git checkout main
|
|
73
|
+
git merge feature/ISSUE-123-description
|
|
74
|
+
git push origin main
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 4. Update Issue Status
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Using Linear MCP
|
|
81
|
+
# Update to "Done" status via Linear API
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Or use the Linear MCP tool to update the issue:
|
|
85
|
+
- Set state to "Done"
|
|
86
|
+
- Add a comment noting the merge
|
|
87
|
+
|
|
88
|
+
### 5. Clean Up
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Stop the agent if still running
|
|
92
|
+
pan work kill ISSUE-123
|
|
93
|
+
|
|
94
|
+
# Optionally remove the workspace
|
|
95
|
+
rm -rf /path/to/workspace
|
|
96
|
+
|
|
97
|
+
# NOTE: Feature branches are NOT deleted automatically.
|
|
98
|
+
# They are preserved for history and debugging.
|
|
99
|
+
# If you want to delete them, do so manually.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Quick Command
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# One-liner to approve and merge (if using pan CLI)
|
|
106
|
+
pan work approve ISSUE-123
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Troubleshooting
|
|
110
|
+
|
|
111
|
+
**Merge conflicts:**
|
|
112
|
+
```bash
|
|
113
|
+
# Rebase on main first
|
|
114
|
+
git checkout feature/ISSUE-123-description
|
|
115
|
+
git rebase main
|
|
116
|
+
# Resolve conflicts
|
|
117
|
+
git rebase --continue
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Tests failing:**
|
|
121
|
+
```bash
|
|
122
|
+
# Send feedback to agent
|
|
123
|
+
pan work tell ISSUE-123 "Tests are failing: [error details]. Please fix."
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Missing changes:**
|
|
127
|
+
```bash
|
|
128
|
+
# Send additional requirements
|
|
129
|
+
pan work tell ISSUE-123 "Also need to add: [requirements]"
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Related Skills
|
|
133
|
+
|
|
134
|
+
- `/pan:pending` - View work awaiting approval
|
|
135
|
+
- `/pan:tell` - Send messages to agents
|
|
136
|
+
- `/pan:status` - Check agent status
|