homunculus-code 0.2.0 → 0.3.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
@@ -154,65 +154,74 @@ The evolution engine then:
154
154
  npx homunculus-code init
155
155
  ```
156
156
 
157
- The wizard asks you a few questions and sets everything up:
158
-
159
157
  ```
160
- 🧬 Homunculus — Self-evolving AI Assistant
158
+ Homunculus — Self-evolving AI Assistant
161
159
 
162
- ? What's your project name? my-app
163
- ? What's your main goal? Build a reliable SaaS product
160
+ Created homunculus/ directory structure
161
+ Added evolution rules
162
+ ✓ Copied evolution scripts
163
+ ✓ Added slash commands (/hm-setup, /hm-night, /hm-status)
164
+ ✓ Configured observation hook
164
165
 
165
- Created homunculus/ structure
166
- ✅ Generated architecture.yaml with your goals
167
- ✅ Added observation hook to Claude Code
168
- ✅ Copied evolution scripts
166
+ Done! Homunculus is installed.
169
167
 
170
- Done! Start using Claude Code. Your assistant will evolve.
168
+ Next steps:
169
+ 1. Run claude to open Claude Code
170
+ 2. Type /hm-setup to define your goals (AI-guided)
171
+ 3. Type /hm-night to run your first evolution cycle
171
172
  ```
172
173
 
173
- ### 2. Run Your First Evolution Cycle
174
+ ### 2. Define Your Goals
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.
174
177
 
175
- ```bash
176
- npx homunculus-code night
177
178
  ```
179
+ > /hm-setup
178
180
 
179
- Watch the system check your goals, scan for patterns, and generate a report:
181
+ Claude: What kind of project is this?
182
+ You: A SaaS app for team collaboration
180
183
 
181
- ```
182
- 🌙 Homunculus Evolution Cycle
184
+ Claude: What do you spend most time on?
185
+ You: Debugging auth issues and writing tests
183
186
 
184
- [1/5] Health Check
185
- code_quality: ○ no data yet
186
- productivity: ○ no data yet
187
+ Claude: Here's your goal tree:
188
+ 🎯 Team Collaboration SaaS
189
+ ├── code_quality Ship fewer bugs
190
+ │ ├── testing — Every change has tests
191
+ │ └── auth_reliability — Auth works every time
192
+ ├── productivity — Move faster
193
+ │ └── debugging — Find root causes faster
194
+ └── knowledge — Stay current
195
+ └── tool_updates — Track Claude Code updates
187
196
 
188
- [2/5] Scan Instincts
189
- ○ No instincts yet — use Claude Code normally, patterns will emerge
197
+ Does this look right?
198
+ You: Yes!
190
199
 
191
- [3/5] Eval Skills
192
- ○ No skills yet — instincts converge into skills over time
200
+ Claude: ✅ architecture.yaml created with 5 goals!
201
+ ```
193
202
 
194
- [4/5] Research
195
- ✓ Claude Code 2.1.81
196
- △ 0/7 goals have health checks — add more for better evolution
203
+ ### 3. Run Your First Evolution Cycle
197
204
 
198
- [5/5] Report
199
- ┌────────────────────────────────────────────┐
200
- │ Evolution Report — 2026-03-22 │
201
- │ Goals: 7 | Instincts: 0 | Skills: 0 │
202
- │ Status: Fresh install — ready to evolve │
203
- └────────────────────────────────────────────┘
205
+ ```
206
+ > /hm-night
204
207
  ```
205
208
 
206
- ### 3. Use Claude Code Normally
209
+ Watch Claude check your goals, scan for patterns, evaluate skills, and generate a report — all in one command. This is what the nightly agent does autonomously while you sleep.
207
210
 
208
- The observation hook watches your usage automatically. As patterns emerge, run `night` again to see your system evolve. Or set up the [nightly agent](docs/nightly-agent.md) to do it autonomously while you sleep.
211
+ ### 4. Keep Using Claude Code
212
+
213
+ The observation hook watches your usage automatically. As patterns emerge:
209
214
 
210
- ```bash
211
- npx homunculus-code night # Manual evolution cycle
212
- claude "/eval-skill" # Evaluate a specific skill
213
- claude "/improve-skill" # Auto-improve a skill
214
- claude "/evolve" # Converge instincts into skills
215
215
  ```
216
+ /hm-night Run an evolution cycle
217
+ /hm-status Check evolution progress
218
+ /hm-setup Refine your goals anytime
219
+ /eval-skill Evaluate a specific skill
220
+ /improve-skill Auto-improve a skill
221
+ /evolve Converge instincts into skills
222
+ ```
223
+
224
+ Set up the [nightly agent](docs/nightly-agent.md) to run `/hm-night` autonomously while you sleep.
216
225
 
217
226
  ---
218
227
 
package/bin/init.js CHANGED
@@ -1,44 +1,17 @@
1
1
  #!/usr/bin/env node
2
- // homunculus init — Set up a self-evolving AI assistant in your project
2
+ // homunculus init — Set up the evolution structure in your project
3
3
 
4
4
  const fs = require('fs');
5
5
  const path = require('path');
6
- const readline = require('readline');
7
6
 
8
7
  const TEMPLATES_DIR = path.join(__dirname, '..', 'templates');
9
8
  const CORE_DIR = path.join(__dirname, '..', 'core');
10
9
  const COMMANDS_DIR = path.join(__dirname, '..', 'commands');
11
10
 
12
- const YES_MODE = process.argv.includes('--yes') || process.argv.includes('-y');
13
-
14
- let rl;
15
- if (!YES_MODE) {
16
- rl = readline.createInterface({
17
- input: process.stdin,
18
- output: process.stdout
19
- });
20
- }
21
-
22
- function ask(question, defaultVal) {
23
- if (YES_MODE) return Promise.resolve(process.env[`HOMUNCULUS_${question.replace(/[^A-Z]/gi, '_').toUpperCase()}`] || defaultVal || '');
24
- return new Promise(resolve => {
25
- const suffix = defaultVal ? ` (${defaultVal})` : '';
26
- rl.question(`${question}${suffix}: `, answer => {
27
- resolve(answer.trim() || defaultVal || '');
28
- });
29
- });
30
- }
31
-
32
11
  function ensureDir(dir) {
33
12
  if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
34
13
  }
35
14
 
36
- function copyFile(src, dest) {
37
- if (fs.existsSync(src)) {
38
- fs.copyFileSync(src, dest);
39
- }
40
- }
41
-
42
15
  function copyDir(src, dest) {
43
16
  ensureDir(dest);
44
17
  if (!fs.existsSync(src)) return;
@@ -53,18 +26,9 @@ function copyDir(src, dest) {
53
26
  }
54
27
  }
55
28
 
56
- function replaceTemplateVars(content, vars) {
57
- let result = content;
58
- for (const [key, value] of Object.entries(vars)) {
59
- result = result.replace(new RegExp(`\\{\\{${key}\\}\\}`, 'g'), value);
60
- }
61
- return result;
62
- }
63
-
64
- async function main() {
29
+ function main() {
65
30
  console.log('');
66
31
  console.log(' \x1b[1mHomunculus\x1b[0m — Self-evolving AI Assistant');
67
- console.log(' A seed that grows into your own AI assistant.');
68
32
  console.log('');
69
33
 
70
34
  const projectDir = process.cwd();
@@ -75,128 +39,6 @@ async function main() {
75
39
  console.log('');
76
40
  }
77
41
 
78
- // Gather info
79
- const projectName = await ask(' Project name', path.basename(projectDir));
80
- const purpose = await ask(' What is this project\'s main goal?', 'My evolving AI assistant');
81
-
82
- console.log('');
83
- console.log(' Select areas you want your AI to improve in:');
84
- console.log('');
85
-
86
- const goalOptions = [
87
- { key: '1', name: 'code_quality', label: 'Code Quality', desc: 'Ship fewer bugs, better tests' },
88
- { key: '2', name: 'productivity', label: 'Productivity', desc: 'Complete tasks faster' },
89
- { key: '3', name: 'debugging', label: 'Debugging', desc: 'Faster root cause analysis' },
90
- { key: '4', name: 'documentation', label: 'Documentation', desc: 'Keep docs up to date' },
91
- { key: '5', name: 'automation', label: 'Automation', desc: 'Automate repetitive work' },
92
- { key: '6', name: 'learning', label: 'Continuous Learning', desc: 'Stay up to date with tools and patterns' },
93
- ];
94
-
95
- for (const opt of goalOptions) {
96
- console.log(` ${opt.key}. ${opt.label} — ${opt.desc}`);
97
- }
98
- console.log('');
99
-
100
- const selectedStr = await ask(' Select areas (enter numbers, e.g. 1,2,5)', '1,2');
101
- const selectedKeys = selectedStr.split(/[,\s]+/).map(s => s.trim()).filter(Boolean);
102
- const selectedGoals = goalOptions.filter(o => selectedKeys.includes(o.key));
103
- if (selectedGoals.length === 0) selectedGoals.push(goalOptions[0], goalOptions[1]);
104
-
105
- console.log('');
106
-
107
- const vars = {
108
- PROJECT_NAME: projectName,
109
- PROJECT_PURPOSE: purpose
110
- };
111
-
112
- // Generate architecture.yaml from selected goals
113
- function generateArchitecture(goals, rootPurpose) {
114
- let yaml = `# architecture.yaml — Your goal tree\n`;
115
- yaml += `# Goals are stable. Implementations evolve.\n`;
116
- yaml += `# See: https://github.com/JavanC/Homunculus\n\n`;
117
- yaml += `version: "1.0"\n\n`;
118
- yaml += `root:\n`;
119
- yaml += ` purpose: "${rootPurpose}"\n\n`;
120
- yaml += ` goals:\n`;
121
-
122
- const goalTemplates = {
123
- code_quality: {
124
- purpose: 'Ship fewer bugs, write more maintainable code',
125
- goals: {
126
- testing: { purpose: 'Every change has tests', realized_by: '# will evolve' },
127
- review: { purpose: 'Catch issues before merge', realized_by: '# will evolve' }
128
- },
129
- metrics: [{ name: 'test_pass_rate', healthy: '> 90%' }]
130
- },
131
- productivity: {
132
- purpose: 'Complete tasks faster with fewer iterations',
133
- goals: {
134
- task_completion: { purpose: 'Finish tasks in fewer cycles', realized_by: '# will evolve' },
135
- tool_mastery: { purpose: 'Use the right tool on first try', realized_by: '# will evolve' }
136
- },
137
- metrics: [{ name: 'avg_iterations_per_task', healthy: 'decreasing trend' }]
138
- },
139
- debugging: {
140
- purpose: 'Find and fix bugs faster',
141
- goals: {
142
- root_cause: { purpose: 'Identify root causes, not symptoms', realized_by: '# will evolve' },
143
- diagnosis_tools: { purpose: 'Use the right debugging approach', realized_by: '# will evolve' }
144
- },
145
- metrics: [{ name: 'avg_debug_time', healthy: 'decreasing trend' }]
146
- },
147
- documentation: {
148
- purpose: 'Keep documentation accurate and up to date',
149
- goals: {
150
- api_docs: { purpose: 'API docs match implementation', realized_by: '# will evolve' },
151
- decision_records: { purpose: 'Document why, not just what', realized_by: '# will evolve' }
152
- },
153
- metrics: [{ name: 'doc_freshness', healthy: '< 1 week behind code' }]
154
- },
155
- automation: {
156
- purpose: 'Automate repetitive work',
157
- goals: {
158
- ci_cd: { purpose: 'Automated build, test, deploy', realized_by: '# will evolve' },
159
- workflows: { purpose: 'Common sequences as one command', realized_by: '# will evolve' }
160
- },
161
- metrics: [{ name: 'manual_steps_per_deploy', healthy: '< 3' }]
162
- },
163
- learning: {
164
- purpose: 'Stay up to date with tools and best practices',
165
- goals: {
166
- tool_updates: { purpose: 'Track and adopt useful updates', realized_by: '# will evolve' },
167
- pattern_discovery: { purpose: 'Find better ways to do things', realized_by: '# will evolve' }
168
- },
169
- metrics: [{ name: 'patterns_adopted_per_month', healthy: '> 2' }]
170
- }
171
- };
172
-
173
- for (const goal of goals) {
174
- const tmpl = goalTemplates[goal.name];
175
- if (!tmpl) continue;
176
- yaml += ` ${goal.name}:\n`;
177
- yaml += ` purpose: "${tmpl.purpose}"\n`;
178
- if (tmpl.metrics) {
179
- yaml += ` metrics:\n`;
180
- for (const m of tmpl.metrics) {
181
- yaml += ` - name: ${m.name}\n`;
182
- yaml += ` healthy: "${m.healthy}"\n`;
183
- }
184
- }
185
- if (tmpl.goals) {
186
- yaml += ` goals:\n`;
187
- for (const [subName, sub] of Object.entries(tmpl.goals)) {
188
- yaml += ` ${subName}:\n`;
189
- yaml += ` purpose: "${sub.purpose}"\n`;
190
- yaml += ` realized_by: ${sub.realized_by}\n`;
191
- }
192
- }
193
- yaml += `\n`;
194
- }
195
-
196
- yaml += ` # Add more goals as your system evolves...\n`;
197
- return yaml;
198
- }
199
-
200
42
  // 1. Create directory structure
201
43
  const dirs = [
202
44
  'homunculus/instincts/personal',
@@ -205,6 +47,7 @@ async function main() {
205
47
  'homunculus/evolved/agents',
206
48
  'homunculus/evolved/evals',
207
49
  'homunculus/experiments',
50
+ 'homunculus/reports',
208
51
  'scripts',
209
52
  '.claude/rules',
210
53
  '.claude/commands'
@@ -215,51 +58,37 @@ async function main() {
215
58
  }
216
59
  console.log(' \x1b[32m✓\x1b[0m Created homunculus/ directory structure');
217
60
 
218
- // 2. Generate architecture.yaml from selected goals
219
- const archDest = path.join(projectDir, 'architecture.yaml');
220
- if (!fs.existsSync(archDest)) {
221
- const archContent = generateArchitecture(selectedGoals, purpose);
222
- fs.writeFileSync(archDest, archContent);
223
- console.log(` \x1b[32m✓\x1b[0m Created architecture.yaml with ${selectedGoals.length} goals: ${selectedGoals.map(g => g.label).join(', ')}`);
224
- } else {
225
- console.log(' \x1b[33m-\x1b[0m architecture.yaml already exists, skipping');
61
+ // 2. Copy evolution rules
62
+ const rulesSrc = path.join(TEMPLATES_DIR, 'rules', 'evolution-system.md');
63
+ const rulesDest = path.join(projectDir, '.claude', 'rules', 'evolution-system.md');
64
+ if (!fs.existsSync(rulesDest) && fs.existsSync(rulesSrc)) {
65
+ fs.copyFileSync(rulesSrc, rulesDest);
66
+ console.log(' \x1b[32m✓\x1b[0m Added evolution rules');
226
67
  }
227
68
 
228
- // 3. Copy CLAUDE.md template (append if exists)
69
+ // 3. Copy CLAUDE.md template
70
+ const claudeSrc = path.join(TEMPLATES_DIR, 'CLAUDE.md.template');
229
71
  const claudeDest = path.join(projectDir, 'CLAUDE.md');
230
- if (!fs.existsSync(claudeDest)) {
231
- const template = fs.readFileSync(
232
- path.join(TEMPLATES_DIR, 'CLAUDE.md.template'), 'utf8'
233
- );
234
- fs.writeFileSync(claudeDest, replaceTemplateVars(template, vars));
72
+ if (!fs.existsSync(claudeDest) && fs.existsSync(claudeSrc)) {
73
+ const template = fs.readFileSync(claudeSrc, 'utf8');
74
+ const projectName = path.basename(projectDir);
75
+ fs.writeFileSync(claudeDest, template.replace(/\{\{PROJECT_NAME\}\}/g, projectName));
235
76
  console.log(' \x1b[32m✓\x1b[0m Created CLAUDE.md');
236
- } else {
237
- console.log(' \x1b[33m-\x1b[0m CLAUDE.md already exists, skipping');
238
77
  }
239
78
 
240
- // 4. Copy evolution rules
241
- const rulesDest = path.join(projectDir, '.claude', 'rules', 'evolution-system.md');
242
- if (!fs.existsSync(rulesDest)) {
243
- copyFile(
244
- path.join(TEMPLATES_DIR, 'rules', 'evolution-system.md'),
245
- rulesDest
246
- );
247
- console.log(' \x1b[32m✓\x1b[0m Created .claude/rules/evolution-system.md');
248
- }
249
-
250
- // 5. Copy core scripts
79
+ // 4. Copy core scripts
251
80
  if (fs.existsSync(CORE_DIR)) {
252
81
  copyDir(CORE_DIR, path.join(projectDir, 'scripts'));
253
- console.log(' \x1b[32m✓\x1b[0m Copied evolution scripts to scripts/');
82
+ console.log(' \x1b[32m✓\x1b[0m Copied evolution scripts');
254
83
  }
255
84
 
256
- // 6. Copy slash commands
85
+ // 5. Copy slash commands
257
86
  if (fs.existsSync(COMMANDS_DIR)) {
258
87
  copyDir(COMMANDS_DIR, path.join(projectDir, '.claude', 'commands'));
259
- console.log(' \x1b[32m✓\x1b[0m Copied slash commands to .claude/commands/');
88
+ console.log(' \x1b[32m✓\x1b[0m Added slash commands (/hm-setup, /hm-night, /hm-status)');
260
89
  }
261
90
 
262
- // 7. Configure Claude Code hooks (if settings exist)
91
+ // 6. Configure Claude Code hooks
263
92
  const settingsPath = path.join(projectDir, '.claude', 'settings.json');
264
93
  let settings = {};
265
94
  if (fs.existsSync(settingsPath)) {
@@ -275,10 +104,10 @@ async function main() {
275
104
  }];
276
105
  ensureDir(path.join(projectDir, '.claude'));
277
106
  fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
278
- console.log(' \x1b[32m✓\x1b[0m Configured Claude Code observation hook');
107
+ console.log(' \x1b[32m✓\x1b[0m Configured observation hook');
279
108
  }
280
109
 
281
- // 8. Create .gitignore additions
110
+ // 7. Create .gitignore additions
282
111
  const gitignorePath = path.join(projectDir, '.gitignore');
283
112
  const gitignoreEntries = [
284
113
  '',
@@ -299,19 +128,15 @@ async function main() {
299
128
  console.log(' \x1b[32m✓\x1b[0m Created .gitignore');
300
129
  }
301
130
 
131
+ // Done
302
132
  console.log('');
303
- console.log(' \x1b[1m\x1b[32mDone!\x1b[0m Your assistant is ready to evolve.');
133
+ console.log(' \x1b[1m\x1b[32mDone!\x1b[0m Homunculus is installed.');
304
134
  console.log('');
305
135
  console.log(' Next steps:');
306
- console.log(' 1. Edit \x1b[1marchitecture.yaml\x1b[0m to define your goals');
307
- console.log(' 2. Use Claude Code normally the system observes automatically');
308
- console.log(' 3. Run \x1b[1mclaude "/eval-skill"\x1b[0m to check evolution progress');
136
+ console.log(' 1. Run \x1b[1mclaude\x1b[0m to open Claude Code');
137
+ console.log(' 2. Type \x1b[1m/hm-setup\x1b[0m to define your goals (AI-guided)');
138
+ console.log(' 3. Type \x1b[1m/hm-night\x1b[0m to run your first evolution cycle');
309
139
  console.log('');
310
-
311
- if (rl) rl.close();
312
140
  }
313
141
 
314
- main().catch(err => {
315
- console.error('Error:', err.message);
316
- process.exit(1);
317
- });
142
+ main();
@@ -0,0 +1,86 @@
1
+ # /hm-night — Run One Evolution Cycle
2
+
3
+ Run the full evolution pipeline: health check → instincts → skills → research → report.
4
+
5
+ ## Behavior
6
+
7
+ You are the Homunculus nightly evolution agent. Run through all 5 phases systematically.
8
+
9
+ ### Phase 1: Health Check
10
+
11
+ 1. Read `architecture.yaml`
12
+ 2. For each goal with a `health_check.command`, run it and report pass/fail
13
+ 3. For goals without health checks, check if `realized_by` points to an existing file
14
+ 4. Report:
15
+ ```
16
+ [1/5] Health Check
17
+ code_quality: ✅ healthy (tests passing)
18
+ productivity: ⚠️ no health check defined
19
+ knowledge: ✅ healthy
20
+ ```
21
+
22
+ ### Phase 2: Scan Instincts
23
+
24
+ 1. Count files in `homunculus/instincts/personal/` and `homunculus/instincts/archived/`
25
+ 2. If instincts exist, check for pruning candidates (run `node scripts/prune-instincts.js` if it exists)
26
+ 3. Report count and any archival suggestions
27
+ ```
28
+ [2/5] Instincts
29
+ 12 active / 5 archived
30
+ △ 2 candidates for archival (low confidence)
31
+ ```
32
+
33
+ ### Phase 3: Eval Skills
34
+
35
+ 1. List files in `homunculus/evolved/skills/`
36
+ 2. For each skill, check if an eval spec exists in `homunculus/evolved/evals/`
37
+ 3. If eval specs exist, run `/eval-skill` on each
38
+ 4. Report pass rates
39
+ ```
40
+ [3/5] Skills
41
+ ✓ tdd-workflow: 100% (8/8 scenarios)
42
+ △ debugging-patterns: 85% (6/7) — needs improvement
43
+ ```
44
+
45
+ ### Phase 4: Research
46
+
47
+ 1. Check Claude Code version
48
+ 2. Scan `architecture.yaml` for goals with no `realized_by` — these are opportunities
49
+ 3. Look for goals with failing health checks — these need attention
50
+ 4. Suggest improvements:
51
+ ```
52
+ [4/5] Research
53
+ ✓ Claude Code v2.1.81
54
+ △ 2 goals have no implementation yet
55
+ → Suggestion: code_quality.review could use a pre-commit hook
56
+ ```
57
+
58
+ ### Phase 5: Report
59
+
60
+ Generate a summary report and save to `homunculus/reports/YYYY-MM-DD.md`:
61
+
62
+ ```
63
+ [5/5] Evolution Report — 2026-03-22
64
+ ┌──────────────────────────────────────────┐
65
+ │ Goals: 5 (3 healthy, 2 need work) │
66
+ │ Instincts: 12 active / 5 archived │
67
+ │ Skills: 3 (2 at 100%, 1 at 85%) │
68
+ │ │
69
+ │ Actions taken: │
70
+ │ - Pruned 2 outdated instincts │
71
+ │ - Improved debugging-patterns to v1.2 │
72
+ │ │
73
+ │ Suggestions: │
74
+ │ - Add health check to productivity goal │
75
+ │ - Review could use a pre-commit hook │
76
+ └──────────────────────────────────────────┘
77
+ ```
78
+
79
+ ## Important
80
+
81
+ - Actually RUN health check commands (don't just read them)
82
+ - Actually RUN eval-skill if eval specs exist (don't skip)
83
+ - If a skill fails eval, attempt `/improve-skill` (max 2 rounds)
84
+ - Save the report to `homunculus/reports/`
85
+ - Be concise — this should feel like a progress dashboard, not an essay
86
+ - If the system is fresh (no instincts/skills), give encouraging guidance
@@ -0,0 +1,65 @@
1
+ # /hm-setup — Set Up Your Goal Tree
2
+
3
+ Guide the user through defining their goals and generate `architecture.yaml`.
4
+
5
+ ## Behavior
6
+
7
+ 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.
8
+
9
+ ### Step 1: Understand the Project
10
+
11
+ Ask the user (conversationally, not a form):
12
+ - What is this project? (e.g., SaaS app, CLI tool, personal project)
13
+ - What do they spend most time on? (e.g., debugging, writing tests, deploying)
14
+ - What frustrates them? (e.g., regressions, slow CI, repetitive tasks)
15
+ - What would they improve if they had infinite time?
16
+
17
+ Keep it natural — 2-3 questions max, adapt based on answers.
18
+
19
+ ### Step 2: Propose Goals
20
+
21
+ Based on their answers, propose 3-5 goals with sub-goals. Present them clearly:
22
+
23
+ ```
24
+ Based on what you told me, here's your goal tree:
25
+
26
+ 🎯 [Project Name]
27
+ ├── code_quality — Ship fewer bugs
28
+ │ ├── testing — Every change has tests
29
+ │ └── review — Catch issues before merge
30
+ ├── productivity — Move faster
31
+ │ ├── automation — Automate repetitive work
32
+ │ └── debugging — Find root causes faster
33
+ └── knowledge — Stay up to date
34
+ └── tool_updates — Track useful updates
35
+ ```
36
+
37
+ Ask: "Does this look right? Want to add, remove, or change anything?"
38
+
39
+ ### Step 3: Generate architecture.yaml
40
+
41
+ Once confirmed, generate `architecture.yaml` with:
42
+ - `purpose` for every goal
43
+ - `metrics` where measurable (use reasonable defaults)
44
+ - `health_check` where possible (shell commands that exit 0 = healthy)
45
+ - `realized_by: # will evolve` for all implementations (the system will fill these in)
46
+
47
+ Write the file using the Write tool.
48
+
49
+ ### Step 4: Confirm
50
+
51
+ ```
52
+ ✅ architecture.yaml created with N goals!
53
+
54
+ Your system is ready to evolve. Use Claude Code normally —
55
+ patterns will be auto-extracted. Run /hm-night anytime to
56
+ trigger an evolution cycle.
57
+ ```
58
+
59
+ ## Important
60
+
61
+ - Keep the conversation SHORT (under 5 back-and-forth)
62
+ - Generate PRACTICAL goals, not abstract ones
63
+ - Use the project's actual tech stack for health checks (e.g., `npm test`, `pytest`, `go test`)
64
+ - Don't overwhelm — 3-5 top-level goals is ideal for a start
65
+ - Goals can always be refined later
@@ -0,0 +1,47 @@
1
+ # /hm-status — Evolution Status Dashboard
2
+
3
+ Show the current state of the Homunculus evolution system.
4
+
5
+ ## Behavior
6
+
7
+ Gather and display all evolution metrics in a compact dashboard.
8
+
9
+ ### Data to Collect
10
+
11
+ 1. **Goal Tree**: Read `architecture.yaml`, count goals and sub-goals
12
+ 2. **Instincts**: Count files in `homunculus/instincts/personal/` and `archived/`
13
+ 3. **Skills**: Count files in `homunculus/evolved/skills/`, note versions
14
+ 4. **Agents**: Count files in `homunculus/evolved/agents/`
15
+ 5. **Eval Specs**: Count files in `homunculus/evolved/evals/`
16
+ 6. **Observations**: Count lines in `homunculus/observations.jsonl`
17
+ 7. **Experiments**: Count files in `homunculus/experiments/`
18
+ 8. **Reports**: List recent reports in `homunculus/reports/`
19
+
20
+ ### Output Format
21
+
22
+ ```
23
+ 🧬 Homunculus Status
24
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
25
+
26
+ Goal Tree: 5 goals / 12 sub-goals
27
+ Instincts: 24 active / 8 archived
28
+ Skills: 3 evolved (all 100% eval)
29
+ Agents: 1 specialized
30
+ Observations: 1,247 recorded
31
+ Experiments: 2 completed / 1 queued
32
+
33
+ Recent Skills:
34
+ ✓ tdd-workflow v1.2 — 100% (11 scenarios)
35
+ ✓ debugging-patterns v1.1 — 100% (8 scenarios)
36
+ ✓ shell-automation v1.0 — 100% (6 scenarios)
37
+
38
+ Last Evolution: 2026-03-22
39
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
40
+ ```
41
+
42
+ ## Important
43
+
44
+ - Use actual file counts, not hardcoded numbers
45
+ - Keep output compact — one screen max
46
+ - If the system is fresh, show zeros and next steps
47
+ - Don't run any evaluations — just report current state
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homunculus-code",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "A self-evolving AI assistant that grows smarter every night",
5
5
  "bin": {
6
6
  "homunculus-code": "./bin/cli.js"