Commit Graph

18 Commits

Author SHA1 Message Date
Bo b84dcf3ca2 docs(hookless): close cold-start orientation drift (soc-qh2g1 #cold-start-orientation-coherence) (#795)
## Summary

Close the hookless cold-start orientation gap for `soc-qh2g1` by making
the live startup docs and skills point at explicit `ao session
bootstrap` plus pulled context (`ao inject` / `ao lookup`) instead of
hidden SessionStart behavior.

## Changes

- Reframes live docs that still implied automatic startup/handoff
injection to the hookless explicit-command path.
- Updates source and Codex skill mirrors for `quickstart`, `inject`,
`using-agentops`, `recover`, `bug-hunt`, and `session-bootstrap`.
- Expands the cold-start and docs drift gates so `SessionStart hook`,
`startup hooks`, and `auto-inject ... hook` promises fail unless
explicitly hedged as opt-in, removed, or historical.
- Refreshes scoped Codex skill hashes for the touched mirrors.

## Test plan

- [x] `bash scripts/check-hookless-cold-start.sh`
- [x] `bash scripts/check-doc-hooks-drift.sh`
- [x] `bats tests/scripts/check-hookless-cold-start.bats
tests/scripts/check-doc-hooks-drift.bats`
- [x] `shellcheck scripts/check-hookless-cold-start.sh
scripts/check-doc-hooks-drift.sh`
- [x] `bash scripts/regen-codex-hashes.sh --check --only
session-bootstrap,quickstart,inject,using-agentops,recover,bug-hunt`
- [x] `bash scripts/validate-codex-generated-artifacts.sh`
- [x] `bash scripts/validate-codex-lifecycle-guards.sh`
- [x] `bash scripts/validate-agents-split.sh`
- [x] `git diff --check`
- [x] `bash scripts/validate-skill-runtime-parity.sh`
- [x] `bash scripts/lint-codex-native.sh`

Closes-scenario: soc-qh2g1#cold-start-orientation-coherence
Bounded-context: BC1-Corpus
Evidence: scripts/check-hookless-cold-start.sh
2026-06-06 11:23:56 -04:00
Bo 29e0acc26e chore(hooks): delete standards-injector + retire its CI gate — hookless S2 (soc-khev6 #rm-standards-injector) (#488)
## What

Hookless epic S2 (`soc-khev6`): delete the `standards-injector`
PreToolUse hook and **fully retire** its dedicated CI gate.

`standards-injector` is a value-negative noise-injector — it injects
language standards on every Edit/Write regardless of relevance (A/B Δ=0,
per `docs/architecture/hook-noise-audit.md`). The replacement is the
`standards` skill, read on demand: a PRODUCT surface, not hook magic.

## Teardown (all of it)

- **Hook + tests:** `git rm hooks/standards-injector.sh`, its embedded
copy, and `tests/hooks/standards-injector.bats`.
- **Manifests:** pruned the Edit + Write entries from `hooks/hooks.json`
and `hooks/codex-hooks.json`, dropping the now-empty matcher groups.
**Codex native handlers 17 → 15** (two entries removed, not one — Edit
retains `codex-parity-warn.sh`, Write group dropped).
- **CI gate retired:** removed the `standards-injector-completeness` job
from `validate.yml` + both `needs:` lists
(`validate-pr-evidence-claims`, `summary`) + the summary echo; `git rm`
the check script + its bats; removed from `ci-jobs.yaml` manifest and
regenerated `AGENTS-CI.md`; removed from `pre-push-gate.sh` + its bats
stub.
- **Codex test assertions (the S1 bite):** `test-runtime-codex-smoke.sh`
and `test-codex-native-install.sh` length `17 → 15`; removed
`standards-injector.sh` from the require-handlers array.
- **Shared iterators:** pruned the `@test`/section blocks from
`test-hooks.bats`, `hook-output-schema.bats`,
`hook-stdin-contracts.bats`, `test-hook-chain.sh`,
`test-hook-lifecycle.sh`, `test-hooks.sh`, and the eval fixture
`hook-context-value-smoke.sh`.
- **Other surfaces:** `validate-hook-preflight.sh`,
`install-codex-plugin.sh`, `install-codex.ps1` owned-script lists;
`hooks_test.go` (swapped synthetic name to a live hook);
`context_compiler.go` port doc comment.
- **Regen:** hook-lease classification + inventory, registry, embedded
sync.
- **Docs:** `HOOKS.md`, `hook-noise-audit.md` (records S2 deletion),
`ENV-VARS.md` (`AGENTOPS_STANDARDS_*` vars), `LOOP-BUDGET.md`,
`cli-skills-map.md`, `software-factory.md`, `SDK-INVENTORY.md`.

## Verify (all green locally)

`check-hook-lease-inventory`, `validate-hooks-doc-parity`,
`check-hook-port-replacements`, `validate-hook-preflight`,
`generate-registry --check`, `validate-ci-policy-parity`,
`tests/smoke-test.sh` (codex smoke + native install),
`test-runtime-codex-smoke.sh`, the 3 bats hook suites, `go
build/vet/test`. `grep standards-injector validate.yml
ci-local-release.sh` → empty.

Diff stat: 39 files, +32 / -1045 (deletion-heavy, as expected for a
teardown).

Closes-scenario: soc-khev6#rm-standards-injector
Bounded-context: BC5-Runtime
Evidence: docs/contracts/hook-lease-inventory.md
2026-05-23 20:54:24 -04:00
Boden Fuller 3f1566fdf0 fix(git): stop tracking agents runtime state 2026-05-03 10:30:49 -04:00
Boden Fuller 86a822bb44 Re-architect AgentOps hooks around JIT context 2026-04-28 16:06:14 -04:00
Boden Fuller ad07b9baca feat: ship dream overnight runtime slice 2026-04-09 20:03:10 -04:00
Boden Fuller 729840d126 feat: add fresh-repo onboarding welcome 2026-04-09 16:41:44 -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
Boden Fuller 4abd2a69be docs(context): sweep remaining ao inject references across docs/tests/scripts
Wave 3 of context-enforcement-phase3: replace ao inject workflow
guidance with ao lookup across documentation, test fixtures, and
scripts. Remaining 32 references are legitimate (inject command
implementation, CHANGELOG history, CLI reference tables, test
fixtures for command detection).

Files updated:
- 11 core docs (context-packet, seed-definition, leverage-points, etc.)
- 7 workflow diagram docs (brief, system-map, cli-skills-map, HOOKS, etc.)
- 4 scripts (proof-run, test-flywheel, check-skill-flag-refs, etc.)
- 3 shell tests (proof-run e2e, token-budgets, no-compaction)
- 1 Go test (json_validity_test.go)
- Production code: metrics_nudge.go, metrics_flywheel.go, hooks.go
2026-03-07 11:59:18 -05:00
Boden Fuller dcf65664f0 chore(na-3re): wave 3 — swarm hardening + script/doc fixes (2 issues)
Issues: na-3re.11, na-3re.13

- na-3re.11: Swarm worker hardening:
  - worktree-setup: GIT_WORKER_GUARD=1 for worker sessions
  - session-start: unalias -a env sanitization for workers
  - swarm SKILL.md: scope-escape protocol for out-of-scope findings
- na-3re.13: Script/doc fixes:
  - check-contract-compatibility: graceful skip when docs/contracts/ missing
  - ENV-VARS.md: document RPI_RUN_ID env var
  - Verified NO-OPs: proof-run.sh (no bc), release-cadence (already tz-safe)
2026-03-05 10:24:41 -05:00
Boden Fuller 4fd2512c87 refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.

Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)

Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script

All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
Boden Fuller a539546d33 codex installer: ship no-clone install flow and docs sync 2026-02-26 06:24:21 -05:00
Boden Fuller b74c501b9d fix(flywheel): close MemRL feedback loop and complete skill-to-CLI coverage
Three epics (ag-9vy, ag-19q, ag-41t) fixing knowledge flywheel integrity:

Epic 1 — Fix feedback loop:
- Unhide `ao feedback-loop` command (was Hidden=true, never discoverable)
- Add `ao dedup --merge` + `ao contradict` to session-end hook

Epic 2 — Skill-to-CLI coverage:
- /retro: add session close, flywheel close-loop, MEMORY.md sync, constraint review
- /post-mortem: add session close + flywheel close-loop
- /crank: add flywheel close-loop on completion
- /flywheel: add 6 maintenance commands + active pruning (expire/evict/archive)
- Fix stale /forge+/extract user-facing reference in flywheel troubleshooting
- Fix crank --tier=pending typo (should be --status=pending)

Epic 3 — Slim boot + active pruning:
- Change session-start default from lean to manual (MEMORY.md auto-load)
- Add AGENTOPS_STARTUP_LEGACY_INJECT=1 rollback env var
- Update docs (ENV-VARS.md, HOOKS.md, using-agentops SKILL.md) to reflect new default
- Sync embedded hooks via make sync-hooks
2026-02-25 18:51:50 -05:00
Boden Fuller 742d4e8579 fix(flywheel): sync docs, comments, and tests to new thresholds
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
2026-02-25 16:02:30 -05:00
Boden Fuller 142b13ec53 feat(memory): add ao memory sync for repo-root MEMORY.md (ag-chm)
- New `ao memory sync` command writes session history to repo-root
  MEMORY.md with managed block markers (<!-- ao:memory:start/end -->)
- Multi-session history (newest-first, configurable --max-entries)
- Manual content outside markers is preserved on every sync
- Dedup by 7-char session ID prefix prevents duplicate entries
- Unicode-safe summary truncation (rune-based, not byte-based)
- readNLatestSessionEntries() reads N most recent sessions
- Opt-in SessionEnd wiring via AGENTOPS_MEMORY_SYNC=1 env var
- 22 tests: block parsing, dedup, trim, unicode, e2e
- Docs: ENV-VARS.md, HOOKS.md, COMMANDS.md updated
2026-02-25 08:44:19 -05:00
Boden Fuller 27948cc263 feat(hooks): slim SessionStart boot + notebook source robustness (ag-8km)
- 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
2026-02-25 08:44:19 -05:00
Boden Fuller 0ee101c45d fix: remove stale references to stripped hook features
- post-mortem: remove ao feedback-loop and ao session-outcome calls
- learn: remove feedback-loop from flywheel diagram
- cache-eviction: replace PostToolUse(Read) with ao maturity --scan
- ENV-VARS: remove PRECOMPACT_DISABLED, TASK_VALIDATION_DISABLED, WORKER
- validate-hook-preflight: remove dead batch-feedback check
2026-02-22 20:20:40 -05:00
Boden Fuller 37d4b5b2ae Merge branch 'codex/rpi-supervisor-cli' into main 2026-02-21 19:41:50 -05:00