autoresearch-observatory-architecture

AutoResearch Intelligence Observatory — Architecture & Integration

What

Standalone web portal (ar.arjtech.in) that captures and visualizes the complete lifecycle of every autoresearch experiment across all agents (Claude Code, NOVA, CXOs). Two-tier UI: analytical observatory for scanning + editorial deep dive for studying individual decision chains with full reasoning trails.

Stack

Python 3.12 + aiohttp + aiosqlite (SQLite WAL, 6 tables) | Alpine.js + Tailwind CSS + Chart.js SPA | Docker container autoresearch-dashboard at /opt/infra/autoresearch-dashboard/, port 18085. BasicAuth via Traefik.

Integration Points

  • Autoresearch skill (~/.claude/skills/autoresearch/SKILL.md): § Observatory Integration section auto-POSTs lifecycle events (experiments, rounds, reasoning, strategy-shifts, insights) via curl to http://localhost:18085/api/...
  • Hookify rule (autoresearch-autoloader): auto-detects optimization/research keywords on UserPromptSubmit, forces skill invocation
  • Plugin integration (plugin-integration.md): AutoResearch Pipeline added to route selection, conflict resolution, decision flowchart, graceful degradation
  • SKILL.md additions: Output Paths (mandatory), Sequential Thinking Integration (mandatory), Vault Integration, Observatory Integration
  • OpenClaw agents: use container-network URL http://autoresearch-dashboard:8080/api/... with their agent_id

Critical Patterns

  • aiosqlite shared connection needs await db.rollback() in EVERY exception handler — dirty state persists on shared connection
  • Chart.js interaction: { mode: null } is invalid in v4.x — use events: []
  • Sparkline Chart instances must be destroyed before Alpine re-render or they leak memory
  • Narrative change_pct must always be positive (use abs()) with direction-aware change_description