Files
investor-flow/HANDOFF.md
T

6.9 KiB

ORCHESTRATOR HANDOFF — 2026-06-30

Role & Goal

You are the ORCHESTRATOR (coordination only — do NOT write or review code). Drive all 26 vertical slices (DECOMPOSITION.md) to completion via TWO implementers that cross-review (no self-review: reviewer ≠ implementer):

  • ornith-35 = local omlx model omlx/Ornith-35B (35B, ~28-38 tok/s). GOOD for single-file/small implementations. CHOKES on big multi-turn (test-writing, huge prompts) — keep its dispatches SMALL/single-file.
  • qwopus35b = remote remote/qwopus35b (131K context, single-request endpoint). GOOD for tests, reviews, multi-file adapters. Slower per-call (~5-15min).

STANDING PROCESS (critical)

  1. Clear ALL pending review tasks FIRST via active driving (dispatch fixes + reviews, process completions, dispatch next — NO 5-min waits during this phase). Only resume the 5-min cadence once every review task is approved/complete.
  2. 5-min cadence for implementation monitoring (board/agents/logs each 5 min). After 3 checks not-done → inspect logs.
  3. NEVER kill a dispatch on low client CPU alone (that = I/O wait). Check the omlx SERVER log ~/.omlx/logs/server.log for active generation first. Remote: a "ping hangs" = busy (single-request processing), NOT dead.
  4. Agent self-complete bug: implementers (pi --approve) run status.py --transition complete on their OWN task, bypassing code_review. Watch for tasks vanishing into complete/ prematurely → restore: mv .automaton/tasks/complete/<t> .automaton/tasks/<t>; printf 'implement\n' > .automaton/tasks/<t>/.state.

Dispatch pattern

nohup env AUTOMATON_TASK=<task> pi --print -nc -np --approve --model <omlx/Ornith-35B|remote/qwopus35b> "$(cat /tmp/prompt.txt)" > /tmp/<log>.log 2>&1 & echo "PID=$!" > /tmp/<pid>.pid; disown

Write prompts via cat > /tmp/prompt.txt <<'EOF' ... EOF (quoted heredoc preserves $/backticks).

Guard workarounds

  • Structured write/edit tools are BLOCKED on the decomposed parent (DECOMPOSITION.md guard) → use BASH for ALL file writes.
  • git commit is guard-intercepted (staleness) → run python3 ~/.automaton/scripts/status.py --touch --task <task> BEFORE every commit.
  • Phase-graph: implement→code_review needs IMPLEMENTATION.md (write a brief one). code_review:approved→complete needs a bug_find gate → bypass: printf 'complete\n' > .state.
  • automaton_create_task tool is BROKEN (no mkdir) → create tasks manually: mkdir -p .automaton/tasks/<name>; printf 'implement\n' > .state; printf '{"implement":"<author>"}\n' > .state.models; printf '' > .state.approvals
  • Claim conflicts (stale locks): --release --task <t> --agent <a> then --claim --task <t> --agent <b>.
  • .state.models {"implement":"<author>"} = code author; the code_review claimer MUST differ (conflict-of-interest).

omlx infra

  • omlx server on port 8000 (NOT 8080 — 8080 is the automaton dashboard). Logs: ~/.omlx/logs/server.log. If a ping hangs, the server is busy (single-request) — be patient, don't kill.

IN-FLIGHT dispatches (nohup — survive switch)

  • omlx slice10-tests PID 16468 (log /tmp/omlx-slice10-tests.log) — writing app/server/src/db/tests/watchlistRepository.test.ts (slice-10 REQUEST CHANGES test debt).
  • qwopus35b review-slice15 PID 17747 (log /tmp/qwopus-review-slice15.log) — reviewing OptionsAdapter. Check: kill -0 <pid>.

REVIEW BACKLOG (clear FIRST)

  • slice-15 (qwopus reviewing in-flight) → APPROVE=complete / REQUEST CHANGES=omlx fix.
  • slice-7-institution-flow | implement | REQUEST CHANGES: omlx must fix 2 medium (zero-share ambiguous txns default to 'reporter increased holdings' → make neutral/no-direction; 'unchanged' positions included by default → exclude by default to reduce noise). Then qwopus re-review.
  • slice-10 (omlx writing tests in-flight) → qwopus re-review.
  • portfolio-repository | code_review | none → qwopus review (queued).
  • (slice-6 ✅ approved/complete; 13f/form4 test debt = non-blocking follow-up.)

NEXT STEPS

  1. Check the 2 in-flight PIDs (16468, 17747).
  2. omlx slice10-tests done → commit watchlistRepository.test.ts + --touch + transition slice-10 → code_review + dispatch omlx → fix slice-7 (2 medium).
  3. qwopus review-slice15 done → APPROVE: mark slice-15 complete + dispatch qwopus → review portfolio; REQUEST CHANGES: omlx fixes.
  4. Clear slice-7 (fix→re-review), slice-10 (re-review), portfolio (review) BEFORE resuming 5-min cadence.
  5. Then drive remaining slices per DECOMPOSITION order: 8 (institutional-dashboard, blocked by 7), 9 (sector-rotation, by 4+7), 11 (sizing-engine, by 10), 12 (strategy-lab-backtest, by 11), 13 (universe+screener, by 12), 14 (sector-confirmation, by 9+13), 17 (alerts, by 7+11+9+16), 18 (risk-engine, by 11), 19 (options-convexity, by 15+18), 20 (macro, by 18), 21-26 (check DECOMPOSITION.md).

COMPLETED slices

1 tracer, 2 auth/2FA/OAuth, 3 onboarding, 4 yfinance-backfill, 5 chart-lab M2, 6 SEC-EDGAR adapter (filings_index/company_facts/filer_cik_meta/full_text_search/13f_holdings/form4_tx + 16 tests), 7a InstitutionFlowEngine (in review), 15a OptionsAdapter (in review), 16 X-cookie+Reddit adapters ✅. Repos: watchlistRepository, portfolioRepository. 145+ backend tests, 2 SPA lint.

Repo/conventions

  • /Users/laptran/Documents/investor-flow. Backend app/server/ (Node 26, node:sqlite, native TS, @trpc/server, yahoo-finance2, zod; test: cd app/server && node --test --experimental-strip-types "src/**/*.test.ts"). Frontend app/src/ (Next, Recharts, Tailwind; lint: cd app && node --test --experimental-strip-types src/__tests__/primary-rule-lint.test.ts).
  • ADR-0007 (NO imperative trade verbs: buy/sell/you should/add to your/rotate into/action needed), P6 plain English, P7 shape+color+label.
  • yf2 v3: const yf = new YahooFinance() (class, NOT v2 default-export); yf.quote/chart/quoteSummary/options.
  • DESIGN.md + DECOMPOSITION.md (26 slices) at .automaton/tasks/complete/investor-flow-platform-design/.

Framework issues filed (for ~/.automaton maintainer)

  • ~/.automaton/tasks/orchestrator-session-framework-issues/ (8 issues incl. agent self-complete bypass #7, automaton_create_task broken #1, commit-guard staleness #3, code_review→complete bug_find gate #4).
  • ~/.automaton/tasks/add-orchestrator-polling-cadence/ (enforceable 5-min cadence + slow-vs-stuck heuristic).
  • .automaton/ISSUES_LOG.md (older P0-P3 framework issues from pilot start).
  • STALE ISSUES_LOG entries to IGNORE: "full_text_search ETag" + "tests still 1 failing" are RESOLVED (ETag fix landed, 16/16 green).

Active task board (the ones being worked; many new legacy tasks also exist)

slice-10-watchlist-shell|implement|ornith-35 ; slice-15-options-adapter|code_review|qwopus35b ; slice-7-institution-flow|implement|none(needs fix) ; portfolio-repository|code_review|none ; fix-edgar-tests|implement|none(stale, Edgar tests now green — can mark complete/drop). Complete: slice-6, slice-16, chart-lab-panel-m2, fix-chartlab-findings, fix-spa-review-findings, fix-backend-review-findings.