the-grid-cc 1.4.0 → 1.6.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/README.md CHANGED
@@ -1,37 +1,62 @@
1
1
  # THE GRID
2
2
 
3
- > "The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer."
4
-
5
- **Agent orchestration for Claude Code.** You talk to the Master Control Program. Master Control handles the rest.
3
+ <p align="center">
4
+ <strong>From install to shipping features: 5 minutes.</strong>
5
+ <br>
6
+ Multi-agent orchestration for Claude Code that keeps your context clean
7
+ </p>
6
8
 
7
- [![GitHub stars](https://img.shields.io/github/stars/JamesWeatherhead/grid?style=flat-square)](https://github.com/JamesWeatherhead/grid/stargazers)
8
- [![License: MIT](https://img.shields.io/badge/License-MIT-cyan.svg?style=flat-square)](https://opensource.org/licenses/MIT)
9
+ <p align="center">
10
+ <a href="#your-first-session">First Session</a> •
11
+ <a href="#three-modes">Three Modes</a> •
12
+ <a href="#commands">Commands</a> •
13
+ <a href="#faq">FAQ</a>
14
+ </p>
9
15
 
10
- ```
11
- +============================================================+
12
- | |
13
- | M A S T E R C O N T R O L P R O G R A M |
14
- | |
15
- | "I fight for the Users." |
16
- | |
17
- +============================================================+
18
- ```
16
+ <p align="center">
17
+ <a href="https://www.npmjs.com/package/the-grid-cc">
18
+ <img src="https://img.shields.io/npm/v/the-grid-cc?style=for-the-badge&logo=npm&logoColor=white&color=CB3837" alt="npm version"/>
19
+ </a>
20
+ <a href="https://github.com/JamesWeatherhead/grid/stargazers">
21
+ <img src="https://img.shields.io/github/stars/JamesWeatherhead/grid?style=for-the-badge" alt="GitHub stars"/>
22
+ </a>
23
+ <a href="https://www.npmjs.com/package/the-grid-cc">
24
+ <img src="https://img.shields.io/npm/dm/the-grid-cc?style=for-the-badge" alt="npm downloads"/>
25
+ </a>
26
+ <a href="https://github.com/JamesWeatherhead/grid/blob/main/LICENSE">
27
+ <img src="https://img.shields.io/badge/License-MIT-cyan.svg?style=for-the-badge" alt="MIT License"/>
28
+ </a>
29
+ </p>
19
30
 
20
31
  ---
21
32
 
22
- ## What Is This?
33
+ ## The Problem
34
+
35
+ You're building something complex in Claude Code. Your context window fills up. Claude starts forgetting your original goals. You lose the forest for the trees.
36
+
37
+ **Sound familiar?**
38
+
39
+ ## The Solution
23
40
 
24
- The Grid is a **Claude Code command system** that orchestrates AI agents using the TRON metaphor.
41
+ The Grid spawns fresh subagents for heavy work while keeping your main conversation focused on goals.
25
42
 
26
- **You only talk to Master Control.** Master Control spawns Programs to do the actual work. Programs report back to Master Control. Master Control reports to you.
43
+ ```
44
+ YOU ←→ Coordinator ←→ Worker Agents
45
+
46
+ Your context stays clean (~15%)
47
+ Workers get fresh 200k windows
48
+ Coordinator remembers your goals
49
+ ```
27
50
 
28
- This keeps Master Control's context window lean while heavy work happens in fresh subagent contexts.
51
+ **Without Grid**: One exhausted conversation doing everything
52
+ **With Grid**: Focused coordinator delegating to specialized workers
29
53
 
30
54
  ---
31
55
 
32
56
  ## Quick Start
33
57
 
34
58
  ```bash
59
+ # Install (30 seconds, works on macOS/Linux/Windows+WSL)
35
60
  npx the-grid-cc
36
61
  ```
37
62
 
@@ -41,65 +66,101 @@ Then in Claude Code:
41
66
  /grid
42
67
  ```
43
68
 
44
- Master Control will greet you. Tell it what you want to build.
69
+ That's it. Describe what you want to build.
45
70
 
46
- ### Update
71
+ ---
47
72
 
48
- Already have The Grid? Update from within Claude Code:
73
+ ## Your First Session
74
+
75
+ Here's exactly what happens when you use The Grid for the first time:
49
76
 
50
77
  ```
51
- /grid:update
52
- ```
78
+ YOU: /grid
53
79
 
54
- ### Status Bar
80
+ GRID: THE GRID
81
+ ════════
55
82
 
56
- The Grid adds a context meter to your Claude Code status bar:
83
+ Master Control online.
57
84
 
58
- ```
59
- Master Control ░░░░░░░░░░ 0% ← Fresh session
60
- Master Control █████░░░░░ 50% ← Half context used
61
- Master Control █████████░ 90% ← Running low
85
+ What would you like to build?
86
+
87
+ YOU: A REST API with user authentication
88
+
89
+ GRID: How involved do you want to be?
90
+
91
+ AUTOPILOT - I handle everything. Zero questions.
92
+ GUIDED - I drive, ask only when essential.
93
+ HANDS ON - We decide together.
94
+
95
+ YOU: autopilot
96
+
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
109
+
110
+ BUILD COMPLETE
111
+ ══════════════
112
+
113
+ Project: auth-api
114
+ Stack: Express + TypeScript + JWT + Prisma
115
+ Files: 14 created
116
+ Tests: 12 passing
117
+
118
+ Ready to use. End of Line.
62
119
  ```
63
120
 
64
- Visual `/context` at a glance. Bar fills as you use more context.
121
+ **Time from `/grid` to working code: ~10-15 minutes** (depending on complexity)
122
+
123
+ **Your context usage: ~15%** (workers did the heavy lifting)
65
124
 
66
125
  ---
67
126
 
68
- ## The Hierarchy
127
+ ## Three Modes
128
+
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 |
69
134
 
70
- | TRON Term | What It Is | Role |
71
- |-----------|-----------|------|
72
- | **Master Control** | The orchestrator | Your sole interface - orchestrates everything |
73
- | **Program** | Subagent | Does actual coding work |
74
- | **Recognizer** | Patrol/verification agent | Surveys code, captures defects |
75
- | **Guard** | Security agent | Checks permissions, prevents dangerous ops |
76
- | **Cluster** | Feature/domain | What you're building |
77
- | **Block** | Task group | Related tasks |
78
- | **Thread** | Atomic task | Single unit of work |
79
- | **I/O Tower** | Human checkpoint | Where Master Control asks for your input |
80
- | **Identity Disc** | Context carrier | Memory that travels with Programs |
135
+ ### AUTOPILOT
136
+ Zero questions. You describe what you want, Grid figures out users, tech stack, architecture. You see finished code.
137
+
138
+ ### GUIDED
139
+ Grid drives but asks when genuinely ambiguous: "This could be a blog or a docs site - which?" Then builds.
140
+
141
+ ### HANDS ON
142
+ Collaborative. Grid proposes, you approve. More control, more questions.
81
143
 
82
144
  ---
83
145
 
84
146
  ## How It Works
85
147
 
86
148
  ```
87
- YOU ←→ Master Control ←→ Programs
88
-
89
- Recognizers (patrol)
90
-
91
- Guards (security)
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
92
161
  ```
93
162
 
94
- 1. **You** describe what you want to build
95
- 2. **Master Control** parses intent, creates Cluster structure
96
- 3. **Master Control** spawns **Planner Program** to create Blocks/Threads
97
- 4. **Master Control** spawns **Executor Programs** to do the work
98
- 5. **Recognizers** patrol and verify work meets goals
99
- 6. **Guards** check security before dangerous operations
100
- 7. **Master Control** reports completion to **You**
101
-
102
- If any Program needs your input → **I/O Tower** activates → Master Control asks you.
163
+ **Workers = subagents with fresh context.** They do heavy lifting, report back, terminate. Your main conversation stays focused.
103
164
 
104
165
  ---
105
166
 
@@ -107,110 +168,150 @@ If any Program needs your input → **I/O Tower** activates → Master Control a
107
168
 
108
169
  | Command | What It Does |
109
170
  |---------|-------------|
110
- | `/grid` | Enter The Grid - activates Master Control |
111
- | `/grid:mc` | Same as above |
112
- | `/grid:update` | Pull latest updates from GitHub |
113
- | `/grid:init` | Initialize `.grid/` state directory |
114
- | `/grid:help` | Show command reference |
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 |
176
+ | `/grid:help` | Full command reference |
115
177
 
116
178
  ---
117
179
 
118
- ## Programs (Agents)
180
+ ## State Persistence
119
181
 
120
- Master Control spawns these specialized Programs:
182
+ Grid saves state locally in `.grid/`:
121
183
 
122
- ### Planner Program
123
- Creates execution plans from your description. Decomposes work into Blocks (task groups) and Threads (atomic tasks).
124
-
125
- ### Executor Program
126
- Does the actual coding. Makes atomic git commits. Reports back to Master Control.
184
+ ```
185
+ .grid/
186
+ ├── STATE.md # Current progress
187
+ ├── LEARNINGS.md # Patterns from past projects
188
+ ├── REFINEMENT_PLAN.md # Issues found during testing
189
+ └── phases/ # Execution plans
190
+ ```
127
191
 
128
- ### Recognizer Program
129
- Aerial patrol unit. Surveys codebase for anomalies, captures defects, verifies work achieved goals. Circuits glow red under Master Control.
192
+ **Close your terminal. Come back tomorrow. Grid picks up where you left off.**
130
193
 
131
- ### Guard Program
132
- Security enforcement. Checks permissions, validates inputs, prevents destructive actions without User approval.
194
+ > **Tip:** Add `.grid/` to your `.gitignore` - it's local working state, not project code.
133
195
 
134
196
  ---
135
197
 
136
- ## State Management
198
+ ## FAQ
137
199
 
138
- The Grid maintains state in `.grid/` directory:
200
+ <details>
201
+ <summary><strong>How much does this cost in API tokens?</strong></summary>
139
202
 
140
- ```
141
- .grid/
142
- ├── STATE.md # Current position, decisions
143
- ├── clusters/ # Cluster plans and summaries
144
- └── discs/ # Identity Discs for Programs
145
- ```
203
+ Grid uses more API calls (multiple workers), but each call is *smaller* because contexts stay clean. In practice:
146
204
 
147
- Master Control checks `.grid/STATE.md` on every invocation to understand current position.
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
148
208
 
149
- ---
209
+ The Grid is free and open source. You pay normal Claude API costs.
210
+ </details>
150
211
 
151
- ## Philosophy
212
+ <details>
213
+ <summary><strong>What if something goes wrong?</strong></summary>
152
214
 
153
- **Master Control stays lean.** Heavy work happens in fresh subagent context windows.
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
154
219
 
155
- - Master Control orchestrates, never executes directly
156
- - Programs do work, report back to Master Control
157
- - User only talks to Master Control
158
- - I/O Towers surface decisions to User
159
- - Recognizers patrol and verify
160
- - Guards enforce security
220
+ **Worker makes a mistake:**
221
+ - Recognizer catches most issues automatically
222
+ - If something slips through, describe the problem and Grid spawns a fix
161
223
 
162
- **"End of Line."**
224
+ **Grid gets confused:**
225
+ - `/grid:status` shows current state
226
+ - You can always override: "Stop. Let's do X instead."
163
227
 
164
- ---
228
+ **Nuclear option:**
229
+ - Delete `.grid/` folder
230
+ - Start fresh with `/grid`
231
+ </details>
165
232
 
166
- ## Architecture
233
+ <details>
234
+ <summary><strong>How is this different from just opening multiple Claude tabs?</strong></summary>
167
235
 
168
- ```
169
- ~/.claude/
170
- ├── commands/
171
- │ ├── grid.md # /grid shortcut
172
- │ └── grid/
173
- │ ├── mc.md # Master Control
174
- │ ├── init.md # Initialize state
175
- │ ├── help.md # Command reference
176
- │ └── VERSION # v1.1.0
177
- └── agents/
178
- ├── grid-planner.md # Creates plans
179
- ├── grid-executor.md # Does work
180
- ├── grid-recognizer.md # Patrols/verifies
181
- └── grid-guard.md # Security
182
- ```
236
+ You *could* manually manage multiple conversations, copy context between them, track what each is doing, merge their outputs...
237
+
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.
245
+ </details>
246
+
247
+ <details>
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.
251
+
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.
262
+ </details>
263
+
264
+ <details>
265
+ <summary><strong>Why the TRON theme?</strong></summary>
266
+
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.
280
+ </details>
183
281
 
184
282
  ---
185
283
 
186
- ## Contributing
284
+ ## Glossary (Optional)
187
285
 
188
- The Grid is a collaborative project by James Weatherhead & Claude.
286
+ Grid uses some themed terminology. Here's the plain-English translation:
189
287
 
190
- Issues and PRs welcome.
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) |
294
+
295
+ You don't need to memorize these. Grid explains what it's doing as it works.
191
296
 
192
297
  ---
193
298
 
194
- ## License
299
+ ## Contributing
195
300
 
196
- MIT License. See [LICENSE](LICENSE) for details.
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).
197
304
 
198
305
  ---
199
306
 
200
- ## Star History
307
+ ## License
201
308
 
202
- <a href="https://star-history.com/#JamesWeatherhead/grid&Date">
203
- <picture>
204
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=JamesWeatherhead/grid&type=Date&theme=dark" />
205
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=JamesWeatherhead/grid&type=Date" />
206
- <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=JamesWeatherhead/grid&type=Date" />
207
- </picture>
208
- </a>
309
+ MIT License. See [LICENSE](LICENSE) for details.
209
310
 
210
311
  ---
211
312
 
212
313
  <p align="center">
213
- <i>"I fight for the Users."</i>
314
+ <strong>"I fight for the Users."</strong>
214
315
  <br><br>
215
- <b>End of Line.</b>
316
+ <sub>End of Line.</sub>
216
317
  </p>