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)
53 lines
3.4 KiB
Markdown
53 lines
3.4 KiB
Markdown
# .rules.md
|
|
|
|
## 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
|
|
|
|
## 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
|
|
- Verify the task fits within max peak context (default: 12k tokens)
|
|
- If no config exists, default to 8k with 25% headroom
|
|
|
|
## Changelog
|
|
- When a task reaches Resolution (VERDICT.md written), append an entry to CHANGELOG.md
|
|
- Use the format: `- description (#task-name)` under the appropriate [unreleased] section
|
|
|
|
## Self-Improvement
|
|
- Add one rule per observed failure mode with a concrete example
|
|
- Consolidate contradictions monthly. Remove stale rules.
|
|
- No rule without a real example of the problem it prevents
|
|
|
|
## Session Discipline
|
|
- 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
|
|
|
|
## Scope Confinement
|
|
- Only work on tasks in the **current project's** `.automaton/tasks/` directory
|
|
- Never scan, read, or modify tasks in other projects on the system
|
|
- The `{project}` in the Orchestrator prompt is the project root where the session started — do not broaden scope
|
|
- Past failure: agent scanned tasks in `~/ai-env/projects/invest-copilot/` while working on the automaton framework itself, wasting time on unrelated work across project boundaries
|
|
|
|
## Artifact Integrity
|
|
- Write task artifacts atomically to avoid partial reads by the dashboard or other agents
|
|
- Prefer writing to a temporary file and renaming it into place
|
|
- Avoid leaving empty or malformed artifacts in the task folder
|