homunculus-code 0.3.3 → 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
  }
@@ -0,0 +1,124 @@
1
+ # /hm-goal — View or Define Your Goal Tree
2
+
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.
5
+
6
+ **Always communicate in English** regardless of user's global Claude settings.
7
+
8
+ ## Behavior
9
+
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)
53
+
54
+ **CRITICAL: Ask ONE question at a time. Wait for the answer before asking the next. Never batch multiple questions in one message.**
55
+
56
+ ### Step 1: Ask about the project (ONE question)
57
+
58
+ > "What kind of project is this? (e.g., web app, CLI tool, API, personal project)"
59
+
60
+ Wait for answer.
61
+
62
+ ### Step 2: Ask about pain points (ONE question)
63
+
64
+ Based on their answer:
65
+ > "What do you spend the most time on that you wish was better? (e.g., debugging, testing, deployment, keeping up with updates)"
66
+
67
+ Wait for answer.
68
+
69
+ ### Step 3: Ask about priorities (ONE question)
70
+
71
+ Based on their answer, ask ONE more targeted question. Examples:
72
+ - "If your AI assistant could fix one thing overnight, what would it be?"
73
+ - "What breaks most often in your workflow?"
74
+
75
+ Adapt based on what they already told you. Wait for answer.
76
+
77
+ ### Step 4: Propose goals
78
+
79
+ Based on ALL their answers, propose 3-5 goals with sub-goals:
80
+
81
+ ```
82
+ Based on what you told me, here's your goal tree:
83
+
84
+ 🎯 [Project Name]
85
+ ├── code_quality — Ship fewer bugs
86
+ │ ├── testing — Every change has tests
87
+ │ └── review — Catch issues before merge
88
+ ├── productivity — Move faster
89
+ │ └── debugging — Find root causes faster
90
+ └── knowledge — Stay current
91
+ └── tool_updates — Track useful updates
92
+
93
+ Does this look right? Want to add, remove, or change anything?
94
+ ```
95
+
96
+ Wait for confirmation or changes.
97
+
98
+ ### Step 5: Generate architecture.yaml
99
+
100
+ Once confirmed, generate `architecture.yaml` with:
101
+ - `purpose` for every goal
102
+ - `metrics` where measurable (use reasonable defaults)
103
+ - `health_check` where possible (use the project's actual tech stack: `npm test`, `pytest`, `go test`, etc.)
104
+ - `realized_by: # will evolve` for all implementations
105
+
106
+ Write the file using the Write tool.
107
+
108
+ ### Step 6: Confirm
109
+
110
+ ```
111
+ ✅ architecture.yaml created with N goals!
112
+
113
+ Your system is ready to evolve. Run /hm-night to start
114
+ your first evolution cycle.
115
+ ```
116
+
117
+ ## Rules
118
+
119
+ - **ONE question per message in Create Mode. Never ask two questions at once.**
120
+ - Keep the whole setup under 5 back-and-forth messages
121
+ - Generate PRACTICAL goals, not abstract ones
122
+ - Don't overwhelm — 3-5 top-level goals is ideal
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.3",
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"
@@ -1,67 +0,0 @@
1
- # /hm-setup — Set Up Your Goal Tree
2
-
3
- Guide the user through defining their goals and generate `architecture.yaml`.
4
-
5
- **Always communicate in English** regardless of user's global Claude settings.
6
-
7
- ## Behavior
8
-
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
-
11
- ### Step 1: Understand the Project
12
-
13
- Ask the user (conversationally, not a form):
14
- - What is this project? (e.g., SaaS app, CLI tool, personal project)
15
- - What do they spend most time on? (e.g., debugging, writing tests, deploying)
16
- - What frustrates them? (e.g., regressions, slow CI, repetitive tasks)
17
- - What would they improve if they had infinite time?
18
-
19
- Keep it natural — 2-3 questions max, adapt based on answers.
20
-
21
- ### Step 2: Propose Goals
22
-
23
- Based on their answers, propose 3-5 goals with sub-goals. Present them clearly:
24
-
25
- ```
26
- Based on what you told me, here's your goal tree:
27
-
28
- 🎯 [Project Name]
29
- ├── code_quality — Ship fewer bugs
30
- │ ├── testing — Every change has tests
31
- │ └── review — Catch issues before merge
32
- ├── productivity — Move faster
33
- │ ├── automation — Automate repetitive work
34
- │ └── debugging — Find root causes faster
35
- └── knowledge — Stay up to date
36
- └── tool_updates — Track useful updates
37
- ```
38
-
39
- Ask: "Does this look right? Want to add, remove, or change anything?"
40
-
41
- ### Step 3: Generate architecture.yaml
42
-
43
- Once confirmed, generate `architecture.yaml` with:
44
- - `purpose` for every goal
45
- - `metrics` where measurable (use reasonable defaults)
46
- - `health_check` where possible (shell commands that exit 0 = healthy)
47
- - `realized_by: # will evolve` for all implementations (the system will fill these in)
48
-
49
- Write the file using the Write tool.
50
-
51
- ### Step 4: Confirm
52
-
53
- ```
54
- ✅ architecture.yaml created with N goals!
55
-
56
- Your system is ready to evolve. Use Claude Code normally —
57
- patterns will be auto-extracted. Run /hm-night anytime to
58
- trigger an evolution cycle.
59
- ```
60
-
61
- ## Important
62
-
63
- - Keep the conversation SHORT (under 5 back-and-forth)
64
- - Generate PRACTICAL goals, not abstract ones
65
- - Use the project's actual tech stack for health checks (e.g., `npm test`, `pytest`, `go test`)
66
- - Don't overwhelm — 3-5 top-level goals is ideal for a start
67
- - Goals can always be refined later