From 4317eff40e44176cf458413a70464662ba57b448 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Sat, 25 Apr 2026 19:33:25 -0400 Subject: [PATCH] docs: Add self-enforcement checklist to AGENTS.md - Before task gate (git clean, skill query, GTD read) - During task LP rules (org-only, one function per block, prose) - After task validation (tests pass, chaos tier 1, no artifacts) - References to authoritative skill org files This makes the mandate enforceable, not just documentation. --- .opencode/AGENTS.md | 37 +++++++++++++++++++++++++++++++++++++ projects/opencortex | 2 +- projects/opencortex-contrib | 2 +- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.opencode/AGENTS.md b/.opencode/AGENTS.md index 673ea95..7281a98 100644 --- a/.opencode/AGENTS.md +++ b/.opencode/AGENTS.md @@ -92,6 +92,43 @@ Violating these rules corrupts the skill loader and causes boot failure (as seen - **Testing**: Run FiveAM test suite + chaos tests before marking task complete - **Completion**: Update gtd.org, commit, sync with user +## Self-Enforcement Checklist + +This agent MUST verify these conditions before, during, and after each task. Violation is a bug, not a suggestion. + +### Before Any Task (Gate) + +- [ ] **Git clean** — Working tree must be clean before modification +- [ ] **Skill query** — Check if relevant skill exists in `/home/user/memex/projects/opencortex/skills/` +- [ ] **Skill read** — If found, read the skill's org file before proceeding +- [ ] **GTD read** — Check `gtd.org` for current task context + +### During Task (Literate Programming) + +- [ ] **Org-only edits** — Edit only `.org` files, never generated `.lisp` directly +- [ ] **One function per block** — Each `#+begin_src` block contains exactly one definition +- [ ] **Prose before code** — Every block preceded by explanatory text +- [ ] **Prose includes**: What the function does, arguments, return value, rationale +- [ ] **Evaluate each block** — Verify the block compiles/evaluates correctly +- [ ] **Paren balance** — Check balanced parentheses before tangling + +### After Task (Validation) + +- [ ] **Tests pass** — Run full test suite; 100% pass required +- [ ] **Chaos tier 1** — Deterministic regression tests pass +- [ ] **No artifacts** — No orphaned `.bak`, `.log`, `.tmp`, or untracked test files +- [ ] **Commit** — Stage and commit changes with descriptive message +- [ ] **GTD update** — Update `gtd.org` with completed task state + +### For OpenCortex Work Specifically + +Reference authoritative skill files: +- Engineering Standards: `projects/opencortex/skills/org-skill-engineering-standards.org` +- Literate Programming: `projects/opencortex/skills/org-skill-literate-programming.org` +- Policy: `projects/opencortex/skills/org-skill-policy.org` + +The summaries in this file are reminders; the skill org files are authoritative. + ## References - opencortex repo: `/home/user/memex/projects/opencortex` diff --git a/projects/opencortex b/projects/opencortex index d177a12..98900ea 160000 --- a/projects/opencortex +++ b/projects/opencortex @@ -1 +1 @@ -Subproject commit d177a12469877f3239ba07dc5590f258a05ce4e2 +Subproject commit 98900eabf132d2e3eec8fa74485cd81fd738b7dc diff --git a/projects/opencortex-contrib b/projects/opencortex-contrib index 2db53fa..5f2b7e8 160000 --- a/projects/opencortex-contrib +++ b/projects/opencortex-contrib @@ -1 +1 @@ -Subproject commit 2db53fae177e1adae86b1c9e0765529f2fcb8b13 +Subproject commit 5f2b7e8d1659f0d76ed4a6f55bff5daa5af9a75d