agentleFS
Talador12Talador12/agent-of-agent-of-empires/AGENTS.md

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 checking a change actually works.

    Of the AGENTS.md files we read, the 11,638 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.

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
  1. Very specific:

    Add/remove sessions from groups, compute group-level health, cost, progress, active session count.

    line 647
  2. Very specific:

    All modules are instantiated in main().

    line 891
  3. Very specific:

    src/input.ts: Add handler type, private field, on<Name>(handler) registration method, and case "/<name>": in handleCommand().

    line 919
  4. Very specific:

    src/tui.ts: Add any state fields and getter/setter methods.

    line 923
  5. Very specific:

    Run: npm test (unit) or npm run integration-test (e2e)

    line 947
  6. Distinctive:

    Only add features when explicitly requested: Don't ship module #197 until the core is bulletproof.

    line 967
  7. Very specific:

    When features ARE requested, follow the established pattern: standalone module → test → wire into input.ts + index.ts → update docs.

    line 970

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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 UI

Architecture

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() wraps loop.ts tick() 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

FilePurpose
src/index.tsMain daemon loop, daemonTick() wrapper, subcommands (init, register, tasks, status, config, test-context)
src/loop.tsExtracted tick logic (poll -> reason -> execute), testable with mocks
src/config.tsConfig loader, CLI arg parser, env validation
src/types.tsAll interfaces — SessionSnapshot, Observation, Action, Reasoner, AoaoeConfig
src/poller.tsaoe list --json + tmux capture-pane, SHA-256 diff detection
src/context.tsdiscoverContextFiles, resolveProjectDir, loadSessionContext, caching
src/task-manager.tsTask orchestration: load definitions, persistent state, session reconciliation
src/executor.tsAction dispatch — send_input, start/stop/restart, create/remove, report_progress, complete_task
src/tui.tsIn-place terminal UI with scroll region, resize, activity buffer
src/activity.tsUser activity detection via tmux list-clients
src/message.tsMessage classification, formatting, receipts, skip-sleep logic
src/wake.tsWakeable sleep using fs.watch — message latency ~100ms
src/notify.tsWebhook + Slack notification dispatcher for daemon events
src/health.tsHTTP health check endpoint (GET /health returns JSON status)
src/colors.tsShared ANSI color/style constants
src/config-watcher.tsConfig hot-reload — fs.watch on config file, safe field merge
src/tui-history.tsPersisted TUI history — JSONL file with rotation, load/append/replay
src/export.tsTimeline export — merges actions.log + tui-history into JSON/Markdown
src/tail.tsaoaoe tail — live-stream daemon activity to a separate terminal
src/stats.tsaoaoe stats — aggregate daemon statistics from actions + history
src/replay.tsaoaoe replay — play back tui-history.jsonl like a movie with timing
src/prompt-watcher.tsReactive permission prompt clearing via tmux pipe-pane
src/reasoner/index.tscreateReasoner() factory
src/reasoner/prompt.tsbuildSystemPrompt(), formatObservation(), detectPermissionPrompt()
src/reasoner/parse.tsResponse parsing, JSON extraction, action validation
src/reasoner/opencode.tsOpenCode HTTP backend (native fetch to opencode serve)
src/reasoner/claude-code.tsClaude Code subprocess backend (claude --print)
src/chat.tsInteractive chat UI entry point (aoaoe-chat)
src/dashboard.tsCLI status table with per-pane tasks + countdown
src/daemon-state.tsIPC state file (~/.aoaoe/daemon-state.json) + interrupt flag + debounce
src/task-parser.tsParse OpenCode TODO patterns, model/context/cost from pane output
src/task-cli.tsaoaoe task subcommand — list, start, stop, edit, new, rm
src/console.tsConversation log, narrated observations, friendly errors
src/input.tsStdin listener with inject() for post-interrupt text
src/init.tsaoaoe init: auto-discover tools, sessions, reasoner; generate config; auto-start opencode serve
src/session-summarizer.tsPlain-English activity digests from tmux output (no LLM)
src/conflict-detector.tsCross-session file edit conflict detection + auto-resolution
src/goal-detector.tsHeuristic goal completion detection from git/test/todo signals
src/cost-budget.tsPer-session cost budgets with auto-pause enforcement
src/activity-heatmap.tsPer-session activity sparklines using Unicode block characters
src/audit-trail.tsStructured JSONL audit log of all daemon decisions
src/fleet-snapshot.tsPeriodic fleet state snapshots for time-travel debugging
src/budget-predictor.tsPredictive budget exhaustion from cost burn rate regression
src/task-retry.tsAuto-retry failed tasks with exponential backoff + jitter
src/audit-search.tsStructured audit trail search by type, session, time, keyword
src/adaptive-poll.tsDynamic poll interval — speeds up when active, slows when idle
src/fleet-forecast.tsFleet-wide cost forecasting from aggregated budget predictions
src/session-priority.tsSession priority queue by health, staleness, error, stuck state
src/notify-escalation.tsProgressive notification escalation: normal → elevated → critical
src/drift-detector.tsGoal drift detection via keyword overlap heuristic
src/goal-progress.tsTask % completion estimation from multi-signal heuristics
src/session-pool.tsConcurrent active session pool limits with queuing
src/reasoner-cost.tsPer-reasoning-call token usage and cost tracking
src/anomaly-detector.tsZ-score anomaly detection across fleet session metrics
src/fleet-sla.tsFleet health SLA monitoring with sliding window + breach alerts
src/progress-velocity.tsProgress velocity tracking + ETA estimation per task
src/dep-scheduler.tsDependency-aware pool scheduling with capacity limits
src/observation-cache.tsLLM response caching via observation content hashing
src/fleet-rate-limiter.tsFleet-wide API spend rate limiting (hourly + daily caps)
src/context-compressor.tsObservation compression: summarize old lines, keep recent
src/recovery-playbook.tsAuto-execute recovery steps when health drops
src/lifecycle-analytics.tsTask lifecycle stats: throughput, duration, success rate
src/cost-attribution.tsCost breakdown by repo, status, efficiency
src/goal-decomposer.tsAuto-split complex goals into sub-tasks with dependencies
src/priority-reasoning.tsPriority-aware observation filtering for reasoner calls
src/session-memory.tsPersistent per-session learnings across daemon restarts
src/dep-graph-viz.tsASCII dependency graph visualization + cycle detection
src/approval-queue.tsOperator approval queue for batched async human review
src/fleet-diff.tsFleet snapshot comparison CLI + TUI command
src/session-templates.tsPre-configured session profiles (frontend, backend, infra, etc.)
src/difficulty-scorer.tsTask complexity estimation from goal analysis
src/smart-nudge.tsContext-aware nudge generation using session memory
src/fleet-utilization.tsPer-hour fleet activity heatmap for capacity planning
src/template-detector.tsAuto-detect session template from repo file patterns
src/fleet-search.tsRanked full-text search across all session outputs
src/nudge-tracker.tsNudge effectiveness tracking with response time stats
src/difficulty-allocator.tsDifficulty-weighted pool slot allocation
src/session-graduation.tsAuto-promote sessions confirm→auto based on track record
src/approval-workflow.tsRoute low-confidence decisions through approval queue
src/goal-refiner.tsLearn from completed tasks to suggest goal improvements
src/fleet-export.tsGenerate self-contained HTML fleet report
src/service-generator.tsGenerate systemd/launchd service files for boot start
src/cli-completions.tsShell autocomplete scripts (bash, zsh, fish)
src/session-replay.tsReplay session activity timeline from audit trail
src/workflow-engine.tsMulti-session workflow DAG with fan-out/fan-in stages
src/multi-reasoner.tsRoute sessions to different LLM backends by config/template/difficulty
src/workflow-templates.tsPre-built workflow definitions (CI/CD, feature-dev, refactor, incident)
src/session-checkpoint.tsSave + restore transient daemon state across restarts
src/token-quota.tsPer-model token quotas for fleet-wide rate limiting
src/ab-reasoning.tsA/B reasoning: compare two backends, track which wins
src/workflow-cost-forecast.tsEstimate workflow cost from difficulty + historical rates
src/workflow-chain.tsChain workflows with cross-workflow dependencies
src/fleet-federation.tsMulti-host fleet coordination via HTTP health endpoints
src/output-archival.tsCompress + archive old session outputs to gzipped files
src/runbook-generator.tsAuto-generate operator runbooks from audit trail patterns
src/alert-rules.tsCustom fleet alerting rules with severity + cooldown
src/alert-rule-dsl.tsUser-defined alert rules via config DSL
src/alert-composer.tsAND/OR composition of alert conditions
src/health-forecast.tsLinear regression health trend prediction + SLA breach ETA
src/session-tail.tsLive tail of session output with pattern highlighting
src/workflow-viz.tsASCII DAG rendering for workflows + chains
src/metrics-export.tsPrometheus-compatible /metrics text exposition
src/fleet-grep.tsRegex search across gzipped output archives
src/runbook-executor.tsStep-by-step execution of generated runbooks
src/session-clone.tsClone sessions for A/B experimentation
src/goal-similarity.tsJaccard similarity detection for overlapping goals
src/cost-allocation-tags.tsTag sessions by team/project for cost grouping
src/predictive-scaling.tsAuto-adjust pool size from utilization patterns
src/session-snapshot-diff.tsLine-level diff between session output snapshots
src/session-tag-manager.tsKey-value tag store for sessions (team, project, etc.)
src/session-idle-detector.tsDetect prolonged idle sessions, escalate nudge → pause → reclaim
src/goal-conflict-resolver.tsCross-session goal conflict analysis via keyword + file + dependency overlap
src/fleet-leaderboard.tsRank sessions by composite productivity score (completion, velocity, cost)
src/session-health-history.tsRolling-window health score tracker per session with sparkline trend viz
src/cost-anomaly-throttle.tsAuto-throttle poll rate for cost-anomalous sessions (EMA burn rate vs fleet avg)
src/smart-session-naming.tsAuto-generate descriptive session titles from repo path + goal keywords
src/operator-shift-handoff.tsStructured handoff notes with fleet state, alerts, recommendations (TUI + markdown)
src/session-dep-auto-detect.tsInfer inter-session dependencies from goals, files, repos, explicit declarations
src/cost-forecast-alert.tsProject costs at daily/weekly/monthly intervals + fire alerts on threshold breach
src/fleet-event-bus.tsTyped pub/sub event bus (22 event types, wildcard subs, history, error-resilient)
src/goal-completion-verifier.tsPost-completion regression scanner (7 positive + 8 negative output patterns)
src/session-output-diff.tsLine-level diff between consecutive captures (LCS + tail-diff, ANSI stripping)
src/session-heartbeat.tsTmux pane crash detection via output hash tracking (alive/stale/unresponsive/dead)
src/action-replay.tsStep through daemon decision history with tick grouping, seek, filter-by-session
src/fleet-config-profiles.tsNamed 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.ts11-state lifecycle state machine with 31 guarded transitions
src/incremental-context.tsMtime/size fingerprinting for skip-unchanged context file reloads
src/daemon-metrics-histogram.tsPer-tick latency distribution (p50/p90/p99) with ASCII histograms
src/session-peer-review.tsCross-session code review gating with approve/reject/expire workflow
src/fleet-warm-standby.tsPre-warm session slots with loaded context for instant task activation
src/session-output-redaction.tsAuto-strip secrets/PII (11 default rules: tokens, keys, JWTs, emails, IPs)
src/fleet-compliance-checker.tsVerify sessions follow org policy (naming, budgets, tags, idle, goals)
src/daemon-plugin-hooks.tsLifecycle hooks (7 phases) with priority ordering + error isolation
src/fleet-incident-timeline.tsChronological error/failure/recovery timeline with hot-session ranking
src/session-output-bookmarks.tsMark output lines with labels for later reference, search, per-session filter
src/daemon-canary-mode.tsRun new config on canary session, compare health/cost vs baseline, promote/rollback
src/daemon-config-diff.tsTrack config snapshots, compute field-level diffs (added/removed/changed)
src/goal-auto-priority.tsRank goals by urgency keywords, impact keywords, deps, age, priority tags
src/fleet-capacity-forecaster.tsPredict pool exhaustion from utilization, queue depth, completion/arrival rates
src/daemon-watchdog.tsSelf-recovery on main loop stalls (warn → restart → exit escalation)
src/fleet-cost-regression.tsAlert when per-session cost deviates from historical rolling baseline
src/goal-cascading.tsParent goals auto-generate child goals with tree structure + auto-completion
src/daemon-health-score.tsComposite health metric from 7 weighted subsystems (A-F grading)
src/fleet-event-replay.tsReplay event bus history with step/seek/filter playback controls
src/session-context-budget.tsRelevance-scored context file selection within token budget
src/daemon-tick-profiler.tsPer-phase tick timing breakdown with bottleneck identification
src/goal-confidence-estimator.tsPredict goal completion probability from 6 weighted factors
src/fleet-budget-planner.tsDistribute cost budget across sessions by priority + progress
src/session-sentiment.tsClassify output tone (17 patterns, 7 sentiments: success/progress/blocked/etc)
src/fleet-workload-balancer.tsDetect uneven loads, classify overloaded/underloaded, suggest moves
src/daemon-crash-report.tsAuto-generate diagnostic report on exit (state, errors, memory, config)
src/fleet-session-grouping.tsLogical session groups with per-group aggregate stats (health/cost/progress)
src/session-context-diff.tsTrack context file content hashes, detect added/removed/modified between ticks
src/daemon-config-schema.tsJSON Schema-style config validation with type/range/enum/nested checks
src/session-transcript-export.tsExport session transcript as self-contained markdown (metadata+progress+output)
src/goal-decomp-quality.tsRate sub-goal keyword coverage of parent goal (A-F grades + suggestions)
src/fleet-anomaly-correlation.tsCorrelate anomalies by time proximity to detect fleet-wide root causes
src/goal-critical-path.tsLongest dependency chain via topo-sort + DP (bottleneck ID, parallelizable count)
src/fleet-snapshot-compression.tsDelta-encode fleet snapshots (added/removed/modified) with auto-compaction
src/session-output-annotations.tsProgrammatic output line annotations with label/severity/note/creator
src/goal-celebration.tsAchievement summaries with badges for completed goals (7 badge types)
src/fleet-readiness-score.ts10-check composite readiness metric (READY/CAUTION/NOT READY)
src/daemon-process-supervisor.tsCrash history + exponential backoff + max-restart window + uptime tracking
src/fleet-daily-digest.tsAuto-generated daily fleet summary (completions, failures, costs, health)
src/goal-nl-parser.tsExtract structured goals from freeform text (verbs, nouns, deps, tags, priority)
src/daemon-hot-swap.tsModule version registry with swap/rollback/validation/enable-disable
src/fleet-webhook-integrations.tsSlack/Teams/Discord/generic webhook payload formatting
src/session-structured-log.tsParse output into 8 structured event types with ANSI stripping
src/daemon-state-portable.tsPortable daemon state export/import with secret sanitization
src/session-output-dedup.tsDetect and collapse consecutive repeated output lines (×N count)
src/daemon-config-migration.tsAuto-upgrade config through 4 sequential migrations (v1→v5)
src/goal-progress-prediction.tsML-free statistical completion prediction (linear + historical blend)
src/fleet-ops-dashboard.tsFull-screen fleet monitor with box-drawing (sessions, metrics, events)
src/goal-dep-auto-repair.tsFix broken dep chains from completed/removed/failed tasks + cycle detection
src/session-pattern-evolution.tsTrack output pattern frequency shifts over time with sparkline trends
src/fleet-alert-dashboard.tsUnified alert view with acknowledge/dismiss, severity counts, source filter
src/session-lang-detector.tsDetect programming language from output patterns (10 languages)
src/goal-sla-enforcement.tsPer-goal time limits with ok/warning/breached status + auto-escalation
src/fleet-auto-scaler.tsScale session slots by utilization + queue depth (scale-up/down/hold)
src/goal-gamification.tsXP/levels/badges for sessions based on completions + streaks
src/daemon-audit-report.tsCompliance audit reports with action breakdown + grading
src/daemon-startup-profiler.tsMeasure module init time, identify bottlenecks for cold-start optimization
src/fleet-affinity-groups.tsAuto-group sessions by repo path similarity
src/session-clipboard.tsCopy output snippets to system clipboard (cross-platform)
src/daemon-graceful-shutdown.tsDrain active sessions before exit with phased shutdown
src/goal-dep-impact.tsBFS downstream impact analysis for goal changes/failures
src/fleet-runbook-library.ts6 built-in runbooks for common operational scenarios
src/goal-dep-graph-export.tsExport dep graph as DOT (Graphviz), Mermaid, or ASCII
src/daemon-perf-regression.tsDetect tick processing time regressions via rolling median baseline
src/fleet-compliance-report.ts5-section compliance report (policy, SLA, incidents, cost, health)
src/fleet-cost-optimizer.tsActionable cost reduction recommendations (throttle/pause/complete/review)
src/goal-progress-heatmap.tsHourly progress visualization with Unicode heat characters
src/daemon-module-deps.tsInter-module dependency graph with roots/leaves/category breakdown
src/fleet-cost-trend.tsWeek-over-week cost trend with sparkline + weekly/monthly projection
src/goal-complexity-tagger.tsTag goals with complexity level (trivial→epic) from keyword + scope analysis
src/daemon-event-sourcing.tsImmutable event store with query/replay/type counts for state reconstruction
src/daemon-distributed-lock.tsPID-based lockfile with staleness detection to prevent concurrent daemons
src/session-output-correlation.tsFind related sessions via keyword overlap in recent output
src/fleet-utilization-forecaster.tsPredict next-day utilization from day-of-week hourly patterns
src/fleet-snapshot-time-machine.tsSnapshot browser with take/compare/diff + time range queries
src/goal-sparkline-dashboard.tsAll-session progress sparklines with trend detection
src/daemon-tick-budget.tsPer-phase compute budget allocation with overrun tracking
src/session-goal-mutation.tsTrack goal text changes over time with scope creep detection
src/fleet-cost-chargeback.tsCost allocation by team/project tag with chargeback invoicing
src/goal-prediction-ensemble.tsConfidence-weighted ensemble of multiple prediction methods
src/api-server.tsREST API server with bearer auth, OpenAPI 3.1 spec, SSE events, route registry
src/alert-rule-inheritance.tsChild alert rules inherit parent severity/cooldown/condition with cycle detection
src/session-affinity-router.tsRoute sessions to reasoner instances by capacity, tags, history, affinity rules
src/batch-goal-assignment.tsParse structured goal manifests for bulk loading with dependency validation
src/api-rate-limiting.tsPer-client request throttling for REST API with sliding window + burst allowance
src/cross-session-knowledge.tsShare learnings between sessions with category/tag/repo search + relevance scoring
src/fleet-priority-matrix.ts2D urgency × importance classification into Eisenhower quadrants
src/api-webhook-push.tsPush fleet events to external URLs with HMAC signing + retry + backoff
src/audit-trail-retention.tsConfigurable TTL with archival for audit trail entries
src/goal-velocity-normalization.tsNormalize velocity by complexity tier with weighted scoring + fleet comparison
src/session-error-pattern-library.ts28 curated regex patterns for errors across 10+ languages with suggestions
src/daemon-resource-monitor.tsTrack CPU/memory per tick with trend detection + sparkline visualization
src/api-pagination.tsCursor-based pagination with forward/backward navigation + HTTP headers
src/goal-progress-burndown.tsASCII burndown chart with actual vs ideal, scope-creep detection, ETA
src/daemon-memory-leak-detector.tsHeap growth tracking with linear regression, R² fit, leak classification
src/fleet-session-topology.tsDirected graph of session relationships with cluster/hub/leaf detection
src/model-config.tsDefault model enforcement — discover models from opencode config, enforce across sessions
src/shell.tsChild process helpers
src/integration-test.tsEnd-to-end integration test (real aoe sessions, tmux, daemon)

Key Design Decisions

Two usage modes for aoe

  • Single-repo: User runs aoe from inside a project. session.path points to the project directly.
  • Meta-level: User runs aoe from a parent dir (e.g. ~/repos/), manually names sessions to match projects. All sessions share the same path. 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.NN cost against costBudgets.globalBudgetUsd or 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. Supports diffFleetSnapshots() 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. Supports last: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 fixed config.pollIntervalMs in 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. Respects dependsOn constraints. /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 via createIdleDetector(). /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): /doctor self-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 via process.memoryUsage() and process.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 via process.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:

  1. Fleet rate limiter — blocks reasoning when hourly/daily API spend limits hit
  2. Observation cache — returns cached result for duplicate observations
  3. Priority filter — trims observation to highest-priority sessions only
  4. Context compressor — compresses old pane output to fit token budgets
  5. Reasoner call — send compressed, filtered observation to LLM
  6. 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

  1. src/input.ts: Add handler type, private field, on<Name>(handler) registration method, and case "/<name>": in handleCommand().
  2. src/index.ts: Wire with input.on<Name>(() => { ... }) inside the if (tui) { ... } block (starts around line 543).
  3. src/tui.ts: Add any state fields and getter/setter methods.
  4. For per-tick processing, add logic in daemonTick() after observation changes are available (inside the if (intelligence && ...) block).

CLI subcommands

  • aoaoe service — generate systemd/launchd service file for boot start
  • aoaoe completions <bash|zsh|fish> — generate shell autocomplete script

Reasoning Pipeline Gates (8 total)

  1. Token quota (per-model) → 1. Fleet rate limiter ($) → 2. Observation cache →
  2. Priority filter → 4. Context compressor → 5. LLM call → 6. Approval workflow →
  3. 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) or npm run integration-test (e2e)

Dependencies

  • Zero runtime dependencies. Uses Node stdlib + native fetch for 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:

  1. Fix usability blockers — things that make a new user close their terminal. Missing error messages, invisible failures, confusing startup, stale docs.
  2. Reduce complexity — extract god files, lazy-load modules, simplify defaults.
  3. Test the core loop — the 15 core files matter more than 196 intelligence modules.
  4. 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.md and AGENTS.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):

  1. 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.
  2. 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.
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. daemon-diagnostics.ts + 12 tests — /doctor self-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.
  2. 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.
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. 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.
  2. 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].
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. 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.
  2. 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.
  3. fleet-budget-planner.ts + 13 tests — Distribute cost budget by priority
    • progress. Emergency reserve (10%). Min allocation anti-starvation. /budget-plan.

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):

  1. daemon-tick-profiler.ts + 11 tests — Per-phase tick timing (poll/reason/ execute/post-tick). Avg/max/% stats, bottleneck ID, slowest tick. /tick-profiler.
  2. goal-confidence-estimator.ts + 14 tests — Completion probability from 6 factors: progress, velocity, errors, signals, stuck, time pressure. /goal-confidence.
  3. 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):

  1. 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].
  2. session-context-diff.ts + 12 tests — Track context file content hashes (SHA-256) between ticks. Detect added/removed/modified/unchanged. Summary counts. /context-diff.
  3. 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):

  1. 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>.
  2. 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.
  3. 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):

  1. goal-critical-path.ts + 10 tests — Longest dependency chain via topo-sort + longest-path DP. Bottleneck identification, parallelizable task count. /critical-path.
  2. 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.
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. 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.
  2. 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>.
  3. 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):

  1. fleet-daily-digest.ts + 10 tests — Daily fleet summary with completions, failures, costs, health, uptime. Markdown + TUI. /daily-digest.
  2. goal-nl-parser.ts + 15 tests — Extract structured goals from freeform text. 23 verbs, targets, repos, priority, deps, tags. /parse-goal.
  3. 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):

  1. session-output-dedup.ts + 12 tests — Collapse consecutive repeated output lines with count (×N). Configurable min-repeat threshold. Compression stats. /output-dedup <session>.
  2. 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.
  3. 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):

  1. session-output-dedup.ts + 12 tests — Collapse consecutive repeated output lines (×N). Configurable threshold. Compression stats. /output-dedup.
  2. daemon-config-migration.ts + 13 tests — Auto-upgrade config v1→v5 through 4 sequential migrations. Version detection heuristics. /config-migrate.
  3. 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):

  1. 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].
  2. 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.
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. daemon-graceful-shutdown.ts + 12 tests — Phased shutdown: draining → saving → exiting → complete. Track active/drained sessions, drain timeout, state save. /shutdown-status.
  2. 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>.
  3. 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):

  1. 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].
  2. 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.
  3. 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):

  1. 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.
  2. goal-progress-heatmap.ts + 9 tests — Hourly progress visualization. 24-column heatmap with Unicode heat chars (░▒▓█). Peak hour detection. Normalized rendering. /progress-heatmap.
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. 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.
  2. 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.
  3. 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):

  1. daemon-distributed-lock.ts + 10 tests — PID lockfile with stale reclaim. Prevents concurrent daemons. /daemon-lock.
  2. session-output-correlation.ts + 10 tests — Keyword frequency overlap to find related sessions. /output-correlation.
  3. 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):

  1. 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].
  2. fleet-cost-chargeback.ts + 9 tests — Cost allocation by team/project tag. Chargeback reports with group breakdown, fleet %, untagged tracking. Markdown + TUI. /chargeback.
  3. 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:

ReleaseThemeKey Deliverables
v0.196–v0.207Intelligence Modules51 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.210Deep IntegrationAll modules wired into autonomous 8-gate reasoning pipeline + per-tick loop
v0.211Integration Tests28 pipeline integration tests proving end-to-end wiring
v1.0.0ProductionBug fixes (error misdetection, dashboard linking), v1 tag
v1.1–v1.2InfrastructureServiceGenerator, CLICompletions, SessionReplay, WorkflowEngine + wiring
v1.3QualityREADME update, 26 property-based fuzz tests (zero bugs)
v1.4–v1.5Multi-ReasonerMultiReasoner routing, WorkflowTemplates, SessionCheckpoints, TokenQuotas + wiring
v1.6–v1.7A/B + WorkflowsA/B reasoning, workflow cost forecast, workflow chains + wiring
v1.8Stress Tests16 stress tests across 14 modules (zero bugs)
v1.9–v2.0Federation + AlertsFleetFederation, OutputArchival, RunbookGenerator, CustomAlertRules + wiring, v2 tag
v2.1–v2.2DSL + VizAlertRuleDSL, HealthForecast, SessionTail, WorkflowViz + wiring
v2.5Platform CompletionMetricsExport, AlertComposer, FleetGrep, RunbookExecutor
v2.6–v3.3Deep FeaturesSessionClone, GoalSimilarity, CostAllocationTags, PredictiveScaling, SessionTagManager, SessionCompare, FleetSummaryReport, SessionTimeline, FleetChangelog
v3.4Fleet IntelligenceSessionIdleDetector, GoalConflictResolver, FleetLeaderboard
v3.5Observability + DXSessionHealthHistory, CostAnomalyThrottle, SmartSessionNaming
v3.6Operations + ForecastingOperatorShiftHandoff, SessionDepAutoDetect, CostForecastAlert
v3.7Events + VerificationFleetEventBus, GoalCompletionVerifier, SessionOutputDiff
v3.8Debugging + ConfigSessionHeartbeat, ActionReplay, FleetConfigProfiles
v3.9Quality + LifecycleDaemonDiagnostics, SessionStateMachine, IncrementalContext
v4.0Performance + GovernanceDaemonMetricsHistogram, SessionPeerReview, FleetWarmStandby
v4.1Security + ComplianceSessionOutputRedaction, FleetComplianceChecker, DaemonPluginHooks
v4.2Observability + SafetyFleetIncidentTimeline, SessionOutputBookmarks, DaemonCanaryMode
v4.3Intelligence + PlanningDaemonConfigDiff, GoalAutoPriority, FleetCapacityForecaster
v4.4Resilience + HierarchyDaemonWatchdog, FleetCostRegression, GoalCascading
v4.5Health + Replay + ContextDaemonHealthScore, FleetEventReplay, SessionContextBudget
v4.6Profiling + PredictionDaemonTickProfiler, GoalConfidenceEstimator, FleetBudgetPlanner
v4.7Sentiment + BalanceSessionSentiment, FleetWorkloadBalancer, DaemonCrashReport
v4.8Grouping + ValidationFleetSessionGrouping, SessionContextDiff, DaemonConfigSchema
v4.9Export + Quality + CorrelationSessionTranscriptExport, GoalDecompQuality, FleetAnomalyCorrelation
v5.0Graph + Storage + MetadataGoalCriticalPath, FleetSnapshotCompression, SessionOutputAnnotations
v5.1Celebration + ReadinessGoalCelebration, FleetReadinessScore, DaemonProcessSupervisor
v5.2Digest + NLP + Hot-SwapFleetDailyDigest, GoalNLParser, DaemonHotSwap
v5.3Webhooks + Logs + ExportFleetWebhookIntegrations, SessionStructuredLog, DaemonStatePortable
v5.4Dedup + Migration + PredictionSessionOutputDedup, DaemonConfigMigration, GoalProgressPrediction
v5.5Dashboard + Repair + EvolutionFleetOpsDashboard, GoalDepAutoRepair, SessionPatternEvolution
v5.6Alerts + Language + SLAFleetAlertDashboard, SessionLangDetector, GoalSlaEnforcement
v5.7Scaling + Gamification + AuditFleetAutoScaler, GoalGamification, DaemonAuditReport
v5.8Profiling + Affinity + ClipboardDaemonStartupProfiler, FleetAffinityGroups, SessionClipboard
v5.9Shutdown + Impact + RunbooksDaemonGracefulShutdown, GoalDepImpact, FleetRunbookLibrary
v6.0Export + Perf + ComplianceGoalDepGraphExport, DaemonPerfRegression, FleetComplianceReport
v6.1Optimizer + Heatmap + ModDepsFleetCostOptimizer, GoalProgressHeatmap, DaemonModuleDeps
v6.2Trends + Complexity + EventsFleetCostTrend, GoalComplexityTagger, DaemonEventSourcing
v6.3Lock + Correlation + ForecastDaemonDistributedLock, SessionOutputCorrelation, FleetUtilizationForecaster
v6.4TimeMachine + Sparklines + BudgetFleetSnapshotTimeMachine, GoalSparklineDashboard, DaemonTickBudget
v6.5Mutations + Chargeback + EnsembleSessionGoalMutation, FleetCostChargeback, GoalPredictionEnsemble
v7.0Remote Control APIApiServer (REST+SSE+OpenAPI+Auth), AlertRuleInheritance, SessionAffinityRouter, BatchGoalAssignment
v7.1Rate Limiting + Knowledge + MatrixApiRateLimiting, CrossSessionKnowledge, FleetPriorityMatrix
v7.2Webhooks + Retention + VelocityApiWebhookPush, AuditTrailRetention, GoalVelocityNormalization
v7.3Errors + Resources + PaginationSessionErrorPatternLibrary, DaemonResourceMonitor, ApiPagination
v7.4Burndown + Leak Detection + TopologyGoalProgressBurndown, DaemonMemoryLeakDetector, FleetSessionTopology
v7.4.1Usability fixesopencode 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

  1. 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 via apiPort + apiToken. /api TUI 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):

  1. 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.
  2. 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].
  3. 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):

  1. 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]].
  2. 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.
  3. 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):

  1. 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>.
  2. daemon-resource-monitor.ts + 13 tests — Track CPU/memory per tick via process.memoryUsage() + process.cpuUsage(). Rolling 300-sample history. Peak tracking. Trend detection. Heap sparkline visualization. /resources.
  3. 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. /api endpoints 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):

  1. 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.
  2. 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.
  3. 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:

  1. opencode serve logging — stderr/stdout now piped to ~/.aoaoe/opencode-serve.log instead of stdio: "ignore". On startup failure, last 10 lines shown to user. Previously all output was /dev/null — invisible crashes.
  2. README accuracy — badge updated 3,491→4,985 tests, module count 55→196, project structure rewritten to separate core (15 files) from intelligence modules.
  3. Missing tool errors — validateEnvironment() now shows per-tool install links (aoe GitHub URL, tmux brew/apt, opencode GitHub, claude npm command).
  4. Startup summary — prints version, mode, poll/reason intervals, backend, API/health URLs, /help hint on launch. User knows what to expect.
  5. Session title collision warning — poller warns on duplicate case-insensitive titles that could cause wrong-session command routing.
  6. 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. Created DaemonContext interface in daemon-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.
  7. 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.
  8. --observe promoted — getting-started flow in --help and init next-steps now shows observe (free) before dry-run (costs tokens). The funnel is: init → test-context → observe → dry-run → live.
  9. /help tiered — bare /help shows 12 essential commands. /help all for the full 197. New users don't drown.
  10. Default $10 cost budget — generated config includes costBudgets with globalBudgetUsd: 10.00 and autoPauseOnExceed: true. No unlimited burns.
  11. Config hot-reload in startup banner — config: path (hot-reloaded on change).
  12. init next-steps rewritten — includes --observe, notes cost budget default.

Daily-use robustness (same session, continued):

  1. opencode.ts startServer() logs to file — reasoner restart path now pipes to ~/.aoaoe/opencode-serve.log (append), matching init.ts. Previously stdio: "ignore" — invisible crashes on reasoner-initiated restarts.
  2. Config warnings surfaced in TUI — configWarnings[] collected during loadConfig(), replayed as TUI error entries after tui.start(). Unknown keys (typos) now visible instead of hidden behind alternate screen.
  3. 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).
  4. SQLite recovery less nuclear — database is locked no longer triggers immediate DB wipe. First attempt: restart server (DB preserved). Second consecutive SQLite error: wipe + restart. Prevents data loss from transient DB locks.
  5. 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)".
  6. Lock file message fixed — removed misleading "remove daemon.lock" hint (stale locks auto-reclaim). Now shows kill <pid> for the running daemon.
  7. pollIntervalMs upper bound — max 300,000ms (5 min). Absurdly high values no longer silently accepted.
  8. 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):

  1. 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 existing readPkgVersion().
  2. Doctor cleans stale locks — auto-deletes stale daemon.lock when daemon isn't running. Shows kill <pid> for live daemons instead of misleading rm hint.
  3. Doctor opencode version fixed — opencode version → opencode --version. Now shows "1.3.3" instead of "Error: Failed to change directory".
  4. Doctor version output sanitized — strips "Error:" lines from tool version output.
  5. Missing cost budget warning — configs without costBudgets get a TUI warning: "no costBudgets configured — LLM spending is unlimited".

Verified working end-to-end:

  • aoaoe --help → clear, getting-started funnel
  • aoaoe test-context → finds 6 sessions, resolves all project dirs
  • aoaoe doctor → all tools detected, versions correct, reasoner responding
  • aoaoe --observe → starts, polls 6 sessions, shows output, shuts down clean
  • aoaoe status → shows daemon not running with start hint
  • aoaoe tasks → shows 6 tasks with progress
  • aoaoe config → dumps effective config
  • Non-TTY (headless) mode → works correctly with plain text output
  • 348 core + reasoner tests passing
  1. --log-file <path> flag — redirect all daemon output to a file for background/service mode. No TUI, no terminal. Enables aoaoe --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.

  1. Poller stall metadata — SessionSnapshot now carries outputUnchangedTicks, lastOutputChangeAt, and potentiallyStuck. 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).
  2. 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.
  3. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.