golem-cc 0.1.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 ADDED
@@ -0,0 +1,240 @@
1
+ ```
2
+ ██████╗ ██████╗ ██╗ ███████╗███╗ ███╗
3
+ ██╔════╝ ██╔═══██╗██║ ██╔════╝████╗ ████║
4
+ ██║ ███╗██║ ██║██║ █████╗ ██╔████╔██║
5
+ ██║ ██║██║ ██║██║ ██╔══╝ ██║╚██╔╝██║
6
+ ╚██████╔╝╚██████╔╝███████╗███████╗██║ ╚═╝ ██║
7
+ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝╚═╝ ╚═╝
8
+ ```
9
+
10
+ > Let it build. Let it test. Let it simplify. Let it loop.
11
+
12
+ Golem is an autonomous coding loop that implements features while you watch (or grab coffee). Define your specs, kick off the loop, and let it work through your task list—implementing, testing, simplifying, and committing along the way.
13
+
14
+ ```
15
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16
+ ITERATION 3 │ 9 tasks remaining
17
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
18
+
19
+ ▶ Step 1: Implement
20
+ ✓ Added user authentication endpoint
21
+ ✓ Tests passing (14 passed)
22
+ ✓ Committed: feat(auth): add login endpoint
23
+
24
+ ▶ Step 2: Simplify
25
+ ✓ Flattened nested conditionals
26
+ ✓ Tests passing (14 passed)
27
+ ✓ Committed: refactor: simplify auth logic
28
+
29
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
30
+ ITERATION 4 │ 8 tasks remaining
31
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
32
+ ```
33
+
34
+ ## How It Works
35
+
36
+ ```
37
+ ┌─────────────────────────────────────────────────────────────────┐
38
+ │ YOU │
39
+ │ │
40
+ │ "I need user auth, a REST API for tasks, and filtering" │
41
+ │ │ │
42
+ │ ▼ │
43
+ │ ┌──────────────┐ │
44
+ │ │ golem spec │ ← Interactive │
45
+ │ └──────────────┘ conversation │
46
+ │ │ │
47
+ │ ▼ │
48
+ │ specs/*.md │
49
+ │ │ │
50
+ ├──────────────────────────────┼──────────────────────────────────┤
51
+ │ GOLEM │
52
+ │ │ │
53
+ │ ▼ │
54
+ │ ┌──────────────┐ │
55
+ │ │ golem plan │ ← Analyzes specs │
56
+ │ └──────────────┘ vs. codebase │
57
+ │ │ │
58
+ │ ▼ │
59
+ │ IMPLEMENTATION_PLAN.md │
60
+ │ │ │
61
+ │ ▼ │
62
+ │ ┌──────────────┐ │
63
+ │ │ golem build │ ← Autonomous loop │
64
+ │ └──────────────┘ │
65
+ │ │ │
66
+ │ ┌─────────────────┼─────────────────┐ │
67
+ │ ▼ ▼ ▼ │
68
+ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │
69
+ │ │ Implement │ → │ Test │ → │ Simplify │ → Commit │
70
+ │ └────────────┘ └────────────┘ └────────────┘ │ │
71
+ │ ▲ │ │
72
+ │ └─────────────── Loop ────────────────────────┘ │
73
+ │ │
74
+ └─────────────────────────────────────────────────────────────────┘
75
+ ```
76
+
77
+ ## Installation
78
+
79
+ ```bash
80
+ npx golem-cc --global
81
+ source ~/.zshrc
82
+ ```
83
+
84
+ ## Quick Start
85
+
86
+ ```bash
87
+ # 1. Initialize in your project
88
+ cd my-project
89
+ golem --install
90
+
91
+ # 2. Define what you're building (interactive)
92
+ golem spec
93
+
94
+ # 3. Generate the task list
95
+ golem run plan
96
+
97
+ # 4. Let it rip
98
+ golem run build
99
+ ```
100
+
101
+ ## The Loop
102
+
103
+ Each iteration runs two separate sessions with fresh context:
104
+
105
+ **Step 1: Implement**
106
+ - Picks the next task from `IMPLEMENTATION_PLAN.md`
107
+ - Implements the feature/fix
108
+ - Runs tests until they pass
109
+ - Updates the plan
110
+ - Commits
111
+
112
+ **Step 2: Simplify**
113
+ - Analyzes the code just written
114
+ - Removes AI artifacts (unnecessary comments, dead code)
115
+ - Flattens nested logic
116
+ - Improves naming
117
+ - Runs tests to verify no regressions
118
+ - Commits
119
+
120
+ Then it loops. Fresh context each time. No degradation.
121
+
122
+ ## Commands
123
+
124
+ | Command | Description |
125
+ |---------|-------------|
126
+ | `golem --install` | Initialize golem in current project |
127
+ | `golem spec` | Build specs through guided conversation |
128
+ | `golem run plan` | Create implementation plan from specs |
129
+ | `golem run build` | Run the autonomous build loop |
130
+ | `golem simplify` | Run code simplifier on demand |
131
+ | `golem status` | Show progress |
132
+
133
+ ### Options
134
+
135
+ ```bash
136
+ golem run build --iterations 10 # Stop after 10 tasks
137
+ golem run build --no-simplify # Skip simplification step
138
+ ```
139
+
140
+ ## Project Structure
141
+
142
+ After running `golem --install`:
143
+
144
+ ```
145
+ my-project/
146
+ ├── .golem/
147
+ │ ├── prompts/ # Loop instructions (customizable)
148
+ │ │ ├── PROMPT_build.md
149
+ │ │ └── PROMPT_plan.md
150
+ │ └── agents/ # AI agent definitions
151
+ │ ├── spec-builder.md
152
+ │ └── code-simplifier.md
153
+ ├── specs/ # Your requirements (one file per topic)
154
+ │ ├── authentication.md
155
+ │ └── task-api.md
156
+ ├── AGENTS.md # Test/build/lint commands
157
+ └── IMPLEMENTATION_PLAN.md # Generated task list
158
+ ```
159
+
160
+ ## Writing Specs
161
+
162
+ Specs are simple markdown files describing what you want:
163
+
164
+ ```markdown
165
+ # Authentication
166
+
167
+ ## Purpose
168
+ User authentication for the API.
169
+
170
+ ## Requirements
171
+
172
+ ### Must Have
173
+ - Email/password registration
174
+ - JWT-based sessions with refresh tokens
175
+ - Password hashing with bcrypt
176
+
177
+ ### Should Have
178
+ - Password reset via email
179
+
180
+ ### Must Not
181
+ - Store plain text passwords
182
+ - Allow unlimited login attempts
183
+
184
+ ## Acceptance Criteria
185
+ - [ ] POST /auth/register creates user
186
+ - [ ] POST /auth/login returns JWT
187
+ - [ ] Invalid credentials return 401
188
+ - [ ] Tokens expire after 24 hours
189
+ ```
190
+
191
+ ## Backpressure
192
+
193
+ The loop uses your test suite as a quality gate. Configure in `AGENTS.md`:
194
+
195
+ ```markdown
196
+ # Operational Guide
197
+
198
+ ## Commands
199
+
200
+ ### Testing
201
+ \`\`\`bash
202
+ npm test
203
+ \`\`\`
204
+
205
+ ### Type Checking
206
+ \`\`\`bash
207
+ npm run typecheck
208
+ \`\`\`
209
+
210
+ ### Linting
211
+ \`\`\`bash
212
+ npm run lint
213
+ \`\`\`
214
+ ```
215
+
216
+ If tests fail, it fixes and retries. If they pass, it moves on. Your tests are the contract.
217
+
218
+ ## Philosophy
219
+
220
+ **Fresh context beats accumulated context.** Each iteration starts clean. No confusion from previous work bleeding in.
221
+
222
+ **Tests are the spec.** The loop trusts passing tests. Write good tests, get good code.
223
+
224
+ **Simplification is not optional.** AI-written code tends toward verbosity. The simplifier pass keeps it clean.
225
+
226
+ **You steer via specs, not prompts.** Change what you want by editing `specs/*.md`, not by micromanaging the AI.
227
+
228
+ ## Based On
229
+
230
+ - [Ralph Wiggum Playbook](https://claytonfarr.github.io/ralph-playbook/) by Clayton Farr — the autonomous loop methodology
231
+ - [Code Simplifier](https://github.com/anthropics/claude-plugins-official/tree/main/plugins/code-simplifier) from Anthropic — the simplification patterns
232
+
233
+ ## Requirements
234
+
235
+ - Node.js 18+
236
+ - [Claude Code](https://claude.ai/code) CLI installed and authenticated
237
+
238
+ ## License
239
+
240
+ MIT