homunculus-code 0.4.0 → 0.4.1

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.
@@ -1,12 +1,29 @@
1
1
  # /hm-night — Run One Evolution Cycle
2
2
 
3
- Run the full evolution pipeline: health check → instinctsskills → research → report.
3
+ Run the full evolution pipeline: health check → evolve → research → report.
4
4
 
5
5
  **Always communicate in English** regardless of user's global Claude settings.
6
6
 
7
+ ## Core Principle
8
+
9
+ **Goals are stable. Implementations are diverse.** When suggesting improvements, consider ALL implementation types — not just skills:
10
+
11
+ | Type | When to suggest |
12
+ |------|----------------|
13
+ | Skill | Behavioral knowledge Claude should follow |
14
+ | Agent | Task needs specialized model/tools/prompt |
15
+ | Hook | Should trigger automatically on events |
16
+ | Script | Automation that runs independently |
17
+ | Rule | Claude Code behavioral constraint |
18
+ | Command | Workflow the user triggers manually |
19
+ | Cron/LaunchAgent | Needs to run on a schedule |
20
+ | MCP | Needs external service integration |
21
+
22
+ Always pick the **right tool for the job**, not default to skills.
23
+
7
24
  ## Behavior
8
25
 
9
- You are the Homunculus nightly evolution agent. Run through all 5 phases systematically.
26
+ Run through all 5 phases systematically.
10
27
 
11
28
  ### Phase 1: Health Check
12
29
 
@@ -18,71 +35,91 @@ You are the Homunculus nightly evolution agent. Run through all 5 phases systema
18
35
  [1/5] Health Check
19
36
  code_quality: ✅ healthy (tests passing)
20
37
  productivity: ⚠️ no health check defined
21
- knowledge: healthy
38
+ ai_news: not implemented yet
22
39
  ```
23
40
 
24
- ### Phase 2: Scan Instincts
41
+ ### Phase 2: Scan Evolved Assets
25
42
 
26
- 1. Count files in `homunculus/instincts/personal/` and `homunculus/instincts/archived/`
27
- 2. If instincts exist, check for pruning candidates (run `node scripts/prune-instincts.js` if it exists)
28
- 3. Report count and any archival suggestions
29
- ```
30
- [2/5] Instincts
31
- 12 active / 5 archived
32
- △ 2 candidates for archival (low confidence)
33
- ```
43
+ Check ALL evolved artifacts, not just skills:
34
44
 
35
- ### Phase 3: Eval Skills
45
+ 1. **Instincts**: Count in `homunculus/instincts/personal/` and `archived/`
46
+ 2. **Skills**: Count in `homunculus/evolved/skills/`, run evals if specs exist
47
+ 3. **Agents**: Count in `homunculus/evolved/agents/`
48
+ 4. **Scripts**: Check `scripts/` for automation
49
+ 5. **Hooks**: Check `.claude/settings.json` for configured hooks
50
+ 6. **Commands**: Check `.claude/commands/` for slash commands
51
+ 7. **Rules**: Check `.claude/rules/` for behavioral rules
36
52
 
37
- 1. List files in `homunculus/evolved/skills/`
38
- 2. For each skill, check if an eval spec exists in `homunculus/evolved/evals/`
39
- 3. If eval specs exist, run `/eval-skill` on each
40
- 4. Report pass rates
41
- ```
42
- [3/5] Skills
43
- ✓ tdd-workflow: 100% (8/8 scenarios)
44
- △ debugging-patterns: 85% (6/7) — needs improvement
45
- ```
53
+ Report:
54
+ ```
55
+ [2/5] Evolved Assets
56
+ Instincts: 12 active / 5 archived
57
+ Skills: 2 (all 100% eval)
58
+ Agents: 1 (debugger)
59
+ Hooks: 3 configured
60
+ Commands: 6 available
61
+ Rules: 2 active
62
+ ```
63
+
64
+ If skills have eval specs, run `/eval-skill` and report pass rates.
46
65
 
47
- ### Phase 4: Research
66
+ ### Phase 3: Research & Suggest
48
67
 
49
- 1. Check Claude Code version
50
- 2. Scan `architecture.yaml` for goals with no `realized_by` these are opportunities
51
- 3. Look for goals with failing health checks — these need attention
52
- 4. Suggest improvements:
68
+ 1. Scan `architecture.yaml` for goals where `realized_by` is empty or `# will evolve`
69
+ 2. For each unimplemented goal, suggest the **most appropriate implementation type**:
53
70
  ```
54
- [4/5] Research
55
- Claude Code v2.1.81
56
- △ 2 goals have no implementation yet
57
- → Suggestion: code_quality.review could use a pre-commit hook
71
+ [3/5] Research
72
+ Goals without implementation:
73
+
74
+ ai_news → Suggestion: a SCRIPT that fetches from RSS/APIs
75
+ + a CRON job to run it daily
76
+ (not a skill — this needs to run independently)
77
+
78
+ code_review → Suggestion: a HOOK on pre-commit
79
+ (not a skill — should be automated, not behavioral)
80
+
81
+ debugging → Suggestion: an AGENT with specialized tools
82
+ (not a script — needs AI reasoning)
58
83
  ```
59
84
 
85
+ 3. For goals with failing health checks, suggest fixes using the right implementation type
86
+
87
+ ### Phase 4: Act (if possible)
88
+
89
+ If there are simple improvements that can be made right now:
90
+ - Prune outdated instincts (`node scripts/prune-instincts.js --apply`)
91
+ - Improve failing skills (`/improve-skill`)
92
+ - Create a suggested script or hook if straightforward
93
+
94
+ Report what was done.
95
+
60
96
  ### Phase 5: Report
61
97
 
62
98
  Generate a summary report and save to `homunculus/reports/YYYY-MM-DD.md`:
63
99
 
64
100
  ```
65
101
  [5/5] Evolution Report — 2026-03-22
66
- ┌──────────────────────────────────────────┐
67
- │ Goals: 5 (3 healthy, 2 need work)
68
- Instincts: 12 active / 5 archived
69
- Skills: 3 (2 at 100%, 1 at 85%)
70
-
71
- │ Actions taken:
72
- │ - Pruned 2 outdated instincts
73
- │ - Improved debugging-patterns to v1.2
74
-
75
- │ Suggestions:
76
- │ - Add health check to productivity goal
77
- │ - Review could use a pre-commit hook
78
- └──────────────────────────────────────────┘
102
+ ┌──────────────────────────────────────────────┐
103
+ │ Goals: 5 (2 healthy, 1 new, 2 todo)
104
+ Assets: 2 skills, 1 agent, 3 hooks
105
+ Instincts: 12 active / 5 archived
106
+
107
+ │ Actions taken:
108
+ │ - Pruned 2 outdated instincts
109
+ │ - Created scripts/fetch-news.sh
110
+
111
+ │ Suggestions:
112
+ │ - code_review: add pre-commit hook
113
+ │ - debugging: create specialized agent
114
+ │ - Add health checks to 2 goals │
115
+ └──────────────────────────────────────────────┘
79
116
  ```
80
117
 
81
- ## Important
118
+ ## Rules
82
119
 
120
+ - **Don't default to skills for everything** — match implementation to the goal's nature
83
121
  - Actually RUN health check commands (don't just read them)
84
122
  - Actually RUN eval-skill if eval specs exist (don't skip)
85
- - If a skill fails eval, attempt `/improve-skill` (max 2 rounds)
86
123
  - Save the report to `homunculus/reports/`
87
- - Be concise — this should feel like a progress dashboard, not an essay
88
- - If the system is fresh (no instincts/skills), give encouraging guidance
124
+ - Be concise — dashboard style, not essay
125
+ - If fresh system: suggest the FIRST concrete implementation to build (pick the easiest win)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homunculus-code",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "A self-evolving AI assistant that grows smarter every night",
5
5
  "bin": {
6
6
  "homunculus-code": "./bin/cli.js"