pan-wizard 2.8.1
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/LICENSE +21 -0
- package/README.md +772 -0
- package/agents/pan-debugger.md +1246 -0
- package/agents/pan-document_code.md +965 -0
- package/agents/pan-executor.md +469 -0
- package/agents/pan-integration-checker.md +443 -0
- package/agents/pan-phase-researcher.md +572 -0
- package/agents/pan-plan-checker.md +763 -0
- package/agents/pan-planner.md +1297 -0
- package/agents/pan-project-researcher.md +647 -0
- package/agents/pan-research-synthesizer.md +239 -0
- package/agents/pan-reviewer.md +112 -0
- package/agents/pan-roadmapper.md +642 -0
- package/agents/pan-verifier.md +672 -0
- package/assets/pan-logo-2000-transparent.svg +30 -0
- package/assets/pan-logo-2000.svg +43 -0
- package/assets/terminal.svg +119 -0
- package/bin/install-lib.cjs +616 -0
- package/bin/install.js +1936 -0
- package/commands/pan/add-phase.md +44 -0
- package/commands/pan/assumptions.md +47 -0
- package/commands/pan/audit-deployment.md +378 -0
- package/commands/pan/debug.md +168 -0
- package/commands/pan/discord.md +19 -0
- package/commands/pan/discuss-phase.md +84 -0
- package/commands/pan/exec-phase.md +45 -0
- package/commands/pan/focus-auto.md +323 -0
- package/commands/pan/focus-design.md +816 -0
- package/commands/pan/focus-exec.md +316 -0
- package/commands/pan/focus-plan.md +101 -0
- package/commands/pan/focus-scan.md +272 -0
- package/commands/pan/focus-sync.md +104 -0
- package/commands/pan/health.md +23 -0
- package/commands/pan/help.md +23 -0
- package/commands/pan/insert-phase.md +33 -0
- package/commands/pan/map-codebase.md +72 -0
- package/commands/pan/milestone-audit.md +37 -0
- package/commands/pan/milestone-cleanup.md +19 -0
- package/commands/pan/milestone-done.md +137 -0
- package/commands/pan/milestone-gaps.md +35 -0
- package/commands/pan/milestone-new.md +45 -0
- package/commands/pan/new-project.md +43 -0
- package/commands/pan/patches.md +110 -0
- package/commands/pan/pause.md +39 -0
- package/commands/pan/phase-budget.md +23 -0
- package/commands/pan/phase-tests.md +42 -0
- package/commands/pan/plan-phase.md +46 -0
- package/commands/pan/profile.md +36 -0
- package/commands/pan/progress.md +25 -0
- package/commands/pan/quick.md +42 -0
- package/commands/pan/remove-phase.md +32 -0
- package/commands/pan/research-phase.md +190 -0
- package/commands/pan/resume.md +41 -0
- package/commands/pan/retro.md +33 -0
- package/commands/pan/settings.md +37 -0
- package/commands/pan/todo-add.md +48 -0
- package/commands/pan/todo-check.md +46 -0
- package/commands/pan/update.md +38 -0
- package/commands/pan/verify-phase.md +39 -0
- package/hooks/dist/pan-check-update.js +62 -0
- package/hooks/dist/pan-context-monitor.js +122 -0
- package/hooks/dist/pan-statusline.js +108 -0
- package/package.json +66 -0
- package/pan-wizard-core/bin/lib/codebase.cjs +746 -0
- package/pan-wizard-core/bin/lib/commands.cjs +1435 -0
- package/pan-wizard-core/bin/lib/config.cjs +611 -0
- package/pan-wizard-core/bin/lib/constants.cjs +696 -0
- package/pan-wizard-core/bin/lib/context-budget.cjs +150 -0
- package/pan-wizard-core/bin/lib/core.cjs +650 -0
- package/pan-wizard-core/bin/lib/focus.cjs +900 -0
- package/pan-wizard-core/bin/lib/frontmatter.cjs +442 -0
- package/pan-wizard-core/bin/lib/init.cjs +881 -0
- package/pan-wizard-core/bin/lib/milestone.cjs +276 -0
- package/pan-wizard-core/bin/lib/phase.cjs +1212 -0
- package/pan-wizard-core/bin/lib/roadmap.cjs +470 -0
- package/pan-wizard-core/bin/lib/state.cjs +1029 -0
- package/pan-wizard-core/bin/lib/template.cjs +314 -0
- package/pan-wizard-core/bin/lib/utils.cjs +171 -0
- package/pan-wizard-core/bin/lib/verify.cjs +1808 -0
- package/pan-wizard-core/bin/pan-tools.cjs +773 -0
- package/pan-wizard-core/references/checkpoints.md +776 -0
- package/pan-wizard-core/references/continuation-format.md +249 -0
- package/pan-wizard-core/references/decimal-phase-calculation.md +65 -0
- package/pan-wizard-core/references/git-integration.md +248 -0
- package/pan-wizard-core/references/git-planning-commit.md +38 -0
- package/pan-wizard-core/references/model-profile-resolution.md +34 -0
- package/pan-wizard-core/references/model-profiles.md +111 -0
- package/pan-wizard-core/references/phase-argument-parsing.md +61 -0
- package/pan-wizard-core/references/planning-config.md +196 -0
- package/pan-wizard-core/references/questioning.md +145 -0
- package/pan-wizard-core/references/tdd.md +263 -0
- package/pan-wizard-core/references/ui-brand.md +160 -0
- package/pan-wizard-core/references/verification-patterns.md +612 -0
- package/pan-wizard-core/templates/codebase/architecture.md +283 -0
- package/pan-wizard-core/templates/codebase/best-practices.md +133 -0
- package/pan-wizard-core/templates/codebase/concerns.md +325 -0
- package/pan-wizard-core/templates/codebase/conventions.md +307 -0
- package/pan-wizard-core/templates/codebase/integrations.md +305 -0
- package/pan-wizard-core/templates/codebase/relationships.md +124 -0
- package/pan-wizard-core/templates/codebase/stack.md +199 -0
- package/pan-wizard-core/templates/codebase/structure.md +298 -0
- package/pan-wizard-core/templates/codebase/testing.md +480 -0
- package/pan-wizard-core/templates/config.json +37 -0
- package/pan-wizard-core/templates/context.md +283 -0
- package/pan-wizard-core/templates/continue-here.md +78 -0
- package/pan-wizard-core/templates/debug-subagent-prompt.md +91 -0
- package/pan-wizard-core/templates/debug.md +164 -0
- package/pan-wizard-core/templates/discovery.md +146 -0
- package/pan-wizard-core/templates/milestone-archive.md +123 -0
- package/pan-wizard-core/templates/milestone.md +115 -0
- package/pan-wizard-core/templates/phase-prompt.md +593 -0
- package/pan-wizard-core/templates/planner-subagent-prompt.md +117 -0
- package/pan-wizard-core/templates/project.md +184 -0
- package/pan-wizard-core/templates/requirements.md +231 -0
- package/pan-wizard-core/templates/research-project/architecture.md +204 -0
- package/pan-wizard-core/templates/research-project/features.md +147 -0
- package/pan-wizard-core/templates/research-project/pitfalls.md +200 -0
- package/pan-wizard-core/templates/research-project/stack.md +120 -0
- package/pan-wizard-core/templates/research-project/summary.md +170 -0
- package/pan-wizard-core/templates/research.md +552 -0
- package/pan-wizard-core/templates/retrospective.md +54 -0
- package/pan-wizard-core/templates/roadmap.md +202 -0
- package/pan-wizard-core/templates/standards.md +24 -0
- package/pan-wizard-core/templates/state.md +176 -0
- package/pan-wizard-core/templates/summary-complex.md +59 -0
- package/pan-wizard-core/templates/summary-minimal.md +41 -0
- package/pan-wizard-core/templates/summary-standard.md +49 -0
- package/pan-wizard-core/templates/summary.md +249 -0
- package/pan-wizard-core/templates/uat.md +247 -0
- package/pan-wizard-core/templates/user-setup.md +311 -0
- package/pan-wizard-core/templates/validation.md +76 -0
- package/pan-wizard-core/templates/verification-report.md +322 -0
- package/pan-wizard-core/workflows/add-phase.md +111 -0
- package/pan-wizard-core/workflows/assumptions.md +178 -0
- package/pan-wizard-core/workflows/diagnose-issues.md +219 -0
- package/pan-wizard-core/workflows/discuss-phase.md +542 -0
- package/pan-wizard-core/workflows/exec-phase.md +572 -0
- package/pan-wizard-core/workflows/execute-plan.md +448 -0
- package/pan-wizard-core/workflows/health.md +156 -0
- package/pan-wizard-core/workflows/help.md +431 -0
- package/pan-wizard-core/workflows/insert-phase.md +129 -0
- package/pan-wizard-core/workflows/map-codebase.md +401 -0
- package/pan-wizard-core/workflows/milestone-audit.md +297 -0
- package/pan-wizard-core/workflows/milestone-cleanup.md +152 -0
- package/pan-wizard-core/workflows/milestone-gaps.md +274 -0
- package/pan-wizard-core/workflows/milestone-new.md +382 -0
- package/pan-wizard-core/workflows/new-project.md +1178 -0
- package/pan-wizard-core/workflows/pause.md +122 -0
- package/pan-wizard-core/workflows/phase-tests.md +388 -0
- package/pan-wizard-core/workflows/plan-phase.md +569 -0
- package/pan-wizard-core/workflows/profile.md +115 -0
- package/pan-wizard-core/workflows/progress.md +381 -0
- package/pan-wizard-core/workflows/quick.md +453 -0
- package/pan-wizard-core/workflows/remove-phase.md +154 -0
- package/pan-wizard-core/workflows/research-phase.md +73 -0
- package/pan-wizard-core/workflows/resume-project.md +306 -0
- package/pan-wizard-core/workflows/retro.md +121 -0
- package/pan-wizard-core/workflows/settings.md +213 -0
- package/pan-wizard-core/workflows/todo-add.md +157 -0
- package/pan-wizard-core/workflows/todo-check.md +176 -0
- package/pan-wizard-core/workflows/transition.md +544 -0
- package/pan-wizard-core/workflows/update.md +219 -0
- package/pan-wizard-core/workflows/verify-phase.md +301 -0
- package/scripts/build-hooks.js +43 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# Phase Context Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/phases/XX-name/{phase_num}-context.md` - captures implementation decisions for a phase.
|
|
4
|
+
|
|
5
|
+
**Purpose:** Document decisions that downstream agents need. Researcher uses this to know WHAT to investigate. Planner uses this to know WHAT choices are locked vs flexible.
|
|
6
|
+
|
|
7
|
+
**Key principle:** Categories are NOT predefined. They emerge from what was actually discussed for THIS phase. A CLI phase has CLI-relevant sections, a UI phase has UI-relevant sections.
|
|
8
|
+
|
|
9
|
+
**Downstream consumers:**
|
|
10
|
+
- `pan-phase-researcher` — Reads decisions to focus research (e.g., "card layout" → research card component patterns)
|
|
11
|
+
- `pan-planner` — Reads decisions to create specific tasks (e.g., "infinite scroll" → task includes virtualization)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## File Template
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
# Phase [X]: [Name] - Context
|
|
19
|
+
|
|
20
|
+
**Gathered:** [date]
|
|
21
|
+
**Status:** Ready for planning
|
|
22
|
+
|
|
23
|
+
<domain>
|
|
24
|
+
## Phase Boundary
|
|
25
|
+
|
|
26
|
+
[Clear statement of what this phase delivers — the scope anchor. This comes from roadmap.md and is fixed. Discussion clarifies implementation within this boundary.]
|
|
27
|
+
|
|
28
|
+
</domain>
|
|
29
|
+
|
|
30
|
+
<decisions>
|
|
31
|
+
## Implementation Decisions
|
|
32
|
+
|
|
33
|
+
### [Area 1 that was discussed]
|
|
34
|
+
- [Specific decision made]
|
|
35
|
+
- [Another decision if applicable]
|
|
36
|
+
|
|
37
|
+
### [Area 2 that was discussed]
|
|
38
|
+
- [Specific decision made]
|
|
39
|
+
|
|
40
|
+
### [Area 3 that was discussed]
|
|
41
|
+
- [Specific decision made]
|
|
42
|
+
|
|
43
|
+
### Claude's Discretion
|
|
44
|
+
[Areas where user explicitly said "you decide" — Claude has flexibility here during planning/implementation]
|
|
45
|
+
|
|
46
|
+
</decisions>
|
|
47
|
+
|
|
48
|
+
<specifics>
|
|
49
|
+
## Specific Ideas
|
|
50
|
+
|
|
51
|
+
[Any particular references, examples, or "I want it like X" moments from discussion. Product references, specific behaviors, interaction patterns.]
|
|
52
|
+
|
|
53
|
+
[If none: "No specific requirements — open to standard approaches"]
|
|
54
|
+
|
|
55
|
+
</specifics>
|
|
56
|
+
|
|
57
|
+
<deferred>
|
|
58
|
+
## Deferred Ideas
|
|
59
|
+
|
|
60
|
+
[Ideas that came up during discussion but belong in other phases. Captured here so they're not lost, but explicitly out of scope for this phase.]
|
|
61
|
+
|
|
62
|
+
[If none: "None — discussion stayed within phase scope"]
|
|
63
|
+
|
|
64
|
+
</deferred>
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
*Phase: XX-name*
|
|
69
|
+
*Context gathered: [date]*
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
<good_examples>
|
|
73
|
+
|
|
74
|
+
**Example 1: Visual feature (Post Feed)**
|
|
75
|
+
|
|
76
|
+
```markdown
|
|
77
|
+
# Phase 3: Post Feed - Context
|
|
78
|
+
|
|
79
|
+
**Gathered:** 2025-01-20
|
|
80
|
+
**Status:** Ready for planning
|
|
81
|
+
|
|
82
|
+
<domain>
|
|
83
|
+
## Phase Boundary
|
|
84
|
+
|
|
85
|
+
Display posts from followed users in a scrollable feed. Users can view posts and see engagement counts. Creating posts and interactions are separate phases.
|
|
86
|
+
|
|
87
|
+
</domain>
|
|
88
|
+
|
|
89
|
+
<decisions>
|
|
90
|
+
## Implementation Decisions
|
|
91
|
+
|
|
92
|
+
### Layout style
|
|
93
|
+
- Card-based layout, not timeline or list
|
|
94
|
+
- Each card shows: author avatar, name, timestamp, full post content, reaction counts
|
|
95
|
+
- Cards have subtle shadows, rounded corners — modern feel
|
|
96
|
+
|
|
97
|
+
### Loading behavior
|
|
98
|
+
- Infinite scroll, not pagination
|
|
99
|
+
- Pull-to-refresh on mobile
|
|
100
|
+
- New posts indicator at top ("3 new posts") rather than auto-inserting
|
|
101
|
+
|
|
102
|
+
### Empty state
|
|
103
|
+
- Friendly illustration + "Follow people to see posts here"
|
|
104
|
+
- Suggest 3-5 accounts to follow based on interests
|
|
105
|
+
|
|
106
|
+
### Claude's Discretion
|
|
107
|
+
- Loading skeleton design
|
|
108
|
+
- Exact spacing and typography
|
|
109
|
+
- Error state handling
|
|
110
|
+
|
|
111
|
+
</decisions>
|
|
112
|
+
|
|
113
|
+
<specifics>
|
|
114
|
+
## Specific Ideas
|
|
115
|
+
|
|
116
|
+
- "I like how Twitter shows the new posts indicator without disrupting your scroll position"
|
|
117
|
+
- Cards should feel like Linear's issue cards — clean, not cluttered
|
|
118
|
+
|
|
119
|
+
</specifics>
|
|
120
|
+
|
|
121
|
+
<deferred>
|
|
122
|
+
## Deferred Ideas
|
|
123
|
+
|
|
124
|
+
- Commenting on posts — Phase 5
|
|
125
|
+
- Bookmarking posts — add to backlog
|
|
126
|
+
|
|
127
|
+
</deferred>
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
*Phase: 03-post-feed*
|
|
132
|
+
*Context gathered: 2025-01-20*
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Example 2: CLI tool (Database backup)**
|
|
136
|
+
|
|
137
|
+
```markdown
|
|
138
|
+
# Phase 2: Backup Command - Context
|
|
139
|
+
|
|
140
|
+
**Gathered:** 2025-01-20
|
|
141
|
+
**Status:** Ready for planning
|
|
142
|
+
|
|
143
|
+
<domain>
|
|
144
|
+
## Phase Boundary
|
|
145
|
+
|
|
146
|
+
CLI command to backup database to local file or S3. Supports full and incremental backups. Restore command is a separate phase.
|
|
147
|
+
|
|
148
|
+
</domain>
|
|
149
|
+
|
|
150
|
+
<decisions>
|
|
151
|
+
## Implementation Decisions
|
|
152
|
+
|
|
153
|
+
### Output format
|
|
154
|
+
- JSON for programmatic use, table format for humans
|
|
155
|
+
- Default to table, --json flag for JSON
|
|
156
|
+
- Verbose mode (-v) shows progress, silent by default
|
|
157
|
+
|
|
158
|
+
### Flag design
|
|
159
|
+
- Short flags for common options: -o (output), -v (verbose), -f (force)
|
|
160
|
+
- Long flags for clarity: --incremental, --compress, --encrypt
|
|
161
|
+
- Required: database connection string (positional or --db)
|
|
162
|
+
|
|
163
|
+
### Error recovery
|
|
164
|
+
- Retry 3 times on network failure, then fail with clear message
|
|
165
|
+
- --no-retry flag to fail fast
|
|
166
|
+
- Partial backups are deleted on failure (no corrupt files)
|
|
167
|
+
|
|
168
|
+
### Claude's Discretion
|
|
169
|
+
- Exact progress bar implementation
|
|
170
|
+
- Compression algorithm choice
|
|
171
|
+
- Temp file handling
|
|
172
|
+
|
|
173
|
+
</decisions>
|
|
174
|
+
|
|
175
|
+
<specifics>
|
|
176
|
+
## Specific Ideas
|
|
177
|
+
|
|
178
|
+
- "I want it to feel like pg_dump — familiar to database people"
|
|
179
|
+
- Should work in CI pipelines (exit codes, no interactive prompts)
|
|
180
|
+
|
|
181
|
+
</specifics>
|
|
182
|
+
|
|
183
|
+
<deferred>
|
|
184
|
+
## Deferred Ideas
|
|
185
|
+
|
|
186
|
+
- Scheduled backups — separate phase
|
|
187
|
+
- Backup rotation/retention — add to backlog
|
|
188
|
+
|
|
189
|
+
</deferred>
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
*Phase: 02-backup-command*
|
|
194
|
+
*Context gathered: 2025-01-20*
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Example 3: Organization task (Photo library)**
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
# Phase 1: Photo Organization - Context
|
|
201
|
+
|
|
202
|
+
**Gathered:** 2025-01-20
|
|
203
|
+
**Status:** Ready for planning
|
|
204
|
+
|
|
205
|
+
<domain>
|
|
206
|
+
## Phase Boundary
|
|
207
|
+
|
|
208
|
+
Organize existing photo library into structured folders. Handle duplicates and apply consistent naming. Tagging and search are separate phases.
|
|
209
|
+
|
|
210
|
+
</domain>
|
|
211
|
+
|
|
212
|
+
<decisions>
|
|
213
|
+
## Implementation Decisions
|
|
214
|
+
|
|
215
|
+
### Grouping criteria
|
|
216
|
+
- Primary grouping by year, then by month
|
|
217
|
+
- Events detected by time clustering (photos within 2 hours = same event)
|
|
218
|
+
- Event folders named by date + location if available
|
|
219
|
+
|
|
220
|
+
### Duplicate handling
|
|
221
|
+
- Keep highest resolution version
|
|
222
|
+
- Move duplicates to _duplicates folder (don't delete)
|
|
223
|
+
- Log all duplicate decisions for review
|
|
224
|
+
|
|
225
|
+
### Naming convention
|
|
226
|
+
- Format: YYYY-MM-DD_HH-MM-SS_originalname.ext
|
|
227
|
+
- Preserve original filename as suffix for searchability
|
|
228
|
+
- Handle name collisions with incrementing suffix
|
|
229
|
+
|
|
230
|
+
### Claude's Discretion
|
|
231
|
+
- Exact clustering algorithm
|
|
232
|
+
- How to handle photos with no EXIF data
|
|
233
|
+
- Folder emoji usage
|
|
234
|
+
|
|
235
|
+
</decisions>
|
|
236
|
+
|
|
237
|
+
<specifics>
|
|
238
|
+
## Specific Ideas
|
|
239
|
+
|
|
240
|
+
- "I want to be able to find photos by roughly when they were taken"
|
|
241
|
+
- Don't delete anything — worst case, move to a review folder
|
|
242
|
+
|
|
243
|
+
</specifics>
|
|
244
|
+
|
|
245
|
+
<deferred>
|
|
246
|
+
## Deferred Ideas
|
|
247
|
+
|
|
248
|
+
- Face detection grouping — future phase
|
|
249
|
+
- Cloud sync — out of scope for now
|
|
250
|
+
|
|
251
|
+
</deferred>
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
*Phase: 01-photo-organization*
|
|
256
|
+
*Context gathered: 2025-01-20*
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
</good_examples>
|
|
260
|
+
|
|
261
|
+
<guidelines>
|
|
262
|
+
**This template captures DECISIONS for downstream agents.**
|
|
263
|
+
|
|
264
|
+
The output should answer: "What does the researcher need to investigate? What choices are locked for the planner?"
|
|
265
|
+
|
|
266
|
+
**Good content (concrete decisions):**
|
|
267
|
+
- "Card-based layout, not timeline"
|
|
268
|
+
- "Retry 3 times on network failure, then fail"
|
|
269
|
+
- "Group by year, then by month"
|
|
270
|
+
- "JSON for programmatic use, table for humans"
|
|
271
|
+
|
|
272
|
+
**Bad content (too vague):**
|
|
273
|
+
- "Should feel modern and clean"
|
|
274
|
+
- "Good user experience"
|
|
275
|
+
- "Fast and responsive"
|
|
276
|
+
- "Easy to use"
|
|
277
|
+
|
|
278
|
+
**After creation:**
|
|
279
|
+
- File lives in phase directory: `.planning/phases/XX-name/{phase_num}-context.md`
|
|
280
|
+
- `pan-phase-researcher` uses decisions to focus investigation
|
|
281
|
+
- `pan-planner` uses decisions + research to create executable tasks
|
|
282
|
+
- Downstream agents should NOT need to ask the user again about captured decisions
|
|
283
|
+
</guidelines>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Continue-Here Template
|
|
2
|
+
|
|
3
|
+
Copy and fill this structure for `.planning/phases/XX-name/.continue-here.md`:
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
---
|
|
7
|
+
phase: XX-name
|
|
8
|
+
task: 3
|
|
9
|
+
total_tasks: 7
|
|
10
|
+
status: in_progress
|
|
11
|
+
last_updated: 2025-01-15T14:30:00Z
|
|
12
|
+
---
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
<current_state>
|
|
17
|
+
[Where exactly are we? What's the immediate context?]
|
|
18
|
+
</current_state>
|
|
19
|
+
|
|
20
|
+
<completed_work>
|
|
21
|
+
[What got done this session - be specific]
|
|
22
|
+
|
|
23
|
+
- Task 1: [name] - Done
|
|
24
|
+
- Task 2: [name] - Done
|
|
25
|
+
- Task 3: [name] - In progress, [what's done on it]
|
|
26
|
+
</completed_work>
|
|
27
|
+
|
|
28
|
+
<remaining_work>
|
|
29
|
+
[What's left in this phase]
|
|
30
|
+
|
|
31
|
+
- Task 3: [name] - [what's left to do]
|
|
32
|
+
- Task 4: [name] - Not started
|
|
33
|
+
- Task 5: [name] - Not started
|
|
34
|
+
</remaining_work>
|
|
35
|
+
|
|
36
|
+
<decisions_made>
|
|
37
|
+
[Key decisions and why - so next session doesn't re-debate]
|
|
38
|
+
|
|
39
|
+
- Decided to use [X] because [reason]
|
|
40
|
+
- Chose [approach] over [alternative] because [reason]
|
|
41
|
+
</decisions_made>
|
|
42
|
+
|
|
43
|
+
<blockers>
|
|
44
|
+
[Anything stuck or waiting on external factors]
|
|
45
|
+
|
|
46
|
+
- [Blocker 1]: [status/workaround]
|
|
47
|
+
</blockers>
|
|
48
|
+
|
|
49
|
+
<context>
|
|
50
|
+
[Mental state, "vibe", anything that helps resume smoothly]
|
|
51
|
+
|
|
52
|
+
[What were you thinking about? What was the plan?
|
|
53
|
+
This is the "pick up exactly where you left off" context.]
|
|
54
|
+
</context>
|
|
55
|
+
|
|
56
|
+
<next_action>
|
|
57
|
+
[The very first thing to do when resuming]
|
|
58
|
+
|
|
59
|
+
Start with: [specific action]
|
|
60
|
+
</next_action>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
<yaml_fields>
|
|
64
|
+
Required YAML frontmatter:
|
|
65
|
+
|
|
66
|
+
- `phase`: Directory name (e.g., `02-authentication`)
|
|
67
|
+
- `task`: Current task number
|
|
68
|
+
- `total_tasks`: How many tasks in phase
|
|
69
|
+
- `status`: `in_progress`, `blocked`, `almost_done`
|
|
70
|
+
- `last_updated`: ISO timestamp
|
|
71
|
+
</yaml_fields>
|
|
72
|
+
|
|
73
|
+
<guidelines>
|
|
74
|
+
- Be specific enough that a fresh Claude instance understands immediately
|
|
75
|
+
- Include WHY decisions were made, not just what
|
|
76
|
+
- The `<next_action>` should be actionable without reading anything else
|
|
77
|
+
- This file gets DELETED after resume - it's not permanent storage
|
|
78
|
+
</guidelines>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Debug Subagent Prompt Template
|
|
2
|
+
|
|
3
|
+
Template for spawning pan-debugger agent. The agent contains all debugging expertise - this template provides problem context only.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
<objective>
|
|
11
|
+
Investigate issue: {issue_id}
|
|
12
|
+
|
|
13
|
+
**Summary:** {issue_summary}
|
|
14
|
+
</objective>
|
|
15
|
+
|
|
16
|
+
<symptoms>
|
|
17
|
+
expected: {expected}
|
|
18
|
+
actual: {actual}
|
|
19
|
+
errors: {errors}
|
|
20
|
+
reproduction: {reproduction}
|
|
21
|
+
timeline: {timeline}
|
|
22
|
+
</symptoms>
|
|
23
|
+
|
|
24
|
+
<mode>
|
|
25
|
+
symptoms_prefilled: {true_or_false}
|
|
26
|
+
goal: {find_root_cause_only | find_and_fix}
|
|
27
|
+
</mode>
|
|
28
|
+
|
|
29
|
+
<debug_file>
|
|
30
|
+
Create: .planning/debug/{slug}.md
|
|
31
|
+
</debug_file>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Placeholders
|
|
37
|
+
|
|
38
|
+
| Placeholder | Source | Example |
|
|
39
|
+
|-------------|--------|---------|
|
|
40
|
+
| `{issue_id}` | Orchestrator-assigned | `auth-screen-dark` |
|
|
41
|
+
| `{issue_summary}` | User description | `Auth screen is too dark` |
|
|
42
|
+
| `{expected}` | From symptoms | `See logo clearly` |
|
|
43
|
+
| `{actual}` | From symptoms | `Screen is dark` |
|
|
44
|
+
| `{errors}` | From symptoms | `None in console` |
|
|
45
|
+
| `{reproduction}` | From symptoms | `Open /auth page` |
|
|
46
|
+
| `{timeline}` | From symptoms | `After recent deploy` |
|
|
47
|
+
| `{goal}` | Orchestrator sets | `find_and_fix` |
|
|
48
|
+
| `{slug}` | Generated | `auth-screen-dark` |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
**From /pan:debug:**
|
|
55
|
+
```python
|
|
56
|
+
Task(
|
|
57
|
+
prompt=filled_template,
|
|
58
|
+
subagent_type="pan-debugger",
|
|
59
|
+
description="Debug {slug}"
|
|
60
|
+
)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**From diagnose-issues (UAT):**
|
|
64
|
+
```python
|
|
65
|
+
Task(prompt=template, subagent_type="pan-debugger", description="Debug UAT-001")
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Continuation
|
|
71
|
+
|
|
72
|
+
For checkpoints, spawn fresh agent with:
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
<objective>
|
|
76
|
+
Continue debugging {slug}. Evidence is in the debug file.
|
|
77
|
+
</objective>
|
|
78
|
+
|
|
79
|
+
<prior_state>
|
|
80
|
+
Debug file: @.planning/debug/{slug}.md
|
|
81
|
+
</prior_state>
|
|
82
|
+
|
|
83
|
+
<checkpoint_response>
|
|
84
|
+
**Type:** {checkpoint_type}
|
|
85
|
+
**Response:** {user_response}
|
|
86
|
+
</checkpoint_response>
|
|
87
|
+
|
|
88
|
+
<mode>
|
|
89
|
+
goal: {goal}
|
|
90
|
+
</mode>
|
|
91
|
+
```
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Debug Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/debug/[slug].md` — active debug session tracking.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## File Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
---
|
|
11
|
+
status: gathering | investigating | fixing | verifying | awaiting_human_verify | resolved
|
|
12
|
+
trigger: "[verbatim user input]"
|
|
13
|
+
created: [ISO timestamp]
|
|
14
|
+
updated: [ISO timestamp]
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Current Focus
|
|
18
|
+
<!-- OVERWRITE on each update - always reflects NOW -->
|
|
19
|
+
|
|
20
|
+
hypothesis: [current theory being tested]
|
|
21
|
+
test: [how testing it]
|
|
22
|
+
expecting: [what result means if true/false]
|
|
23
|
+
next_action: [immediate next step]
|
|
24
|
+
|
|
25
|
+
## Symptoms
|
|
26
|
+
<!-- Written during gathering, then immutable -->
|
|
27
|
+
|
|
28
|
+
expected: [what should happen]
|
|
29
|
+
actual: [what actually happens]
|
|
30
|
+
errors: [error messages if any]
|
|
31
|
+
reproduction: [how to trigger]
|
|
32
|
+
started: [when it broke / always broken]
|
|
33
|
+
|
|
34
|
+
## Eliminated
|
|
35
|
+
<!-- APPEND only - prevents re-investigating after /clear -->
|
|
36
|
+
|
|
37
|
+
- hypothesis: [theory that was wrong]
|
|
38
|
+
evidence: [what disproved it]
|
|
39
|
+
timestamp: [when eliminated]
|
|
40
|
+
|
|
41
|
+
## Evidence
|
|
42
|
+
<!-- APPEND only - facts discovered during investigation -->
|
|
43
|
+
|
|
44
|
+
- timestamp: [when found]
|
|
45
|
+
checked: [what was examined]
|
|
46
|
+
found: [what was observed]
|
|
47
|
+
implication: [what this means]
|
|
48
|
+
|
|
49
|
+
## Resolution
|
|
50
|
+
<!-- OVERWRITE as understanding evolves -->
|
|
51
|
+
|
|
52
|
+
root_cause: [empty until found]
|
|
53
|
+
fix: [empty until applied]
|
|
54
|
+
verification: [empty until verified]
|
|
55
|
+
files_changed: []
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
<section_rules>
|
|
61
|
+
|
|
62
|
+
**Frontmatter (status, trigger, timestamps):**
|
|
63
|
+
- `status`: OVERWRITE - reflects current phase
|
|
64
|
+
- `trigger`: IMMUTABLE - verbatim user input, never changes
|
|
65
|
+
- `created`: IMMUTABLE - set once
|
|
66
|
+
- `updated`: OVERWRITE - update on every change
|
|
67
|
+
|
|
68
|
+
**Current Focus:**
|
|
69
|
+
- OVERWRITE entirely on each update
|
|
70
|
+
- Always reflects what Claude is doing RIGHT NOW
|
|
71
|
+
- If Claude reads this after /clear, it knows exactly where to resume
|
|
72
|
+
- Fields: hypothesis, test, expecting, next_action
|
|
73
|
+
|
|
74
|
+
**Symptoms:**
|
|
75
|
+
- Written during initial gathering phase
|
|
76
|
+
- IMMUTABLE after gathering complete
|
|
77
|
+
- Reference point for what we're trying to fix
|
|
78
|
+
- Fields: expected, actual, errors, reproduction, started
|
|
79
|
+
|
|
80
|
+
**Eliminated:**
|
|
81
|
+
- APPEND only - never remove entries
|
|
82
|
+
- Prevents re-investigating dead ends after context reset
|
|
83
|
+
- Each entry: hypothesis, evidence that disproved it, timestamp
|
|
84
|
+
- Critical for efficiency across /clear boundaries
|
|
85
|
+
|
|
86
|
+
**Evidence:**
|
|
87
|
+
- APPEND only - never remove entries
|
|
88
|
+
- Facts discovered during investigation
|
|
89
|
+
- Each entry: timestamp, what checked, what found, implication
|
|
90
|
+
- Builds the case for root cause
|
|
91
|
+
|
|
92
|
+
**Resolution:**
|
|
93
|
+
- OVERWRITE as understanding evolves
|
|
94
|
+
- May update multiple times as fixes are tried
|
|
95
|
+
- Final state shows confirmed root cause and verified fix
|
|
96
|
+
- Fields: root_cause, fix, verification, files_changed
|
|
97
|
+
|
|
98
|
+
</section_rules>
|
|
99
|
+
|
|
100
|
+
<lifecycle>
|
|
101
|
+
|
|
102
|
+
**Creation:** Immediately when /pan:debug is called
|
|
103
|
+
- Create file with trigger from user input
|
|
104
|
+
- Set status to "gathering"
|
|
105
|
+
- Current Focus: next_action = "gather symptoms"
|
|
106
|
+
- Symptoms: empty, to be filled
|
|
107
|
+
|
|
108
|
+
**During symptom gathering:**
|
|
109
|
+
- Update Symptoms section as user answers questions
|
|
110
|
+
- Update Current Focus with each question
|
|
111
|
+
- When complete: status → "investigating"
|
|
112
|
+
|
|
113
|
+
**During investigation:**
|
|
114
|
+
- OVERWRITE Current Focus with each hypothesis
|
|
115
|
+
- APPEND to Evidence with each finding
|
|
116
|
+
- APPEND to Eliminated when hypothesis disproved
|
|
117
|
+
- Update timestamp in frontmatter
|
|
118
|
+
|
|
119
|
+
**During fixing:**
|
|
120
|
+
- status → "fixing"
|
|
121
|
+
- Update Resolution.root_cause when confirmed
|
|
122
|
+
- Update Resolution.fix when applied
|
|
123
|
+
- Update Resolution.files_changed
|
|
124
|
+
|
|
125
|
+
**During verification:**
|
|
126
|
+
- status → "verifying"
|
|
127
|
+
- Update Resolution.verification with results
|
|
128
|
+
- If verification fails: status → "investigating", try again
|
|
129
|
+
|
|
130
|
+
**After self-verification passes:**
|
|
131
|
+
- status -> "awaiting_human_verify"
|
|
132
|
+
- Request explicit user confirmation in a checkpoint
|
|
133
|
+
- Do NOT move file to resolved yet
|
|
134
|
+
|
|
135
|
+
**On resolution:**
|
|
136
|
+
- status → "resolved"
|
|
137
|
+
- Move file to .planning/debug/resolved/ (only after user confirms fix)
|
|
138
|
+
|
|
139
|
+
</lifecycle>
|
|
140
|
+
|
|
141
|
+
<resume_behavior>
|
|
142
|
+
|
|
143
|
+
When Claude reads this file after /clear:
|
|
144
|
+
|
|
145
|
+
1. Parse frontmatter → know status
|
|
146
|
+
2. Read Current Focus → know exactly what was happening
|
|
147
|
+
3. Read Eliminated → know what NOT to retry
|
|
148
|
+
4. Read Evidence → know what's been learned
|
|
149
|
+
5. Continue from next_action
|
|
150
|
+
|
|
151
|
+
The file IS the debugging brain. Claude should be able to resume perfectly from any interruption point.
|
|
152
|
+
|
|
153
|
+
</resume_behavior>
|
|
154
|
+
|
|
155
|
+
<size_constraint>
|
|
156
|
+
|
|
157
|
+
Keep debug files focused:
|
|
158
|
+
- Evidence entries: 1-2 lines each, just the facts
|
|
159
|
+
- Eliminated: brief - hypothesis + why it failed
|
|
160
|
+
- No narrative prose - structured data only
|
|
161
|
+
|
|
162
|
+
If evidence grows very large (10+ entries), consider whether you're going in circles. Check Eliminated to ensure you're not re-treading.
|
|
163
|
+
|
|
164
|
+
</size_constraint>
|