aesop / dash
CLAUDE.md2 starsChanged 31 days agoMITView on GitHub
watchdog-gui.sh reads (configured via AESOP_ROOT, default: .; all paths relative to it): - $CONDUCTOR_ROOT/state/.watchdog-heartbeat — watchdog heartbeat (epoch seconds), the path backup-fleet.sh writes; resolved by resolve_conductor_root in daemons/conductor-root.sh (CONDUCTOR_ROOT env wins; else the sibling of the canonical aesop tree if it holds state/.watchdog-heartbeat; else $HOME/conductor3 under the same heartbeat test; else no path → the GUI prints UNRESOLVED, never STALE or ALIVE). A bare state/ dir is not a marker: a stray sibling can hold only state/pr-sweep.log. watchdog-gui.sh sources that…
- Reads credentials
In this repository21 other files it gives its agents.
- auth/CLAUDE.mdCLAUDE.md
- bin/CLAUDE.mdCLAUDE.md
- chat/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- daemons/CLAUDE.mdCLAUDE.md
- driver/CLAUDE.mdCLAUDE.md
- hooks/CLAUDE.mdCLAUDE.md
- mcp/CLAUDE.mdCLAUDE.md
- monitor/CLAUDE.mdCLAUDE.md
- scan/CLAUDE.mdCLAUDE.md
- skills/CLAUDE.mdCLAUDE.md
- state_store/CLAUDE.mdCLAUDE.md
- stdio/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- tools/CLAUDE.mdCLAUDE.md
- ui/CLAUDE.mdCLAUDE.md
- buildsystemSkill
- dashboardSkill
- fleetSkill
- healthcheckSkill
- powerSkill
The file
Files
dash/ — Real-time TUI fleet monitoring (watchdog + agent activity)
Universal rules (every domain)
- Feature branch only, never main; every push gated by
python tools/secret_scan.py --stagedexit 0. - Tests never pollute cwd or global git config; temp dirs only; dummy secrets are runtime-concatenated, never literal.
- In worktrees use ABSOLUTE paths under the worktree for every write.
- Domain docs stay minimal-but-complete; update this file in the same PR as code it describes.
Files & responsibilities
- watchdog-gui.sh — TUI dashboard: 4s refresh loop, double-buffered (no flicker), displays daemon status/heartbeats/alerts. Read-only. Launch in dedicated terminal window (never inside tool shell). CRLF-safe (no line continuations), POSIX portable.
- dash-extra.mjs — Agent activity detector: scans transcript JSONLs (modified <12min), reads security alerts. Two output modes: TUI (default) or JSON (
--jsonflag for web/CLI consumers). Gracefully prints "unavailable" if node missing (doesn't fail watchdog).
State contracts
watchdog-gui.sh reads (configured via AESOP_ROOT, default: .; all paths relative to it):
$CONDUCTOR_ROOT/state/.watchdog-heartbeat— watchdog heartbeat (epoch seconds), the path backup-fleet.sh writes; resolved byresolve_conductor_rootindaemons/conductor-root.sh(CONDUCTOR_ROOTenv wins; else the sibling of the canonicalaesoptree if it holdsstate/.watchdog-heartbeat; else$HOME/conductor3under the same heartbeat test; else no path → the GUI printsUNRESOLVED, never STALE or ALIVE). A barestate/dir is not a marker: a stray sibling can hold onlystate/pr-sweep.log. watchdog-gui.sh sources that helper and never re-derives the path itself (keeps the portability ratchet clean). NeverAESOP_ROOT/state.state/FLEET-BACKUP.log— append-only recent events (tail -3 displayed)state/SECURITY-ALERTS.log— all lines; counts HIGH/MED (filters RESOLVED-FP); displayed as badgestate/.watchdog-repos.json— JSON array of repo status (jq-parsed)state/.heartbeats/*— per-agent epoch files; per-agent thresholds from config (see below)
Heartbeat thresholds loaded from aesop.config.json (if present + jq available; else built-in defaults):
.monitor.heartbeat_thresholds.monitor(default 3600s).monitor.heartbeat_thresholds.watchdog(default 300s).monitor.heartbeat_thresholds.default(default 1800s)
dash-extra.mjs reads (env var > config > default; all paths):
AESOP_ROOT(env) or<home>/aesop→aesop.config.json→ expanded via tilde +$VARsubstitution- Home is
os.homedir()(USERPROFILE on Windows, HOME on POSIX), neverprocess.env.HOMEalone: HOME is unset on native Windows PowerShell and scheduled-task launches. AESOP_TRANSCRIPTS_ROOT(env) or config.transcripts_rootor<home>/.claude/projects→ scansagent-*.jsonlfiles (mtime <12min, top 8 recent)AESOP_STATE_ROOT(env) or config.state_rootor{AESOP_ROOT}/state→ readsSECURITY-ALERTS.logfor severity (HIGH/MED/DRIFT)- Local cache:
{STATE_ROOT}/.dash-extra-cache.json(persisted metadata; optimization only, safe to drop). Pruned on each--jsonsave to transcripts seen in that run; never storespromptFull(re-derived from the transcript head on a cache hit) (tracker 44ce0f022454)
Invariants & gotchas
- Read-only dashboards — no state mutations; both tools are observers only.
- Infinite loop design — watchdog-gui.sh runs forever; always launch in dedicated terminal, never inside a tool shell (will block the shell indefinitely).
- CRLF-safe — watchdog-gui.sh uses no bash line continuations; portable across CRLF/LF line endings.
- Node optional — dash-extra.mjs gracefully degrades if node missing; watchdog does not fail (prints "unavailable" for agents panel).
- Double-buffered rendering — watchdog-gui.sh uses ANSI codes (
\033[H,\033[J) to avoid flicker; cursor hidden/restored.
Fleet CLI consumer contract (dash-extra.mjs JSON mode)
Input: node dash-extra.mjs --json
Output: JSON array of agent objects with fields:
{
"name": "agent-<timestamp>",
"path": "full/path/to/agent-<timestamp>.jsonl",
"mtime": <unix_ms>,
"age": "<display_string>",
"dispatch": "<prompt_summary>",
"tokens": { "input": <n>, "output": <n>, "total": <n> },
"task": "<label>",
"runtime": "<duration>"
}Callers must handle parse errors gracefully (malformed JSONL lines skipped, cache corruption tolerated).
Test/launch commands
Single run (verify output):
AESOP_ROOT=. bash dash/watchdog-gui.sh &
sleep 5 && kill %1 # kill after 5s to break infinite loopStandalone TUI (monitor dashboard):
AESOP_ROOT=/path/to/aesop bash dash/watchdog-gui.sh
# Ctrl-C to exitAgent activity (TUI):
node dash/dash-extra.mjsAgent activity (JSON for web/CLI):
AESOP_TRANSCRIPTS_ROOT=~/.claude/projects node dash/dash-extra.mjs --json | jq '.[] | select(.tokens.total > 1000)'Dropped (reason)
- Detailed render_frame() implementation — moved to watchdog-gui.sh code comments.
- Config loading boilerplate for dash-extra.mjs — inlined as env var precedence rule above.
- ANSI color definitions (R/G/Y/M/C/B/D/X) — implementation detail, not needed for workers.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

