Agentops using-agentops
Meta skill explaining the AgentOps operating model. Hook-capable runtimes inject it at session start; Codex uses it through the explicit startup fallback. Covers bookkeeping, validation, primitives, flows, the RPI lifecycle, and the skill catalog.
git clone https://github.com/boshu2/agentops
T=$(mktemp -d) && git clone --depth=1 https://github.com/boshu2/agentops "$T" && mkdir -p ~/.claude/skills && cp -r "$T/cli/embedded/skills/using-agentops" ~/.claude/skills/boshu2-agentops-using-agentops && rm -rf "$T"
cli/embedded/skills/using-agentops/SKILL.mdAgentOps Operating Model
AgentOps is the operational layer for coding agents.
Publicly, it gives you four things:
- Bookkeeping — captured learnings, findings, and reusable context
- Validation — plan and code review before work ships
- Primitives — single skills, hooks, and CLI surfaces
- Flows — named compositions like
,/research
, and/validation/rpi
Technically, AgentOps acts as a context compiler: raw session signal becomes reusable knowledge, compiled prevention, and better next work.
Core Flow: RPI
Research → Plan → Implement → Validate ↑ │ └──── Knowledge Flywheel ────┘
Research Phase
/research <topic> # Deep codebase exploration ao search "<query>" # Search existing knowledge ao search "<query>" --cite retrieved # Record adoption when a search result is reused ao lookup <id> # Pull full content of specific learning ao lookup --query "x" # Search knowledge by relevance
Output:
.agents/research/<topic>.md
Plan Phase
/pre-mortem <spec> # Simulate failures (error/rescue map, scope modes, prediction tracking) /plan <goal> # Decompose into trackable issues
Output: Beads issues with dependencies
Implement Phase
/implement <issue> # Single issue execution /crank <epic> # Autonomous epic loop (uses swarm for waves) /swarm # Parallel execution (fresh context per agent)
Output: Code changes, tests, documentation
Validate Phase
/vibe [target] # Code validation (finding classification + suppression + domain checklists) /post-mortem # Validation + streak tracking + prediction accuracy + retro history /retro # Quick-capture a single learning
Output:
.agents/learnings/, .agents/patterns/
Phase-to-Skill Mapping
| Phase | Primary Skill | Supporting Skills |
|---|---|---|
| Discovery | | , , , |
| Implement | | (single issue), (parallel execution) |
| Validate | | , , , |
Choosing the skill:
- Use
for single issue execution. Now defaults to TDD-first — writes failing tests before implementing. Skip with/implement
.--no-tdd - Use
for autonomous epic execution (loops waves via swarm until done). Auto-generates file-ownership maps to prevent worker conflicts./crank - Use
for the discovery phase only (brainstorm → search → research → plan → pre-mortem)./discovery - Use
for the validation phase only (vibe → post-mortem → retro → forge)./validation - Use
for full lifecycle — delegates to/rpi
→/discovery
→/crank
./validation - Use
to gate/record progress through RPI./ratchet
Start Here (12 starters)
These are the skills every user needs first. Everything else is available when you need it.
| Skill | Purpose |
|---|---|
| Guided onboarding — run this first |
| One-command full AgentOps setup — fills gaps only |
| Deep codebase exploration |
| Multi-model consensus review + finding auto-extraction |
| Code validation (classification + suppression + domain checklists) |
| Full RPI lifecycle orchestrator ( → → ) |
| Execute single issue |
| Quick-capture a single learning into the flywheel |
| Single-screen dashboard of current work and suggested next action |
| Maintain GOALS.yaml fitness specification |
| Atomic test-commit-push workflow |
| Knowledge flywheel health monitoring (σ×ρ > δ/100) |
Advanced Skills (when you need them)
| Skill | Purpose |
|---|---|
| Active knowledge intelligence — Mine → Grow → Defrag cycle |
| External reading wiki proposal — raw sources to compiled wiki |
| Cross-rig knowledge consolidation — sweep, dedup, promote to global hub |
| Operationalize a mature corpus into beliefs, playbooks, briefings, and gap surfaces |
| Structured idea exploration before planning |
| Full discovery phase orchestrator (brainstorm → search → research → plan → pre-mortem) |
| Epic decomposition into issues |
| Product validation gate — goal alignment, persona fit, competitive differentiation |
| Failure simulation (error/rescue, scope modes, temporal, predictions) |
| Validation + streak tracking + prediction accuracy + retro history |
| Root cause analysis |
| Pre-flight, changelog, version bumps, tag |
| Autonomous epic loop (uses swarm for each wave) |
| Fresh-context parallel execution (Ralph pattern) |
| Goal-driven fitness-scored improvement loop |
| PROGRAM.md autonomous development contract setup and validation |
| Interactive Dream operator surface for setup, bedtime runs, and morning reports |
| Documentation generation |
| Quick-capture a learning (full retro → /post-mortem) |
| Full validation phase orchestrator (vibe → post-mortem → retro → forge) |
| Brownian Ratchet progress gates for RPI workflow |
| Mine transcripts for knowledge — decisions, learnings, patterns |
| Generate gold-standard README for any project |
| Continuous repository security scanning and release gating |
| Binary and prompt-surface security suite — static analysis, dynamic tracing, offline redteam, policy gating |
| Test generation, coverage analysis, and TDD workflow |
| Persona-based adversarial validation — probe docs and skills from constrained user perspectives |
| Review incoming PRs, agent output, or diffs — SCORED checklist |
| Safe, verified refactoring with regression testing at each step |
| Dependency audit, update, vulnerability scanning, and license compliance |
| Performance profiling, benchmarking, regression detection, and optimization |
| Project scaffolding, component generation, and boilerplate setup |
| Author and manage holdout scenarios for behavioral validation |
Expert Skills (specialized workflows)
| Skill | Purpose |
|---|---|
| Build Grafana platform dashboards from templates/contracts |
| Parallel Codex agent execution |
| Official OpenAI docs lookup with citations |
| OSS documentation scaffold and audit |
| Reverse-engineer a product into feature catalog and specs |
| Upstream repository research before contribution |
| External contribution planning |
| Fork-based PR implementation |
| PR-specific validation and isolation checks |
| PR preparation and structured body generation |
| Learn from PR outcomes |
| Code complexity analysis |
| Interactive PRODUCT.md generation |
| Session handoff for continuation |
| Post-compaction context recovery |
| Trace design decisions through history |
| Trace artifact lineage to sources |
| Issue tracking operations |
| Detect and fix skill hygiene issues |
| Convert skills to Codex/Cursor formats |
| Reinstall all AgentOps skills from latest source |
Knowledge Flywheel
Every
/post-mortem promotes learnings and patterns into .agents/ so future /research starts with better context instead of zero.
Runtime Modes
AgentOps has four runtime modes. Do not assume hook automation exists everywhere.
| Mode | When it applies | Start path | Closeout path | Guarantees |
|---|---|---|---|---|
| Gas City () binary available and present | gc controller manages sessions; auto-selects gc executor | gc event bus captures phase/gate/failure/metric events | Default when gc is available. Phase execution via gc sessions, events via gc event bus, agent health via gc health patrol |
| Claude/OpenCode with lifecycle hooks installed (no gc) | Runtime hook or / | Runtime hook or + | Automatic startup/context injection and session-end maintenance when hooks are installed |
| Codex CLI v0.115.0+ with native hook support (March 2026) | Runtime hooks (same as hook-capable) | Runtime hooks (same as hook-capable) | Native lifecycle hooks — same guarantees as hook-capable mode |
| Codex Desktop / Codex CLI pre-v0.115.0 without hook surfaces | | | Explicit startup context, citation tracking, transcript fallback, and close-loop metrics without hooks |
| No hooks and no Codex-native runtime detection | / | + | Works everywhere, but lifecycle actions are operator-driven |
Issue Tracking
This workflow uses beads for git-native issue tracking:
bd ready # Unblocked issues bd show <id> # Issue details bd close <id> # Close issue bd vc status # Inspect Dolt state if needed (JSONL auto-sync is automatic)
Examples
Startup Context Loading
Hook-capable runtimes
(or equivalent) can run at session start.session-start.sh- In
mode, MEMORY.md is auto-loaded and the hook points to on-demand retrieval (manual
,ao search
).ao lookup - In
mode, the hook extracts pending knowledge and injects prior learnings with a reduced token budget.lean - This skill can be injected automatically into session context.
Codex (v0.115.0+: native hooks, older: hookless fallback)
- v0.115.0+: hooks fire automatically — same behavior as hook-capable runtimes above.
- Pre-v0.115.0: run
explicitly, useao codex start
for citations, end withao lookup
.ao codex stop
Result: The agent gets the RPI workflow, prior context, and a citation path in all modes.
Workflow Reference During Planning
User says: "How should I approach this feature?"
What happens:
- Agent references this skill's RPI workflow section
- Agent recommends Research → Plan → Implement → Validate phases
- Agent suggests
for codebase exploration,/research
for decomposition/plan - Agent explains
for failure simulation before implementation/pre-mortem - User follows recommended workflow with agent guidance
Result: Agent provides structured workflow guidance based on this meta-skill, avoiding ad-hoc approaches.
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| Skill not auto-loaded | Hook runtime unavailable or startup path not run | Hook-capable runtimes: verify exists and is enabled. Codex: run explicitly |
| Outdated skill catalog | This file not synced with actual skills/ directory | Update skill list in this file after adding/removing skills |
| Wrong skill suggested | Natural language trigger ambiguous | User explicitly calls skill with syntax |
| Workflow unclear | RPI phases not well-documented here | Read full workflow guide in README.md or docs/ARCHITECTURE.md |