- **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).
4.6 KiB
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_DIRcheck so running from inside~/.automaton/still works - Added warning when
--projectpoints to a directory without.automaton/
2. scripts/status.py — cmd_scope_check() fix (critical)
- Framework directory (
~/.automaton/) is now OUT_OF_SCOPE whenproject_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.stateand refuses operations on tasks without it cmd_show_task,cmd_transition,cmd_can_edit,cmd_claimall use_require_state()— they refuse untracked tasks and direct users to run--upgradecmd_listshowsUNTRACKED (no .state)for tasks without.statefiles, with a note to run--upgrade
4. scripts/status.py — New --upgrade command
--upgrade --task {name}bootstraps.statefor a single task--upgrade(no --task) bootstraps all tasks missing.state, including sub-tasks- Uses
_infer_state_from_artifactsheuristic (same as before, but now only accessible via--upgrade)
5. automaton/dashboard/ui/app.py — Dashboard scope fix
- Added
project_rootandscopeas class attributes onDashboardHandler - All 7 handler methods (
_serve_tasks,_handle_config_update,_serve_scope,_serve_project_name,_serve_task,_get_review_path,_serve_review_summary) now useself.project_root/self.scopeinstead of callingfind_automaton_root()/detect_scope()per-request DashboardApp.run()sets these class attributes from the stored values- Removed unused
find_automaton_rootimport
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
--projectflag
7. Added --project {project} to all status.py commands in:
.agent.md.rules.mdsystem-prompt.md.onboarding.mdprompts/onboarding.mdprompts/orchestrate.mdprompts/research.mdprompts/design.mdprompts/implement.mdprompts/decompose.mdprompts/test_design.mdprompts/bug_finder.mdprompts/adversarial_bug_find.mdprompts/doc_review.mdprompts/referee.mdprompts/subtask_management.mdprompts/workflow.md
8. Fixed {project}/.automaton/scripts/vram_detect.py references
prompts/orchestrate.mdandprompts/decompose.mdreferenced{project}/.automaton/scripts/vram_detect.pywhich 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--upgradecommand, untracked task behavior.rules.md— Added Project Scoping section, untracked task rulesystem-prompt.md— Added Project Scoping section, untracked task rule.agent.md— Added--upgradecommand.onboarding.md— Added--upgradecommandprompts/workflow.md— Added untracked task behaviorprompts/onboarding.md— Changed upgrade step to usestatus.py --upgradeCHANGELOG.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 projectstest_no_project_errors_without_flag—--listerrors from non-project directorytest_project_flag_targets_correct_tasks—--projectcorrectly scopes taskstest_transition_refuses_untracked_task—--transitionrefuses tasks without.statetest_can_edit_refuses_untracked_task—--can-editrefuses tasks without.statetest_show_task_refuses_untracked_task—--taskrefuses tasks without.statetest_list_shows_untracked_task—--listshows UNTRACKED for tasks without.statetest_upgrade_bootstraps_state_file—--upgrade --taskbootstraps.statefor single tasktest_upgrade_all_tasks—--upgradebootstraps.statefor all tasks missing it
11. Updated tests/test_app.py
- Removed
find_automaton_rootmonkeypatching — handlers now useself.project_rootclass attribute test_handle_config_updatesetshandler.project_root = tmp_path
Total: 192 tests passing.