golem-cc 0.1.3 → 0.1.5
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/bin/golem +25 -7
- package/package.json +1 -1
package/bin/golem
CHANGED
|
@@ -89,9 +89,20 @@ cmd_install() {
|
|
|
89
89
|
mkdir -p specs
|
|
90
90
|
|
|
91
91
|
# Copy prompts and agents
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
cp "$GOLEM_DIR/golem/
|
|
92
|
+
local copied_agents=false
|
|
93
|
+
if [[ -d "$GOLEM_DIR/golem/agents" ]]; then
|
|
94
|
+
if cp "$GOLEM_DIR/golem/prompts/"*.md .golem/prompts/ 2>/dev/null && \
|
|
95
|
+
cp "$GOLEM_DIR/golem/agents/"*.md .golem/agents/ 2>/dev/null; then
|
|
96
|
+
copied_agents=true
|
|
97
|
+
echo -e "${GREEN}✓${NC} Copied prompts and agents"
|
|
98
|
+
fi
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
if [[ "$copied_agents" == "false" ]]; then
|
|
102
|
+
echo -e "${YELLOW}⚠${NC} Could not copy agents from $GOLEM_DIR/golem/"
|
|
103
|
+
echo -e " ${DIM}Expected: $GOLEM_DIR/golem/agents/*.md${NC}"
|
|
104
|
+
echo -e " ${DIM}Spec building will use inline prompts instead${NC}"
|
|
105
|
+
echo -e " ${DIM}Try reinstalling: npx golem-cc --global${NC}"
|
|
95
106
|
fi
|
|
96
107
|
|
|
97
108
|
# Create AGENTS.md if it doesn't exist
|
|
@@ -209,11 +220,16 @@ cmd_spec() {
|
|
|
209
220
|
echo -e "${DIM}This will guide you through defining your project requirements.${NC}"
|
|
210
221
|
echo ""
|
|
211
222
|
|
|
212
|
-
# Launch with spec-builder agent
|
|
223
|
+
# Launch with spec-builder agent prompt
|
|
213
224
|
if [[ -f ".golem/agents/spec-builder.md" ]]; then
|
|
214
|
-
|
|
225
|
+
# Extract content after YAML frontmatter
|
|
226
|
+
local prompt
|
|
227
|
+
prompt=$(sed '1,/^---$/d' .golem/agents/spec-builder.md | sed '1,/^---$/d')
|
|
228
|
+
claude --system-prompt "$prompt"
|
|
215
229
|
else
|
|
216
|
-
|
|
230
|
+
echo -e "${YELLOW}Note: Using inline prompt (agents not installed)${NC}"
|
|
231
|
+
echo ""
|
|
232
|
+
claude --system-prompt "You are a spec-builder. Guide me through defining requirements for this project. Ask what I'm building, break it into topics of concern (3-7 topics), create spec files in specs/ for each topic, and set up AGENTS.md with test/build commands. Start by asking: What are you building?"
|
|
217
233
|
fi
|
|
218
234
|
}
|
|
219
235
|
|
|
@@ -463,7 +479,9 @@ cmd_simplify() {
|
|
|
463
479
|
echo ""
|
|
464
480
|
|
|
465
481
|
if [[ -f ".golem/agents/code-simplifier.md" ]]; then
|
|
466
|
-
|
|
482
|
+
local prompt
|
|
483
|
+
prompt=$(sed '1,/^---$/d' .golem/agents/code-simplifier.md | sed '1,/^---$/d')
|
|
484
|
+
claude --system-prompt "$prompt" "Simplify the code in: $target"
|
|
467
485
|
else
|
|
468
486
|
claude "Simplify the code in $target. Remove unnecessary comments, flatten nested conditionals, improve naming. Preserve all behavior. Run tests after."
|
|
469
487
|
fi
|