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.
@@ -0,0 +1,30 @@
1
+ ---
2
+ cluster: null
3
+ decision_count: 0
4
+ last_updated: "{ISO timestamp}"
5
+ ---
6
+
7
+ # Grid Decisions Log
8
+
9
+ User decisions made via I/O Tower. Referenced during resume to maintain consistency.
10
+
11
+ ## Format
12
+
13
+ Each decision follows this format:
14
+
15
+ ```
16
+ ## Decision {N}: {ISO timestamp}
17
+ **Question:** {what was asked}
18
+ **Options Presented:**
19
+ - {option_a}: "{description}"
20
+ - {option_b}: "{description}"
21
+ **User Choice:** {choice}
22
+ **Rationale:** "{user's reason if given}"
23
+ **Affects:** {blocks/features affected}
24
+ ```
25
+
26
+ ---
27
+
28
+ ## Decisions
29
+
30
+ *(Decisions will appear below)*
@@ -0,0 +1,138 @@
1
+ # Grid State Templates
2
+
3
+ This directory contains templates for the `.grid/` state persistence system.
4
+
5
+ ## Template Files
6
+
7
+ ### Core State Files
8
+
9
+ | File | Purpose | Updated By | Update Frequency |
10
+ |------|---------|------------|------------------|
11
+ | `STATE.md` | Central state tracking | MC | Every wave |
12
+ | `WARMTH.md` | Institutional knowledge | MC | After each block |
13
+ | `SCRATCHPAD.md` | Live discoveries | Executors | During execution |
14
+ | `DECISIONS.md` | User decision log | MC | On user decision |
15
+ | `BLOCKERS.md` | Blocker tracking | MC/Executors | On blocker encountered |
16
+ | `CHECKPOINT.md` | Interrupted thread state | Executor | On checkpoint/interrupt |
17
+ | `config.json` | Grid configuration | User/MC | On config change |
18
+ | `BLOCK-SUMMARY.md` | Completed block record | Executor | On block complete |
19
+
20
+ ## Directory Structure
21
+
22
+ When `/grid:init` runs, it creates this structure:
23
+
24
+ ```
25
+ .grid/
26
+ ├── STATE.md # Central state (read first on resume)
27
+ ├── WARMTH.md # Accumulated institutional knowledge
28
+ ├── SCRATCHPAD.md # Live discoveries
29
+ ├── DECISIONS.md # User decisions log
30
+ ├── BLOCKERS.md # Active and resolved blockers
31
+ ├── config.json # Grid configuration
32
+
33
+ ├── plans/ # Execution plans
34
+ │ ├── {cluster}-PLAN-SUMMARY.md
35
+ │ ├── {cluster}-block-01.md
36
+ │ └── ...
37
+
38
+ ├── phases/ # Execution artifacts
39
+ │ ├── 01-{phase-name}/
40
+ │ │ ├── 01-PLAN.md
41
+ │ │ └── 01-SUMMARY.md
42
+ │ └── ...
43
+
44
+ ├── discs/ # Identity Discs for Programs
45
+ │ └── {program-id}.md
46
+
47
+ ├── debug/ # Debug session state
48
+ │ └── {timestamp}-{slug}/
49
+
50
+ └── refinement/ # Refinement swarm outputs
51
+ ├── screenshots/
52
+ ├── e2e/
53
+ └── personas/
54
+ ```
55
+
56
+ ## Usage
57
+
58
+ ### Initialize New Project
59
+
60
+ ```bash
61
+ /grid:init
62
+ ```
63
+
64
+ Creates `.grid/` with all templates initialized.
65
+
66
+ ### Resume Interrupted Mission
67
+
68
+ ```bash
69
+ /grid:resume
70
+ ```
71
+
72
+ Reads STATE.md, validates consistency, reconstructs context, and continues execution.
73
+
74
+ ## State Lifecycle
75
+
76
+ ### 1. Initialize
77
+ - STATUS: `initialized`
78
+ - FILES: STATE.md, WARMTH.md, SCRATCHPAD.md, config.json
79
+
80
+ ### 2. Mission Start
81
+ - STATUS: `active`
82
+ - FILES: Plans written to `.grid/plans/`
83
+
84
+ ### 3. Block Execution
85
+ - STATUS: `active`
86
+ - FILES: SCRATCHPAD.md updated during work
87
+
88
+ ### 4. Block Complete
89
+ - STATUS: `active`
90
+ - FILES: SUMMARY.md written to `.grid/phases/`
91
+ - WARMTH.md aggregated
92
+
93
+ ### 5. Checkpoint Hit
94
+ - STATUS: `checkpoint`
95
+ - FILES: CHECKPOINT.md written with thread state
96
+
97
+ ### 6. Session Death
98
+ - STATUS: `interrupted` (if checkpoint written) or `active` (stale)
99
+ - FILES: CHECKPOINT.md may or may not exist
100
+
101
+ ### 7. Resume
102
+ - STATUS: `active`
103
+ - FILES: CHECKPOINT.md archived or deleted
104
+ - Context reconstructed from all state files
105
+
106
+ ### 8. Mission Complete
107
+ - STATUS: `completed`
108
+ - FILES: Final SUMMARY.md written
109
+ - WARMTH.md finalized
110
+
111
+ ## State Validation
112
+
113
+ Before resume, the system validates:
114
+
115
+ 1. **Commits exist** - All claimed commit hashes exist in git
116
+ 2. **Files exist** - All claimed artifacts exist on disk
117
+ 3. **Plans available** - Plans exist for pending blocks
118
+ 4. **Single checkpoint** - No conflicting checkpoint files
119
+ 5. **State parseable** - All YAML frontmatter is valid
120
+
121
+ ## Persistence Guarantees
122
+
123
+ After initialization, The Grid guarantees:
124
+
125
+ 1. **State survives session death** - All progress recorded in files
126
+ 2. **Warmth accumulates** - Knowledge transfers across Programs
127
+ 3. **Decisions persist** - User choices never need repeating
128
+ 4. **Commits are verified** - Git hashes enable state validation
129
+ 5. **Plans are preserved** - Full execution plans available for resume
130
+
131
+ ## Related Commands
132
+
133
+ - `/grid` - Begin a mission (auto-initializes if needed)
134
+ - `/grid:init` - Initialize .grid/ structure
135
+ - `/grid:resume` - Resume interrupted mission
136
+ - `/grid:status` - Display current state
137
+
138
+ End of Line.
@@ -0,0 +1,29 @@
1
+ ---
2
+ updated: "{ISO timestamp}"
3
+ active_programs: []
4
+ ---
5
+
6
+ # Grid Scratchpad
7
+
8
+ Live discoveries during execution. Programs write here when they learn something others need to know.
9
+
10
+ ## Format
11
+
12
+ Each entry must follow:
13
+
14
+ ```
15
+ ### {program-id} | {ISO-timestamp} | {category}
16
+
17
+ **Finding:** {one clear sentence}
18
+ **Impact:** {who needs to know}
19
+ **Action:** [INFORM_ONLY | REQUIRES_CHANGE | BLOCKER]
20
+ **Details:** {additional context}
21
+ ```
22
+
23
+ Categories: PATTERN | DECISION | BLOCKER | PROGRESS | CORRECTION
24
+
25
+ ---
26
+
27
+ ## Entries
28
+
29
+ *(Entries will appear below)*
@@ -0,0 +1,47 @@
1
+ ---
2
+ # Identity
3
+ cluster: null
4
+ session_id: "{timestamp}-init"
5
+ status: initialized # initialized | active | checkpoint | interrupted | completed | failed
6
+
7
+ # Position tracking
8
+ position:
9
+ phase: 0
10
+ phase_total: 0
11
+ phase_name: null
12
+ block: 0
13
+ block_total: 0
14
+ wave: 0
15
+ wave_total: 0
16
+
17
+ # Progress
18
+ progress_percent: 0
19
+ energy_remaining: 10000
20
+
21
+ # Execution mode
22
+ mode: autopilot # autopilot | guided | hands_on
23
+
24
+ # Timestamps
25
+ created_at: "{ISO timestamp}"
26
+ updated_at: "{ISO timestamp}"
27
+ ---
28
+
29
+ # Grid State
30
+
31
+ ## Current Position
32
+ - Active Cluster: none
33
+ - Active Block: none
34
+ - Status: Initialized
35
+
36
+ Progress: [----------] 0%
37
+
38
+ ## Session Info
39
+ - Initialized: {current date}
40
+ - Session ID: {session_id}
41
+ - Mode: AUTOPILOT
42
+
43
+ ## Last Activity
44
+ Initialized Grid state directory.
45
+
46
+ ## Notes
47
+ Ready for /grid to begin a mission.
@@ -0,0 +1,48 @@
1
+ ---
2
+ cluster: null
3
+ accumulated_from: []
4
+ last_updated: "{ISO timestamp}"
5
+ ---
6
+
7
+ # Grid Warmth
8
+
9
+ Accumulated knowledge from Programs. Survives session death.
10
+
11
+ ## Codebase Patterns
12
+
13
+ *(Patterns discovered about the codebase)*
14
+
15
+ - Example: "This project uses Astro content collections for blog posts"
16
+ - Example: "Dark mode uses class strategy with localStorage"
17
+
18
+ ## Gotchas
19
+
20
+ *(Traps and pitfalls to avoid)*
21
+
22
+ - Example: "Astro config must use .mjs extension for ESM"
23
+ - Example: "Shiki syntax highlighting is build-time only"
24
+
25
+ ## User Preferences
26
+
27
+ *(Inferred user preferences)*
28
+
29
+ - Example: "User prefers minimal dependencies"
30
+ - Example: "User wants dark mode as default"
31
+
32
+ ## Decisions Made
33
+
34
+ *(Key decisions and their rationale)*
35
+
36
+ - Example: "Chose serverless adapter over static for future flexibility"
37
+
38
+ ## Almost Did
39
+
40
+ *(Approaches considered but rejected)*
41
+
42
+ - Example: "Considered MDX but stuck with plain MD for simplicity"
43
+
44
+ ## Fragile Areas
45
+
46
+ *(Code that breaks easily)*
47
+
48
+ - Example: "Content collection schema changes require restart"
@@ -0,0 +1,24 @@
1
+ {
2
+ "model_tier": "quality",
3
+ "model_tier_options": [
4
+ "quality",
5
+ "balanced",
6
+ "budget"
7
+ ],
8
+ "auto_verify": true,
9
+ "scratchpad_heartbeat_minutes": 5,
10
+ "stale_threshold_minutes": 10,
11
+ "max_retry_attempts": 3,
12
+ "created_at": "{ISO timestamp}",
13
+ "git": {
14
+ "auto_branch": true,
15
+ "branch_prefix": "grid/",
16
+ "auto_push": "wave",
17
+ "auto_pr": false,
18
+ "protected_branches": ["main", "master", "production"],
19
+ "default_base": "main",
20
+ "sync_strategy": "merge",
21
+ "commit_signing": false,
22
+ "wip_commits": true
23
+ }
24
+ }