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

3.7 KiB

Fix Prompt Consistency

Goal

Fix three categories of inconsistency in the prompt files: missing stop conditions, deprecated task paths, and a blind spot in the prompt-path test.

Requirements

R1. Add stop condition to bug_finder.md

prompts/bug_finder.md (47 lines) is the only delivery-style prompt that has neither a ## Stop Condition (MANDATORY) block nor requires a CONTRACT_MET output. Every other delivery prompt (research, design, test_design, implement, doc_review, referee, decompose) has this block.

Fix: Append the standard block at the end of prompts/bug_finder.md:

## Stop Condition (MANDATORY)
You are not allowed to end this session until you have produced the BUG_REPORT.md file AND output the exact phrase "CONTRACT_MET".
Until then, continue working or ask clarifying questions.

R2. Add stop condition to adversarial_bug_find.md

prompts/adversarial_bug_find.md outputs ADVERSARIAL_BUG_FIND_COMPLETE instead of CONTRACT_MET. This is a non-standard completion signal. While the orchestrator spec (orchestrate.md:340) says it checks for "CONTRACT_MET or the phase's stop condition," the inconsistency is error-prone.

Fix: Add the standard block after line 18 and update the existing output line to also require CONTRACT_MET:

## Stop Condition (MANDATORY)
You are not allowed to end this session until you have produced the ADVERSARIAL_BUG_REPORT.md file AND output the exact phrase "CONTRACT_MET".
Until then, continue working or ask clarifying questions.

R3. Fix deprecated task path in onboarding.md

prompts/onboarding.md:67 uses the deprecated {project}/tasks/onboarding/ path instead of the canonical {project}/.automaton/tasks/onboarding/.

Fix: Change line 67 from:

Then produce a file called ONBOARDING_REPORT.md at {project}/tasks/onboarding/ONBOARDING_REPORT.md

to:

Then produce a file called ONBOARDING_REPORT.md at {project}/.automaton/tasks/onboarding/ONBOARDING_REPORT.md

Also update line 101-102 which references the deprecated location in documentation:

- If `{project}/tasks/` exists but `{project}/.automaton/tasks/` does not, tasks need to be moved.

This is correct as-is — it references the legacy location for migration detection. Keep it.

R4. Fix test_prompt_paths.py regex to catch concrete deprecated paths

tests/test_prompt_paths.py:13 uses:

LEGACY_PATH = re.compile(r"\{project\}/tasks/\{task-name\}/")

This only matches the literal placeholder {task-name}. It misses concrete task names like {project}/tasks/onboarding/.

Fix: Add a second pattern that catches any kebab-case name in the deprecated location:

CONCRETE_LEGACY_PATH = re.compile(r"\{project\}/tasks/[\w-]+/")

Add a new test that asserts zero matches of this pattern in prompts.

R5. Verify no other deprecated paths exist

Run the updated test across all prompt files to ensure onboarding.md was the only violation.

Acceptance Criteria

  • prompts/bug_finder.md ends with ## Stop Condition (MANDATORY) block
  • prompts/adversarial_bug_find.md ends with ## Stop Condition (MANDATORY) block
  • prompts/onboarding.md uses {project}/.automaton/tasks/onboarding/ not {project}/tasks/onboarding/
  • tests/test_prompt_paths.py has a new test for concrete deprecated paths
  • Running python -m pytest tests/test_prompt_paths.py -v catches {project}/tasks/onboarding/ in onboarding.md BEFORE the fix and passes AFTER
  • All existing prompt tests still pass

Non-Goals

  • Not standardizing all stop signals to CONTRACT_MET (compaction.md uses COMPACTION_COMPLETE by design — the orchestrator handles custom signals)
  • Not rewriting onboarding.md to use the migration script (that's a separate task)