v2.0: state enforcement, project scoping, harness integration
CI / build (push) Has been cancelled

State Enforcement (v2.0):
- .state file as single source of truth for task phase
- Approval gates for research, decomposition, design, test_design
- status.py --transition refuses illegal phase transitions
- status.py --validate-folder detects out-of-order artifacts
- status.py --audit checks all tasks for violations
- status.py --create-task is the only valid way to create tasks
- Pre-v2.0 tasks without .state are UNTRACKED -- all commands refuse them
- New --upgrade command bootstraps .state files for existing tasks

Project Scoping:
- --project flag added to all status.py commands across 16+ files
- _find_project_dir errors instead of silently falling back to ~/.automaton/
- --scope-check marks framework files OUT_OF_SCOPE when working on a project
- Dashboard handlers use stored project_root instead of re-detecting from CWD
- Prompts reference ~/.automaton/scripts/vram_detect.py (not {project}/.automaton/)

Harness Integration:
- status.py --can-edit now supports project-level checks (no --task required)
- --can-edit --file checks file scope without --task
- --json output for machine-readable harness integration
- opencode plugin (plugins/automaton-guard/plugin.ts) intercepts edit/write
- Git pre-commit hook (scripts/git-hooks/pre-commit) blocks commits without task
- Formal integration contract (contracts/harness-integration.md)

Other:
- upgrade.sh delegates to status.py --upgrade instead of manual heuristics
- Phase prompts reference --project {project} for multi-project scoping
- 200 tests passing (14 new)
This commit is contained in:
2026-06-15 14:16:46 -04:00
parent 79b783864e
commit 05c76852a2
151 changed files with 7295 additions and 632 deletions
+18 -2
View File
@@ -2,8 +2,24 @@
## Task-Driven Development
- All changes must go through a task in tasks/{name}/ with SPEC.md → phases → VERDICT.md
- All task creation must use `python ~/.automaton/scripts/status.py --create-task {name} --project {project}` — never create task directories manually
- All phase transitions must use `python ~/.automaton/scripts/status.py --transition {phase} --task {name} --project {project}`
- All phase approvals must use `python ~/.automaton/scripts/status.py --approve --task {name} --project {project}`
- Never edit files directly without a corresponding task
- Never create task directories manually (mkdir tasks/) — use the Orchestrator instead
## State Enforcement (v2.0)
- The `.state` file is the single source of truth for a task's current phase
- `status.py --validate-folder --task {name} --project {project}` must be run before starting work on any phase
- Approval gates (research, decomposition, design, test_design) require explicit user sign-off via `status.py --approve --project {project}`
- FORBIDDEN actions in each phase prompt must be respected — even in autopilot mode
- `status.py --audit --project {project}` should be run at session start to check for violations
- Tasks without `.state` files are UNTRACKED — all commands refuse to operate on them. Run `status.py --upgrade --project {project}` to bootstrap
## Project Scoping
- Always pass `--project {project}` to status.py commands — never rely on CWD alone
- When working on the automaton framework, `--project` should be `~/.automaton` or the framework directory
- When working on a project using the framework, `--project` should be the project root directory
- `status.py` will error if it cannot find a project and `--project` is not specified
## VRAM-Aware Task Sizing
- Before creating or scoping a task, check ~/.automaton/config.md for VRAM limits
@@ -20,7 +36,7 @@
- No rule without a real example of the problem it prevents
## Session Discipline
- After writing a SPEC.md for a new task, **stop and wait for user approval** before implementing
- After writing a SPEC.md for a new task, transition to `research:awaiting_approval` and **wait for user approval** via `status.py --approve`
- Do not implement a task in the same session it was created unless explicitly told to
- Past failure: agent created pre-commit-hook task, wrote SPEC.md, then immediately built and committed the hook without waiting — bypassing review 3 times in one session despite promises to follow the process