## 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)
12 KiB
AgentOps Skills Repository
What this is
AgentOps compiles and compounds the context that feeds your software factory. It automates agent bookkeeping — attempts, decisions, citations, verdicts, handoffs, learnings — then encodes the DevSecOps CDLC and multi-agent operating practices into a portable corpus that compounds across sessions and runtimes, with humans in or on the loop at whatever rigor level fits.
Zero-Context Startup (Read First)
AgentOps 3.0 is hookless: nothing auto-injects orientation at session start. Run ao session bootstrap (the universal init prompt) to get the standard orientation report, then ao inject / ao corpus inject --query "<topic>" to pull decay-ranked prior context — this is the explicit replacement for the SessionStart context the runtime used to inject. Then, on your first message in a fresh session, read in this order:
docs/newcomer-guide.mdfor a practical repo orientation and learning path.docs/index.md(MkDocs landing) anddocs/documentation-index.md(full catalog) for navigation.README.mdfor product-level framing.- Task-specific canonical surfaces:
- CLI behavior:
cli/cmd/ao/,cli/internal/, generatedcli/docs/COMMANDS.md - Skills behavior:
skills/**/SKILL.md - Gates:
.github/workflows/validate.yml+scripts/*.sh(AgentOps 3.0 is hookless — CI is the authoritative gate) - Contracts/schemas:
schemas/**,lib/schemas/**
- CLI behavior:
.agents/AGENTS.mdfor knowledge store navigation (search on demand, don't pre-load).
Source-of-Truth Precedence
When files disagree, trust in this order:
- Executable implementation and generated outputs (
cli/**,scripts/**,cli/docs/COMMANDS.md) - Declared contracts/manifests (
skills/**/SKILL.md,schemas/**) - Narrative docs (
docs/**,README.md)
Always report mismatches; do not silently pick a lower-precedence doc over executable behavior.
Project Structure
cli/ Go CLI (ao binary) — cmd/ao, internal packages
skills/ Skill definitions (source of truth)
lib/ Shared shell helpers
scripts/ Release, validation, and maintenance scripts
schemas/ JSON schemas for config/manifest
tests/ Integration and validation tests
bin/ Standalone shell tools
docs/ Documentation
Critical: Skill File Locations
Skills source of truth is skills/ in THIS repo.
When editing skills, ALWAYS edit the files under skills/ in this repo. NEVER edit ~/.claude/skills/ directly — those are installed copies that get overwritten on bash <(curl -fsSL https://raw.githubusercontent.com/boshu2/agentops/main/scripts/install.sh).
CORRECT: skills/evolve/SKILL.md (this repo — source of truth)
WRONG: ~/.claude/skills/evolve/SKILL.md (installed copy — do not edit)
Deep reference (on-demand, not auto-loaded)
Building the CLI, the Key Scripts table, CI-validation detail + the "rules that break CI", testing rules, the release pipeline, and the ao goals command surface all live in docs/agent-workflow-reference.md. Read it only when you're actually touching those surfaces. The AGENTS-side scope detail lives in the tiered split: AGENTS-WORKFLOW.md, AGENTS-CI.md, AGENTS-CODEX.md, AGENTS-RUNTIME.md.
Workflow
Every change to main is a PR. Every PR cites a bead. The unit of a PR is one coherent arc — a closable bead (or small-epic slice) with a single rollback semantic. Small epics (≤5 child beads, same surface) ship as one PR with N commits. Large epics (15+ child beads) ship as N PRs sliced by scenario or wave. Direct pushes to main are rejected by branch protection. Derivation: .agents/council/sdlc-shape-2026-05-17/DUEL.md (local, gitignored — duel between Claude Opus 4.7 and Codex gpt-5.5, 2026-05-17). 2026-05-19 evolution from "1 scenario per PR" after the 8-PR merge-arc burned out the gh-merge-chain dance — soc-1lp1.
Autonomous-session scope (sister rule to coherent-arc). Coherent-arc governs the shape of a single PR; session-scope governs the count of consecutive PRs. Default: 2-4 PRs per autonomous session. At ≥5 PRs shipped or in-flight in one session, stop and run a post-mortem before continuing — diminishing returns and reactive-PR spirals (PR-fixes-fallout-from-prior-PR) are the dominant failure mode in the back-half of long sessions. Derivation: the 2026-05-19 cron-loop session shipped 6 PRs with 3 self-corrections; PRs #5–#6 each fixed fallout from #1–3. Visible reactivity by PR #5 but the loop kept nudging "keep going" without surfacing the post-mortem signal. Mechanical enforcement is the mandatory /evolve post-mortem checkpoint (council-gated, cannot be bypassed; skills/evolve/references/postmortem-checkpoint.md), which reads the session-PR count from scripts/session-pr-scope.sh. The pre-creation Bash hook hooks/session-pr-counter.sh (PR #362) was removed in the 3.0 hookless teardown (#511); re-author it as an opt-in hook via the hooks-authoring skill for the always-on pre-creation signal — AgentOps ships none. (soc-waxr, ag-o5xp)
Phases
- Claim.
bd ready→ pick a bead →bd update <id> --claim. No bead, no PR. If the work is genuinely new,bd createfirst. - Scope. Read the bead's acceptance: a
.featurefile (canonical when present) or an embedded## Scenariosblock in the bead description. Free-text acceptance is invalid — promote it to scenarios before work begins. Default: one PR per coherent arc — bundle scenarios that ship-or-revert together; split scenarios with independent rollback. The PR is the atomic-revert unit. Carve-out:type=chorewith#triviallabel for tiny work. - Ship.
bd worktree create wt-<bead-id> --branch <type>/<bead-id>-<scenario-token>-<short-slug>(the worktree dir name is the required positional arg) — worktree-mandatory; do not edit in the shared checkout. Implement. Runscripts/pre-push-gate.sh --fastbefore push (smart conditional gate that runs the per-tool checks —cd cli && make test,bats tests/scripts/<file>.bats, etc. — only for the surfaces you changed); CI runs the omnibus validation on push. - Close. Open PR. CI validates the merge state. Squash-merge when green. The bead closes only when every scenario is merged (or explicitly cancelled in bead metadata).
Branch + PR shape
| Element | Format |
|---|---|
| Branch | <type>/<bead-id>-<scenario-token>-<short-slug> · ≤80 chars · <scenario-token> = full slug if it fits, else <slug-prefix>-<hash8> |
| PR title | <type>(<scope>): <subject> (<bead-id> #<scenario-slug>) — full slug here |
| Required PR body trailers | Closes-scenario: <bead-id>#<slug> · Bounded-context: BC<N>-<name> · Evidence: <path> |
| Merge | Squash only · linear history · branch up-to-date · no force-push · no deletes |
| Reviews | 0 humans + required claude-code-review check (automation gate) |
Multi-agent discipline (shared checkout)
The host ~/dev/agentops is contended. Agents do not edit it directly. Use bd worktree create <name> --branch <branch> for every change. Cross-bead merge serialization: bd merge-slot. Foreign uncommitted files = quarantined; identify owner, attach to a bead, move into a worktree.
Provenance
Source of truth: append-only JSONL at docs/provenance/ledger.jsonl (schema agentops-sdlc-provenance.v1). bd update --metadata is a derived projection — ledger wins on disagreement. Concurrent writes use --set-metadata / --append-to (never full-blob replacement) + dolt advisory locks. claude-code-review verdicts are first-class ledger events.
Doctrine altitudes
- North star:
docs/3.0.md— what AgentOps 3.0 is (hookless-first CDLC, the SDLC↔CDLC loop, the four-practice waist). The single source of truth; everything below is consistent with it. - Spine:
docs/architecture/operating-loop.md— 7-move agent doctrine. Primary navigation. - One turn's executor:
/rpiskill. NOT primary. - Architecture: 5 Bounded Contexts (BC1 Corpus → BC5 Runtime). Where code lives.
- Consumer metaphor: "CDLC" — the compounding Knowledge Flywheel framing (
Research → Plan → Implement → Validate → Knowledge Flywheel feedback).
Source layer — three axis owners, generated or schema-gated; NEVER hand-edited inventory maps
- DDD (vocabulary):
skills/domain/references/— BC names + ubiquitous language. - Hex (structure):
skills/*/SKILL.mdfrontmatter (hexagonal_role,consumes,produces,context_rel) → generated todocs/contracts/context-map.md. CI gate:validate-context-map-drift. - Gherkin (acceptance):
skills/*/references/*.feature+ bead-embedded## Scenarios. CI gate:check-scenario-test-linkage(in theskill-gatesjob).
CI tiers (no "advisory")
- T0 (≤30s) required gates · T1 (≤5min) verification · T2 (≤15min) quality — all required.
- I0 informational; runs and reports artifact but does NOT appear as a PR check.
Session Constraints
- Multi-phase / multi-agent work: runs on the live orchestration substrate — NTM (tmux agent swarms) + MCP Agent Mail (locks / messaging / inboxes) + the
continuity-looprenewal spine, under.agents/agent-constitution.md. The in-sessionao rpiloop is retired as the live workflow — do NOT route new work through it. (Its Go lane is load-bearing legacy, not dead code — see "Legacy RPI lane" below; the command still compiles but is not how work is driven.) - Before spawning workers: Verify no file overlap across the wave. File collisions are the #1 swarm failure mode.
- Before proposing new capability: check it doesn't already exist —
.github/workflows/validate.yml,GOALS.md, existingskills/**/SKILL.md, and theaocommand surface (cli/cmd/ao/, generatedcli/docs/COMMANDS.md). - Gas City (gc) — optional out-of-session SDK, NOT the live substrate. The live substrate is NTM + Agent Mail (above).
gcis an optional dependency for out-of-session orchestration only;aodoes NOT wrap it. (The CLI gc-bridge was removed — see next line.) - Gas City (gc) bridge — REMOVED (soc-2rtm0, wave 2). The CLI gc-bridge glue (
cli/cmd/ao/gc_bridge.go,gc_events.go,rpi_phased_gc.go) was severed and deleted. The phased engine keeps its non-gc backends (auto/direct/stream/tmux);runtime=gcis no longer a valid mode. The injectable exec/look typedefs (execFn/lookFn, formerlygcExecFn/gcLookFn) now live inrpi_phased_context.go. The last dangling gascity compat —internal/gascity, its only importer (the orphanedagentworkerGasCity adapter), andinternal/bridge/gc.go— was removed in ag-hfc (3.1 teardown S2); the livebridgecodex/semver helpers (CompareSemver,ParseSemverParts, codex lifecycle) stay inbridge/semver.go+bridge/codex.go. - Legacy RPI lane — load-bearing, live (tested) code; no new surface area.
rpi_loop_supervisor.go,rpi_c2_events.go,rpi_phased_tmux.go,rpi_parallel.goare live and have substantial test suites — extend those tests when a caller-driven change legitimately touches the lane (the test-count-regression ratchet expects them maintained, not abandoned). Do NOT add new features / new surface area here, and do NOT delete the files: live code references their symbols (RPIC2Event/appendRPIC2Eventacross 13+rpi_phased*files +mine;rpiLoopSupervisorConfig/runRPISupervisedCycleinrpi_loop/agentopsd/rpi_cancel;shellQuoteinhandoff/overnight_setup; tmux helpers inrpi_nudge/rpi_phased_stream). Deleting any breaks the build; full removal needs a caller-migration refactor (soc-1gbpz), not a flat delete.rpi_workers.goandfire.gowere already removed. (Prior wording said "do not write tests for them," which contradicted the on-disk test suites + the ratchet — ag-etgr.)
Execution Discipline
- Verify before committing. Go:
go test ./...andgo vet ./.... Python: run relevant tests. Never commit unverified code. - First-Edit Rule. First Edit/Write/Bash must happen within your first 3 responses. Execute first, research second.
- Intent Echo. Before non-trivial tasks, state in ONE sentence what you understand. Wait for confirmation on multi-file changes.
- Two-Correction Rule. If corrected twice on the same task: STOP, re-read, state what you now understand differently, and confirm before trying again.