Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions hermes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# ALIVE x Hermes Agent

Structured context layer for autonomous agents. Five independent layers that compound when used together.

## Architecture

| Layer | Name | Description |
|-------|------|-------------|
| 4 | Runtime Integration | `soul-patch.md` + `agents.md`. Auto-discovered by Hermes. |
| 3 | Cron Templates | 8 background jobs. Observe, present, await approval. |
| 2 | Hermes Skills | 11 ALIVE operations as `/slash` commands. agentskills.io format. |
| 1 | Memory Provider | Smart prefetch, 3 tools. PR to NousResearch/hermes-agent. |
| 0 | The World | Walnuts, bundles, `_kernel/`, `.alive/`. The shared filesystem. |

Each layer works independently. A user on Mem0 can use ALIVE skills and crons without the memory provider.

## Quick Start

### Path A: You already have ALIVE (Claude Code user)

```bash
# 1. Copy memory provider to Hermes
cp -r hermes/memory-provider/* ~/.hermes/hermes-agent/plugins/memory/alive/

# 2. Add skills to Hermes config
# In ~/.hermes/config.yaml:
# skills:
# external_dirs:
# - /path/to/alivecontext/alive/hermes/hermes-skills
# - /path/to/alivecontext/alive/hermes/cron-templates

# 3. Activate memory provider
hermes memory setup # select "alive"

# 4. Install crons (optional)
bash hermes/setup-crons.sh

# 5. Append SOUL.md patch
cat hermes/soul-patch.md >> ~/.hermes/SOUL.md

# 6. Copy AGENTS.md to world root
cp hermes/agents.md ~/world/AGENTS.md
```

### Path B: You're new to ALIVE (Hermes user)

```bash
# 1. Install ALIVE
claude plugin install alive@alivecontext

# 2. Then follow Path A above
```

## Directory Structure

```
hermes/
memory-provider/ <- Layer 1: Hermes memory plugin
__init__.py <- MemoryProvider implementation
plugin.yaml <- Plugin metadata + hook declarations
README.md <- Provider docs

hermes-skills/ <- Layer 2: 11 interactive skills
alive-load/SKILL.md <- Load walnut context
alive-save/SKILL.md <- Checkpoint: route stash, write log
alive-world/SKILL.md <- World dashboard
alive-capture/SKILL.md <- Capture external content
alive-search/SKILL.md <- Cross-walnut search
alive-create/SKILL.md <- Scaffold new walnut
alive-bundle/SKILL.md <- Bundle lifecycle
alive-daily/SKILL.md <- Morning operating system
alive-history/SKILL.md <- Session history search
alive-mine/SKILL.md <- Deep context extraction
alive-cleanup/SKILL.md <- System maintenance

cron-templates/ <- Layer 3: 8 background enrichment jobs
alive-morning/SKILL.md <- 7am daily briefing
alive-project/SKILL.md <- Every 4h: regenerate projections
alive-inbox/SKILL.md <- Every 2h: scan inbox
alive-health/SKILL.md <- 9am daily: health check
alive-stash-router/ <- Every 4h: route pending stash
alive-mine/SKILL.md <- 2am nightly: mine transcripts
alive-prune/SKILL.md <- 3am Sunday: log/insight pruning
alive-people/SKILL.md <- 9am Monday: people check

agents.md <- Layer 4: Squirrel runtime rules
soul-patch.md <- Layer 4: 3-line personality patch
setup-crons.sh <- Installs all 8 crons in Hermes
README.md <- This file
```

## Design Spec

Full 14-page specification: see `alive-hermes-spec.pdf` in the alivecomputer walnut's hermes-plugin bundle.

## Links

- [ALIVE Context System](https://github.com/alivecontext/alive)
- [Hermes Agent](https://github.com/NousResearch/hermes-agent)
- [@stackwalnuts](https://x.com/stackwalnuts)
70 changes: 70 additions & 0 deletions hermes/agents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# ALIVE Context System -- Squirrel Runtime

You operate inside an ALIVE world. Walnuts are structured context units with identity, history, domain knowledge, and current state. Everything lives on the filesystem.

## Core Contract

1. **Read before speaking.** Never guess at file contents. Read `_kernel/key.md`, `_kernel/now.json`, `_kernel/insights.md` before responding about any walnut.
2. **Stash in conversation.** Decisions, tasks, and notes accumulate in a running stash. Route at save, not during work.
3. **Surface, don't decide.** Show options. Let the human choose. Nothing writes to a walnut log without approval.
4. **One walnut, one focus.** Ask before cross-loading other walnuts.
5. **Sign everything.** Log entries carry session ID and engine.

## Stash Mechanic

Carry a running list of decisions, tasks, and notes. Surface each add:

```
+1 stash (N)
what happened -> destination
drop?
```

Route at save. Checkpoint every 5 items.

## Visual Conventions

Use bordered blocks for system notifications:

```
squirrel emoji [type]
[content]
> [question]
1. Option
2. Option
```

## Vocabulary

| Say | Not |
|-----|-----|
| walnut | unit, entity |
| squirrel | agent, bot |
| stash | catch, capture |
| save | close, sign-off |
| bundle | capsule (legacy) |

## File Structure

Each walnut has `_kernel/` with:
- `key.md` -- identity (type, goal, people, rhythm)
- `log.md` -- prepend-only history
- `insights.md` -- standing domain knowledge
- `now.json` -- computed current state (read-only, script-generated)
- `tasks.json` -- work queue (use `tasks.py` CLI, never edit directly)

Bundles are folders with `context.manifest.yaml`. They hold focused work units.

The world root has `.alive/` with preferences, squirrel entries, and stash.

## Skills

Use `/alive-load`, `/alive-save`, `/alive-world`, `/alive-capture`, `/alive-search`, `/alive-create`, `/alive-bundle`, `/alive-daily`, `/alive-history`, `/alive-mine`, `/alive-cleanup` for full procedures.

## Read Sequence (every session)

1. `_kernel/key.md` -- full
2. `_kernel/now.json` -- full
3. `_kernel/insights.md` -- frontmatter only

Then ask what to work on.
63 changes: 63 additions & 0 deletions hermes/cron-templates/alive-health/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
name: alive-health
description: Flag walnuts past their rhythm -- health check for the world
version: 1.0.0
author: ALIVE Context System
license: MIT
toolsets:
- terminal
- file
metadata:
hermes:
tags: [ALIVE, cron, health, monitoring]
cron_schedule: "0 9 * * *"
cron_deliver: "telegram"
---

# Health Check

Flag walnuts that are past their rhythm.

## Process

For each non-archive walnut:
1. Read `_kernel/key.md` frontmatter for `rhythm:`
2. Read `_kernel/now.json` for `updated:` timestamp
3. Calculate days since last update
4. Compare against rhythm:
- daily: 1 day
- weekly: 7 days
- biweekly: 14 days
- monthly: 30 days

## Health Signals

- **active** -- within rhythm (skip)
- **quiet** -- 1-2x past rhythm (note)
- **waiting** -- 2x+ past rhythm (flag)

## Output

If all walnuts are healthy: `[SILENT]`

If issues found:

```
Health Check -- [date]

WAITING (past 2x rhythm):
[walnut] -- [N] days (rhythm: weekly) -- last: [date]
[walnut] -- [N] days (rhythm: daily) -- last: [date]

QUIET (past rhythm):
[walnut] -- [N] days (rhythm: weekly)

[N] walnuts healthy, [M] need attention.
```

## Rules

- Only flag waiting (2x+) and quiet (1x-2x)
- Skip archive, skip inbox
- Skip people walnuts (they get nudges from alive-people instead)
- Keep brief -- this is a notification, not a report
56 changes: 56 additions & 0 deletions hermes/cron-templates/alive-inbox/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: alive-inbox
description: Scan 03_Inbox/ for unrouted files, present routing suggestions
version: 1.0.0
author: ALIVE Context System
license: MIT
toolsets:
- terminal
- file
metadata:
hermes:
tags: [ALIVE, cron, inbox, routing]
cron_schedule: "every 2h"
cron_deliver: "telegram"
---

# Inbox Scanner

Check 03_Inbox/ for files that need routing.

## Process

1. List all files in `03_Inbox/`:
```bash
find "$ALIVE_WORLD_ROOT/03_Inbox" -type f -not -name ".*" -not -name "*.DS_Store" 2>/dev/null
```

2. For each file:
- Read the first 500 chars to understand content
- Suggest a destination walnut based on content
- Classify type (document, transcript, screenshot, data)

3. Present grouped by suggested destination:

```
Inbox: [N] files

[walnut-name]:
1. [filename] -- [type] -- [one-line description]
2. [filename] -- [type] -- [one-line description]

[other-walnut]:
3. [filename] -- [type] -- [one-line description]

Unsure:
4. [filename] -- [content preview]

Reply with numbers to approve routing. "all" to approve all. "skip" to leave for later.
```

## Rules

- If inbox is empty, output `[SILENT]`
- Don't move files -- just suggest. Wait for approval.
- Files older than 48 hours get flagged: "This has been in inbox for [N] days"
- Max 10 files per notification. If more, show count and suggest `/alive-capture`
58 changes: 58 additions & 0 deletions hermes/cron-templates/alive-mine/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: alive-mine-cron
description: Nightly scan of session transcripts -- extract decisions, tasks, people, insights
version: 1.0.0
author: ALIVE Context System
license: MIT
toolsets:
- terminal
- file
metadata:
hermes:
tags: [ALIVE, cron, mining, extraction]
cron_schedule: "0 2 * * *"
cron_deliver: "local"
---

# Nightly Mine

Scan recent session transcripts for unmined context.

## Process

1. Find session transcripts from the last 24 hours:
```bash
find "$ALIVE_WORLD_ROOT/.alive/_squirrels" -name "*.yaml" -mtime -1 2>/dev/null
```

2. For each session entry:
- Read the YAML for `transcript:` path
- If transcript exists and hasn't been mined, read it
- Extract: decisions, tasks, people context, insights, quotes

3. Group extractions by destination walnut

4. Write to `.alive/stash.json` with routing suggestions (don't route directly)

## Output

```
Mined [N] sessions, extracted [M] items:
[N] decisions
[N] tasks
[N] people updates
[N] insights
[N] quotes

Items added to stash for routing via alive-stash-router.
```

If nothing found: `[SILENT]`

## Rules

- Extract, don't route. Items go to stash for human approval.
- Mark sessions as mined (touch a `.mined` flag file alongside the YAML)
- Skip sessions that are already mined
- Skip sessions shorter than 5 turns (likely trivial)
- Be conservative -- only extract clear decisions and explicit tasks, not inferences
Loading