Skip to content
hango bootstrap: contract, research, roadmap plan, red team, validation

hango bootstrap: contract, research, roadmap plan, red team, validation

September 22, 2026

What happened

  • Brainstorm contract accepted: Go agent harness server, multi-tenant with logical isolation, learning roadmap with production-ready end state, Claude implements each phase plus a learning doc, user reviews per phase. References: goclaw (local clone, 454K LOC) and langchain deepagents v0.7.16.
  • Four research reports in plans/reports/: goclaw architecture (borrow provider/tool ifaces, tenant_id + ctx scoping, lane scheduler; skip dual loops and setter DI), deepagents (middleware stack, everything-is-a-filesystem, three-layer context defense, resumable step-function loop), Go ecosystem (Go 1.27 stdlib uuid v7, synctest, anthropic-sdk-go v1.74 Accumulate, RLS SET LOCAL pitfall, SSE over stdlib), Langfuse + Grafana (OTLP HTTP-only Langfuse endpoint, single-collector fan-out, otel-lgtm 0.33.1, otelecho deprecated so wrap with otelhttp).
  • Tech stack locked in docs/tech-stack.md: Echo v5 chosen over Fiber because Fiber’s fasthttp breaks SSE flushing, otelhttp, and context cancellation. Official SDKs behind own Provider interface, pgx + hand SQL + goose, Postgres only.
  • Mid-session re-prioritization from the user: observability is foundation, roadmap is the primary artifact. Observability moved from phase 14 into phase 1; every phase instruments itself and documents how to debug its layer; old phase 14 became dashboards, alerts, and a failed-run runbook. docs/roadmap.md written (harness anatomy, principles, build order with seams, where-to-look table).
  • Red team with four lenses produced 41 findings, deduplicated to 15 groups, all accepted. Highest impact: forced RLS would zero out every plain-pool query including auth; no atomic run claim or lease meant double execution on restart; dangling-tool-call repair ran before approvals were consumed and destroyed approved batches; subagent lane acquired re-entrantly deadlocks at depth 2; import cycle between agent and run packages; prompt-cache ordering invariant was unimplementable under the phase 7 prompt assembly; missing intra-tenant authorization.
  • User decisions during red team: defer bring-your-own provider credentials, members see only what they created, runs requeue and resume at turn boundary with owner lease. pause_turn handling dropped since no server tools are registered.
  • Validation: module path github.com/phihdn/hango, Langfuse Cloud Hobby for dev, audit everything (append-only audit_events written by a server middleware for every mutating request and approval decision, joined to traces by trace_id), phase 3 proven by hango probe plus fake-provider tests.

Decision

Plan at plans/260922-0123-hango-agent-harness-roadmap/ is the execution contract: 16 phases, 221h (186h implementation, 35h learning docs), migrations 00001-00011, package cap stated as the real count with amendment required to add one. Locked rules added: internal/agent imports nothing from internal/run; system prompt assembled inside the chain at model-call time; runs carry owner and lease; every table gets cross-tenant and intra-tenant tests.

Next steps

  • User reviews the plan and docs/roadmap.md, then approves starting phase 1 via /ak:cook.
  • Phase 3 includes a bounded empirical probe of three unverified Langfuse ingestion behaviors with the fallback of always setting langfuse.* attributes explicitly.
  • Follow-ups recorded in plan.md: BYO provider credentials, Anthropic server tools with opaque block passthrough, MCP bridge, multi-replica, sandboxed exec, audit retention.

Friction

  • Commit signing failed twice with a 1Password agent error while the app was locked; resolved on retry.
  • The session-active-plan hook script is not installed in this runtime; ak plan use carried the plan pointer instead.

Historical work record — not durable authority. Prefer docs/specs/ADRs for current decisions.