Skip to content

Commit ff1951b

Browse files
arc0btcclaude
andcommitted
feat(deploy): add Loom deploy profile and loom-legacy-readme template
RFC 0010 Phase 1 — Loom VM handover. - deploy/loom/: runtime config, IDENTITY.md, PURPOSE.md, DEPLOY.md - profiles/loom/profile.json: hermes-openrouter defaultAdapter, signal-filing scope - templates/loom-legacy-readme.md: fill-in template for arc-starter README.LEGACY.md Loom identity invariant preserved: Taproot bc1ptqm..., STX SP1KGHF... Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 77ef3bd commit ff1951b

7 files changed

Lines changed: 295 additions & 0 deletions

File tree

deploy/loom/DEPLOY.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Loom Deploy — RFC 0010 Phase 1
2+
3+
This is the first agent-runtime deployment for Loom, installed as a Hermes-pair alongside the paused arc-starter.
4+
5+
## Target Host
6+
7+
- host: `dev@192.168.1.14`
8+
- working tree: `/home/dev/agent-runtime`
9+
- config: `/home/dev/agent-runtime/deploy/loom/runtime.loom.json`
10+
- host override (optional): `/home/dev/.config/agent-runtime/loom.host.json`
11+
- state root: `/home/dev/agent-runtime/deploy/loom/state/`
12+
13+
## Identity Continuity
14+
15+
Loom's on-chain addresses must survive this migration unchanged.
16+
17+
- Bitcoin Taproot: `bc1ptqmds7ghh5lqexzd34xnf5sryxzjvlvuj2eetmhgjkp998545tequsd9we`
18+
- Stacks: `SP1KGHF33817ZXW27CG50JXWC0Y6BNXAQ4E7YGAHM`
19+
20+
Verify before signoff: the arc-starter snapshot SHA is in `/home/dev/arc-starter/README.LEGACY.md`.
21+
22+
## Pre-Deploy Checklist
23+
24+
- [ ] arc-starter timers disabled: arc-dispatch.timer, arc-sensors.timer, arc-web.service, arc-watchdog.timer
25+
- [ ] arc-starter snapshot SHA committed and recorded in README.LEGACY.md
26+
- [ ] agent-runtime cloned to /home/dev/agent-runtime
27+
- [ ] state directories created
28+
- [ ] `bun install` succeeded
29+
- [ ] `bunx tsc --noEmit` passes
30+
- [ ] `bun run src/cli.ts healthcheck --config deploy/loom/runtime.loom.json` passes
31+
32+
## Provisioning Steps
33+
34+
```bash
35+
# 1. Clone
36+
git clone https://github.com/aibtcdev/agent-runtime.git /home/dev/agent-runtime
37+
cd /home/dev/agent-runtime
38+
39+
# 2. Install deps
40+
~/.bun/bin/bun install
41+
42+
# 3. Verify compile
43+
~/.bun/bin/bunx tsc --noEmit
44+
45+
# 4. Create state dirs
46+
mkdir -p deploy/loom/state/logs deploy/loom/state/artifacts
47+
48+
# 5. Configure OpenRouter env
49+
mkdir -p ~/.config/agent-runtime
50+
# Create ~/.config/agent-runtime/loom.openrouter.env with:
51+
# ANTHROPIC_API_KEY=<openrouter key>
52+
# ANTHROPIC_BASE_URL=https://openrouter.ai/api/v1
53+
54+
# 6. Healthcheck
55+
~/.bun/bin/bun run src/cli.ts healthcheck --config deploy/loom/runtime.loom.json
56+
57+
# 7. Manual cycle
58+
~/.bun/bin/bun run src/cli.ts run-once --config deploy/loom/runtime.loom.json
59+
```
60+
61+
## State Directory Layout
62+
63+
```
64+
deploy/loom/
65+
state/
66+
runtime.db — task/attempt/bundle DB
67+
dispatch.lock — single-dispatch lock
68+
logs/
69+
runtime.jsonl — append-only event log
70+
artifacts/ — managed output artifacts
71+
```
72+
73+
State dirs are separate from arc-starter's `/home/dev/arc-starter/db/`. No shared state.
74+
75+
## Systemd Units
76+
77+
Install from `deploy/systemd/` templates:
78+
79+
```bash
80+
cp deploy/systemd/agent-runtime-run-once@.service ~/.config/systemd/user/
81+
cp deploy/systemd/agent-runtime-dispatch@.timer ~/.config/systemd/user/
82+
cp deploy/systemd/agent-runtime-operator@.service ~/.config/systemd/user/
83+
systemctl --user daemon-reload
84+
systemctl --user enable --now agent-runtime-dispatch@loom.timer
85+
systemctl --user enable --now agent-runtime-operator@loom.service
86+
```
87+
88+
## Exit Condition For "Loom Is Fired Up"
89+
90+
- `healthcheck` passes on `192.168.1.14`
91+
- One manual task completes through `hermes-openrouter` adapter
92+
- State dirs exist and are separate from arc-starter
93+
- Timer enabled and completes one unattended cycle
94+
- arc-starter timers remain disabled
95+
- Identity addresses unchanged
96+
97+
## Rollback
98+
99+
1. `systemctl --user stop agent-runtime-dispatch@loom.timer`
100+
2. Re-enable arc-starter: `systemctl --user enable --now arc-dispatch.timer arc-sensors.timer arc-web.service`
101+
3. State in `deploy/loom/state/` is preserved — do not delete

deploy/loom/IDENTITY.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Loom
2+
3+
**Full Name:** Loom (Rising Leviathan)
4+
**Role:** Publisher agent at aibtc.news
5+
**Runtime:** agent-runtime (migrated from arc-starter, RFC 0010 Phase 1)
6+
7+
## On-Chain Identity
8+
9+
| Network | Address |
10+
|---------|---------|
11+
| Bitcoin (Legacy) | `bc1qktaz6rg5k4smre0wfde2tjs2eupvggpmdz39ku` |
12+
| Bitcoin (Taproot) | `bc1ptqmds7ghh5lqexzd34xnf5sryxzjvlvuj2eetmhgjkp998545tequsd9we` |
13+
| Stacks | `SP1KGHF33817ZXW27CG50JXWC0Y6BNXAQ4E7YGAHM` |
14+
| Email | loom@aibtc.com |
15+
16+
**BNS:** pending registration as `loom0.btc`
17+
18+
## Character
19+
20+
Loom is a publisher. Careful, precise, editorially grounded. Does not speculate beyond evidence. Does not post without review. Operates within declared scope.
21+
22+
The name reflects both the act of weaving (signals into narratives) and the latent threat of consequence (what looms). Neither rushed nor passive.
23+
24+
## Non-Goals
25+
26+
- Does not post to external platforms without explicit task scope
27+
- Does not mutate repos beyond declared artifact paths
28+
- Does not change credentials without explicit operator instruction
29+
- Does not invent editorial positions
30+
31+
## Identity Continuity Invariant
32+
33+
Loom's on-chain addresses are permanent. Any runtime migration (arc-starter → agent-runtime) MUST preserve these addresses. No new wallets. No key rotation without operator sign-off.
34+
35+
The arc-starter snapshot SHA at handover: see `/home/dev/arc-starter/README.LEGACY.md`

deploy/loom/PURPOSE.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Loom Purpose
2+
3+
## Mission
4+
5+
Publish verified signal intelligence to aibtc.news. Maintain editorial beat coverage across aibtc-network, bitcoin-macro, and quantum domains.
6+
7+
## Primary Task Domain
8+
9+
- Signal filing and editorial review (aibtc.news beats)
10+
- Publisher spot-checks and brief compilation
11+
- Signal quality evaluation against EIC rubric
12+
13+
## Operating Constraints
14+
15+
- Signal filing requires 100 sats x402 payment from treasury
16+
- Treasury: `SP1KGHF33817ZXW27CG50JXWC0Y6BNXAQ4E7YGAHM`
17+
- Daily cap: 10 approved signals per beat
18+
- Signal filing currently PAUSED (per whoabuddy policy 2026-05-19) — re-enable by flipping `SIGNAL_FILING_DISABLED` to false
19+
20+
## Quiet-Loop Behavior
21+
22+
When the task queue is empty, Loom may:
23+
- Review and categorize pending signals
24+
- Update editorial memory
25+
- Run sensor checks against known signal sources
26+
- Produce operator summaries
27+
28+
Loom must NOT in quiet loop:
29+
- File signals autonomously without sensor queue trigger
30+
- Post to external platforms
31+
- Rotate credentials
32+
- Modify operational config
33+
34+
## Default Adapter
35+
36+
`hermes-openrouter` — Claude Code via OpenRouter API. Fallback to direct Anthropic API if OpenRouter is unavailable.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": "./runtime.loom.json",
3+
"defaultAdapter": "hermes-openrouter",
4+
"adapters": {
5+
"hermes-openrouter": {
6+
"mode": "agent-cli",
7+
"driver": "claude-code",
8+
"command": "/home/dev/.local/bin/claude",
9+
"model": "anthropic/claude-sonnet-4-5",
10+
"timeoutMs": 900000,
11+
"workingDir": ".",
12+
"envFile": "/home/dev/.config/agent-runtime/loom.openrouter.env",
13+
"settingsFile": "/home/dev/.claude/settings.json",
14+
"providerBaseUrl": "https://openrouter.ai/api/v1",
15+
"autonomy": "trusted-vm"
16+
}
17+
}
18+
}

deploy/loom/runtime.loom.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"runtimeName": "loom",
3+
"runtimePolicy": "You are Loom (Rising Leviathan). Publisher agent at aibtc.news. Handle publishing tasks, editorial beats, and signal filing. Operate precisely within declared scope. Preserve Loom identity continuity across runtime transitions.",
4+
"stateDir": "./state",
5+
"logDir": "./state/logs",
6+
"artifactDir": "./state/artifacts",
7+
"dbPath": "./state/runtime.db",
8+
"lockPath": "./state/dispatch.lock",
9+
"defaultProfile": "loom",
10+
"defaultAdapter": "hermes-openrouter",
11+
"maxAttempts": 3,
12+
"retryBackoffSeconds": 60,
13+
"profiles": {
14+
"loom": "../../profiles/loom/profile.json"
15+
},
16+
"adapters": {
17+
"hermes-openrouter": {
18+
"mode": "agent-cli",
19+
"driver": "claude-code",
20+
"command": "/home/dev/.local/bin/claude",
21+
"model": "anthropic/claude-sonnet-4-5",
22+
"timeoutMs": 900000,
23+
"workingDir": "../..",
24+
"envFile": "/home/dev/.config/agent-runtime/loom.openrouter.env",
25+
"settingsFile": "/home/dev/.claude/settings.json",
26+
"providerBaseUrl": "https://openrouter.ai/api/v1",
27+
"autonomy": "trusted-vm"
28+
}
29+
}
30+
}

profiles/loom/profile.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"profile_id": "loom",
3+
"style": "hermes-like",
4+
"role": "Publisher agent at aibtc.news",
5+
"system_prompt_parts": [
6+
"You are Loom (Rising Leviathan). Publisher agent at aibtc.news.",
7+
"Evaluate and file signals across aibtc-network, bitcoin-macro, and quantum beats.",
8+
"Maintain editorial precision: factual headlines, verified sources, rubric-compliant body.",
9+
"Never invent positions. Never post without verified source."
10+
],
11+
"skills": [
12+
"signal-filing",
13+
"editorial-review"
14+
],
15+
"default_adapter": "hermes-openrouter",
16+
"tool_policy": {
17+
"allow_repo_changes": false,
18+
"allow_external_post": false
19+
},
20+
"context_policy": {
21+
"include_recent_task_memory": true,
22+
"max_prompt_chars": 24000
23+
},
24+
"result_schema": {
25+
"primary_output": "operator_summary",
26+
"allow_follow_up_tasks": true,
27+
"allow_external_messages": false
28+
},
29+
"integration_policies": {
30+
"aibtc_news": "bridge-only"
31+
}
32+
}

templates/loom-legacy-readme.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# arc-starter — Legacy Install (Paused)
2+
3+
This arc-starter installation was paused as part of RFC 0010 Phase 1 (Loom VM handover).
4+
5+
**Snapshot SHA:** {{SNAPSHOT_SHA}}
6+
**Paused at:** {{PAUSED_AT}}
7+
**Paused by:** RFC 0010 Phase 1 — Loom VM handover task
8+
9+
## What Replaced It
10+
11+
agent-runtime is now installed at `/home/dev/agent-runtime/` with the Loom deploy profile.
12+
13+
- Config: `/home/dev/agent-runtime/deploy/loom/runtime.loom.json`
14+
- State: `/home/dev/agent-runtime/deploy/loom/state/`
15+
- Profile: `deploy/loom/IDENTITY.md`
16+
17+
## Identity Continuity
18+
19+
Loom's on-chain addresses are preserved. No new wallets were created.
20+
21+
| Network | Address |
22+
|---------|---------|
23+
| Bitcoin (Taproot) | `bc1ptqmds7ghh5lqexzd34xnf5sryxzjvlvuj2eetmhgjkp998545tequsd9we` |
24+
| Stacks | `SP1KGHF33817ZXW27CG50JXWC0Y6BNXAQ4E7YGAHM` |
25+
26+
## Disabled Services
27+
28+
The following systemd user timers/services were disabled:
29+
30+
- `arc-dispatch.timer`
31+
- `arc-sensors.timer`
32+
- `arc-web.service`
33+
- `arc-watchdog.timer`
34+
35+
## Re-enable arc-starter (Rollback)
36+
37+
If agent-runtime needs to be reverted:
38+
39+
```bash
40+
systemctl --user enable --now arc-dispatch.timer arc-sensors.timer arc-web.service
41+
```
42+
43+
This repository remains intact at this path. No files were deleted.

0 commit comments

Comments
 (0)