Files
Lap Tran bc7daf8590 Restore archived tasks, fix dashboard scroll-reset, bind ornith, add Playwright smoke test
- **Restore 82 completed tasks** from tasks/complete/ back to tasks/ top
  level (all <7 days old per the cleanup policy; premature bulk archive
  was fixed).
- **Dashboard: fix scroll-reset on auto-refresh** — renderBoard rebuilds
  the board via innerHTML every 2s, destroying each column-body's
  scrollTop. Now snapshots column-body scrollTop + board.scrollLeft +
  view.scrollTop before rebuild and restores after (matched by
  PHASE_GROUPS index).
- **Dashboard UI additions** (pre-existing unstaged work): approval
  section cards, transition buttons, inline artifact editor (textarea for
  writing missing SPEC/VERDICT/etc from the detail modal).
- **Bind ornith as Implement model** — config.md: Model explicit to
  omlx/Ornith-1.0-35B-4bit-mlx, context window 32768. Interactive
  autopilot already used ornith via opencode default; now explicit.
- **Fix cleanup stub** — automaton-cleanup.sh had a stale --project arg
  pointing at a pytest temp dir (test isolation leak). Rewired to point
  at ~/.automaton.
- **Fix plist-isolation test** — test asserted host plist doesn't exist,
  but a real install creates it. Now snapshots mtime before run, asserts
  unchanged after (only a write during the test counts as bleed).
- **New Playwright smoke test** (tests/test_dashboard_ui.py) — 2 tests:
  board renders tasks, column scroll survives auto-refresh tick.
  Verified the test fails without the scroll fix (scrollTop resets to 0).
  Skipped via importorskip when playwright is absent (main CI stays
  green).
- **Clarify SI loop scope in README** — new-project onboarding section
  documents the framework-scoped self-improvement loop and options
  (leave/pause/create project loop).
- **CHANGELOG** documents all changes including the known model-divergence
  gap (mde tasks marked complete but per-role model binding was never
  implemented).
2026-06-26 10:05:18 -04:00

4.6 KiB

Implementation: Project Scoping Enforcement

Changes Made

1. scripts/status.py — _find_project_dir() fix (critical)

  • Removed cwd.name == ".automaton" false positive that misidentified project dirs as framework
  • Removed silent fallback to AUTOMATON_DIR — now errors with guidance to use --project
  • Added cwd.parent == AUTOMATON_DIR check so running from inside ~/.automaton/ still works
  • Added warning when --project points to a directory without .automaton/

2. scripts/status.py — cmd_scope_check() fix (critical)

  • Framework directory (~/.automaton/) is now OUT_OF_SCOPE when project_dir != AUTOMATON_DIR
  • Previously, ANY file under ~/.automaton/ was considered IN_SCOPE regardless of which project you were working on

3. scripts/status.py — _require_state() helper and untracked task enforcement

  • New _require_state() function that reads .state and refuses operations on tasks without it
  • cmd_show_task, cmd_transition, cmd_can_edit, cmd_claim all use _require_state() — they refuse untracked tasks and direct users to run --upgrade
  • cmd_list shows UNTRACKED (no .state) for tasks without .state files, with a note to run --upgrade

4. scripts/status.py — New --upgrade command

  • --upgrade --task {name} bootstraps .state for a single task
  • --upgrade (no --task) bootstraps all tasks missing .state, including sub-tasks
  • Uses _infer_state_from_artifacts heuristic (same as before, but now only accessible via --upgrade)

5. automaton/dashboard/ui/app.py — Dashboard scope fix

  • Added project_root and scope as class attributes on DashboardHandler
  • All 7 handler methods (_serve_tasks, _handle_config_update, _serve_scope, _serve_project_name, _serve_task, _get_review_path, _serve_review_summary) now use self.project_root/self.scope instead of calling find_automaton_root()/detect_scope() per-request
  • DashboardApp.run() sets these class attributes from the stored values
  • Removed unused find_automaton_root import

6. scripts/upgrade.sh — Delegates to status.py --upgrade

  • Replaced 80+ lines of manual shell heuristic bootstrapping with python3 "$STATUS_SCRIPT" --upgrade --project "$PROJECT_DIR"
  • Updated final instructions to include --project flag

7. Added --project {project} to all status.py commands in:

  • .agent.md
  • .rules.md
  • system-prompt.md
  • .onboarding.md
  • prompts/onboarding.md
  • prompts/orchestrate.md
  • prompts/research.md
  • prompts/design.md
  • prompts/implement.md
  • prompts/decompose.md
  • prompts/test_design.md
  • prompts/bug_finder.md
  • prompts/adversarial_bug_find.md
  • prompts/doc_review.md
  • prompts/referee.md
  • prompts/subtask_management.md
  • prompts/workflow.md

8. Fixed {project}/.automaton/scripts/vram_detect.py references

  • prompts/orchestrate.md and prompts/decompose.md referenced {project}/.automaton/scripts/vram_detect.py which doesn't exist in projects (only in ~/.automaton/scripts/). Changed to ~/.automaton/scripts/vram_detect.py.

9. Updated documentation for untracked tasks and --upgrade

  • AGENTS.md — Added --upgrade command, untracked task behavior
  • .rules.md — Added Project Scoping section, untracked task rule
  • system-prompt.md — Added Project Scoping section, untracked task rule
  • .agent.md — Added --upgrade command
  • .onboarding.md — Added --upgrade command
  • prompts/workflow.md — Added untracked task behavior
  • prompts/onboarding.md — Changed upgrade step to use status.py --upgrade
  • CHANGELOG.md — Added all changes under [unreleased]

10. New tests (9)

  • test_scope_check_framework_out_of_scope_for_project — framework files are OUT_OF_SCOPE for projects
  • test_no_project_errors_without_flag — --list errors from non-project directory
  • test_project_flag_targets_correct_tasks — --project correctly scopes tasks
  • test_transition_refuses_untracked_task — --transition refuses tasks without .state
  • test_can_edit_refuses_untracked_task — --can-edit refuses tasks without .state
  • test_show_task_refuses_untracked_task — --task refuses tasks without .state
  • test_list_shows_untracked_task — --list shows UNTRACKED for tasks without .state
  • test_upgrade_bootstraps_state_file — --upgrade --task bootstraps .state for single task
  • test_upgrade_all_tasks — --upgrade bootstraps .state for all tasks missing it

11. Updated tests/test_app.py

  • Removed find_automaton_root monkeypatching — handlers now use self.project_root class attribute
  • test_handle_config_update sets handler.project_root = tmp_path

Total: 192 tests passing.