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
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# 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.
|
||||
Reference in New Issue
Block a user