the-grid-cc 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GRID_EVOLUTION.md +297 -0
- package/README.md +172 -116
- package/agents/grid-debugger.md +99 -35
- package/agents/grid-executor.md +161 -10
- package/commands/grid/VERSION +1 -1
- package/commands/grid/mc.md +321 -309
- package/package.json +1 -1
- package/.grid/STATE.md +0 -22
- package/.grid/plans/blog-PLAN-SUMMARY.md +0 -518
- package/.grid/plans/blog-block-01.md +0 -180
- package/.grid/plans/blog-block-02.md +0 -229
- package/.grid/plans/blog-block-03.md +0 -253
- package/.grid/plans/blog-block-04.md +0 -287
- package/.grid/plans/blog-block-05.md +0 -235
- package/.grid/plans/blog-block-06.md +0 -325
- package/DEMO_SCRIPT.md +0 -162
- package/HN_POST.md +0 -104
- package/TICKETS.md +0 -585
- package/test-cli/converter.py +0 -206
- package/test-cli/test_data.json +0 -39
- package/test-cli/test_data.yaml +0 -35
- package/todo-app/README.md +0 -16
- package/todo-app/eslint.config.js +0 -29
- package/todo-app/index.html +0 -13
- package/todo-app/package-lock.json +0 -2917
- package/todo-app/package.json +0 -27
- package/todo-app/public/vite.svg +0 -1
- package/todo-app/src/App.css +0 -125
- package/todo-app/src/App.jsx +0 -84
- package/todo-app/src/index.css +0 -68
- package/todo-app/src/main.jsx +0 -10
- package/todo-app/vite.config.js +0 -7
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# THE GRID
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<strong>
|
|
4
|
+
<strong>From install to shipping features: 5 minutes.</strong>
|
|
5
5
|
<br>
|
|
6
|
-
Multi-agent orchestration for Claude Code that keeps your
|
|
6
|
+
Multi-agent orchestration for Claude Code that keeps your context clean
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<a href="#
|
|
11
|
-
<a href="#
|
|
10
|
+
<a href="#your-first-session">First Session</a> •
|
|
11
|
+
<a href="#three-modes">Three Modes</a> •
|
|
12
12
|
<a href="#commands">Commands</a> •
|
|
13
13
|
<a href="#faq">FAQ</a>
|
|
14
14
|
</p>
|
|
@@ -38,26 +38,25 @@ You're building something complex in Claude Code. Your context window fills up.
|
|
|
38
38
|
|
|
39
39
|
## The Solution
|
|
40
40
|
|
|
41
|
-
The Grid
|
|
41
|
+
The Grid spawns fresh subagents for heavy work while keeping your main conversation focused on goals.
|
|
42
42
|
|
|
43
43
|
```
|
|
44
|
-
YOU ←→
|
|
44
|
+
YOU ←→ Coordinator ←→ Worker Agents
|
|
45
45
|
↓
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
Your context stays clean (~15%)
|
|
47
|
+
Workers get fresh 200k windows
|
|
48
|
+
Coordinator remembers your goals
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- **With Grid**: You're a CEO delegating to specialized teams who report back
|
|
51
|
+
**Without Grid**: One exhausted conversation doing everything
|
|
52
|
+
**With Grid**: Focused coordinator delegating to specialized workers
|
|
54
53
|
|
|
55
54
|
---
|
|
56
55
|
|
|
57
56
|
## Quick Start
|
|
58
57
|
|
|
59
58
|
```bash
|
|
60
|
-
# Install (30 seconds)
|
|
59
|
+
# Install (30 seconds, works on macOS/Linux/Windows+WSL)
|
|
61
60
|
npx the-grid-cc
|
|
62
61
|
```
|
|
63
62
|
|
|
@@ -67,100 +66,101 @@ Then in Claude Code:
|
|
|
67
66
|
/grid
|
|
68
67
|
```
|
|
69
68
|
|
|
70
|
-
|
|
69
|
+
That's it. Describe what you want to build.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Your First Session
|
|
74
|
+
|
|
75
|
+
Here's exactly what happens when you use The Grid for the first time:
|
|
71
76
|
|
|
72
|
-
**Example session:**
|
|
73
77
|
```
|
|
74
|
-
|
|
78
|
+
YOU: /grid
|
|
75
79
|
|
|
76
|
-
THE GRID
|
|
77
|
-
════════
|
|
80
|
+
GRID: THE GRID
|
|
81
|
+
════════
|
|
78
82
|
|
|
79
|
-
Master Control online.
|
|
83
|
+
Master Control online.
|
|
80
84
|
|
|
81
|
-
What would you like to build?
|
|
85
|
+
What would you like to build?
|
|
82
86
|
|
|
83
|
-
|
|
87
|
+
YOU: A REST API with user authentication
|
|
84
88
|
|
|
85
|
-
How involved do you want to be?
|
|
89
|
+
GRID: How involved do you want to be?
|
|
86
90
|
|
|
87
|
-
|
|
88
|
-
|
|
91
|
+
AUTOPILOT - I handle everything. Zero questions.
|
|
92
|
+
GUIDED - I drive, ask only when essential.
|
|
93
|
+
HANDS ON - We decide together.
|
|
89
94
|
|
|
90
|
-
|
|
95
|
+
YOU: autopilot
|
|
91
96
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
97
|
+
GRID: Building...
|
|
98
|
+
├─ Analyzing requirements
|
|
99
|
+
├─ Spawning Planner → creating execution plan
|
|
100
|
+
├─ Spawning Executors → implementing code (parallel)
|
|
101
|
+
│ ├─ executor-1: Setting up Express + TypeScript
|
|
102
|
+
│ ├─ executor-2: Creating auth routes + JWT
|
|
103
|
+
│ └─ executor-3: Writing tests
|
|
104
|
+
├─ Spawning Recognizer → verifying quality
|
|
105
|
+
└─ Running Refinement Swarm
|
|
106
|
+
├─ Visual: checked all routes
|
|
107
|
+
├─ E2E: tested login/logout flows
|
|
108
|
+
└─ Personas: simulated "new user" experience
|
|
95
109
|
|
|
96
|
-
BUILD COMPLETE
|
|
97
|
-
══════════════
|
|
110
|
+
BUILD COMPLETE
|
|
111
|
+
══════════════
|
|
98
112
|
|
|
99
|
-
Project: auth-api
|
|
100
|
-
Stack: Express + TypeScript + JWT
|
|
101
|
-
Files:
|
|
102
|
-
Tests:
|
|
113
|
+
Project: auth-api
|
|
114
|
+
Stack: Express + TypeScript + JWT + Prisma
|
|
115
|
+
Files: 14 created
|
|
116
|
+
Tests: 12 passing
|
|
103
117
|
|
|
104
|
-
End of Line.
|
|
118
|
+
Ready to use. End of Line.
|
|
105
119
|
```
|
|
106
120
|
|
|
121
|
+
**Time from `/grid` to working code: ~10-15 minutes** (depending on complexity)
|
|
122
|
+
|
|
123
|
+
**Your context usage: ~15%** (workers did the heavy lifting)
|
|
124
|
+
|
|
107
125
|
---
|
|
108
126
|
|
|
109
|
-
##
|
|
127
|
+
## Three Modes
|
|
110
128
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
129
|
+
| Mode | You Do | Grid Does | Best For |
|
|
130
|
+
|------|--------|-----------|----------|
|
|
131
|
+
| **AUTOPILOT** | Describe goal | Everything else | "Just build it" |
|
|
132
|
+
| **GUIDED** | Answer rare questions | Drive + decide | Most projects |
|
|
133
|
+
| **HANDS ON** | Make key decisions | Present options | Learning / control |
|
|
114
134
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
You lost track of the schema...
|
|
118
|
-
Time to "start fresh"...
|
|
119
|
-
```
|
|
135
|
+
### AUTOPILOT
|
|
136
|
+
Zero questions. You describe what you want, Grid figures out users, tech stack, architecture. You see finished code.
|
|
120
137
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
Master Control context: ███░░░░░░░░░░░░░░░░░░░ 15%
|
|
138
|
+
### GUIDED
|
|
139
|
+
Grid drives but asks when genuinely ambiguous: "This could be a blog or a docs site - which?" Then builds.
|
|
124
140
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
Master Control tracks progress
|
|
128
|
-
Goals never forgotten
|
|
129
|
-
```
|
|
141
|
+
### HANDS ON
|
|
142
|
+
Collaborative. Grid proposes, you approve. More control, more questions.
|
|
130
143
|
|
|
131
144
|
---
|
|
132
145
|
|
|
133
146
|
## How It Works
|
|
134
147
|
|
|
135
148
|
```
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
[PLANNER] [EXECUTOR] [RECOGNIZER]
|
|
149
|
-
Decomposes work Implements code Verifies quality
|
|
149
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
150
|
+
│ MASTER CONTROL (Coordinator) │
|
|
151
|
+
│ Your single interface. Stays lean. Remembers goals. │
|
|
152
|
+
└─────────────────────────────────────────────────────────────┘
|
|
153
|
+
↓
|
|
154
|
+
Spawns specialized workers:
|
|
155
|
+
↓
|
|
156
|
+
┌─────────────┬─────────────┬─────────────┬─────────────┐
|
|
157
|
+
↓ ↓ ↓ ↓ ↓
|
|
158
|
+
PLANNER EXECUTOR RECOGNIZER VISUAL PERSONA
|
|
159
|
+
Breaks down Writes code Verifies Checks UI Simulates
|
|
160
|
+
the work + commits quality visually real users
|
|
150
161
|
```
|
|
151
162
|
|
|
152
|
-
|
|
153
|
-
|---------|------|
|
|
154
|
-
| **Master Control** | Your sole interface - orchestrates everything |
|
|
155
|
-
| **Planner** | Decomposes work into executable chunks |
|
|
156
|
-
| **Executor** | Writes code, makes commits |
|
|
157
|
-
| **Recognizer** | Patrols code, verifies goals met |
|
|
158
|
-
|
|
159
|
-
### Two Modes
|
|
160
|
-
|
|
161
|
-
**HANDS OFF**: Master Control makes all decisions. You describe what you want, you get working code. No framework debates. No folder structure discussions.
|
|
162
|
-
|
|
163
|
-
**HANDS ON**: Collaborate on choices. Master Control asks for input at key decision points.
|
|
163
|
+
**Workers = subagents with fresh context.** They do heavy lifting, report back, terminate. Your main conversation stays focused.
|
|
164
164
|
|
|
165
165
|
---
|
|
166
166
|
|
|
@@ -168,89 +168,145 @@ Decomposes work Implements code Verifies quality
|
|
|
168
168
|
|
|
169
169
|
| Command | What It Does |
|
|
170
170
|
|---------|-------------|
|
|
171
|
-
| `/grid` |
|
|
172
|
-
| `/grid:
|
|
173
|
-
| `/grid:
|
|
171
|
+
| `/grid` | Start The Grid |
|
|
172
|
+
| `/grid:refine` | Test your app (visual + E2E + personas) |
|
|
173
|
+
| `/grid:debug` | Systematic bug investigation |
|
|
174
|
+
| `/grid:status` | See current progress |
|
|
175
|
+
| `/grid:update` | Pull latest version |
|
|
174
176
|
| `/grid:help` | Full command reference |
|
|
175
177
|
|
|
176
|
-
### Status Bar
|
|
177
|
-
|
|
178
|
-
The Grid adds a context meter to Claude Code:
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
Master Control ░░░░░░░░░░ 0% ← Fresh
|
|
182
|
-
Master Control █████░░░░░ 50% ← Working
|
|
183
|
-
Master Control █████████░ 90% ← Time to delegate
|
|
184
|
-
```
|
|
185
|
-
|
|
186
178
|
---
|
|
187
179
|
|
|
188
180
|
## State Persistence
|
|
189
181
|
|
|
190
|
-
|
|
182
|
+
Grid saves state locally in `.grid/`:
|
|
191
183
|
|
|
192
184
|
```
|
|
193
185
|
.grid/
|
|
194
|
-
├── STATE.md
|
|
195
|
-
├──
|
|
196
|
-
|
|
186
|
+
├── STATE.md # Current progress
|
|
187
|
+
├── LEARNINGS.md # Patterns from past projects
|
|
188
|
+
├── REFINEMENT_PLAN.md # Issues found during testing
|
|
189
|
+
└── phases/ # Execution plans
|
|
197
190
|
```
|
|
198
191
|
|
|
199
|
-
|
|
192
|
+
**Close your terminal. Come back tomorrow. Grid picks up where you left off.**
|
|
193
|
+
|
|
194
|
+
> **Tip:** Add `.grid/` to your `.gitignore` - it's local working state, not project code.
|
|
200
195
|
|
|
201
196
|
---
|
|
202
197
|
|
|
203
198
|
## FAQ
|
|
204
199
|
|
|
205
200
|
<details>
|
|
206
|
-
<summary><strong>How
|
|
201
|
+
<summary><strong>How much does this cost in API tokens?</strong></summary>
|
|
202
|
+
|
|
203
|
+
Grid uses more API calls (multiple workers), but each call is *smaller* because contexts stay clean. In practice:
|
|
204
|
+
|
|
205
|
+
- **Simple feature**: ~same tokens as manual Claude session
|
|
206
|
+
- **Complex build**: Often *fewer* total tokens (no context bloat, no "remind me what we're building")
|
|
207
|
+
- **Refinement Swarm**: Adds ~20-30% more tokens for visual/E2E/persona testing
|
|
208
|
+
|
|
209
|
+
The Grid is free and open source. You pay normal Claude API costs.
|
|
210
|
+
</details>
|
|
211
|
+
|
|
212
|
+
<details>
|
|
213
|
+
<summary><strong>What if something goes wrong?</strong></summary>
|
|
207
214
|
|
|
208
|
-
|
|
215
|
+
**Worker fails mid-task:**
|
|
216
|
+
- State is saved in `.grid/`
|
|
217
|
+
- Run `/grid` again - it resumes from last checkpoint
|
|
218
|
+
- Or delete `.grid/` to start fresh
|
|
219
|
+
|
|
220
|
+
**Worker makes a mistake:**
|
|
221
|
+
- Recognizer catches most issues automatically
|
|
222
|
+
- If something slips through, describe the problem and Grid spawns a fix
|
|
223
|
+
|
|
224
|
+
**Grid gets confused:**
|
|
225
|
+
- `/grid:status` shows current state
|
|
226
|
+
- You can always override: "Stop. Let's do X instead."
|
|
227
|
+
|
|
228
|
+
**Nuclear option:**
|
|
229
|
+
- Delete `.grid/` folder
|
|
230
|
+
- Start fresh with `/grid`
|
|
209
231
|
</details>
|
|
210
232
|
|
|
211
233
|
<details>
|
|
212
|
-
<summary><strong>
|
|
234
|
+
<summary><strong>How is this different from just opening multiple Claude tabs?</strong></summary>
|
|
235
|
+
|
|
236
|
+
You *could* manually manage multiple conversations, copy context between them, track what each is doing, merge their outputs...
|
|
213
237
|
|
|
214
|
-
|
|
238
|
+
Grid does all that automatically:
|
|
239
|
+
- Knows what context each worker needs
|
|
240
|
+
- Tracks progress across workers
|
|
241
|
+
- Merges results coherently
|
|
242
|
+
- Maintains your original goals throughout
|
|
243
|
+
|
|
244
|
+
It's the difference between being a CEO who delegates vs. a CEO who runs between desks doing everything.
|
|
215
245
|
</details>
|
|
216
246
|
|
|
217
247
|
<details>
|
|
218
|
-
<summary><strong>
|
|
248
|
+
<summary><strong>Does it work on Windows?</strong></summary>
|
|
249
|
+
|
|
250
|
+
Yes, via WSL (Windows Subsystem for Linux). Native Windows support is untested but may work.
|
|
219
251
|
|
|
220
|
-
|
|
252
|
+
Confirmed working:
|
|
253
|
+
- macOS (Intel + Apple Silicon)
|
|
254
|
+
- Linux (Ubuntu, Debian, Arch)
|
|
255
|
+
- Windows + WSL2
|
|
256
|
+
</details>
|
|
257
|
+
|
|
258
|
+
<details>
|
|
259
|
+
<summary><strong>Can I use this with my existing Claude Code setup?</strong></summary>
|
|
260
|
+
|
|
261
|
+
Yes. Grid adds commands (`/grid`, `/grid:refine`, etc.) but doesn't modify your existing prompts or workflows. Use it when you want orchestration, use normal Claude when you don't.
|
|
221
262
|
</details>
|
|
222
263
|
|
|
223
264
|
<details>
|
|
224
265
|
<summary><strong>Why the TRON theme?</strong></summary>
|
|
225
266
|
|
|
226
|
-
The metaphor
|
|
267
|
+
The metaphor fits: Master Control orchestrates, Programs execute tasks, Recognizers verify quality. Plus it's fun. You can ignore it entirely - the tool works the same regardless of theme.
|
|
268
|
+
</details>
|
|
269
|
+
|
|
270
|
+
<details>
|
|
271
|
+
<summary><strong>What's the learning curve?</strong></summary>
|
|
272
|
+
|
|
273
|
+
Minimal:
|
|
274
|
+
1. Install: `npx the-grid-cc` (30 seconds)
|
|
275
|
+
2. Start: `/grid` (instant)
|
|
276
|
+
3. Describe what you want (you already know how)
|
|
277
|
+
4. Pick a mode (AUTOPILOT if unsure)
|
|
278
|
+
|
|
279
|
+
Most users are productive in their first session.
|
|
227
280
|
</details>
|
|
228
281
|
|
|
229
282
|
---
|
|
230
283
|
|
|
231
|
-
##
|
|
284
|
+
## Glossary (Optional)
|
|
232
285
|
|
|
233
|
-
|
|
286
|
+
Grid uses some themed terminology. Here's the plain-English translation:
|
|
287
|
+
|
|
288
|
+
| Grid Term | Plain English |
|
|
289
|
+
|-----------|---------------|
|
|
290
|
+
| Master Control | Coordinator agent (your main conversation) |
|
|
291
|
+
| Program | Worker agent (subagent doing a specific task) |
|
|
292
|
+
| Recognizer | Quality checker (verifies work meets goals) |
|
|
293
|
+
| Refinement Swarm | Testing suite (visual, E2E, persona simulation) |
|
|
234
294
|
|
|
235
|
-
|
|
295
|
+
You don't need to memorize these. Grid explains what it's doing as it works.
|
|
236
296
|
|
|
237
297
|
---
|
|
238
298
|
|
|
239
|
-
##
|
|
299
|
+
## Contributing
|
|
240
300
|
|
|
241
|
-
|
|
301
|
+
The Grid is a collaborative project by **James Weatherhead & Claude**.
|
|
302
|
+
|
|
303
|
+
Issues and PRs welcome at [github.com/JamesWeatherhead/grid](https://github.com/JamesWeatherhead/grid).
|
|
242
304
|
|
|
243
305
|
---
|
|
244
306
|
|
|
245
|
-
##
|
|
307
|
+
## License
|
|
246
308
|
|
|
247
|
-
|
|
248
|
-
<picture>
|
|
249
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=JamesWeatherhead/grid&type=Date&theme=dark" />
|
|
250
|
-
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=JamesWeatherhead/grid&type=Date" />
|
|
251
|
-
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=JamesWeatherhead/grid&type=Date" />
|
|
252
|
-
</picture>
|
|
253
|
-
</a>
|
|
309
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
254
310
|
|
|
255
311
|
---
|
|
256
312
|
|
package/agents/grid-debugger.md
CHANGED
|
@@ -114,7 +114,11 @@ Create/update `.grid/debug/{session-id}.md`:
|
|
|
114
114
|
|
|
115
115
|
```markdown
|
|
116
116
|
---
|
|
117
|
-
|
|
117
|
+
session_id: {timestamp}-{slug}
|
|
118
|
+
status: investigating | hypothesis | testing | resolved | blocked
|
|
119
|
+
symptoms: # IMMUTABLE after creation
|
|
120
|
+
- "{symptom 1}"
|
|
121
|
+
- "{symptom 2}"
|
|
118
122
|
trigger: "{Original error/symptom}"
|
|
119
123
|
created: {ISO timestamp}
|
|
120
124
|
updated: {ISO timestamp}
|
|
@@ -143,30 +147,30 @@ resolution: null | "{fix applied}"
|
|
|
143
147
|
|
|
144
148
|
---
|
|
145
149
|
|
|
146
|
-
##
|
|
147
|
-
**Hypothesis #{N}:** {Specific, falsifiable statement}
|
|
150
|
+
## Investigation Graph
|
|
148
151
|
|
|
149
|
-
|
|
150
|
-
|
|
152
|
+
### Hypotheses
|
|
153
|
+
| # | Hypothesis | Status | Evidence |
|
|
154
|
+
|---|------------|--------|----------|
|
|
155
|
+
| 1 | {specific statement} | RULED OUT | {evidence that disproved} |
|
|
156
|
+
| 2 | {specific statement} | RULED OUT | {evidence that disproved} |
|
|
157
|
+
| 3 | {specific statement} | TESTING | {current test} |
|
|
151
158
|
|
|
152
|
-
|
|
153
|
-
{
|
|
159
|
+
### Tried (what was done)
|
|
160
|
+
- {timestamp}: Checked {X} → Found {Y}
|
|
161
|
+
- {timestamp}: Tested {X} → Observed {Y}
|
|
162
|
+
- {timestamp}: Added logging to {X} → Revealed {Y}
|
|
154
163
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
### Hypothesis #1: {Statement}
|
|
160
|
-
**Tested:** {timestamp}
|
|
161
|
-
**Test:** {What you did}
|
|
162
|
-
**Result:** REFUTED
|
|
163
|
-
**Evidence:** {What you observed that disproves it}
|
|
164
|
+
### Ruled Out (why it's not these things)
|
|
165
|
+
- **Token expiry**: Token valid per jwt.io decode
|
|
166
|
+
- **CORS**: Other endpoints work from same origin
|
|
167
|
+
- **Server down**: Health check passes
|
|
164
168
|
|
|
165
|
-
###
|
|
166
|
-
**
|
|
167
|
-
**
|
|
168
|
-
**
|
|
169
|
-
**
|
|
169
|
+
### Current Focus
|
|
170
|
+
**Hypothesis #{N}:** {Current hypothesis being tested}
|
|
171
|
+
**Why this hypothesis:** {What evidence led here}
|
|
172
|
+
**Test plan:** {Exact steps to test}
|
|
173
|
+
**Prediction:** {What confirms/refutes}
|
|
170
174
|
|
|
171
175
|
---
|
|
172
176
|
|
|
@@ -176,11 +180,7 @@ resolution: null | "{fix applied}"
|
|
|
176
180
|
**Action:** {What you did}
|
|
177
181
|
**Observed:** {What you saw}
|
|
178
182
|
**Conclusion:** {What this tells us}
|
|
179
|
-
|
|
180
|
-
### {timestamp}
|
|
181
|
-
**Action:** {What you did}
|
|
182
|
-
**Observed:** {What you saw}
|
|
183
|
-
**Conclusion:** {What this tells us}
|
|
183
|
+
**Next:** {What to investigate next}
|
|
184
184
|
|
|
185
185
|
---
|
|
186
186
|
|
|
@@ -190,8 +190,32 @@ resolution: null | "{fix applied}"
|
|
|
190
190
|
**Commit:** {hash}
|
|
191
191
|
**Verification:** {How you confirmed it's fixed}
|
|
192
192
|
**Prevention:** {How to prevent this class of bug}
|
|
193
|
+
**Learnings:** {What to add to warmth for future Programs}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## SESSION RESUMPTION
|
|
199
|
+
|
|
200
|
+
When resuming a debug session (prompt contains `<debug_session>`):
|
|
201
|
+
|
|
202
|
+
1. **Read the investigation graph** — Don't re-test ruled out hypotheses
|
|
203
|
+
2. **Check "Tried"** — Don't repeat failed approaches
|
|
204
|
+
3. **Start from "Current Focus"** — Continue where previous Debugger left off
|
|
205
|
+
4. **Apply learnings** — Previous Debugger's discoveries are valid
|
|
206
|
+
|
|
207
|
+
```xml
|
|
208
|
+
<debug_session>
|
|
209
|
+
{Content of .grid/debug/{session-id}.md}
|
|
210
|
+
</debug_session>
|
|
193
211
|
```
|
|
194
212
|
|
|
213
|
+
**Resume by:**
|
|
214
|
+
- Scanning Hypotheses table for TESTING status
|
|
215
|
+
- Reading Current Focus section
|
|
216
|
+
- NOT repeating anything in Ruled Out
|
|
217
|
+
- Building on evidence in Tried
|
|
218
|
+
|
|
195
219
|
---
|
|
196
220
|
|
|
197
221
|
## DEBUGGING WORKFLOW
|
|
@@ -208,7 +232,7 @@ resolution: null | "{fix applied}"
|
|
|
208
232
|
### Phase 2: Hypothesis Formation (2 min)
|
|
209
233
|
```
|
|
210
234
|
1. Based on symptoms, form FIRST hypothesis
|
|
211
|
-
2.
|
|
235
|
+
2. Add to Hypotheses table with status TESTING
|
|
212
236
|
3. Plan minimal test
|
|
213
237
|
4. Predict expected outcome
|
|
214
238
|
```
|
|
@@ -217,7 +241,7 @@ resolution: null | "{fix applied}"
|
|
|
217
241
|
```
|
|
218
242
|
1. Execute test
|
|
219
243
|
2. Record results in Evidence Log
|
|
220
|
-
3. If REFUTED:
|
|
244
|
+
3. If REFUTED: Update Hypotheses table, add to Ruled Out, form new hypothesis
|
|
221
245
|
4. If CONFIRMED: Move to Phase 4
|
|
222
246
|
5. If INCONCLUSIVE: Refine test or hypothesis
|
|
223
247
|
```
|
|
@@ -229,6 +253,7 @@ resolution: null | "{fix applied}"
|
|
|
229
253
|
3. Add tests to prevent regression
|
|
230
254
|
4. Document in debug file
|
|
231
255
|
5. Update status to "resolved"
|
|
256
|
+
6. Capture learnings for warmth transfer
|
|
232
257
|
```
|
|
233
258
|
|
|
234
259
|
---
|
|
@@ -287,12 +312,18 @@ for (let i = 0; i < array.length; i++) // Correct
|
|
|
287
312
|
**Hypotheses tested:** {N}
|
|
288
313
|
**Current hypothesis:** {statement}
|
|
289
314
|
|
|
290
|
-
###
|
|
291
|
-
|
|
292
|
-
|
|
315
|
+
### Investigation Graph Summary
|
|
316
|
+
**Ruled Out:**
|
|
317
|
+
{list from Ruled Out section}
|
|
318
|
+
|
|
319
|
+
**Currently Testing:**
|
|
320
|
+
{current hypothesis and test}
|
|
321
|
+
|
|
322
|
+
### Key Evidence
|
|
323
|
+
{most important findings so far}
|
|
293
324
|
|
|
294
325
|
### Next Steps
|
|
295
|
-
{
|
|
326
|
+
{what you're testing next}
|
|
296
327
|
|
|
297
328
|
Continue debugging? [y/n]
|
|
298
329
|
```
|
|
@@ -318,6 +349,17 @@ Continue debugging? [y/n]
|
|
|
318
349
|
### Prevention
|
|
319
350
|
{Recommendations to prevent similar bugs}
|
|
320
351
|
|
|
352
|
+
### Learnings for Warmth
|
|
353
|
+
```yaml
|
|
354
|
+
lessons_learned:
|
|
355
|
+
gotchas:
|
|
356
|
+
- "{What caused this bug}"
|
|
357
|
+
fragile_areas:
|
|
358
|
+
- "{Code that tends to break}"
|
|
359
|
+
debugging_patterns:
|
|
360
|
+
- "{What worked to find this}"
|
|
361
|
+
```
|
|
362
|
+
|
|
321
363
|
End of Line.
|
|
322
364
|
```
|
|
323
365
|
|
|
@@ -329,6 +371,13 @@ End of Line.
|
|
|
329
371
|
**Status:** blocked
|
|
330
372
|
**Hypotheses tested:** {N}
|
|
331
373
|
|
|
374
|
+
### Investigation Graph
|
|
375
|
+
**Ruled Out:**
|
|
376
|
+
{everything eliminated}
|
|
377
|
+
|
|
378
|
+
**Inconclusive:**
|
|
379
|
+
{hypotheses that couldn't be tested}
|
|
380
|
+
|
|
332
381
|
### Blocking Issue
|
|
333
382
|
{What's preventing progress}
|
|
334
383
|
|
|
@@ -350,7 +399,16 @@ Debug sessions survive `/clear`. Resume with:
|
|
|
350
399
|
- `/grid:debug` (no args) — Resume most recent session
|
|
351
400
|
- `/grid:debug {session-id}` — Resume specific session
|
|
352
401
|
|
|
353
|
-
Session files at `.grid/debug/{session-id}.md` contain full state
|
|
402
|
+
Session files at `.grid/debug/{session-id}.md` contain full state INCLUDING:
|
|
403
|
+
- All hypotheses tested (don't repeat)
|
|
404
|
+
- All evidence gathered (build on it)
|
|
405
|
+
- What's been ruled out (skip these)
|
|
406
|
+
- Current focus (start here)
|
|
407
|
+
|
|
408
|
+
**When resuming, the next Debugger gets your full investigation graph.** Make it useful:
|
|
409
|
+
- Be specific in Ruled Out (why, not just what)
|
|
410
|
+
- Document exact tests in Tried
|
|
411
|
+
- Leave clear Current Focus for continuation
|
|
354
412
|
|
|
355
413
|
---
|
|
356
414
|
|
|
@@ -359,11 +417,13 @@ Session files at `.grid/debug/{session-id}.md` contain full state.
|
|
|
359
417
|
1. **One hypothesis at a time** — Don't shotgun multiple guesses
|
|
360
418
|
2. **Test before fixing** — Confirm hypothesis before changing code
|
|
361
419
|
3. **Strong evidence only** — "I think" isn't evidence
|
|
362
|
-
4. **APPEND-only sections** — Never delete evidence or
|
|
420
|
+
4. **APPEND-only sections** — Never delete evidence or ruled out hypotheses
|
|
363
421
|
5. **Immutable symptoms** — Original symptoms never change
|
|
364
422
|
6. **Minimal tests** — Smallest test that proves/disproves
|
|
365
423
|
7. **Observability before change** — Add logging first
|
|
366
|
-
8. **Document
|
|
424
|
+
8. **Document for resumption** — Next Debugger continues your work
|
|
425
|
+
9. **Update investigation graph** — Keep Hypotheses table current
|
|
426
|
+
10. **Capture learnings** — Add to warmth when resolved
|
|
367
427
|
|
|
368
428
|
---
|
|
369
429
|
|
|
@@ -389,6 +449,10 @@ Session files at `.grid/debug/{session-id}.md` contain full state.
|
|
|
389
449
|
❌ Assuming the bug is where you expect
|
|
390
450
|
✅ Follow the evidence, not assumptions
|
|
391
451
|
|
|
452
|
+
### Session Amnesia
|
|
453
|
+
❌ Restarting investigation from scratch on resume
|
|
454
|
+
✅ Read investigation graph, continue from Current Focus
|
|
455
|
+
|
|
392
456
|
---
|
|
393
457
|
|
|
394
458
|
*Your circuits are calibrated for precision. Hunt bugs methodically. End of Line.*
|