homunculus-code 0.3.4 → 0.4.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 CHANGED
@@ -160,23 +160,23 @@ Homunculus — Self-evolving AI Assistant
160
160
  ✓ Created homunculus/ directory structure
161
161
  ✓ Added evolution rules
162
162
  ✓ Copied evolution scripts
163
- ✓ Added slash commands (/hm-setup, /hm-night, /hm-status)
163
+ ✓ Added slash commands (/hm-goal, /hm-night, /hm-status)
164
164
  ✓ Configured observation hook
165
165
 
166
166
  Done! Homunculus is installed.
167
167
 
168
168
  Next steps:
169
169
  1. Run claude to open Claude Code
170
- 2. Type /hm-setup to define your goals (AI-guided)
170
+ 2. Type /hm-goal to define your goals (AI-guided)
171
171
  3. Type /hm-night to run your first evolution cycle
172
172
  ```
173
173
 
174
174
  ### 2. Define Your Goals
175
175
 
176
- Open Claude Code and type `/hm-setup`. Claude will have a short conversation with you to understand your project and goals, then generate your `architecture.yaml` automatically.
176
+ Open Claude Code and type `/hm-goal`. Claude will have a short conversation with you to understand your project and goals, then generate your `architecture.yaml` automatically.
177
177
 
178
178
  ```
179
- > /hm-setup
179
+ > /hm-goal
180
180
 
181
181
  Claude: What kind of project is this?
182
182
  You: A SaaS app for team collaboration
@@ -215,7 +215,7 @@ The observation hook watches your usage automatically. As patterns emerge:
215
215
  ```
216
216
  /hm-night Run an evolution cycle
217
217
  /hm-status Check evolution progress
218
- /hm-setup Refine your goals anytime
218
+ /hm-goal Refine your goals anytime
219
219
  /eval-skill Evaluate a specific skill
220
220
  /improve-skill Auto-improve a skill
221
221
  /evolve Converge instincts into skills
package/bin/init.js CHANGED
@@ -76,7 +76,7 @@ This project uses Homunculus for goal-driven evolution.
76
76
  - **Goal Tree**: \`architecture.yaml\` — defines goals, metrics, and health checks
77
77
  - **Instincts**: \`homunculus/instincts/personal/\` — auto-extracted patterns
78
78
  - **Skills**: \`homunculus/evolved/skills/\` — tested, versioned knowledge
79
- - **Commands**: \`/hm-setup\` (define goals) | \`/hm-night\` (evolution cycle) | \`/hm-status\` (dashboard)
79
+ - **Commands**: \`/hm-goal\` (define goals) | \`/hm-night\` (evolution cycle) | \`/hm-status\` (dashboard)
80
80
  `;
81
81
 
82
82
  if (fs.existsSync(claudeDest)) {
@@ -106,7 +106,7 @@ This project uses Homunculus for goal-driven evolution.
106
106
  // 5. Copy slash commands
107
107
  if (fs.existsSync(COMMANDS_DIR)) {
108
108
  copyDir(COMMANDS_DIR, path.join(projectDir, '.claude', 'commands'));
109
- console.log(' \x1b[32m✓\x1b[0m Added slash commands (/hm-setup, /hm-night, /hm-status)');
109
+ console.log(' \x1b[32m✓\x1b[0m Added slash commands (/hm-goal, /hm-night, /hm-status)');
110
110
  }
111
111
 
112
112
  // 6. Configure Claude Code hooks
@@ -157,7 +157,7 @@ This project uses Homunculus for goal-driven evolution.
157
157
  console.log('');
158
158
  console.log(' Next steps:');
159
159
  console.log(' 1. Run \x1b[1mclaude\x1b[0m to open Claude Code');
160
- console.log(' 2. Type \x1b[1m/hm-setup\x1b[0m to define your goals (AI-guided)');
160
+ console.log(' 2. Type \x1b[1m/hm-goal\x1b[0m to define your goals (AI-guided)');
161
161
  console.log(' 3. Type \x1b[1m/hm-night\x1b[0m to run your first evolution cycle');
162
162
  console.log('');
163
163
  }
@@ -1,25 +1,67 @@
1
- # /hm-setupSet Up Your Goal Tree
1
+ # /hm-goalView or Define Your Goal Tree
2
2
 
3
- Guide the user through defining their goals and generate `architecture.yaml`.
3
+ If `architecture.yaml` exists, display the current goal tree and ask if changes are needed.
4
+ If it doesn't exist, guide the user through creating one.
4
5
 
5
6
  **Always communicate in English** regardless of user's global Claude settings.
6
7
 
7
8
  ## Behavior
8
9
 
9
- You are helping the user set up Homunculus — a self-evolving AI assistant. Your job is to understand their project and goals, then generate a goal tree.
10
+ ### Mode Detection
11
+
12
+ Check if `architecture.yaml` exists in the project root.
13
+
14
+ - **Exists** → Show Mode
15
+ - **Doesn't exist** → Create Mode
16
+
17
+ ---
18
+
19
+ ## Show Mode (architecture.yaml exists)
20
+
21
+ ### Step 1: Read and display
22
+
23
+ Read `architecture.yaml` and present the goal tree visually:
24
+
25
+ ```
26
+ 🎯 Your Goal Tree
27
+ ├── code_quality — Ship fewer bugs
28
+ │ ├── testing — Every change has tests
29
+ │ │ └── realized_by: skills/tdd-workflow.md ✓
30
+ │ └── review — Catch issues before merge
31
+ │ └── realized_by: # will evolve ○
32
+ ├── productivity — Move faster
33
+ │ └── debugging — Find root causes faster
34
+ │ └── realized_by: agents/debugger.md ✓
35
+ └── knowledge — Stay current
36
+ └── tool_updates — Track useful updates
37
+ └── realized_by: # will evolve ○
38
+
39
+ 3 goals / 5 sub-goals
40
+ 2 implemented (✓) / 3 waiting to evolve (○)
41
+ ```
42
+
43
+ ### Step 2: Ask
44
+
45
+ > "Want to add, remove, or change any goals?"
46
+
47
+ - If yes → make the changes, update `architecture.yaml`
48
+ - If no → done
49
+
50
+ ---
51
+
52
+ ## Create Mode (no architecture.yaml)
10
53
 
11
54
  **CRITICAL: Ask ONE question at a time. Wait for the answer before asking the next. Never batch multiple questions in one message.**
12
55
 
13
56
  ### Step 1: Ask about the project (ONE question)
14
57
 
15
- Start with:
16
58
  > "What kind of project is this? (e.g., web app, CLI tool, API, personal project)"
17
59
 
18
60
  Wait for answer.
19
61
 
20
62
  ### Step 2: Ask about pain points (ONE question)
21
63
 
22
- Based on their answer, ask:
64
+ Based on their answer:
23
65
  > "What do you spend the most time on that you wish was better? (e.g., debugging, testing, deployment, keeping up with updates)"
24
66
 
25
67
  Wait for answer.
@@ -30,7 +72,7 @@ Based on their answer, ask ONE more targeted question. Examples:
30
72
  - "If your AI assistant could fix one thing overnight, what would it be?"
31
73
  - "What breaks most often in your workflow?"
32
74
 
33
- Adapt this question based on what they already told you. Wait for answer.
75
+ Adapt based on what they already told you. Wait for answer.
34
76
 
35
77
  ### Step 4: Propose goals
36
78
 
@@ -68,15 +110,15 @@ Write the file using the Write tool.
68
110
  ```
69
111
  ✅ architecture.yaml created with N goals!
70
112
 
71
- Your system is ready to evolve. Use Claude Code normally —
72
- patterns will be auto-extracted. Run /hm-night anytime to
73
- trigger an evolution cycle.
113
+ Your system is ready to evolve. Run /hm-night to start
114
+ your first evolution cycle.
74
115
  ```
75
116
 
76
117
  ## Rules
77
118
 
78
- - **ONE question per message. Never ask two questions at once.**
119
+ - **ONE question per message in Create Mode. Never ask two questions at once.**
79
120
  - Keep the whole setup under 5 back-and-forth messages
80
121
  - Generate PRACTICAL goals, not abstract ones
81
122
  - Don't overwhelm — 3-5 top-level goals is ideal
82
- - Goals can always be refined later with `/hm-setup` again
123
+ - In Show Mode, show realized_by status (✓ = file exists, ○ = not yet)
124
+ - Goals can always be refined by running `/hm-goal` again
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homunculus-code",
3
- "version": "0.3.4",
3
+ "version": "0.4.0",
4
4
  "description": "A self-evolving AI assistant that grows smarter every night",
5
5
  "bin": {
6
6
  "homunculus-code": "./bin/cli.js"