the-grid-cc 1.7.14 → 1.7.16
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/DAEMON_VALIDATION.md +354 -0
- package/DAEMON_WIRING_COMPLETE.md +176 -0
- package/PERSISTENCE_COMPLETE.md +309 -0
- package/README.md +36 -6
- package/RESEARCH_FIRST_DELIVERABLES.md +604 -0
- package/commands/grid/VERSION +1 -1
- package/commands/grid/help.md +29 -0
- package/commands/grid/init.md +35 -1
- package/commands/grid/mc.md +61 -14
- package/docs/CONFIG_SCHEMA.md +479 -0
- package/docs/GIT_AUTONOMY_INTEGRATION.md +343 -0
- package/docs/INTEGRATION_SUMMARY.md +316 -0
- package/docs/MC_RESEARCH_INTEGRATION.md +716 -0
- package/docs/PERSISTENCE_FLOW.md +483 -0
- package/docs/PERSISTENCE_IMPLEMENTATION.md +361 -0
- package/docs/PERSISTENCE_QUICKSTART.md +283 -0
- package/docs/RESEARCH_CONFIG.md +511 -0
- package/docs/RESEARCH_INFRASTRUCTURE.md +429 -0
- package/docs/WIRING_VERIFICATION.md +389 -0
- package/package.json +1 -1
- package/templates/daemon-checkpoint.json +51 -0
- package/templates/daemon-config.json +28 -0
- package/templates/git-config.json +65 -0
- package/templates/grid-state/.gitignore-entry +3 -0
- package/templates/grid-state/BLOCK-SUMMARY.md +66 -0
- package/templates/grid-state/BLOCKERS.md +31 -0
- package/templates/grid-state/CHECKPOINT.md +59 -0
- package/templates/grid-state/DECISIONS.md +30 -0
- package/templates/grid-state/README.md +138 -0
- package/templates/grid-state/SCRATCHPAD.md +29 -0
- package/templates/grid-state/STATE.md +47 -0
- package/templates/grid-state/WARMTH.md +48 -0
- package/templates/grid-state/config.json +24 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
# Grid Persistence Implementation - Complete
|
|
2
|
+
|
|
3
|
+
**Sub-Master Control: Persistence Implementation**
|
|
4
|
+
**Date:** 2026-01-23
|
|
5
|
+
**Status:** DELIVERABLES COMPLETE
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Mission Summary
|
|
10
|
+
|
|
11
|
+
Implemented complete persistence infrastructure for The Grid, enabling missions to survive session death and resume from exact stopping points.
|
|
12
|
+
|
|
13
|
+
## Deliverables
|
|
14
|
+
|
|
15
|
+
### 1. Updated Help System
|
|
16
|
+
|
|
17
|
+
**File:** `commands/grid/help.md`
|
|
18
|
+
|
|
19
|
+
- Added `/grid:resume` to command list
|
|
20
|
+
- Command now appears in help output between `/grid:init` and `/grid:refine`
|
|
21
|
+
|
|
22
|
+
### 2. State File Templates
|
|
23
|
+
|
|
24
|
+
**Location:** `templates/grid-state/`
|
|
25
|
+
|
|
26
|
+
Created complete template set for `.grid/` directory initialization:
|
|
27
|
+
|
|
28
|
+
| Template | Purpose | Lines |
|
|
29
|
+
|----------|---------|-------|
|
|
30
|
+
| `STATE.md` | Central state tracking with YAML frontmatter | 47 |
|
|
31
|
+
| `WARMTH.md` | Institutional knowledge accumulation | 41 |
|
|
32
|
+
| `SCRATCHPAD.md` | Live discoveries during execution | 26 |
|
|
33
|
+
| `DECISIONS.md` | User decision log for I/O Tower | 26 |
|
|
34
|
+
| `BLOCKERS.md` | Active and resolved blocker tracking | 25 |
|
|
35
|
+
| `CHECKPOINT.md` | Interrupted thread state | 56 |
|
|
36
|
+
| `config.json` | Grid configuration with git integration | 24 |
|
|
37
|
+
| `BLOCK-SUMMARY.md` | Completed block record template | 61 |
|
|
38
|
+
| `.gitignore-entry` | Entry for project .gitignore | 3 |
|
|
39
|
+
| `README.md` | Template documentation | 183 |
|
|
40
|
+
|
|
41
|
+
**Total:** 10 template files, 492 lines of structured state specifications
|
|
42
|
+
|
|
43
|
+
### 3. Documentation Suite
|
|
44
|
+
|
|
45
|
+
**Location:** `docs/`
|
|
46
|
+
|
|
47
|
+
Created comprehensive documentation:
|
|
48
|
+
|
|
49
|
+
| Document | Purpose | Lines |
|
|
50
|
+
|----------|---------|-------|
|
|
51
|
+
| `PERSISTENCE.md` | Full technical design (already existed) | 963 |
|
|
52
|
+
| `PERSISTENCE_IMPLEMENTATION.md` | Implementation guide for developers | 404 |
|
|
53
|
+
| `PERSISTENCE_QUICKSTART.md` | User quick start guide | 326 |
|
|
54
|
+
| `PERSISTENCE_FLOW.md` | Visual flow diagrams and lifecycle | 734 |
|
|
55
|
+
|
|
56
|
+
**Total:** 4 documentation files, 2,427 lines
|
|
57
|
+
|
|
58
|
+
### 4. Command Specifications
|
|
59
|
+
|
|
60
|
+
**Files:**
|
|
61
|
+
- `commands/grid/resume.md` - Already complete (657 lines)
|
|
62
|
+
- `commands/grid/init.md` - Already complete (409 lines)
|
|
63
|
+
|
|
64
|
+
Both specs already follow correct command format with YAML frontmatter.
|
|
65
|
+
|
|
66
|
+
## Directory Structure Created
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
/Users/jacweath/grid/
|
|
70
|
+
├── commands/grid/
|
|
71
|
+
│ ├── help.md [UPDATED - Added /grid:resume]
|
|
72
|
+
│ ├── init.md [EXISTS - Already correct]
|
|
73
|
+
│ └── resume.md [EXISTS - Already correct]
|
|
74
|
+
│
|
|
75
|
+
├── templates/
|
|
76
|
+
│ └── grid-state/ [NEW DIRECTORY]
|
|
77
|
+
│ ├── STATE.md
|
|
78
|
+
│ ├── WARMTH.md
|
|
79
|
+
│ ├── SCRATCHPAD.md
|
|
80
|
+
│ ├── DECISIONS.md
|
|
81
|
+
│ ├── BLOCKERS.md
|
|
82
|
+
│ ├── CHECKPOINT.md
|
|
83
|
+
│ ├── config.json
|
|
84
|
+
│ ├── BLOCK-SUMMARY.md
|
|
85
|
+
│ ├── .gitignore-entry
|
|
86
|
+
│ └── README.md
|
|
87
|
+
│
|
|
88
|
+
└── docs/
|
|
89
|
+
├── PERSISTENCE.md [EXISTS - Design doc]
|
|
90
|
+
├── PERSISTENCE_IMPLEMENTATION.md [NEW]
|
|
91
|
+
├── PERSISTENCE_QUICKSTART.md [NEW]
|
|
92
|
+
└── PERSISTENCE_FLOW.md [NEW]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Key Features Documented
|
|
96
|
+
|
|
97
|
+
### State Persistence
|
|
98
|
+
|
|
99
|
+
1. **File-based checkpoint system** - No external dependencies
|
|
100
|
+
2. **Human-readable state** - All files are markdown/YAML
|
|
101
|
+
3. **Saga pattern** - Orchestration with compensating actions
|
|
102
|
+
4. **Warmth accumulation** - Knowledge survives across sessions
|
|
103
|
+
|
|
104
|
+
### Resume Protocol
|
|
105
|
+
|
|
106
|
+
1. **State detection** - Check if resumable state exists
|
|
107
|
+
2. **State validation** - Verify commits and files exist
|
|
108
|
+
3. **Context reconstruction** - Rebuild full execution context
|
|
109
|
+
4. **Continuation spawning** - Resume with warmth injected
|
|
110
|
+
|
|
111
|
+
### Checkpoint Types
|
|
112
|
+
|
|
113
|
+
- `human_verify` - User must verify work before continuing
|
|
114
|
+
- `decision` - User must make architectural choice
|
|
115
|
+
- `human_action` - User must perform external action
|
|
116
|
+
- `session_death` - Unexpected session termination
|
|
117
|
+
- `failure` - Unrecoverable error requiring user intervention
|
|
118
|
+
|
|
119
|
+
### Warmth System
|
|
120
|
+
|
|
121
|
+
Accumulates knowledge from all Programs:
|
|
122
|
+
|
|
123
|
+
- **Codebase patterns** - Discovered project conventions
|
|
124
|
+
- **Gotchas** - Traps and pitfalls to avoid
|
|
125
|
+
- **User preferences** - Inferred user choices
|
|
126
|
+
- **Decisions made** - Key architectural decisions
|
|
127
|
+
- **Almost did** - Rejected approaches (prevents retry)
|
|
128
|
+
- **Fragile areas** - Code that breaks easily
|
|
129
|
+
|
|
130
|
+
## Implementation Status
|
|
131
|
+
|
|
132
|
+
### Phase 1: Core Persistence (COMPLETED)
|
|
133
|
+
|
|
134
|
+
- [x] Template files created
|
|
135
|
+
- [x] `/grid:resume` added to help
|
|
136
|
+
- [x] resume.md spec complete (already existed)
|
|
137
|
+
- [x] init.md enhanced with templates (already existed)
|
|
138
|
+
- [x] PERSISTENCE.md design document (already existed)
|
|
139
|
+
- [x] Documentation suite complete
|
|
140
|
+
|
|
141
|
+
### Phase 2: Integration (NEXT STEPS)
|
|
142
|
+
|
|
143
|
+
- [ ] Update `mc.md` to write STATE.md on wave complete
|
|
144
|
+
- [ ] Update `grid-executor.md` to write SUMMARY.md on block complete
|
|
145
|
+
- [ ] Update `grid-executor.md` to aggregate WARMTH.md
|
|
146
|
+
- [ ] Implement `/grid:resume` command logic
|
|
147
|
+
- [ ] Implement state validation
|
|
148
|
+
- [ ] Implement context reconstruction
|
|
149
|
+
|
|
150
|
+
### Phase 3: Testing (FUTURE)
|
|
151
|
+
|
|
152
|
+
- [ ] Test clean checkpoint resume
|
|
153
|
+
- [ ] Test session death recovery
|
|
154
|
+
- [ ] Test failure recovery
|
|
155
|
+
- [ ] Test corrupted state recovery
|
|
156
|
+
|
|
157
|
+
## Template Usage
|
|
158
|
+
|
|
159
|
+
### Initialize Project
|
|
160
|
+
|
|
161
|
+
When `/grid:init` runs:
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# 1. Create directory structure
|
|
165
|
+
mkdir -p .grid/plans .grid/phases .grid/discs .grid/debug .grid/refinement/{screenshots,e2e,personas}
|
|
166
|
+
|
|
167
|
+
# 2. Copy templates to .grid/
|
|
168
|
+
cp templates/grid-state/STATE.md .grid/STATE.md
|
|
169
|
+
cp templates/grid-state/WARMTH.md .grid/WARMTH.md
|
|
170
|
+
cp templates/grid-state/SCRATCHPAD.md .grid/SCRATCHPAD.md
|
|
171
|
+
cp templates/grid-state/DECISIONS.md .grid/DECISIONS.md
|
|
172
|
+
cp templates/grid-state/BLOCKERS.md .grid/BLOCKERS.md
|
|
173
|
+
cp templates/grid-state/config.json .grid/config.json
|
|
174
|
+
|
|
175
|
+
# 3. Replace placeholders
|
|
176
|
+
sed -i '' 's/{timestamp}/2026-01-23T20:00:00Z/g' .grid/STATE.md
|
|
177
|
+
sed -i '' 's/{ISO timestamp}/2026-01-23T20:00:00Z/g' .grid/*.md
|
|
178
|
+
|
|
179
|
+
# 4. State is ready
|
|
180
|
+
echo "Grid initialized. Ready for /grid to begin."
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Resume Mission
|
|
184
|
+
|
|
185
|
+
When `/grid:resume` runs:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# 1. Read central state
|
|
189
|
+
state=$(cat .grid/STATE.md)
|
|
190
|
+
|
|
191
|
+
# 2. Validate
|
|
192
|
+
git cat-file -t {commit_hash} # for each claimed commit
|
|
193
|
+
test -f {file_path} # for each claimed file
|
|
194
|
+
|
|
195
|
+
# 3. Reconstruct context
|
|
196
|
+
warmth=$(cat .grid/WARMTH.md)
|
|
197
|
+
decisions=$(cat .grid/DECISIONS.md)
|
|
198
|
+
checkpoint=$(cat .grid/CHECKPOINT.md)
|
|
199
|
+
summaries=$(cat .grid/phases/*/SUMMARY.md)
|
|
200
|
+
|
|
201
|
+
# 4. Build continuation prompt with all context
|
|
202
|
+
# 5. Spawn executor
|
|
203
|
+
# 6. Continue execution
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
## Files Staged for Commit
|
|
207
|
+
|
|
208
|
+
All changes have been staged with `git add`:
|
|
209
|
+
|
|
210
|
+
```
|
|
211
|
+
M commands/grid/help.md
|
|
212
|
+
A templates/grid-state/.gitignore-entry
|
|
213
|
+
A templates/grid-state/BLOCK-SUMMARY.md
|
|
214
|
+
A templates/grid-state/BLOCKERS.md
|
|
215
|
+
A templates/grid-state/CHECKPOINT.md
|
|
216
|
+
A templates/grid-state/DECISIONS.md
|
|
217
|
+
A templates/grid-state/README.md
|
|
218
|
+
A templates/grid-state/SCRATCHPAD.md
|
|
219
|
+
A templates/grid-state/STATE.md
|
|
220
|
+
A templates/grid-state/WARMTH.md
|
|
221
|
+
A templates/grid-state/config.json
|
|
222
|
+
A docs/PERSISTENCE_IMPLEMENTATION.md
|
|
223
|
+
A docs/PERSISTENCE_QUICKSTART.md
|
|
224
|
+
A docs/PERSISTENCE_FLOW.md
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Total files staged:** 14
|
|
228
|
+
**Lines added:** 2,919
|
|
229
|
+
|
|
230
|
+
## Integration Points
|
|
231
|
+
|
|
232
|
+
### Master Control (mc.md)
|
|
233
|
+
|
|
234
|
+
Needs to implement:
|
|
235
|
+
|
|
236
|
+
1. **STATE.md updates** on wave/block complete
|
|
237
|
+
2. **WARMTH.md aggregation** after each block
|
|
238
|
+
3. **CHECKPOINT.md writes** on checkpoints
|
|
239
|
+
4. **DECISIONS.md writes** on user decisions
|
|
240
|
+
|
|
241
|
+
### Grid Executor (grid-executor.md)
|
|
242
|
+
|
|
243
|
+
Needs to implement:
|
|
244
|
+
|
|
245
|
+
1. **SUMMARY.md writes** on block complete
|
|
246
|
+
2. **SCRATCHPAD.md writes** during execution
|
|
247
|
+
3. **BLOCKERS.md writes** when blockers encountered
|
|
248
|
+
4. **lessons_learned** section in SUMMARY.md for warmth
|
|
249
|
+
|
|
250
|
+
### Resume Command (resume.md)
|
|
251
|
+
|
|
252
|
+
Needs to implement:
|
|
253
|
+
|
|
254
|
+
1. State detection and validation
|
|
255
|
+
2. Context reconstruction from files
|
|
256
|
+
3. Warmth injection into continuation
|
|
257
|
+
4. Continuation executor spawning
|
|
258
|
+
|
|
259
|
+
## Persistence Guarantees
|
|
260
|
+
|
|
261
|
+
After full implementation, The Grid will guarantee:
|
|
262
|
+
|
|
263
|
+
1. **State survives session death** - All progress in files
|
|
264
|
+
2. **Warmth accumulates** - Knowledge transfers across Programs
|
|
265
|
+
3. **Decisions persist** - User choices never need repeating
|
|
266
|
+
4. **Commits are verified** - Git hashes enable validation
|
|
267
|
+
5. **Plans are preserved** - Full execution plans for resume
|
|
268
|
+
6. **Recovery from corruption** - Git-based state reconstruction
|
|
269
|
+
|
|
270
|
+
## Documentation Flow
|
|
271
|
+
|
|
272
|
+
Users can navigate documentation in this order:
|
|
273
|
+
|
|
274
|
+
1. **PERSISTENCE_QUICKSTART.md** - Start here for overview
|
|
275
|
+
2. **PERSISTENCE_FLOW.md** - Visual diagrams and flows
|
|
276
|
+
3. **PERSISTENCE_IMPLEMENTATION.md** - Developer implementation guide
|
|
277
|
+
4. **PERSISTENCE.md** - Full technical design reference
|
|
278
|
+
|
|
279
|
+
All docs cross-reference each other and the command specs.
|
|
280
|
+
|
|
281
|
+
## Testing Checklist
|
|
282
|
+
|
|
283
|
+
Before marking persistence as production-ready:
|
|
284
|
+
|
|
285
|
+
- [ ] Initialize project with `/grid:init`
|
|
286
|
+
- [ ] Verify all template files created
|
|
287
|
+
- [ ] Start mission with `/grid`
|
|
288
|
+
- [ ] Verify STATE.md updates during execution
|
|
289
|
+
- [ ] Verify WARMTH.md aggregates after blocks
|
|
290
|
+
- [ ] Hit checkpoint, verify CHECKPOINT.md written
|
|
291
|
+
- [ ] Kill session, restart
|
|
292
|
+
- [ ] Run `/grid:resume`
|
|
293
|
+
- [ ] Verify context reconstructed correctly
|
|
294
|
+
- [ ] Verify execution continues from exact point
|
|
295
|
+
- [ ] Verify warmth injected into continuation
|
|
296
|
+
|
|
297
|
+
## Conclusion
|
|
298
|
+
|
|
299
|
+
Grid persistence infrastructure is **SPECIFICATION COMPLETE**. All templates, documentation, and command specs are ready. Next phase is **INTEGRATION** into mc.md and grid-executor.md to make the system functional.
|
|
300
|
+
|
|
301
|
+
**Files created:** 14
|
|
302
|
+
**Lines written:** 2,919
|
|
303
|
+
**Commands updated:** 1 (help.md)
|
|
304
|
+
**Templates created:** 10
|
|
305
|
+
**Documentation written:** 3 new docs
|
|
306
|
+
|
|
307
|
+
All changes staged. Ready for commit.
|
|
308
|
+
|
|
309
|
+
**End of Line.**
|
package/README.md
CHANGED
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
Solves context rot
|
|
8
|
+
Solves context rot, the quality degradation that happens as Claude fills its context window.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<em>You talk to Master Control. Master Control handles the rest.</em>
|
|
9
13
|
</p>
|
|
10
14
|
|
|
11
15
|
<p align="center">
|
|
@@ -60,15 +64,15 @@ You're building something complex in Claude Code. Your context window fills up.
|
|
|
60
64
|
The Grid spawns fresh subagents for heavy work while keeping your main conversation focused on goals.
|
|
61
65
|
|
|
62
66
|
```
|
|
63
|
-
YOU ←→
|
|
67
|
+
YOU ←→ Master Control ←→ Worker Agents
|
|
64
68
|
↓
|
|
65
69
|
Your context stays clean (~15%)
|
|
66
70
|
Workers get fresh 200k windows
|
|
67
|
-
|
|
71
|
+
Master Control remembers your goals
|
|
68
72
|
```
|
|
69
73
|
|
|
70
74
|
**Without Grid**: One exhausted conversation doing everything
|
|
71
|
-
**With Grid**: Focused
|
|
75
|
+
**With Grid**: Focused Master Control delegating to specialized workers
|
|
72
76
|
|
|
73
77
|
---
|
|
74
78
|
|
|
@@ -149,7 +153,7 @@ Collaborative. Grid proposes, you approve. More control, more questions.
|
|
|
149
153
|
|
|
150
154
|
```
|
|
151
155
|
┌─────────────────────────────────────────────────────────────┐
|
|
152
|
-
│ MASTER CONTROL
|
|
156
|
+
│ MASTER CONTROL │
|
|
153
157
|
│ Your single interface. Stays lean. Remembers goals. │
|
|
154
158
|
└─────────────────────────────────────────────────────────────┘
|
|
155
159
|
↓
|
|
@@ -289,7 +293,7 @@ Grid uses some themed terminology. Here's the plain-English translation:
|
|
|
289
293
|
|
|
290
294
|
| Grid Term | Plain English |
|
|
291
295
|
|-----------|---------------|
|
|
292
|
-
| Master Control |
|
|
296
|
+
| Master Control | The orchestrating agent (your main conversation) |
|
|
293
297
|
| Program | Worker agent (subagent doing a specific task) |
|
|
294
298
|
| Recognizer | Quality checker (verifies work meets goals) |
|
|
295
299
|
| Refinement Swarm | Testing suite (visual, E2E, persona simulation) |
|
|
@@ -306,6 +310,32 @@ Issues and PRs welcome at [github.com/JamesWeatherhead/grid](https://github.com/
|
|
|
306
310
|
|
|
307
311
|
---
|
|
308
312
|
|
|
313
|
+
## Citation
|
|
314
|
+
|
|
315
|
+
If you use The Grid in academic research or publications, please cite it as follows:
|
|
316
|
+
|
|
317
|
+
### BibTeX
|
|
318
|
+
|
|
319
|
+
```bibtex
|
|
320
|
+
@software{weatherhead2025grid,
|
|
321
|
+
author = {Weatherhead, James},
|
|
322
|
+
title = {{The Grid}: Multi-Agent Orchestration Framework for Claude Code},
|
|
323
|
+
year = {2025},
|
|
324
|
+
publisher = {GitHub},
|
|
325
|
+
url = {https://github.com/JamesWeatherhead/grid},
|
|
326
|
+
note = {npm package: the-grid-cc}
|
|
327
|
+
}
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### Text Citation
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
Weatherhead, J. (2025). The Grid: Multi-Agent Orchestration Framework for Claude Code.
|
|
334
|
+
GitHub. https://github.com/JamesWeatherhead/grid
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
309
339
|
## License
|
|
310
340
|
|
|
311
341
|
MIT License. See [LICENSE](LICENSE) for details.
|