You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude-plugin/plugin.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "claude-code-hermit",
3
-
"version": "0.1.0",
3
+
"version": "0.1.1",
4
4
"description": "A personal assistant that lives in your project — memory-driven learning, daily rhythm, idle agency, and operational hygiene for Claude Code",
Copy file name to clipboardExpand all lines: CHANGELOG.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,17 @@
1
1
# Changelog
2
2
3
+
## [0.1.1] - 2026-03-30
4
+
5
+
### Fixed
6
+
7
+
-**Cost tracker now captures real token data** — The Stop hook payload never included token fields; `cost-tracker.js` was silently writing zero-cost entries (or on newer installs, not writing at all). It now reads the last assistant turn's `usage` from `transcript_path` in the hook payload, which is where Claude Code actually exposes token counts.
8
+
-**Cache token pricing** — Added separate pricing rates for `cache_creation_input_tokens` (write) and `cache_read_input_tokens` (read) for all models. Previously cache tokens were ignored entirely, understating cost for heavily-cached sessions.
9
+
-**Efficient transcript tail-read** — Instead of loading the full transcript file, reads only the last 128KB using a positioned `fs.readSync` call. Avoids unnecessary memory use on long sessions.
- **Compact preserved sections if over threshold.** Read `compact` settings from `.claude-code-hermit/config.json`:
90
+
- **Monitoring:** Count non-empty, non-comment lines. If count exceeds `monitoring_threshold`: summarize all entries except the most recent `monitoring_keep` into a single `[Earlier]` line — e.g., `[Earlier] 14 alerts, 3 self-evals (03-28 08:00 — 03-30 18:00)`. If an `[Earlier]` line already exists, merge the counts and extend the time range. Keep the most recent `monitoring_keep` entries intact.
91
+
- **Session Summary:** Count non-empty, non-comment lines. If count exceeds `summary_threshold`: summarize all entries except the most recent `summary_keep` into a single `[Earlier]` line — e.g., `[Earlier] 15 tasks archived (S-001 — S-015)`. If an `[Earlier]` line already exists, merge counts and extend the range. Keep the most recent `summary_keep` entries intact.
**Close:** Defaults to idle transition at every task boundary — your hermit says "What's next?" and waits. Reflection fires. Full shutdown only via `/session-close`. See [Always-On Lifecycle](ALWAYS-ON-OPS.md#2-always-on-lifecycle).
75
75
76
-
**Archive:** SHELL.md -> `S-NNN-REPORT.md`. Fresh template with carry-forward items. Any session can pick up where the last one left off.
76
+
**Archive:** SHELL.md -> `S-NNN-REPORT.md`. Fresh template with carry-forward items. Monitoring and Session Summary sections are compacted if over threshold (configurable via `compact` in config.json). Any session can pick up where the last one left off.
Copy file name to clipboardExpand all lines: docs/CONFIG-REFERENCE.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,21 @@ Modify with `/hermit-settings routines`, `/hermit-settings idle`.
74
74
75
75
---
76
76
77
+
## `compact`
78
+
79
+
Controls automatic compaction of SHELL.md sections during idle transitions. When a section exceeds its threshold, older entries are summarized into a single `[Earlier]` line and only the most recent entries are kept.
80
+
81
+
| Key | Type | Default | Description |
82
+
|-----|------|---------|-------------|
83
+
|`monitoring_threshold`| integer |`30`| Compact `## Monitoring` when it exceeds this many lines. |
84
+
|`monitoring_keep`| integer |`20`| Keep this many recent entries after compacting. |
85
+
|`summary_threshold`| integer |`30`| Compact `## Session Summary` when it exceeds this many lines. |
86
+
|`summary_keep`| integer |`15`| Keep this many recent entries after compacting. |
87
+
88
+
Setting `keep` equal to `threshold` effectively disables compaction for that section. Modify with `/hermit-settings compact`.
Copy file name to clipboardExpand all lines: skills/heartbeat/SKILL.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ Execute one heartbeat tick immediately. Useful for testing the checklist.
49
49
10. Determine: does anything need operator attention?
50
50
51
51
**If nothing actionable:**
52
-
-Append to SHELL.md `## Monitoring` section: `[HH:MM] Heartbeat: OK`
52
+
-Do NOT append to SHELL.md (the tick is already recorded via `total_ticks` in config.json)
53
53
- Read config `heartbeat.show_ok`:
54
54
- If `true` AND channels are configured: send "Heartbeat OK" to channel
55
55
- If `false` (default): no channel message — silent acknowledgment
@@ -79,21 +79,22 @@ Triggered every N ticks (configured by `heartbeat.self_eval_interval`, default 2
79
79
80
80
**Steps:**
81
81
82
-
1. Read recent heartbeat entries from SHELL.md `## Monitoring` section — collect all `[HH:MM] Heartbeat:` lines in the current session
83
-
2. For each checklist item in HEARTBEAT.md: check how many recent ticks flagged it vs how many were OK
84
-
3.**Stale check detection:** If a specific checklist item was OK for all ticks in the evaluation window, suggest to the operator:
82
+
1. Read `heartbeat.total_ticks` and `heartbeat.self_eval_interval` from config.json. The evaluation window covers the last `self_eval_interval` ticks (i.e., ticks `total_ticks - self_eval_interval` through `total_ticks`).
83
+
2. Read SHELL.md `## Monitoring` — collect all `[HH:MM] Heartbeat:` alert/warning lines. These are the only entries present (OK ticks are not logged).
84
+
3. For each checklist item: count how many alert lines reference that item. Compare against the window size (`self_eval_interval`). If zero alerts across the window, the item has been clean for all ticks in the evaluation period.
85
+
4.**Stale check detection:** If a specific checklist item had zero alerts across the evaluation window, suggest to the operator:
85
86
> "Heartbeat self-check: the item '[check description]' has been OK for [N] consecutive ticks. Consider removing it to save tokens, or reducing heartbeat frequency."
86
-
4.**Checklist weight check:** Count items in HEARTBEAT.md. If count > 10, suggest:
87
+
5.**Checklist weight check:** Count items in HEARTBEAT.md. If count > 10, suggest:
87
88
> "HEARTBEAT.md has {count} items (recommended: ≤10). Consider moving periodic checks to routines (`/hermit-settings routines`) to reduce per-tick token cost. Items that only need daily/weekly checking are good routine candidates."
88
-
5.**Missing check suggestion:** Scan `.claude-code-hermit/proposals/` for recent auto-detected proposals about recurring issues. If a proposal describes a problem that could be caught by a heartbeat check, suggest:
89
+
6.**Missing check suggestion:** Scan `.claude-code-hermit/proposals/` for recent auto-detected proposals about recurring issues. If a proposal describes a problem that could be caught by a heartbeat check, suggest:
89
90
> "PROP-NNN identified a recurring [issue]. Consider adding a [relevant check] to HEARTBEAT.md."
90
-
6. Append self-evaluation findings to SHELL.md `## Monitoring` with timestamp:
91
+
7. Append self-evaluation findings to SHELL.md `## Monitoring` with timestamp:
91
92
```
92
93
[HH:MM] Heartbeat self-eval: [summary of suggestions]
93
94
```
94
-
7. If channels are configured: send self-eval findings as a notification
95
-
8. Do NOT auto-modify HEARTBEAT.md — suggest only. The operator decides what to check. Offer to make the edit if the operator agrees.
96
-
9. After the operator acts on a suggestion (adds or removes a check): reset `heartbeat.total_ticks` to 0 in config.json
95
+
8. If channels are configured: send self-eval findings as a notification
96
+
9. Do NOT auto-modify HEARTBEAT.md — suggest only. The operator decides what to check. Offer to make the edit if the operator agrees.
97
+
10. After the operator acts on a suggestion (adds or removes a check): reset `heartbeat.total_ticks` to 0 in config.json
0 commit comments