Files
automaton/memory/framework-architecture.md
T
Lap Tran dd2726c0dd
CI / build (push) Has been cancelled
Add memory/ with audit findings and framework knowledge
7 memory files covering:
- audit-bug-patterns: recurring status.py bug patterns
- vram-model-matching: three-tier model prefix matching
- dashboard-security: .state priority, CORS removal, register-guards
- state-machine-workflow: legal transitions and approval gates
- testing-conventions: pytest patterns and helpers
- audit-process: report conventions and batch processing
- framework-architecture: enforcement layers and key files
2026-06-22 10:48:19 -04:00

1.3 KiB

Framework architecture — key files and enforcement layers

Three enforcement layers (in order of strength)

  1. Harness pre-edit hook (--can-edit) — blocks edits before they happen. opencode plugin at plugins/automaton-guard/.
  2. Git pre-commit hook (scripts/git-hooks/pre-commit) — blocks commits when no task in edit-allowed phase. Works for ALL harnesses.
  3. Prompt-based rules (ALLOWED/FORBIDDEN sections) — advisory only.

Key files

  • scripts/status.py (~1430 lines) — core enforcement: phase transitions, approvals, can-edit, scope-check, audit, claim/release
  • scripts/vram_detect.py (~700 lines) — VRAM detection and model context lookup
  • automaton/dashboard/core/task.py — dashboard state inference (.state first, artifacts fallback)
  • automaton/dashboard/ui/app.py — HTTP server with security headers

NON_ARTIFACT_FILES

Files that should NOT be treated as phase artifacts: .state, .state.tmp, .state.lock, .state.approvals, .state.implementer, .state.lastedit, VRAM_CONFIG.md, PARENT_SPEC.md, REVIEW.md

Stale-task mechanism

.state.lastedit file touched by --can-edit on ALLOWED. Falls back to .state mtime if .state.lastedit doesn't exist. 30-minute threshold. --touch resets the timer.