agent-of-agent-of-empires
AGENTS.md15 starsChanged 9 months agoMITView on GitHub
aoaoe (Agent of Agent of Empires) is an autonomous supervisor daemon for agent-of-empires sessions. Uses OpenCode or Claude Code as its reasoning engine. Observes agents via tmux, decides when to intervene, acts. Three loops: poll sessions, reason about observations, execute actions. The reasoner gets a system prompt defining the supervisor role + per-session project context (auto-discovered AI instruction files from each session's resolved directory). The main loop is split into two layers: - loop.ts — pure tick logic (poll ->…
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,117 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- claude.mdCLAUDE.md
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 647
Add/remove sessions from groups, compute group-level health, cost, progress, active session count.
- Very specific: line 891
All modules are instantiated in main().
- Very specific: line 919
src/input.ts: Add handler type, private field, on<Name>(handler) registration method, and case "/<name>": in handleCommand(). - Very specific: line 923
src/tui.ts: Add any state fields and getter/setter methods. - Very specific: line 947
Run: npm test (unit) or npm run integration-test (e2e)
- Distinctive: line 967
Only add features when explicitly requested: Don't ship module #197 until the core is bulletproof.
- Very specific: line 970
When features ARE requested, follow the established pattern: standalone module → test → wire into input.ts + index.ts → update docs.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Guidelines for aoaoe
Overview
aoaoe (Agent of Agent of Empires) is an autonomous supervisor daemon for agent-of-empires sessions. Uses OpenCode or Claude Code as its reasoning engine. Observes agents via tmux, decides when to intervene, acts.
Quick Reference
npm run build # tsc -> dist/
npm test # build + node --test (node:test stdlib)
npm run integration-test # end-to-end test with real aoe sessions (~30s)
npm start # run daemon
aoaoe init # detect environment, generate aoaoe.config.json
aoaoe --dry-run # observe + reason, don't execute
aoaoe --verbose # verbose logging
aoaoe tasks # show task progress from persistent state
aoaoe test-context # safe read-only scan of sessions + context discovery
aoaoe-chat # interactive chat UIArchitecture
Poller (aoe CLI + tmux capture)
-> Reasoner (OpenCode SDK or Claude Code subprocess)
-> Executor (tmux send-keys, aoe CLI commands)Three loops: poll sessions, reason about observations, execute actions. The reasoner gets a system prompt defining the supervisor role + per-session project context (auto-discovered AI instruction files from each session's resolved directory).
The main loop is split into two layers:
loop.ts— pure tick logic (poll -> reason -> execute + policy tracking). Testable with MockPoller/MockReasoner/MockExecutor. No UI, no IPC.index.ts—daemonTick()wrapsloop.tstick() with dashboard, status line, IPC state file, console output, and interrupt support.
AoE plugin mode (aoe-plugin.toml + src/plugin/) reuses the same
loop.ts seam with a JSON-RPC worker over the official AoE plugin API
(sessions.list, sessions.create, sessions.turn.send, ui.state.set,
plugin.storage.*) instead of tmux + the aoe CLI. Built at install time by
scripts/plugin-build.mjs into .aoe-build/dist/ (the only directory AoE
excludes from the plugin integrity hash). Modules: protocol (stdio framing),
host (typed RPCs), settings, attention (queue scoring), plugin-poller,
plugin-executor (policy gates + in-batch cooldowns), rules-reasoner
(deterministic, no LLM), spawn (GitHub issues -> sessions), ui
(card/pane/badge payloads), worker (entry point). Design: DESIGN.md.
Source Layout
| File | Purpose |
src/index.ts | Main daemon loop, daemonTick() wrapper, subcommands (init, register, tasks, status, config, test-context) |
src/loop.ts | Extracted tick logic (poll -> reason -> execute), testable with mocks |
src/config.ts | Config loader, CLI arg parser, env validation |
src/types.ts | All interfaces — SessionSnapshot, Observation, Action, Reasoner, AoaoeConfig |
src/poller.ts | aoe list --json + tmux capture-pane, SHA-256 diff detection |
src/context.ts | discoverContextFiles, resolveProjectDir, loadSessionContext, caching |
src/task-manager.ts | Task orchestration: load definitions, persistent state, session reconciliation |
src/executor.ts | Action dispatch — send_input, start/stop/restart, create/remove, report_progress, complete_task |
src/tui.ts | In-place terminal UI with scroll region, resize, activity buffer |
src/activity.ts | User activity detection via tmux list-clients |
src/message.ts | Message classification, formatting, receipts, skip-sleep logic |
src/wake.ts | Wakeable sleep using fs.watch — message latency ~100ms |
src/notify.ts | Webhook + Slack notification dispatcher for daemon events |
src/health.ts | HTTP health check endpoint (GET /health returns JSON status) |
src/colors.ts | Shared ANSI color/style constants |
src/config-watcher.ts | Config hot-reload — fs.watch on config file, safe field merge |
src/tui-history.ts | Persisted TUI history — JSONL file with rotation, load/append/replay |
src/export.ts | Timeline export — merges actions.log + tui-history into JSON/Markdown |
src/tail.ts | aoaoe tail — live-stream daemon activity to a separate terminal |
src/stats.ts | aoaoe stats — aggregate daemon statistics from actions + history |
src/replay.ts | aoaoe replay — play back tui-history.jsonl like a movie with timing |
src/prompt-watcher.ts | Reactive permission prompt clearing via tmux pipe-pane |
src/reasoner/index.ts | createReasoner() factory |
src/reasoner/prompt.ts | buildSystemPrompt(), formatObservation(), detectPermissionPrompt() |
src/reasoner/parse.ts | Response parsing, JSON extraction, action validation |
src/reasoner/opencode.ts | OpenCode HTTP backend (native fetch to opencode serve) |
src/reasoner/claude-code.ts | Claude Code subprocess backend (claude --print) |
src/chat.ts | Interactive chat UI entry point (aoaoe-chat) |
src/dashboard.ts | CLI status table with per-pane tasks + countdown |
src/daemon-state.ts | IPC state file (~/.aoaoe/daemon-state.json) + interrupt flag + debounce |
src/task-parser.ts | Parse OpenCode TODO patterns, model/context/cost from pane output |
src/task-cli.ts | aoaoe task subcommand — list, start, stop, edit, new, rm |
src/console.ts | Conversation log, narrated observations, friendly errors |
src/input.ts | Stdin listener with inject() for post-interrupt text |
src/init.ts | aoaoe init: auto-discover tools, sessions, reasoner; generate config; auto-start opencode serve |
src/session-summarizer.ts | Plain-English activity digests from tmux output (no LLM) |
src/conflict-detector.ts | Cross-session file edit conflict detection + auto-resolution |
src/goal-detector.ts | Heuristic goal completion detection from git/test/todo signals |
src/cost-budget.ts | Per-session cost budgets with auto-pause enforcement |
src/activity-heatmap.ts | Per-session activity sparklines using Unicode block characters |
src/audit-trail.ts | Structured JSONL audit log of all daemon decisions |
src/fleet-snapshot.ts | Periodic fleet state snapshots for time-travel debugging |
src/budget-predictor.ts | Predictive budget exhaustion from cost burn rate regression |
src/task-retry.ts | Auto-retry failed tasks with exponential backoff + jitter |
src/audit-search.ts | Structured audit trail search by type, session, time, keyword |
src/adaptive-poll.ts | Dynamic poll interval — speeds up when active, slows when idle |
src/fleet-forecast.ts | Fleet-wide cost forecasting from aggregated budget predictions |
src/session-priority.ts | Session priority queue by health, staleness, error, stuck state |
src/notify-escalation.ts | Progressive notification escalation: normal → elevated → critical |
src/drift-detector.ts | Goal drift detection via keyword overlap heuristic |
src/goal-progress.ts | Task % completion estimation from multi-signal heuristics |
src/session-pool.ts | Concurrent active session pool limits with queuing |
src/reasoner-cost.ts | Per-reasoning-call token usage and cost tracking |
src/anomaly-detector.ts | Z-score anomaly detection across fleet session metrics |
src/fleet-sla.ts | Fleet health SLA monitoring with sliding window + breach alerts |
src/progress-velocity.ts | Progress velocity tracking + ETA estimation per task |
src/dep-scheduler.ts | Dependency-aware pool scheduling with capacity limits |
src/observation-cache.ts | LLM response caching via observation content hashing |
src/fleet-rate-limiter.ts | Fleet-wide API spend rate limiting (hourly + daily caps) |
src/context-compressor.ts | Observation compression: summarize old lines, keep recent |
src/recovery-playbook.ts | Auto-execute recovery steps when health drops |
src/lifecycle-analytics.ts | Task lifecycle stats: throughput, duration, success rate |
src/cost-attribution.ts | Cost breakdown by repo, status, efficiency |
src/goal-decomposer.ts | Auto-split complex goals into sub-tasks with dependencies |
src/priority-reasoning.ts | Priority-aware observation filtering for reasoner calls |
src/session-memory.ts | Persistent per-session learnings across daemon restarts |
src/dep-graph-viz.ts | ASCII dependency graph visualization + cycle detection |
src/approval-queue.ts | Operator approval queue for batched async human review |
src/fleet-diff.ts | Fleet snapshot comparison CLI + TUI command |
src/session-templates.ts | Pre-configured session profiles (frontend, backend, infra, etc.) |
src/difficulty-scorer.ts | Task complexity estimation from goal analysis |
src/smart-nudge.ts | Context-aware nudge generation using session memory |
src/fleet-utilization.ts | Per-hour fleet activity heatmap for capacity planning |
src/template-detector.ts | Auto-detect session template from repo file patterns |
src/fleet-search.ts | Ranked full-text search across all session outputs |
src/nudge-tracker.ts | Nudge effectiveness tracking with response time stats |
src/difficulty-allocator.ts | Difficulty-weighted pool slot allocation |
src/session-graduation.ts | Auto-promote sessions confirm→auto based on track record |
src/approval-workflow.ts | Route low-confidence decisions through approval queue |
src/goal-refiner.ts | Learn from completed tasks to suggest goal improvements |
src/fleet-export.ts | Generate self-contained HTML fleet report |
src/service-generator.ts | Generate systemd/launchd service files for boot start |
src/cli-completions.ts | Shell autocomplete scripts (bash, zsh, fish) |
src/session-replay.ts | Replay session activity timeline from audit trail |
src/workflow-engine.ts | Multi-session workflow DAG with fan-out/fan-in stages |
src/multi-reasoner.ts | Route sessions to different LLM backends by config/template/difficulty |
src/workflow-templates.ts | Pre-built workflow definitions (CI/CD, feature-dev, refactor, incident) |
src/session-checkpoint.ts | Save + restore transient daemon state across restarts |
src/token-quota.ts | Per-model token quotas for fleet-wide rate limiting |
src/ab-reasoning.ts | A/B reasoning: compare two backends, track which wins |
src/workflow-cost-forecast.ts | Estimate workflow cost from difficulty + historical rates |
src/workflow-chain.ts | Chain workflows with cross-workflow dependencies |
src/fleet-federation.ts | Multi-host fleet coordination via HTTP health endpoints |
src/output-archival.ts | Compress + archive old session outputs to gzipped files |
src/runbook-generator.ts | Auto-generate operator runbooks from audit trail patterns |
src/alert-rules.ts | Custom fleet alerting rules with severity + cooldown |
src/alert-rule-dsl.ts | User-defined alert rules via config DSL |
src/alert-composer.ts | AND/OR composition of alert conditions |
src/health-forecast.ts | Linear regression health trend prediction + SLA breach ETA |
src/session-tail.ts | Live tail of session output with pattern highlighting |
src/workflow-viz.ts | ASCII DAG rendering for workflows + chains |
src/metrics-export.ts | Prometheus-compatible /metrics text exposition |
src/fleet-grep.ts | Regex search across gzipped output archives |
src/runbook-executor.ts | Step-by-step execution of generated runbooks |
src/session-clone.ts | Clone sessions for A/B experimentation |
src/goal-similarity.ts | Jaccard similarity detection for overlapping goals |
src/cost-allocation-tags.ts | Tag sessions by team/project for cost grouping |
src/predictive-scaling.ts | Auto-adjust pool size from utilization patterns |
src/session-snapshot-diff.ts | Line-level diff between session output snapshots |
src/session-tag-manager.ts | Key-value tag store for sessions (team, project, etc.) |
src/session-idle-detector.ts | Detect prolonged idle sessions, escalate nudge → pause → reclaim |
src/goal-conflict-resolver.ts | Cross-session goal conflict analysis via keyword + file + dependency overlap |
src/fleet-leaderboard.ts | Rank sessions by composite productivity score (completion, velocity, cost) |
src/session-health-history.ts | Rolling-window health score tracker per session with sparkline trend viz |
src/cost-anomaly-throttle.ts | Auto-throttle poll rate for cost-anomalous sessions (EMA burn rate vs fleet avg) |
src/smart-session-naming.ts | Auto-generate descriptive session titles from repo path + goal keywords |
src/operator-shift-handoff.ts | Structured handoff notes with fleet state, alerts, recommendations (TUI + markdown) |
src/session-dep-auto-detect.ts | Infer inter-session dependencies from goals, files, repos, explicit declarations |
src/cost-forecast-alert.ts | Project costs at daily/weekly/monthly intervals + fire alerts on threshold breach |
src/fleet-event-bus.ts | Typed pub/sub event bus (22 event types, wildcard subs, history, error-resilient) |
src/goal-completion-verifier.ts | Post-completion regression scanner (7 positive + 8 negative output patterns) |
src/session-output-diff.ts | Line-level diff between consecutive captures (LCS + tail-diff, ANSI stripping) |
src/session-heartbeat.ts | Tmux pane crash detection via output hash tracking (alive/stale/unresponsive/dead) |
src/action-replay.ts | Step through daemon decision history with tick grouping, seek, filter-by-session |
src/fleet-config-profiles.ts | Named config presets (dev, ci, incident, conservative, overnight) + user profiles |
src/daemon-diagnostics.ts | /doctor self-diagnostics: node, config, state, reasoner, poll, uptime, sessions |
src/session-state-machine.ts | 11-state lifecycle state machine with 31 guarded transitions |
src/incremental-context.ts | Mtime/size fingerprinting for skip-unchanged context file reloads |
src/daemon-metrics-histogram.ts | Per-tick latency distribution (p50/p90/p99) with ASCII histograms |
src/session-peer-review.ts | Cross-session code review gating with approve/reject/expire workflow |
src/fleet-warm-standby.ts | Pre-warm session slots with loaded context for instant task activation |
src/session-output-redaction.ts | Auto-strip secrets/PII (11 default rules: tokens, keys, JWTs, emails, IPs) |
src/fleet-compliance-checker.ts | Verify sessions follow org policy (naming, budgets, tags, idle, goals) |
src/daemon-plugin-hooks.ts | Lifecycle hooks (7 phases) with priority ordering + error isolation |
src/fleet-incident-timeline.ts | Chronological error/failure/recovery timeline with hot-session ranking |
src/session-output-bookmarks.ts | Mark output lines with labels for later reference, search, per-session filter |
src/daemon-canary-mode.ts | Run new config on canary session, compare health/cost vs baseline, promote/rollback |
src/daemon-config-diff.ts | Track config snapshots, compute field-level diffs (added/removed/changed) |
src/goal-auto-priority.ts | Rank goals by urgency keywords, impact keywords, deps, age, priority tags |
src/fleet-capacity-forecaster.ts | Predict pool exhaustion from utilization, queue depth, completion/arrival rates |
src/daemon-watchdog.ts | Self-recovery on main loop stalls (warn → restart → exit escalation) |
src/fleet-cost-regression.ts | Alert when per-session cost deviates from historical rolling baseline |
src/goal-cascading.ts | Parent goals auto-generate child goals with tree structure + auto-completion |
src/daemon-health-score.ts | Composite health metric from 7 weighted subsystems (A-F grading) |
src/fleet-event-replay.ts | Replay event bus history with step/seek/filter playback controls |
src/session-context-budget.ts | Relevance-scored context file selection within token budget |
src/daemon-tick-profiler.ts | Per-phase tick timing breakdown with bottleneck identification |
src/goal-confidence-estimator.ts | Predict goal completion probability from 6 weighted factors |
src/fleet-budget-planner.ts | Distribute cost budget across sessions by priority + progress |
src/session-sentiment.ts | Classify output tone (17 patterns, 7 sentiments: success/progress/blocked/etc) |
src/fleet-workload-balancer.ts | Detect uneven loads, classify overloaded/underloaded, suggest moves |
src/daemon-crash-report.ts | Auto-generate diagnostic report on exit (state, errors, memory, config) |
src/fleet-session-grouping.ts | Logical session groups with per-group aggregate stats (health/cost/progress) |
src/session-context-diff.ts | Track context file content hashes, detect added/removed/modified between ticks |
src/daemon-config-schema.ts | JSON Schema-style config validation with type/range/enum/nested checks |
src/session-transcript-export.ts | Export session transcript as self-contained markdown (metadata+progress+output) |
src/goal-decomp-quality.ts | Rate sub-goal keyword coverage of parent goal (A-F grades + suggestions) |
src/fleet-anomaly-correlation.ts | Correlate anomalies by time proximity to detect fleet-wide root causes |
src/goal-critical-path.ts | Longest dependency chain via topo-sort + DP (bottleneck ID, parallelizable count) |
src/fleet-snapshot-compression.ts | Delta-encode fleet snapshots (added/removed/modified) with auto-compaction |
src/session-output-annotations.ts | Programmatic output line annotations with label/severity/note/creator |
src/goal-celebration.ts | Achievement summaries with badges for completed goals (7 badge types) |
src/fleet-readiness-score.ts | 10-check composite readiness metric (READY/CAUTION/NOT READY) |
src/daemon-process-supervisor.ts | Crash history + exponential backoff + max-restart window + uptime tracking |
src/fleet-daily-digest.ts | Auto-generated daily fleet summary (completions, failures, costs, health) |
src/goal-nl-parser.ts | Extract structured goals from freeform text (verbs, nouns, deps, tags, priority) |
src/daemon-hot-swap.ts | Module version registry with swap/rollback/validation/enable-disable |
src/fleet-webhook-integrations.ts | Slack/Teams/Discord/generic webhook payload formatting |
src/session-structured-log.ts | Parse output into 8 structured event types with ANSI stripping |
src/daemon-state-portable.ts | Portable daemon state export/import with secret sanitization |
src/session-output-dedup.ts | Detect and collapse consecutive repeated output lines (×N count) |
src/daemon-config-migration.ts | Auto-upgrade config through 4 sequential migrations (v1→v5) |
src/goal-progress-prediction.ts | ML-free statistical completion prediction (linear + historical blend) |
src/fleet-ops-dashboard.ts | Full-screen fleet monitor with box-drawing (sessions, metrics, events) |
src/goal-dep-auto-repair.ts | Fix broken dep chains from completed/removed/failed tasks + cycle detection |
src/session-pattern-evolution.ts | Track output pattern frequency shifts over time with sparkline trends |
src/fleet-alert-dashboard.ts | Unified alert view with acknowledge/dismiss, severity counts, source filter |
src/session-lang-detector.ts | Detect programming language from output patterns (10 languages) |
src/goal-sla-enforcement.ts | Per-goal time limits with ok/warning/breached status + auto-escalation |
src/fleet-auto-scaler.ts | Scale session slots by utilization + queue depth (scale-up/down/hold) |
src/goal-gamification.ts | XP/levels/badges for sessions based on completions + streaks |
src/daemon-audit-report.ts | Compliance audit reports with action breakdown + grading |
src/daemon-startup-profiler.ts | Measure module init time, identify bottlenecks for cold-start optimization |
src/fleet-affinity-groups.ts | Auto-group sessions by repo path similarity |
src/session-clipboard.ts | Copy output snippets to system clipboard (cross-platform) |
src/daemon-graceful-shutdown.ts | Drain active sessions before exit with phased shutdown |
src/goal-dep-impact.ts | BFS downstream impact analysis for goal changes/failures |
src/fleet-runbook-library.ts | 6 built-in runbooks for common operational scenarios |
src/goal-dep-graph-export.ts | Export dep graph as DOT (Graphviz), Mermaid, or ASCII |
src/daemon-perf-regression.ts | Detect tick processing time regressions via rolling median baseline |
src/fleet-compliance-report.ts | 5-section compliance report (policy, SLA, incidents, cost, health) |
src/fleet-cost-optimizer.ts | Actionable cost reduction recommendations (throttle/pause/complete/review) |
src/goal-progress-heatmap.ts | Hourly progress visualization with Unicode heat characters |
src/daemon-module-deps.ts | Inter-module dependency graph with roots/leaves/category breakdown |
src/fleet-cost-trend.ts | Week-over-week cost trend with sparkline + weekly/monthly projection |
src/goal-complexity-tagger.ts | Tag goals with complexity level (trivial→epic) from keyword + scope analysis |
src/daemon-event-sourcing.ts | Immutable event store with query/replay/type counts for state reconstruction |
src/daemon-distributed-lock.ts | PID-based lockfile with staleness detection to prevent concurrent daemons |
src/session-output-correlation.ts | Find related sessions via keyword overlap in recent output |
src/fleet-utilization-forecaster.ts | Predict next-day utilization from day-of-week hourly patterns |
src/fleet-snapshot-time-machine.ts | Snapshot browser with take/compare/diff + time range queries |
src/goal-sparkline-dashboard.ts | All-session progress sparklines with trend detection |
src/daemon-tick-budget.ts | Per-phase compute budget allocation with overrun tracking |
src/session-goal-mutation.ts | Track goal text changes over time with scope creep detection |
src/fleet-cost-chargeback.ts | Cost allocation by team/project tag with chargeback invoicing |
src/goal-prediction-ensemble.ts | Confidence-weighted ensemble of multiple prediction methods |
src/api-server.ts | REST API server with bearer auth, OpenAPI 3.1 spec, SSE events, route registry |
src/alert-rule-inheritance.ts | Child alert rules inherit parent severity/cooldown/condition with cycle detection |
src/session-affinity-router.ts | Route sessions to reasoner instances by capacity, tags, history, affinity rules |
src/batch-goal-assignment.ts | Parse structured goal manifests for bulk loading with dependency validation |
src/api-rate-limiting.ts | Per-client request throttling for REST API with sliding window + burst allowance |
src/cross-session-knowledge.ts | Share learnings between sessions with category/tag/repo search + relevance scoring |
src/fleet-priority-matrix.ts | 2D urgency × importance classification into Eisenhower quadrants |
src/api-webhook-push.ts | Push fleet events to external URLs with HMAC signing + retry + backoff |
src/audit-trail-retention.ts | Configurable TTL with archival for audit trail entries |
src/goal-velocity-normalization.ts | Normalize velocity by complexity tier with weighted scoring + fleet comparison |
src/session-error-pattern-library.ts | 28 curated regex patterns for errors across 10+ languages with suggestions |
src/daemon-resource-monitor.ts | Track CPU/memory per tick with trend detection + sparkline visualization |
src/api-pagination.ts | Cursor-based pagination with forward/backward navigation + HTTP headers |
src/goal-progress-burndown.ts | ASCII burndown chart with actual vs ideal, scope-creep detection, ETA |
src/daemon-memory-leak-detector.ts | Heap growth tracking with linear regression, R² fit, leak classification |
src/fleet-session-topology.ts | Directed graph of session relationships with cluster/hub/leaf detection |
src/model-config.ts | Default model enforcement — discover models from opencode config, enforce across sessions |
src/shell.ts | Child process helpers |
src/integration-test.ts | End-to-end integration test (real aoe sessions, tmux, daemon) |
Key Design Decisions
Two usage modes for aoe
- Single-repo: User runs
aoefrom inside a project.session.pathpoints to the project directly. - Meta-level: User runs
aoefrom a parent dir (e.g.~/repos/), manually names sessions to match projects. All sessions share the samepath.resolveProjectDir()searches 2 levels deep to find the actual project dir by matching the session title.
sessionDirs config
Explicit session title -> project directory mapping via sessionDirs in config.
Checked first in resolveProjectDir() before heuristic filesystem search.
Supports absolute and relative paths, case-insensitive title matching.
Falls back to heuristic when key not found or mapped path doesn't exist on disk.
Context loading
Auto-discovers AI instruction files from each session's project directory.
One readdir call, pattern match, done. Loads AGENTS.md + claude.md
first, then other AI tool files (*rules, *instructions*, .aider*,
CODEX.md, CONTRIBUTING.md), known nested paths, user extras, and
parent directory group-level claude.md.
De-duplication uses device+inode (handles macOS/Windows case-insensitive FS and Linux case-sensitive FS correctly). Budget: 8KB per file, 24KB per directory, cached 60s.
Intelligence modules (v0.196+)
One hundred and thirty-eight modules run every daemon tick without LLM calls:
- SessionSummarizer (
session-summarizer.ts): pattern-based activity classification (coding, testing, building, committing, error, idle, etc.) with priority-ranked pattern matching. Exposed via/activity. - ConflictDetector (
conflict-detector.ts): tracks file edits per session in a sliding time window (default 10 min). When 2+ sessions edit the same code file, logs a conflict alert and auto-pauses the lower-priority session.resolveConflicts()uses explicit priority or edit-count fallback. Exposed via/conflicts. - Goal completion detector (
goal-detector.ts): scans new output for completion signals (git push, tests passing, version bumps, all TODOs done, explicit "done" messages, idle-after-progress). Aggregates confidence with diminishing returns. Auto-completes tasks above 0.7 threshold. - Cost budget enforcer (
cost-budget.ts): compares parsed$N.NNcost againstcostBudgets.globalBudgetUsdor per-session overrides. Auto-pauses tasks that exceed budget. - ActivityTracker (
activity-heatmap.ts): records change events per session in fixed-width time buckets (default 1min, 30 buckets). Renders Unicode sparklines (▁▂▃▄▅▆▇█). Exposed via/heatmap. - Audit trail (
audit-trail.ts): structured JSONL log of every daemon decision — reasoner actions, auto-completions, budget pauses, conflict detections, operator commands. Rotates at 50MB. Exposed via/audit [N]and/audit-stats. - Fleet snapshots (
fleet-snapshot.ts): periodic auto-save of full fleet state (sessions, tasks, health, costs, summaries) every ~10min. SupportsdiffFleetSnapshots()for time-travel comparison. Manual trigger via/fleet-snap. - BudgetPredictor (
budget-predictor.ts): records cost samples per session each tick, computes $/hr burn rate via linear regression, predicts time-to-budget-exhaustion. Alerts when exhaustion is imminent (<30min). Exposed via/budget-predict. - TaskRetryManager (
task-retry.ts): auto-retries failed tasks with exponential backoff + jitter. Configurable max retries (default 3), base delay (60s), max delay (30min). Exhausted tasks are logged. Exposed via/retries. - Audit search (
audit-search.ts): structured search of the audit trail by type, session, keyword, time range. Supportslast:2h,type:auto_complete,session:adventure. Exposed via/audit-search. - AdaptivePollController (
adaptive-poll.ts): dynamic poll interval. Speeds up (min 5s) after 2+ consecutive active ticks; slows down (max 60s) after 3+ consecutive idle ticks. Resets to base on operator input. Replaces the fixedconfig.pollIntervalMsin the sleep call./poll-status. - Fleet forecast (
fleet-forecast.ts): aggregates all session budget predictions into total fleet burn rate, projected daily/weekly cost, earliest exhaustion, and over-budget/imminent session lists./fleet-forecast. - Session priority queue (
session-priority.ts): ranks sessions by urgency using weighted scoring (error=100, stuck=80, failed=70, low health, staleness, user-active=-200)./priority. - Notification escalation (
notify-escalation.ts): progressive escalation of stuck-task notifications. Normal → elevated (after N notifications) → critical (after more). Supports separate webhook URLs per escalation level (DM, SMS, pager). Cooldown between notifications./escalations. - Drift detector (
drift-detector.ts): compares goal keywords against recent session output. If fewer than 15% of goal keywords appear in output, flags the session as drifted./drift. - Goal progress estimator (
goal-progress.ts): multi-signal % completion. Weighs bullet-point goal items matched, progress entry count, elapsed time, and output patterns (git push, tests passing)./goal-progress. - Session pool manager (
session-pool.ts): caps concurrent active sessions. Queues pending tasks when at capacity, activates oldest first when a slot opens. RespectsdependsOnconstraints./pool. - Reasoner cost tracker (
reasoner-cost.ts): records input/output tokens per reasoning call. Computes avg tokens, cost per call, calls/hr, cost/hr./reasoner-cost. - Anomaly detector (
anomaly-detector.ts): z-score outlier detection across fleet metrics (cost rate, activity rate, error count, idle duration). Flags sessions >2σ from fleet mean./anomaly. - Fleet SLA monitor (
fleet-sla.ts): tracks fleet-wide health over a sliding window. Alerts when average health drops below threshold (default 50). Cooldown between alerts./sla. - Progress velocity tracker (
progress-velocity.ts): records progress % samples per task each tick, computes velocity (%/hr) and ETA. Detects acceleration/deceleration/stall trends./velocity. - Dependency-aware scheduler (
dep-scheduler.ts): evaluates pending tasks against dependency graph and pool capacity. Returns activate/block/skip actions per task./schedule. - Observation cache (
observation-cache.ts): SHA-256 content hash deduplication of LLM reasoning calls. 5min TTL, 100 entries max./cache. - Fleet rate limiter (
fleet-rate-limiter.ts): caps fleet-wide API spend with hourly ($10 default) and daily ($100) limits. Cooldown on breach./rate-limit. - Context compressor (
context-compressor.ts): compresses old observation lines into scored summaries, keeping recent lines detailed. Fits within token budgets. Used pre-reasoning to reduce LLM context. - Recovery playbook (
recovery-playbook.ts): auto-execute recovery steps when health drops. 4-step default: nudge → restart → pause → escalate. Resets on health recovery, respects maxRetries./recovery. - Session idle detector (
session-idle-detector.ts): tracks per-session last-activity timestamps. Flags sessions idle beyond configurable threshold with escalating recommendations: nudge (1x), pause (2x), reclaim (3x). Stateful viacreateIdleDetector()./idle-detect. - Goal conflict resolver (
goal-conflict-resolver.ts): cross-session goal conflict analysis. Extracts keywords from goals, computes Jaccard similarity, checks file overlap, detects dependency cycles. Severity ranking (low/medium/high) with actionable suggestions./goal-conflicts. - Fleet leaderboard (
fleet-leaderboard.ts): ranks sessions by composite productivity score: 40% completion rate, 30% velocity (normalized), 30% cost efficiency. Medal emojis for top 3./leaderboard. - Session health history (
session-health-history.ts): rolling-window health score tracker per session. Records samples, computes trend (improving/degrading/stable) from first-half vs second-half average. Renders Unicode sparklines. Worst-health-first sorting./health-history. - Cost anomaly throttle (
cost-anomaly-throttle.ts): monitors per-session cost burn rates via EMA smoothing, compares against fleet average. When a session exceeds threshold (default 3x fleet avg), auto-increases its poll interval multiplier. Auto-unthrottles when costs normalize./cost-throttle. - Smart session naming (
smart-session-naming.ts): generates descriptive session title suggestions from repo path + goal text. 5 strategies: repo-verb, repo-noun, verb-noun, repo-verb-noun, basename fallback. Deduplicates against existing titles./suggest-name <repo> [goal]. - Operator shift handoff (
operator-shift-handoff.ts): generates structured handoff notes for operator shift changes. Aggregates fleet state, session health/cost, failed/paused alerts, pending approvals, and actionable recommendations. TUI and markdown output formats./handoff. - Session dependency auto-detect (
session-dep-auto-detect.ts): infers inter-session dependencies from explicit declarations, goal text references ("after X", "blocked by X"), shared file edits, and repo path overlap. Confidence-ranked (high/medium/low), deduplicated./auto-deps. - Cost forecast alert (
cost-forecast-alert.ts): projects session costs at daily/weekly/monthly intervals from current spend + burn rate. Fires alerts when projections exceed configurable thresholds ($25/day, $100/week, $300/month default). Critical severity for imminent breaches (<2h)./cost-forecast. - Fleet event bus (
fleet-event-bus.ts): typed pub/sub event system with 22 event types covering sessions, tasks, costs, health, fleet, approvals, and reasoner activity. Wildcard subscriptions, bounded history buffer with type filtering, event counting, error-resilient delivery./event-bus. - Goal completion verifier (
goal-completion-verifier.ts): post-completion regression scanner. Checks last 50 lines of output against 7 positive patterns (tests passing, build success, git push, PR activity, zero errors) and 8 negative patterns (failures, crashes, conflicts, reverts, permission errors). Returns confirm-complete / revert-to-active / needs-review./verify-goals. - Session output diff (
session-output-diff.ts): line-level diff between consecutive session output captures. LCS-based matching for small outputs (<500 lines), tail-diff for large. Context-window filtering (default 2 lines), ANSI code stripping./output-diff <session>. - Session heartbeat (
session-heartbeat.ts): detects tmux pane crashes independent of AoE status. Tracks output hash changes per tick; escalates through alive → stale → unresponsive → dead based on consecutive missed ticks (configurable thresholds: 5/10/20 default)./heartbeat. - Action replay (
action-replay.ts): post-mortem debugger for daemon decisions. Loads action log JSONL, groups by tick via timestamp proximity, supports seek/step/filter-by-session navigation. Stats: total ticks, actions, failures, sessions involved./replay [stats|next|prev|N|session]. - Fleet config profiles (
fleet-config-profiles.ts): named config presets for different workload types. 5 built-in profiles: dev (fast iteration), ci (no confirmation, auto-destructive), incident (fastest polls, cautious), conservative (dry run, confirm everything), overnight (unattended, budget-conscious). User-defined profiles via config./profiles [name]. - Daemon diagnostics (
daemon-diagnostics.ts):/doctorself-diagnostics. Checks node version (>=20), config file existence, state directory, reasoner backend validity, poll interval sanity (not <1s or >2m), uptime, tick count, session count, actions log. Severity-ranked (ok/warn/error/info) with actionable suggestions./doctor. - Session state machine (
session-state-machine.ts): formalizes 11 session lifecycle states with 31 valid guarded transitions. States: pending, starting, active, idle, stuck, error, paused, completing, completed, failed, removed. Blocks illegal transitions (e.g. completed→active). Transition checking via/state-machine active→idle./state-machine [state]. - Incremental context (
incremental-context.ts): tracks file mtime + size fingerprints per tick. Skips re-reads for unchanged files, reducing I/O on large fleets. Reports cache hit rate, reload/skip counts, recent change details./context-stats. - Daemon metrics histogram (
daemon-metrics-histogram.ts): per-tick latency distribution for poll, reason, execute, and tick-total phases. Records timing samples (capped at 500), computes percentiles (p50/p90/p99), renders ASCII histograms with 8 buckets./metrics-hist. - Session peer review (
session-peer-review.ts): cross-session code review gating. Operator requests reviews, reviewer sessions approve or reject with feedback. Stale reviews auto-expire. Gates task completion on peer approval./peer-review [request|approve|reject]. - Fleet warm standby (
fleet-warm-standby.ts): pre-warm session slots with loaded context for instant task activation. Pool-limited (default 5), TTL-based expiry, repo-matched claiming. Reduces cold-start time for new tasks./warm-standby [warm|claim]. - Session output redaction (
session-output-redaction.ts): auto-strip secrets and PII from captured pane output before logging. 11 default rules: bearer tokens, API keys, AWS keys, JWTs, private keys, passwords, connection strings, emails, IPv4 addresses, hex secrets. Custom rule support, per-rule hit tracking./redaction-stats. - Fleet compliance checker (
fleet-compliance-checker.ts): verify all sessions follow org policy. 7 check types: naming convention (regex), required tags, budget cap, max idle, require goal, require repo, banned goal patterns. Severity-ranked (error/warning/info) with remediation suggestions./compliance. - Daemon plugin hooks (
daemon-plugin-hooks.ts): lifecycle hooks for custom logic injection. 7 phases: pre-tick, post-tick, pre-reason, post-reason, pre-execute, post-execute, on-error. Priority ordering, enable/disable per hook, error isolation (one bad hook doesn't kill others)./plugin-hooks. - Fleet incident timeline (
fleet-incident-timeline.ts): chronological view of all errors, failures, recoveries, stuck/idle/budget events across sessions. Filterable by session, type, time range, resolved status. Hot-session ranking, type counts./incidents. - Session output bookmarks (
session-output-bookmarks.ts): mark interesting output lines with labels for later reference. Add/remove bookmarks, search by label or text, filter by session, count per session. Max 200 bookmarks./bookmark [add|rm|search]. - Daemon canary mode (
daemon-canary-mode.ts): test new config on a single canary session before fleet-wide rollout. Tracks canary health vs fleet baseline, monitors cost rate (rollback if >2x baseline). Auto-recommends promote (after duration) / rollback (if degraded) / continue (pending)./canary [start|promote|rollback]. - Daemon config diff (
daemon-config-diff.ts): tracks config snapshots and computes field-level diffs (added/removed/changed) including nested objects. Recent diff history (last N reloads)./config-diff. - Goal auto-priority (
goal-auto-priority.ts): rank goals by composite score from urgency keywords (fix/critical/security, 0-30), impact keywords (deploy/production/auth, 0-20), dependency count (0-20), age anti-starvation (0-15), and explicit priority tags (0-15). Capped at 100./goal-priority. - Fleet capacity forecaster (
fleet-capacity-forecaster.ts): predict pool slot exhaustion from current utilization, queue depth, and historical completion/arrival rates. Recommends ok / scale-up / throttle-intake / critical. Computes ETA to exhaustion./capacity-forecast. - Daemon watchdog (
daemon-watchdog.ts): self-recovery if main loop stalls beyond configurable threshold (default 2m). Tracks tick timestamps, detects stalls, escalates: warn (1x) → restart (2x) → exit (3x). Enable/disable, configurable threshold (min 10s)./watchdog-status. - Fleet cost regression (
fleet-cost-regression.ts): alert when per-session cost patterns deviate from historical baseline. Rolling $/hr samples, warning at 50% above baseline, critical at 100%. Skips sessions with negligible baseline./cost-regression. - Goal cascading (
goal-cascading.ts): parent goals auto-generate child goals across dependent sessions. Tree structure with configurable max depth (default 3). Bottom-up auto-completion propagation — when all children complete, parent auto-completes./goal-cascade [add|child]. - Daemon health score (
daemon-health-score.ts): composite health metric from 7 weighted subsystems: watchdog (20%), SLA health (20%), error rate (15%), session health (15%), cache efficiency (10%), incidents (10%), compliance (10%). Letter grades A-F with component bar charts./health-score. - Fleet event replay (
fleet-event-replay.ts): replay event bus history for debugging. Playback controls: step forward/backward, seek by position or timestamp, filter by event type or session. Progress tracking, time range display./event-replay [next|prev|N|filter|reload]. - Session context budget (
session-context-budget.ts): minimize context tokens while maximizing relevance. Scores files by recency (0-20), goal keyword match (0-20), importance (AGENTS.md/claude.md get priority, +10), and size penalty (large files -10/-20). Greedy budget fill by relevance./context-budget. - Daemon tick profiler (
daemon-tick-profiler.ts): per-phase timing breakdown for each daemon tick. Records poll/reason/execute/post-tick durations, computes per-phase stats (avg/max/% of total), identifies bottleneck phase, finds slowest tick./tick-profiler. - Goal confidence estimator (
goal-confidence-estimator.ts): predict goal completion probability (0-100%) from 6 weighted factors: progress (±25), velocity (±15), errors (0 to -20), signal balance (±10), stuck duration (0 to -15), time pressure (0 to -5). Trend detection (rising/falling/steady). ETA from velocity./goal-confidence. - Fleet budget planner (
fleet-budget-planner.ts): distribute total cost budget across sessions by priority and progress. Higher priority sessions get proportionally more budget; near-complete tasks get less (anti-waste). Emergency reserve (default 10%). Min allocation per session to prevent starvation./budget-plan. - Session sentiment (
session-sentiment.ts): classify session output tone using 17 keyword patterns across 7 sentiment types: success, progress, blocked, frustration, error, idle, neutral. Priority-weighted (error > blocked > frustration). Confidence scoring./sentiment. - Fleet workload balancer (
fleet-workload-balancer.ts): detect uneven session loads from task count + burn rate + health. Classify sessions as overloaded/normal/underloaded. Generate move or pause recommendations./workload-balance. - Daemon crash report (
daemon-crash-report.ts): auto-generate diagnostic report on unexpected exit. Captures uptime, tick count, error + stack trace, recent events, active sessions, health score, memory usage (heap + RSS), sanitized config (secrets redacted)./crash-report. - Fleet session grouping (
fleet-session-grouping.ts): logical groups (frontend, backend, infra) with per-group aggregate stats. Add/remove sessions from groups, compute group-level health, cost, progress, active session count./group [add|rm]. - Session context diff (
session-context-diff.ts): track context file content hashes (SHA-256) between ticks. Detects added, removed, modified, and unchanged files. Summary counts./context-diff. - Daemon config schema (
daemon-config-schema.ts): JSON Schema-style config validation. Type checks (string/number/boolean/object/array), range (min/max), enum, required fields, nested object validation, unknown field warnings./config-validate. - Session transcript export (
session-transcript-export.ts): export full session transcript as self-contained markdown. Metadata table, progress timeline, action log, recent output (ANSI-stripped code block), generation footer with timestamp./transcript <session>. - Goal decomposition quality (
goal-decomp-quality.ts): rate how well sub-goals cover the parent goal. Keyword extraction + set coverage analysis. Grades A-F based on coverage %. Detects uncovered keywords, warns on too few/many sub-goals, short sub-goals./decomp-quality. - Fleet anomaly correlation (
fleet-anomaly-correlation.ts): correlate anomalies across sessions by time proximity (default 60s window). Detects fleet-wide same-type issues (infra), cascading failures (single session, multiple types), shared dependency problems. Hot-session ranking./anomaly-corr. - Goal critical path (
goal-critical-path.ts): identify the longest dependency chain in the task graph using topological sort + longest-path dynamic programming. Finds bottleneck node (longest single task on the critical path), counts parallelizable tasks off the path./critical-path. - Fleet snapshot compression (
fleet-snapshot-compression.ts): delta- encode fleet snapshots. Only stores field-level changes (added/removed/ modified) vs full snapshots. Auto-falls back to full when delta >60% of full size. Auto-compaction after max deltas./snap-compress. - Session output annotations (
session-output-annotations.ts): programmatic annotation of output lines with labels, severity (info/ warning/error/critical), notes, and creator attribution. Filter by session, severity, or label. Max 500 annotations./annotate [add|session]. - Goal celebration (
goal-celebration.ts): auto-generate achievement summaries with badges for completed goals. 7 badge types: Flawless Diamond (cheap + zero errors), Zero Errors, Speed Run (<30m), Budget Hero (<$2), Well Tracked (10+ progress), Multi-Tasker (5+ tasks), Mission Complete (fallback). Highlights + stats./celebrate. - Fleet readiness score (
fleet-readiness-score.ts): 10-check composite readiness metric for production workloads. Checks: config valid, reasoner connected, sessions active, pool capacity, fleet health, compliance, incidents clear, watchdog enabled, cost budget set, context loaded. Weighted scoring, grades READY/CAUTION/NOT READY./readiness. - Daemon process supervisor (
daemon-process-supervisor.ts): track process health for fork-exec recovery. Records crash history with reasons and exit codes. Exponential backoff (base * 2^n, capped). Max-restart window (default 5 in 10m). Uptime tracking with longest streak./supervisor. - Fleet daily digest (
fleet-daily-digest.ts): auto-generated daily fleet summary. Aggregates completions, failures, costs, health, incidents, uptime, reasoner calls, nudges. Markdown + TUI output formats. Includes conditional health warning and cost highlights./daily-digest. - Goal NL parser (
goal-nl-parser.ts): extract structured goals from freeform natural language text. Detects action verbs (23 verbs), target nouns, repo references, priority signals (critical/high/normal), dependency mentions ("after X", "blocked by X"), and tags (#tag/@mention). Confidence scoring (0-100)./parse-goal <text>. - Daemon hot-swap (
daemon-hot-swap.ts): module version registry with hot-swap capability. Register modules with version numbers, swap to new versions with validation gates (rollback on failure), enable/disable per module, swap history tracking, stats./hot-swap. - Fleet webhook integrations (
fleet-webhook-integrations.ts): format fleet events as Slack Block Kit, Teams Adaptive Card, Discord embed, or generic JSON webhook payloads. Severity-colored./webhook-preview. - Session structured log (
session-structured-log.ts): parse output into 8 structured event types: test-result, build-result, git-operation, error, cost-update, progress, prompt, unknown. ANSI stripping, type counting, recognized-only filtering./structured-log. - Daemon state portable (
daemon-state-portable.ts): export/import daemon state as self-contained JSON. Config sanitization (secrets redacted), metadata (hostname, node version, platform), import validation./state-export. - Session output dedup (
session-output-dedup.ts): detect and collapse consecutive repeated output lines. Shows repeat count (×N). Configurable min-repeat threshold (default 2). Compression stats (% saved, runs collapsed)./output-dedup <session>. - Daemon config migration (
daemon-config-migration.ts): auto-upgrade config files through 4 sequential migrations (v1.0→v5.0). Handles field renames (pollInterval→pollIntervalMs), restructuring (verbose→ logging.verbose), normalization (claude→claude-code), and new block additions (costBudgets, healthPort, sessionPool, pluginHooks). Version detection via explicit field or heuristics./config-migrate. - Goal progress prediction (
goal-progress-prediction.ts): ML-free statistical completion prediction. Uses linear extrapolation when insufficient historical data (<3 samples), blends linear + historical median when data is available (60/40 weight). Confidence scoring based on data size + progress %. Percentile ranking against historical completions./progress-predict. - Fleet ops dashboard (
fleet-ops-dashboard.ts): full-screen fleet monitor with Unicode box-drawing. Session table (title/status/health/ cost/progress/sentiment), metrics bar (health/cost/pool/uptime/ticks), incident count, recent events. Truncates at 8 sessions./ops-dashboard. - Goal dep auto-repair (
goal-dep-auto-repair.ts): fix broken dependency chains from completed/removed/failed tasks. Scans active tasks, removes stale dep references. DFS-based cycle detection. Reports repairs and cycles./dep-repair. - Session pattern evolution (
session-pattern-evolution.ts): track output pattern frequency over time windows using 8 default regex patterns (test-pass/fail, error, warning, build, git, install, deploy). Detects appeared/disappeared/increased/decreased shifts. Sparkline trends per pattern./pattern-evolution. - API server (
api-server.ts): REST API for daemon remote control. HTTP router with route registry pattern — modules register getters (GET) and actions (POST), server auto-builds routes. Bearer token auth via timing-safe comparison. SSE endpoint (/api/v1/events) broadcasts fleet events to connected clients. OpenAPI 3.1 spec auto-generated from route definitions. CORS support. Request stats per route. 20 GET + 2 POST endpoints. Config:apiPort+apiToken./api. - Alert rule inheritance (
alert-rule-inheritance.ts): child alert rules inherit parent severity, cooldown, condition, enabled state, and tags. Multi-level depth support. Detects orphan rules (missing parent) and circular references via DFS. Tree-view TUI rendering with inheritance annotations showing which fields came from ancestors./alert-inherit. - Session affinity router (
session-affinity-router.ts): route sessions to preferred reasoner instances using weighted multi-criteria scoring. Factors: capacity (load vs max, +10 light / -100 full), sticky routing (+15 last-used), tag matching (+5 per shared tag), explicit affinity rules (+20 configurable), historical performance (+10 >80% success, -15 <50%). Spreads load across instances for multi-session batches./affinity-router. - Batch goal assignment (
batch-goal-assignment.ts): parse structured goal manifests for bulk goal loading. Key-value text format with[session]blocks supporting goal, priority (critical/high/normal/low), depends, tags, budget, repo fields. Dependency validation against manifest. Case-insensitive session matching. Template generation from existing sessions./batch-goal [text]. - API rate limiting (
api-rate-limiting.ts): per-client request throttling for the REST API. Sliding window with configurable duration (default 60s), max requests (default 120), and burst allowance (default +20 in first 10% of window). Per-client tracking, automatic expired client cleanup, total allowed/blocked counters./api-rate-limit. - Cross-session knowledge (
cross-session-knowledge.ts): share learnings between sessions. Knowledge store with 8 categories (error-fix, pattern, command, config, dependency, testing, performance, general). Search by category, tags, repo, keyword with relevance ranking.findRelevant()scores by repo match + goal keywords + popularity. Usage tracking with session attribution. LRU eviction keeps most-used entries./knowledge [keyword]. - Fleet priority matrix (
fleet-priority-matrix.ts): Eisenhower-style 2D urgency × importance classification. Urgency from: errors (+30), stuck (+20-40), nudges (+5/ea), low health (+15), deadline (+20). Importance from: priority level (+0-40), blocking (+20), dependents (+5/ea), cost (+5-10), near-completion (+10). Classifies into four quadrants: do-first, schedule, delegate, eliminate. ASCII box-drawing matrix with per-session recommendations./priority-matrix. - API webhook push (
api-webhook-push.ts): push fleet events to external URLs on configurable triggers. Register subscriptions with URL + event filter + optional HMAC-SHA256 signing secret. Delivery via native fetch with retry + exponential backoff. Toggle enable/ disable per subscription. Per-sub delivery and failure tracking./webhook-push [add <url> [events]]. - Audit trail retention (
audit-trail-retention.ts): configurable TTL with archival for audit entries. Per-type policies (e.g. debug=1d/delete, action=30d/archive). Wildcard default policy. Archive batches with metadata (count, time range, categories). Automatic expired client cleanup. Stats computation./audit-retention. - Goal velocity normalization (
goal-velocity-normalization.ts): normalize velocity by complexity tier for fair cross-session comparison. 5 tiers (trivial→epic) with expected ranges and difficulty weights (1-5). Raw %/hr normalized to 0-100 score relative to tier midpoint. Weighted velocity = raw × weight. Performance ratings (excellent/good/ normal/slow/stalled). Fleet average, top/bottom performers. Bar chart TUI rendering./velocity-norm. - Session error pattern library (
session-error-pattern-library.ts): 28 curated regex patterns for common errors across TypeScript, JavaScript, Python, Rust, Go, and general (OOM, segfault, permission, network, timeout, test, assertion, dependency, config). Each pattern has id, language, category, severity, description, and actionable suggestion. Scan output lines, count by severity/category/language. One match per line (first wins)./error-patterns <session|languages>. - Daemon resource monitor (
daemon-resource-monitor.ts): track CPU/memory usage per daemon tick viaprocess.memoryUsage()andprocess.cpuUsage(). Rolling sample history (300 default). Peak tracking for heap and RSS. Trend detection (increasing/decreasing/ stable) from first-half vs second-half avg comparison. Heap utilization %. Unicode sparkline of heap over last 20 samples./resources. - API pagination (
api-pagination.ts): cursor-based pagination for list endpoints. Opaque base64url cursors encoding offset + direction. Forward/backward navigation. Configurable page size (default 20, max 100). URL query param parsing helper. HTTP response headers (X-Total-Count, X-Page-Size, X-Page-Index, X-Has-More, X-Next-Cursor, X-Prev-Cursor). Works with any array of items. - Goal progress burndown (
goal-progress-burndown.ts): ASCII burndown chart from velocity + remaining work. Records progress samples per session over time. Renders actual line (█) vs ideal line (·) on a configurable-size grid. Analyzes: velocity (%/hr), projected completion, deviation from ideal, scope change count. Status classification: ahead/on-track/behind/stalled/scope-creep./burndown. - Daemon memory leak detector (
daemon-memory-leak-detector.ts): track heap growth viaprocess.memoryUsage()with linear regression. Computes growth rate (MB/hr) and R² goodness-of-fit. Classifies: ok (flat), warning (>1 MB/hr R²>0.5), likely-leak (>2 MB/hr R²>0.7), critical (>5 MB/hr R²>0.8). Projects heap exhaustion time from current + total. Baseline established after configurable warmup. Alerting with history./leak-detector. - Fleet session topology (
fleet-session-topology.ts): directed graph of session relationships. 5 edge types: dependency (weight 5), shared-file (3), event-flow (2), knowledge (4), conflict (7). Node metrics: in/out/total degree, hub/leaf/isolated classification. BFS-based connected cluster detection. Graph density computation. ASCII rendering with typed arrows (──▶ dependency, ◀─▶ shared-file, ~~▶ event-flow, ··▶ knowledge, ✗─✗ conflict)./topology.
All modules are instantiated in main(). daemonTick() receives the
intelligence parameter carrying all module instances. The reasoner pipeline
(wrappedReasoner) uses intelligence gates in this order:
- Fleet rate limiter — blocks reasoning when hourly/daily API spend limits hit
- Observation cache — returns cached result for duplicate observations
- Priority filter — trims observation to highest-priority sessions only
- Context compressor — compresses old pane output to fit token budgets
- Reasoner call — send compressed, filtered observation to LLM
- Cost tracking — record tokens/cost, update rate limiter, cache result
Post-tick in main loop: SLA monitor, velocity tracker, recovery playbook (auto-nudge/pause/escalate on health drop), dep scheduler (auto-activate pending tasks when prerequisites complete), fleet utilization, fleet snapshots.
Stuck-task handler: tracks nudge effectiveness via NudgeTracker, escalates via EscalationManager (normal→elevated→critical), clears escalation on progress or pause.
Post-reasoning: approval workflow gates risky/low-confidence actions
through the ApprovalQueue. remove_agent/stop_session always require
approval. Low-confidence actions are queued for operator review.
Per-tick in main loop: GraduationManager evaluates each session and
auto-promotes (confirm→auto) or demotes (auto→confirm) based on success
rate. Goal refiner available via /refine. Fleet export via /export.
How to add a new TUI slash command
src/input.ts: Add handler type, private field,on<Name>(handler)registration method, andcase "/<name>":inhandleCommand().src/index.ts: Wire withinput.on<Name>(() => { ... })inside theif (tui) { ... }block (starts around line 543).src/tui.ts: Add any state fields and getter/setter methods.- For per-tick processing, add logic in
daemonTick()after observation changes are available (inside theif (intelligence && ...)block).
CLI subcommands
aoaoe service— generate systemd/launchd service file for boot startaoaoe completions <bash|zsh|fish>— generate shell autocomplete script
Reasoning Pipeline Gates (8 total)
- Token quota (per-model) → 1. Fleet rate limiter ($) → 2. Observation cache →
- Priority filter → 4. Context compressor → 5. LLM call → 6. Approval workflow →
- Cost + token tracking
Testing
- 4985 unit + integration + property + stress tests across 120+ files,
node:test(stdlib, zero deps) pipeline-integration.test.ts— 28 tests exercising the full autonomous pipeline end-to-end: reasoning gates, graduation, recovery, scheduling, escalation, SLA, budgets, goal completion, summarization, conflict detection, velocity, and goal refinement — using real module instances (not mocks)error-correction.test.ts— 9 tests for session error state misdetection fix- Includes e2e loop tests with MockPoller/MockReasoner/MockExecutor
- Integration test (
npm run integration-test): creates real AoE sessions, starts daemon, verifies observation + send-keys + context discovery, cleans up. Requires aoe, opencode, tmux on PATH. ~30s. - Run:
npm test(unit) ornpm run integration-test(e2e)
Dependencies
- Zero runtime dependencies. Uses Node stdlib + native
fetchfor OpenCode HTTP API. typescript,@types/node— dev only
CI/CD
- GitHub Actions: build + test on Node 20 + 22
- On tag push (v*): npm publish + GitHub Release
- Homebrew tap auto-updates on release via repository-dispatch
Session Workflow
Current directive: usability over features. The project has 196 modules but the user isn't comfortable using it full time. Until told otherwise, prioritize:
- Fix usability blockers — things that make a new user close their terminal. Missing error messages, invisible failures, confusing startup, stale docs.
- Reduce complexity — extract god files, lazy-load modules, simplify defaults.
- Test the core loop — the 15 core files matter more than 196 intelligence modules.
- Only add features when explicitly requested. Don't ship module #197 until the core is bulletproof.
When features ARE requested, follow the established pattern: standalone module → test
→ wire into input.ts + index.ts → update docs. Each module is a pure function or
stateful class, zero runtime deps, includes a format*() function returning
string[] for TUI.
- Update both files every commit:
claude.mdandAGENTS.md. - Add this response to AGENTS.md — every session's shipped summary goes into the development session summary table at the bottom.
v3.6.0 Session Response
Shipped 3 features in v3.6.0 (34 new tests, 3 modules, 3 TUI commands):
operator-shift-handoff.ts+ 10 tests — Structured handoff notes aggregating fleet state, session health/cost, failed/paused alerts, pending approvals, actionable recommendations. TUI (/handoff) + clipboard-ready markdown output.session-dep-auto-detect.ts+ 10 tests — Auto-detect inter-session dependencies via explicit declarations, goal text references, shared file edits, and repo path overlap. Confidence-ranked, deduplicated./auto-deps.cost-forecast-alert.ts+ 14 tests — Project costs at daily/weekly/monthly intervals from burn rate. Alerts on threshold breaches ($25/day, $100/week, $300/month). Critical severity when breach is <2h away./cost-forecast.
Also shipped in prior session (v3.4.0 + v3.5.0):
- v3.4.0: SessionIdleDetector, GoalConflictResolver, FleetLeaderboard (33 tests)
- v3.5.0: SessionHealthHistory, CostAnomalyThrottle, SmartSessionNaming (44 tests)
Running total: 93 source modules, 94 TUI commands, 3654 tests, zero runtime deps.
v3.7.0 Session Response
Shipped 3 features in v3.7.0 (36 new tests, 3 modules, 3 TUI commands):
fleet-event-bus.ts+ 14 tests — Typed pub/sub event system with 22 event types (session/task/cost/health/fleet/approval/reasoner). Wildcard*subscriptions, bounded history buffer, type-filtered queries, event counting, error-resilient delivery that swallows subscriber exceptions./event-bus.goal-completion-verifier.ts+ 11 tests — Post-completion regression scanner. Checks last 50 output lines against 7 positive + 8 negative patterns. Outputs confirm-complete / revert-to-active / needs-review with signal details./verify-goals.session-output-diff.ts+ 11 tests — Line-level diff between consecutive session captures. LCS-based for small outputs, tail-diff for large (>500 lines). Context-window filtering, ANSI stripping, +/- display./output-diff <session>.
Running total: 96 source modules, 97 TUI commands, 3690 tests, zero runtime deps.
v3.8.0 Session Response
Shipped 3 features in v3.8.0 (45 new tests, 3 modules, 3 TUI commands):
session-heartbeat.ts+ 14 tests — Tmux pane crash detection independent of AoE status. Tracks output hash changes per tick, escalates through alive → stale → unresponsive → dead (configurable at 5/10/20 ticks)./heartbeat.action-replay.ts+ 17 tests — Post-mortem debugger for daemon decisions. Loads action log JSONL, groups into ticks by timestamp, supports seek/step forward+backward/filter-by-session navigation. Stats summary./replay.fleet-config-profiles.ts+ 14 tests — 5 built-in config presets (dev, ci, incident, conservative, overnight) + user-defined profiles. Each preset overrides poll intervals, policies, verbosity, confirm mode./profiles.
Milestone: 100 TUI commands, 99 source modules, 3735 tests, zero runtime deps.
v3.9.0 Session Response
Shipped 3 features in v3.9.0 (43 new tests, 3 modules, 3 TUI commands):
daemon-diagnostics.ts+ 12 tests —/doctorself-diagnostics. Checks node version, config file, state dir, reasoner backend, poll interval sanity, uptime, tick count, session count, actions log. Severity-ranked with actionable suggestions./doctor.session-state-machine.ts+ 19 tests — 11-state session lifecycle with 31 guarded transitions. Blocks illegal state changes (e.g. completed→active). Supports transition checking:/state-machine active→idle./state-machine.incremental-context.ts+ 12 tests — Mtime/size fingerprinting to skip re-reads for unchanged context files. Cache hit rate tracking, reload/skip counts. Reduces I/O on large fleets./context-stats.
Running total: 102 source modules, 103 TUI commands, 3778 tests, zero runtime deps.
v4.0.0 Session Response
Shipped 3 features in v4.0.0 (41 new tests, 3 modules, 3 TUI commands):
daemon-metrics-histogram.ts+ 10 tests — Per-tick latency distribution for poll/reason/execute/tick-total phases. Percentiles (p50/p90/p99), ASCII histograms with 8 buckets, 500-sample rolling window./metrics-hist.session-peer-review.ts+ 17 tests — Cross-session code review gating. Request/approve/reject reviews with feedback. Stale auto-expiry. Gates task completion on peer approval./peer-review.fleet-warm-standby.ts+ 14 tests — Pre-warm session slots with loaded context for instant task activation. Pool-limited (5 default), TTL expiry, repo-matched claiming./warm-standby.
Milestone: v4.0.0 — 105 source modules, 106 TUI commands, 3819 tests, zero runtime deps.
v4.1.0 Session Response
Shipped 3 features in v4.1.0 (46 new tests, 3 modules, 3 TUI commands):
session-output-redaction.ts+ 16 tests — Auto-strip secrets/PII from pane output. 11 default rules (bearer tokens, API keys, AWS keys, JWTs, private keys, passwords, connection strings, emails, IPs, hex secrets). Custom rules, per-rule hit tracking./redaction-stats.fleet-compliance-checker.ts+ 15 tests — Verify sessions follow org policy. 7 checks: naming convention, required tags, budget cap, max idle, require goal, require repo, banned patterns. Severity-ranked./compliance.daemon-plugin-hooks.ts+ 15 tests — Lifecycle hooks for custom logic. 7 phases (pre-tick through on-error). Priority ordering, enable/disable, error isolation./plugin-hooks.
Running total: 108 source modules, 109 TUI commands, 3865 tests, zero runtime deps.
v4.2.0 Session Response
Shipped 3 features in v4.2.0 (41 new tests, 3 modules, 3 TUI commands):
fleet-incident-timeline.ts+ 14 tests — Chronological error/failure/ recovery timeline across sessions. Filterable by session, type, time range, resolved status. Hot-session ranking, type counts./incidents.session-output-bookmarks.ts+ 13 tests — Mark output lines with labels for later reference. Add/remove/search bookmarks, filter by session, per-session counts. Max 200./bookmark [add|rm|search].daemon-canary-mode.ts+ 14 tests — Test new config on single canary session. Tracks health vs baseline, monitors cost rate. Auto-recommends promote/rollback/continue./canary [start|promote|rollback].
Running total: 111 source modules, 112 TUI commands, 3906 tests, zero runtime deps.
v4.3.0 Session Response
Shipped 3 features in v4.3.0 (37 new tests, 3 modules, 3 TUI commands):
daemon-config-diff.ts+ 12 tests — Track config snapshots, compute field-level diffs (added/removed/changed) for nested objects. Recent diff history for audit./config-diff.goal-auto-priority.ts+ 12 tests — Rank goals by composite score: urgency keywords (0-30), impact keywords (0-20), dependency count (0-20), age anti-starvation (0-15), priority tags (0-15)./goal-priority.fleet-capacity-forecaster.ts+ 13 tests — Predict pool exhaustion from utilization, queue depth, completion/arrival rates. Recommends ok/scale-up/throttle-intake/critical. ETA to exhaustion./capacity-forecast.
Running total: 114 source modules, 115 TUI commands, 3943 tests, zero runtime deps.
v4.4.0 Session Response
Shipped 3 features in v4.4.0 (39 new tests, 3 modules, 3 TUI commands):
daemon-watchdog.ts+ 13 tests — Self-recovery on main loop stalls. Tracks tick timestamps, escalates warn → restart (2x) → exit (3x threshold). Enable/disable, configurable threshold (min 10s)./watchdog-status.fleet-cost-regression.ts+ 11 tests — Alert when per-session cost deviates from rolling historical baseline. Warning at 50%, critical at 100% above baseline. Skips negligible baselines./cost-regression.goal-cascading.ts+ 15 tests — Parent goals auto-generate child goals. Tree structure with max depth (default 3). Bottom-up auto-completion when all children done./goal-cascade [add|child].
Running total: 117 source modules, 118 TUI commands, 3982 tests, zero runtime deps.
v4.5.0 Session Response
Shipped 3 features in v4.5.0 (40 new tests, 3 modules, 3 TUI commands):
daemon-health-score.ts+ 11 tests — Composite health from 7 weighted subsystems: watchdog (20%), SLA (20%), error rate (15%), session health (15%), cache (10%), incidents (10%), compliance (10%). A-F grades./health-score.fleet-event-replay.ts+ 16 tests — Replay event bus history. Step forward/backward, seek by position/timestamp, filter by type/session. Progress tracking + time range./event-replay.session-context-budget.ts+ 13 tests — Relevance-scored context file selection within token budget. Scores by recency, keyword match, importance, size. Greedy fill./context-budget.
Milestone: 4000+ tests — 120 source modules, 121 TUI commands, 4022 tests, zero runtime deps.
v4.6.0 Session Response
Shipped 3 features in v4.6.0 (38 new tests, 3 modules, 3 TUI commands):
daemon-tick-profiler.ts+ 11 tests — Per-phase tick timing breakdown. Records poll/reason/execute/post-tick durations, computes avg/max/% of total, identifies bottleneck phase, finds slowest tick./tick-profiler.goal-confidence-estimator.ts+ 14 tests — Predict completion probability (0-100%) from 6 factors: progress, velocity, errors, signals, stuck duration, time pressure. Trend detection + ETA./goal-confidence.fleet-budget-planner.ts+ 13 tests — Distribute cost budget by priority- progress. Emergency reserve (10%). Min allocation anti-starvation.
/budget-plan.
- progress. Emergency reserve (10%). Min allocation anti-starvation.
Running total: 123 source modules, 124 TUI commands, 4060 tests, zero runtime deps.
v4.7.0 Session Response
Shipped 6 features in v4.7.0 across 2 batches (73 new tests, 6 modules, 6 TUI commands):
Batch 1 — v4.6.0 (38 tests, 3 modules):
daemon-tick-profiler.ts+ 11 tests — Per-phase tick timing (poll/reason/ execute/post-tick). Avg/max/% stats, bottleneck ID, slowest tick./tick-profiler.goal-confidence-estimator.ts+ 14 tests — Completion probability from 6 factors: progress, velocity, errors, signals, stuck, time pressure./goal-confidence.fleet-budget-planner.ts+ 13 tests — Distribute budget by priority + progress. Emergency reserve, min allocation anti-starvation./budget-plan.
Batch 2 — v4.7.0 (35 tests, 3 modules):
4. session-sentiment.ts + 13 tests — Classify output tone: 17 patterns,
7 sentiments (success/progress/blocked/frustration/error/idle/neutral).
Priority-weighted with confidence scoring. /sentiment.
5. fleet-workload-balancer.ts + 10 tests — Detect uneven loads, classify
overloaded/underloaded, suggest move/pause recommendations. /workload-balance.
6. daemon-crash-report.ts + 12 tests — Auto-generate diagnostic report on exit.
Captures state, errors, memory, sanitized config. /crash-report.
Running total: 126 source modules, 127 TUI commands, 4095 tests, zero runtime deps.
v4.8.0 Session Response
Shipped 3 features in v4.8.0 (40 new tests, 3 modules, 3 TUI commands):
fleet-session-grouping.ts+ 15 tests — Logical session groups with per-group aggregate stats (health/cost/progress). Add/remove sessions, list groups, deduplication./group [add|rm].session-context-diff.ts+ 12 tests — Track context file content hashes (SHA-256) between ticks. Detect added/removed/modified/unchanged. Summary counts./context-diff.daemon-config-schema.ts+ 13 tests — JSON Schema-style config validation. Type/range/enum/required/nested checks. Unknown field warnings./config-validate.
Running total: 129 source modules, 130 TUI commands, 4135 tests, zero runtime deps.
v4.9.0 Session Response
Shipped 3 features in v4.9.0 (32 new tests, 3 modules, 3 TUI commands):
session-transcript-export.ts+ 10 tests — Export session transcript as self-contained markdown. Metadata table, progress timeline, action log, recent output (ANSI-stripped), generation footer./transcript <session>.goal-decomp-quality.ts+ 12 tests — Rate sub-goal keyword coverage of parent goal. Grades A-F, uncovered keyword detection, actionable suggestions (too few/many subs, short subs)./decomp-quality.fleet-anomaly-correlation.ts+ 10 tests — Correlate anomalies by time proximity (60s window). Detect fleet-wide issues, cascading failures, shared deps. Hot-session ranking./anomaly-corr.
Running total: 132 source modules, 133 TUI commands, 4167 tests, zero runtime deps.
v5.0.0 Session Response
Shipped 3 features in v5.0.0 (36 new tests, 3 modules, 3 TUI commands):
goal-critical-path.ts+ 10 tests — Longest dependency chain via topo-sort + longest-path DP. Bottleneck identification, parallelizable task count./critical-path.fleet-snapshot-compression.ts+ 13 tests — Delta-encode snapshots (added/removed/modified). Auto-fallback to full when delta >60%. Auto- compaction after max deltas./snap-compress.session-output-annotations.ts+ 13 tests — Annotate output lines with label/severity/note/creator. Filter by session/severity/label. Max 500 annotations./annotate.
Milestone: v5.0.0 — 135 source modules, 136 TUI commands, 4203 tests, zero runtime deps.
v5.1.0 Session Response
Shipped 3 features in v5.1.0 (33 new tests, 3 modules, 3 TUI commands):
goal-celebration.ts+ 11 tests — Achievement summaries with 7 badge types (Flawless Diamond, Zero Errors, Speed Run, Budget Hero, Well Tracked, Multi-Tasker, Mission Complete). Stats + highlights./celebrate.fleet-readiness-score.ts+ 10 tests — 10-check composite readiness metric. Checks config, reasoner, sessions, pool, health, compliance, incidents, watchdog, budgets, context. READY/CAUTION/NOT READY./readiness.daemon-process-supervisor.ts+ 12 tests — Crash history + exponential backoff + max-restart window (5 in 10m). Uptime tracking with longest streak./supervisor.
Running total: 138 source modules, 139 TUI commands, 4236 tests, zero runtime deps.
v5.2.0 Session Response
Shipped 3 features in v5.2.0 (39 new tests, 3 modules, 3 TUI commands):
fleet-daily-digest.ts+ 10 tests — Auto-generated daily fleet summary. Completions/failures/costs/health/incidents/uptime. Markdown + TUI. Conditional health warning + cost highlights./daily-digest.goal-nl-parser.ts+ 15 tests — Extract structured goals from freeform text. 23 action verbs, target nouns, repo refs, priority signals, deps, tags. Confidence scoring 0-100./parse-goal <text>.daemon-hot-swap.ts+ 14 tests — Module version registry with swap/rollback, validation gates, enable/disable, swap history./hot-swap.
Running total: 141 source modules, 142 TUI commands, 4275 tests, zero runtime deps.
v5.3.0 Session Response
Shipped 6 features in v5.3.0 across 2 batches (73 new tests, 6 modules, 6 TUI commands):
Batch 1 — v5.2.0 (39 tests, 3 modules):
fleet-daily-digest.ts+ 10 tests — Daily fleet summary with completions, failures, costs, health, uptime. Markdown + TUI./daily-digest.goal-nl-parser.ts+ 15 tests — Extract structured goals from freeform text. 23 verbs, targets, repos, priority, deps, tags./parse-goal.daemon-hot-swap.ts+ 14 tests — Module version registry with swap/ rollback/validation/enable-disable./hot-swap.
Batch 2 — v5.3.0 (34 tests, 3 modules):
4. fleet-webhook-integrations.ts + 10 tests — Slack Block Kit, Teams
Adaptive Card, Discord embed, generic JSON payloads. /webhook-preview.
5. session-structured-log.ts + 14 tests — Parse output into 8 event
types (test/build/git/error/cost/progress/prompt). /structured-log.
6. daemon-state-portable.ts + 10 tests — Portable state export/import
with secret sanitization + import validation. /state-export.
Running total: 144 source modules, 145 TUI commands, 4309 tests, zero runtime deps.
v5.4.0 Session Response
Shipped 3 features in v5.4.0 (37 new tests, 3 modules, 3 TUI commands):
session-output-dedup.ts+ 12 tests — Collapse consecutive repeated output lines with count (×N). Configurable min-repeat threshold. Compression stats./output-dedup <session>.daemon-config-migration.ts+ 13 tests — Auto-upgrade config through 4 sequential migrations (v1→v5). Field renames, restructuring, normalization, new blocks. Version detection heuristics./config-migrate.goal-progress-prediction.ts+ 12 tests — ML-free statistical completion prediction. Linear extrapolation + historical blending. Confidence scoring, percentile ranking./progress-predict.
Running total: 147 source modules, 148 TUI commands, 4346 tests, zero runtime deps.
v5.5.0 Session Response
Shipped 6 features in v5.5.0 across 2 batches (65 new tests, 6 modules, 6 TUI commands):
Batch 1 — v5.4.0 (37 tests, 3 modules):
session-output-dedup.ts+ 12 tests — Collapse consecutive repeated output lines (×N). Configurable threshold. Compression stats./output-dedup.daemon-config-migration.ts+ 13 tests — Auto-upgrade config v1→v5 through 4 sequential migrations. Version detection heuristics./config-migrate.goal-progress-prediction.ts+ 12 tests — ML-free statistical completion prediction. Linear + historical blend. Confidence + percentile./progress-predict.
Batch 2 — v5.5.0 (28 tests, 3 modules):
4. fleet-ops-dashboard.ts + 5 tests — Full-screen fleet monitor with
box-drawing. Session table, metrics bar, incidents, events. /ops-dashboard.
5. goal-dep-auto-repair.ts + 11 tests — Fix broken dep chains from
completed/removed/failed tasks. DFS cycle detection. /dep-repair.
6. session-pattern-evolution.ts + 12 tests — Track output pattern frequency
shifts over time. 8 default patterns, sparkline trends. /pattern-evolution.
Running total: 150 source modules, 151 TUI commands, 4374 tests, zero runtime deps.
v5.6.0 Session Response
Shipped 3 features in v5.6.0 (36 new tests, 3 modules, 3 TUI commands):
fleet-alert-dashboard.ts+ 12 tests — Unified alert view aggregating all sources (incident/cost/compliance/health/watchdog/sla). Acknowledge, dismiss. Severity counts (C/E/W/I)./alert-dashboard [ack N].session-lang-detector.ts+ 12 tests — Detect programming language from output (10 langs: TS, JS, Python, Rust, Go, Java, C/C++, Ruby, Shell, SQL). Multi-signal confidence./lang-detect.goal-sla-enforcement.ts+ 12 tests — Per-goal time limits. Register SLAs, check ok/warning/breached, sorted by % used./goal-sla [set session hours].
Running total: 153 source modules, 154 TUI commands, 4410 tests, zero runtime deps.
v5.7.0 Session Response
Shipped 3 features in v5.7.0 (28 new tests, 3 modules, 3 TUI commands):
fleet-auto-scaler.ts+ 8 tests — Scale session slots by utilization + queue depth. Scale-up/down/hold with cooldown, min/max limits, target util. Scaling history./auto-scaler.goal-gamification.ts+ 11 tests — XP/levels for sessions. Base XP + bonuses (fast/cheap/zero-error). Streak tracking, 6 badges (First Blood, Speed Demon, Perfectionist, On Fire, Veteran, Legend)./gamification.daemon-audit-report.ts+ 9 tests — Compliance audit reports. Action breakdown, session activity, success rate, grading (pass/review-needed/ fail). Markdown + TUI./audit-report.
Running total: 156 source modules, 157 TUI commands, 4438 tests, zero runtime deps.
v5.8.0 Session Response
Shipped 3 features in v5.8.0 (33 new tests, 3 modules, 3 TUI commands):
daemon-startup-profiler.ts+ 9 tests — Measure module init time for cold-start optimization. Start/end per module, slowest identification, threshold filtering, bottleneck display with bars./startup-profile.fleet-affinity-groups.ts+ 12 tests — Auto-group sessions by repo path similarity. Same basename = 90%, shared prefix = proportional. Groups sessions above threshold (50%)./affinity-groups.session-clipboard.ts+ 12 tests — Copy output to system clipboard. Cross-platform (pbcopy/xclip/xsel/wl-copy/powershell). ANSI stripping, maxLines cap, preview./clipboard <session>.
Milestone: 160 TUI commands — 159 source modules, 4471 tests, zero runtime deps.
v5.9.0 Session Response
Shipped 3 features in v5.9.0 (32 new tests, 3 modules, 3 TUI commands):
daemon-graceful-shutdown.ts+ 12 tests — Phased shutdown: draining → saving → exiting → complete. Track active/drained sessions, drain timeout, state save./shutdown-status.goal-dep-impact.ts+ 10 tests — BFS downstream impact analysis. Direct- transitive blocked sessions, critical path detection. Fleet-wide risk
assessment sorted by total affected.
/dep-impact <session>.
- transitive blocked sessions, critical path detection. Fleet-wide risk
assessment sorted by total affected.
fleet-runbook-library.ts+ 10 tests — 6 built-in runbooks: stuck-session, cost-overspend, fleet-health-drop, scale-up, shift-handoff, debug-session. Searchable by keyword/tag. Step-by-step with auto/manual markers./runbook.
Milestone: 4500+ tests — 162 source modules, 163 TUI commands, zero runtime deps.
v6.0.0 Session Response
Shipped 3 features in v6.0.0 (27 new tests, 3 modules, 3 TUI commands):
goal-dep-graph-export.ts+ 8 tests — Export dep graph as DOT (Graphviz), Mermaid, or ASCII. Graph stats (nodes/edges/roots/leaves). Cycle-safe ASCII rendering./dep-graph-export [dot|mermaid|ascii].daemon-perf-regression.ts+ 11 tests — Detect tick time regressions via rolling median baseline. Warning at 2x, critical at 4x. Recent alerts history./perf-regression.fleet-compliance-report.ts+ 8 tests — 5-section compliance report: policy, SLA, incidents, cost, health. Scored 0-100, graded compliant/ at-risk/non-compliant. Markdown + TUI./compliance-report.
Milestone: v6.0.0 — 165 source modules, 166 TUI commands, 4530 tests, zero runtime deps.
v6.1.0 Session Response
Shipped 3 features in v6.1.0 (30 new tests, 3 modules, 3 TUI commands):
fleet-cost-optimizer.ts+ 9 tests — Actionable cost reduction recs: throttle high-burn, pause idle, complete near-done, review hogs. Potential savings estimate. Priority-sorted./cost-optimizer.goal-progress-heatmap.ts+ 9 tests — Hourly progress visualization. 24-column heatmap with Unicode heat chars (░▒▓█). Peak hour detection. Normalized rendering./progress-heatmap.daemon-module-deps.ts+ 12 tests — Inter-module dependency graph. Roots/leaves, category breakdown, most-depended module, dependents/ dependencies queries./module-deps.
Milestone: 50,000+ lines — 168 source modules, 169 TUI commands, 4560 tests, zero runtime deps.
v6.2.0 Session Response
Shipped 3 features in v6.2.0 (34 new tests, 3 modules, 3 TUI commands):
fleet-cost-trend.ts+ 11 tests — Week-over-week cost trend analysis. Daily snapshots, rolling 7-day averages, direction detection (increasing/ decreasing/stable). Weekly + monthly projections. Sparkline./cost-trend.goal-complexity-tagger.ts+ 12 tests — Tag goals with complexity (trivial/simple/moderate/complex/epic). Keyword scope analysis, description length, dependency count, multi-task indicators. Score 0-100./complexity.daemon-event-sourcing.ts+ 11 tests — Immutable event store. Append, query by type/source/time-range, type counts, reducer-based replay for state reconstruction, partial replay (upToId)./event-store.
Running total: 171 source modules, 172 TUI commands, 4594 tests, zero runtime deps.
v6.3.0 Session Response
Shipped 3 features in v6.3.0 (32 new tests, 3 modules, 3 TUI commands):
daemon-distributed-lock.ts+ 10 tests — PID-based lockfile with staleness detection. Acquire/release, stale reclaim, lock age tracking. Prevents concurrent daemon instances./daemon-lock.session-output-correlation.ts+ 10 tests — Find related sessions via keyword frequency overlap in recent output. Jaccard-style similarity. Threshold-gated pair detection./output-correlation.fleet-utilization-forecaster.ts+ 12 tests — Predict next-day utilization from day-of-week hourly patterns. Peak hour, avg util, confidence scoring, sparkline forecast./util-forecast.
Running total: 174 source modules, 175 TUI commands, 4626 tests, zero runtime deps.
v6.4.0 Session Response
Shipped 6 features in v6.4.0 across 2 batches (65 new tests, 6 modules, 6 TUI commands):
Batch 1 — v6.3.0 (32 tests, 3 modules):
daemon-distributed-lock.ts+ 10 tests — PID lockfile with stale reclaim. Prevents concurrent daemons./daemon-lock.session-output-correlation.ts+ 10 tests — Keyword frequency overlap to find related sessions./output-correlation.fleet-utilization-forecaster.ts+ 12 tests — Day-of-week hourly pattern prediction with sparkline./util-forecast.
Batch 2 — v6.4.0 (33 tests, 3 modules):
4. fleet-snapshot-time-machine.ts + 12 tests — Snapshot browser with
take/compare/diff + time range queries. /time-machine.
5. goal-sparkline-dashboard.ts + 11 tests — All-session progress
sparklines with trend detection (up/down/flat). /sparkline-dash.
6. daemon-tick-budget.ts + 10 tests — Per-phase compute budget
(poll 30%, reason 40%, execute 20%, post-tick 10%) with overrun tracking. /tick-budget.
Running total: 177 source modules, 178 TUI commands, 4659 tests, zero runtime deps.
v6.5.0 Session Response
Shipped 3 features in v6.5.0 (29 new tests, 3 modules, 3 TUI commands):
session-goal-mutation.ts+ 11 tests — Track goal text changes over time. Detects initial/refined/expanded/narrowed/replaced. Scope creep detection from repeated expansion./goal-mutations [session].fleet-cost-chargeback.ts+ 9 tests — Cost allocation by team/project tag. Chargeback reports with group breakdown, fleet %, untagged tracking. Markdown + TUI./chargeback.goal-prediction-ensemble.ts+ 9 tests — Confidence-weighted ensemble of linear + velocity + historical prediction methods. Agreement scoring, confidence boosting when methods converge./prediction-ensemble.
Running total: 180 source modules, 181 TUI commands, 4688 tests, zero runtime deps.
AI Working Context
Two files per repo:
AGENTS.md(this file) — how to work on this project. Stable, changes slowly.claude.md— what we're working on. Status, roadmap, what's next. Update every commit.
Development Session Summary (v0.196 → v2.5.0)
A single extended AI-assisted development session shipped ~40 releases:
| Release | Theme | Key Deliverables |
| v0.196–v0.207 | Intelligence Modules | 51 standalone modules: summarizer, conflicts, goals, budgets, heatmap, audit, snapshots, predictions, retry, search, adaptive poll, forecast, priority, escalation, drift, progress, pool, reasoner cost, anomaly, SLA, velocity, dep-scheduler, cache, rate-limiter, compressor, recovery, lifecycle, cost-attribution, goal-decomposer, priority-reasoning, session-memory, dep-graph, approval-queue, fleet-diff, templates, difficulty, smart-nudge, utilization, template-detector, fleet-search, nudge-tracker, difficulty-allocator |
| v0.208–v0.210 | Deep Integration | All modules wired into autonomous 8-gate reasoning pipeline + per-tick loop |
| v0.211 | Integration Tests | 28 pipeline integration tests proving end-to-end wiring |
| v1.0.0 | Production | Bug fixes (error misdetection, dashboard linking), v1 tag |
| v1.1–v1.2 | Infrastructure | ServiceGenerator, CLICompletions, SessionReplay, WorkflowEngine + wiring |
| v1.3 | Quality | README update, 26 property-based fuzz tests (zero bugs) |
| v1.4–v1.5 | Multi-Reasoner | MultiReasoner routing, WorkflowTemplates, SessionCheckpoints, TokenQuotas + wiring |
| v1.6–v1.7 | A/B + Workflows | A/B reasoning, workflow cost forecast, workflow chains + wiring |
| v1.8 | Stress Tests | 16 stress tests across 14 modules (zero bugs) |
| v1.9–v2.0 | Federation + Alerts | FleetFederation, OutputArchival, RunbookGenerator, CustomAlertRules + wiring, v2 tag |
| v2.1–v2.2 | DSL + Viz | AlertRuleDSL, HealthForecast, SessionTail, WorkflowViz + wiring |
| v2.5 | Platform Completion | MetricsExport, AlertComposer, FleetGrep, RunbookExecutor |
| v2.6–v3.3 | Deep Features | SessionClone, GoalSimilarity, CostAllocationTags, PredictiveScaling, SessionTagManager, SessionCompare, FleetSummaryReport, SessionTimeline, FleetChangelog |
| v3.4 | Fleet Intelligence | SessionIdleDetector, GoalConflictResolver, FleetLeaderboard |
| v3.5 | Observability + DX | SessionHealthHistory, CostAnomalyThrottle, SmartSessionNaming |
| v3.6 | Operations + Forecasting | OperatorShiftHandoff, SessionDepAutoDetect, CostForecastAlert |
| v3.7 | Events + Verification | FleetEventBus, GoalCompletionVerifier, SessionOutputDiff |
| v3.8 | Debugging + Config | SessionHeartbeat, ActionReplay, FleetConfigProfiles |
| v3.9 | Quality + Lifecycle | DaemonDiagnostics, SessionStateMachine, IncrementalContext |
| v4.0 | Performance + Governance | DaemonMetricsHistogram, SessionPeerReview, FleetWarmStandby |
| v4.1 | Security + Compliance | SessionOutputRedaction, FleetComplianceChecker, DaemonPluginHooks |
| v4.2 | Observability + Safety | FleetIncidentTimeline, SessionOutputBookmarks, DaemonCanaryMode |
| v4.3 | Intelligence + Planning | DaemonConfigDiff, GoalAutoPriority, FleetCapacityForecaster |
| v4.4 | Resilience + Hierarchy | DaemonWatchdog, FleetCostRegression, GoalCascading |
| v4.5 | Health + Replay + Context | DaemonHealthScore, FleetEventReplay, SessionContextBudget |
| v4.6 | Profiling + Prediction | DaemonTickProfiler, GoalConfidenceEstimator, FleetBudgetPlanner |
| v4.7 | Sentiment + Balance | SessionSentiment, FleetWorkloadBalancer, DaemonCrashReport |
| v4.8 | Grouping + Validation | FleetSessionGrouping, SessionContextDiff, DaemonConfigSchema |
| v4.9 | Export + Quality + Correlation | SessionTranscriptExport, GoalDecompQuality, FleetAnomalyCorrelation |
| v5.0 | Graph + Storage + Metadata | GoalCriticalPath, FleetSnapshotCompression, SessionOutputAnnotations |
| v5.1 | Celebration + Readiness | GoalCelebration, FleetReadinessScore, DaemonProcessSupervisor |
| v5.2 | Digest + NLP + Hot-Swap | FleetDailyDigest, GoalNLParser, DaemonHotSwap |
| v5.3 | Webhooks + Logs + Export | FleetWebhookIntegrations, SessionStructuredLog, DaemonStatePortable |
| v5.4 | Dedup + Migration + Prediction | SessionOutputDedup, DaemonConfigMigration, GoalProgressPrediction |
| v5.5 | Dashboard + Repair + Evolution | FleetOpsDashboard, GoalDepAutoRepair, SessionPatternEvolution |
| v5.6 | Alerts + Language + SLA | FleetAlertDashboard, SessionLangDetector, GoalSlaEnforcement |
| v5.7 | Scaling + Gamification + Audit | FleetAutoScaler, GoalGamification, DaemonAuditReport |
| v5.8 | Profiling + Affinity + Clipboard | DaemonStartupProfiler, FleetAffinityGroups, SessionClipboard |
| v5.9 | Shutdown + Impact + Runbooks | DaemonGracefulShutdown, GoalDepImpact, FleetRunbookLibrary |
| v6.0 | Export + Perf + Compliance | GoalDepGraphExport, DaemonPerfRegression, FleetComplianceReport |
| v6.1 | Optimizer + Heatmap + ModDeps | FleetCostOptimizer, GoalProgressHeatmap, DaemonModuleDeps |
| v6.2 | Trends + Complexity + Events | FleetCostTrend, GoalComplexityTagger, DaemonEventSourcing |
| v6.3 | Lock + Correlation + Forecast | DaemonDistributedLock, SessionOutputCorrelation, FleetUtilizationForecaster |
| v6.4 | TimeMachine + Sparklines + Budget | FleetSnapshotTimeMachine, GoalSparklineDashboard, DaemonTickBudget |
| v6.5 | Mutations + Chargeback + Ensemble | SessionGoalMutation, FleetCostChargeback, GoalPredictionEnsemble |
| v7.0 | Remote Control API | ApiServer (REST+SSE+OpenAPI+Auth), AlertRuleInheritance, SessionAffinityRouter, BatchGoalAssignment |
| v7.1 | Rate Limiting + Knowledge + Matrix | ApiRateLimiting, CrossSessionKnowledge, FleetPriorityMatrix |
| v7.2 | Webhooks + Retention + Velocity | ApiWebhookPush, AuditTrailRetention, GoalVelocityNormalization |
| v7.3 | Errors + Resources + Pagination | SessionErrorPatternLibrary, DaemonResourceMonitor, ApiPagination |
| v7.4 | Burndown + Leak Detection + Topology | GoalProgressBurndown, DaemonMemoryLeakDetector, FleetSessionTopology |
| v7.4.1 | Usability fixes | opencode serve logging, README accuracy, startup UX, tool error messages, title collision warning |
Totals: 196 source modules, 120+ test files, 197 TUI commands, 20 CLI subcommands, 4985 tests, ~61,000 lines added, zero runtime dependencies.
Architecture: standalone module → test → wire into daemon loop → integration test. 8-gate reasoning pipeline: token quota → rate limit → cache → priority filter → compress → LLM → approval → cost+token track. Per-tick: SLA, velocity, recovery, dep-scheduler, graduation, workflow, alert rules, fleet utilization, fleet snapshots. REST API: route registry → auth gate → handler dispatch → JSON response (+ SSE for events).
v7.0.0 Session Response
Shipped 4 features in v7.0.0 (95 new tests, 4 modules, 4 TUI commands):
Flagship: Daemon Remote Control API
api-server.ts+ 45 tests — Full REST API server for daemon remote control. 20 GET endpoints for fleet metrics (SLA, pool, cost, heartbeat, incidents, etc.), 2 POST endpoints for actions (pause/resume), SSE live event stream (/api/v1/events), bearer token auth with timing-safe comparison, auto-generated OpenAPI 3.1 spec, CORS, per-route request stats. Config viaapiPort+apiToken./apiTUI command shows server status + top routes.
Standard modules:
2. alert-rule-inheritance.ts + 16 tests — Child alert rules inherit parent
severity/cooldown/condition/enabled/tags. Multi-level depth, orphan detection,
circular reference detection via DFS. Tree-view rendering. /alert-inherit.
3. session-affinity-router.ts + 14 tests — Route sessions to reasoner instances
via weighted scoring: capacity, sticky routing, tag matching, affinity rules,
historical performance. Load spreading for multi-session batches. /affinity-router.
4. batch-goal-assignment.ts + 20 tests — Parse structured goal manifests
([session] blocks with goal/priority/depends/tags/budget/repo). Dependency
validation, case-insensitive matching, template generation. /batch-goal.
Running total: 184 source modules, 185 TUI commands, 4783 tests, zero runtime deps.
v7.1.0 Session Response
Shipped 3 features in v7.1.0 (52 new tests, 3 modules, 3 TUI commands):
api-rate-limiting.ts+ 14 tests — Per-client request throttling for the REST API. Sliding window with configurable duration, max requests, and burst allowance (+20 in first 10% of window). Per-client tracking, automatic expired client cleanup, total/blocked counters./api-rate-limit.cross-session-knowledge.ts+ 17 tests — Share learnings between sessions. Knowledge store with 8 categories, search by category/tags/repo/keyword.findRelevant()scores by repo match + goal keywords + popularity. Usage tracking, LRU eviction./knowledge [keyword].fleet-priority-matrix.ts+ 21 tests — Eisenhower-style 2D urgency × importance classification. Urgency from errors/stuck/nudges/health/deadline. Importance from priority/blocking/deps/cost/progress. Four quadrants with ASCII matrix rendering + per-session recommendations./priority-matrix.
Running total: 187 source modules, 188 TUI commands, 4835 tests, zero runtime deps.
v7.2.0 Session Response
Shipped 3 features in v7.2.0 (54 new tests, 3 modules, 3 TUI commands):
api-webhook-push.ts+ 16 tests — Push fleet events to external URLs. HMAC-SHA256 signing, retry with exponential backoff, per-subscription toggle, delivery/failure tracking./webhook-push [add <url> [events]].audit-trail-retention.ts+ 15 tests — Configurable TTL with archival. Per-type policies (debug=1d/delete, action=30d/archive). Archive batches with metadata. Wildcard default./audit-retention.goal-velocity-normalization.ts+ 23 tests — Normalize velocity by complexity tier (trivial→epic). Expected ranges + difficulty weights (1-5). Normalized 0-100 score, weighted velocity, performance ratings. Fleet-level comparison with bar charts./velocity-norm.
Running total: 190 source modules, 191 TUI commands, 4889 tests, zero runtime deps.
v7.3.0 Session Response
Shipped 3 features in v7.3.0 (53 new tests, 3 modules, 3 TUI commands):
session-error-pattern-library.ts+ 22 tests — 28 curated regex patterns for common errors across TypeScript, JavaScript, Python, Rust, Go + general patterns (OOM, segfault, permission, network, timeout, test, assertion, dependency). Severity/category/language classification. Actionable suggestions per match./error-patterns <session>.daemon-resource-monitor.ts+ 13 tests — Track CPU/memory per tick viaprocess.memoryUsage()+process.cpuUsage(). Rolling 300-sample history. Peak tracking. Trend detection. Heap sparkline visualization./resources.api-pagination.ts+ 18 tests — Cursor-based pagination. Opaque base64url cursors, forward/backward, configurable page size (default 20, max 100). URL query parsing + HTTP response headers./apiendpoints gain pagination.
Running total: 193 source modules, 194 TUI commands, 4942 tests, zero runtime deps.
v7.4.0 Session Response
Shipped 3 features in v7.4.0 (43 new tests, 3 modules, 3 TUI commands):
goal-progress-burndown.ts+ 16 tests — ASCII burndown chart with actual vs ideal lines. Scope-creep detection. Status: ahead/on-track/behind/stalled/ scope-creep. Projected completion from velocity./burndown.daemon-memory-leak-detector.ts+ 12 tests — Linear regression on heap samples to detect sustained growth. Growth rate (MB/hr), R² fit quality. ok/warning/likely-leak/critical classification. Heap exhaustion projection. Baseline after warmup./leak-detector.fleet-session-topology.ts+ 15 tests — Directed graph of session relationships. 5 edge types (dependency/shared-file/event-flow/knowledge/ conflict). Hub/leaf/isolated classification. BFS cluster detection. Graph density. ASCII topology rendering with typed arrows./topology.
Running total: 196 source modules, 197 TUI commands, 4985 tests, zero runtime deps.
v7.4.1 Session Response — Usability Focus
No new feature modules. This release fixes the P0 usability blockers identified by an honest audit of the project. The core daemon works but the user experience had gaps that would make someone close their terminal and not come back.
Fixes shipped:
- opencode serve logging — stderr/stdout now piped to
~/.aoaoe/opencode-serve.loginstead ofstdio: "ignore". On startup failure, last 10 lines shown to user. Previously all output was/dev/null— invisible crashes. - README accuracy — badge updated 3,491→4,985 tests, module count 55→196, project structure rewritten to separate core (15 files) from intelligence modules.
- Missing tool errors —
validateEnvironment()now shows per-tool install links (aoe GitHub URL, tmux brew/apt, opencode GitHub, claude npm command). - Startup summary — prints version, mode, poll/reason intervals, backend,
API/health URLs,
/helphint on launch. User knows what to expect. - Session title collision warning — poller warns on duplicate case-insensitive titles that could cause wrong-session command routing.
- index.ts navigability — table of contents + 11 section markers (§IMPORTS,
§MAIN, §CLI, §CONFIG, §MODULES, §TUI-COMMANDS, §SERVERS, §SHUTDOWN, §LOOP,
§TICK, §HELPERS). Daemon loop was buried at line 4,800 — now searchable via
§LOOP. CreatedDaemonContextinterface indaemon-context.ts(typed bundle of all 90 shared variables from main()) for future TUI handler extraction. Full physical extraction deferred — risk of breaking 90 closures + duplicating 264 imports outweighs the benefit now that the file is searchable. - 0 sessions = actionable guidance — both observe and normal mode now tell users
how to create sessions (
aoe add <path> -t <title> -c opencode -y) instead of sitting silently. First poll shows the hint; subsequent polls say "waiting for aoe sessions..." to avoid spam. --observepromoted — getting-started flow in--helpandinitnext-steps now shows observe (free) before dry-run (costs tokens). The funnel is: init → test-context → observe → dry-run → live./helptiered — bare/helpshows 12 essential commands./help allfor the full 197. New users don't drown.- Default $10 cost budget — generated config includes
costBudgetswithglobalBudgetUsd: 10.00andautoPauseOnExceed: true. No unlimited burns. - Config hot-reload in startup banner —
config: path (hot-reloaded on change). - init next-steps rewritten — includes --observe, notes cost budget default.
Daily-use robustness (same session, continued):
- opencode.ts startServer() logs to file — reasoner restart path now pipes
to
~/.aoaoe/opencode-serve.log(append), matching init.ts. Previouslystdio: "ignore"— invisible crashes on reasoner-initiated restarts. - Config warnings surfaced in TUI —
configWarnings[]collected duringloadConfig(), replayed as TUI error entries aftertui.start(). Unknown keys (typos) now visible instead of hidden behind alternate screen. - Repeated-error suppression — same tick error 3+ times → "same error repeated N times" with periodic summary every 10th occurrence. Prevents TUI flooding when reasoner fails every tick (e.g., expired API key).
- SQLite recovery less nuclear —
database is lockedno longer triggers immediate DB wipe. First attempt: restart server (DB preserved). Second consecutive SQLite error: wipe + restart. Prevents data loss from transient DB locks. - Claude --resume regex failure warning — after 5 consecutive calls without session ID match, logs: "unable to extract session ID — --resume disabled, each call starts fresh (increased token usage)".
- Lock file message fixed — removed misleading "remove daemon.lock" hint
(stale locks auto-reclaim). Now shows
kill <pid>for the running daemon. - pollIntervalMs upper bound — max 300,000ms (5 min). Absurdly high values no longer silently accepted.
- sessionDirs path validation — warns at startup if mapped paths don't exist. Previously silently fell back to heuristic resolution.
Crash fix + polish (same session, continued):
- CRITICAL: Fixed require() crash — startup summary used
require("../package.json")which crashes in ESM. The daemon couldn't start at all. Found by actually running it. Replaced with existingreadPkgVersion(). - Doctor cleans stale locks — auto-deletes stale daemon.lock when daemon isn't
running. Shows
kill <pid>for live daemons instead of misleadingrmhint. - Doctor opencode version fixed —
opencode version→opencode --version. Now shows "1.3.3" instead of "Error: Failed to change directory". - Doctor version output sanitized — strips "Error:" lines from tool version output.
- Missing cost budget warning — configs without
costBudgetsget a TUI warning: "no costBudgets configured — LLM spending is unlimited".
Verified working end-to-end:
aoaoe --help→ clear, getting-started funnelaoaoe test-context→ finds 6 sessions, resolves all project dirsaoaoe doctor→ all tools detected, versions correct, reasoner respondingaoaoe --observe→ starts, polls 6 sessions, shows output, shuts down cleanaoaoe status→ shows daemon not running with start hintaoaoe tasks→ shows 6 tasks with progressaoaoe config→ dumps effective config- Non-TTY (headless) mode → works correctly with plain text output
- 348 core + reasoner tests passing
--log-file <path>flag — redirect all daemon output to a file for background/service mode. No TUI, no terminal. Enablesaoaoe --log-file /var/log/aoaoe.log &or systemd/launchd integration. Output is appended. Tested end-to-end with --observe.
All P0/P1/P2 usability items are now complete.
- Lazy-load measured as negligible (19ms for 16 modules) — not needed.
- The daemon has been verified working end-to-end across all modes: --help, test-context, doctor, --observe, --dry-run, status, tasks, config, --log-file, headless (non-TTY pipe).
v7.5.0 Session Response — Stuck Output Detection
Shipped structured detection for sessions that are alive but not moving.
- Poller stall metadata —
SessionSnapshotnow carriesoutputUnchangedTicks,lastOutputChangeAt, andpotentiallyStuck.annotateOutputStallState()increments unchanged-output counters across polls, resets on output changes, and avoids false positives when the user is active, the pane is dead, or the session is terminal (done,stopped,error). - Reasoner prompt visibility —
formatObservation()now adds a[POTENTIALLY STUCK]tag to the session summary and a short stuck-session section. The reasoner can now distinguish quiet progress from a build/loading screen that has not changed for 6+ polls. - Regression coverage — added Poller tests for reset, threshold, user-active, and terminal-status behavior plus prompt formatting coverage.
Verified with npm test: 5029 tests passing, zero runtime dependencies unchanged.
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.

