Rename the athena skill to compile — a descriptive name that communicates
what it actually does. Extend with Karpathy's LLM Knowledge Bases architecture:
- New compile phase: LLM reads raw .agents/ artifacts and produces interlinked
markdown wiki at .agents/compiled/ with index.md, log.md, backlinks
- New lint phase: detects contradictions, orphan pages, stale claims, coverage gaps
- Pluggable compute backend via AGENTOPS_COMPILE_RUNTIME (ollama|claude|openai)
- Hash-based incremental compilation (only recompile changed sources)
- compile.sh engine with security fixes (no shell injection, path traversal guard)
- Full rename across 93 files: skills, docs, CLI, tests, hooks, scripts, codex
Existing Mine → Grow → Defrag cycle preserved as phases within the larger
compile workflow. No vector DB — compiled wiki IS the retrieval layer.
Inspired by patterns discovered in Claude Code's npm source map leak:
- Add hook failure budget to lib/hook-helpers.sh (MAX_CONSECUTIVE_HOOK_FAILURES=3,
configurable via AGENTOPS_HOOK_FAILURE_CAP) — prevents runaway hook loops
- Add metadata.stability field (experimental|stable) to skill frontmatter schema
with heal.sh validation (H010) and skill-conventions documentation
- Add quality-signals.sh hook detecting repeated prompts and correction patterns,
logging to .agents/signals/session-quality.jsonl with defined schema
- Document orchestration-as-prompt as a first-class pattern in shared references,
linked from crank, swarm, evolve, rpi skills with codex parity
Add quality/balanced/budget/inherit tiers to ModelsConfig with
per-agent model resolution for council/crank/vibe cost management.
Includes ao config models subcommand, context-monitor hook,
and skill docs for tier consumption.
Epic: ag-w5c.6+ag-w5c.7
Move edit-knowledge-surface hook from PostToolUse to PreToolUse so
learnings surface before the edit, not after. Fix false positives by
matching relative path first, falling back to filename only when no
path match. Fix archive script to use YYYY-MM-DD from filenames
instead of mtime, which gets reset by ao mine.
Add PostToolUse:Edit hook that surfaces relevant learnings when editing
files mentioned in .agents/learnings/ (48ms, grep-based). Add
scripts/archive-research.sh to move stale research files to archive
and reduce search noise. Register hook in hooks.json with 3s timeout.
Wave 1 of strict-quality epic (ag-u5t), 4 issues in parallel:
- ag-u5t.1: git-worker-guard.sh blocks git commit/push/add-all for swarm workers
- ag-u5t.2: embedded_parity section in task-validation-gate auto-validates hook sync
- ag-u5t.3: validate-swarm-evidence.sh enforces fail-closed evidence validation
- ag-u5t.5: time_boxed phase result status in RPI phased runner
Also fixes: test harness cwd leak from bare cd in constraint-compiler tests,
adds test coverage for commit-review-gate, intent-echo, research-loop-detector.
173/173 hook tests pass. All Go tests pass. Embedded sync verified.
- cli: default --test-first=true for strict-quality execution, add
--no-test-first opt-out, add --budget/--no-budget phase budget controls
with parsing and mutual exclusion validation
- hooks: add pre-mortem gate (PreToolUse on Skill), TaskCompleted hook
for task-validation-gate, enhance gate with issue type classification
and test-exempt path for docs/chore/ci types
- skills: pin council codex model to gpt-5.3-codex, add ci to crank
skip-types, add evolve flags table with test-first/no-test-first,
update validation contract with metadata policy for impl vs doc tasks
- skills: update rpi/swarm/crank references for budget controls,
taskcreate validation metadata, and worker pitfall patterns
- tests: add pre-mortem gate and task-validation-gate hook tests,
update test-first smoke and tuning defaults for new flag defaults
- chore: remove tracked .beads/ config (now gitignored), update
learnings and next-work.jsonl
Hooks were breaking and doing too much. Reduced from 22 hooks across
12 events to 3 hooks across 3 events (SessionStart, SessionEnd, Stop).
Kept only what the knowledge flywheel needs:
- SessionStart: mkdir .agents, ao extract, ao inject, skill context
- SessionEnd: ao forge transcript, ao maturity (scan/expire/evict)
- Stop: ao flywheel close-loop
Removed from registration (scripts still in hooks/ for re-enablement):
PreToolUse, PostToolUse, UserPromptSubmit, TaskCompleted, PreCompact,
SubagentStop, WorktreeCreate, WorktreeRemove, ConfigChange hooks.
session-start.sh: 600 → 99 lines
session-end-maintenance.sh: 79 → 53 lines
Push-gate added friction without meaningful safety — the ratchet
nudge via prompt-nudge.sh already covers the workflow gating.
Removes hook, config entries, preflight expectation, stale comment
references, and 6 push-gate tests. Updates test 23 fixture path.