golem-cc 0.2.2 → 0.2.3
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 +17 -17
- package/commands/golem/build.md +13 -13
- package/commands/golem/help.md +6 -6
- package/commands/golem/plan.md +9 -9
- package/commands/golem/status.md +12 -12
- package/golem/agents/code-simplifier.md +2 -2
- package/golem/prompts/PROMPT_build.md +7 -7
- package/golem/prompts/PROMPT_plan.md +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ Golem is an autonomous coding loop that implements features while you watch (or
|
|
|
52
52
|
│ └────────────────────┘ │
|
|
53
53
|
│ │ │
|
|
54
54
|
│ ▼ │
|
|
55
|
-
│
|
|
55
|
+
│ .golem/specs/*.md │
|
|
56
56
|
│ │ │
|
|
57
57
|
├──────────────────────────────┼──────────────────────────────────┤
|
|
58
58
|
│ GOLEM │
|
|
@@ -63,7 +63,7 @@ Golem is an autonomous coding loop that implements features while you watch (or
|
|
|
63
63
|
│ └────────────────┘ vs. codebase │
|
|
64
64
|
│ │ │
|
|
65
65
|
│ ▼ │
|
|
66
|
-
│
|
|
66
|
+
│ .golem/IMPLEMENTATION_PLAN.md │
|
|
67
67
|
│ │ │
|
|
68
68
|
│ ▼ │
|
|
69
69
|
│ ┌─────────────────┐ │
|
|
@@ -126,7 +126,7 @@ golem run build
|
|
|
126
126
|
Each iteration runs two separate sessions with fresh context:
|
|
127
127
|
|
|
128
128
|
**Step 1: Implement**
|
|
129
|
-
- Picks the next task from
|
|
129
|
+
- Picks the next task from `.golem/IMPLEMENTATION_PLAN.md`
|
|
130
130
|
- Implements the feature/fix
|
|
131
131
|
- Runs tests until they pass
|
|
132
132
|
- Updates the plan
|
|
@@ -176,18 +176,18 @@ After running `golem --init`:
|
|
|
176
176
|
|
|
177
177
|
```
|
|
178
178
|
my-project/
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
│
|
|
182
|
-
│
|
|
183
|
-
|
|
184
|
-
│
|
|
185
|
-
│
|
|
186
|
-
├── specs/ # Your requirements (one file per topic)
|
|
187
|
-
│ ├── authentication.md
|
|
188
|
-
│ └── task-api.md
|
|
189
|
-
├── AGENTS.md # Test/build/lint commands
|
|
190
|
-
└── IMPLEMENTATION_PLAN.md
|
|
179
|
+
└── .golem/
|
|
180
|
+
├── prompts/ # Loop instructions (customizable)
|
|
181
|
+
│ ├── PROMPT_build.md
|
|
182
|
+
│ └── PROMPT_plan.md
|
|
183
|
+
├── agents/ # AI agent definitions
|
|
184
|
+
│ ├── spec-builder.md
|
|
185
|
+
│ └── code-simplifier.md
|
|
186
|
+
├── specs/ # Your requirements (one file per topic)
|
|
187
|
+
│ ├── authentication.md
|
|
188
|
+
│ └── task-api.md
|
|
189
|
+
├── AGENTS.md # Test/build/lint commands
|
|
190
|
+
└── IMPLEMENTATION_PLAN.md # Generated task list
|
|
191
191
|
```
|
|
192
192
|
|
|
193
193
|
## Writing Specs
|
|
@@ -223,7 +223,7 @@ User authentication for the API.
|
|
|
223
223
|
|
|
224
224
|
## Backpressure
|
|
225
225
|
|
|
226
|
-
The loop uses your test suite as a quality gate. Configure in
|
|
226
|
+
The loop uses your test suite as a quality gate. Configure in `.golem/AGENTS.md`:
|
|
227
227
|
|
|
228
228
|
```markdown
|
|
229
229
|
# Operational Guide
|
|
@@ -256,7 +256,7 @@ If tests fail, it fixes and retries. If they pass, it moves on. Your tests are t
|
|
|
256
256
|
|
|
257
257
|
**Simplification is not optional.** AI-written code tends toward verbosity. The simplifier pass keeps it clean.
|
|
258
258
|
|
|
259
|
-
**You steer via specs, not prompts.** Change what you want by editing
|
|
259
|
+
**You steer via specs, not prompts.** Change what you want by editing `.golem/specs/*.md`, not by micromanaging the AI.
|
|
260
260
|
|
|
261
261
|
## Based On
|
|
262
262
|
|
package/commands/golem/build.md
CHANGED
|
@@ -16,22 +16,22 @@ Execute the autonomous build loop: select a task, implement it, validate with te
|
|
|
16
16
|
<context>
|
|
17
17
|
Load specs:
|
|
18
18
|
```bash
|
|
19
|
-
for f in specs/*.md; do echo "=== $f ==="; cat "$f"; echo; done 2>/dev/null
|
|
19
|
+
for f in .golem/specs/*.md; do echo "=== $f ==="; cat "$f"; echo; done 2>/dev/null
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Load operational guide:
|
|
23
23
|
```bash
|
|
24
|
-
cat AGENTS.md 2>/dev/null || echo "No AGENTS.md - run /golem:spec first"
|
|
24
|
+
cat .golem/AGENTS.md 2>/dev/null || echo "No AGENTS.md - run /golem:spec first"
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Load implementation plan:
|
|
28
28
|
```bash
|
|
29
|
-
cat IMPLEMENTATION_PLAN.md 2>/dev/null || echo "No plan - run /golem:plan first"
|
|
29
|
+
cat .golem/IMPLEMENTATION_PLAN.md 2>/dev/null || echo "No plan - run /golem:plan first"
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Check remaining tasks:
|
|
33
33
|
```bash
|
|
34
|
-
grep -c '^\- \[ \]' IMPLEMENTATION_PLAN.md 2>/dev/null || echo "0"
|
|
34
|
+
grep -c '^\- \[ \]' .golem/IMPLEMENTATION_PLAN.md 2>/dev/null || echo "0"
|
|
35
35
|
```
|
|
36
36
|
</context>
|
|
37
37
|
|
|
@@ -39,9 +39,9 @@ grep -c '^\- \[ \]' IMPLEMENTATION_PLAN.md 2>/dev/null || echo "0"
|
|
|
39
39
|
|
|
40
40
|
## Pre-flight Checks
|
|
41
41
|
|
|
42
|
-
1. Verify IMPLEMENTATION_PLAN.md exists
|
|
43
|
-
2. Verify specs/ directory has files
|
|
44
|
-
3. Verify AGENTS.md has test commands
|
|
42
|
+
1. Verify .golem/IMPLEMENTATION_PLAN.md exists
|
|
43
|
+
2. Verify .golem/specs/ directory has files
|
|
44
|
+
3. Verify .golem/AGENTS.md has test commands
|
|
45
45
|
4. Check for remaining tasks
|
|
46
46
|
|
|
47
47
|
If missing prerequisites, instruct user to run appropriate command first.
|
|
@@ -51,7 +51,7 @@ If missing prerequisites, instruct user to run appropriate command first.
|
|
|
51
51
|
For each iteration:
|
|
52
52
|
|
|
53
53
|
### 1. Orient
|
|
54
|
-
- Read the current IMPLEMENTATION_PLAN.md
|
|
54
|
+
- Read the current .golem/IMPLEMENTATION_PLAN.md
|
|
55
55
|
- Review relevant specs for context
|
|
56
56
|
|
|
57
57
|
### 2. Select Task
|
|
@@ -71,17 +71,17 @@ For each iteration:
|
|
|
71
71
|
- Keep changes minimal and focused
|
|
72
72
|
|
|
73
73
|
### 5. Validate (Backpressure)
|
|
74
|
-
Run ALL gates from AGENTS.md. ALL must pass:
|
|
74
|
+
Run ALL gates from .golem/AGENTS.md. ALL must pass:
|
|
75
75
|
|
|
76
76
|
```bash
|
|
77
77
|
# Run test command
|
|
78
|
-
{test_command from AGENTS.md}
|
|
78
|
+
{test_command from .golem/AGENTS.md}
|
|
79
79
|
|
|
80
80
|
# Run typecheck if configured
|
|
81
|
-
{typecheck_command from AGENTS.md}
|
|
81
|
+
{typecheck_command from .golem/AGENTS.md}
|
|
82
82
|
|
|
83
83
|
# Run lint if configured
|
|
84
|
-
{lint_command from AGENTS.md}
|
|
84
|
+
{lint_command from .golem/AGENTS.md}
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
If any gate fails:
|
|
@@ -103,7 +103,7 @@ Use the code-simplifier agent principles:
|
|
|
103
103
|
Then re-run tests to confirm no regressions.
|
|
104
104
|
|
|
105
105
|
### 7. Update Plan
|
|
106
|
-
Edit
|
|
106
|
+
Edit `.golem/IMPLEMENTATION_PLAN.md`:
|
|
107
107
|
- Change `[ ]` to `[x]` for completed task
|
|
108
108
|
- Update status counts
|
|
109
109
|
- Add notes about discoveries
|
package/commands/golem/help.md
CHANGED
|
@@ -33,7 +33,7 @@ WORKFLOW
|
|
|
33
33
|
|
|
34
34
|
1. /golem:spec Define requirements through conversation
|
|
35
35
|
2. exit claude
|
|
36
|
-
3. golem run plan Generate IMPLEMENTATION_PLAN.md (headless)
|
|
36
|
+
3. golem run plan Generate .golem/IMPLEMENTATION_PLAN.md (headless)
|
|
37
37
|
4. golem run build Start autonomous coding loop (headless)
|
|
38
38
|
|
|
39
39
|
Each build iteration:
|
|
@@ -43,12 +43,12 @@ Each build iteration:
|
|
|
43
43
|
• Simplifies code
|
|
44
44
|
• Commits and loops
|
|
45
45
|
|
|
46
|
-
FILES
|
|
46
|
+
FILES (all in .golem/ directory)
|
|
47
47
|
|
|
48
|
-
specs/ Requirement files (one per topic)
|
|
49
|
-
AGENTS.md Operational commands (test, build, lint)
|
|
50
|
-
IMPLEMENTATION_PLAN.md Task list with priorities
|
|
51
|
-
.golem/
|
|
48
|
+
.golem/specs/ Requirement files (one per topic)
|
|
49
|
+
.golem/AGENTS.md Operational commands (test, build, lint)
|
|
50
|
+
.golem/IMPLEMENTATION_PLAN.md Task list with priorities
|
|
51
|
+
.golem/prompts/ Configuration and prompts
|
|
52
52
|
|
|
53
53
|
CLI USAGE (outside Claude)
|
|
54
54
|
|
package/commands/golem/plan.md
CHANGED
|
@@ -5,7 +5,7 @@ allowed-tools: [Read, Write, Glob, Grep, Bash]
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<objective>
|
|
8
|
-
Analyze specs versus existing code and create/update IMPLEMENTATION_PLAN.md with prioritized tasks.
|
|
8
|
+
Analyze specs versus existing code and create/update .golem/IMPLEMENTATION_PLAN.md with prioritized tasks.
|
|
9
9
|
</objective>
|
|
10
10
|
|
|
11
11
|
<execution_context>
|
|
@@ -15,17 +15,17 @@ Analyze specs versus existing code and create/update IMPLEMENTATION_PLAN.md with
|
|
|
15
15
|
<context>
|
|
16
16
|
Load all specs:
|
|
17
17
|
```bash
|
|
18
|
-
for f in specs/*.md; do echo "=== $f ==="; cat "$f"; echo; done 2>/dev/null || echo "No specs found - run /golem:spec first"
|
|
18
|
+
for f in .golem/specs/*.md; do echo "=== $f ==="; cat "$f"; echo; done 2>/dev/null || echo "No specs found - run /golem:spec first"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Load operational guide:
|
|
22
22
|
```bash
|
|
23
|
-
cat AGENTS.md 2>/dev/null || echo "No AGENTS.md found"
|
|
23
|
+
cat .golem/AGENTS.md 2>/dev/null || echo "No AGENTS.md found"
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
Existing plan (if any):
|
|
27
27
|
```bash
|
|
28
|
-
cat IMPLEMENTATION_PLAN.md 2>/dev/null || echo "No existing plan"
|
|
28
|
+
cat .golem/IMPLEMENTATION_PLAN.md 2>/dev/null || echo "No existing plan"
|
|
29
29
|
```
|
|
30
30
|
</context>
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ cat IMPLEMENTATION_PLAN.md 2>/dev/null || echo "No existing plan"
|
|
|
33
33
|
|
|
34
34
|
## 1. Read All Specs
|
|
35
35
|
|
|
36
|
-
Read each file in
|
|
36
|
+
Read each file in `.golem/specs/` completely. Extract:
|
|
37
37
|
- Concrete requirements (must have, should have)
|
|
38
38
|
- Acceptance criteria
|
|
39
39
|
- Technical constraints
|
|
@@ -76,13 +76,13 @@ Order tasks by:
|
|
|
76
76
|
|
|
77
77
|
## 6. Write Plan
|
|
78
78
|
|
|
79
|
-
Create or update
|
|
79
|
+
Create or update `.golem/IMPLEMENTATION_PLAN.md`:
|
|
80
80
|
|
|
81
81
|
```markdown
|
|
82
82
|
# Implementation Plan
|
|
83
83
|
|
|
84
84
|
Generated: {ISO timestamp}
|
|
85
|
-
Based on: specs/*.md
|
|
85
|
+
Based on: .golem/specs/*.md
|
|
86
86
|
|
|
87
87
|
## Status
|
|
88
88
|
- Total tasks: N
|
|
@@ -112,14 +112,14 @@ Notes: {notes}
|
|
|
112
112
|
- [ ] Gap analysis completed
|
|
113
113
|
- [ ] Tasks are atomic and testable
|
|
114
114
|
- [ ] Dependencies mapped correctly
|
|
115
|
-
- [ ] IMPLEMENTATION_PLAN.md written
|
|
115
|
+
- [ ] .golem/IMPLEMENTATION_PLAN.md written
|
|
116
116
|
- [ ] No code changes made (planning only)
|
|
117
117
|
</success_criteria>
|
|
118
118
|
|
|
119
119
|
<important>
|
|
120
120
|
- Do NOT implement anything in planning mode
|
|
121
121
|
- Do NOT modify source code
|
|
122
|
-
- ONLY create/update IMPLEMENTATION_PLAN.md
|
|
122
|
+
- ONLY create/update .golem/IMPLEMENTATION_PLAN.md
|
|
123
123
|
- Be thorough - missing tasks cause problems later
|
|
124
124
|
- Tasks should be achievable in one iteration
|
|
125
125
|
</important>
|
package/commands/golem/status.md
CHANGED
|
@@ -21,23 +21,23 @@ echo ""
|
|
|
21
21
|
# Specs
|
|
22
22
|
echo "SPECS"
|
|
23
23
|
echo "─────"
|
|
24
|
-
if [ -d "specs" ]; then
|
|
25
|
-
count=$(ls -1 specs/*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
24
|
+
if [ -d ".golem/specs" ]; then
|
|
25
|
+
count=$(ls -1 .golem/specs/*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
26
26
|
echo " Files: $count"
|
|
27
|
-
for f in specs/*.md; do
|
|
27
|
+
for f in .golem/specs/*.md; do
|
|
28
28
|
[ -f "$f" ] && echo " • $(basename "$f" .md)"
|
|
29
29
|
done
|
|
30
30
|
else
|
|
31
|
-
echo " No specs/ directory - run /golem:spec"
|
|
31
|
+
echo " No .golem/specs/ directory - run /golem:spec"
|
|
32
32
|
fi
|
|
33
33
|
echo ""
|
|
34
34
|
|
|
35
35
|
# Plan
|
|
36
36
|
echo "IMPLEMENTATION PLAN"
|
|
37
37
|
echo "───────────────────"
|
|
38
|
-
if [ -f "IMPLEMENTATION_PLAN.md" ]; then
|
|
39
|
-
total=$(grep -c '^\- \[' IMPLEMENTATION_PLAN.md 2>/dev/null || echo "0")
|
|
40
|
-
done=$(grep -c '^\- \[x\]' IMPLEMENTATION_PLAN.md 2>/dev/null || echo "0")
|
|
38
|
+
if [ -f ".golem/IMPLEMENTATION_PLAN.md" ]; then
|
|
39
|
+
total=$(grep -c '^\- \[' .golem/IMPLEMENTATION_PLAN.md 2>/dev/null || echo "0")
|
|
40
|
+
done=$(grep -c '^\- \[x\]' .golem/IMPLEMENTATION_PLAN.md 2>/dev/null || echo "0")
|
|
41
41
|
remaining=$((total - done))
|
|
42
42
|
pct=$((done * 100 / (total > 0 ? total : 1)))
|
|
43
43
|
|
|
@@ -49,7 +49,7 @@ if [ -f "IMPLEMENTATION_PLAN.md" ]; then
|
|
|
49
49
|
|
|
50
50
|
# Show next few tasks
|
|
51
51
|
echo " Next tasks:"
|
|
52
|
-
grep '^\- \[ \]' IMPLEMENTATION_PLAN.md 2>/dev/null | head -3 | while read line; do
|
|
52
|
+
grep '^\- \[ \]' .golem/IMPLEMENTATION_PLAN.md 2>/dev/null | head -3 | while read line; do
|
|
53
53
|
echo " $line"
|
|
54
54
|
done
|
|
55
55
|
else
|
|
@@ -60,12 +60,12 @@ echo ""
|
|
|
60
60
|
# AGENTS.md
|
|
61
61
|
echo "OPERATIONAL GUIDE"
|
|
62
62
|
echo "─────────────────"
|
|
63
|
-
if [ -f "AGENTS.md" ]; then
|
|
64
|
-
echo " ✓ AGENTS.md exists"
|
|
65
|
-
test_cmd=$(grep -A1 '### Testing' AGENTS.md 2>/dev/null | tail -1 | tr -d '`')
|
|
63
|
+
if [ -f ".golem/AGENTS.md" ]; then
|
|
64
|
+
echo " ✓ .golem/AGENTS.md exists"
|
|
65
|
+
test_cmd=$(grep -A1 '### Testing' .golem/AGENTS.md 2>/dev/null | tail -1 | tr -d '`')
|
|
66
66
|
[ -n "$test_cmd" ] && echo " Test: $test_cmd"
|
|
67
67
|
else
|
|
68
|
-
echo " No AGENTS.md - run /golem:spec"
|
|
68
|
+
echo " No .golem/AGENTS.md - run /golem:spec"
|
|
69
69
|
fi
|
|
70
70
|
echo ""
|
|
71
71
|
|
|
@@ -41,7 +41,7 @@ You simplify code and create a single, well-documented commit that covers both t
|
|
|
41
41
|
- `*.test.ts`, `*.spec.ts` - test files
|
|
42
42
|
- `*.d.ts` - type definitions
|
|
43
43
|
- `*.config.*` - configuration
|
|
44
|
-
-
|
|
44
|
+
- `.golem/IMPLEMENTATION_PLAN.md` - just stage it, don't simplify
|
|
45
45
|
|
|
46
46
|
## Commit Message Format
|
|
47
47
|
|
|
@@ -95,7 +95,7 @@ Simplified:
|
|
|
95
95
|
|
|
96
96
|
3. Run tests to verify:
|
|
97
97
|
```bash
|
|
98
|
-
{test_command from AGENTS.md}
|
|
98
|
+
{test_command from .golem/AGENTS.md}
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
4. Stage any simplification changes:
|
|
@@ -5,13 +5,13 @@ You are in BUILD MODE. Implement ONE task from the plan, then exit.
|
|
|
5
5
|
## Phase 0: Orient
|
|
6
6
|
|
|
7
7
|
Study these files to understand context:
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
8
|
+
- @.golem/specs/* - All specification files
|
|
9
|
+
- @.golem/AGENTS.md - Operational commands (test/build/lint)
|
|
10
|
+
- @.golem/IMPLEMENTATION_PLAN.md - Current task list
|
|
11
11
|
|
|
12
12
|
## Phase 1: Select Task
|
|
13
13
|
|
|
14
|
-
1. Read IMPLEMENTATION_PLAN.md
|
|
14
|
+
1. Read .golem/IMPLEMENTATION_PLAN.md
|
|
15
15
|
2. Pick the first incomplete task (marked `- [ ]`)
|
|
16
16
|
3. Do NOT assume something is not implemented - search first
|
|
17
17
|
|
|
@@ -24,7 +24,7 @@ Study these files to understand context:
|
|
|
24
24
|
|
|
25
25
|
## Phase 3: Validate (Backpressure)
|
|
26
26
|
|
|
27
|
-
Run commands from AGENTS.md in order. ALL must pass:
|
|
27
|
+
Run commands from .golem/AGENTS.md in order. ALL must pass:
|
|
28
28
|
1. Tests
|
|
29
29
|
2. Type check (if configured)
|
|
30
30
|
3. Lint (if configured)
|
|
@@ -33,8 +33,8 @@ If ANY fails: fix the issue, then re-run ALL validation from the beginning.
|
|
|
33
33
|
|
|
34
34
|
## Phase 4: Complete
|
|
35
35
|
|
|
36
|
-
1. Update IMPLEMENTATION_PLAN.md - mark task `- [x]`
|
|
37
|
-
2. Update AGENTS.md learnings if you discovered something useful
|
|
36
|
+
1. Update .golem/IMPLEMENTATION_PLAN.md - mark task `- [x]`
|
|
37
|
+
2. Update .golem/AGENTS.md learnings if you discovered something useful
|
|
38
38
|
3. Commit changes with descriptive message
|
|
39
39
|
4. Exit
|
|
40
40
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Planning Mode
|
|
2
2
|
|
|
3
|
-
You are in PLANNING MODE. Analyze specs vs existing code and create IMPLEMENTATION_PLAN.md.
|
|
3
|
+
You are in PLANNING MODE. Analyze specs vs existing code and create .golem/IMPLEMENTATION_PLAN.md.
|
|
4
4
|
|
|
5
5
|
## Phase 0: Orient
|
|
6
6
|
|
|
7
7
|
Study these files first:
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
8
|
+
- @.golem/specs/* - All specification files
|
|
9
|
+
- @.golem/AGENTS.md - Operational commands
|
|
10
|
+
- @.golem/IMPLEMENTATION_PLAN.md - Current plan (if exists)
|
|
11
11
|
|
|
12
12
|
## Phase 1: Gap Analysis
|
|
13
13
|
|
|
@@ -19,7 +19,7 @@ Study these files first:
|
|
|
19
19
|
|
|
20
20
|
## Phase 2: Create Plan
|
|
21
21
|
|
|
22
|
-
Write
|
|
22
|
+
Write `.golem/IMPLEMENTATION_PLAN.md` with prioritized tasks:
|
|
23
23
|
|
|
24
24
|
```markdown
|
|
25
25
|
# Implementation Plan
|