Integrate mind knowledge graph tool as `ao mind` subcommand (scan,
normalize, link, index, all, graph) wrapping python3 -m mind. Update
all 9 skill output templates to emit standardized YAML frontmatter
(id, type, date) with source wikilinks for RPI chain skills. Mirror
all changes to skills-codex/ for parity.
Also includes: hooks coverage test updates, go-complexity precommit
guard, ci-local-release allowlist fix, and new integration/lint tests.
Council vibe found 9 stale references after the threshold changes:
- Auto-prune comment: "opt-in" → "opt-out" (default is now 1)
- Add AGENTOPS_AUTO_PRUNE to docs/ENV-VARS.md
- 5+ docs said "manual (default)" for startup mode → now "lean"
- Add stub rejection test for pool_ingest "no significant learnings"
- Update 8 stale test comments (0.7→0.55, harmful>=5→>=3, conf<0.2→<0.3)
- Fix helpers2_test boundary confidence 0.19→0.29 for new 0.3 threshold
- Fix json_validity_test fixture data to match new thresholds
- Move MEMORY.md path derivation before mode branch so stale-MEMORY
nudge works in manual mode (was unreachable before)
- Add scanner.Err() check in readSessionFile
- Update HOOKS.md customization section for new startup modes
- Fix inject SKILL.md token budgets to match actual hook (400/800)
- Add test for invalid --source value
- Add AGENTOPS_STARTUP_CONTEXT_MODE tristate (manual/lean/legacy)
- manual (default): MEMORY.md auto-loaded, no extract/inject, pointer only
- lean: extract + inject with reduced budget (existing behavior)
- legacy: extract + inject with full budget (backward compat)
- Add --source auto|sessions|pending and --session flags to ao notebook update
- auto (default): tries sessions/*.jsonl first, falls back to pending.jsonl
- Filters .jsonl only (ignores .md files in sessions dir)
- Fix minimal hook install: add SessionEnd to events, use script paths
- generateMinimalHooksConfig uses ${CLAUDE_PLUGIN_ROOT} script refs
- replacePluginRoot called for minimal mode too
- Remove --queue from forge call in session-end-maintenance.sh
- Update inject SKILL.md, using-agentops SKILL.md, HOOKS.md, ENV-VARS.md
- Regenerate COMMANDS.md with new flags
- 7 new tests for session source resolution, all passing
- F1: Add session_id cursor (.agents/ao/notebook-cursor.json) to prevent
replaying the same pending.jsonl entry across sessions
- F2: Fix stat fallback in session-start.sh — assume fresh (age=0) when
stat fails instead of epoch-zero (age=20000+) which disabled lean mode
- F3: Regenerate cli/docs/COMMANDS.md with notebook subcommand
- F4: Fix pre-existing atomicWriteFile temp file leak on os.Rename failure
- Add TestNotebookCursor_SkipsDuplicate test
Phase 1 — index at startup: ao inject --index-only renders a compact
table (~200 tokens) instead of full content (~800 tokens). Enabled via
AGENTOPS_INDEX_INJECT=1 feature flag in session-start.sh.
Phase 2 — on-demand pull: ao lookup <id> fetches full content by ID,
ao lookup --query "topic" searches by relevance, ao lookup --bead ag-xyz
filters by source bead lineage. Records "pulled" citations for MemRL.
Also: remove 3 unused test helpers (writeGoalsMD, setupRatchetChain,
setupAgentsDirs) to fix lint, add prune policies for evolve/vibe/crank/
brainstorm/local-ci directories, update skills and docs.
Add bead-scoped knowledge injection (`--bead` flag) that boosts learnings
tagged with the active work item using multiplicative scoring (1.5x direct,
1.2x label, 1.1x keyword). Add predecessor context injection (`--predecessor`
flag) that extracts structured progress/blockers/next-steps from handoff
files. Wire both into SessionStart hook via Gas Town env vars.
Epic ag-9uy: 9 issues across 4 waves (schema, resolver, flags, hooks,
citation feedback pipeline, bootstrap template, docs).
New files: inject_bead.go, inject_predecessor.go, flywheel_citation_feedback.go
Tests: 26 new (bead: 12, predecessor: 8, citation: 6)
- Delete GOALS.yaml (35 goals) in favor of curated GOALS.md (13 gates, 3 directives)
- Migrate command generates directives from pillar groups instead of generic default
- Adds default north/anti stars when converting YAML → MD
- Updated help text to document both migration paths (v1→v2 YAML and YAML→MD)
- Regenerated COMMANDS.md with updated descriptions
GOALS.md (version 4) extends GOALS.yaml with strategic intent sections:
mission, north/anti stars, directives with steer values, and markdown
gates tables. Evolve can now act on directives when beads and gates are
empty, addressing the 58% idle rate from stagnation.
Go library:
- Directive type, GoalFile extensions (Format, NorthStars, AntiStars, Directives)
- DetectFormat/ResolveGoalsPath auto-detection (GOALS.md preferred when both exist)
- 5-function markdown parser with case-insensitive heading matching
- RenderGoalsMD template renderer, round-trip tested
- 26 new tests (19 parser + 7 format detection)
CLI commands:
- ao goals init: interactive GOALS.md bootstrap (--non-interactive)
- ao goals steer: add/remove/prioritize directives
- ao goals prune: remove stale gates referencing missing paths
- ao goals measure --directives: output directives as JSON
- ao goals validate: reports format and directive count
- ao goals add: format-aware writeback (md or yaml)
- ao goals migrate --to-md: convert YAML to markdown format
Skills:
- /goals rewritten with 5 OODA verbs (init/measure/steer/validate/prune)
- /evolve Step 3 rewritten with directive-based cascade
- Schema docs updated for both formats
Pre-mortem fixes applied: format-aware writeback, version 4 for markdown,
case-insensitive headings, --directives/--goal mutual exclusion.
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