158 Commits

Author SHA1 Message Date
Claude 767de4e12c fix(hooks): narrow git-worker-guard -A pattern to avoid selective-flag false blocks
The worker guard's bulk-staging block lowercased the command before matching
`*git add -a*`, which could match `-a` + `-u` clusters or (more subtly) any
text starting with `-a` after `git add `. Legitimate selective patterns like
`git add -u` (update-only) happened to slip past only because `-u` doesn't
contain `-a`, but the intent was already murky.

Split the patterns:
  - commit/push/--all/. match against the lowercased command (subcommand
    names can reasonably be case-insensitive in alias contexts)
  - `-A` is checked against the raw command, so only the uppercase bulk flag
    trips the block

Adds four regression tests: `-A` still blocks, `--all` still blocks,
selective `-u` is allowed, filenames containing `-a` are allowed.

Embedded hook copy resynced via `make sync-hooks`.

https://claude.ai/code/session_01TZeRkm97SrPchDwPsD41rd
2026-04-21 06:52:58 +00:00
Claude dd2eadc3ad chore: resync embedded hooks and codex artifact hashes
Unblocks CI on this PR. Both were pre-existing drift on main:

- cli/embedded/.../test-pyramid.md: re-ran `cd cli && make sync-hooks`
  to match source under skills/standards/references/. Fixes the
  embedded-sync and go-build `Verify embedded hooks in sync` gates.
- skills-codex/{crank,quickstart,standards}/.agentops-generated.json
  and skills-codex/.agentops-manifest.json: re-ran
  `scripts/regen-codex-hashes.sh`. Fixes the codex-runtime-sections
  `Validate Codex generated artifacts` gate.

https://claude.ai/code/session_01W5b6kSdX9wEDgXfVGCXTZa
2026-04-21 01:23:47 +00:00
Boden Fuller 1e073d8363 chore: purge archived AO↔Olympus bridge integration + prefer local Go in precommit hook
Olympus (ol) was the power-user daemon predecessor to AgentOps, archived
in strategic-direction.md. The bridge contracts (SPEC_ONLY, never
enforced), MemRL policy surface, OL quarantine constraints collector, and
supporting scripts/tests all referenced a now-dead integration. Purging
them removes ~2400 lines of stale surface area.

## Deleted files
- docs/ol-bridge-contracts.md
- docs/architecture/ao-olympus-ownership-matrix.md
- docs/plans/2026-02-13-ao-olympus-bridge-next-steps.md
- docs/contracts/memrl-policy-integration.md
- docs/contracts/memrl-policy.schema.json
- docs/contracts/memrl-policy.profile.example.json
- cli/cmd/ao/inject_ol_test.go
- skills/vibe/scripts/ol-validate.sh + codex mirror
- skills-codex/swarm/scripts/ol-ratchet.sh, ol-wave-loader.sh
- tests/ol-integration/ (entire directory)

## CLI code stripped
- internal/search/types.go: OLConstraint struct + InjectedKnowledge.OLConstraints field
- internal/search/inject_run.go: CollectOLConstraints, WriteConstraintsSection, quarantineRelPath const, all related trim/render logic
- cmd/ao/inject.go: gatherOLConstraints, collectOLConstraints wrapper, olConstraint type alias, init-time call site
- Package comments in provenance/storage/types/formatter updated "olympus" → "agentops"
- formatter/markdown.go: session tag "olympus" → "agentops" (+ test update)
- Tests: deleted TestCollectOLConstraints + TestInject_collectOLConstraints, stripped OL subtests from TestFormatKnowledgeMarkdown and TestInject_*, renamed "olympus" literal test data to "other-repo"
- rpi_phased_context.go: stripped "matches Olympus DefaultTimeout" and "Modeled on Olympus internal/git/worktree.go" comments

## Docs + skills stripped
- mkdocs.yml nav: 3 entries removed (AO-Olympus Matrix, MemRL Policy, OL-AO Bridge)
- docs/INDEX.md, contracts/index.md, architecture/index.md, index.md: cross-refs removed
- strategic-direction.md: retirement rationale compressed to one paragraph
- docs/context-packet.md, positioning/devops-for-vibe-coding.md, plans/README.md: OL-specific content removed
- skills/vibe/SKILL.md + codex mirror, swarm/SKILL.md: OL script refs removed
- skills/vibe/references/deep-checks.md, plan/references/planning-rules.md (+ codex), pre-mortem/references/council-fail-patterns.md (+ codex): OL rule/pattern entries removed
- skills-codex hashes regenerated (plan, pre-mortem, swarm, vibe)

## Precommit hook fix
- hooks/go-test-precommit.sh: prefer ~/.local/go/bin/go when present. Hooks
  don't inherit interactive-shell PATH, so apt-provided go-1.22 would
  otherwise override a user-local 1.26 install. Mirrors the zshrc pattern.

## Retained (historical / useful)
- strategic-direction.md: 1-paragraph archival note
- Historical release notes (docs/releases/*.md) — immutable past-release record
- cli/testdata/transcripts/real-2.4mb.jsonl — captured test fixture
- docs/brownian-ratchet.md ol-rg3p bead-ID refs — internal bead prefix, not Olympus

## Verification
- go build ./... && go vet ./... clean
- go test ./... clean except pre-existing TestGCBridgeVersion_Live panic
- scripts/docs-build.sh --check (mkdocs strict) clean
- scripts/check-contract-compatibility.sh passes
- scripts/regen-codex-hashes.sh run — 4 skills updated
2026-04-19 14:33:00 -04:00
Boden Fuller cc6750c4e8 feat(docs,skills): rebuild Pages site with MkDocs Material + harden RPI orchestrator delegation contract
## Docs site — boshu2.github.io/agentops

- Replace Jekyll minima with MkDocs Material (slate dark palette default)
- Landing hero scoped to .landing-hero (no gradient bleed on inner pages)
- Section landings (getting-started, architecture, reference, contracts, levels) with narrative ledes
- Generate skill catalog + per-skill pages from skills/*/SKILL.md at build
- Generate CLI reference from cli/docs/ at build (fails build on missing source)
- Fix every internal link via one-shot migration (scripts/migrations/2026-04-19-fix-docs-links.py)
- Wire mkdocs build --strict into pre-push gate (Check 25a)
- Replace .github/workflows/pages.yml with .github/workflows/docs.yml (actions/deploy-pages)
- README + docs/CONTRIBUTING updated with docs-build toolchain on-ramp
- tests/docs/validate-links.sh patched to understand mkdocs-generated paths

## RPI orchestrator strict-delegation contract

- Strict sub-skill delegation is now the default for /rpi, /discovery, /validation. No --full flag — always on.
- Canonical contract in skills/shared/references/strict-delegation-contract.md (plus Codex mirror)
- Forged learning with detection phrases + corrective actions (ao-inject-ready)
- Rename --no-lifecycle -> --no-scaffold in /discovery (Claude + Codex) with deprecation alias through v2.40.0
- Harden inline-work hotspots with orchestrator-owned markers in /crank STEPS 3a.3, 6.5, 8.7 + Inline Work Policy footer
- Flag consistency: --auto and --interactive scopes documented; --complexity syntax formalized
- CHANGELOG [Unreleased] documents + scaffolds; runtime hook enforcement explicitly deferred

## fix(hooks): go-test-precommit skips when no Go files staged

- Previously ran go vet + go build unconditionally, blocking non-Go commits when Go toolchain was missing or at a different version
- Now checks staged diff and exits cleanly if no *.go or go.{mod,sum,work} files are staged
- Applied to both hooks/ (source) and cli/embedded/hooks/ (synced)

Provenance: full RPI lifecycle with strict delegation at every phase boundary (Phase 1 Skill(discovery) -> Phase 2 Skill(crank) -> Phase 3 Skill(validation) -> Skill(vibe), Skill(post-mortem), Skill(retro)).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 10:37:58 -04:00
Boden Fuller 48bee957b0 fix(hooks): pre-mortem gate locks on ambiguous state (deny by default)
Previously the pre-mortem gate fell back to UNLOCKED on missing,
unparseable, stale, or unrecognized state. A broken state file
silently disabled the safety gate. Flips default fallback to strict:
lock on any ambiguity, unlock only on explicit unambiguous evidence.

Strict default rules:
- Missing state file: BLOCKED
- Unparseable state (jq -e . fails): BLOCKED with clear error
- Verdict not in allow-list (passed|locked|ok|ratchet|approved): BLOCKED
- Missing epic-id or missing bd CLI in strict mode: BLOCKED
- Valid recognized verdict: ALLOWED
- Run-scoped orchestration log / epic-scoped council artifact / ratchet
  status locked|skipped / chain.jsonl pre-mortem done: ALLOWED

Bypass: AGENTOPS_PREMORTEM_GATE_BOOTSTRAP=1 unlocks with mandatory
stderr warning 'WARN: pre-mortem-gate bypassed via ...'. Distinct
from the silent AGENTOPS_HOOKS_DISABLED=1 kill switch.

Legacy AGENTOPS_PREMORTEM_FALLBACK=open restores the previous silent-
allow behavior for operators who need the old semantics during the
transition.

Adds 8 new behavioral tests (20 total pass): missing/unparseable/
passed/expired/unknown-verdict/bootstrap/kill-switch/legacy-open.
Synced to cli/embedded/hooks/pre-mortem-gate.sh.

Consumes ag-yhr 'Harden pre-mortem gate fallback to locked-state
semantics'.
2026-04-15 16:48:31 -04:00
Boden Fuller 7f9a6bfb38 feat(hooks): enforce lead-only worker git guard as PreToolUse hook
Adds hooks/lead-only-worker-git-guard.sh: mechanical PreToolUse guard
that blocks destructive git commands (commit, push, reset, rebase,
merge, cherry-pick, branch -D, checkout -B, worktree remove) when
running inside a swarm worker context.

Worker detection (in order): AGENTOPS_SWARM_ROLE=worker,
AGENTOPS_ROLE=worker (legacy), CLAUDE_AGENT_NAME=worker-*,
.agents/swarm-role file, CWD under /.claude/worktrees/. Allows all
non-destructive git (status, diff, log, show, blame, fetch) and safe
variants (branch -d, checkout -b). Allows everything in lead context.

Respects AGENTOPS_HOOKS_DISABLED=1 (global kill) and
AGENTOPS_LEAD_ONLY_GUARD_DISABLED=1 (local disable). Catches chained
commands (foo && git commit) via leading-token regex.

Registered under PreToolUse / Bash matcher in hooks/hooks.json.
Synced to cli/embedded/hooks/ via make sync-hooks. Adds 30-assertion
test file covering block paths, allow paths, kill switches, legacy
signals, and native-team worker naming.

Consumes ag-yhr 'Enforce lead-only worker git guard before spawn'.
Mechanical enforcement of the swarm skill's lead-only commit policy
which was previously informational only.
2026-04-15 16:48:09 -04:00
Boden Fuller d03ff5620b chore(bd): default BEADS_DOLT_SERVER_PORT=3307 in hook helpers + bd scripts
lib/hook-helpers.sh exports BEADS_DOLT_SERVER_PORT with override via
${BEADS_DOLT_SERVER_PORT:-3307} so users can still override per shell.
All hooks that source hook-helpers.sh automatically inherit the port.

scripts/bd-audit.sh and scripts/bd-cluster.sh are standalone bd callers
that do not source hook-helpers.sh, so they get the same export inline.

cli/embedded/lib/hook-helpers.sh synced via make sync-hooks.

Consumes ag-co7 'Export BEADS_DOLT_SERVER_PORT=3307 in shell env'.
2026-04-15 15:53:15 -04:00
Boden Fuller 04f8b4563c fix(compile): strand-safe hashes + strip markdown-fence cruft
Two related compile.sh bugs fixed together (both in the batching script).

1. Incremental + --max-batches corrupted hash state. compile_single_batch
   persisted hashes for every file in the inventoried batch regardless of
   whether an article was actually written; when the outer loop hit
   MAX_BATCHES, uncompiled files got their hashes saved and were skipped
   forever on the next --incremental run. Now save_hashes runs only when
   the batch produced output, and only for files with an emitted article.

2. claude-cli wraps its output in ```markdown ... ``` fences. Every article
   from real smoke runs inherited the cruft. Fixed in two places:
   - system prompt now explicitly forbids markdown fences
   - article splitter skips lines matching the fence regex as defense in depth

Adds skills/compile/scripts/tests/test-fence-stripping.sh fixture.
Syncs cli/embedded/ copy via make sync-hooks.
2026-04-15 13:52:18 -04:00
Boden Fuller d579a32197 refactor(compile): flatten batching recursion into explicit outer loop
The prior implementation used recursive self-invocation with env-var
prefix assignment (BATCH_SIZE=$total MAX_BATCHES=0 compile_articles < "$tmp")
to disable further batching inside each sub-call. That worked but was
opaque and hard to test.

Split into two clear functions:

- compile_articles() — chunks changed_files into BATCH_SIZE slices and
  iterates compile_single_batch per slice via an explicit for-loop.
  No recursion, no env prefix trick.
- compile_single_batch() — compiles one chunk via a single LLM call;
  caller is responsible for chunking.

The integration test (TestRunCompile_EndToEnd_FixtureCorpus) exercises
multi-batch behavior end-to-end and still passes. No flag surface
changes. Embedded copy re-synced.

Closes na-pmx1.6.
2026-04-15 12:47:29 -04:00
Boden Fuller fa6f4048af fix(compile,quickstart): embed compile.sh, auto-detect claude-cli, batch large corpora
Fixes three onboarding defects that surfaced on 2026-04-15 when running
against a global ~/.agents corpus from a non-git home directory:

1. `ao compile --full` failed in the installed bundle with
   "open skills/compile/scripts/compile.sh: file does not exist". The
   Makefile's sync-hooks target never copied compile.sh into
   cli/embedded/skills/, so the //go:embed all:skills fallback had
   nothing to fall back to. Fix: sync-hooks now seeds the script and a
   regression test (TestMaterializeCompileScriptFallsBackToEmbedded)
   asserts the embedded copy resolves when no local skills/ exists.

2. Headless compile implicitly required OLLAMA_HOST / OPENAI_API_KEY /
   ANTHROPIC_API_KEY with no actionable error when none were set, and
   ignored a locally installed `claude` CLI. Fix: resolveCompileRuntime
   auto-detects the `claude` binary and selects claude-cli runtime (no
   API key needed — inherits Claude Code auth). preflightCompileRuntime
   fails fast with an actionable error naming the exact env var to set.
   compile.sh gains a matching claude-cli backend and a --preflight flag.

3. The headless compiler concatenated all changed files into one LLM
   prompt, which is unworkable on 2000+ file corpora. Fix: compile.sh
   batches by --batch-size (default 25) and --max-batches (default
   unlimited); ao compile propagates both flags.

Onboarding gaps:

- $quickstart now detects a global ~/.agents corpus (GLOBAL_AGENTS=true)
  and, when GIT=false + AO=true, surfaces a harvest → compile →
  knowledge-activation path instead of only suggesting `git init`.
- Harvest SKILL.md clarifies that promotion writes to ~/.agents/learnings/
  (not ~/.agents) and adds a "which skill do I need?" decision table.
- Compile SKILL.md documents the claude-cli runtime and batching flags.
- skills-codex/compile/scripts/compile.sh wrapper now falls back through
  multiple candidate paths and finally delegates to `ao compile`, so an
  installed bundle without a sibling skills/ checkout still works.

Tests added:
- TestMaterializeCompileScriptFallsBackToEmbedded
- TestResolveCompileRuntime
- TestPreflightCompileRuntimeErrors (5 subtests)
- TestPreflightCompileRuntimeSuccess
- TestCompileScriptOptionsPassesBatchFlags
- TestQuickstartSkillCoversGlobalCorpus (both parity surfaces)

Verification:
  cd cli && go vet ./... && go test ./...   # all green
  bash skills/heal-skill/scripts/heal.sh --strict   # clean
  bash tests/docs/validate-doc-release.sh   # PASS
  bash scripts/check-contract-compatibility.sh   # 0 failures
  bash scripts/regen-codex-hashes.sh   # 3 skills rehashed
  bash scripts/generate-cli-reference.sh   # COMMANDS.md regenerated
2026-04-15 09:32:06 -04:00
Boden Fuller a8cca4d15c chore(skills): refresh llm wiki artifacts 2026-04-11 22:36:24 -04:00
Boden Fuller a1a58bfb28 docs(skills): add autodev contract skill 2026-04-11 21:57:03 -04:00
Boden Fuller 765d0891cb feat(skills): ship dream interactive surface 2026-04-10 09:04:21 -04:00
Boden Fuller 8adb8b7773 docs: align README-linked docs with current framing 2026-04-09 23:03:30 -04:00
Boden Fuller 9f0bfa1582 fix(ci): resolve validate regressions 2026-04-09 22:38:05 -04:00
Boden Fuller 29b335e2e9 chore: trim using-agentops skill 2026-04-09 17:00:38 -04:00
Boden Fuller 729840d126 feat: add fresh-repo onboarding welcome 2026-04-09 16:41:44 -04:00
Boden Fuller 4747c797d3 fix(ci): eliminate 5 CI toil sources from v2.35.0 post-mortem
1. Add CHANGELOG sync check (check 36) to pre-push-gate.sh — fails if
   root CHANGELOG.md differs from docs/CHANGELOG.md
2. Add 250-line limit guard to edit-knowledge-surface.sh for SKILL.md
   files — warns at 240, errors at 250
3. Add TestMain to cli/cmd/ao/ that clears AGENTOPS_RPI_RUNTIME* env
   vars so per-test t.Setenv is unnecessary
4. Broaden CLI docs parity check (24b) to trigger on any cmd/ao/*.go
   change, not just go build changes
5. Wire --fast flag into .githooks/pre-push for faster push-time gates

Bonus: fix pre-existing pipefail bug in flywheel health check (35) that
silently killed all subsequent checks.
2026-04-07 18:43:26 -04:00
Boden Fuller db7ceec92e fix(ci): sync docs/CHANGELOG, regen COMMANDS.md, trim using-agentops to 248 lines
- Sync docs/CHANGELOG.md with root CHANGELOG.md (adds v2.35.0 entry)
- Regenerate COMMANDS.md after codex.go help text changes
- Trim using-agentops SKILL.md from 255→248 lines (under 250 limit)
- Sync embedded using-agentops skill
2026-04-07 09:52:01 -04:00
Boden Fuller 239f228bb1 chore(cli): sync embedded using-agentops skill after hooks update 2026-04-07 09:45:05 -04:00
Boden Fuller 3eb679c6f6 feat(knowledge): rename athena → compile + add Karpathy-style knowledge compiler
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.
2026-04-05 17:57:40 -04:00
Boden Fuller 018772512f fix(ci): sync embedded using-agentops + regen post-mortem codex hash 2026-04-05 11:50:54 -04:00
Boden Fuller 8f7e80a239 fix(hooks): add blocking mode to codex-parity-warn + cleanup stale worktrees
- codex-parity-warn.sh: opt-in blocking mode via AGENTOPS_CODEX_PARITY_BLOCK=1
  (exit 2 instead of 0 when codex counterpart needs sync). Default unchanged.
- Enabled git rerere for future conflict resolution memory
- Pruned 25 stale worktrees and deleted 8 orphaned local branches
- Synced embedded hook copy
2026-04-05 10:55:28 -04:00
Boden Fuller aef1efab3f feat(validation): add Stage 4 behavioral validation — holdout scenarios + satisfaction scoring
Add the missing validation tier between council/vibe (Stage 3) and production
(Stage 5). Inspired by StrongDM's Digital Twin Universe and Shield AI's
SITL/HITL/VITL fidelity ladder.

New capabilities:
- Holdout isolation hook: PreToolUse gate blocks agent access to .agents/holdout/
  unless AGENTOPS_HOLDOUT_EVALUATOR=1 (prevents reward hacking)
- Scenario schema: schemas/scenario.v1.schema.json defines holdout scenario format
- Verdict extension: satisfaction_score (0.0-1.0) and satisfaction_breakdown added
  as optional fields to verdict schema (v4)
- Scenario skill: /scenario for authoring and managing holdout scenarios
- Validation pipeline: STEP 1.8 inserted for behavioral validation
- Vibe exposure: weighted_score now exposed as satisfaction_score
- CLI commands: ao scenario init|list|validate with 11 passing tests
- Planning rule: schema wave ordering for additionalProperties:false
2026-04-05 08:35:31 -04:00
Boden Fuller c3fd166f7e refactor(rpi): wave 2 — hook polish, test infra cleanup, skill normalization
Hook polish: add missing kill switch to go-test-precommit.sh, fix shebang
and bracket style in hook-helpers.sh, shellcheck annotations for
finding-compiler.sh and session-start.sh.

Test infra: refactor defrag.go writeDefragReport to accept io.Writer,
consolidate chdirTempWorkspace into chdirTo delegation, add godoc to
testutil_test.go helpers.

Skills: normalize output_contract quoting in brainstorm, design,
red-team, review SKILL.md frontmatter.
2026-04-04 23:25:12 -04:00
Boden Fuller a8933c11aa docs(rpi): codify AI-native test shape — L2 first, L1 always
Traditional test pyramid optimized for human writing cost (L1 cheapest).
AI agents eliminate that cost differential. New shape optimizes for
bug-finding value: L2 integration first (3x weight, where bugs live),
L1 unit always (regression safety). Evidence: 946 council verdicts
showed L0-L1 found zero production bugs, L2+ found all.

Updated: test-pyramid.md, vibe weighting, CLAUDE.md.
2026-04-04 23:09:22 -04:00
Boden Fuller 99d3d369c5 feat(rpi): wave 2 backlog — swarm guards, hook hardening, release idempotency
Epic D: Add pre-spawn worker detection to git-worker-guard (blocks worktree-add
and agent-spawn from workers). Enhance check-file-manifest-overlap.sh edge cases.
Wire validate-swarm-evidence.sh into CI. Fix .agents/retros→retro in index.go
and init.go. Add grep-for-existing-functions to swarm worker template.

Epic E: Replace partial embedded check in pre-push-gate with full
validate-embedded-sync. Lazy-init git rev-parse in research-loop-detector.
Add retag idempotency guard (skip if tag already at HEAD). Add git_sha to
release-artifacts.json manifest. Empty stdin guard in go-test-precommit.
2026-04-04 20:56:17 -04:00
Boden Fuller ad029207cf feat(flywheel): complete escape velocity epic (ag-9qm)
Section-first retrieval with weighted scoring, namespace comparison,
verified citation semantics, and escape velocity verification.

- Add weighted multi-feature scoring (heading, exact token, adjacency,
  proximity) gated by shadow namespace in inject_scoring.go
- Add `ao flywheel compare` command for primary-vs-shadow side-by-side
  metrics with promotion/rollback contract
- Add VerifyEscapeVelocity() with configurable targets (sigma>=0.30,
  rho>=0.65, sigma_rho > delta/100) in metrics_health.go
- Update 8 skill packet consumers with section evidence guidance and
  verified citation semantics (applied vs retrieved)
- 24 new tests across inject_scoring, metrics_flywheel, metrics_health
- Regenerate CLI reference for new compare subcommand

Closes: ag-9qm, ag-9qm.10, ag-9qm.11, ag-9qm.12, ag-9qm.13, ag-9qm.14
2026-04-04 16:22:38 -04:00
Boden Fuller 38589383b9 fix(ci): restore validate gate parity 2026-04-03 17:35:38 -04:00
Boden Fuller 51fb29b1ec chore: refresh generated codex artifacts 2026-04-03 15:22:28 -04:00
Boden Fuller 1ea93951f5 merge: codex flywheel remediation 2026-04-03 15:21:03 -04:00
Boden Fuller 5db2d4b29b fix: remediate flywheel curation gaps 2026-04-03 10:13:59 -04:00
Boden Fuller 24b8d29738 fix: purge tracked .agents artifacts 2026-04-03 09:33:31 -04:00
Boden Fuller 2fc5234911 refactor(hooks): keep Claude startup surface in CLAUDE.md 2026-04-02 15:52:33 -04:00
Boden Fuller 6df03bdbb3 feat(hooks): add claude factory startup routing 2026-04-02 15:32:50 -04:00
Bo 69630a8de0 feat: add knowledge activation skill and CLI surfaces (#87)
* feat: add knowledge activation skill and CLI surfaces

* chore: sync embedded skills and codex artifact hashes

* test: cover quality signals hook in bats suite
2026-04-01 20:53:17 -04:00
Boden Fuller 45db7ab97b feat(skills): apply Claude Code architecture lessons — retry budgets, stability flags, quality signals, orchestration pattern
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
2026-04-01 08:07:39 -04:00
Boden Fuller 7ac8a29b56 feat(ci): shift 9 CI-only checks to pre-push gate
Add doc-release, contract-compatibility, hook-preflight, hooks-doc-parity,
ci-policy-parity, shellcheck, symlink-rejection, learning-coherence, and
orphan-hooks checks to pre-push-gate.sh (checks 25-33). Add fast-mode
detection for docs/shell/learning file categories so new checks only run
when relevant files change.

Also fix shellcheck warnings in task-validation-gate.sh (SC2053 glob
directives) and remove unused error_msg in watch-codex-stream.sh.
2026-03-31 15:19:50 -04:00
Boden Fuller c56269da1b fix(ci): resolve 3 CI failures — docs parity, hook portability, codex lifecycle
- harvest.go: use empty defaults with ~/  descriptions instead of baking $HOME
  into flag defaults, resolving cli-docs-parity failures across environments
- athena-session-defrag.sh: swap stat order to try Linux stat -c first, fixing
  integer expression error when macOS stat -f succeeds but returns mount path
- skills-codex/validation: replace ao codex stop with ao codex ensure-stop to
  pass codex lifecycle guard validation
2026-03-31 11:59:46 -04:00
Boden Fuller b247a133b9 fix(ci): resolve 4 pre-existing CI failures
- codex-runtime-sections: replace .claude/settings.json check with
  .git/hooks/ check in skills-codex/bootstrap/SKILL.md
- skill-lint: remove "bootstrap" trigger collision from scaffold skill,
  add bootstrap/design/harvest to codex-overrides catalog
- cli-docs-parity: regenerate COMMANDS.md (missing ao harvest docs)
- cli-integration: fix mawk-incompatible awk regex in athena-session-defrag
  hook (#{1,3} → ##?#? for portable h1-h3 matching)
2026-03-30 18:36:26 -04:00
Boden Fuller 9bffdea4cd fix(cli): sync embedded using-agentops SKILL.md with source
Pre-existing drift: bootstrap, harvest, and design skills were added
to source but not synced to cli/embedded/.
2026-03-30 18:20:37 -04:00
Boden Fuller 20eaf81ca1 fix(hooks): write full .agents/.gitignore on first session start
The session-start hook previously wrote a minimal 3-line gitignore
that only allowed .gitignore and README.md. This meant fresh repos
would lack the subdirectory-level deny rules, allowing session
artifacts to leak into git tracking on the first `git add`.

Now writes the same comprehensive gitignore as .agents/.gitignore
in the repo root: subdirectories allowed but contents denied, with
explicit exceptions for signposts, releases, plugins, and evolve state.
2026-03-30 17:49:55 -04:00
Boden Fuller 0030790283 feat(skills): encode evidence-driven anti-patterns, unify flywheel metrics, add normalization defect detection
- Create global ~/.agents/MEMORY.md with 7 universal principles and top patterns
- Unify sigma/rho/delta definitions across skills/docs/code (code is truth)
- Add normalization defect scan to Athena defrag (placeholder, stacked frontmatter, bundled, dupes)
- Add anti-pattern pre-flight to /plan (dead infra, brainstorm-as-plan, 40% context, commit cadence)
- Expand pre-mortem from top-5 to top-8 FAIL patterns (dead infra activation, rollback maps, four-surface closure)
- Add 4 new forge uncaptured lesson categories (normalization defects, promotion pipeline, taxonomy, stale contradictions)
- Add normalization defect check to post-mortem four-surface closure
- Fix pre-existing broken link in flywheel-diagnostics.md (regex in code block)
- Sync all changes to skills-codex with Codex-specific adaptations preserved
2026-03-30 15:27:49 -04:00
Boden Fuller c16a057fae chore(cli): sync embedded test-pyramid.md after box alignment fix 2026-03-29 07:56:02 -04:00
Boden Fuller d94be296be chore: merge upstream changes (hooks, scripts) 2026-03-27 19:47:01 -04:00
Boden Fuller b41bcda083 feat(skills): add 6 lifecycle skills and wire cross-references
Add test, review, refactor, deps, perf, and scaffold skills to fill
gaps in the developer lifecycle for engineers working with coding agents.

New skills:
- /test: test generation, coverage analysis, TDD workflow
- /review: incoming PR and agent output review (SCORED checklist)
- /refactor: safe, verified refactoring with regression testing
- /deps: dependency audit, update, vulnerability scan, license check
- /perf: profiling, benchmarking, regression detection, optimization
- /scaffold: project scaffolding, component generation, CI setup

Wired 8 existing skills to reference the new ones:
- complexity → /refactor (next step for CC > 20 targets)
- security → /deps (OWASP A06 dep vuln scanning)
- vibe → /test, /perf (coverage gaps and perf review)
- release → /deps (pre-flight vuln check)
- evolve → /test, /refactor, /deps, /perf (work generators)
- implement → /test (TDD accelerator)
- bug-hunt → /refactor, /perf (complex/perf bug escalation)
- quickstart → /scaffold (new project next step)

Skill count: 45 → 51 user-facing (60 total with 9 internal).
2026-03-27 19:18:10 -04:00
Boden Fuller 9e4ddcf859 feat: add codex hookless lifecycle fallback 2026-03-23 15:24:33 -04:00
Boshu2 8d1475f328 fix(flywheel): close remaining ag-73u gaps 2026-03-22 16:04:52 -04:00
Boshu2 8365584399 feat(skills): implement 5 post-mortem improvements via parallel swarm
- Mirror-reference script (scripts/mirror-codex-references.sh) for automated skills→codex sync
- Confidence scoring in athena Mine/Grow with 0.3-0.9 weighted scale and auto-promotion
- SHARED_TASK_NOTES bridge in crank orchestrator for cross-worker context
- PostToolUse write-time quality hook for Write/Edit anti-pattern detection
- Plan mutation JSONL audit trail in crank for drift analysis
- 15 reference docs across 10 skills from competitive analysis
- All codex mirrors updated, embedded hooks synced
2026-03-21 21:46:38 -04:00
Boshu2 fb494b1f8b feat(config,skills): add config write support, bridge docs, pre-mortem improvements
- Add Save() to config package with atomic YAML write and merge semantics
- Add --set-tier and --set-skill flags to ao config models subcommand
- Add statusline bridge setup examples to context-monitor.sh
- Add pseudocode-fix requirement to pre-mortem findings
- Add input validation check (Step 2.7) to pre-mortem checklist

Harvest: ag-w5c.6+ag-w5c.7 next-work items 1-4
2026-03-21 19:24:54 -04:00