Finish hamr restructure (synax → hamr) — Design
Date: 2026-06-17 · Status: approved (verbal "go for it")
Goal
hamr boots with synax's full experience + the 7 features, on pi-as-engine. Not stock pi.
Non-goals
- No sexy-tui-rs swap. Keep pi-tui (it's better). Theme it.
- No new themes. Reconstruct synax
default/kawaii/pinkOutas-is. - No Rust rewrite (separate, spec 007).
- Preserve pi's native terminal scrolling (trackpad + mouse). Must not break.
Architecture
pi-as-engine. Boot = pi main() (packages/coding-agent/src/cli.ts) + hamrBuiltinExtension (packages/coding-agent/src/hamr/extension.ts). All hamr features = pi extension hooks/tools + theme + provider registrations. Source-of-truth for behavior/visuals = ~/workspace/git/synax/src.
Decisions (user-refined)
- Relay = OpenAI-compatible provider. Complexity masked, native. Models auto-detect via endpoint (like synax). No vendored relay server.
- Orchestration = lean parallel+sequential dispatcher, simple code (pi-style). Feeds an observable dashboard. Feel = Claude Code, more observable.
- Theming = reconstruct synax themes as-is + model-aware default coloring.
Current state (~half)
- Solid: FTS5 memory store path, local-model tool-call parsers (wired via extension).
- Gaps: memory invisible to user; theming partial; indicator = glyph frames (want rainbow words); only sequential
delegate_subagent; no realHandoffManager; relay = config only; deadpackages/hamr/orphan +reference/graveyard.
Workstreams (acceptance per item)
- W0 Baseline + cleanup. Commit WIP. Delete
packages/hamr/+reference/(single source of truth). Refactorextension.tsmonolith → per-feature modules (memory.ts,indicator.ts,subagents.ts,handoff.ts, theme reg);extension.tsonly composes. AC:npm run verifygreen;extension.tsthin. - W1 Memory visibility (task #1).
save_memory/search_memory/handoff_memorytool calls render in TUI with stored AND retrieved content. Port HolographicMemory richness from synax. AC: live run shows the tool call + content; FTS5 search returns; index injected. - W2 Theming. Reconstruct synax
default/kawaii/pinkOuton pi's theme; model-aware default (status bar + accents recolor by active model). AC: visual parity w/ synax; model switch recolors; native scroll works (trackpad + mouse) (task #2). - W3 Working indicator. Rainbow shimmering words (not glyphs). AC: animated word shimmer while model works.
- W4 Subagents. Lean parallel + sequential dispatcher; feeds ctrl+o dashboard live (status / elapsed / result). AC: parallel fan-out runs; dashboard observable; sequential still works.
- W5 Handoff. Structured
HandoffManagerover FTS5 (beyondhandoff_memory). AC: structured handoff manifest tool; consumable by subagents. - W6 Relay. OpenAI-compatible provider with endpoint model auto-detect, complexity masked. AC: point at relay endpoint → models appear → switch works.
Fanout
- Parallel, disjoint files: W2 theming, W6 relay.
- Serial, owned centrally (touch
extension.ts+ new modules): W0 → W1, W3, W4, W5. - Per-workstream gate:
npm run typecheck && npm run lint && npm run build && npm test+ live boot smoke.
Verification (done =)
npm run verifygreen.node packages/coding-agent/dist/cli.jsboots the hamr look (not pi): model-aware color, rainbow word indicator, native scroll.- Memory tool calls visible with content.
- Subagents: parallel run visible in ctrl+o dashboard.
- Relay endpoint auto-detects models.
- No
packages/hamr/, noreference/.