CI / build (push) Has been cancelled
- Archive 79 completed framework-dev tasks from tasks/ -> tasks/complete/ - status.py: add --cleanup-done and --install-cleanup-schedule commands - Add scripts/automaton-cleanup.sh for periodic task archiving - Dashboard: rename 'Background' tab -> 'Agent', 'Cleanup' agent -> 'Completed Task Archiver', remove redundant group headers and pill badges, dim inactive agent placeholders - .rules.md: add Self-Documenting UI Names rule - New tests: test_cleanup_done.py, expanded test_app.py and test_task.py
67 lines
5.0 KiB
Markdown
67 lines
5.0 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
|
|
|
|
## Self-Documenting UI Names
|
|
- All user-facing labels must be self-documenting and free of internal jargon
|
|
- A user should understand what something is without knowing the codebase internals
|
|
- Terms like "tick", "loop", "state", or "phase transition" are internal terminology — never use them directly in UI elements
|
|
- Pick names that describe what something *does*, not what it's called in code
|
|
- Past failure (1): "Loop Tick" in the Background tab — user asked "What is loop tick?" because it's scheduler jargon
|
|
- Past failure (2): "Loop" — still too vague, user said "I don't know what the loop is"
|
|
- Past failure (3): "Loop Agent" — user asked "How do I differentiate between agents with different roles?" because the name described the mechanism (loop) not the purpose
|
|
- Past failure (4): "Background" tab — the tab name described the *location* (background), not the *content* (agents). Renamed to "Agent" tab.
|
|
- Past failure (5): Group headers + agent type pill badge + icon + name all repeated the same info ("🧹 Cleanup" seen 3 times per card). Removed group headers and pill badges — only icon + name on each card.
|
|
- Past failure (6): "Cleanup" agent was vague — renamed to "Completed Task Archiver" which describes what it actually does.
|
|
- Rule: Every agent type must have a self-documenting name ending with its function (e.g., "Archiver", "Scanner", "Processor"). If multiple instances exist, list each instance card.
|
|
- Agent types with no active instances render as dimmed placeholder cards rather than being hidden, so the user always sees the full roster of available agents.
|