Commit Graph

661 Commits

Author SHA1 Message Date
Bo 5b334a13f2 docs(ao): categorize reduction surface (#811)
## Summary
- add root `REDUCTION.md` defining the lean AO vs MTO reduction boundary
and reversible KEEP / RELOCATE / ARCHIVE / RESEARCH buckets
- add `docs/reduction/ao-file-buckets.tsv`, a generated per-file
inventory for every current `cli/cmd/ao/*.go` file with bucket,
rationale, and import dependency clusters
- inventory totals: 637 files = 450 KEEP, 146 RELOCATE, 2 ARCHIVE, 39
RESEARCH

## Validation
- `test "$(( $(wc -l < docs/reduction/ao-file-buckets.tsv) - 1 ))" -eq
"$(find cli/cmd/ao -maxdepth 1 -name '*.go' | wc -l)"`
- `bash scripts/regen-all.sh --check`
- `git diff --check`
- `PRE_PUSH_SKIP_MKDOCS=1 bash scripts/pre-push-gate.sh --fast` passed;
warning-only executable-spec drift remains pre-existing (`scenarios
--lint`, `trace --orphans`)

BR: cp-q4d
2026-06-07 02:13:46 -04:00
Bo bb8d747d3a feat(ao): add harness-neutral bead ports (#810)
## Summary
- add harness-neutral BR/git ports: `ao ready`, `ao close ...`, and bare
`ao claim <id>` while preserving `ao claim bind/list`
- keep top-level gate commands from #809 as the shared gate surface; `ao
close` reuses the typed commit-persist close path and returns success
when the ledger already proves the bead is closed
- regenerate command docs, command surface inventory, matrix counts, and
registry metadata

## Validation
- `go test ./cmd/ao -run TestTick -count=1`
- `bash scripts/regen-all.sh && bash scripts/regen-all.sh --check`
- `go test ./cmd/ao -count=1`
- `go vet ./...`
- `go test ./... -count=1 -short`
- `git diff --check`
- `/tmp/ao-cp-ljp ready` from `/Users/bo/dev/control-plane` returned
`state_source=br`, `ready_count=20`, and counts `{ready:20, open:30,
in_progress:1, closed:19}`
- `/tmp/ao-cp-ljp claim cp-ljp` from `/Users/bo/dev/control-plane`
succeeded and did not dirty the Git ledger
- `PRE_PUSH_SKIP_MKDOCS=1 bash scripts/pre-push-gate.sh --fast` passed;
warning-only executable-spec drift remains pre-existing (`scenarios
--lint`, `trace --orphans`)

BR: cp-ljp
2026-06-07 02:03:39 -04:00
Bo a617df3028 feat(ao): expose membrane gate aliases (#809)
## Summary
- expose the membrane gate surfaces as top-level `ao` aliases:
`verdict-gate`, `council-gate`, `install-guards`, `guard-status`, and
`chaos-test`
- keep the existing `ao tick ...` implementation as the shared backend,
so the shell-oracle port and public aliases cannot drift
- regenerate CLI command docs, surface inventory, matrix counts, and
registry metadata

## Validation
- `go test ./cmd/ao -run TestTick -count=1`
- `bash scripts/check-cmdao-surface-parity.sh --write-surface`
- `bash scripts/regen-all.sh --check`
- `go test ./cmd/ao -count=1`
- `go vet ./...`
- `go test ./... -count=1 -short`
- `/tmp/ao-cp-ltj chaos-test` from `/Users/bo/dev/control-plane` =>
`SMOKE PASS`
- `./tick.sh smoke` from `/Users/bo/dev/control-plane` => `SMOKE PASS`
- top-level alias exit matrix from `/Users/bo/dev/control-plane`:
`council-gate` mixed => 8, unverified => 6
- `PRE_PUSH_SKIP_MKDOCS=1 bash scripts/pre-push-gate.sh --fast` passed;
warning-only executable-spec drift remains pre-existing (`scenarios
--lint`, `trace --orphans`)

BR: cp-ltj
2026-06-07 01:45:16 -04:00
Bo 9ddffab410 feat(ao): add typed tick oracle port (#808)
## Summary
- add `ao tick` as a typed Go port of the control-plane tick oracle
- preserve BR/git boundaries for next/status/claim/reopen/close and port
verdict/council/guard/smoke behavior
- update generated command inventory, registry, CLI docs, and
command-surface fixtures

## Validation
- cd cli && go test ./cmd/ao -run TestTick -count=1
- cd cli && go test ./cmd/ao -count=1
- cd cli && go vet ./...
- cd cli && go test ./... -count=1 -short
- bash scripts/check-cmdao-surface-parity.sh
- bash scripts/regen-all.sh --check
- git diff --check
- PRE_PUSH_SKIP_MKDOCS=1 bash scripts/pre-push-gate.sh --fast
- built /tmp/ao-cp7k6 and compared against
/Users/bo/dev/control-plane/tick.sh for verdict-gate, council-gate,
next; `ao tick smoke` returned SMOKE PASS

Note: fast pre-push gate still reports existing warn-only
executable-spec drift for scenarios --lint and trace --orphans.
2026-06-07 01:26:56 -04:00
Bo 6d5d111faf feat(skills): land four-vendor skill corpus (#803)
## Summary
- Lands the AgentOps skill corpus across source and Codex wrappers,
including Gemini image targets.
- Integrates the skill branch onto current origin/main and refreshes
generated manifests/catalogs.
- Normalizes local next-work queue enum drift and fixes shellcheck in
alias-collision validation.

## Validation
- bash scripts/regen-all.sh --check
- bash scripts/validate-skill-schema.sh
- bash tests/skills/test-token-budgets.sh
- bash tests/skills/run-all.sh
- bash scripts/audit-codex-parity.sh && bash
scripts/validate-codex-override-coverage.sh && bash
scripts/validate-codex-generated-artifacts.sh --scope worktree && bash
scripts/validate-codex-api-conformance.sh && bash
scripts/validate-codex-runtime-sections.sh && bash
scripts/lint-codex-native.sh
- bash skills/heal-skill/scripts/heal.sh --strict
- PRE_PUSH_SKIP_MKDOCS=1 bash scripts/pre-push-gate.sh --fast

MkDocs strict remains skipped locally via the documented
PRE_PUSH_SKIP_MKDOCS=1 override because the repo currently emits
repo-wide strict-link warnings unrelated to this landing; CI remains
authoritative.
2026-06-06 23:44:42 -04:00
Boden Fuller ac201c6b90 docs(one-session-mode): AgentOps maximally-Claude one-session mode (ag-eli0)
The distilled core run in a single Claude session: the assured loop on Claude +
br + git, no Dolt, no claude -p. Native golden image; same laws scale to the
orchestrated factory. Realizes ag-eli0 from the other direction. Reference impl +
n=1 proof: ~/dev/control-plane.
2026-06-06 13:52:21 -04:00
Bo 8458989215 docs(architecture): add integrator (merge-execution) to agentpod function enum (ag-egpu) (#802)
## What
Adds **integrator** to agentpod-spec.v1's function enum {planner,
generator, oracle, scribe}. It is **merge-execution**: takes
Oracle-passed green PRs and integrates them to main
(rebase/update-branch, CI-shepherd, serialize, keep-trunk-green,
revert-on-red) — distinct from the Oracle (*decides* to merge) and the
Orchestrator (*schedules* pods). Maps to RoleWorker; cannot fold into
Oracle (RoleVerifier never-edits) or Orchestrator (control-plane
injection boundary).

## Decided by quorum
2-of-3 cross-model, 2026-06-06 (derivation: msg #160; the gap surfaced
when a human-driven refiner drained ~36 PRs this session and it was
clearly a distinct full-time role):
- **Codex: REVISE→add, mechanics-only** · **agy: APPROVE** · **Claude:
author-recused.**

Two quorum-mandated guardrails encoded in the doc:
1. **Mechanics-only** (Codex): semantic conflict-resolution that changes
code re-enters the Generator/Oracle gate — integrator is never a
privileged post-verdict author path.
2. **Circuit-breaker** (agy): bound merge/revert + rebase loops (max
retries, halt-on-thrash) so a misbehaving integrator can't thrash trunk
/ burn CI.

Docs-only (RBAC stays roles.go; no schemas/ change, consistent with #766
PROPOSAL scope). Spine-role implication (the-agent-factory.md gains an
Integrator role) flagged for the spine owner.

Bounded-context: BC4-Factory
Evidence: docs/architecture/agentpod-swarmjob-schema.proposal.md
2026-06-06 12:53:09 -04:00
Boden Fuller 2624f3b2c4 docs(cleanup): add AgentOps distill-to-core plan (ag-eli0)
RPI-shaped intent for distilling AgentOps to the worker's mind:
re-identify, relocate orchestration to MTO, conform to agentops-core-sdk
+ lock the single-writer seam, integrate meta_skill as the evolution
engine. Direction ratified 6/6 by mixed cross-vendor council.
2026-06-06 12:22:30 -04:00
Bo bdd62816ea docs(skills): add trigger markers to judgment-tier skills (ag-okfu #judgment-wave) (#767)
## What

Wave 1 of **ag-okfu** — adds an explicit `Use when:` discovery trigger
clause to the 8 **judgment-tier** skills: `council`, `design`,
`post-mortem`, `pre-mortem`, `red-team`, `review`, `validate`, `vibe`.

`scan_descriptions.py` flagged 73/81 skills with no trigger marker — a
silent skill-selection risk since runtime discovery is pure LLM
reasoning over the `description` field. The judgment tier ships first
because mis-selection there (e.g. grabbing `review` when you needed
`validate`) is the most costly.

## Why this slice

The bead says *"wave by metadata.tier."* This is one coherent wave = one
PR with a single rollback semantic. Remaining tiers (execution 22,
knowledge 8, meta 8, session 6, background 5, product 5, contribute 4,
cross-vendor 3, library 3, orchestration 1) ship as follow-on waves.

## Evidence

- Corpus missing-trigger count: **73 → 65** (the 8 judgment skills now
pass).
- `python3 skills/skill-builder/scripts/scan_descriptions.py skills
--strict` — all 8 judgment skills report `has_trigger=True`.
- `bash scripts/generate-registry.sh --check` → `OK: registry.json is up
to date` (regenerated, descriptions embedded).
- `markdownlint` clean on all 8 changed SKILL.md files.

## Notes

- Does **not** close ag-okfu — the `--strict` gate stays red until all
tiers are done. Advances the bead; unblocks nothing yet (ag-cx7d ratchet
waits on full corpus clean).

Bounded-context: BC1-Corpus
Evidence: skill-domain-map golden gate
2026-06-06 11:33:18 -04:00
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 f4f991bbda docs: fix broken intra-repo links in docs/ (ag-28dp #docs-link-rot) (#781)
## What

Fix 44 broken intra-repo links across 7 files under `docs/`, surfaced by
a `docs/` markdown link audit. `mkdocs.yml` has `strict: false`, so the
broken links slipped past CI — but they break GitHub-raw viewing and
agent file-reading (the repo treats pointer rot in base docs as a
defect).

## Two pointer-rot classes

1. **41× `](skills/<name>.md)` → `](../skills/<name>/SKILL.md)`** —
skills live at `skills/<name>/SKILL.md`, never `skills/<name>.md`, and
`docs/` is one level deep so the target needs `../`. Several links
already had the **correct link text** (e.g.
`[skills/pre-mortem/SKILL.md](skills/pre-mortem.md)`) — only the href
was wrong, confirming intent. Special case: `skills/catalog.md` →
`SKILLS.md` (`docs/SKILLS.md` = the complete 82-skill reference).
2. **3× `](cli/commands.md)` → `](../cli/docs/COMMANDS.md)`** — the
generated CLI command doc.

Files: `GLOSSARY.md`, `index.md`, `context-lifecycle.md`,
`behavioral-discipline.md`, `create-your-first-skill.md`,
`context-packet.md`, `software-factory.md`.

**Not touched:** the intentional placeholder links in
`docs/standards/markdown-style-guide.md` (syntax demos: `url`,
`image.png`, `./other-doc.md`, etc.).

## Verification

- `docs/` broken-link scan: **44 → 0** outside the style-guide
placeholders.
- `markdownlint-cli2` on all 7 files: **0 errors**.
- Pure link-href changes (44 insertions / 44 deletions); no prose or
behavior change.

Closes-scenario: ag-28dp#docs-link-rot
Bounded-context: BC1-Corpus
Evidence: ag-28dp
2026-06-06 10:17:39 -04:00
Bo cb8161c806 feat(ratchet): enforce R3 'no learning without a constraint' as a script gate (ag-maaa #r3-constraint-gate) (#768)
## What

Makes the Brownian-Ratchet rule **R3 — "no learning without a
constraint"** self-enforcing. Previously it was prose only
(`docs/architecture/operating-loop.md` promotion table: *"Must never
regress → add a validation gate"*): a learning could be promoted to a
durable maturity tier without ever compiling into a gate/test/rule. The
mechanism existed (`cli/internal/ratchet/`) but R3 was a manual operator
decision with no check.

## How

`scripts/check-ratchet-r3-constraint.sh` scans the learnings corpus and
flags any **durable-tier** learning
(`candidate`/`established`/`canonical`/`stable`/`promoted`) that cites
**no constraint** — a `scripts/`/`.github/workflows/` gate, a
`_test.go`/`tests/` reference, a `skills/**/SKILL.md` step, or a
`constraint:`/`enforced_by:` frontmatter field. Provisional learnings
are exempt (still forming).

- **Warn-first → blocking**, mirroring the ratchet's own warn-then-fail
ladder: warn-only by default (exit 0); `--strict` or
`RATCHET_R3_BLOCKING=true` makes the same gaps blocking (exit 1).

## Why a script, not a CI path-filter gate

`.agents/learnings/**` is **gitignored** (0 tracked). A CI path-filter
gate on it would be dead-by-design — the exact reason the
`learning-coherence` CI job was retired (2026-05-19). So R3 runs at
ratchet/flywheel time against the **live local corpus**; the script's
own correctness is gated in CI by the committed bats test
(`tests/scripts/*.bats` runs in `validate.yml`).

## Verification

- `tests/scripts/check-ratchet-r3-constraint.bats` — 11 hermetic tests
on a synthetic fixture (warn-first, --strict, env-var parity,
provisional exemption, empty-field rejection, gate/test/SKILL citation
forms, count accuracy). All pass.
- `shellcheck` clean.
- Dry-run against the real local corpus: 639 scanned, 7 durable-tier, 5
flagged — warn-only, exit 0 (honest; does not break on existing corpus).

Closes-scenario: ag-maaa#r3-constraint-gate
Bounded-context: BC1-Corpus
Evidence: tests/scripts/check-ratchet-r3-constraint.bats
2026-06-06 10:17:12 -04:00
Bo c0dc6cbd52 docs(architecture): AgentPod/SwarmJob/watch-event schema PROPOSAL (ag-egpu.1 #factory-api-schema) (#766)
## What

New doc `docs/architecture/agentpod-swarmjob-schema.proposal.md` — the
**schema-level design** for one-way-door #2 (`ag-egpu.1`). It
operationalizes the two deltas the architecture spine
`docs/architecture/the-agent-factory.md` (`ag-yv25`, cross-model
reviewed 2026-06-05) names for door #2: (a) AgentPod-spec +
SwarmJob-spec on the bead, (b) watch/event surface.

**PROPOSAL only** — no schema in `schemas/` changes, no migration. The
doc is the artifact the council ratifies before `ag-v1xk` / `ag-xanm` /
`ag-7dnb` code against the API.

## Supersedes PR #765

My first attempt (#765) branched ~80 commits behind and added a
competing `the-agent-factory.md`, colliding with the canonical spine
that already landed on main. This PR is re-homed to a non-colliding
path, **defers to the spine** for architecture, and aligns to its
vocabulary (AgentPod / SwarmJob / Oracle / anti-affine / Volume-tier).
Closing #765 in favor of this.

## Design (additive, reuses not forks)

- **agentpod-spec.v1** = `worker-spec.v1` (already a Pod template) **+**
`function` (Planner/Generator/Oracle/Scribe — product layer, not RBAC
churn) + `anti_affinity.model_family` (the membrane as a scheduling
constraint) + `volume_tier`.
- **swarm-job.v1** = typed Pod composition on a bead + a **cost-law
derivation rule** (reversible bead → 1 Generator + 1 Oracle pre-check;
one-way-door bead → ≥2 anti-affine Oracles = real quorum). Makes the ≤12
cap a schema field.
- **`bead.*` events** = additive enum on `watch-event.v1`
(`additionalProperties:true`, non-breaking) so the reconcile controller
watches bead state instead of polling `bd ready`.

## Decisions for council (in-doc)

1. AgentPod/SwarmJob binding: bead **metadata projection** (rec,
reversible) vs. first-class `bead.v1` field.
2. SwarmJob **beside** (rec) vs. merged with
`swarm-evidence`/`orchestration-result` (input vs. output contracts).
3. `bead.*` emitter: **`bd` write-path** (rec, crash-safe) vs. `ao` Dolt
tail.
4. `function` is product-layer only; `roles.go` RBAC unchanged.

## Evidence

- New doc: `docs/architecture/agentpod-swarmjob-schema.proposal.md` (158
lines, PROPOSAL-stamped).
- Reconciles:
`schemas/{worker-spec.v1,watch-event.v1,bead.v1,quest.v1,remote-compute-target}.schema.json`.

Advances ag-egpu.1; does **not** close it (closes on council
ratification — gated). Do not auto-merge.

Bounded-context: BC5-Runtime
Evidence: docs/architecture/agentpod-swarmjob-schema.proposal.md
2026-06-06 10:17:08 -04:00
Bo ca172387f9 docs(contracts): single declared gate-runner discipline (ag-8rns #gate-runner-contract) (#755)
## What

Encode the **"run the full declared gate, never a remembered subset"**
rule into the two loop-execution contracts, so autonomous consumers
(`/evolve` Step 5, `/rpi` validation) stop reconstructing the validation
bundle from memory.

- **`docs/contracts/autodev-program.md`** — new **Gate Runner
Discipline** section + a `Validation Commands` note. The bundle is run
via a single canonical runner (a repo gate script, or per gate the typed
BC2 `GateRunnerPort` surfaced as `ao gate run <name>`), in full,
**fail-closed**; a slice is "validated" only once the full declared gate
ran and passed.
- **`docs/contracts/repo-execution-profile.md`** — `validation_commands`
runs as a unit via the canonical runner; lane-narrowing is **declared**
(`validation_lanes`), never recalled; fail-closed; cross-link to the
autodev contract.

## Why

Origin (in the bead notes): 2026-06-04 a `/evolve` cycle ran a
**subset** of its declared validation bundle (skipped `PROGRAM.md`
grounding greps), reported slices green, and an independent `/validate`
caught the red. Generic failure mode: a loop that rebuilds its gate from
prose eventually runs a subset. This is the **contract** defense; it
aligns the docs to the already-shipped `ao gate`/`GateRunnerPort`.

## Scope / non-scope

- **This PR = the docs-contract (substrate) half of ag-8rns.**
Verified-cold surface (no active worktree touches these two files).
- **Deferred:** the `skills/evolve` Step-5 wiring is a **hot** surface
(live `ag-llni` delete-evolve-CLI + `ag-ro1i` evolve-backport branches)
— left to those branches to avoid collision. **Bead stays OPEN.**

## Validation

- Diff is docs-only (+21/-2). markdownlint clean; `mkdocs strict build`,
`doc-release gate`, `executable-spec link integrity`, `context map
drift` all **ok** locally.
- Local omnibus `pre-push-gate.sh` reported pre-existing substrate reds
(contract-canaries eval/bats, `context-packet-ab-wave0` off=fail
[known-expected A/B state], baseline-audit policy mismatch). **Verified
pre-existing:** pristine `origin/main` passes
`tests/scripts/pre-push-gate.bats` 56/56 (exit 0); none are reachable
from a `docs/contracts/*.md` change.

Closes-scenario: ag-8rns#gate-runner-contract
Bounded-context: BC3-Loop
Evidence: docs/contracts/autodev-program.md
2026-06-06 10:17:03 -04:00
Bo 5995beb417 docs(doctrine): reconcile 3.0.md tooling-floor wording with the bd/git floor (ag-60jd #tooling-floor-reconcile) (#790)
## What

`docs/3.0.md:168` (Non-goals) read **"No new required tooling; `bd`, the
ratchet, and the `ao` CLI carry the load,"** which sounded like
*nothing* was required and contradicted two settled statements:

- `AGENTS-WORKFLOW.md` / CLAUDE.md doctrine: **"No bead, no PR"** (bd is
load-bearing for the canonical workflow).
- `docs/dependencies.md:14`: **`bd` → "Required for tracked work."**

This restates the floor in one consistent form across the doctrine
surfaces:

> `git` + an agent runtime stay **hard-required**, `bd` is **required
for the bead-tracked workflow** ("No bead, no PR"), and the ratchet +
`ao` CLI carry the rest.

## Why this is the only change needed

The README rewrite already removed the old "bd = Optional" requirements
table the bead cited (README:128). The current surfaces are already
aligned:

- `README.md:86` — "The only hard requirement is an agent runtime and
`git`."
- `docs/dependencies.md:14` — `bd` = "Required for tracked work";
`ao`/`bd` recommended (line 32).
- `AGENTS.md` — no contradicting "bd optional" statement.

So `docs/3.0.md:168` was the last outlying statement. One line changed.

## Verification

- `markdownlint-cli2 docs/3.0.md` → 0 errors.
- `scripts/pre-push-gate.sh --fast` → passed (2 pre-existing warn-only
F1.6 items, unrelated).

Closes-scenario: ag-60jd#tooling-floor-reconcile
Bounded-context: BC5-Runtime
Evidence: docs/3.0.md
2026-06-06 14:07:38 +00:00
Bo 1601467387 chore(docs): gut dead-mechanism context poison from agent-facing docs (ag-sjz8 #gut-poison) (#764)
## What

Gut **context poison** — agent-facing docs that route a working agent at
DEAD mechanisms. This poisoned a live fleet-operating session (the bo
driver building the go-dark supervisor) into proposing `ao rpi` as a
continuity-loop worker. Found via a 5-way parallel poison fan-out.

**Scope: operational-surgical** (Bo's explicit call). Gut the
agent-facing *operational* guidance + *factual* errors; **LEAVE** the
README/`docs/3.0.md` product narrative (Gas-City-as-reference-substrate
is coherent, ADR-backed product design — a different altitude from Bo's
live fleet).

## Changes (10 files, surgical)

**Tier A — operational guidance (the poison that bit me):**
- `CLAUDE.md` Session Constraints: "route multi-phase work through `ao
rpi`" → the live substrate (NTM + MCP Agent Mail + `continuity-loop`);
`gc` reframed as optional-out-of-session, **not** the live substrate.
Kept the accurate "bridge REMOVED" + "load-bearing legacy" lines.
- `AGENTS.md`: dropped the deleted "scheduling daemon" (ADR-0009).
- `AGENTS-RUNTIME.md`: `ao rpi serve --help` → the real `ao` command
surface.

**Tier B — hookless-factual** (3.0 installs no hooks by default):
hookless banners on `ARCHITECTURE.md` + `reference.md` (surgical vs.
rewriting diagram internals); corrected SessionStart-hook prose in
`context-packet.md` + `vs-claude-flow.md`.

**Tier C — retired `/dream` shown as live:** marked retired in
`evolve`/`harvest`/`using-agentops` (compounding moved to Gas City).
`curate` **intentionally left** — its `--mode=dream` is the forward
replacement, not poison.

## Guardrails
- Does **not** claim `ao rpi` was deleted — the command still compiles
(`loop`/`phased`/`serve` exist); only its role as the *live workflow* is
corrected.
- registry.json unaffected (skill **bodies** only; `generate-registry.sh
--check` = OK).

## Evidence
`bash scripts/generate-registry.sh --check` → OK. Diff is 20 insertions
/ 16 deletions across 10 files.

Bounded-context: BC1-Corpus (agent-facing context docs)
Evidence: this PR diff + the parallel fan-out inventory
Closes: ag-sjz8

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-06 09:44:45 -04:00
Bo efc2609682 docs(architecture): formalize the L0-L4 autonomy ladder (ag-wrom #autonomy-ladder) (#787)
## What

Closes the partial in Google-SRE convergence **point #8** (`ag-wrom`):
AgentOps already ran work at several autonomy levels (human-in-loop
in-session → substrate dispatch → bounded `autodev`) but the progression
was *implicit* — nothing named the rungs, stated what each may mutate,
or defined the evidence that earns a promotion. Implicit autonomy is how
a probabilistic agent quietly acquires more authority than its track
record justifies.

Adds `docs/architecture/autonomy-ladder.md`:

- **The invariant every rung obeys** — non-deterministic reasoning core
wrapped by a deterministic enforcement boundary (CI gates +
ports-and-adapters + ratchet) the agent can't bypass. The ladder moves
the *leash*, never relaxes the *boundary*. L4 code passes the same CI as
L0 code.
- **L0–L4 rungs** mapped to AgentOps' real dispatch vocabulary, with
human posture / acts-before-review / may-merge per rung.
- **Promotion gates** — per-lane, revocable, gated on
statistically-significant success vs Golden data at the
Bronze/Silver/Gold tier.
- **Demotion** — auto-downgrade on risk (the L3→L2 analog of Google's
de-escalation) + the unconditional Red Button.
- **Hard ceilings** — no rung confers authority over
external/secrets/schema/deletion/strategic-fork/merge-beyond-contract;
those stay draft-and-queue at every level.
- Honest divergence stated: AgentOps autonomy is **build-time** (code +
`.agents/` corpus), not run-time production ops — which is why L4 is
delegated to a substrate, not shipped (ADR-0009).

Wires it into the architecture index card grid + `mkdocs.yml` nav, and
flips convergence point #8 from ⚠️ partial to ✅ encoded (tally 9/1/1).

## Evidence
Closes-scenario: ag-wrom#autonomy-ladder
Bounded-context: BC1-Corpus
Evidence: markdownlint-cli2 PASS on all 3 changed docs; all cross-links
verified to resolve (operating-loop, canonical-loop-model,
fungibility-charter, google-sre, ADR-0009 in-docs relative; CLAUDE.md +
skills/autodev as GitHub URLs per repo convention for out-of-docs
targets); new page registered in mkdocs nav for `mkdocs build --strict`.
2026-06-06 12:18:20 +00:00
Bo c639d2a52e docs(architecture): canonize the agent-factory spine + membrane-first North Stars (ag-yv25 #canonize-spine) (#758)
## What

Canonizes the **agent-factory architecture spine** — the foundational
document that guides the build. AgentOps as a Kubernetes-style control
plane for the first *stochastic, untrusted* workload (AI agents).

- **`docs/architecture/the-agent-factory.md`** — thesis, control/data
plane, the **AgentPod / SwarmJob / Volume** compute model, **Roles ×
Primitives** (RBAC × canon function × primitive — naming the
verification role the **Oracle**), the **one-way / two-way door
register**, the **cost law** (tokens follow reversibility), the honest
boundaries, and the dependency-ordered build sequence.
- **`docs/architecture/the-agent-factory.feature`** — the architecture
fitness functions (`@enforced` vs `@to-build`).
- **`GOALS.md`** — North Stars now lead with the **verification
membrane**; the knowledge flywheel demoted to the compounding layer
beneath it.

## Why this is wave 1 of `ag-yv25`

This is the **canonize** wave. Fitness gates (wave 2) and the keystone
wiring (wave 3) remain open under the epic. The build proceeds
foundation-up: `ag-o2tc` (HA store) → `ag-egpu` (workload-object API) →
`ag-v1xk` (reconcile controller) → scheduler / self-healing.

## Review provenance (dogfood)

Reviewed *through the membrane* across **three cross-model council
passes** (Opus 4.8 + gpt-5.5): the architecture verdict, the Pod-model
debate (converged on AgentPod), and the final whole-spine pass — **both
vendors endorse**. Verified against the kernel (`liveness.Disjoint`,
`quorum.CheckSignificantAction`, the `roleCapabilities` matrix). Per
`liveness.SignificantActionDocCanonization`, canonizing this doc is
itself a membrane-gated action.

Closes-scenario: ag-yv25#canonize-spine
Bounded-context: BC5-Runtime
Evidence: .agents/council/2026-06-05-verdict-the-agent-factory.md,
.agents/council/2026-06-05-debate-pod-model.md,
.agents/council/2026-06-05-verdict-final-spine.md
2026-06-05 17:12:52 -04:00
Bo 5fcbe2ef9f docs(readme): command-by-command AgentOps hero (v5) (#753)
Replaces the See It Work hero with the final cut: real Claude Code
commands (/discovery → /crank → /validate --mixed), each followed by a
readable proof of its result (bead graph, sub-agent waves, live Claude +
Codex verdict), then the AgentOps card. Honest (real footage, synthetic
public demo, no PII). Source + reproducible rig in personal-site
assets/hero/.
2026-06-05 15:43:42 +00:00
Bo df3cc9803b fix(memory): reconcile W6 cutover commands
Reconcile W6 memory cutover surfaces so runnable/doc commands match the real CLI. Cross-model ACKs: WindyCastle Agent Mail #225, RubyMoose Agent Mail #226. Required checks green; Cursor Bugbot non-required pending under recorded exception.
2026-06-05 04:50:49 -04:00
Bo 57ec8f3290 docs(memory): remove legacy bd-memory guidance
Implements ag-i788 W4.3. Cross-model ACKs recorded in Agent Mail: RubyMoose #214 and WindyCastle #213. Required checks green; merge proceeds under the recorded Cursor Bugbot non-required instability exception.
2026-06-05 04:06:57 -04:00
Bo f735779124 docs(memory): re-source lesson recall contract
Resolve ag-qa01 by re-sourcing lesson recall contracts to markdown-as-source while preserving legacy bd memory lineage during W4 transition.\n\nQuorum: WindyCastle ACK #202 and RubyMoose ACK #203 at 6b47d8c5. Required checks green; Cursor Bugbot pending handled under recorded non-required Bugbot exception.
2026-06-05 03:20:32 -04:00
Bo 419bda7532 feat(memory): classify bd remember notes (ag-u1zi) (#745)
## Summary

Implements ag-u1zi W4.1: a deterministic classifier for migrating `bd
remember` notes into the memory architecture without promoting
bead-local operational chatter into pull-learning memory.

Changes:
- adds `scripts/classify-bd-remember.py` with JSON/markdown output,
`--input`, `--expected-count`, and `--generated-at` options
- adds fixture and Bats coverage for classification coverage, lineage
preservation, markdown manifest, and expected-count mismatch
- adds `docs/contracts/bd-remember-migration-manifest.md` plus
documentation-index entry

Classification policy:
- `bead`: bead-linked, session-local, one-off, or tracker-operational
notes
- `pull-learning`: reusable project learning candidates, emitted as
`reach=pull`, `maturity=provisional`, `source=migrated-bd-remember`
- `discard`: empty/stale/deprecated/obsolete notes

Dolt/bd caveat: `bd update ag-u1zi --claim` and `bd ready` are failing
via the known Dolt/MySQL write/read path (`context canceled` / invalid
connection), so claim/provenance is recorded in Agent Mail rather than
bd state.

## Validation

Focused:
- `bats tests/scripts/bd-remember-classifier.bats` PASS
- `python3 -m py_compile scripts/classify-bd-remember.py` PASS
- `bash scripts/check-contracts-structural-floor.sh` PASS after indexing
the new contract doc
- `git diff --check` PASS

Required push path:
- `bash scripts/regen-all.sh` ran; failed only known CMDAO surface
parity red, timestamp-only `registry.json` drift reverted
- `PRE_PUSH_FAIL_FAST=false bash scripts/pre-push-gate.sh` completed
with the known red set: 4 failures (`test-fixture parity`,
canonical-root worktree disposition, corpus freshness, contract canary
pre-push-governance); no observed diff-caused failure

## Review Request

Requesting cross-model ACK before merge. Do not merge unless PR checks
reach CLEAN and quorum is satisfied.

Closes-scenario: ag-u1zi
Bounded-context: BC1-Corpus
Validation-evidence: classifier script + Bats coverage; see Validation
section above.
2026-06-05 02:24:15 -04:00
Bo 015bb52286 ci(ci): wire scan_descriptions --probe as I0-informational receipt lane (ag-iyu4 #probe-i0) (#738)
Wires `scripts/skill-probe-i0.sh` — the deterministic lexical trigger
ranker (`scan_descriptions.py --probe`, ag-7led) — as an
**I0-INFORMATIONAL** step inside the `skill-eval` job.

## What it does
- Runs the probe over every `trigger_probes:` phrase in the corpus,
writes a per-skill JSON receipt to `.agents/ao/skill-eval/<id>.json`,
and uploads it as the `skill-retrieval-probe-receipts` workflow
artifact.
- Asserts byte-stable **determinism** across two runs; a
non-deterministic probe is surfaced as a `::warning::` only.
- **Not a PR check:** `continue-on-error: true` lives INSIDE the
existing `skill-eval` job, so no new GitHub check is created and the
step can never block (or even advisory-fail) a merge. I0 =
informational.
- No-ops cleanly (exit 0, no receipts) until a skill opts in with
`trigger_probes:`.

## Acceptance
- Probe emits the JSON-receipt artifact AND no new PR check appears
(verify absent from `gh pr checks`).
- A deliberately non-deterministic probe input is caught by the
determinism assertion before it could become a gate —
`tests/scripts/skill-probe-i0.bats` (3 specs, all green).

## 2-week stability baseline
Documented in three places (validate.yml comment,
`docs/contracts/ci-jobs.yaml` skill-eval entry,
`skills/skill-builder/SKILL.md` trigger_probes note): keep `--probe`
I0-only until the receipt lane runs green + byte-stable across the
corpus for a 2-week baseline of merges before any blocking-gate
promotion.

Closes-scenario: ag-iyu4#probe-i0
Bounded-context: BC1-Corpus
Evidence: scripts/skill-probe-i0.sh
2026-06-05 01:00:52 -04:00
Bo 853d781e66 feat(memory): inject canon memory during session bootstrap (#740)
## Summary

Implements ag-11bi W2.3 canon-gated T2 bootstrap memory for `ao session
bootstrap`.

- Selects only canon-promoted established learnings plus high/critical
severity canon anti-patterns from `.agents/canon/learnings`.
- Ranks by `utility * confidence * freshness`, caps selection at 1200
estimated tokens, and warns on stderr when eligible canon memory exceeds
the cap.
- Computes reach through the existing search reach helper, so
established canon memory surfaces as `reach=always` without author-set
reach.
- Emits the memory payload in JSON/robot output and prints selected
memory in the default human bootstrap output.
- Extends `schemas/session-bootstrap.v1.schema.json` and tests the
filter, budget, warning, and human-output paths.

## Validation

Focused checks:

- `go test ./cmd/ao -run 'TestSessionBootstrap'`
- `go test ./internal/search ./internal/types`
- `git diff --check`
- `python3 -m json.tool schemas/session-bootstrap.v1.schema.json`

Required regen:

- `bash scripts/regen-all.sh` regenerated artifacts but exited on the
known CMDAO `wiki query` parity red.

Required pre-push after rebase:

- `PRE_PUSH_FAIL_FAST=false bash scripts/pre-push-gate.sh` completed
with 4 known non-diff failures:
  - test-fixture parity: `scripts/gc-stale-worktrees.sh`
  - worktree disposition: canonical root dirty/untracked operator state
  - corpus freshness: newest local snapshot older than threshold
- contract canaries: known `agentops-core.pre-push-gate-governance` Bats
failure

Diff-relevant gates passed in the pre-push run, including changed-scope
Go race tests, command/test pairing, goals validate, registry drift, CLI
docs parity, command-surface matrix canary, schema checks, CI policy
parity, and shellcheck.

## Review Ask

Requesting cross-model ACK/AMEND/BLOCK before merge. Primary attacks to
run:

- Does any non-canon or candidate/provisional learning enter bootstrap
memory?
- Can the 1200-token cap be bypassed or hidden from callers?
- Does the default human path actually expose the selected memory, not
just JSON?
- Is the generated CLI-surface drift acceptable as regen output on this
branch?

No self-grade for merge.
2026-06-04 23:31:05 -04:00
Bo 81c2f8ee27 chore(docs): drop dead ao evolve refs from agent-facing docs (ag-354d #doc-refs) (#736)
## What
Drops dead `ao evolve` command references from agent-facing docs. The
`ao evolve` CLI was deleted in #724 (ag-llni); these docs still pointed
agents at it.

- `AGENTS.md` / `CLAUDE.md` / `README.md` / `docs/dependencies.md`: the
substrate-loop line `` `ao rpi`/`ao evolve` loop `` → keeps the **live**
`` `ao rpi` `` and drops the **dead** `` `ao evolve` ``.
- `README.md` quickstart: removed the dead `ao evolve --max-cycles 1`
example (loop is now the `/evolve` skill; `ao rpi phased` already covers
terminal lifecycle).
- In-session skill refs (`/rpi`, `/evolve`) preserved — those exist.

## Scope (ag-354d slice 1 of N)
Agent-facing docs only. **Excluded:** gate-protected plan docs
(`docs/reference/agentops-domain-evolution-{bdd,plan}.md`, hexagonal-map
— `check-agentops-domain-evolution-plan.sh` requires the literal);
obsolete runner scripts (coupled, separate slice); cron-template
(already done in #724).

## Gate
`markdownlint`: 0 errors on all 4 files. The 5 local pre-push-gate reds
(`test-fixture parity gc-stale-worktrees`, `worktree
disposition`/canonical-root-dirty, `corpus freshness` 7d snapshot,
goals-validate, CMDAO-surface) are **pre-existing/non-diff** — same set
SageHarbor classified in PR #730/#69; a docs-only change touches none of
those surfaces. CHANGELOG-sync + link-integrity passed.

Closes-scenario: ag-354d#doc-refs
Bounded-context: BC5-Runtime
Evidence: README.md
2026-06-05 02:51:40 +00:00
Bo 2a09d29a0e ci(ci): wire skill-eval as T1 changed-files-scoped CI job + pinned ms install (ag-ktjb #skill-eval) (#731)
Wire the existing `scripts/skill-eval.sh` (#726) as a **T1 (≤5min)
changed-files-scoped** CI job in `.github/workflows/validate.yml`.

## What
- New `skill-eval` job (T1, `timeout-minutes: 5`), gated on
`skills`/`ci` path changes.
- **Setup installs PINNED `ms` v0.1.2** (`git+meta_skill@b0bb6bd541…`)
and **gates on `ms --version` + exact-0.1.2 check BEFORE running**. A
failed install or version mismatch **HARD-FAILS the job (red)** — never
green-skips. This is deliberate: the silent-skip-on-absent-ms
anti-pattern recreates the exact "no skill evaluation" gap this gate
exists to close (the same contract `skill-eval.sh` enforces internally).
- **Changed-files scoping** reuses the repo's existing `eval`-job
`skilldelta` convention (`git diff --name-only` against the PR merge
base), kept to `skills/<id>/**` so `ms` runs **only** for skills the PR
touched (`_fixtures`/`_scaffolding` excluded).
- Reports as its own check in `gh pr checks`: added to `summary.needs`,
the parity-gated `docs/contracts/ci-jobs.yaml` manifest, and the
regenerated `AGENTS-CI.md` table.

## Verification (local)
- `scripts/generate-ci-jobs-table.sh --check` → parity PASS (manifest ↔
summary.needs).
- `tests/scripts/generate-ci-jobs-table.bats`,
`test-ci-policy-parity.sh`, `test-pathfilter-gate-coverage.bats` → all
green.
- `validate.yml` parses as valid YAML; both embedded `run:` scripts are
`shellcheck -S warning` clean.
- `markdownlint AGENTS-CI.md` clean.
- `scripts/skill-eval.sh` smoke against the installed `ms 0.1.2`: bad
fixture → non-zero (names no-secrets/required-metadata), good fixture →
0.

Closes-scenario: ag-ktjb#skill-eval
Bounded-context: BC4-Validation
Evidence: docs/contracts/ci-jobs.yaml
2026-06-05 02:24:12 +00:00
Bo 4e8f101ab5 docs(readme): slow hero pacing for readability (#734)
Panels were flipping too fast. Re-cut each stage clip to ~2.1s and
slowed the cadence to ~1.9s/panel (total ~16.8s). Same beats, same
assets filenames.
2026-06-05 01:48:14 +00:00
Bo 7250291071 docs(readme): AgentOps loop hero video (#732)
Adds the See It Work hero: a ~12s designed montage of **real Claude Code
+ Codex sessions** running the AgentOps loop end to end — discovery →
research → plan → crank → validate → `/council --mixed` (Claude + Codex)
→ merge — with stage labels, tick-tock pacing, and the CTA.

- Real terminal footage, label-matched per stage, banner/email redacted.
- gif autoplays inline (3.7M); full-resolution mp4 linked.
- Source + recorder are reproducible (personal-site assets/hero/).
2026-06-05 01:27:02 +00:00
Bo 8ad6747913 chore(ao): delete the ao evolve CLI surface (ag-llni slice 1) (#724)
**Slice 1 of ag-llni** — retire `ao rpi`/`ao evolve` (orchestration is
no longer an in-CLI engine). This PR removes the **`ao evolve`** half;
the `rpi*.go` + phased web is slice 2.

**Architecture (operator-confirmed 2026-06-04):** orchestration is
two-tier — *inner loop* (one session) = skills/CLIs/native-subagents +
**Workflows** (`.claude/workflows/operating-loop.js` + `bead-crank.js` —
the Claude encoding of inner-orchestration that was mis-shaped as
`rpi`/`evolve`); *outer loop* (many sessions) = **NTM +
mcp-agent-mail**. Codex inner-loop = NTM + agent-mail for now. Leaf CLIs
(`corpus`/`goals`/flywheel/knowledge loops = BC1 corpus), NTM, and
agent-mail all stay.

### Changes
- Deleted `ao evolve` + 4 subcommands (`config`, `next-work`, `blocked`,
`write-stop-marker`) — 10 files.
- Relocated the one non-evolve coupling, `countCronHistoryRows`, into
its sole consumer `cron_self_adjust.go`.
- Removed `evolve` from the `cobra_commands_test.go` golden
`expectedCmds` list (2 sites).
- Regenerated `cli/docs/COMMANDS.md` (−125 lines) +
`docs/cli-skills-map.md`.

### Verification
- `go build ./...` green · `go vet ./cmd/ao` clean · **`go test
./cmd/ao` = 9251 pass**.
- Net: 13 files, −2192 LOC.

Bounded-context: BC5-Runtime
Closes-scenario: ag-llni#delete-evolve-cli
Evidence: cli/cmd/ao/cron_self_adjust.go
Test-Removal-Reason: ao evolve CLI surface retired (ag-llni) —
orchestration moved to .claude/workflows + NTM; the 5 deleted
evolve_*_test.go covered now-deleted command code, not kept behavior.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-06-05 00:21:53 +00:00
Bo 051bd9db6a docs(readme): lead See It Work with the full-loop session video (#727)
Replaces the See It Work hero with a real Claude Code session running
the **full delivery loop end to end** — research → plan → implement →
validate — on a demo repo. It reads `server.js`, finds the naive rate
limiter, plans the fix, **actually edits the file** (adds a time window
+ `Retry-After`), and validates with `node --check`, ending on
'Confirmed fixed' plus an honest note about the remaining unpruned-map
limitation.

- Real session, real tool calls, real correct fix. Sped 3× from a ~2-min
live run → 40s.
- Welcome-banner email/org **redacted**.
- `loop-hero` shipped as gif (README autoplay, 1.6M) + mp4 + webm.
- Moves the existing `ao demo` CLI gif down into the **The ao CLI**
section (loop = the work, CLI = the tool).

**Left unmerged for Bo's final look before it's public.**
2026-06-04 22:48:16 +00:00
Bo 7e8197ba93 ci(skills): consolidate live skill gates into one required skill-gates job (ag-87sv #skill-gates-job) (#723)
Consolidates the live skill-authoring CI gates into one named, required
`skill-gates` job (pure regroup of already-live gates — no behavior
change). Replaces the phantom `scenario-hash-stability` reference in
`CLAUDE.md` with the real `check-scenario-test-linkage` gate now grouped
under `skill-gates`. Adds the `skill-gates` row to the CI-policy-parity
manifest (`docs/contracts/ci-jobs.yaml` + `AGENTS-CI.md`) and the
`gate:skill-gates` SKU to `registry.json` (11→12 gates). New
`tests/scripts/skill-gates.bats` (12 tests) locks the job's structure,
required-check wiring, and drift-sweep behavior.

Part of epic ag-czzf.

Closes-scenario: ag-87sv#skill-gates-job
Bounded-context: BC2-Validation
Evidence: .github/workflows/validate.yml

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-06-04 16:16:04 -04:00
Bo 0272e5a31b docs(readme): add CLI demo cast to See It Work (#725)
Adds a scripted vhs recording of the real `ao` CLI to the README's "See
It Work" section (previously text-only, no demo asset).

- `ao --help` → knowledge flywheel badge → `ao demo --quick` value loop
- GIF autoplays inline on GitHub; mp4 alongside for download/reuse
- Real CLI output; only keystrokes scripted

Only touches README.md + docs/assets/.
2026-06-04 19:48:50 +00:00
Bo 3d99d4bf69 fix(corpus): unify secret redaction + compile/CI git-safety (ag-sz3h ag-zi90 ag-y2xy #w1-git-safety) (#720)
Completes the **W1 git-safety arc** of epic ag-lhu0 (memory-system
re-architecture) — three beads, one coherent surface, after #719 wired
scrub-on-write into corpus_fs.

- **ag-zi90 (dedup):** `redactContent` (`ao context assemble`) now runs
canonical `llm.Redact` first — a single source of truth for credential
patterns (AWS / GitHub / GitLab / Slack / GCP / PEM, previously
uncovered in this path) — then keeps the supplements `llm.Redact` does
*not* cover: 2-segment app JWTs, sensitive env-var assignments,
high-entropy strings.
- **ag-sz3h (compile chokepoint):** new `ao redact` (stdin→stdout
canonical scrub) bridges the shell compile path; `compile.sh` pipes
every rendered article through it before `os.WriteFile` (loud fallback
if `ao` absent).
- **ag-y2xy (CI backstop):** `check-corpus-secret-scan.sh` scans
**git-tracked** (committed/allowlisted) `.agents` corpus + canon only —
repo-root `.agents` is local-only by policy, so scrub-on-write (#719 +
`ao redact`) is the primary defense and this is the backstop. Wired into
`validate.yml`; bats covers clean / leak-with-file:line /
untracked-not-scanned.

Scrub-on-write is primary; CI is the backstop. Verified: go
build/vet/test (incl. `TestRunRedact`, JWT-dedup regression test green),
bats 3/3, shellcheck clean, conformance regenerated.

Closes-scenario: ag-sz3h#compile-render-scrub
Closes-scenario: ag-zi90#dedup-redactor
Closes-scenario: ag-y2xy#ci-secret-scan
Bounded-context: BC1-Corpus
Evidence: scripts/check-corpus-secret-scan.sh

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-06-04 14:11:55 -04:00
Bo 5f5361b72a chore(corpus): refresh stale flywheel-compounding snapshot (ag-omcw #refresh-snapshot) (#716)
## What
Refreshes the committed
`docs/releases/flywheel-compounding-snapshot.json` (was 2026-05-26, **9
days old**). `check-flywheel-compounding-snapshot.sh` hard-FAILs when
the snapshot exceeds `AGENTOPS_FLYWHEEL_SNAPSHOT_MAX_DAYS=14` → it would
have gone **stale-red on main ~2026-06-09**. Nothing auto-refreshes it
(manual-only, per the gate's own fix hint), so a refresh PR is the
mechanism.

## Not metric-gaming
Regenerated from the live corpus (711 artifacts, 250 citations this
period). Values stay **honest** — still below escape velocity
(`sigma_rho` 0.002→0.0057, status **DECAYING**).
`escape_velocity_compounding=false` is **non-blocking by design** ("an
action signal, not a structural CI failure"); only the 14-day staleness
check blocks. This refresh only resets the staleness clock.

## ag-qtm9 investigation (parent bead correction)
The parent P1's premise is **inaccurate**: citations *are* recorded
(`.agents/ao/citations.jsonl`, 3776 entries); `sigma_rho` is
low-but-nonzero, not 0. The flywheel is genuinely below escape velocity
(`sigma=0.029` retrieval coverage) — **real corpus health, not a code
bug**. ag-qtm9 stays open as a corpus-health/strategy item (not a quick
code fix); this PR carves off the bounded snapshot-freshness half.

## Gotcha documented
Generated from the **main checkout** — a fresh git worktree has an empty
local `.agents/` corpus, which yields a degenerate `sigma_rho=0`
snapshot.

## Verification
- `check-flywheel-compounding-snapshot.sh` → **PASS** (0d old)
- Scope: only the snapshot JSON; rebased onto current `origin/main`

Closes-scenario: ag-omcw#refresh-snapshot
Bounded-context: BC1-Corpus
Evidence: docs/releases/flywheel-compounding-snapshot.json
2026-06-04 08:22:40 -04:00
Bo b10316af38 fix(docs): heal mkdocs strict deploy red — absolutize 14 cross-tree links (ag-xhf6 #mkdocs-blob-links) (#714)
## Problem

The **Deploy Docs (MkDocs Material)** workflow (`docs.yml` → `mkdocs
build --strict`) has failed on the last 3 `main` commits (`78fc0e64`,
`72219bed`, `e74d8899`) — a persistent main-red docs-site deploy,
**pre-existing** (predates the most recent merge).

Root cause: 14 links in 5 docs files use `../../` to reach source files
**above** the `docs/` tree (`skills/`, `schemas/`, `scripts/`, `tests/`,
`CLAUDE.md`). MkDocs can't resolve targets outside the site → strict
mode aborts. On the published site those links 404 anyway.

## Fix

Convert each to `https://github.com/boshu2/agentops/blob/main/<path>` —
the repo's established source-link convention (already used in
`SCHEMAS.md`, `sovereignty-proof/`). All 11 unique targets verified to
exist; single-`../` docs-internal links untouched (pure `](../../` →
blob substitution).

Files:
`docs/contracts/{agent-native-mechanism,orchestration-backend,orchestration-result,outcomes-rubric-projection}.md`,
`docs/convergence/google-sre.md`.

## Verification

- `mkdocs build --strict` (`scripts/docs-build.sh --check`) → **exit
0**, 0 unresolved-link warnings (was aborting on these 14)
- `markdownlint` → 0 errors (5 files)
- Diff is pure URL substitution (13/13), scope-checked against
`origin/main`

Closes-scenario: ag-xhf6#mkdocs-blob-links
Bounded-context: BC1-Corpus
Evidence: docs/convergence/google-sre.md
2026-06-03 23:08:05 -04:00
Bo e74d8899fd feat(ci): gate live-hooks reintroduction in docs/ (ag-rryf #doc-hooks-drift-gate) (#713)
## What

Adds `scripts/check-doc-hooks-drift.sh` — a CI regression guard that
fails when a **live-facing** doc reintroduces a live hooks runtime after
the 3.0 hookless teardown:

- `hooks/hooks.json` (retired manifest), a `hooks/<name>.sh` runtime
path,
- `ao hooks` (not a registered command — verified absent from
`cli/cmd/ao/`),
- a bare `session-{start,end,autostart}*.sh` hook-file ref

…unless the **same line** hedges it as hookless / opt-in / historical /
removed / a git-hook. Companion to `sync-skill-counts.sh` (skill-count
drift) and `check-hookless-cold-start.sh` (fixed-list cold-start gate).

## Scope (and why the exclusions)

`docs/` **minus** surfaces that legitimately/archivally name hooks:
- **archival history** — `CHANGELOG.md`, `releases/`, `learnings/`,
`plans/`, `adr/`, `convergence/`, `sovereignty-proof/` (document the
past / the removal itself)
- **opt-in subsystem** — `contracts/` (hooks-authoring opt-in specs),
`runbooks/` (diagnostic enumeration), `code-map/` (point-in-time audits)

The gate keeps the onboarding / operator / architecture narrative
hookless.

## Also: finishes the ag-t1ca residue the gate flags

The ag-t1ca de-hooking missed 8 live-facing lines (gate caught them);
each is reframed:
- stale `ao hooks` command/smoke refs → removed / `ao doctor`
(`cli-skills-map`, `UPGRADING`, `release-e2e-checklist`,
`contracts/release-readiness`)
- present-tense hooks-as-rules → CI gates (`strategic-direction`)
- hook-runtime mentions → `ao curate constrain` / opt-in framing
(`curation-pipeline`, `leverage-points`, `SCHEMAS` legacy-manifest
label, `workflows/session-lifecycle`)

## Verification

- `scripts/check-doc-hooks-drift.sh` → PASS on this branch (FAILed on
all 8 before the reframes)
- `tests/scripts/check-doc-hooks-drift.bats` → 8/8 (positive /
negative×3 / hedge×2 / exclusion / no-docs error)
- `shellcheck` clean · `markdownlint` 0 errors (9 docs) ·
`validate-cli-skills-map.sh` PASS · `generate-ci-jobs-table.sh --check`
PASS · existing `check-hookless-cold-start.sh` still green
- Wired into `validate.yml` lint/contracts (gated on docs/ci/shell
changes) + auto-run via the bats suite

Closes-scenario: ag-rryf#doc-hooks-drift-gate
Bounded-context: BC2-Validation
Evidence: scripts/check-doc-hooks-drift.sh
2026-06-03 22:38:26 -04:00
Bo 72219bed2c docs: finish doc-staleness epic tails — local-model framing + dead test paths (ag-ph6h, ag-j4tw) (#712)
## What

Final slice of the **ag-lk80 doc-staleness epic**. Verified against the
repo.

**ag-ph6h remainder** (local-model / retired-infra framing):
- philosophy.md — "Local 8B (ollama)" Tier-1 caveated as
**optional/user-supplied** (AgentOps ships no model host); "/dream … Gas
City substrate" → out-of-session substrate (NTM + MCP + managed-agents).
- local-compute-routing.md — added a "**Design draft — NOT
implemented**" banner (the local-scout/local-review lanes don't exist as
skills; no local model host); bumped last-reviewed.

**ag-j4tw remainder** (dead test paths):
- testing-skills.md — `tests/_quarantine/claude-code` →
`tests/claude-code` (11 refs; verified that's the real dir with the
skill-test scripts).
- TESTING.md — removed/redirected 9 `tests/hooks/*.bats` refs (dir gone;
3.0 ships no hook scripts) → `tests/scripts/*.bats`; kept the real
git-hooks "Local Hooking" section.

## Verification
- `tests/hooks`=0, `tests/_quarantine/claude-code`=0 in the docs
- markdownlint → 0 errors; `validate-links.sh` → 0 broken (2903 checked)

Closes the last two open children of ag-lk80.

Closes-scenario: ag-ph6h#local-model
Closes-scenario: ag-j4tw#dead-test-paths
Bounded-context: BC1-Corpus
Evidence: docs/philosophy.md
2026-06-03 22:11:05 -04:00
Bo 78fc0e64f5 docs: de-hook the 6 big operator/architecture docs (ag-t1ca #big-files) (#711)
## What

Completes the hooks-runtime decoupling (ag-t1ca) — the 6 large files,
each de-hooked by a dedicated verify-first pass (no `hooks/` dir, no
`hooks.json`, `ao hooks` absent, hook `.sh` files absent; CI = the
authoritative gate).

| File | Reframe |
|---|---|
| ARCHITECTURE.md | hooks-as-enforcement / `hooks/ # 12 hook scripts`
dir / "Session Hooks" → CI gates + `ao` commands + "Session Lifecycle";
82-skill breakdown intact |
| agentops-system-map.md | "52 Skills/121 CLI/13 hook entries" →
"82/76/hookless (CI-gated)"; hook-enforcement section → hookless mapping
|
| context-lifecycle.md | hook-file citations → real mechanisms (CI gate
+ `/pre-mortem`,`/validate`,`/post-mortem` + `ao constraint`/`ao
findings`) |
| leverage-points.md | "3 active hooks"/push-gate/pre-mortem-gate → CI
gates + skill steps; resolved the doc's own active-vs-guardrail
contradiction |
| troubleshooting.md | "Hooks aren't running" / "push gate hook" / `ao
hooks test` → hookless guidance; **ROADMAP.md link kept** (audit's
"broken link" was a false positive) |
| INCIDENT-RUNBOOK.md | Scenario C "Hook Scripts Fail" + Per-Hook Kill
Switches → 3.0 "Skills Not Loading / CI Gate Failing";
`AGENTOPS_HOOKS_DISABLED` kept only as user-authored-hooks opt-out |
| agentops-brief.md | "73 shared skills/12 Hook Events"/"Startup hooks"
→ 82 skills, hookless lifecycle |

## Verification (aggregate, by me — not just subagent self-reports)
- `markdownlint -c .markdownlint.json` (all docs) → **0 errors**
- `tests/docs/validate-links.sh` → **0 broken** (2902 checked)
- `scripts/sync-skill-counts.sh --check` → clean (ARCHITECTURE.md gate
target intact)
- residual hooks-as-live-runtime grep across all 7 → only correct
negation/opt-in framing remains
- net −41 lines (reframe, not gutting)

Closes-scenario: ag-t1ca#big-files
Bounded-context: BC1-Corpus
Evidence: docs/ARCHITECTURE.md
2026-06-03 22:05:09 -04:00
Bo d88d0a7e82 docs: remove hooks-as-live-runtime refs from footguns/context-packet/seed (ag-t1ca #small-files) (#710)
## What

First slice of the hooks-runtime decoupling (ag-t1ca) — the
small/surgical files. Every claim verified against the repo (`hooks/`
absent, `ao hooks` / `ao init --hooks` absent, `make sync-hooks` now
embeds skills/lib not hooks).

- **agent-footguns.md:27** — `make sync-hooks` trigger list dropped dead
`hooks/` + `lib/hook-helpers.sh`; now lists what the target actually
copies into `cli/embedded/`.
- **context-packet.md:498** — `hooks/session-start.sh` → `ao session
bootstrap` (hookless).
- **seed-definition.md** — seed element #3 "Hook readiness" → "Lifecycle
stages (hookless)" (matched the doc's own §3); dropped non-existent `ao
init --hooks` flag; reframed two "hooks enforce/fire automatically"
lines to CI-gates + explicit lifecycle rules.

## Verify-first SAVES (left unchanged — consistent with executable
truth)
- **agents-operator-guide.md** — `check-agents-write-surfaces.sh` still
lists `hooks/` in its scan scope, so the doc matches the script (the
vestigial scan is a code-cleanup item, not doc drift).
- **SCHEMAS.md** — `hooks-manifest.v1.schema.json` already correctly
labeled "legacy / 3.0 hookless".

## Remaining in ag-t1ca (re-scoped, NOT in this PR)
The 6 large files need a dedicated careful pass: ARCHITECTURE.md,
agentops-system-map.md, context-lifecycle.md, leverage-points.md,
troubleshooting.md, INCIDENT-RUNBOOK.md.

Closes-scenario: ag-t1ca#small-files
Bounded-context: BC1-Corpus
Evidence: docs/context-packet.md
2026-06-03 21:50:55 -04:00
Bo 02659e7b44 docs: fix GLOSSARY skill count (66→82, gated) + portable test-debt path (ag-j4tw #counts) (#709)
## What

Verified-clean subset of the second-wave counts/misc bead (ag-j4tw).

- **GLOSSARY.md:170** "ships 66 shared skills" → 82, and **extended
`sync-skill-counts.sh`** to cover the call-site so it self-heals and CI
catches future drift (same gate pattern as ag-bcl4).
- **test-architecture-debt-analysis.md:3** hardcoded Mac path
`/Users/fullerbt/…/cli/cmd/ao/` → repo-relative `cli/cmd/ao/`.

## Verify-first dropped FALSE POSITIVES
Applying the session's recurring lesson (audit agents over-flag):
- ENV-VARS `COUNCIL_EXPLORER_MODEL/TIMEOUT`, `COUNCIL_R2_TIMEOUT` are
**live** (consumed by `skills/council/`, not `cli/` — the audit only
grepped cli/).
- `MEMRL_MODE` exists (3 files); `rg-optimized.md:70` is blank; ROADMAP
"hookless S2–S5" is a real follow-on; `ao inject` is live.

## Still open (ag-j4tw stays open)
- agentops-brief.md / agentops-system-map.md counts are entangled in
**hook-diagram lines** → handle with ag-t1ca.
- TESTING.md `tests/hooks/` (hooks) + testing-skills.md
`tests/_quarantine/claude-code` → `tests/claude-code` (larger path
rework).

## Verification
- `scripts/sync-skill-counts.sh --check` → clean (GLOSSARY now covered)

Closes-scenario: ag-j4tw#counts-glossary
Bounded-context: BC2-Validation
Evidence: docs/GLOSSARY.md
2026-06-03 21:44:22 -04:00
Bo 032998a11c docs: reconcile narrative docs with retired daemon/Gas-City + reframe Anthropic claim (ag-6v3j #convergent) (#708)
## What

Second-wave staleness fixes for **removed infrastructure presented as
live**, plus the operator-approved PRODUCT.md reframe (ag-6v3j).
Verified against `cli/**` (`ao daemon`/`ao overnight` → "unknown
command"), `docs/3.0.md`, and `docs/dependencies.md` (canonical
out-of-session substrate = **NTM + MCP + managed-agents**; Gas City is
not a substrate option — only the gc-*bridge* existed, and it was
removed).

| File | Fix |
|---|---|
| daemon-migration.md | ARCHIVED banner — `agentopsd`/`ao daemon`/`ao
overnight` deleted (soc-2rtm0); body kept only as pre-3.0 record |
| strategic-direction.md:22 | "skills + hooks + ao CLI + scheduling
daemon" → "skills + ao CLI + CDLC loop; hookless, no daemon;
NTM/MCP/managed-agents" |
| agentops-3-explainer-kit.md | "Gas City reference City" out-of-session
lane → NTM + MCP + managed-agents |
| UPGRADING.md:71 | superseded-daemon banner's "Gas City reference City"
→ swappable substrate |
| PRODUCT.md (ag-6v3j) | line 65 "April 2026 Claude Code source analysis
confirmed..." → "appear to converge … convergent, not derived-from" (no
in-repo source; matches the doc's own hedging at 73/270/331);
`last_reviewed` 2026-05-15 → 2026-06-03; line 205 Gas City → substrate |

## Verification
- `ao daemon --help` / `ao overnight --help` → "unknown command"
(confirmed removed)
- `scripts/sync-skill-counts.sh --check` → clean (PRODUCT.md is a count
target; untouched)
- Residual `agentopsd` mentions remain only under ARCHIVED/Superseded
banners (historical, correct)

## Bead status
- **ag-6v3j** — fully resolved (reframe + temporal).
- **ag-ph6h** — partial: daemon + Gas-City done here; the local-8B "Tier
1" framing (philosophy.md/PRODUCT.md) and `local-compute-routing.md`
relocation remain open (aspirational/structural — left for follow-up).

Closes-scenario: ag-6v3j#convergent
Bounded-context: BC5-Runtime
Evidence: PRODUCT.md
2026-06-03 21:33:26 -04:00
Bo 1b3ab1c892 docs(governance): remove the hooks dimension from cli-skills-map.md (ag-xhhf #dehooks) (#707)
## What

`cli-skills-map.md` was pervasively built on the pre-3.0 runtime hook
surface — title "CLI ↔ Skills/**Hooks** Wiring Map", a "Hook Callers"
column on every CLI row, a "## Hooks → Commands" section, a
hook-chaining "Session Lifecycle Flow", the `hooks.json` source note,
and a `hooks/finding-compiler.sh` reference. AgentOps 3.0 ships zero
hooks, so all of that documented a removed runtime. Decomposed from
ag-xa2b (the phantom-skill fix shipped in #705).

## Changes
- Retitled → "CLI ↔ Skills Wiring Map"; dropped hooks framing (header,
`hooks.json` note, "12 runtime hook event sections").
- Removed the "Hook Callers" column; the two rows with **only** hook
callers (`ao memory`, `ao extract`) moved to Orphan Commands (still
valid direct commands).
- Replaced "## Hooks → Commands" + hook-chaining lifecycle with a
"Session Lifecycle Flow (hookless)" section (the Codex ensure-start/stop
model).
- `validate-cli-skills-map.sh`: removed the now-impossible
SessionStart-hook-table assertion (the required section no longer
exists). Count-line + phantom-subcommand checks unchanged.

## Verification
- `scripts/validate-cli-skills-map.sh` → **PASS** (76 generated CLI
command headings)
- `tests/docs/validate-doc-release.sh` → **PASS**
- No residual `hooks/` / `hooks.json` / "Hook Callers" refs in the doc

Closes-scenario: ag-xhhf#dehooks
Bounded-context: BC2-Validation
Evidence: docs/cli-skills-map.md
2026-06-03 21:22:18 -04:00
Bo b8731a4378 docs(audit): remediate stale root + key docs — hookless refs, skill counts, retired CI jobs (ag-lk80 #staleness-fixes) (#705)
## What

Remediates verified staleness from the 2026-06-03 doc audit of root
governance/product docs + the key `docs/` cluster. Two systemic rot
patterns drove almost every finding: **skill-count drift** (73/78/~80 vs
truth 82) and **hooks references that survived the 3.0 hookless
teardown**.

All fixes independently verified against `cli/**`, `scripts/**`,
`.github/workflows/validate.yml`, and `skills/**`.

## Changes (by bead)

| Bead | Sev | Fix |
|---|---|---|
| ag-swi1 | CRIT | `newcomer-guide.md`: removed hooks-as-runtime-layer
framing (3.0 ships zero hooks); 5→4 layers; fixed dead
`scripts/install-dev-hooks.sh` ref; reframed hooks as opt-in via
`hooks-authoring` skill |
| ag-99xv | CRIT | `index.md`: skill count 73→82. **The "broken catalog
link" was a false positive** — `docs/skills/catalog.md` is generated at
build by `gen_skill_pages.py`; link left unchanged |
| ag-xa2b | CRIT | `cli-skills-map.md`: removed 5 phantom skills
(`pr-plan`, `pr-retro`, `update`, `readme`, `oss-docs`) an agent could
mis-invoke. Deep hooks-decoupling of this file (title, "Hook Callers"
column, "Hooks → Commands" section) **decomposed to a follow-up** —
half-editing leaves it internally inconsistent |
| ag-w4t8 | CRIT | `AGENTS-CI.md`: dropped retired advisory rows
`practice-citations` (RETIRED 2026-05-19) and
`factory-claim-ledger-strict` (no such job; references nonexistent file)
|
| ag-bcl4 | HIGH | `index.md` + `documentation-index.md`: counts → 82,
**and extended `sync-skill-counts.sh`** to cover both call-sites so the
count self-heals and CI (`validate-doc-release.sh` → `sync --check`)
catches future drift — the durable fix, not just retyping the number |
| ag-p7zg | HIGH | `CLAUDE.md`: aligned Ship-phase pre-push command to
`scripts/pre-push-gate.sh --fast`, matching `AGENTS-WORKFLOW.md` |
| ag-y5ii | MED | `documentation-index.md`: dropped stale "hooks" from
the how-it-works description |

## Deferred (filed as follow-up beads, not in this PR)

- PRODUCT.md "April 2026 Claude Code source analysis" reframe — product
positioning, operator's call
- Full hooks-decoupling of `cli-skills-map.md` — structural rework,
needs its own verification
- `bd worktree create --branch` syntax is wrong in
CLAUDE.md/AGENTS-WORKFLOW.md (needs a positional name) — discovered this
session
- `validate-bd-closeout-contract.sh` requires `bd dolt push` conditional
wording in AGENTS.md that the AGENTS split dropped (pre-existing main
red, local-only gate)
- Second-wave sweep of the remaining ~80 `docs/` files (ag-bz8n)

## Verification

- `scripts/sync-skill-counts.sh --check` → clean (both new call-sites
covered)
- `scripts/validate-cli-skills-map.sh` → PASS
- `tests/docs/validate-doc-release.sh` → PASS
- No residual `hooks/` / `hooks.json` runtime refs in
`newcomer-guide.md`
- All referenced paths exist (`skills/hooks-authoring/`,
`scripts/pre-push-gate.sh`)

Closes-scenario: ag-lk80#staleness-fixes
Bounded-context: BC1-Corpus
Evidence: docs/index.md
2026-06-03 20:44:06 -04:00
Bo 852d74b3b6 docs: reconcile legacy-RPI-lane doctrine + ADR-0009 substrate marker (ag-etgr #frozen-rpi-doctrine) (#698)
## What
Two doc-reconciliation findings from the codebase-discovery (ag-etgr P2,
ag-xa7q P3):

- **ag-etgr** — the CLAUDE.md *Legacy RPI lane* note said "do not write
new tests for"
`rpi_loop_supervisor.go`/`rpi_c2_events.go`/`rpi_phased_tmux.go`/`rpi_parallel.go`,
but **all four have substantial test suites** and the
`check-test-count-regression` ratchet expects them maintained — the
doctrine and the ratchet pulled opposite ways. Reframed to "live,
tested, **no new surface area**; extend tests for caller-driven changes;
full removal needs soc-1gbpz". Also fixed the stale "superseded by the
gc bridge" line in `docs/ROADMAP.md` (gc bridge was removed).
- **ag-xa7q** — `ADR-0009` names Gas City as the reference substrate
throughout (predates the ag-124p prune). Added a dated historical note:
the **decision stands**, but the substrate is now NTM+MCP+managed-agents
(→ docs/3.0.md). Decision record preserved for provenance.

## Note
A 3rd discovery bead (ag-xoam, BC mid-numbering) was **closed
not-reproducible** — grep showed docs already use canonical BC2
Validation/BC3 Loop/BC4 Factory consistently; the archaeology agent had
confabulated the divergent labels.

Docs-only. markdownlint clean; validate-agents-split green.

Closes-scenario: ag-etgr#frozen-rpi-doctrine
Bounded-context: BC3-Loop
Evidence: CLAUDE.md
2026-06-03 12:51:49 +00:00
Bo 6072dceac5 docs(substrate): reconcile doctrine — skill-dispatch + drop Gas City reference (ag-88y5 #docs-skills-dispatch-reframe) (#696)
## What
Two bounded doctrine-reconciliation slices (one coherent arc):

**ag-88y5** — the out-of-session dispatch unit is the `/rpi`·`/evolve`
**skill**, not the `ao rpi`/`ao evolve` CLI. Per the 3.0
skills-are-the-runtime thesis (using-ntm #693 already frames it this
way), re-narrate the **live** doctrine surfaces so the substrate spawns
an agent that *runs the /rpi skill* over a bead:
- docs/3.0.md, docs/architecture/canonical-loop-model.md,
docs/runbooks/nightly-evolution.md
- skills/using-agentops, skills/agent-native,
skills/domain/references/factory.md

Historical surfaces (MIGRATION-3.0, ADR-0009, release notes) +
CLI-reference left as-is; the actual `ao rpi`/`ao evolve` CLI removal is
the **ag-iowf** epic (live automation callers — overnight-evolve,
release-smoke — must migrate first).

**ag-ogp5** — drop the 4 docs still asserting Gas City as THE reference
substrate → NTM+MCP+managed-agents:
- docs/ARCHITECTURE.md, docs/SCHEMAS.md,
docs/contracts/agents-write-surfaces.md,
docs/patterns/completion-notifications.md (Pattern C)

The ~37 historical/illustrative GC refs are intentionally retained (per
ag-ogp5 scope).

## Verification
regen-all --check, embedded-sync, heal --strict, registry-drift,
codex-rpi-contract, codex-artifacts --scope head — all green.

Closes-scenario: ag-88y5#docs-skills-dispatch-reframe
Bounded-context: BC4-Factory
Evidence: docs/3.0.md
2026-06-03 12:11:23 +00:00
Bo 59b2391b6d feat(skills): add AgentOps-owned using-ntm substrate-orchestration skill (ag-zaoj #using-ntm-skill) (#693)
## What

Adds an **AgentOps-owned, shippable `using-ntm` skill** — the missing
NTM leg of the `NTM + MCP + managed-agents` substrate doctrine
(**ag-zaoj**). Until now `automation-shape-routing` pointed **by name**
at the *proprietary* `ntm`/`vibing-with-ntm` skills, which AgentOps
can't ship — a dangling pointer for standalone users. This is original
content modeled on (not copied from) those.

## The seam: skills are the runtime, not the CLI

The skill teaches driving the open `ntm` CLI as the out-of-session
substrate: **NTM spawns Claude/Codex panes that run the `/rpi` and
`/evolve` *skills*** over a bead queue. It explicitly does **not** use
`ao rpi`/`ao evolve` CLI subprocesses — those terminal wrappers are
retired; the substrate dispatches the whole loop as one invocable skill.

## What lands (15 files, +~440)

- `skills/using-ntm/SKILL.md` + `skills-codex/using-ntm/SKILL.md` (twin)
— the new skill.
- `automation-shape-routing` (+ codex twin) — dangling
`ntm`/`vibing-with-ntm` pointers now route to the owned `/using-ntm`;
`ntm` stays as the CLI tool.
- Six derived surfaces regenerated: `registry.json`, skill-domain-map,
SKU catalog, codex hashes/manifest, context-map; + skill-disposition row
and skill-count bumps (80 → 81) in PRODUCT / ARCHITECTURE / SKILLS /
domain-map / BDD-Gherkin.

## E2E verification (against the real `ntm` CLI)

Per the directive (no `ao rpi`/`ao evolve`): verified every `ntm`
subcommand the skill cites exists
(`spawn/send/activity/attach/doctor/deps/kill/health`) and **fixed the
documented flag to the real `--pane=N` syntax** (it had `--pane N`).
`ntm doctor` runs (bv ✓ / bd ✓ / am ⚠). `docs/cli-surface.*` drift
excluded (pre-existing, unrelated).

## Follow-up (not in this PR)

`ao rpi`/`ao evolve` CLI are slated for retirement; `docs/3.0.md` + the
recent Gas City-prune PRs still reference `ao rpi <bead>` as the
dispatch unit and need a skills-not-CLI reconciliation pass.

## Verification

- `regen-all.sh --check` ALL GREEN · registry-drift PASS · codex parity
PASS · skill-isolation/size PASS · markdownlint 0.

Closes-scenario: ag-zaoj#using-ntm-skill
Bounded-context: BC4-Factory
Evidence: skills/using-ntm/SKILL.md

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-06-03 00:19:22 +00:00
Bo b830d163c4 feat(skills): bd-first memory migration — Phase 1 audit (ag-5u50 #phase1-audit) (#691)
## Phase 1 — read-only memory-layer audit (the first arc of epic
`ag-5u50`)

First slice of the **bd-first-memory-migration** skill: a generic,
3-phase AgentOps skill that consolidates fragmented agent-memory layers
(Claude `MEMORY.md`, ao/flywheel, `.agents/*`, openclaw) onto **bd** as
the single source of truth, then GC/retires the rest. This PR ships the
**read-only audit half** — it cannot mutate anything; it produces the
Gate A manifest a human approves before any later migration.

### What's in it (beads ag-5u50.5–.9)
- **`.5` scaffold** — `SKILL.md` (trigger-matched) + references +
`scripts/`.
- **`.6` data model** — `references/DATA-MODEL.md`: type taxonomy
(fact/feedback/project/episodic/procedural), per-memory fields,
decay/utility formula, maturity ladder **wired to eviction** (the fix
for ao's 99%-provisional stall).
- **`.7` scanner** — `scripts/audit_scan.py`: read-only inventory of
every layer (counts, bytes, dup-rate, maturity), `--json`/`--human`.
- **`.8` classifier** — `scripts/classify.py`: keep/drop manifest
(authored=keep, `-pend-`/dups=drop, bloated `MEMORY.md`=drop), dry-run.
- **`.9` Gate A report** — `scripts/audit_report.py`: current-state
table + manifest summary + **reversibility plan naming every later
destructive action and its rollback**.

### Verification
- **6 hermetic L2 tests** (`tests/test_phase1_audit.py`), no `bd`/`ao`
CLI dependency — all green.
- **5 Gherkin scenarios** (`references/audit.feature`).
- Scripts are 100-col clean and `py_compile`-verified.
- **Live-validated** against a real fragmented box: the scanner
auto-found 2 bloated `MEMORY.md` indexes + the 62k-file /
99%-provisional / dup-pile signals.
- Context-map regenerated; drift gate green.

### Scope guardrails
Read-only only. No Phase-2/3 (migrate / GC / retire) code here — those
are gated behind Gate A and ship in later PRs. The destructive dogfood
on the live box stays human-gated (Gate C).

Closes-scenario: ag-5u50#phase1-audit
Bounded-context: BC1-Corpus
Evidence: skills/bd-first-memory-migration/tests/test_phase1_audit.py
2026-06-02 17:10:17 -04:00
Bo 94397478d1 docs(runbooks): re-narrate Gas City orchestration to NTM+MCP+managed-agents (ag-r6g1 #runbooks-slice) (#690)
## What

Round-3 Gas City doctrine sweep — **operator-runbooks slice**
(**ag-r6g1**). Both runbooks framed out-of-session orchestration as the
"Gas City reference City" with GC-specific mechanics (mayor + refinery
agents, Gas City cron Orders). Re-narrated to the canonical substrate
**NTM + MCP + managed-agents** per [`docs/3.0.md`](docs/3.0.md).

## Surfaces (2 files, +20 −18)

- `docs/runbooks/nightly-evolution.md` — 3.0-note header, Architecture
table rows (reference-City + `/dream` dispatch), out-of-session prose,
First-Safe-Run note, recurring-runs note, Vendor-Policy Dream-handoff +
substrate bullet. Mayor/refinery → NTM swarm + workers; Gas City cron
Order → managed-agent driver or cron.
- `docs/runbooks/autonomy-runtime-cycle-1.md` — 3.0-note header, dry-run
guidance, observability bullet, operator-notes line.

Kept the correct "AgentOps ships no daemon/scheduler" framing and Mt.
Olympus (separate sovereign runtime) untouched.

## Scope

This clears the **operator-facing** surfaces. ag-r6g1's remaining refs
are descriptive comparison/example/explainer mentions (illustrative
"dispatched on the Gas City reference City") — a final low-priority
slice.

## Verification

- markdownlint 0 errors · `regen-all.sh --check` ALL GREEN (docs-only).

Closes-scenario: ag-r6g1#runbooks-slice
Bounded-context: BC1-Corpus
Evidence: docs/runbooks/nightly-evolution.md
2026-06-02 16:20:16 -04:00
Bo b6691ddab1 docs: fix docs asserting Gas City is the reference -> NTM+MCP+managed-agents (ag-r6g1 #docs-slice-2) (#689)
## What

Fixes the **post-mortem WARN caveat** from the #684–#687 session: 5 docs
still **asserted "Gas City is the reference"** — a now-FALSE claim
contradicting the north star ([`docs/3.0.md`](docs/3.0.md): substrate =
**NTM + MCP + managed-agents**). Re-narrates all 11 refs (**ag-r6g1**,
docs slice #2).

## Surfaces (5 files, +21 −20)

- `docs/how-it-works.md` (2) — out-of-session delegation +
Dream-unattended para (de-GC'd the mayor/refinery/cron-`exec`-Order
mechanics → NTM swarm / managed-agent driver).
- `docs/software-factory.md` (2) — prose + Surface Map row.
- `docs/first-value-path.md` (4) — step 6, fast-path table row, the
substrate block (mayor/refinery/Orders/`city.toml` → the
NTM+MCP+managed-agents trio), artifacts row.
- `docs/architecture/ports-and-adapters.md` (1) — autonomous-loops
delegation.
- `docs/workflows/session-lifecycle.md` (2) — substrate prose + table
row.

Kept the correct "AgentOps ships no daemon/scheduler; delegates to a
substrate" framing intact.

## Scope

**ag-r6g1 stays OPEN** — operator runbooks (`nightly-evolution`,
`autonomy-runtime-cycle-1`, deeper GC-specific mechanics) + descriptive
comparison/example/explainer mentions remain for a later slice.

## Verification

- markdownlint 0 errors · `regen-all.sh --check` ALL GREEN (docs-only;
no derived-surface drift).

Closes-scenario: ag-r6g1#docs-slice-2
Bounded-context: BC1-Corpus
Evidence: docs/how-it-works.md
2026-06-02 16:06:22 -04:00