feat(operators): amendment workflow and automated drive watchdog daemon
This commit is contained in:
@@ -84,6 +84,30 @@ box md write 646 .ssh/authorized_keys --file ~/.ssh/id_ed25519.pub
|
||||
box md write 646 HEARTBEAT.md --content "- [ ] Check local reverse SSH tunnel every 5 minutes"
|
||||
```
|
||||
|
||||
### F. Proposing & Appending Amendments to Centralized Share
|
||||
Agents and operators can safely propose updates and amendments to `shared/operators/`:
|
||||
```bash
|
||||
# Safely append a lesson learned or operational discovery
|
||||
box md append AGENTS.md "Dev CDP relay verified on port 9455." --author "dev" --section "Relay Verification"
|
||||
|
||||
# Amend a full shared template (with safety checks and automatic git commit)
|
||||
box md amend TOOLS.md --file /path/to/updated_tools.md --author "646" --reason "Updated ttyd watchdog command"
|
||||
|
||||
# Pull the latest canonical shared file into an agent's container
|
||||
box md pull pip AGENTS.md
|
||||
```
|
||||
|
||||
### G. Automated Drive Watchdog & Healing Daemon
|
||||
A background service continuously verifies DRIVE scores and auto-heals degraded or missing checklists:
|
||||
```bash
|
||||
# Check watchdog status and systemd timer
|
||||
box md watchdog status
|
||||
|
||||
# Trigger an immediate audit and healing cycle
|
||||
box md watchdog run
|
||||
```
|
||||
The watchdog runs via systemd timer (`agent-drive-watchdog.timer`) every 10 minutes on the host, logging state to `/tmp/agent-drive-watchdog.json`.
|
||||
|
||||
---
|
||||
|
||||
## 3. Container SSH Access & Reverse Tunnel Architecture
|
||||
@@ -123,5 +147,6 @@ cat shared/operators/SOUL.md | ssh -o StrictHostKeyChecking=no -J super@34.139.3
|
||||
|
||||
## 4. Key Takeaways & Best Practices
|
||||
1. **Never leave `HEARTBEAT.md` empty**: If an agent has an empty checklist, its background runner will remain completely dormant.
|
||||
2. **Relative Paths in Hatch RPC**: Hatch WebSocket RPC rejects absolute paths (`/SOUL.md` fails; `SOUL.md` succeeds).
|
||||
3. **Dual Access Redundancy**: If SSH reverse tunnels drop, Hatch WebSocket RPC is independent of SSH and can be used immediately to inspect logs, repair `authorized_keys`, or restart watchdog scripts.
|
||||
2. **Safety Gates on Amendments**: `box md amend` automatically validates that amendments do not remove checklists or revert `SOUL.md` to passive templates.
|
||||
3. **Relative Paths in Hatch RPC**: Hatch WebSocket RPC rejects absolute paths (`/SOUL.md` fails; `SOUL.md` succeeds).
|
||||
4. **Dual Access Redundancy**: If SSH reverse tunnels drop, Hatch WebSocket RPC is independent of SSH and can be used immediately to inspect logs, repair `authorized_keys`, or restart watchdog scripts.
|
||||
|
||||
Reference in New Issue
Block a user