Files
automaton/.rules.md
T

53 lines
3.4 KiB
Markdown
Raw Normal View History

# .rules.md
2026-05-30 23:27:09 -04:00
## 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
2026-05-30 23:27:09 -04:00
- 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