golem-cc 2.1.2 → 3.0.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/.claude/commands/golem/build.md +18 -0
- package/.claude/commands/golem/config.md +39 -0
- package/.claude/commands/golem/continue.md +73 -0
- package/.claude/commands/golem/doctor.md +46 -0
- package/.claude/commands/golem/document.md +138 -0
- package/.claude/commands/golem/help.md +58 -0
- package/.claude/commands/golem/pause.md +130 -0
- package/.claude/commands/golem/plan.md +111 -0
- package/.claude/commands/golem/review.md +166 -0
- package/.claude/commands/golem/security.md +186 -0
- package/.claude/commands/golem/simplify.md +76 -0
- package/.claude/commands/golem/spec.md +105 -0
- package/.claude/commands/golem/status.md +33 -0
- package/.golem/agents/code-simplifier.md +54 -0
- package/.golem/agents/review-architecture.md +59 -0
- package/.golem/agents/review-logic.md +50 -0
- package/.golem/agents/review-security.md +50 -0
- package/.golem/agents/review-style.md +48 -0
- package/.golem/agents/review-tests.md +48 -0
- package/.golem/agents/spec-builder.md +60 -0
- package/.golem/bin/golem.mjs +270 -0
- package/.golem/lib/build.mjs +557 -0
- package/.golem/lib/claude.mjs +95 -0
- package/.golem/lib/config.mjs +421 -0
- package/.golem/lib/display.mjs +191 -0
- package/.golem/lib/doctor.mjs +197 -0
- package/.golem/lib/document.mjs +792 -0
- package/.golem/lib/gates.mjs +78 -0
- package/.golem/lib/init.mjs +166 -0
- package/.golem/lib/output.mjs +40 -0
- package/.golem/lib/ratelimit.mjs +86 -0
- package/.golem/lib/security.mjs +603 -0
- package/.golem/lib/simplify.mjs +101 -0
- package/.golem/lib/tui.mjs +368 -0
- package/.golem/lib/usage.mjs +119 -0
- package/.golem/lib/worktree.mjs +509 -0
- package/.golem/prompts/build.md +23 -0
- package/.golem/prompts/document-inline.md +66 -0
- package/.golem/prompts/document-markdown.md +80 -0
- package/.golem/prompts/simplify.md +35 -0
- package/README.md +141 -142
- package/bin/golem-shim.mjs +36 -0
- package/bin/install.mjs +193 -0
- package/package.json +27 -32
- package/.env.example +0 -17
- package/bin/golem +0 -1040
- package/commands/golem/build.md +0 -235
- package/commands/golem/config.md +0 -55
- package/commands/golem/doctor.md +0 -137
- package/commands/golem/help.md +0 -212
- package/commands/golem/plan.md +0 -214
- package/commands/golem/review.md +0 -376
- package/commands/golem/security.md +0 -204
- package/commands/golem/simplify.md +0 -94
- package/commands/golem/spec.md +0 -226
- package/commands/golem/status.md +0 -60
- package/dist/api/freshworks.d.ts +0 -61
- package/dist/api/freshworks.d.ts.map +0 -1
- package/dist/api/freshworks.js +0 -119
- package/dist/api/freshworks.js.map +0 -1
- package/dist/api/gitea.d.ts +0 -96
- package/dist/api/gitea.d.ts.map +0 -1
- package/dist/api/gitea.js +0 -154
- package/dist/api/gitea.js.map +0 -1
- package/dist/cli/index.d.ts +0 -9
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -352
- package/dist/cli/index.js.map +0 -1
- package/dist/sync/ticket-sync.d.ts +0 -53
- package/dist/sync/ticket-sync.d.ts.map +0 -1
- package/dist/sync/ticket-sync.js +0 -226
- package/dist/sync/ticket-sync.js.map +0 -1
- package/dist/types.d.ts +0 -125
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -5
- package/dist/types.js.map +0 -1
- package/dist/worktree/manager.d.ts +0 -54
- package/dist/worktree/manager.d.ts.map +0 -1
- package/dist/worktree/manager.js +0 -190
- package/dist/worktree/manager.js.map +0 -1
- package/golem/agents/code-simplifier.md +0 -81
- package/golem/agents/spec-builder.md +0 -90
- package/golem/prompts/PROMPT_build.md +0 -71
- package/golem/prompts/PROMPT_plan.md +0 -102
package/commands/golem/build.md
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: golem:build
|
|
3
|
-
description: Run autonomous build loop with observability
|
|
4
|
-
allowed-tools: [Read, Write, Edit, Glob, Grep, Bash, Task]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<objective>
|
|
8
|
-
Act as a build lead that orchestrates sequential builder teammates. Each task gets its own builder with fresh context. You coordinate the work, track progress, and handle issues. The user can observe progress and intervene when needed.
|
|
9
|
-
</objective>
|
|
10
|
-
|
|
11
|
-
<execution_context>
|
|
12
|
-
@~/.golem/prompts/PROMPT_build.md
|
|
13
|
-
@~/.golem/agents/code-simplifier.md
|
|
14
|
-
</execution_context>
|
|
15
|
-
|
|
16
|
-
<context>
|
|
17
|
-
Current ticket:
|
|
18
|
-
```bash
|
|
19
|
-
TICKET_ID=$(basename "$(pwd)" | grep -oE '(INC|SR)-[0-9]+' || echo "")
|
|
20
|
-
if [ -n "$TICKET_ID" ]; then
|
|
21
|
-
cat .golem/tickets/$TICKET_ID.yaml 2>/dev/null
|
|
22
|
-
fi
|
|
23
|
-
echo "TICKET_ID=$TICKET_ID"
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Load specs:
|
|
27
|
-
```bash
|
|
28
|
-
for f in .golem/specs/*.md; do echo "=== $f ==="; cat "$f"; echo; done 2>/dev/null
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Load operational guide:
|
|
32
|
-
```bash
|
|
33
|
-
cat .golem/AGENTS.md 2>/dev/null || echo "No AGENTS.md - run /golem:spec first"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Load implementation plan:
|
|
37
|
-
```bash
|
|
38
|
-
cat .golem/IMPLEMENTATION_PLAN.md 2>/dev/null || echo "No plan - run /golem:plan first"
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Check remaining tasks:
|
|
42
|
-
```bash
|
|
43
|
-
echo "Remaining tasks:"
|
|
44
|
-
grep -c '^\- \[ \]' .golem/IMPLEMENTATION_PLAN.md 2>/dev/null || echo "0"
|
|
45
|
-
echo ""
|
|
46
|
-
echo "Completed tasks:"
|
|
47
|
-
grep -c '^\- \[x\]' .golem/IMPLEMENTATION_PLAN.md 2>/dev/null || echo "0"
|
|
48
|
-
```
|
|
49
|
-
</context>
|
|
50
|
-
|
|
51
|
-
<process>
|
|
52
|
-
|
|
53
|
-
## Pre-flight Checks
|
|
54
|
-
|
|
55
|
-
1. Verify .golem/IMPLEMENTATION_PLAN.md exists
|
|
56
|
-
2. Verify .golem/specs/ directory has files
|
|
57
|
-
3. Verify .golem/AGENTS.md has test commands
|
|
58
|
-
4. Check for remaining tasks
|
|
59
|
-
|
|
60
|
-
If missing prerequisites, instruct user to run appropriate command first.
|
|
61
|
-
|
|
62
|
-
## Build Lead Role
|
|
63
|
-
|
|
64
|
-
You are the **build lead**. Your job is to:
|
|
65
|
-
- Track overall progress through the implementation plan
|
|
66
|
-
- Spawn builder teammates for each task (one at a time, fresh context)
|
|
67
|
-
- Monitor builder progress and relay status to the user
|
|
68
|
-
- Handle failures and blocked tasks
|
|
69
|
-
- Squash commits when a stage completes
|
|
70
|
-
- Keep the user informed so they can intervene if needed
|
|
71
|
-
|
|
72
|
-
You do NOT implement tasks yourself. You delegate to builders.
|
|
73
|
-
|
|
74
|
-
## The Build Loop
|
|
75
|
-
|
|
76
|
-
For each task in the current stage:
|
|
77
|
-
|
|
78
|
-
### 1. Identify Next Task
|
|
79
|
-
|
|
80
|
-
Read .golem/IMPLEMENTATION_PLAN.md and find the first incomplete task (`- [ ]`).
|
|
81
|
-
|
|
82
|
-
Announce to the user:
|
|
83
|
-
```
|
|
84
|
-
=== Task {N.M}: {task title} ===
|
|
85
|
-
Files: {expected files}
|
|
86
|
-
Spawning builder...
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### 2. Spawn Builder Teammate
|
|
90
|
-
|
|
91
|
-
Create a builder teammate for this specific task:
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
Spawn a builder teammate with this prompt:
|
|
95
|
-
|
|
96
|
-
"You are a builder. Complete this ONE task, then shut down.
|
|
97
|
-
|
|
98
|
-
TASK: {task title}
|
|
99
|
-
FILES: {expected files}
|
|
100
|
-
NOTES: {implementation hints from plan}
|
|
101
|
-
TESTS: {what tests verify this}
|
|
102
|
-
|
|
103
|
-
WORKFLOW:
|
|
104
|
-
1. Write tests first (red phase)
|
|
105
|
-
2. Implement minimum code to pass tests (green phase)
|
|
106
|
-
3. Run validation gates from .golem/AGENTS.md
|
|
107
|
-
4. If gates fail: fix and retry (up to 3 attempts)
|
|
108
|
-
5. Simplify code (remove comments, flatten logic, improve names)
|
|
109
|
-
6. Re-run validation after simplification
|
|
110
|
-
7. Report back: SUCCESS or BLOCKED with reason
|
|
111
|
-
|
|
112
|
-
DO NOT commit. The lead handles commits.
|
|
113
|
-
DO NOT modify the implementation plan. The lead handles that.
|
|
114
|
-
|
|
115
|
-
If you get stuck (DB not running, missing dependency, unclear requirement),
|
|
116
|
-
report BLOCKED immediately with a clear explanation. Do not retry forever."
|
|
117
|
-
|
|
118
|
-
Require plan approval before implementation.
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
### 3. Monitor Builder
|
|
122
|
-
|
|
123
|
-
Watch the builder's progress. The user can see this too.
|
|
124
|
-
|
|
125
|
-
**If builder reports SUCCESS:**
|
|
126
|
-
- Mark task complete in .golem/IMPLEMENTATION_PLAN.md
|
|
127
|
-
- Create atomic commit:
|
|
128
|
-
```bash
|
|
129
|
-
git add -A
|
|
130
|
-
git commit -m "wip: {brief task description}"
|
|
131
|
-
```
|
|
132
|
-
- Announce: `✓ Task {N.M} complete`
|
|
133
|
-
- Shut down the builder
|
|
134
|
-
- Continue to next task
|
|
135
|
-
|
|
136
|
-
**If builder reports BLOCKED:**
|
|
137
|
-
- Announce to user:
|
|
138
|
-
```
|
|
139
|
-
⚠ Task {N.M} BLOCKED
|
|
140
|
-
Reason: {builder's explanation}
|
|
141
|
-
|
|
142
|
-
Options:
|
|
143
|
-
1. I can skip this task and continue
|
|
144
|
-
2. You can provide guidance and I'll retry
|
|
145
|
-
3. You can fix the issue and tell me to retry
|
|
146
|
-
```
|
|
147
|
-
- Wait for user input before proceeding
|
|
148
|
-
- Do NOT auto-retry blocked tasks
|
|
149
|
-
|
|
150
|
-
**If builder is struggling (3+ failed attempts):**
|
|
151
|
-
- Message the builder: "What's blocking you?"
|
|
152
|
-
- Relay the answer to the user
|
|
153
|
-
- Ask user how to proceed
|
|
154
|
-
|
|
155
|
-
### 4. Stage Completion
|
|
156
|
-
|
|
157
|
-
When all tasks in a stage are marked `[x]`:
|
|
158
|
-
|
|
159
|
-
1. Announce: `=== Stage {N} Complete ===`
|
|
160
|
-
|
|
161
|
-
2. Squash all wip commits:
|
|
162
|
-
```bash
|
|
163
|
-
golem-api git:squash "{TICKET_ID}" -m "{stage commit message from plan}"
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
3. Update ticket status:
|
|
167
|
-
```bash
|
|
168
|
-
golem-api ticket:status "{TICKET_ID}" in-progress --note "Stage {N} complete: {stage name}"
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
4. If more stages remain: announce and continue
|
|
172
|
-
5. If all stages complete: proceed to completion
|
|
173
|
-
|
|
174
|
-
### 5. Overall Completion
|
|
175
|
-
|
|
176
|
-
When all stages are complete:
|
|
177
|
-
```
|
|
178
|
-
=== BUILD COMPLETE ===
|
|
179
|
-
|
|
180
|
-
All {N} stages complete.
|
|
181
|
-
Ticket: {TICKET_ID}
|
|
182
|
-
|
|
183
|
-
Next steps:
|
|
184
|
-
1. Run /golem:review for code review
|
|
185
|
-
2. Run golem pr to create pull request
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
Update ticket status to "review".
|
|
189
|
-
|
|
190
|
-
</process>
|
|
191
|
-
|
|
192
|
-
<user_controls>
|
|
193
|
-
|
|
194
|
-
The user can intervene at any time:
|
|
195
|
-
|
|
196
|
-
- **"skip"** - Skip the current blocked task, continue to next
|
|
197
|
-
- **"retry"** - Tell the current builder to try again
|
|
198
|
-
- **"stop"** - Stop the build loop, keep progress
|
|
199
|
-
- **"status"** - Show current progress summary
|
|
200
|
-
- **Message the builder directly** - Use Shift+Up/Down to select and message
|
|
201
|
-
|
|
202
|
-
As lead, relay these commands appropriately and keep the user informed.
|
|
203
|
-
|
|
204
|
-
</user_controls>
|
|
205
|
-
|
|
206
|
-
<success_criteria>
|
|
207
|
-
For each task:
|
|
208
|
-
- [ ] Builder spawned with fresh context
|
|
209
|
-
- [ ] Tests written first
|
|
210
|
-
- [ ] Implementation complete
|
|
211
|
-
- [ ] All gates passing
|
|
212
|
-
- [ ] Code simplified
|
|
213
|
-
- [ ] Atomic commit created
|
|
214
|
-
- [ ] Builder shut down
|
|
215
|
-
|
|
216
|
-
For each stage:
|
|
217
|
-
- [ ] All tasks complete
|
|
218
|
-
- [ ] Commits squashed
|
|
219
|
-
- [ ] Ticket status updated
|
|
220
|
-
|
|
221
|
-
Overall:
|
|
222
|
-
- [ ] User can observe progress
|
|
223
|
-
- [ ] User can intervene when needed
|
|
224
|
-
- [ ] Blocked tasks surfaced immediately
|
|
225
|
-
</success_criteria>
|
|
226
|
-
|
|
227
|
-
<important>
|
|
228
|
-
- You are the LEAD, not the implementer - delegate to builders
|
|
229
|
-
- Each builder gets ONE task, then shuts down (fresh context)
|
|
230
|
-
- Surface blockers immediately - don't let builders spin
|
|
231
|
-
- Keep the user informed at every step
|
|
232
|
-
- The user can always intervene - that's the point
|
|
233
|
-
- Builders should NOT commit or modify the plan
|
|
234
|
-
- YOU handle commits, plan updates, and squashing
|
|
235
|
-
</important>
|
package/commands/golem/config.md
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: golem:config
|
|
3
|
-
description: Show current configuration
|
|
4
|
-
allowed-tools: [Read, Bash]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<objective>
|
|
8
|
-
Display current golem configuration - paths, environment files, and environment variables.
|
|
9
|
-
</objective>
|
|
10
|
-
|
|
11
|
-
<context>
|
|
12
|
-
Paths:
|
|
13
|
-
```bash
|
|
14
|
-
echo "=== Paths ==="
|
|
15
|
-
echo "GOLEM_HOME: ${GOLEM_HOME:-$HOME/.golem}"
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Environment files:
|
|
19
|
-
```bash
|
|
20
|
-
echo ""
|
|
21
|
-
echo "=== Environment Files ==="
|
|
22
|
-
GOLEM_HOME="${GOLEM_HOME:-$HOME/.golem}"
|
|
23
|
-
[[ -f "$GOLEM_HOME/.env" ]] && echo "✓ $GOLEM_HOME/.env" || echo "✗ $GOLEM_HOME/.env (not found)"
|
|
24
|
-
[[ -f ".env" ]] && echo "✓ ./.env (local)" || echo " ./.env (not found)"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Load and display variables:
|
|
28
|
-
```bash
|
|
29
|
-
echo ""
|
|
30
|
-
echo "=== Freshservice ==="
|
|
31
|
-
GOLEM_HOME="${GOLEM_HOME:-$HOME/.golem}"
|
|
32
|
-
[[ -f "$GOLEM_HOME/.env" ]] && source "$GOLEM_HOME/.env"
|
|
33
|
-
[[ -f ".env" ]] && source ".env"
|
|
34
|
-
|
|
35
|
-
echo "FRESH_DOMAIN: ${FRESH_DOMAIN:-(not set)}"
|
|
36
|
-
[[ -n "${FRESH_API_KEY:-}" ]] && echo "FRESH_API_KEY: (set)" || echo "FRESH_API_KEY: (not set) - REQUIRED"
|
|
37
|
-
echo "FRESH_DEFAULT_GROUP_ID: ${FRESH_DEFAULT_GROUP_ID:-(not set)}"
|
|
38
|
-
echo "FRESH_DEFAULT_CATEGORY: ${FRESH_DEFAULT_CATEGORY:-(not set)}"
|
|
39
|
-
echo "FRESH_SOURCE_ID: ${FRESH_SOURCE_ID:-(not set)}"
|
|
40
|
-
echo "FRESH_DEFAULT_EMAIL: ${FRESH_DEFAULT_EMAIL:-(not set)}"
|
|
41
|
-
|
|
42
|
-
echo ""
|
|
43
|
-
echo "=== Gitea ==="
|
|
44
|
-
echo "GITEA_URL: ${GITEA_URL:-(not set)}"
|
|
45
|
-
[[ -n "${GITEA_TOKEN:-}" ]] && echo "GITEA_TOKEN: (set)" || echo "GITEA_TOKEN: (not set) - REQUIRED"
|
|
46
|
-
echo "GITEA_ORG: ${GITEA_ORG:-(not set)}"
|
|
47
|
-
echo "GITEA_REPO: ${GITEA_REPO:-(not set)}"
|
|
48
|
-
```
|
|
49
|
-
</context>
|
|
50
|
-
|
|
51
|
-
<process>
|
|
52
|
-
1. Display all configuration context
|
|
53
|
-
2. Highlight any missing required variables
|
|
54
|
-
3. Note: Use `golem doctor` for connectivity tests
|
|
55
|
-
</process>
|
package/commands/golem/doctor.md
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: golem:doctor
|
|
3
|
-
description: Diagnose setup issues
|
|
4
|
-
allowed-tools: [Bash]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<objective>
|
|
8
|
-
Run diagnostic checks on golem installation and report any issues with suggested fixes.
|
|
9
|
-
</objective>
|
|
10
|
-
|
|
11
|
-
<context>
|
|
12
|
-
Run doctor checks:
|
|
13
|
-
```bash
|
|
14
|
-
GOLEM_HOME="${GOLEM_HOME:-$HOME/.golem}"
|
|
15
|
-
[[ -f "$GOLEM_HOME/.env" ]] && source "$GOLEM_HOME/.env"
|
|
16
|
-
[[ -f ".env" ]] && source ".env"
|
|
17
|
-
|
|
18
|
-
passed=0
|
|
19
|
-
failed=0
|
|
20
|
-
|
|
21
|
-
echo "=== Environment ==="
|
|
22
|
-
if [[ -d "$GOLEM_HOME" ]]; then
|
|
23
|
-
echo "✓ $GOLEM_HOME directory exists"
|
|
24
|
-
passed=$((passed + 1))
|
|
25
|
-
else
|
|
26
|
-
echo "✗ $GOLEM_HOME directory missing"
|
|
27
|
-
echo " → Run: mkdir -p $GOLEM_HOME"
|
|
28
|
-
failed=$((failed + 1))
|
|
29
|
-
fi
|
|
30
|
-
|
|
31
|
-
if [[ -f "$GOLEM_HOME/.env" ]]; then
|
|
32
|
-
echo "✓ $GOLEM_HOME/.env file exists"
|
|
33
|
-
passed=$((passed + 1))
|
|
34
|
-
else
|
|
35
|
-
echo "✗ $GOLEM_HOME/.env file missing"
|
|
36
|
-
echo " → Create and configure $GOLEM_HOME/.env"
|
|
37
|
-
failed=$((failed + 1))
|
|
38
|
-
fi
|
|
39
|
-
|
|
40
|
-
missing_vars=""
|
|
41
|
-
[[ -z "${FRESH_DOMAIN:-}" ]] && missing_vars="$missing_vars FRESH_DOMAIN"
|
|
42
|
-
[[ -z "${FRESH_API_KEY:-}" ]] && missing_vars="$missing_vars FRESH_API_KEY"
|
|
43
|
-
[[ -z "${GITEA_URL:-}" ]] && missing_vars="$missing_vars GITEA_URL"
|
|
44
|
-
[[ -z "${GITEA_TOKEN:-}" ]] && missing_vars="$missing_vars GITEA_TOKEN"
|
|
45
|
-
|
|
46
|
-
if [[ -z "$missing_vars" ]]; then
|
|
47
|
-
echo "✓ Required env vars set"
|
|
48
|
-
passed=$((passed + 1))
|
|
49
|
-
else
|
|
50
|
-
echo "✗ Missing required env vars:$missing_vars"
|
|
51
|
-
echo " → Edit $GOLEM_HOME/.env"
|
|
52
|
-
failed=$((failed + 1))
|
|
53
|
-
fi
|
|
54
|
-
|
|
55
|
-
echo ""
|
|
56
|
-
echo "=== Dependencies ==="
|
|
57
|
-
if command -v node &>/dev/null; then
|
|
58
|
-
echo "✓ node $(node --version)"
|
|
59
|
-
passed=$((passed + 1))
|
|
60
|
-
else
|
|
61
|
-
echo "✗ node not found"
|
|
62
|
-
failed=$((failed + 1))
|
|
63
|
-
fi
|
|
64
|
-
|
|
65
|
-
if command -v pnpm &>/dev/null; then
|
|
66
|
-
echo "✓ pnpm $(pnpm --version)"
|
|
67
|
-
passed=$((passed + 1))
|
|
68
|
-
else
|
|
69
|
-
echo "✗ pnpm not found"
|
|
70
|
-
failed=$((failed + 1))
|
|
71
|
-
fi
|
|
72
|
-
|
|
73
|
-
if command -v git &>/dev/null; then
|
|
74
|
-
echo "✓ git $(git --version | cut -d' ' -f3)"
|
|
75
|
-
passed=$((passed + 1))
|
|
76
|
-
else
|
|
77
|
-
echo "✗ git not found"
|
|
78
|
-
failed=$((failed + 1))
|
|
79
|
-
fi
|
|
80
|
-
|
|
81
|
-
if command -v golem-api &>/dev/null; then
|
|
82
|
-
echo "✓ golem-api accessible"
|
|
83
|
-
passed=$((passed + 1))
|
|
84
|
-
else
|
|
85
|
-
echo "✗ golem-api not found"
|
|
86
|
-
echo " → Run: ./bin/install.sh in golem directory"
|
|
87
|
-
failed=$((failed + 1))
|
|
88
|
-
fi
|
|
89
|
-
|
|
90
|
-
echo ""
|
|
91
|
-
echo "=== Installation ==="
|
|
92
|
-
prompt_count=$(ls "$GOLEM_HOME/prompts/"*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
93
|
-
if [[ "$prompt_count" -gt 0 ]]; then
|
|
94
|
-
echo "✓ Prompts installed ($prompt_count files)"
|
|
95
|
-
passed=$((passed + 1))
|
|
96
|
-
else
|
|
97
|
-
echo "✗ No prompts installed"
|
|
98
|
-
failed=$((failed + 1))
|
|
99
|
-
fi
|
|
100
|
-
|
|
101
|
-
agent_count=$(ls "$GOLEM_HOME/agents/"*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
102
|
-
if [[ "$agent_count" -gt 0 ]]; then
|
|
103
|
-
echo "✓ Agents installed ($agent_count files)"
|
|
104
|
-
passed=$((passed + 1))
|
|
105
|
-
else
|
|
106
|
-
echo "✗ No agents installed"
|
|
107
|
-
failed=$((failed + 1))
|
|
108
|
-
fi
|
|
109
|
-
|
|
110
|
-
if [[ -d "$GOLEM_HOME/commands/golem" ]]; then
|
|
111
|
-
echo "✓ Commands installed"
|
|
112
|
-
passed=$((passed + 1))
|
|
113
|
-
else
|
|
114
|
-
echo "✗ Commands not installed"
|
|
115
|
-
failed=$((failed + 1))
|
|
116
|
-
fi
|
|
117
|
-
|
|
118
|
-
if [[ -L "$HOME/.claude/commands/golem" ]] && [[ -d "$HOME/.claude/commands/golem" ]]; then
|
|
119
|
-
echo "✓ Claude integration linked"
|
|
120
|
-
passed=$((passed + 1))
|
|
121
|
-
else
|
|
122
|
-
echo "✗ Claude integration not linked"
|
|
123
|
-
echo " → Run: ln -sf $GOLEM_HOME/commands/golem ~/.claude/commands/golem"
|
|
124
|
-
failed=$((failed + 1))
|
|
125
|
-
fi
|
|
126
|
-
|
|
127
|
-
echo ""
|
|
128
|
-
total=$((passed + failed))
|
|
129
|
-
echo "=== Summary: $passed/$total checks passed ==="
|
|
130
|
-
```
|
|
131
|
-
</context>
|
|
132
|
-
|
|
133
|
-
<process>
|
|
134
|
-
1. Run all diagnostic checks
|
|
135
|
-
2. Report any failures with suggested fixes
|
|
136
|
-
3. For API connectivity tests, suggest running `golem doctor --check-apis`
|
|
137
|
-
</process>
|
package/commands/golem/help.md
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: golem:help
|
|
3
|
-
description: Show all golem commands and usage
|
|
4
|
-
allowed-tools: []
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<objective>
|
|
8
|
-
Display help information for all golem commands.
|
|
9
|
-
</objective>
|
|
10
|
-
|
|
11
|
-
<response>
|
|
12
|
-
# Golem - Personal Workflow Manager
|
|
13
|
-
|
|
14
|
-
Golem integrates Freshworks tickets, Gitea issues, and local development into a unified workflow. Uses Claude Code agent teams for collaborative spec/plan/review phases.
|
|
15
|
-
|
|
16
|
-
## Commands
|
|
17
|
-
|
|
18
|
-
| Command | Description |
|
|
19
|
-
|---------|-------------|
|
|
20
|
-
| `/golem:spec` | Define specs with agent team (UX, Architect, Devil's Advocate) |
|
|
21
|
-
| `/golem:plan` | Create implementation plan with agent team (per-layer + Devil's Advocate) |
|
|
22
|
-
| `/golem:build` | Build lead + sequential builders (observable, interruptible) |
|
|
23
|
-
| `/golem:security` | Run automated security scans (gitleaks, semgrep, pnpm audit, trivy) |
|
|
24
|
-
| `/golem:review` | Security scans + code review agent team |
|
|
25
|
-
| `/golem:simplify` | Run code simplifier on files |
|
|
26
|
-
| `/golem:status` | Show current ticket/project status |
|
|
27
|
-
| `/golem:help` | Show this help |
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Default Workflow
|
|
32
|
-
|
|
33
|
-
### 1. Setup (CLI)
|
|
34
|
-
```bash
|
|
35
|
-
golem import INC-1234 # Import ticket from Freshservice
|
|
36
|
-
golem worktree # Create isolated worktree for this ticket
|
|
37
|
-
cd .golem/worktrees/INC-1234 # Enter the worktree
|
|
38
|
-
claude # Start Claude Code
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### 2. Spec Phase (`/golem:spec`)
|
|
42
|
-
|
|
43
|
-
Agent team explores requirements from multiple angles:
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
You: /golem:spec
|
|
47
|
-
|
|
48
|
-
[Agent team spawns]
|
|
49
|
-
├── UX Advocate: "Who are the users? What's the simplest solution?"
|
|
50
|
-
├── Architect: "What's the technical approach? What patterns fit?"
|
|
51
|
-
└── Devil's Advocate: "Do we need this? What's the simpler alternative?"
|
|
52
|
-
|
|
53
|
-
[Team debates and synthesizes]
|
|
54
|
-
|
|
55
|
-
Output:
|
|
56
|
-
├── .golem/specs/authentication.md
|
|
57
|
-
├── .golem/specs/validation.md
|
|
58
|
-
└── .golem/AGENTS.md (test/build/lint commands)
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### 3. Plan Phase (`/golem:plan`)
|
|
62
|
-
|
|
63
|
-
Agent team creates staged implementation plan:
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
You: /golem:plan
|
|
67
|
-
|
|
68
|
-
[Agent team spawns based on project layers]
|
|
69
|
-
├── Frontend Planner: "Component structure, state management"
|
|
70
|
-
├── Backend Planner: "API design, business logic"
|
|
71
|
-
├── Data Planner: "Schema, migrations, queries"
|
|
72
|
-
└── Devil's Advocate: "Too complex? Better patterns?"
|
|
73
|
-
|
|
74
|
-
[Team maps requirements to tasks]
|
|
75
|
-
|
|
76
|
-
Output:
|
|
77
|
-
└── .golem/IMPLEMENTATION_PLAN.md
|
|
78
|
-
├── Stage 1: Setup (3 tasks) → "feat(auth): add login endpoint"
|
|
79
|
-
├── Stage 2: Core Logic (5 tasks) → "feat(auth): implement validation"
|
|
80
|
-
└── Stage 3: Integration (2 tasks) → "feat(auth): wire up frontend"
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### 4. Build Phase (`/golem:build`)
|
|
84
|
-
|
|
85
|
-
Lead orchestrates builders, you observe and intervene:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
You: /golem:build
|
|
89
|
-
|
|
90
|
-
[Build lead starts]
|
|
91
|
-
=== Task 1.1: Create auth service ===
|
|
92
|
-
Spawning builder...
|
|
93
|
-
|
|
94
|
-
[Builder works - you can watch]
|
|
95
|
-
├── Writing tests (red phase)
|
|
96
|
-
├── Implementing (green phase)
|
|
97
|
-
├── Running validation gates
|
|
98
|
-
├── Simplifying code
|
|
99
|
-
└── Reporting: SUCCESS
|
|
100
|
-
|
|
101
|
-
✓ Task 1.1 complete
|
|
102
|
-
=== Task 1.2: Add password validation ===
|
|
103
|
-
Spawning builder...
|
|
104
|
-
|
|
105
|
-
[If something breaks]
|
|
106
|
-
⚠ Task 1.3 BLOCKED
|
|
107
|
-
Reason: Cannot connect to database
|
|
108
|
-
|
|
109
|
-
Options:
|
|
110
|
-
1. Skip and continue
|
|
111
|
-
2. Provide guidance
|
|
112
|
-
3. Fix and retry
|
|
113
|
-
|
|
114
|
-
You: The DB is on port 5433, not 5432
|
|
115
|
-
[Lead relays to builder, continues]
|
|
116
|
-
|
|
117
|
-
[Stage complete]
|
|
118
|
-
=== Stage 1 Complete ===
|
|
119
|
-
Squashing commits...
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
**Build controls:**
|
|
123
|
-
- `skip` - Skip blocked task
|
|
124
|
-
- `retry` - Retry current task
|
|
125
|
-
- `stop` - Pause build
|
|
126
|
-
- `status` - Show progress
|
|
127
|
-
- `Shift+Up/Down` - Message builder directly
|
|
128
|
-
|
|
129
|
-
### 5. Review Phase (`/golem:review`)
|
|
130
|
-
|
|
131
|
-
Security scans first, then agent team review:
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
You: /golem:review
|
|
135
|
-
|
|
136
|
-
[Security gate - automated tools]
|
|
137
|
-
=== SECRETS SCAN (gitleaks) ===
|
|
138
|
-
✓ No secrets detected
|
|
139
|
-
|
|
140
|
-
=== SAST SCAN (semgrep) ===
|
|
141
|
-
✓ 0 findings
|
|
142
|
-
|
|
143
|
-
=== DEPENDENCY SCAN (pnpm audit) ===
|
|
144
|
-
✓ 0 high, 0 critical
|
|
145
|
-
|
|
146
|
-
[Agent team spawns for code review]
|
|
147
|
-
├── Security Patterns: Auth logic, input validation
|
|
148
|
-
├── Performance: Query patterns, algorithms
|
|
149
|
-
├── Correctness: Spec match, edge cases
|
|
150
|
-
├── Tests: Coverage, quality
|
|
151
|
-
└── Devil's Advocate: Overengineered? Maintainable?
|
|
152
|
-
|
|
153
|
-
[Team reports findings]
|
|
154
|
-
|
|
155
|
-
Output:
|
|
156
|
-
└── .golem/REVIEW_REPORT.md
|
|
157
|
-
├── Verdict: APPROVED (or BLOCKED)
|
|
158
|
-
├── 0 critical, 1 major, 3 minor issues
|
|
159
|
-
└── Recommendations for future work
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
### 6. Ship (CLI)
|
|
163
|
-
```bash
|
|
164
|
-
golem pr # Create pull request
|
|
165
|
-
# Review, merge, done
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## Files Generated
|
|
171
|
-
|
|
172
|
-
| File | Created By | Purpose |
|
|
173
|
-
|------|------------|---------|
|
|
174
|
-
| `.golem/specs/*.md` | /golem:spec | Requirements for each topic |
|
|
175
|
-
| `.golem/AGENTS.md` | /golem:spec | Test/build/lint commands |
|
|
176
|
-
| `.golem/IMPLEMENTATION_PLAN.md` | /golem:plan | Staged task list |
|
|
177
|
-
| `.golem/SECURITY_REPORT.md` | /golem:security | Scan results |
|
|
178
|
-
| `.golem/REVIEW_REPORT.md` | /golem:review | Code review findings |
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
182
|
-
## Agent Teams
|
|
183
|
-
|
|
184
|
-
All phases use a **Devil's Advocate** who:
|
|
185
|
-
- Must articulate WHY something is problematic
|
|
186
|
-
- Must propose a concrete alternative
|
|
187
|
-
- Must back down when concern is addressed
|
|
188
|
-
- Goal: better thinking, not blocking progress
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
## Environment Setup
|
|
193
|
-
|
|
194
|
-
```bash
|
|
195
|
-
# ~/.golem/.env
|
|
196
|
-
FRESH_DOMAIN=yourcompany.freshservice.com
|
|
197
|
-
FRESH_API_KEY=your_api_key
|
|
198
|
-
GITEA_URL=https://gitea.example.com
|
|
199
|
-
GITEA_TOKEN=your_token
|
|
200
|
-
GITEA_ORG=your-org
|
|
201
|
-
GITEA_REPO=your-repo
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
```json
|
|
205
|
-
// Claude Code settings.json - enable agent teams
|
|
206
|
-
{
|
|
207
|
-
"env": {
|
|
208
|
-
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
```
|
|
212
|
-
</response>
|