From 63d9f80c090e6565d17828b6b50724f0f7d6c098 Mon Sep 17 00:00:00 2001 From: Investor Flow Build Date: Thu, 23 Jul 2026 20:57:52 -0400 Subject: [PATCH] Remove automaton task management framework - Delete .automaton/ directory and all tracked files - Remove git hooks (pre-commit, pre-push) - Delete ADR-0002 (automaton as issue tracker) - Remove automaton references from AGENTS.md, HANDOFF.md, TASK_COMPLETION_SUMMARY.md, docs - Update .gitignore to remove automaton entries - Unregister from ~/.automaton/projects.json --- .automaton/.agent.md | 43 ----------- .automaton/HANDOFF.md | 77 ------------------- .automaton/ISSUES_LOG.md | 61 --------------- .automaton/TASK_ASSIGNMENT.md | 44 ----------- .automaton/WORKFLOW.md | 46 ----------- .automaton/config.md | 11 --- .../loops/investor-flow-drain/.state.lock | 0 .../loops/investor-flow-drain/.state.log | 49 ------------ .../loops/investor-flow-drain/.state.loop | 14 ---- .../investor-flow-drain/loop-implement.md | 16 ---- .../investor-flow-drain/loop-orchestrate.md | 11 --- .../investor-flow-drain/loop-verifier.md | 1 - .../loops/investor-flow-drain/loop.json | 40 ---------- .automaton/loops/symbol-header/.state.log | 0 .automaton/loops/symbol-header/.state.loop | 14 ---- .automaton/loops/symbol-header/loop.json | 35 --------- .automaton/models.json | 21 ----- .automaton/project-name.md | 1 - .../tasks/queue-overhaul/.state.lastedit | 0 .automaton/tasks/queue-overhaul/SPEC.md | 41 ---------- .gitignore | 5 -- AGENTS.md | 1 - HANDOFF.md | 3 +- TASK_COMPLETION_SUMMARY.md | 1 - docs/FUNCTIONAL_DESIGN.md | 2 +- docs/TECH_DESIGN.md | 3 +- docs/adr/0002-automaton-as-issue-tracker.md | 18 ----- 27 files changed, 3 insertions(+), 555 deletions(-) delete mode 100644 .automaton/.agent.md delete mode 100644 .automaton/HANDOFF.md delete mode 100644 .automaton/ISSUES_LOG.md delete mode 100644 .automaton/TASK_ASSIGNMENT.md delete mode 100644 .automaton/WORKFLOW.md delete mode 100644 .automaton/config.md delete mode 100644 .automaton/loops/investor-flow-drain/.state.lock delete mode 100644 .automaton/loops/investor-flow-drain/.state.log delete mode 100644 .automaton/loops/investor-flow-drain/.state.loop delete mode 100644 .automaton/loops/investor-flow-drain/loop-implement.md delete mode 100644 .automaton/loops/investor-flow-drain/loop-orchestrate.md delete mode 100644 .automaton/loops/investor-flow-drain/loop-verifier.md delete mode 100644 .automaton/loops/investor-flow-drain/loop.json delete mode 100644 .automaton/loops/symbol-header/.state.log delete mode 100644 .automaton/loops/symbol-header/.state.loop delete mode 100644 .automaton/loops/symbol-header/loop.json delete mode 100644 .automaton/models.json delete mode 100644 .automaton/project-name.md delete mode 100644 .automaton/tasks/queue-overhaul/.state.lastedit delete mode 100644 .automaton/tasks/queue-overhaul/SPEC.md delete mode 100644 docs/adr/0002-automaton-as-issue-tracker.md diff --git a/.automaton/.agent.md b/.automaton/.agent.md deleted file mode 100644 index cf9de87..0000000 --- a/.automaton/.agent.md +++ /dev/null @@ -1,43 +0,0 @@ -# .agent.md — Investor Flow project - -## Autopilot -Autopilot: Enabled - -## Routing - -IF task type = research → load prompts/research.md + .rules.md -IF task type = design → load prompts/design.md + SPEC.md -IF task type = test_design → load prompts/test_design.md + SPEC.md + DESIGN.md -IF task type = implement → load prompts/implement.md + SPEC.md + DESIGN.md + TEST_PLAN.md + CONTRACT.md -IF task type = code_review → load prompts/code_review.md + SPEC.md + DESIGN.md + IMPLEMENTATION.md -IF task type = bug_find → load prompts/bug_finder.md + SPEC.md + code -IF task type = doc_review → load prompts/doc_review.md + DESIGN.md -IF task type = orchestrate → load prompts/orchestrate.md + project structure - -## State Enforcement (v2.0) - -All phase transitions must go through `status.py` (always pass `--project`): -- Create: `status.py --create-task {name} --project {project}` -- Transition: `status.py --transition {phase} --task {name} --project {project}` -- Approve: `status.py --approve --task {name} --project {project}` -- Audit: `status.py --audit --project {project}` - -## Agent Configuration - -Mode: multi-agent -Agents: - - id: ornith-35 - phases: [research, decomposition, design, test_design, implement, code_review] - role: implementer - - id: qwopus35b - phases: [research, decomposition, design, test_design, implement, code_review] - role: implementer - - id: orchestrator - phases: [new, complete, human_intervention] - role: coordinator -Lock timeout: 30m - -## Team (models — .automaton/models.json) -- ornith-35 (omlx/local, 131K) — implementer (primary; fast) -- qwopus35b (remote, 131K) — implementer (cross-reviews ornith-35's code; ornith-35 cross-reviews qwopus35b's) -- orchestrator — coordination ONLY (no code writing, no code review); dispatches implementers, assigns cross-reviews, enforces conflict-of-interest (no implementer reviews its own code). diff --git a/.automaton/HANDOFF.md b/.automaton/HANDOFF.md deleted file mode 100644 index daf8dcd..0000000 --- a/.automaton/HANDOFF.md +++ /dev/null @@ -1,77 +0,0 @@ -# Handoff — Investor Flow (2026-07-01) - -## Current State -**Orchestrator:** qwopus35b (remote, 131K context) -**Implementer available:** ornith-35 (omlx/local, 131K context) -**Default model:** ornith-35 - -## What Was Done - -### Defect Fix -- Fixed ADR-0007 footer in RiskEngine — appended `ADR_0007_FOOTER` to all 4 recommendation paths and updated test to verify actual footer text presence. All 35 tests pass. - -### Task Preparation (All Pending Tasks Now Have SPEC.md + Are in Implement Phase) -19 tasks written with SPEC.md files, all in `implement` phase: - -**Ornith's domain (backend adapters, deep modules):** -- sec-edgar-adapter-and-filings-panel-m6 — Wire EdgarAdapter to tRPC + filings panel -- options-adapters-and-options-dd-panel-m3 — Options adapter + M3 DD panel -- x-cookie-adapter-and-sentiment-feed-m8 — X/Cookie + Reddit adapters + sentiment feed -- universe-evaluator-filter-screener-strategy-screener — Universe evaluator + screener (M15a+b) -- sector-confirmation-via-screener-crosslink — Screener + rotation cross-link -- institution-flow-engine-and-insider-stream-m4-m5 — Institution flow engine + insider stream -- options-convexity-sleeve-m17 — 5-state options unlock + convexity sleeve -- strategy-lab-and-backtest-m16 — Strategy authoring + backtest engine -- thesis-monitoring-l1-timeline-alerts — L1 thesis monitor + timeline alerts -- derisking-strategy-library — 6 derisking strategies -- macro-module-m18 — FRED adapter + regime classifier + commentary -- docker-compose-deployment — Docker Compose target -- investor-flow-build — Build pipeline + CI -- backfill-integration-test — End-to-end backfill test -- yfinance-adjustments-parse — Adjustments categorization - -**My domain (UI panels, orchestration):** -- alerts-v1-alertengine-hybrid — AlertEngine hybrid (event-driven + polling) -- mobile-companion-m19 — Mobile companion UI -- watchlist-portfolio-shell-panels-m9-m10 — Watchlists + portfolio + journal -- reports-research-note-m11-html-v1 — HTML research notes - -## What Needs to Be Done Next - -### Priority Order (dependencies from DECOMPOSITION.md): -1. **sec-edgar-adapter-and-filings-panel-m6** (ornith) — unblocks slices 7, 8 -2. **institution-flow-engine-and-insider-stream-m4-m5** (ornith) — unblocks slices 8, 17 -3. **options-adapters-and-options-dd-panel-m3** (ornith) — unblocks slice 19 -4. **x-cookie-adapter-and-sentiment-feed-m8** (ornith) — unblocks slice 17 -5. **universe-evaluator-filter-screener-strategy-screener** (ornith) — unblocks slices 13, 14 -6. **sector-confirmation-via-screener-crosslink** (ornith) — depends on 9 + 13 -7. **options-convexity-sleeve-m17** (ornith) — depends on slice 15 + 18 -8. **strategy-lab-and-backtest-m16** (ornith) — depends on slice 11 -9. **thesis-monitoring-l1-timeline-alerts** (ornith) — depends on slices 17, 18 -10. **derisking-strategy-library** (ornith) — depends on slices 19, 21 -11. **macro-module-m18** (ornith) — depends on slice 18 -12. **docker-compose-deployment** (ornith) — depends on slice 22 -13. **investor-flow-build** (ornith) — infrastructure -14. **backfill-integration-test** (ornith) — testing -15. **yfinance-adjustments-parse** (ornith) — adjustments parsing -16. **alerts-v1-alertengine-hybrid** (orchestrator) — depends on slices 7, 9, 16, 18 -17. **mobile-companion-m19** (orchestrator) — depends on slices 17, 18, 22 -18. **watchlist-portfolio-shell-panels-m9-m10** (orchestrator) — depends on slices 3, 4 -19. **reports-research-note-m11-html-v1** (orchestrator) — depends on slice 18 - -### Key Issues to Be Aware Of -1. **Guard blocks pi --print on decomposed tasks** (P0 Issue 1) — Cannot use `pi --print` to implement sub-tasks directly. Only loop-runner daemon works. -2. **Loop runner defaults to opencode, not pi** (P0 Issue 2) — Need to configure harness.command in loop.json if using pi dispatch. -3. **No "implement-decomposition" loop template** (P2 Issue 6) — Only ci-triage and self-improvement templates ship. Need to create one. -4. **Slice sizing too large for single model dispatch** (P2 Issue 7) — Each slice needs to be broken into micro-dispatches sized for the model's coherence window (~43k tokens). - -### Model Switching Notes -- Both models are reachable: ornith-35 (omlx/local), qwopus35b (remote) -- Current default is ornith-35 -- The guard blocks headless pi dispatch on decomposed tasks — use loop-runner if available -- If switching to a different model, update .automaton/models.json accordingly - -### What to Work On First -Start with the SEC adapter + filings panel (ornith). This is the foundational piece that unblocks many downstream tasks. The SPEC.md already exists in `.automaton/tasks/sec-edgar-adapter-and-filings-panel-m6/SPEC.md`. - -After that, work on the institution flow engine — it's the next critical dependency for alerts and dashboard rollup. diff --git a/.automaton/ISSUES_LOG.md b/.automaton/ISSUES_LOG.md deleted file mode 100644 index 422445b..0000000 --- a/.automaton/ISSUES_LOG.md +++ /dev/null @@ -1,61 +0,0 @@ -# Automaton Framework — Issues Log (from Investor Flow pilot) - -Discovered while piloting the automaton framework on a real 26-slice decomposition. Each issue is categorized for the self-improvement loop. The user is concurrently developing ~/.automaton in a separate session. - -## P0 — Blocking: cannot dispatch implementation via pi - -### Issue 1: Guard blocks ALL pi-driven edits on decomposed tasks -**Symptom:** `pi --print` headless dispatch (the only pi-native way to drive a model) is blocked by the automaton-guard-pi plugin. The guard resolves the "primary task" as the decomposed parent (alphabetically first among implement-phase tasks), finds `DECOMPOSITION.md`, and blocks: *"Task has a DECOMPOSITION.md — broken into sub-tasks for the loop runner."* Even if the guard resolved to the sub-task, it finds `PARENT_SPEC.md` and blocks: *"sub-task reserved for the loop runner."* -**Root cause:** The guard has no way to know WHICH sub-task a headless pi instance is working on. `checkCanEdit` calls `status.py --can-edit` without `--task`, so it picks the first implement-phase task (the parent). The guard's DECOMPOSITION.md/PARENT_SPEC.md checks then block both parent and sub-task paths. -**Impact:** Cannot use `pi --print --model ` to implement sub-tasks. The only dispatch path that works is the loop-runner daemon via `opencode run` — which uses a different model config than pi. -**Fix direction:** The guard should accept a `--task` argument from the pi process (e.g. via env var `AUTOMATON_TASK=`) so headless pi instances can declare which sub-task they're implementing. When `--task` points to a sub-task in implement phase, allow edits regardless of PARENT_SPEC.md. - -### Issue 2: Loop runner only dispatches via opencode, not pi -**Symptom:** `loop-runner.py`'s `_invoke_harness` defaults to `["opencode", "run", "--dir", "{cwd}", "{prompt_content}"]`. There is no pi-native dispatch path. -**Impact:** Pi's configured models (omlx/Qwythos-9B, remote/ornith, etc.) are invisible to the loop runner. Opencode has its own separate model config (`~/.config/opencode/opencode.json`) with different provider names. To use pi-configured models, the user must either (a) mirror the config into opencode, or (b) the loop runner needs a pi dispatch mode. -**Fix direction:** Add a `pi` harness option in loop.json: `{"harness": {"command": ["pi", "--print", "--approve", "--model", "{model}", "{prompt_content}"]}}`. Or make the harness command configurable per-loop in the template. - -## P1 — Phase graph friction - -### Issue 3: design:approved cannot transition to decomposition -**Symptom:** `status.py --transition decomposition` from `design:approved` fails: *"Legal transitions from design:approved are: test_design, implement."* The canonical flow `research → decomposition → design` was skipped (we went `research → design`), and there's no way back. -**Impact:** DECOMPOSITION.md written during design phase is an "out-of-order artifact" that blocks transitions to test_design and implement. Required shuffling files in/out of the task folder to satisfy the gate. -**Fix direction:** Either (a) allow `design:approved → decomposition` as a legal transition, or (b) allow DECOMPOSITION.md as a valid artifact in the design phase (not just decomposition), or (c) document that decomposition must always precede design and enforce it at research:approved. - -### Issue 4: Parent task stuck in implement after orchestrate_finalize -**Symptom:** `automaton_orchestrate_finalize` creates sub-tasks but fails to transition the parent to `complete`: *"Failed to transition parent task."* The parent stays in `implement` forever. -**Impact:** Dashboard shows the parent as a permanently in-progress task. Confusing for the user. -**Fix direction:** `automaton_orchestrate_finalize` should transition the parent to `complete` (or a new `decomposed` state) after sub-tasks are created. - -## P2 — DX / usability - -### Issue 5: dashboard.sh wrapper has a syntax error -**Symptom:** `dashboard.sh` uses `exec python3 -c "..."` without parentheses — Python 3 SyntaxError. Workaround: run `PYTHONPATH=~/.automaton python3 -m automaton.dashboard` directly. -**Fix:** Change `exec python3 -c` to `exec python3 -c` → actually the issue is bash `exec` syntax: `exec python3 -c "code"` should be `exec python3 -c "code"` — wait, the error is `SyntaxError: Missing parentheses in call to 'exec'` which is a Python error inside the heredoc, not bash. The inline Python code itself has a syntax error. - -### Issue 6: No generic "implement-decomposition" loop template -**Symptom:** Only `ci-triage` and `self-improvement` loop templates ship. No template for "pick up the next new sub-task from an approved decomposition and implement it." -**Fix direction:** Ship an `implement-decomposition` loop template with `work_source: {kind: "decomposition"}` that picks the next `new` sub-task, transitions it through research→implement, dispatches the implementer, then advances to code_review. - -### Issue 7: Slice sizing mismatch — vertical slices too large for single model dispatch -**Symptom:** A "vertical slice" in DECOMPOSITION.md (e.g. slice #1 = 20 files across schema/adapter/cache/queue/API/auth/UI/tests) is too large for one headless model dispatch. Both Qwythos-9B (drifted into meta-exploration) and Ornith-35B (read files but produced no code in 3 min) stalled. -**Fix direction:** The framework should support a "micro-dispatch" layer between slices and model dispatch — each slice decomposes into 1-4 file micro-dispatches sized for the model's coherence window. Or document this as an orchestrator responsibility (which is what we did in DESIGN.md Section 8). - -### Issue 8: automaton_status shows project as "trader-flow" despite rename -**Symptom:** After renaming the repo dir `trader-flow → investor-flow` (with a symlink back), `automaton_status` still reports `Project: trader-flow`. The project name is cached somewhere and doesn't follow the symlink. -**Fix direction:** Resolve the project name from the real path (resolve symlink) or from `.automaton/project-name.md`. - -## P3 — Documentation / expectations - -### Issue 9: No documentation that the guard blocks pi --print on decomposed tasks -The guard is designed to reserve sub-tasks for "the loop runner" — but there's no documentation that this means pi --print CANNOT be used to implement sub-tasks, and that only the opencode-based loop runner can. This caused significant confusion during the pilot. - -### Issue 10: automaton_orchestrate_finalize should warn about guard implications -When `automaton_orchestrate_finalize` creates sub-tasks with PARENT_SPEC.md, it should warn that these sub-tasks are now guard-blocked for direct pi edits and can only be worked via the loop runner. -- [ ] 🟠 Dead ternary in YFinanceAdapter (noted by qwopus35b backend review) — separate fix task TBD -- [ ] 🟡 Unused import in app/src/app/page.tsx (qwopus35b fix-spa review nit) — remove -- [ ] 🟡 Unused useRef import in app/src/app/page.tsx (qwopus35b fix-spa review nit) — remove -- [ ] 🟡 Unused `Defs` import in ChartLabPanel.tsx (qwopus35b re-review nit) — remove -- [ ] 🟡 Slice 16: add rate-limit timing test (qwopus35b approved w/ minor note) — follow-up -- [ ] 🟠 EdgarAdapter full_text_search does not cache ETags (qwopus found; filings_index/company_facts do) — fix adapter + tests still 1 failing -- [ ] 🟡 Slice 6: add tests for 13f_holdings + form4_tx (qwopus noted; bug fix approved, tests are follow-up) diff --git a/.automaton/TASK_ASSIGNMENT.md b/.automaton/TASK_ASSIGNMENT.md deleted file mode 100644 index 257471e..0000000 --- a/.automaton/TASK_ASSIGNMENT.md +++ /dev/null @@ -1,44 +0,0 @@ -# Task Pool — Investor Flow - -## Model -Tasks are NOT pre-assigned. All 21 tasks are in a shared **implement** phase pool. -Any agent picks the next task they want to work on. - -## Pool State - -| Status | Count | -|--------|-------| -| In implement pool (unclaimed) | 21 | -| Claimed and in progress | 0 | -| In code_review | 0 | -| Complete | 20 | - -## How Agents Pick Work - -```bash -# 1. See what's available -cd /Users/laptran/Documents/investor-flow -python3 ~/.automaton/scripts/status.py --available --agent --project . - -# 2. Claim the next task -python3 ~/.automaton/scripts/status.py --claim --task --agent --project . - -# 3. Implement (read SPEC.md, write code, pass tests) - -# 4. Transition to code_review -python3 ~/.automaton/scripts/status.py --transition code_review --task --project . - -# 5. Different agent reviews, then completes -python3 ~/.automaton/scripts/status.py --claim --task --agent --project . -python3 ~/.automaton/scripts/status.py --transition complete --task --project . -``` - -## Conflict of Interest -An agent CANNOT review their own implementation. The framework enforces this. - -## What's Already Done -- RiskEngine ADR-0007 footer fix ✓ -- AlertEngine pure core (17 tests) ✓ -- alert_events schema + tRPC endpoints (list, acknowledge) ✓ -- SPEC.md for all 21 tasks ✓ -- 338 tests pass, 0 fail ✓ diff --git a/.automaton/WORKFLOW.md b/.automaton/WORKFLOW.md deleted file mode 100644 index 73054a4..0000000 --- a/.automaton/WORKFLOW.md +++ /dev/null @@ -1,46 +0,0 @@ -# Task Pool Workflow — Investor Flow - -## How Tasks Flow - -``` -new → research → implement → code_review → complete -``` - -## Canonical design docs - -- `docs/FUNCTIONAL_DESIGN.md` — product status -- `docs/TECH_DESIGN.md` — technical status -- `CONTEXT.md` — glossary only - -## Priority gap tasks (2026-07-18 audit) - -Pick in this order when available: - -1. **P0** `fix-macro-commentary-tests` — restore green suite -2. **P0** `wire-sizing-risk-trpc-m20` — size + risk on tRPC + M20 UI -3. **P1** `frontend-api-client-coverage` — unblock UI tasks -4. **P1** `persist-trade-plan-execution-loop` — multi-tenant process loop -5. **P1** `wire-emotion-logger-backend` -6. **P2** strategy lab, screener UI, thesis/derisk UI, options convexity UI -7. **P3** reports UI, schema strategies dedupe - -## For Agents - -```bash -cd /Users/laptran/Documents/investor-flow -python3 ~/.automaton/scripts/status.py --available --agent --project . -python3 ~/.automaton/scripts/status.py --claim --task --agent --project . -# implement from SPEC.md -python3 ~/.automaton/scripts/status.py --transition code_review --task --project . -``` - -### Rules - -- ADR-0007: no unframed imperative trade verbs -- Reviewer ≠ implementer -- Backend tests: `cd app/server && npm test` -- Primary-rule lint: `cd app && node --test --experimental-strip-types src/__tests__/primary-rule-lint.test.ts` - -## Historical note - -Many modules under `.automaton/tasks/complete/` are finished vertical slices. The old "21 task pool" table is obsolete; use the priority list above. diff --git a/.automaton/config.md b/.automaton/config.md deleted file mode 100644 index b1a0686..0000000 --- a/.automaton/config.md +++ /dev/null @@ -1,11 +0,0 @@ -# trader-flow — Automaton Configuration - -## VRAM Configuration -- **Auto-detect**: Yes -- **Target context**: 58k tokens -- **Headroom**: 25% -- **Max peak context per sub-task**: 43k tokens - -## Model Configuration -# Uses models.json for model divergence enforcement. -# Default model is read from models.json's "default" key. diff --git a/.automaton/loops/investor-flow-drain/.state.lock b/.automaton/loops/investor-flow-drain/.state.lock deleted file mode 100644 index e69de29..0000000 diff --git a/.automaton/loops/investor-flow-drain/.state.log b/.automaton/loops/investor-flow-drain/.state.log deleted file mode 100644 index b3b0b23..0000000 --- a/.automaton/loops/investor-flow-drain/.state.log +++ /dev/null @@ -1,49 +0,0 @@ -[2026-07-01T19:58:07.388413+00:00] SKIP untracked -[2026-07-01T19:58:16.347241+00:00] SKIP untracked -[2026-07-01T19:58:19.682260+00:00] SKIP untracked -[2026-07-01T19:58:38.469989+00:00] HALT reason=human_intervention -[2026-07-01T19:58:38.472962+00:00] SKIP gate_subprocess_failed -[2026-07-01T19:58:58.813180+00:00] HALT reason=human_intervention -[2026-07-01T19:59:09.383537+00:00] SKIP gate_subprocess_failed -[2026-07-01T19:59:22.938741+00:00] HALT reason=human_intervention -[2026-07-01T20:01:31.503089+00:00] HALT reason=verifier_failed -[2026-07-01T20:01:31.504422+00:00] HALT verifier_failed:unparseable -[2026-07-01T20:02:13.232275+00:00] WARNING worktree add failed: Preparing worktree (checking out 'loop/investor-flow-drain') -fatal: '/Users/laptran/Documents/investor-flow/.automaton/loops/investor-flow-drain/worktree' already exists -[2026-07-01T21:18:04.381941+00:00] HALT reason=verifier_failed -[2026-07-01T21:18:04.382204+00:00] HALT verifier_failed:unparseable -[2026-07-01T21:47:01.715363+00:00] HALT reason=verifier_failed -[2026-07-01T21:47:01.716650+00:00] HALT verifier_failed:unparseable -[2026-07-01T21:47:37.195153+00:00] APPROVED by user (resumed_count=1) -[2026-07-01T23:34:32.824388+00:00] HALT reason=verifier_failed -[2026-07-01T23:34:32.825149+00:00] HALT verifier_failed:unparseable -[2026-07-01T23:34:32.901791+00:00] SKIP gate_subprocess_failed -[2026-07-01T23:34:40.076783+00:00] APPROVED by user (resumed_count=1) -[2026-07-01T23:36:30.307278+00:00] HALT reason=verifier_failed -[2026-07-01T23:36:30.307651+00:00] HALT verifier_failed:unparseable -[2026-07-01T23:46:30.407445+00:00] SKIP gate_subprocess_failed -[2026-07-01T23:56:30.495671+00:00] SKIP gate_subprocess_failed -[2026-07-02T00:06:30.568098+00:00] SKIP gate_subprocess_failed -[2026-07-02T00:16:30.670997+00:00] SKIP gate_subprocess_failed -[2026-07-02T00:26:30.770390+00:00] SKIP gate_subprocess_failed -[2026-07-02T00:36:30.864873+00:00] SKIP gate_subprocess_failed -[2026-07-02T00:46:30.963672+00:00] SKIP gate_subprocess_failed -[2026-07-02T00:56:31.063346+00:00] SKIP gate_subprocess_failed -[2026-07-02T01:02:58.803270+00:00] APPROVED by user (resumed_count=1) -[2026-07-02T01:45:09.731620+00:00] HALT reason=verifier_failed -[2026-07-02T01:45:09.732458+00:00] HALT verifier_failed:unparseable -[2026-07-02T01:45:09.789151+00:00] SKIP gate_subprocess_failed -[2026-07-02T01:45:22.444298+00:00] APPROVED by user (resumed_count=1) -[2026-07-02T01:49:30.173787+00:00] HALT reason=verifier_failed -[2026-07-02T01:49:30.174197+00:00] HALT verifier_failed:unparseable -[2026-07-02T01:49:30.241297+00:00] SKIP gate_subprocess_failed -[2026-07-02T01:49:41.577297+00:00] APPROVED by user (resumed_count=1) -[2026-07-02T02:03:52.524448+00:00] HALT reason=verifier_failed -[2026-07-02T02:03:52.525185+00:00] HALT verifier_failed:unparseable -[2026-07-02T02:03:52.577548+00:00] SKIP gate_subprocess_failed -[2026-07-02T02:11:23.265780+00:00] HALT reason=verifier_failed -[2026-07-02T02:11:23.266466+00:00] HALT verifier_failed:unparseable -[2026-07-02T02:30:02.420889+00:00] HALT reason=verifier_failed -[2026-07-02T02:30:02.421490+00:00] HALT verifier_failed:unparseable -[2026-07-02T02:40:48.545952+00:00] HALT reason=verifier_failed -[2026-07-02T02:40:48.546589+00:00] HALT verifier_failed:unparseable diff --git a/.automaton/loops/investor-flow-drain/.state.loop b/.automaton/loops/investor-flow-drain/.state.loop deleted file mode 100644 index a316850..0000000 --- a/.automaton/loops/investor-flow-drain/.state.loop +++ /dev/null @@ -1,14 +0,0 @@ -{ - "current_task": "options-adapters-and-options-dd-panel-m3", - "halt_reason": "verifier_failed", - "iteration_count": 0, - "last_tick_at": null, - "last_verdict": null, - "name": "investor-flow-drain", - "resumed_count": 0, - "schema_version": 1, - "score_history": [], - "status": "halted", - "worktree_branch": null, - "worktree_path": null -} diff --git a/.automaton/loops/investor-flow-drain/loop-implement.md b/.automaton/loops/investor-flow-drain/loop-implement.md deleted file mode 100644 index dd92aae..0000000 --- a/.automaton/loops/investor-flow-drain/loop-implement.md +++ /dev/null @@ -1,16 +0,0 @@ -You are implementing task **{current_task}** for the Investor Flow project. - -Read the SPEC.md at `.automaton/tasks/{current_task}/SPEC.md` carefully. - -## Rules -1. Follow ADR-0007: no trade verbs (buy/sell/cut/trim), educational framing only -2. All existing tests must pass: run `node --test --experimental-strip-types` -3. Pure/cache-deterministic core: no I/O in pure functions -4. Keep modules focused — one file per concept - -## After implementing -1. Run the full test suite to confirm no regressions -2. Transition to code_review: - ``` - python3 ~/.automaton/scripts/status.py --transition code_review --task {current_task} --project . - ``` diff --git a/.automaton/loops/investor-flow-drain/loop-orchestrate.md b/.automaton/loops/investor-flow-drain/loop-orchestrate.md deleted file mode 100644 index aff1ca4..0000000 --- a/.automaton/loops/investor-flow-drain/loop-orchestrate.md +++ /dev/null @@ -1,11 +0,0 @@ -You are the orchestrator for task **{current_task}**. - -Review the verifier's output. If it passed, transition the task to complete: -``` -python3 ~/.automaton/scripts/status.py --transition complete --task {current_task} --project . -``` - -If it failed, mark it back to implement for fixes: -``` -python3 ~/.automaton/scripts/status.py --transition implement --task {current_task} --project . -``` diff --git a/.automaton/loops/investor-flow-drain/loop-verifier.md b/.automaton/loops/investor-flow-drain/loop-verifier.md deleted file mode 100644 index 9617f33..0000000 --- a/.automaton/loops/investor-flow-drain/loop-verifier.md +++ /dev/null @@ -1 +0,0 @@ -{"verdict": "pass", "note": "verification skipped - trusting implementation"} diff --git a/.automaton/loops/investor-flow-drain/loop.json b/.automaton/loops/investor-flow-drain/loop.json deleted file mode 100644 index 63d1878..0000000 --- a/.automaton/loops/investor-flow-drain/loop.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "investor-flow-drain", - "description": "Drain the implement-phase task pool. Dispatches to ornith-35 for implementation.", - "schedule": { - "interval_seconds": 600 - }, - "harness": { - "command": ["pi", "run", "--provider", "omlx", "--model", "Ornith-35B", "@{prompt}"] - }, - "blast_radius": { - "file_scope": [], - "use_worktree": false - }, - "brakes": { - "max_iterations": 100, - "max_budget_usd": null, - "score_plateau_window": 0 - }, - "work_source": { - "kind": "backlog", - "area": "loops" - }, - "acceptance_criteria": [ - "Task transitions from implement to code_review with passing tests.", - "Implementation follows SPEC.md and ADR-0007 rules." - ], - "roles": { - "implement": { - "prompt": "loop-implement.md", - "model": "Ornith-35B" - }, - "verify": { - "prompt": "loop-verifier.md", - "model": "qwopus35b", - "harness": { - "command": ["bash", "-c", "echo '{\"verdict\": \"pass\", \"note\": \"auto-approved\"}'"] - } - } - } -} diff --git a/.automaton/loops/symbol-header/.state.log b/.automaton/loops/symbol-header/.state.log deleted file mode 100644 index e69de29..0000000 diff --git a/.automaton/loops/symbol-header/.state.loop b/.automaton/loops/symbol-header/.state.loop deleted file mode 100644 index b906a87..0000000 --- a/.automaton/loops/symbol-header/.state.loop +++ /dev/null @@ -1,14 +0,0 @@ -{ - "current_task": null, - "halt_reason": null, - "iteration_count": 0, - "last_tick_at": null, - "last_verdict": null, - "name": "symbol-header", - "resumed_count": 0, - "schema_version": 1, - "score_history": [], - "status": "running", - "worktree_branch": null, - "worktree_path": null -} diff --git a/.automaton/loops/symbol-header/loop.json b/.automaton/loops/symbol-header/loop.json deleted file mode 100644 index c75761b..0000000 --- a/.automaton/loops/symbol-header/loop.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "symbol-header", - "description": "Triage CI failures: research, decompose, propose fix.", - "schedule": { - "interval_seconds": 3600 - }, - "brakes": { - "max_iterations": 25, - "max_budget_usd": null, - "score_plateau_window": 5 - }, - "blast_radius": { - "file_scope": [], - "use_worktree": true - }, - "work_source": { - "kind": "single" - }, - "acceptance_criteria": [ - "All R-numbers from SPEC.md are implemented.", - "Tests pass with no regressions.", - "Pipeline driven to complete." - ], - "roles": { - "implement": { - "prompt": "loop-implement.md" - }, - "verify": { - "prompt": "loop-verifier.md" - }, - "orchestrate": { - "prompt": "loop-orchestrate.md" - } - } -} diff --git a/.automaton/models.json b/.automaton/models.json deleted file mode 100644 index 63a8b76..0000000 --- a/.automaton/models.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "models": [ - { - "name": "ornith-35", - "provider": "omlx", - "endpoint": "http://127.0.0.1:8000/v1", - "context": 131072, - "api": "openai-completions", - "role": "implement" - }, - { - "name": "qwopus35b", - "provider": "remote", - "endpoint": "http://10.37.0.220:8080/v1", - "context": 131072, - "api": "openai-completions", - "role": "implement" - } - ], - "default": "ornith-35" -} \ No newline at end of file diff --git a/.automaton/project-name.md b/.automaton/project-name.md deleted file mode 100644 index 512c9a5..0000000 --- a/.automaton/project-name.md +++ /dev/null @@ -1 +0,0 @@ -trader-flow diff --git a/.automaton/tasks/queue-overhaul/.state.lastedit b/.automaton/tasks/queue-overhaul/.state.lastedit deleted file mode 100644 index e69de29..0000000 diff --git a/.automaton/tasks/queue-overhaul/SPEC.md b/.automaton/tasks/queue-overhaul/SPEC.md deleted file mode 100644 index 69c22d8..0000000 --- a/.automaton/tasks/queue-overhaul/SPEC.md +++ /dev/null @@ -1,41 +0,0 @@ -# SPEC.md — queue-overhaul - -**Parent**: investor-flow backend (AdapterQueue + SEC EDGAR fetching) -**Module**: Backend queue orchestration & data reliability - -## Requirements - -Overhaul the shared `AdapterQueue` (`app/server/src/queue/AdapterQueue.ts`) and the -admin queue tooling so SEC data (13F + Form 4) is fetched reliably and operable: - -### Queue control & observability -- Pause / resume, persisted across restarts in a new `queue_state` table. -- Full error capture: every failed / backoff attempt appends to a new - `queue_errors` table (attempt #, message, full `error.stack`); admin UI expands a - failed job to stream the stack trace for troubleshooting. -- Retry controls: `retryJob(key)`, `retrySource(kind)`, `clearDone(olderThanMs)`. - -### Scheduling (auto + manual) -- `queue_schedules` table with per-source `interval_ms`; a 30s loop calls - `enqueueDueSchedules()` to enqueue refreshes for all in-demand symbols when due. -- Seed defaults: `sec-fetch` 24h, `yfinance` 5min. Admin UI lists / adds / deletes - schedules. - -### Reliability -- Startup recovery: jobs left `in_flight` at shutdown reset to `pending` on boot. -- Schema migration: `queue_errors`, `queue_schedules`, `queue_state` tables plus - `error` / `scheduled_for` columns on `adapter_queue` (idempotent ALTER on startup). - -### Critical EDGAR bug fix -- `form4_tx` and `form13f_holdings` build the archive URL from the filer CIK - (the accession-number prefix), not the company CIK — resolves Cloudflare 429 - that left SEC backfills sparse / empty. - -## Acceptance -- `node --test` backend suite passes (503 tests). -- Full sec-fetch backfill succeeds for all watched symbols (NVDA 14,675 institution - filings, CIFR 274 insider txns, TSLA 6,011, etc.). -- Admin queue page: pause/resume, failed-job stack traces, schedule management. - -## B1-B4 Completion Note (Jul 12 2026) -Completed lint+backfill system implementation. All acceptance criteria met, typecheck passes on changed files. diff --git a/.gitignore b/.gitignore index 4b5598b..6150928 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,3 @@ -# Automaton -.automaton/tasks/ -.automaton/loops/*/worktree/ -.automaton/loops/*/outputs/ - # pi-vault-mind .lancedb/ .obsidian/workspace*.json diff --git a/AGENTS.md b/AGENTS.md index 095281a..2901717 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,4 +5,3 @@ Project domain model loaded via `session-start` skill (Obsidian wiki → index l **As-built status (prefer over old HANDOFF / slice SPECs):** - `docs/FUNCTIONAL_DESIGN.md` - `docs/TECH_DESIGN.md` -- Gap work: `.automaton/tasks/` (P0: `fix-macro-commentary-tests`, `wire-sizing-risk-trpc-m20`) diff --git a/HANDOFF.md b/HANDOFF.md index 09bfef6..8ec339c 100644 --- a/HANDOFF.md +++ b/HANDOFF.md @@ -7,8 +7,7 @@ This file previously held a 2026-06-30 multi-agent orchestrator snapshot. That s 1. **`docs/FUNCTIONAL_DESIGN.md`** — what is Live / Backend-ready / UI-local / Stub / Missing 2. **`docs/TECH_DESIGN.md`** — stack, tRPC map, engines, schema debt, test counts 3. **`CONTEXT.md`** — domain glossary (not status) -4. **Obsidian** `investor-flow.md` — session orientation wiki -5. **`.automaton/tasks/`** — active gap tasks (implement pool after audit) +4. **Obsidian** `investor-flow.md` — session orientation wiki ## Active gap tasks (created 2026-07-18) diff --git a/TASK_COMPLETION_SUMMARY.md b/TASK_COMPLETION_SUMMARY.md index e546bef..380ae73 100644 --- a/TASK_COMPLETION_SUMMARY.md +++ b/TASK_COMPLETION_SUMMARY.md @@ -75,4 +75,3 @@ These are documented but not addressed in this session: All changes verified via: - `cd app && npx next build` — builds successfully with no errors -- All 8 task states marked `complete` in `.automaton/tasks/` diff --git a/docs/FUNCTIONAL_DESIGN.md b/docs/FUNCTIONAL_DESIGN.md index 9177d34..4ce4d90 100644 --- a/docs/FUNCTIONAL_DESIGN.md +++ b/docs/FUNCTIONAL_DESIGN.md @@ -1,7 +1,7 @@ # Investor Flow — Functional Design (as built) **Audit date:** 2026-07-23 -**Source of truth for status:** this file + code under `app/`. Older slice SPECs, HANDOFF.md, and Automaton WORKFLOW.md are historical. +**Source of truth for status:** this file + code under `app/`. Older slice SPECs and HANDOFF.md are historical. **Product intent:** Beginner-first multi-tenant educational research terminal for conviction investing (not day trading). Legal posture: educational publisher (ADR-0007). --- diff --git a/docs/TECH_DESIGN.md b/docs/TECH_DESIGN.md index a970326..46d6c0f 100644 --- a/docs/TECH_DESIGN.md +++ b/docs/TECH_DESIGN.md @@ -266,6 +266,5 @@ Secrets: `.env.example` documents session secret, SEC operator email, X cookie f | `CONTEXT.md` | Ubiquitous language (glossary only) | | `docs/adr/*` | Durable decisions | | Obsidian `investor-flow.md` | Session orientation wiki | -| `.automaton/tasks/*` | Work items; many `complete/` slices are historical | -Deprecated as status sources: root `HANDOFF.md` (2026-06-30 orchestrator snapshot), Automaton WORKFLOW “21 tasks” pool list, slice DECOMPOSITION checkbox state. +Deprecated as status sources: root `HANDOFF.md` (2026-06-30 orchestrator snapshot), slice DECOMPOSITION checkbox state. diff --git a/docs/adr/0002-automaton-as-issue-tracker.md b/docs/adr/0002-automaton-as-issue-tracker.md deleted file mode 100644 index e4db777..0000000 --- a/docs/adr/0002-automaton-as-issue-tracker.md +++ /dev/null @@ -1,18 +0,0 @@ -# ADR-0002: Automaton as the issue tracker for engineering skills - -Date: 2026-06-27 -Status: Accepted - -## Context -Matt Pocock's engineering skills (to-prd, to-issues, triage, setup-*) assume an external issue tracker (gh/glab/.scratch). This project uses Automaton tasks + phases instead. - -## Decision -Adopt Automaton as the issue tracker. Mapping: -- Issues = task folders under .automaton/tasks//. -- Triage states → phases: needs-triage=new, needs-info=research (awaiting user), ready-for-agent=decomposition:approved/implement, ready-for-human=flagged in notes, wontfix=complete+tombstone. -- Publish issues = automaton_orchestrate_finalize(task, subtasks) from DECOMPOSITION.md. -- The 5 issue-tracker skills are rewritten to call Automaton; the 8 methodology skills port verbatim. - -## Consequences -- Skills installed as global pi dev skills at ~/.agents/skills/, symlinked into ~/.pi/agent/skills/. -- One house flow: grill-with-docs → to-prd → to-issues → implement(tdd) → code_review:approved.