2026-02-21 19:41:50 -05:00
# ao CLI Reference
2026-04-05 09:15:27 -04:00
> Auto-generated by `scripts/generate-cli-reference.sh`.
2026-02-21 19:41:50 -05:00
> Do not edit manually. Re-run the script to update.
## Global Flags
--config string Config file (default: ~/.agentops/config.yaml)
--dry-run Show what would happen without executing
-h, --help help for ao
2026-02-24 05:29:34 -05:00
--json Output as JSON (shorthand for -o json)
2026-02-21 19:41:50 -05:00
-o, --output string Output format (json, table, yaml) (default "table")
-v, --verbose Enable verbose output
fix: critical audit findings remediation (epic soc-ab5g) (#279)
* fix(session): sanitize init-step exec and correct BEADS_ACTOR
Two defects in `ao session spawn` runInitSteps, from the 2026-05-16
codebase audit (epic soc-ab5g):
- BEADS_ACTOR was exported as the expanded command string of the first
init step instead of the session actor identity, so beads attribution
for every init step was garbage. Thread tmpl.Identity.BeadsActorTemplate
through runInitSteps and export the var only when non-empty.
- Init steps ran via raw exec.Command("bash","-c",...) (SEC-C1). Route
init-step exec through shellutil.SanitizedBashCommand and add
sanitizeHostname() to strip shell metacharacters from {{hostname}}-class
template vars before substitution.
New regression tests: TestRunInitStepsSetsBeadsActor, TestSanitizeHostname.
Refs: soc-jhxr
* fix(autodev): replace vague 'validation failed' with a concrete summary
outputAutodevValidateResult returned fmt.Errorf("validation failed")
after already printing the detailed INVALID/ERROR lines -- a redundant,
content-free wrapper. Return a summary naming the file and the
validation-error count instead (COPY-C1, epic soc-ab5g).
Refs: soc-mpzu
* docs(eval): strip internal Day-N cadence jargon from user-facing text
eval_task.go exposed internal sprint labels ("Day-2 placeholder",
"Day-3 wires real launch", "Day-4 gate #4") in command Long
descriptions and flag help. Reword to describe current behavior
without the internal cadence (COPY-C2, epic soc-ab5g).
Refs: soc-iy7p
* fix(cli): reject unknown subcommands on group commands
Group-parent commands (daemon, beads, codex, constraint, factory,
goals, hooks, ratchet, rpi, session) had no Args validator, so an
unknown subcommand printed help to stdout and exited 0 -- breaking
`if ao rpi <bad>; then ...` scripting. Add Args: cobra.NoArgs to all
ten; unknown subcommands now exit 1 with the error on stderr
(CLI-C1, epic soc-ab5g).
Refs: soc-mlqe
* docs(cli): regenerate COMMANDS.md after eval-task help copy edit
* fix(daemon): contain dream output_dir against path traversal
DreamRunJobSpec/DreamStageJobSpec/DreamStageManifest Validate() only
TrimSpace-checked output_dir, leaving the operator-supplied job payload
free to redirect summary/log writes outside the intended tree.
validateOutputDir now rejects ".." traversal in all three Validate()
paths; outputDirContained rejects an absolute output_dir resolving
outside the daemon working tree, checked in DreamExecutor.RunJob before
MkdirAll. Containment checks: 1 (symlink only) → 3 (symlink + .. + abs).
Closes soc-ly33 (SEC-C2, epic soc-ab5g).
* fix(cli): wire ao --version flag and unify goals --json with -o
rootCmd had no Version field, so `ao --version` was unsupported even
though an `ao version` subcommand existed. Set rootCmd.Version = version
(the ldflags-injected build var) so the standard --version flag works.
goals registered its own local --json bool, disconnected from the
global -o/--output flag — `ao goals measure -o json` was ignored. Drop
goalsJSON; goalsJSONOutput() now reads GetOutput(), the sibling pattern
used by agentopsd.go, autodev.go, codex.go and ~40 other callsites. The
global --json persistent flag is inherited, so `ao goals --json` still
works; output paths honored by goals: 1 (local bool) → 2 (--json + -o).
Closes soc-nx1o (CLI-C2, epic soc-ab5g).
* perf(cli): collapse tmux probe storm in ao rpi status
checkTmuxSessionAlive forked `tmux has-session` up to 3 times per
non-terminal run, each with a 2s timeout — a status scan over N runs
issued 3N subprocesses and could stall ~6N seconds when tmux was slow
or absent.
probeTmuxSessions now runs one `tmux ls -F #{session_name}`, memoized
per process behind a mutex-guarded cache; tmuxSessionAlive filters the
snapshot in Go. resolveRPIToolchainDefaults collapses from per-run to
once. Subprocesses per status scan: 3N → 1.
Closes soc-d7v5 (PERF-C1, epic soc-ab5g). Mirrors the snapshot-then-
filter shape used elsewhere for batch probes.
* perf(cli): one-pass git capture + walk-once index in ao beads audit
ao beads audit re-shelled git per bead (one `git log --grep` per bead,
one `git log --since` per bead-path pair) and re-walked the worktree
per pattern (recordAuditStaleFinding probes up to 10 patterns/bead, so
up to 10N full-repo walks for N beads).
captureAuditCommits now runs a single `git log --all --name-only`,
parsed into auditCommit records; grepCommitsForID and
fileChangesSinceCommits filter that slice in Go. repoContentCache walks
the scoped roots once (lazily) and memoizes a path->content map shared
across every pattern probe. git subprocesses per audit: O(beads) → 1;
repo walks: O(10*beads) → 1. Mirrors the snapshot-then-filter shape
just applied to ao rpi status.
Closes soc-2grz (PERF-C2, epic soc-ab5g).
* fix(schemas): declare schema_version const in 15 unversioned schemas
15 of 34 schemas under schemas/ carried versioned filenames (or implied
a stable contract) without a machine-readable schema_version, so a
consumer could not detect the version from the payload alone.
Each now declares an optional schema_version integer const, mirroring
the shape in schemas/bead.v1.schema.json: const 1 for every schema
except skill-frontmatter.v2 (const 2). The field is intentionally left
out of "required" so existing documents without it still validate —
non-breaking. scenario.v1 keeps its legacy "version" field alongside.
Schemas declaring schema_version: 19/34 → 34/34.
Closes soc-wzgo (API-C2, epic soc-ab5g).
* docs(contracts): regenerate context-map after merging main
The merge of origin/main pulled a discovery SKILL.md description edit
without its companion context-map regeneration, so
validate-context-map-drift flagged 1 stale line. Regenerated via
scripts/generate-context-map.sh. Drifted lines: 1 → 0.
2026-05-16 11:05:36 -04:00
--version version for ao
2026-02-21 19:41:50 -05:00
---
## Commands
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao demo`
2026-02-21 19:41:50 -05:00
2026-05-10 22:55:50 -04:00
Run a demonstration of AgentOps as the engineering operating system
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao demo [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-05-10 22:55:50 -04:00
--concepts Explain product model
2026-02-21 19:41:50 -05:00
-h, --help help for demo
2026-05-10 22:55:50 -04:00
--quick 2-minute council-first overview
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao init`
2026-02-21 19:41:50 -05:00
feat(hookless)!: remove all hooks — skills + CLI only (soc-57b7f #remove-all-hooks) (#511)
## What
AgentOps 3.0 goes **fully hookless**. This removes the entire hook
product surface — the product is now skills + the `ao` CLI with **zero
hooks**. CI is the authoritative gate.
## Deleted
- `hooks/` — 46 hook scripts + `hooks.json` + examples (whole directory)
- `cli/embedded/hooks/` + embedded `hooks.json` +
`embedded/lib/hook-helpers.sh`
- `lib/hook-helpers.sh`
- `ao hooks` CLI command: `cli/cmd/ao/hooks.go`, `hooks_run.go` + 5 hook
test files; `cli/internal/bridge/hooks.go`;
`cli/internal/doctor/fix_hooks.go` + test
- Codex hook manifest (`hooks/codex-hooks.json`) + handler/audit scripts
(`scripts/audit-codex-hooks.sh`, `install-dev-hooks.sh`,
`test-hooks-output.sh`, `test-codex-hookless-lifecycle.sh`,
`test-hookless-rpi-phased.sh`)
- Hook lease surface: `docs/contracts/hook-lease-*`,
`schemas/hook-lease.v1.schema.json`,
`scripts/check-hook-lease-inventory.sh`,
`check-hook-port-replacements.sh`, `generate-hook-lease-inventory.py`
- Hook docs: `docs/HOOKS.md`, `cli/docs/HOOKS.md`,
`docs/architecture/hook-noise-audit.md`,
`docs/contracts/hook-runtime-contract.md`
- `tests/hooks/` (whole dir) + hook test scripts; 5 hook eval suites +
fixtures
## CI gates removed
`hook-preflight`, `validate-hooks-doc-parity`, `hook-output-schema-lint`
(+ scripts/bats), the hook eval suites, the `test-runtime-codex-smoke` /
`test-codex-native-install` / `test-codex-plugin-install` hook-handler
assertions, the cli-integration hook-lifecycle steps, the bats
`tests/hooks/*` glob + orphan-hooks audit, and the `--with-hooks`
install path. `embedded-sync` now validates only lib/skills. Both
summary `needs:` lists + the summary echo +
`docs/contracts/ci-jobs.yaml` updated; `validate-ci-policy-parity`
passes (66 rows). `.codex-plugin/plugin.json` drops the "Hooks"
capability.
## Load-bearing PRESERVED (reported, not forced)
- **`cli/cmd/ao/codex_runtime.go`** — the codex runtime *lifecycle
profile* (`HookCapable`/`HookConfigured` detection) is a
runtime-capability abstraction used by 6 `validate-codex-*` CI gates,
distinct from the hook product. Deleting it is a separate refactor.
- **`hooks-authoring` skill** + `schemas/hooks-manifest.v1.schema.json`
— reframed as an opt-in "author your own hooks" guide. Deleting the
skill cascades into catalog/domain-map/dispositions/context-map golden
files (skill-count sync), out of scope for the hook-product removal.
- **`scripts/pre-push-gate.sh`** — retired local gate (not in CI);
self-skips deleted hook scripts via `[[ -x ]]` guards; its 55 bats tests
still pass.
- Domain-enforcement audit keeps the `enforced`-mode schema for
backward-compatible JSON readers, but the hookless resolver only returns
`audited`/`unavailable`.
## Verification
`go build` / `go vet` clean; `go test ./...` = **11849 passed, 0
failed** (68 pkgs). gofmt clean on all touched files. Green: registry
`--check` (0 hooks), `regen-codex-hashes --check`,
`validate-ci-policy-parity`, `check-wiring-closure`,
`validate-embedded-sync`, `validate-manifests`, `validate-agents-split`,
`doc-release` (0 broken links), `generate-cli-reference --check`,
`heal.sh --strict`, codex/claude/plugin smoke tests, baseline-audit (0
stale). Diff: 231 files, +354 / −39803.
Closes-scenario: soc-57b7f#remove-all-hooks
Bounded-context: BC5-Runtime
Evidence: .github/workflows/validate.yml
2026-05-24 11:19:37 -04:00
Set up a repository for AgentOps: directories and gitignore.
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao init [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
feat(rip)!: kill schedule/plans/watch/overnight commands+engines — GC owns scheduling (soc-2rtm0 #kill-schedule-overnight wave3-4) (#514)
Wave 3+4 of the soc-2rtm0 orchestration-substrate rip. Operator
decision: **kill the schedule/plans/watch/overnight commands AND their
engines entirely** — GC owns all scheduling/overnight/watch; AgentOps
keeps only rpi/evolve/crank/swarm as loops.
## Killed (commands + engines)
- `cli/cmd/ao/`: `overnight*.go` (overnight, council, curator, packets,
setup, longhaul, daemon, tier1), `dream_subcycle.go`, `schedule.go`,
`watch.go`, `plans*.go` (+ all tests).
- `cli/internal/schedule/` — clean delete (only `schedule.go` +
`agentopsd.go` imported it).
- `cli/internal/overnight/` — the overnight engine, deleted whole.
- Daemon refs severed (daemon stays, wave 5): removed `agentopsd.go`
dream-executor + crash-recovery + `--schedule-file` loading; removed the
`dream` soak scenario.
- Removed `ao init --with-schedule` (seeded config for the now-dead
daemon scheduler).
- Retired the `dream` skill (claude + codex) to a GC-pointer stub.
## KEEP-feature severance (HARD CONSTRAINT)
- **harvest** (KEEP): lock helpers
(`LockIsStale`/`ReadLockPID`/`ProcessAlive`/`WriteLockPID`)
**extracted** from `overnight/recovery.go` into new
`cli/internal/lockfile` package; `harvest.go` repointed. Generic
process-lock machinery, not overnight-specific.
- **forge** (KEEP): `writeJSONAtomic` + `buildCuratorID` + curator-queue
types **extracted** into `cli/cmd/ao/forge_curator_id.go`; forge
curator-queue enqueue path preserved.
- **evolve** (KEEP): the `--dream-first`/`--dream-only` Phase-1 dream
sub-cycle was **severed** (capability genuinely overnight/dream-only).
**LOST CAPABILITY** — flagged below.
- `forge/runmine.go` + `wiki/artifact.go` only referenced overnight in
comments (no real import) — untouched.
## CI gates / docs / fixtures reconciled
- Removed `dream-end-user-coverage` GOALS gate +
`scripts/check-schedule-example.sh` + `schedule.yaml.example` +
`goals-affects-files.yaml` entry; updated GOALS Directive #8.
- Fixed `cli-command-surface` canary: heading counts 72/194/266 →
68/179/247, dropped deleted `plans.go` artifact check.
- Deleted `dream-software-factory-operator` eval; dropped deleted
`plans.go` check from `session-continuity-context` eval.
- Regenerated `COMMANDS.md`, `cli-skills-map.md`, `registry.json`;
regenerated codex hashes.
- No dedicated validate.yml/ci-jobs.yaml job existed for these surfaces
(verified) — `validate-ci-policy-parity` stays PASS.
## Lost capability (flagged)
- `ao evolve --dream-first` / `--dream-only` (run the
knowledge-compounding dream loop before/instead of code cycles) is gone.
Knowledge compounding now runs out-of-session via GC. The nightly-CI
dream-cycle proof job (built on KEEP harvest/forge/inject/defrag
primitives) is unaffected.
## Verification (all green)
`cd cli && gofmt -l` clean · `go build ./...` · `go vet ./...` · `go
test ./...` (zero FAIL) · `tests/smoke-test.sh` ·
`tests/cli/test-json-flag-consistency.sh` (0 errors) ·
`scripts/test-agentops-contract-canaries.sh` (**failures=0**) ·
doc-release gate · `heal --strict` clean · skill-lint · codex parity ·
ci-policy-parity.
## Follow-up (out of scope, build-green-safe to defer)
Narrative docs (`docs/scheduling.md`, `docs/ARCHITECTURE.md`,
comparisons, etc.) still mention the killed `ao overnight`/`ao schedule`
commands in prose. No CI gate validates ao-subcommand existence in
narrative docs, so these do not block; a doc-sweep is a separate
follow-up.
Closes-scenario: soc-2rtm0#cascade-rip
Bounded-context: BC5-Runtime
Evidence: .agents/discovery/2026-05-24-rip-caller-map.md
2026-05-24 14:56:20 -04:00
-h, --help help for init
--stealth Use .git/info/exclude instead of .gitignore
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao quick-start`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Initialize AgentOps in your current project.
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao quick-start [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
quick-start, quickstart
```
2026-02-21 19:41:50 -05:00
**Flags: **
```
2026-02-23 12:32:23 -05:00
-h, --help help for quick-start
--minimal Minimal setup (just directories)
--no-beads Skip beads initialization
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao seed`
fix: resolve 32 vibe findings (2 critical, 7 high, 12 medium, 11 low)
Fix all findings from the v2.17.0..HEAD vibe review across 12 source files:
Critical: panic guards for negative budget in truncateToCharBudget and
dead prefix slice in generateArtifactID. High: bead override in batch
extract, json file counting in metrics, constraint index.json exclusion,
complexity reduction in curate status/verify (38→<25), flexible hook
script count assertion. Medium: truncate panic guards, error logging for
silent failures, null→[] JSON output, goals auto-detect (GOALS.md then
GOALS.yaml), raw var→getter usage, truncate-before-lock race fix. Low:
scanner.Err() checks, os.Stdout→cmd.OutOrStdout(), dry-run output
differentiation.
Docs: 5 missing INDEX.md concept links, curation-pipeline v1 status
callout. Tests: new TestSeed_DryRun_JSON. Regen: COMMANDS.md, embedded
hooks synced. All gates pass: build, vet, test, gocyclo, heal, doc-gate.
2026-02-24 16:51:26 -05:00
Plant the AgentOps seed in any repository.
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao seed [path] [flags]
fix: resolve 32 vibe findings (2 critical, 7 high, 12 medium, 11 low)
Fix all findings from the v2.17.0..HEAD vibe review across 12 source files:
Critical: panic guards for negative budget in truncateToCharBudget and
dead prefix slice in generateArtifactID. High: bead override in batch
extract, json file counting in metrics, constraint index.json exclusion,
complexity reduction in curate status/verify (38→<25), flexible hook
script count assertion. Medium: truncate panic guards, error logging for
silent failures, null→[] JSON output, goals auto-detect (GOALS.md then
GOALS.yaml), raw var→getter usage, truncate-before-lock race fix. Low:
scanner.Err() checks, os.Stdout→cmd.OutOrStdout(), dry-run output
differentiation.
Docs: 5 missing INDEX.md concept links, curation-pipeline v1 status
callout. Tests: new TestSeed_DryRun_JSON. Regen: COMMANDS.md, embedded
hooks synced. All gates pass: build, vet, test, gocyclo, heal, doc-gate.
2026-02-24 16:51:26 -05:00
```
**Flags: **
```
--force Overwrite existing seed files
-h, --help help for seed
--template string Goal template: go-cli, python-lib, web-app, rust-cli, generic (default: auto-detect)
```
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao anti-patterns`
2026-02-21 19:41:50 -05:00
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
List learnings that have been marked as anti-patterns.
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao anti-patterns [flags]
2026-02-21 19:41:50 -05:00
```
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao badge`
2026-02-26 05:48:41 -05:00
Display a visual badge showing knowledge flywheel health status.
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao badge [flags]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
2026-05-17 00:35:28 -04:00
### `ao capabilities`
Print the machine-readable contract for the whole ao CLI as JSON.
```
ao capabilities [flags]
```
---
feat(cli): ao ci latest/recent — slice 2 of soc-y5vh.5 (productionCIStatus exposed)
Cycle 145 ships the second slice of soc-y5vh.5: 'ao ci' command
group with two subcommands wired through productionCIStatus
(cycle 117 adapter). Mirrors cycle 144's 'ao loop history' shape.
New subcommands:
- ao ci latest <sha> — most recent CI run for the given commit;
emits empty when no run exists
- ao ci recent --limit N — last N runs (any sha; default 10, cap 50)
Wraps the cycle-117 adapter which itself wraps 'gh run list --json
...'. Output is line-delimited JSON, one CIRun per line — composable
with jq, awk, grep.
New files:
- cli/cmd/ao/ci.go (138 lines) — ciCmd parent + ciLatestCmd +
ciRecentCmd; ciStatusOptions struct with injectable statusFn
for tests (mirrors cycle 117's runGH pattern and cycle 144's
historyFn).
- cli/cmd/ao/ci_test.go (4 tests) — stub-based: latest emits 1
run, latest empty emits 0 lines, recent emits multiple, errors
wrapped with "ci status:" prefix.
cli/docs/COMMANDS.md regenerated.
Pattern reused from cycle 144:
- Parent cmd as a noun (loop, ci); subcommands as verbs (history,
latest/recent)
- Injectable function field for test stubs (so tests don't need
real gh or temp dirs)
- Line-delimited JSON output for shell-script composability
soc-y5vh.5 progress: 2 of 3 slices shipped (LoopReader + CIStatus).
Remaining: ao corpus inject via productionCorpusReader (cycle 112).
After slice 3 closes, soc-y5vh.1/.2/.4 unblock.
Cycle 145 / soc-y5vh.5 slice-2-of-3 mode.
2026-05-12 21:21:13 -04:00
### `ao ci`
Operations on CI run history via the typed BC2 CIStatusPort. The 'latest' subcommand wraps 'gh run list --commit <sha>' through productionCIStatus; 'recent' wraps the unbound-by-sha variant.
```
ao ci [command]
```
**Subcommands: **
#### `ao ci latest`
Get the most recent CI run for a given commit SHA via the typed
```
ao ci latest <sha> [flags]
```
#### `ao ci recent`
List recent CI runs (any SHA) via productionCIStatus. Default
```
ao ci recent [flags]
```
**Flags: **
```
-h, --help help for recent
--limit int max runs to emit (0 = all up to port cap of 50) (default 10)
```
---
feat(cli): ao citation verify — 9th adapter CLI-exposed (BC1 round-trip)
Cycle 153 applies the cycle-147 template to a 9th adapter:
productionCitationAdapter (cycle 83 — the original first wire-up
adapter from the BC ports arc). Verifies file/function/symbol
citations against HEAD.
New surface:
ao citation verify --kind <file|function|symbol> --raw <text>
Wraps productionCitationAdapter — which in turn wraps the existing
verifyFileCitation / verifyFunctionCitation / verifySymbolCitation
helpers in beads.go. Output is JSON CitationVerdict (Status, Reason,
optional Resolved).
Live smoke verified both directions:
$ ao citation verify --kind file --raw "cli/cmd/ao/beads.go"
{"Status":"FRESH","Reason":"file exists at HEAD","Resolved":""}
$ ao citation verify --kind file --raw "this/file/does/not/exist.go"
{"Status":"STALE","Reason":"file this/file/does/not/exist.go not found at HEAD","Resolved":""}
Template adherence vs cycle-147 spec: ✓. 6 tests covering:
empty kind/raw rejected, FRESH/STALE/UNKNOWN status passthrough,
error wrapping.
New files:
- cli/cmd/ao/citation_cmd.go (107 lines) — citationCmd parent +
citationVerifyCmd. Resolves cwd via resolveProjectDir; passes
to the port as Cwd field.
- cli/cmd/ao/citation_cmd_test.go (104 lines) — 6 tests using
injectable verifyFn.
cli/docs/COMMANDS.md regenerated.
9 of 14 production adapters now CLI-exposed (~64%):
loop history/append + ci latest/recent + corpus inject/capture +
operator record/list + harness status + gate run + citation verify.
5 remain (ClaimEvidenceBinder, FactoryAdmission, ClaimEvidence,
EventBus, FindingCompiler).
Time: ~8 min. LOC: 211. Tests: 6. Within template band.
Symbolic milestone: this exposes the FIRST production adapter that
shipped in the wire-up arc (cycle 83 productionCitationAdapter).
The cycle-122 wire-up-arc learning's named gap is now fully closed
for that pioneer adapter — typed verification reachable from the
CLI 70 cycles after the adapter shipped.
Cycle 153 / template-applied CLI-wiring 6th application.
2026-05-12 21:38:30 -04:00
### `ao citation`
Verify citation freshness via the typed BC1 CitationPort. Useful for cross-repo citation auditing and dream-loop staleness checks.
```
ao citation [command]
```
**Subcommands: **
#### `ao citation verify`
Verify a single citation (file, function, or symbol) against HEAD
```
ao citation verify --kind <file|function|symbol> --raw <text> [flags]
```
**Flags: **
```
-h, --help help for verify
--kind string citation kind (required: file|function|symbol)
--raw string citation text to verify (required)
```
---
feat(cli): ao claim bind/list — 10th adapter CLI-exposed
Cycle 154 applies the cycle-147 template to a 10th adapter:
productionClaimEvidenceBinder (cycle 116). Provides typed CLI for
the claim→evidence promotion ledger.
New surface:
ao claim bind --claim AOP-CLAIM-X --path p.md --level PG2 [--anchor ...]
ao claim list
Wraps productionClaimEvidenceBinder — appends EvidenceBinding records
to .agents/findings/evidence-bindings.jsonl with upgrade-only Level
enforcement (per the port contract; downgrade attempts return an
error surfaced through 'claim bind:' wrapping).
Template adherence vs cycle-147 spec: ✓. Two new nuances:
- Level validation (PG1-PG4) at the CLI layer via
validateEvidenceLevelString helper. Catches typos before they
reach the port.
- Default --level=PG1 via cobra default flag, so 'ao claim bind
--claim X --path Y' is valid for first-time bindings.
New files:
- cli/cmd/ao/claim_cmd.go (170 lines) — claimCmd parent +
claimBindCmd + claimListCmd + level validator + path resolver.
Both ops share claimOptions struct + injectable bindFn / listFn.
- cli/cmd/ao/claim_cmd_test.go (115 lines) — 8 tests covering
empty claim/path rejection, invalid level rejection, stub called
with binding, default PG1 accepted, error wrapping, list returns
bindings, empty list zero bytes.
cli/docs/COMMANDS.md regenerated.
10 of 14 production adapters now CLI-exposed (~71%):
loop history/append + ci latest/recent + corpus inject/capture +
operator record/list + harness status + gate run + citation verify
+ claim bind/list.
4 remain (FactoryAdmission, ClaimEvidence, EventBus, FindingCompiler).
Time: ~9 min. LOC: 285. Tests: 8. Within template band.
Cycle 154 / template-applied CLI-wiring 7th application.
2026-05-12 21:41:05 -04:00
### `ao claim`
Bind claims to evidence files at a promotion level (PG1-PG4) and list existing bindings, via the typed BC2 ClaimEvidenceBinderPort.
```
ao claim [command]
```
**Subcommands: **
#### `ao claim bind`
Append (or upgrade) a claim→evidence binding via the typed BC2
```
ao claim bind --claim <AOP-CLAIM-X> --path <evidence-path> [--level PG1|PG2|PG3|PG4] [--anchor ...] [flags]
```
**Flags: **
```
--anchor stringArray optional in-file anchors (repeatable)
--claim string claim ID (required, e.g. AOP-CLAIM-X)
-h, --help help for bind
--level string promotion level: PG1|PG2|PG3|PG4 (default "PG1")
--path string evidence file path (required, relative to repo root)
```
#### `ao claim list`
Emit all known claim→evidence bindings via the typed BC2 ClaimEvidenceBinderPort. Output is line-delimited JSON.
```
ao claim list [flags]
```
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao constraint`
2026-02-26 05:48:41 -05:00
2026-03-09 21:37:20 -04:00
Manage constraints compiled from promoted findings.
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao constraint [command]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
#### `ao constraint activate`
2026-02-26 05:48:41 -05:00
Change constraint status from draft to active
```
2026-02-26 06:42:03 -05:00
ao constraint activate <id> [flags]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao constraint list`
2026-02-26 05:48:41 -05:00
List all constraints with status
```
2026-02-26 06:42:03 -05:00
ao constraint list [flags]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao constraint retire`
2026-02-26 05:48:41 -05:00
Change constraint status from active to retired
```
2026-02-26 06:42:03 -05:00
ao constraint retire <id> [flags]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao constraint review`
2026-02-26 05:48:41 -05:00
List constraints compiled >90 days ago without recent citation
```
2026-02-26 06:42:03 -05:00
ao constraint review [flags]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao contradict`
2026-02-26 05:48:41 -05:00
Scan learnings and patterns for potential contradictions using keyword overlap heuristics.
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao contradict [flags]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao curate`
2026-02-26 05:48:41 -05:00
Curate manages the knowledge curation pipeline: catalog artifacts,
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao curate [command]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
#### `ao curate catalog`
2026-02-26 05:48:41 -05:00
Catalog a knowledge artifact
```
2026-02-26 06:42:03 -05:00
ao curate catalog <path> [flags]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao curate status`
2026-02-26 05:48:41 -05:00
Show curation pipeline status
```
2026-02-26 06:42:03 -05:00
ao curate status [flags]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao curate verify`
2026-02-26 05:48:41 -05:00
Verify gate health against baselines
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao curate verify [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-02-26 05:48:41 -05:00
-h, --help help for verify
--since string Filter to changes within duration (e.g. 24h, 7d)
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao dedup`
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
Scan learnings and patterns for near-duplicates using normalized content hashing.
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao dedup [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-02-26 05:48:41 -05:00
-h, --help help for dedup
--merge Auto-resolve duplicates: keep highest utility, archive the rest
2026-05-01 10:30:44 -04:00
--yes Skip the interactive confirmation prompt for large merges (for hooks/CI)
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao doctor`
Run health checks on your AgentOps installation.
```
feat(doctor): wire diagnose-and-repair subcommands into the ao CLI
Adds the doctor engine surface to the existing doctorCmd: subcommands
fix, undo, explain, capabilities, health, robot-docs, gc, ls, diff, plus
the additive flags --fix/--dry-run/--only/--skip/--since/--online/
--quick/--severity/--robot/--robot-triage/--explain.
Exit codes route through a typed doctorExitError that Execute() maps to
os.Exit via errors.As — mirrors the AgentsLintError pattern already in
root.go, no parallel exit mechanism.
Backward compatible: bare `ao doctor` and `ao doctor --json` keep the
legacy 17-line check table and checks JSON array unchanged. With the
empty registry the engine adds 0 findings, so the bare command's exit
semantics (0 → 1 on required failure) are untouched. CLI reference docs
regenerated for the 9 new subcommands.
2026-05-16 09:09:50 -04:00
ao doctor [command]
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
```
**Flags: **
```
feat(doctor): wire diagnose-and-repair subcommands into the ao CLI
Adds the doctor engine surface to the existing doctorCmd: subcommands
fix, undo, explain, capabilities, health, robot-docs, gc, ls, diff, plus
the additive flags --fix/--dry-run/--only/--skip/--since/--online/
--quick/--severity/--robot/--robot-triage/--explain.
Exit codes route through a typed doctorExitError that Execute() maps to
os.Exit via errors.As — mirrors the AgentsLintError pattern already in
root.go, no parallel exit mechanism.
Backward compatible: bare `ao doctor` and `ao doctor --json` keep the
legacy 17-line check table and checks JSON array unchanged. With the
empty registry the engine adds 0 findings, so the bare command's exit
semantics (0 → 1 on required failure) are untouched. CLI reference docs
regenerated for the 9 new subcommands.
2026-05-16 09:09:50 -04:00
--dry-run With --fix: print the plan, change nothing
--explain string Expand a single finding by id
--fix Apply fixers for findings (routes through mutate())
2026-04-29 13:48:51 -04:00
-h, --help help for doctor
--json Output results as JSON
feat(doctor): wire diagnose-and-repair subcommands into the ao CLI
Adds the doctor engine surface to the existing doctorCmd: subcommands
fix, undo, explain, capabilities, health, robot-docs, gc, ls, diff, plus
the additive flags --fix/--dry-run/--only/--skip/--since/--online/
--quick/--severity/--robot/--robot-triage/--explain.
Exit codes route through a typed doctorExitError that Execute() maps to
os.Exit via errors.As — mirrors the AgentsLintError pattern already in
root.go, no parallel exit mechanism.
Backward compatible: bare `ao doctor` and `ao doctor --json` keep the
legacy 17-line check table and checks JSON array unchanged. With the
empty registry the engine adds 0 findings, so the bare command's exit
semantics (0 → 1 on required failure) are untouched. CLI reference docs
regenerated for the 9 new subcommands.
2026-05-16 09:09:50 -04:00
--online Enable network probes (default: offline-only)
--only strings Scope to a subset of detectors or subsystems
--quick Run only fast-path detectors (< 200ms)
--robot Alias for --json with structured wrapper
--robot-triage Emit the mega-command triage JSON
--severity string Minimum severity to emit (P0|P1|P2|P3) (default "P3")
--since string Diff findings against an earlier run
--skip strings Inverse of --only
```
**Subcommands: **
#### `ao doctor capabilities`
Print the machine-readable doctor contract (JSON)
```
ao doctor capabilities [flags]
```
#### `ao doctor diff`
Show what --fix would change (read-only)
```
ao doctor diff [flags]
```
#### `ao doctor explain`
Expand a single finding with full evidence
```
ao doctor explain <finding-id> [flags]
```
#### `ao doctor fix`
Run detectors, then apply fixers (backs up before every mutation)
```
ao doctor fix [flags]
```
#### `ao doctor gc`
Prune old runs (requires --yes and --before <date>)
```
ao doctor gc [flags]
```
**Flags: **
```
--before string Prune runs started before this date (YYYY-MM-DD)
-h, --help help for gc
--yes Confirm pruning (required)
```
#### `ao doctor health`
Cheap one-line liveness summary
```
ao doctor health [flags]
```
#### `ao doctor ls`
List runs in .doctor/runs/
```
ao doctor ls [flags]
```
#### `ao doctor robot-docs`
Print the paste-ready agent handbook (Markdown)
```
ao doctor robot-docs [flags]
```
#### `ao doctor undo`
Restore from .doctor/runs/<run-id>/backups/ (run-id may be 'latest')
```
ao doctor undo <run-id> [flags]
```
**Flags: **
```
--dry-run Print the restore plan; do not execute
-h, --help help for undo
--strict Refuse if any backup is missing or hash-mismatched (default true)
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
```
---
### `ao flywheel`
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
Knowledge flywheel operations and status.
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao flywheel [command]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
#### `ao flywheel close-loop`
2026-02-26 05:48:41 -05:00
Close the knowledge flywheel loop by chaining:
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao flywheel close-loop [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-02-26 05:48:41 -05:00
-h, --help help for close-loop
--pending-dir string Pending directory to ingest from (default ".agents/knowledge/pending")
--quiet Suppress non-essential output (hook-friendly)
--threshold string Minimum age for auto-promotion (default: 24h) (default "24h")
2026-02-21 19:41:50 -05:00
```
2026-04-05 09:15:27 -04:00
#### `ao flywheel compare`
Compare retrieval quality between primary and shadow namespaces.
```
ao flywheel compare [flags]
```
**Flags: **
```
-h, --help help for compare
--shadow string Shadow namespace to compare against primary (default "shadow")
```
2026-04-05 10:30:41 -04:00
#### `ao flywheel gate`
Check the post-structural readiness gate before retrieval-expansion work.
```
ao flywheel gate [flags]
```
**Flags: **
```
--corpus string Benchmark corpus directory (defaults to repo testdata)
-h, --help help for gate
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao flywheel nudge`
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
Returns structured JSON combining:
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
```
2026-02-26 06:42:03 -05:00
ao flywheel nudge [flags]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao flywheel status`
2026-02-26 05:48:41 -05:00
Display comprehensive flywheel health status.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao flywheel status [flags]
2026-02-21 19:41:50 -05:00
```
2026-02-26 05:48:41 -05:00
**Flags: **
```
2026-04-05 09:15:27 -04:00
--days int Period in days for metrics calculation (default 7)
-h, --help help for status
--namespace string Citation namespace to evaluate (primary by default) (default "primary")
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao gate`
2026-02-26 05:48:41 -05:00
Manage human review gates for bronze-tier candidates.
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao gate [command]
2026-02-26 05:48:41 -05:00
```
2026-02-21 19:41:50 -05:00
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
#### `ao gate approve`
2026-02-21 19:41:50 -05:00
Approve a bronze-tier candidate for promotion.
```
2026-02-26 06:42:03 -05:00
ao gate approve <candidate-id> [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
-h, --help help for approve
--note string Optional approval note
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao gate bulk-approve`
2026-02-21 19:41:50 -05:00
Approve all silver-tier candidates older than a threshold.
```
2026-02-26 06:42:03 -05:00
ao gate bulk-approve [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
-h, --help help for bulk-approve
--older-than string Age threshold for bulk approval (default "24h")
--tier string Tier to bulk approve (default: silver) (default "silver")
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao gate pending`
2026-02-21 19:41:50 -05:00
List bronze-tier candidates awaiting human review.
```
2026-02-26 06:42:03 -05:00
ao gate pending [flags]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao gate reject`
2026-02-21 19:41:50 -05:00
Reject a candidate with a required reason.
```
2026-02-26 06:42:03 -05:00
ao gate reject <candidate-id> [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
-h, --help help for reject
--reason string Required rejection reason
```
2026-05-12 21:32:01 -04:00
#### `ao gate run`
Invoke a check-*.sh gate via the typed BC2 GateRunnerPort
```
ao gate run <name> [flags]
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
2026-05-12 21:29:50 -04:00
### `ao harness`
Inspect the sync state between the canonical skills/ tree and the skills-codex/ mirror via the typed BC5 HarnessPort. Useful as a typed alternative to scripts/audit-codex-parity.sh for drift detection.
```
ao harness [command]
```
**Subcommands: **
#### `ao harness status`
Emit HarnessSkillSync entries via the typed BC5 HarnessPort
```
ao harness status [--skill <name>] [--out-of-sync-only] [flags]
```
**Flags: **
```
-h, --help help for status
--out-of-sync-only emit only entries with OutOfSync=true
--skill string filter to one skill name (empty = all)
```
---
feat(cli): ao loop history — first ao subcommand wired through a production adapter (soc-y5vh.5 slice 1)
Cycle 144 ships the first slice of soc-y5vh.5: the new 'ao loop'
command group with 'ao loop history' as its first subcommand. This
is the first cobra command that exposes a production port adapter
(productionLoopReader, cycle 108) to the operator surface.
Why this matters: cycle 143 audit found that all 14 production
adapters were internal-only — no CLI surface invoked them outside
tests. This was the latent-value problem from cycle 122's wire-up
learning. soc-y5vh.5 (cycle 143 filed) was the operator surface
that closes that loop. This commit ships the first 1 of 3 planned
subcommands.
New files:
- cli/cmd/ao/loop.go (130 lines) — loopCmd + loopHistoryCmd. Three
ways to query the history:
--latest emit only the most recent entry
--limit N emit at most N most-recent
--start S --end E emit cycles S..E inclusive
Output is line-delimited JSON (one CycleEntry per line). Wired
through productionLoopReader (cycle 108) reading
.agents/evolve/cycle-history.jsonl.
- cli/cmd/ao/loop_test.go (6 tests) — temp-dir fixtures, latest +
limit + range slicing, missing-file empty output, injectable
historyFn for test stubs, error wrapping.
Verified end-to-end against this session's actual cycle-history.jsonl:
$ cli/bin/ao loop history --latest
{"Number":143,"Mode":"prerequisite-audit-and-bd-decomposition",
"Result":"improved",...}
cli/docs/COMMANDS.md regenerated via scripts/generate-cli-reference.sh.
Anti-pattern caught (cycle-126 lesson, applied to a name collision):
- Initial helper named `loadCycleHistory` collided with an existing
function of the same name in cli/cmd/ao/metrics_health.go. go vet
caught it; renamed mine to `loadCycleHistoryViaPort`. Grep BEFORE
naming helpers in cli/cmd/ao/ — the package is large and
collisions are easy.
Future slices of soc-y5vh.5:
- ao corpus inject (productionCorpusReader, cycle 112)
- ao ci latest <sha> (productionCIStatus, cycle 117)
- Each is a separate cycle; same shape as this one (cobra add +
thin wrapper + tests + COMMANDS.md regen).
Cycle 144 / soc-y5vh.5 slice-1-of-3 mode.
2026-05-12 21:18:59 -04:00
### `ao loop`
Operations on the /evolve cycle history and related Loop bounded-context state. The 'history' subcommand reads .agents/evolve/cycle-history.jsonl via the typed BC3 LoopReaderPort.
```
ao loop [command]
```
**Subcommands: **
feat(cli): ao loop append — 8th adapter; BC3 R/W pair complete on CLI
Cycle 152 applies the cycle-147 template to an 8th adapter:
productionLoopWriter (cycle 109). Closes the BC3 LoopReader+Writer
pair on the CLI side (cycle 144 already shipped 'ao loop history'
for the reader).
New surface:
ao loop append --mode <m> --result <r> [--cycle N] [--commit C] [--milestone M]
Wraps productionLoopWriter. Required: --mode, --result. Optional:
--cycle (0 = auto-assign max+1 per port contract), --commit,
--milestone. Output: 'appended cycle=N mode="X" result="Y"'.
Template adherence vs cycle-147 spec: ✓. Pattern reused exactly
from cycle 148 (operator record) — write-side adapters with
multiple required flags + cobra MarkFlagRequired + injectable
appendFn.
New files:
- cli/cmd/ao/loop_append.go (107 lines) — loopAppendCmd added
under existing loopCmd (cycle 144 parent). 5 flags, injectable
appendFn, mkdir-parent for safety.
- cli/cmd/ao/loop_append_test.go (101 lines) — 5 tests: empty
mode/result rejected, stub called with full entry, auto-assigns
cycle when 0, error wrapped.
cli/docs/COMMANDS.md regenerated.
Pair complete:
ao loop history (LoopReader, cycle 144)
ao loop append (LoopWriter, cycle 152)
8 of 14 production adapters now CLI-exposed (~57%):
loop history/append + ci latest/recent + corpus inject/capture +
operator record/list + harness status + gate run.
6 adapters remain unexposed (Citation, ClaimEvidenceBinder,
FactoryAdmission, ClaimEvidence, EventBus, FindingCompiler).
Time: ~8 min. LOC: 208. Tests: 5. Squarely in template band.
5 consecutive template applications (148-149-150-151-152), 4 of
them mirroring the BC pair-completion shape (BC1 R/W in cycle 146+
151; BC3 R/W in cycle 144 + this).
Cycle 152 / template-applied CLI-wiring 5th application.
2026-05-12 21:36:18 -04:00
#### `ao loop append`
Append a new entry to .agents/evolve/cycle-history.jsonl via the
```
ao loop append --mode <m> --result <r> [flags]
```
**Flags: **
```
2026-05-16 10:25:08 -04:00
--commit string git commit SHA (optional)
--cycle int cycle number (0 = auto-assign max+1)
-h, --help help for append
--milestone string milestone note (optional)
--mode string cycle mode (required)
--result string cycle result: improved|harvested|unchanged|idle (required)
--trace-json string XP/BDD/TDD evidence trace as a JSON object — a file path or inline JSON (optional)
feat(cli): ao loop append — 8th adapter; BC3 R/W pair complete on CLI
Cycle 152 applies the cycle-147 template to an 8th adapter:
productionLoopWriter (cycle 109). Closes the BC3 LoopReader+Writer
pair on the CLI side (cycle 144 already shipped 'ao loop history'
for the reader).
New surface:
ao loop append --mode <m> --result <r> [--cycle N] [--commit C] [--milestone M]
Wraps productionLoopWriter. Required: --mode, --result. Optional:
--cycle (0 = auto-assign max+1 per port contract), --commit,
--milestone. Output: 'appended cycle=N mode="X" result="Y"'.
Template adherence vs cycle-147 spec: ✓. Pattern reused exactly
from cycle 148 (operator record) — write-side adapters with
multiple required flags + cobra MarkFlagRequired + injectable
appendFn.
New files:
- cli/cmd/ao/loop_append.go (107 lines) — loopAppendCmd added
under existing loopCmd (cycle 144 parent). 5 flags, injectable
appendFn, mkdir-parent for safety.
- cli/cmd/ao/loop_append_test.go (101 lines) — 5 tests: empty
mode/result rejected, stub called with full entry, auto-assigns
cycle when 0, error wrapped.
cli/docs/COMMANDS.md regenerated.
Pair complete:
ao loop history (LoopReader, cycle 144)
ao loop append (LoopWriter, cycle 152)
8 of 14 production adapters now CLI-exposed (~57%):
loop history/append + ci latest/recent + corpus inject/capture +
operator record/list + harness status + gate run.
6 adapters remain unexposed (Citation, ClaimEvidenceBinder,
FactoryAdmission, ClaimEvidence, EventBus, FindingCompiler).
Time: ~8 min. LOC: 208. Tests: 5. Squarely in template band.
5 consecutive template applications (148-149-150-151-152), 4 of
them mirroring the BC pair-completion shape (BC1 R/W in cycle 146+
151; BC3 R/W in cycle 144 + this).
Cycle 152 / template-applied CLI-wiring 5th application.
2026-05-12 21:36:18 -04:00
```
feat(loop): expose HypothesisLedgerPort + ConvergenceCheckPort via ao loop
Follows the ao loop append/history wiring shape (loop_append.go): each
command pairs an options struct with an injectable *Fn seam and a
*ViaPort production path.
- ao loop hypothesis {list,append} — typed BC3 HypothesisLedgerPort
surface over .agents/evolve/hypotheses.jsonl (productionHypothesisLedger,
soc-y5vh.6). append rejects empty/duplicate IDs; list emits one JSON
HypothesisRecord per line.
- ao loop converged — pure BC3 ConvergenceCheckPort STOP predicate
(productionConvergenceCheck, soc-y5vh.7). Takes caller-supplied
evidence (green streak, unconsumed HIGH+MEDIUM, fitness-baseline),
emits {converged, ci_green_streak, ..., reasons}.
- evolve docs (SKILL.md + convergence-mechanics.md) reference the new
typed path instead of direct hypotheses/session-convergence reads.
- Cross-harness parity: ported convergence-mechanics.md into the codex
evolve skill (was 9/19 reference files, now 10/19), harness-adapted
(Step 7 while-loop STOP vs ScheduleWakeup). Broader evolve drift
tracked in soc-an3v.
- CLI docs regenerated; cd cli go build/vet/test ./... green
(11921 tests, 53 packages).
Tests: LoopConverged 5 cases (converged + each unmet reason + observed
streak), LoopHypothesis 4 cases (empty-id reject, stub mapping, JSONL
render, append->list round-trip).
Closes soc-y5vh.8
2026-05-16 10:56:23 -04:00
#### `ao loop converged`
Evaluate the evolve loop's convergence STOP predicate via the typed
```
ao loop converged [flags]
```
**Flags: **
```
--fitness-baseline a fitness baseline artifact has been captured
--green-streak int current leading green CI streak (caller-supplied evidence)
-h, --help help for converged
--unconsumed-high-medium int current unconsumed HIGH+MEDIUM finding count
```
feat(cli): ao loop history — first ao subcommand wired through a production adapter (soc-y5vh.5 slice 1)
Cycle 144 ships the first slice of soc-y5vh.5: the new 'ao loop'
command group with 'ao loop history' as its first subcommand. This
is the first cobra command that exposes a production port adapter
(productionLoopReader, cycle 108) to the operator surface.
Why this matters: cycle 143 audit found that all 14 production
adapters were internal-only — no CLI surface invoked them outside
tests. This was the latent-value problem from cycle 122's wire-up
learning. soc-y5vh.5 (cycle 143 filed) was the operator surface
that closes that loop. This commit ships the first 1 of 3 planned
subcommands.
New files:
- cli/cmd/ao/loop.go (130 lines) — loopCmd + loopHistoryCmd. Three
ways to query the history:
--latest emit only the most recent entry
--limit N emit at most N most-recent
--start S --end E emit cycles S..E inclusive
Output is line-delimited JSON (one CycleEntry per line). Wired
through productionLoopReader (cycle 108) reading
.agents/evolve/cycle-history.jsonl.
- cli/cmd/ao/loop_test.go (6 tests) — temp-dir fixtures, latest +
limit + range slicing, missing-file empty output, injectable
historyFn for test stubs, error wrapping.
Verified end-to-end against this session's actual cycle-history.jsonl:
$ cli/bin/ao loop history --latest
{"Number":143,"Mode":"prerequisite-audit-and-bd-decomposition",
"Result":"improved",...}
cli/docs/COMMANDS.md regenerated via scripts/generate-cli-reference.sh.
Anti-pattern caught (cycle-126 lesson, applied to a name collision):
- Initial helper named `loadCycleHistory` collided with an existing
function of the same name in cli/cmd/ao/metrics_health.go. go vet
caught it; renamed mine to `loadCycleHistoryViaPort`. Grep BEFORE
naming helpers in cli/cmd/ao/ — the package is large and
collisions are easy.
Future slices of soc-y5vh.5:
- ao corpus inject (productionCorpusReader, cycle 112)
- ao ci latest <sha> (productionCIStatus, cycle 117)
- Each is a separate cycle; same shape as this one (cobra add +
thin wrapper + tests + COMMANDS.md regen).
Cycle 144 / soc-y5vh.5 slice-1-of-3 mode.
2026-05-12 21:18:59 -04:00
#### `ao loop history`
Read .agents/evolve/cycle-history.jsonl via the typed BC3 LoopReaderPort.
```
ao loop history [flags]
```
**Flags: **
```
--end int end cycle number (inclusive; 0 = unbounded)
-h, --help help for history
--latest emit only the latest entry
--limit int max entries to emit (0 = all)
--start int start cycle number (inclusive; 0 = unbounded)
```
feat(loop): expose HypothesisLedgerPort + ConvergenceCheckPort via ao loop
Follows the ao loop append/history wiring shape (loop_append.go): each
command pairs an options struct with an injectable *Fn seam and a
*ViaPort production path.
- ao loop hypothesis {list,append} — typed BC3 HypothesisLedgerPort
surface over .agents/evolve/hypotheses.jsonl (productionHypothesisLedger,
soc-y5vh.6). append rejects empty/duplicate IDs; list emits one JSON
HypothesisRecord per line.
- ao loop converged — pure BC3 ConvergenceCheckPort STOP predicate
(productionConvergenceCheck, soc-y5vh.7). Takes caller-supplied
evidence (green streak, unconsumed HIGH+MEDIUM, fitness-baseline),
emits {converged, ci_green_streak, ..., reasons}.
- evolve docs (SKILL.md + convergence-mechanics.md) reference the new
typed path instead of direct hypotheses/session-convergence reads.
- Cross-harness parity: ported convergence-mechanics.md into the codex
evolve skill (was 9/19 reference files, now 10/19), harness-adapted
(Step 7 while-loop STOP vs ScheduleWakeup). Broader evolve drift
tracked in soc-an3v.
- CLI docs regenerated; cd cli go build/vet/test ./... green
(11921 tests, 53 packages).
Tests: LoopConverged 5 cases (converged + each unmet reason + observed
streak), LoopHypothesis 4 cases (empty-id reject, stub mapping, JSONL
render, append->list round-trip).
Closes soc-y5vh.8
2026-05-16 10:56:23 -04:00
#### `ao loop hypothesis`
Operations on the /evolve hypothesis ledger (.agents/evolve/hypotheses.jsonl) via the typed BC3 HypothesisLedgerPort.
```
ao loop hypothesis [command]
```
##### `ao loop hypothesis append`
Append a falsifiable hypothesis to .agents/evolve/hypotheses.jsonl
```
ao loop hypothesis append --id <id> --hypothesis <h> --measure <m> [flags]
```
**Flags: **
```
--check-at-cycle int future cycle that evaluates the measure
--cycle-landed int cycle the patch landed
-h, --help help for append
--hypothesis string expected effect of the patch
--id string unique hypothesis ID, e.g. H210.1 (required)
--measure string how the effect is verified
--patch string one-line description of what landed
--verdict string verdict: PENDING|VERIFIED|FALSIFIED (default "PENDING")
```
##### `ao loop hypothesis list`
Read .agents/evolve/hypotheses.jsonl via the typed BC3
```
ao loop hypothesis list [flags]
```
feat(cli): ao loop verify — audit cycle-history integrity (uses cycle-161 widening)
Cycle 163. First NEW consumer of the cycle-161 CycleEntry widening
(soc-ckc4). NOT a template adapter wrap — adds new audit behavior
on top of the typed LoopReaderPort.
ao loop verify audits .agents/evolve/cycle-history.jsonl integrity:
- monotonic Number ordering
- no duplicate Number values
- non-empty StartedAt on every entry (uses the cycle-161 field)
- trailing IdleStreak < threshold (--max-idle, default 5)
Exit code 0 on clean ledger, non-zero with FAIL summary on any issue.
Useful as pre-commit gate or CI assertion against hand-edited ledgers.
Live smoke surfaced a REAL drift on first run: cycle 74 is duplicated
in the current ledger (lines 73-74, identical except unicode → vs
ASCII 'to'). Filed soc-(new) for operator-data cleanup; not fixed
in this cycle.
Implementation:
- cli/cmd/ao/loop.go: loopVerifyCmd + loopVerifyRun + checkLoopIntegrity
pure-Go audit fn + loopVerifyViaPort wiring. Injectable verifyFn
follows the cycle-147 CLI-wiring template testability pattern.
- cli/cmd/ao/loop_test.go: 7 new tests:
TestCheckLoopIntegrity_{CleanLedger, NonMonotonicNumber,
DuplicateNumber, MissingStartedAt, IdleStreakExceedsThreshold}
+ TestLoopVerifyRun_{StubPASS, StubFAIL}.
Distinguishing this from the cycle-155 banned pattern: the previous
adapter cycles wrapped a port method 1:1 in a CLI command. This
cycle composes Range + IdleStreak with NEW audit logic
(non-monotonicity check, duplicate detection, StartedAt presence)
that didn't exist anywhere before. It's a real consumer of the port,
not a trivial passthrough.
cli/docs/COMMANDS.md regenerated.
gofmt clean, go vet clean, full ./... PASS.
+143 LOC, 7 new tests, 1 real audit finding surfaced.
2026-05-12 22:45:45 -04:00
#### `ao loop verify`
Audit .agents/evolve/cycle-history.jsonl integrity via the typed
```
ao loop verify [flags]
```
**Flags: **
```
-h, --help help for verify
--max-idle int max acceptable trailing idle/unchanged streak before flagging dormancy (default 5)
```
feat(cli): ao loop history — first ao subcommand wired through a production adapter (soc-y5vh.5 slice 1)
Cycle 144 ships the first slice of soc-y5vh.5: the new 'ao loop'
command group with 'ao loop history' as its first subcommand. This
is the first cobra command that exposes a production port adapter
(productionLoopReader, cycle 108) to the operator surface.
Why this matters: cycle 143 audit found that all 14 production
adapters were internal-only — no CLI surface invoked them outside
tests. This was the latent-value problem from cycle 122's wire-up
learning. soc-y5vh.5 (cycle 143 filed) was the operator surface
that closes that loop. This commit ships the first 1 of 3 planned
subcommands.
New files:
- cli/cmd/ao/loop.go (130 lines) — loopCmd + loopHistoryCmd. Three
ways to query the history:
--latest emit only the most recent entry
--limit N emit at most N most-recent
--start S --end E emit cycles S..E inclusive
Output is line-delimited JSON (one CycleEntry per line). Wired
through productionLoopReader (cycle 108) reading
.agents/evolve/cycle-history.jsonl.
- cli/cmd/ao/loop_test.go (6 tests) — temp-dir fixtures, latest +
limit + range slicing, missing-file empty output, injectable
historyFn for test stubs, error wrapping.
Verified end-to-end against this session's actual cycle-history.jsonl:
$ cli/bin/ao loop history --latest
{"Number":143,"Mode":"prerequisite-audit-and-bd-decomposition",
"Result":"improved",...}
cli/docs/COMMANDS.md regenerated via scripts/generate-cli-reference.sh.
Anti-pattern caught (cycle-126 lesson, applied to a name collision):
- Initial helper named `loadCycleHistory` collided with an existing
function of the same name in cli/cmd/ao/metrics_health.go. go vet
caught it; renamed mine to `loadCycleHistoryViaPort`. Grep BEFORE
naming helpers in cli/cmd/ao/ — the package is large and
collisions are easy.
Future slices of soc-y5vh.5:
- ao corpus inject (productionCorpusReader, cycle 112)
- ao ci latest <sha> (productionCIStatus, cycle 117)
- Each is a separate cycle; same shape as this one (cobra add +
thin wrapper + tests + COMMANDS.md regen).
Cycle 144 / soc-y5vh.5 slice-1-of-3 mode.
2026-05-12 21:18:59 -04:00
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao maturity`
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
Check and manage CASS (Contextual Agent Session Search) maturity levels.
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao maturity [learning-id] [flags]
2026-02-26 05:48:41 -05:00
```
**Flags: **
2026-02-21 19:41:50 -05:00
```
2026-04-30 11:08:22 -04:00
--apply Apply maturity transitions
--archive Move expired/evicted/curated files to archive (requires --expire, --evict, or --curate)
--curate Normalize metadata and identify low-signal or uncited stale learnings
--evict Identify eviction candidates (composite criteria)
--expire Scan for expired learnings
--global Operate on ~/.agents/learnings instead of the local workspace learnings
-h, --help help for maturity
--migrate-md Add default frontmatter to .md learnings missing utility field
--recalibrate Reset utility to 0.5 for all learnings
--scan Scan all learnings for pending transitions
--target-size string Size-budget eviction: when set with --evict, archive lowest-utility eligible files until the learnings hub falls below the target (e.g. 250M, 1G, 1024K)
--uncited-days int Archive provisional/candidate learnings with zero citations older than this many days when used with --curate (default 60)
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao metrics`
2026-02-26 05:48:41 -05:00
Track and report on knowledge flywheel metrics.
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao metrics [command]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
#### `ao metrics baseline`
2026-02-26 05:48:41 -05:00
Capture a baseline snapshot of the knowledge flywheel.
```
2026-02-26 06:42:03 -05:00
ao metrics baseline [flags]
2026-02-26 05:48:41 -05:00
```
**Flags: **
```
--days int Period in days for metrics calculation (default 7)
-h, --help help for baseline
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao metrics cite`
2026-02-26 05:48:41 -05:00
Record that an artifact was cited in this session.
```
2026-02-26 06:42:03 -05:00
ao metrics cite <artifact-path> [flags]
2026-02-26 05:48:41 -05:00
```
**Flags: **
```
-h, --help help for cite
--query string Search query that surfaced this artifact
--session string Session ID (auto-detected if not provided)
--type string Citation type: recall, reference, applied (default "reference")
2026-04-05 09:15:27 -04:00
--vendor string Model vendor attribution: claude, codex
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao metrics cite-report`
2026-02-26 05:48:41 -05:00
Produce an aggregated report from citation data.
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
```
2026-02-26 06:42:03 -05:00
ao metrics cite-report [flags]
2026-02-26 05:48:41 -05:00
```
**Flags: **
```
--days int Period in days (default 30)
-h, --help help for cite-report
--json Output as JSON
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao metrics health`
2026-02-26 05:48:41 -05:00
Display flywheel health metrics including escape velocity status.
```
2026-02-26 06:42:03 -05:00
ao metrics health [flags]
2026-02-26 05:48:41 -05:00
```
2026-04-05 09:15:27 -04:00
**Flags: **
```
-h, --help help for health
--namespace string Citation namespace to evaluate (primary by default) (default "primary")
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao metrics report`
2026-02-26 05:48:41 -05:00
Display a formatted report of knowledge flywheel metrics.
```
2026-02-26 06:42:03 -05:00
ao metrics report [flags]
2026-02-26 05:48:41 -05:00
```
**Flags: **
```
--days int Period in days for metrics calculation (default 7)
-h, --help help for report
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
feat(cli): ao operator record/list — 4th adapter exposed (template-applied)
Cycle 148 ships the 4th CLI surface using the cycle-147 template
captured immediately after the 3-cycle slice arc (144-146). First
test of the template's predictive value: a new adapter exposure in
~10 min using the documented pattern without re-deriving the shape.
New surface:
ao operator record --kind <kind> [--subject S] [--note N]
ao operator list
Wraps productionOperator (cycle 110) — writes/reads OperatorIntent
records to .agents/operator/intents.jsonl. Useful as a durable
operator-decision ledger: halt, rescope, handoff records survive
session boundaries.
Template adherence (vs cycle-147 spec):
- ✓ Parent noun (operator) + verb subcommands (record, list)
- ✓ Injectable function fields (recordFn + listFn) on options bag
- ✓ Line-delimited JSON output for list
- ✓ Error wrapping with command name
- ✓ Build + smoke verification (ao operator --help renders)
- New nuance: --kind marked required via cobra's MarkFlagRequired
(per port contract that rejects empty Kind)
- New nuance: operatorIntentsPath helper centralizes the
.agents/operator/intents.jsonl path resolution + mkdir-parent
New files:
- cli/cmd/ao/operator_cmd.go (149 lines) — operatorCmd parent +
operatorRecordCmd + operatorListCmd + 4 helper functions.
- cli/cmd/ao/operator_cmd_test.go (107 lines) — 6 tests covering
empty-kind rejection, stub-called, error-wrapped, list emits
intents, empty list, error wrap on list.
Total: 256 LOC + 6 tests — within the cycle-147 spec's 250-335 LOC
band. Time: ~9 min. Template predicts costs accurately.
cli/docs/COMMANDS.md regenerated.
soc-y5vh-style follow-up: this exposes the 4th of 14 production
adapters via CLI. 10 remain (Citation, Harness, ClaimEvidenceBinder,
GateRunner, FactoryAdmission, ClaimEvidence, EventBus,
CorpusWriter, LoopWriter, FindingCompiler). None are blocking any
queued bd; expose them as ad-hoc needs arise.
Cycle 148 / template-applied CLI-wiring mode (cycle-147 spec
validated on first real use).
2026-05-12 21:27:34 -04:00
### `ao operator`
Read and write operator intents via the typed BC4 OperatorPort. Intents are durable records of operator decisions (halt, rescope, handoff) appended to .agents/operator/intents.jsonl.
```
ao operator [command]
```
**Subcommands: **
#### `ao operator list`
Emit recorded OperatorIntents from .agents/operator/intents.jsonl
```
ao operator list [flags]
```
#### `ao operator record`
Append an OperatorIntent to .agents/operator/intents.jsonl via the
```
ao operator record --kind <kind> [--subject S] [--note N] [flags]
```
**Flags: **
```
-h, --help help for record
--kind string intent kind (required: halt|rescope|handoff|other)
--note string free-text note
--subject string intent subject (e.g., bd ID, file path)
```
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao pool`
2026-02-26 05:48:41 -05:00
Manage knowledge candidates in quality pools.
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao pool [command]
2026-02-26 05:48:41 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
#### `ao pool auto-promote`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Automatically approve (and optionally promote) high-quality candidates
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao pool auto-promote [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-02-23 12:32:23 -05:00
-h, --help help for auto-promote
--include-gold Include gold-tier candidates when using --promote (default true)
--promote Also stage+promote eligible candidates into .agents/ (not just approval)
--threshold string Minimum age for auto-promotion (default: 24h) (default "24h")
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao pool batch-promote`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Promote pending pool candidates that meet promotion criteria.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao pool batch-promote [flags]
2026-02-21 19:41:50 -05:00
```
2026-02-23 12:32:23 -05:00
**Flags: **
2026-02-21 19:41:50 -05:00
```
2026-02-23 12:32:23 -05:00
--dry-run Show what would be promoted without executing
--force Promote all pending candidates regardless of criteria
--min-age Minimum age threshold (default: 24h)
--force Promote all pending regardless of criteria
-h, --help help for batch-promote
--min-age string Minimum age for promotion eligibility (default "24h")
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao pool ingest`
2026-02-23 12:32:23 -05:00
Ingest pending learnings into the quality pool.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao pool ingest [<files-or-globs...>] [flags]
2026-02-21 19:41:50 -05:00
```
2026-02-23 12:32:23 -05:00
**Flags: **
2026-02-21 19:41:50 -05:00
```
2026-02-23 12:32:23 -05:00
--dir string Directory to ingest from when no args are provided (default ".agents/knowledge/pending")
-h, --help help for ingest
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao pool list`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
List knowledge candidates filtered by tier and/or status.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao pool list [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-02-23 12:32:23 -05:00
-h, --help help for list
--limit int Maximum results to return (default 50, 0 for unlimited) (default 50)
--offset int Skip first N results (for pagination)
--status string Filter by status (pending, staged, promoted, rejected)
--tier string Filter by tier (gold, silver, bronze)
-w, --wide Show full IDs without truncation
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao pool migrate-legacy`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Move legacy knowledge captures from .agents/knowledge/*.md into
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao pool migrate-legacy [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-02-23 12:32:23 -05:00
-h, --help help for migrate-legacy
--pending-dir string Pending directory for migrated captures (default ".agents/knowledge/pending")
--source-dir string Source directory containing legacy markdown captures (default ".agents/knowledge")
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao pool promote`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Move a staged candidate to the knowledge base (.agents/learnings/ or .agents/patterns/).
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao pool promote <candidate-id> [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-01 10:30:44 -04:00
#### `ao pool reindex`
Walk .agents/learnings/*.md and .agents/patterns/*.md, compute the
```
ao pool reindex [flags]
```
**Flags: **
```
--dry-run Print counts only; do not write to the index
-h, --help help for reindex
--json Emit structured JSON output
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao pool reject`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Mark a candidate as rejected and move to rejected directory.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao pool reject <candidate-id> [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-02-23 12:32:23 -05:00
-h, --help help for reject
--reason string Reason for rejection (required)
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao pool show`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Show detailed information about a pool candidate.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao pool show <candidate-id> [flags]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao pool stage`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Move a candidate from pending to staged status.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao pool stage <candidate-id> [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-02-23 12:32:23 -05:00
-h, --help help for stage
--min-tier string Minimum tier threshold (default: bronze)
2026-02-21 19:41:50 -05:00
```
---
2026-05-26 17:03:27 -04:00
### `ao reconcile`
Build a read-only reconciliation report for the current AgentOps repo.
```
ao reconcile [flags]
```
**Flags: **
```
-h, --help help for reconcile
--limit int maximum bead and run records to sample (default 80)
--repo string GitHub repo override for gh calls (owner/name)
--since string recent .agents evidence window (default "48h")
```
---
2026-05-17 00:35:28 -04:00
### `ao robot-docs`
Print a paste-ready, agent-targeted handbook for the whole ao CLI.
```
ao robot-docs [flags]
```
---
2026-02-23 12:32:23 -05:00
### `ao status`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Display the current state of AgentOps knowledge base.
2026-02-21 19:41:50 -05:00
```
2026-02-23 12:32:23 -05:00
ao status [flags]
2026-02-21 19:41:50 -05:00
```
---
2026-02-23 12:32:23 -05:00
### `ao version`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Display the version, build information, and runtime details.
2026-02-21 19:41:50 -05:00
```
2026-02-23 12:32:23 -05:00
ao version [flags]
2026-02-21 19:41:50 -05:00
```
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao vibe-check`
2026-02-21 19:41:50 -05:00
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
Run a comprehensive vibe-check analysis on your repository.
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao vibe-check [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
vibe-check, vibecheck
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Flags: **
```
--full Show all metrics and findings (verbose)
-h, --help help for vibe-check
--markdown Output as markdown report
--repo string Path to git repository (default ".")
--since string Time window for analysis (e.g., 7d, 30d, 90d) (default "7d")
```
---
2026-02-26 05:48:41 -05:00
2026-04-05 09:15:27 -04:00
### `ao autodev`
Define, inspect, and validate the repo-local PROGRAM.md contract.
```
ao autodev [command]
```
**Flags: **
```
--file string Path to PROGRAM.md or AUTODEV.md (auto-detects PROGRAM.md then AUTODEV.md)
-h, --help help for autodev
```
**Subcommands: **
#### `ao autodev init`
Create a PROGRAM.md template
```
ao autodev init [objective] [flags]
```
**Flags: **
```
--force Overwrite an existing program file
-h, --help help for init
```
#### `ao autodev show`
Show the parsed PROGRAM.md contract
```
ao autodev show [flags]
```
#### `ao autodev validate`
Validate PROGRAM.md structure
```
ao autodev validate [flags]
```
---
### `ao codex`
2026-04-07 09:52:01 -04:00
Codex lifecycle commands for the AgentOps knowledge flywheel.
2026-04-05 09:15:27 -04:00
```
ao codex [command]
```
**Subcommands: **
#### `ao codex ensure-start`
Ensure Codex startup context exists once per thread
```
ao codex ensure-start [flags]
```
**Flags: **
```
-h, --help help for ensure-start
--limit int Maximum artifacts to surface per category (default 3)
--no-maintenance Skip safe close-loop maintenance on start
--query string Optional startup query (defaults to the current Codex thread name)
```
#### `ao codex ensure-stop`
Ensure Codex closeout runs once per thread
```
ao codex ensure-stop [flags]
```
**Flags: **
```
--auto-extract Write lightweight learnings and handoff artifacts during closeout (default true)
2026-05-01 09:01:35 -04:00
--close-loop Run mutating flywheel close-loop maintenance after forging
2026-04-05 09:15:27 -04:00
-h, --help help for ensure-stop
--no-close-loop Skip flywheel close-loop maintenance after forging
--no-history-fallback Disable history.jsonl fallback when no archived Codex transcript exists
--session string Codex session ID to close (defaults to the active thread)
--transcript string Explicit transcript path to forge instead of runtime discovery
```
#### `ao codex start`
2026-04-07 09:52:01 -04:00
Start a Codex session with explicit flywheel maintenance (fallback for pre-v0.115.0)
2026-04-05 09:15:27 -04:00
```
ao codex start [flags]
```
**Flags: **
```
-h, --help help for start
--limit int Maximum artifacts to surface per category (default 3)
--no-maintenance Skip safe close-loop maintenance on start
--query string Optional startup query (defaults to the current Codex thread name)
```
#### `ao codex status`
2026-04-07 09:52:01 -04:00
Show Codex lifecycle health (native hooks detected when available)
2026-04-05 09:15:27 -04:00
```
ao codex status [flags]
```
**Flags: **
```
--days int Citation window in days for Codex lifecycle health (default 7)
-h, --help help for status
```
#### `ao codex stop`
2026-04-07 09:52:01 -04:00
Close a Codex session explicitly (fallback for pre-v0.115.0)
2026-04-05 09:15:27 -04:00
```
ao codex stop [flags]
```
**Flags: **
```
--auto-extract Write lightweight learnings and handoff artifacts during closeout (default true)
2026-05-01 09:01:35 -04:00
--close-loop Run mutating flywheel close-loop maintenance after forging
2026-04-05 09:15:27 -04:00
-h, --help help for stop
--no-close-loop Skip flywheel close-loop maintenance after forging
--no-history-fallback Disable history.jsonl fallback when no archived Codex transcript exists
--session string Codex session ID to close (defaults to the active thread)
--transcript string Explicit transcript path to forge instead of runtime discovery
```
---
feat(evolve): Phase 2 of /evolve --mode=loop — ladder + cron self-adjust + typed blocked events (soc-g2qd #phase-2) (#397)
## Why
Phase 2 of soc-g2qd: ship the CLI enforcement primitives the skill's
prompt-text alone can't guarantee.
| Bead | What it gives the operator-loop |
|---|---|
| soc-mlbm | `ao evolve next-work` — 5-step programmatic ladder; agent
stops guessing what to claim next |
| soc-un0m | `ao cron self-adjust` — renders cron template + emits JSON
spec; replaces manual CronList/Delete/Create per cycle |
| soc-g34d | `ao evolve blocked` — typed blocked events at
`.agents/evolve/blocked.jsonl`; agent logs rather than halts |
## What changed
| Surface | Change |
|---|---|
| `cli/cmd/ao/evolve_next_work.go` + `_test.go` | New subcommand + L2
integration tests |
| `cli/internal/evolve/ladder/` | 5-step ladder package (shape_filter,
grep_siblings, primitive_test, cross_hop_pickup, bug_fallback) with
table-driven unit tests |
| `cli/cmd/ao/cron.go` | New top-level `ao cron` command |
| `cli/cmd/ao/cron_self_adjust.go` + `_test.go` | New subcommand; calls
`evolve.VerifyMarkers` + `evolve.Render` from #394; writes audit row to
`.agents/evolve/cron-history.jsonl`; emits JSON spec to stdout (harness
orchestrates CronCreate) |
| `cli/cmd/ao/evolve_blocked.go` + `_test.go` | New subcommand:
`--reason` (write), `--list [--tail N] [--json]` (read), `--clear
<cycle>` (operator) |
| Generated: `cli/docs/COMMANDS.md`, `registry.json`,
`docs/cli-skills-map.md` | Regen for 3 new subcommands |
| `evals/agentops-core/cli-command-surface-matrix.json` + smoke fixture
| Counts bumped 73/199/272 → 74/202/276 |
## How tested
- L2 integration: each new subcommand has L2 tests using fixture
workspaces
- L1 unit: 5-step ladder per-step table tests + JSONL schema validation
on blocked records
- Mechanical: `go test ./cli/...` 0 → 0 failures;
cli-command-surface-smoke.sh `cli-help-matrix-ok`;
check-no-tracked-agents.sh exits 0
## Counts
CLI heading counts: top 73 → 74, sub 199 → 202, all 272 → 276.
Sibling pattern: `cron-history.jsonl` + `blocked.jsonl` follow the
cycle-history.jsonl JSONL append-only shape from soc-5qit. Ladder
structure mirrors the in-prompt cascade in `references/scout-mode.md` —
making it programmatic per §A5.
[no-sibling for cron-self-adjust] First-of-kind: no prior subcommand
emits a cron-spec JSON for harness orchestration. The CLI does the safe
work (template render + marker verify + audit row); the harness owns
CronCreate.
See: `docs/plans/2026-05-21-evolve-loop-epic-design.md` §A4, §A5, §A6
Closes-scenario: soc-mlbm#next-work-ladder
Closes-scenario: soc-un0m#cron-self-adjust
Closes-scenario: soc-g34d#typed-blocked-events
Bounded-context: BC5-Runtime
Evidence: cli/cmd/ao/evolve_next_work.go
2026-05-21 14:09:41 -04:00
### `ao cron`
Helpers for the /evolve --mode=loop cron-fire continuity primitive.
```
ao cron [command]
```
**Subcommands: **
#### `ao cron self-adjust`
Render the next /evolve loop-mode cron prompt and emit JSON for the harness.
```
ao cron self-adjust [flags]
```
**Flags: **
```
-h, --help help for self-adjust
--next string Optional recommended next bead
--on string Trigger marker: 'cycle-close' for default loop usage (default "cycle-close")
--shipped string Comma-separated commit:bead entries shipped this cycle
--sub-beads string Comma-separated bead ids filed this cycle
--template string Path to the cron-loop-mode template (default ".agents/evolve/cron-template.md")
--tests-delta string Human-readable tests delta summary
```
---
2026-04-24 22:27:11 -04:00
### `ao eval`
Run deterministic AgentOps evaluation suites and compare run records.
```
ao eval [command]
```
**Subcommands: **
#### `ao eval baseline`
Promote an eval run record as a baseline
```
ao eval baseline <run.json> [flags]
```
**Flags: **
```
-h, --help help for baseline
--out string write promoted baseline run record to path
--promoted-by string identity promoting the baseline
--rationale string rationale for promoting the baseline
```
2026-04-29 17:10:57 -04:00
#### `ao eval baseline-audit`
Audit eval suite baseline policy against promoted baselines
```
ao eval baseline-audit [suite.json ...] [flags]
```
**Flags: **
```
--baseline-dir string promoted baseline directory (default ".agents/evals/baselines")
-h, --help help for baseline-audit
--root string suite root to scan when no suite paths are provided (default "evals/agentops-core")
```
2026-05-02 08:20:17 -04:00
#### `ao eval cleanup`
Per SCHEMA.md §4 cleanup state-transition rule (rc2):
```
ao eval cleanup [flags]
```
**Flags: **
```
--delete Remove Run directories whose status is failed or aborted (never retracted)
--dry-run Preview without mutations
-h, --help help for cleanup
--tmp-age int Minimum tmp-file age in seconds before sweep (0 = sweep all) (default 60)
--tmp-files Sweep orphan *.tmp files older than --tmp-age
```
2026-04-24 22:27:11 -04:00
#### `ao eval compare`
Compare an eval run against a baseline
```
ao eval compare <candidate-run.json> <baseline-run.json> [flags]
```
**Flags: **
```
-h, --help help for compare
--max-aggregate-regression float allowed aggregate regression before verdict becomes regression
--max-dimension-regression float allowed per-dimension regression before verdict becomes regression
--out string write compared eval run record to path
```
2026-04-24 23:51:57 -04:00
#### `ao eval coverage`
Summarize eval suite coverage
```
ao eval coverage [suite.json ...] [flags]
```
**Flags: **
```
2026-04-29 17:10:57 -04:00
-h, --help help for coverage
--require-dimension stringArray required score dimension for missing-dimension reporting (default [correctness,process_adherence,artifact_quality,runtime_compatibility,efficiency,safety,learning_closure])
--require-domain stringArray required product domain for missing-domain reporting (default [cli,hook,skill,rpi,runtime,retrieval,scenario,mixed,security])
--require-evidence-kind stringArray required evidence kind for missing-evidence-kind reporting
--require-runtime stringArray required deterministic runtime for missing-runtime reporting (default [static,shell,mock])
--root string suite root to scan when no suite paths are provided (default "evals/agentops-core")
2026-04-24 23:51:57 -04:00
```
2026-05-29 15:49:22 -04:00
#### `ao eval outcomes`
Outcomes is a derived projection of the locked eval substrate (SCHEMA.md), never an alternate authority. Subcommands compile holdout-safe rubric payloads and ingest returned scores into the one verdict format.
```
ao eval outcomes [command]
```
##### `ao eval outcomes compile`
Compile a holdout-safe Outcomes rubric payload from a locked Task + criteria
```
ao eval outcomes compile <input.json> [flags]
```
2026-05-29 16:15:02 -04:00
##### `ao eval outcomes ingest`
Ingest an Outcomes score payload into the one council verdict record
```
ao eval outcomes ingest <score.json> [flags]
```
2026-05-30 07:42:46 -04:00
**Flags: **
```
2026-05-30 08:07:10 -04:00
--burn-ledger string path to a JSON HoldoutBurnLedger; when set, a holdout-split score registers a burn and is REFUSED if the (suite,gt) quota is exhausted (gate #3 runtime enforcement), persisted across invocations
2026-05-30 07:42:46 -04:00
--expect-judge-hash string refuse the ingest if the score's judge_content_hash does not match this value (gate #2 rubric-drift parity)
-h, --help help for ingest
```
2026-04-24 22:27:11 -04:00
#### `ao eval run`
Run a deterministic eval suite
```
ao eval run <suite.json> [flags]
```
**Flags: **
```
2026-05-03 10:15:12 -04:00
--baseline string compare the run against a baseline run record
--baseline-mode string skill-on | skill-off | both — runs the suite once with skills loaded, once with hooks suppressed, or both for a delta scorecard (default "skill-on")
--context-mode string none | ab — run context-off/context-on legs over isolated AO_AGENTS_DIR roots (default "none")
--context-off-agents-dir string AO_AGENTS_DIR root for the context-off leg (defaults to suite fixtures)
--context-on-agents-dir string AO_AGENTS_DIR root for the context-on leg (defaults to suite fixtures)
--delta-out string write delta scorecard JSON to path (with --baseline-mode=both or --context-mode=ab)
-h, --help help for run
--out string write eval run record to path
--run-id string stable run id to use in the run record
2026-05-04 13:27:26 -04:00
--runtime string runtime override (static, mock, shell, claude, codex)
2026-04-24 22:27:11 -04:00
```
2026-04-24 23:12:53 -04:00
#### `ao eval scorecard`
Build an eval scorecard from run records
```
ao eval scorecard <candidate-run.json> [baseline-run.json] [flags]
```
**Flags: **
```
-h, --help help for scorecard
--kind string scorecard kind (rpi, skill-change) (default "rpi")
--max-category-regression float allowed per-category regression before verdict becomes regression
--out string write scorecard JSON to path
```
2026-05-02 08:20:17 -04:00
#### `ao eval suite`
Suite-level operations against the §6.5 statistical contract.
```
ao eval suite [command]
```
##### `ao eval suite n-required`
Compute power-derived n_required (gate #6 input on Day 3+)
```
ao eval suite n-required [flags]
```
**Flags: **
```
--alpha float Type-I error rate (default 0.05)
--baseline-rate float Baseline rate (binomial worst-case fallback) (default 0.5)
-h, --help help for n-required
--mde float Minimum detectable effect (default 0.05)
--paired Paired comparison (default true)
--power float Statistical power (1-beta) (default 0.8)
```
##### `ao eval suite verdict`
Compute the §6.5 paired cluster-bootstrap verdict
```
ao eval suite verdict <suite-id> --arms a,b --inputs <bootstrap-inputs.json> [flags]
```
**Flags: **
```
--B int Bootstrap resamples (default 10000)
--arms string Comma-separated arm ids (default: from suite varied_axis)
-h, --help help for verdict
--inputs string Path to canonical bootstrap-inputs JSON (REQUIRED)
--mde float Minimum detectable effect (used for inconclusive_high_variance)
--n-required int Override n_required (default: derived from suite power block)
```
#### `ao eval task`
Operate on the §3 Task primitive of the eval substrate.
```
ao eval task [command]
```
##### `ao eval task add`
Register a Task by copying its yaml + samples into the substrate
```
ao eval task add <task.yaml> [flags]
```
##### `ao eval task list`
List registered Task ids
```
ao eval task list [flags]
```
##### `ao eval task run`
Opens a new Run under $AGENTOPS_EVALS_ROOT/runs/<run-id>/manifest.json
```
ao eval task run <task-id> [flags]
```
**Flags: **
```
--allow-weak-labels Allow runs against confidence=weak ground-truth rows (gate #7)
fix: critical audit findings remediation (epic soc-ab5g) (#279)
* fix(session): sanitize init-step exec and correct BEADS_ACTOR
Two defects in `ao session spawn` runInitSteps, from the 2026-05-16
codebase audit (epic soc-ab5g):
- BEADS_ACTOR was exported as the expanded command string of the first
init step instead of the session actor identity, so beads attribution
for every init step was garbage. Thread tmpl.Identity.BeadsActorTemplate
through runInitSteps and export the var only when non-empty.
- Init steps ran via raw exec.Command("bash","-c",...) (SEC-C1). Route
init-step exec through shellutil.SanitizedBashCommand and add
sanitizeHostname() to strip shell metacharacters from {{hostname}}-class
template vars before substitution.
New regression tests: TestRunInitStepsSetsBeadsActor, TestSanitizeHostname.
Refs: soc-jhxr
* fix(autodev): replace vague 'validation failed' with a concrete summary
outputAutodevValidateResult returned fmt.Errorf("validation failed")
after already printing the detailed INVALID/ERROR lines -- a redundant,
content-free wrapper. Return a summary naming the file and the
validation-error count instead (COPY-C1, epic soc-ab5g).
Refs: soc-mpzu
* docs(eval): strip internal Day-N cadence jargon from user-facing text
eval_task.go exposed internal sprint labels ("Day-2 placeholder",
"Day-3 wires real launch", "Day-4 gate #4") in command Long
descriptions and flag help. Reword to describe current behavior
without the internal cadence (COPY-C2, epic soc-ab5g).
Refs: soc-iy7p
* fix(cli): reject unknown subcommands on group commands
Group-parent commands (daemon, beads, codex, constraint, factory,
goals, hooks, ratchet, rpi, session) had no Args validator, so an
unknown subcommand printed help to stdout and exited 0 -- breaking
`if ao rpi <bad>; then ...` scripting. Add Args: cobra.NoArgs to all
ten; unknown subcommands now exit 1 with the error on stderr
(CLI-C1, epic soc-ab5g).
Refs: soc-mlqe
* docs(cli): regenerate COMMANDS.md after eval-task help copy edit
* fix(daemon): contain dream output_dir against path traversal
DreamRunJobSpec/DreamStageJobSpec/DreamStageManifest Validate() only
TrimSpace-checked output_dir, leaving the operator-supplied job payload
free to redirect summary/log writes outside the intended tree.
validateOutputDir now rejects ".." traversal in all three Validate()
paths; outputDirContained rejects an absolute output_dir resolving
outside the daemon working tree, checked in DreamExecutor.RunJob before
MkdirAll. Containment checks: 1 (symlink only) → 3 (symlink + .. + abs).
Closes soc-ly33 (SEC-C2, epic soc-ab5g).
* fix(cli): wire ao --version flag and unify goals --json with -o
rootCmd had no Version field, so `ao --version` was unsupported even
though an `ao version` subcommand existed. Set rootCmd.Version = version
(the ldflags-injected build var) so the standard --version flag works.
goals registered its own local --json bool, disconnected from the
global -o/--output flag — `ao goals measure -o json` was ignored. Drop
goalsJSON; goalsJSONOutput() now reads GetOutput(), the sibling pattern
used by agentopsd.go, autodev.go, codex.go and ~40 other callsites. The
global --json persistent flag is inherited, so `ao goals --json` still
works; output paths honored by goals: 1 (local bool) → 2 (--json + -o).
Closes soc-nx1o (CLI-C2, epic soc-ab5g).
* perf(cli): collapse tmux probe storm in ao rpi status
checkTmuxSessionAlive forked `tmux has-session` up to 3 times per
non-terminal run, each with a 2s timeout — a status scan over N runs
issued 3N subprocesses and could stall ~6N seconds when tmux was slow
or absent.
probeTmuxSessions now runs one `tmux ls -F #{session_name}`, memoized
per process behind a mutex-guarded cache; tmuxSessionAlive filters the
snapshot in Go. resolveRPIToolchainDefaults collapses from per-run to
once. Subprocesses per status scan: 3N → 1.
Closes soc-d7v5 (PERF-C1, epic soc-ab5g). Mirrors the snapshot-then-
filter shape used elsewhere for batch probes.
* perf(cli): one-pass git capture + walk-once index in ao beads audit
ao beads audit re-shelled git per bead (one `git log --grep` per bead,
one `git log --since` per bead-path pair) and re-walked the worktree
per pattern (recordAuditStaleFinding probes up to 10 patterns/bead, so
up to 10N full-repo walks for N beads).
captureAuditCommits now runs a single `git log --all --name-only`,
parsed into auditCommit records; grepCommitsForID and
fileChangesSinceCommits filter that slice in Go. repoContentCache walks
the scoped roots once (lazily) and memoizes a path->content map shared
across every pattern probe. git subprocesses per audit: O(beads) → 1;
repo walks: O(10*beads) → 1. Mirrors the snapshot-then-filter shape
just applied to ao rpi status.
Closes soc-2grz (PERF-C2, epic soc-ab5g).
* fix(schemas): declare schema_version const in 15 unversioned schemas
15 of 34 schemas under schemas/ carried versioned filenames (or implied
a stable contract) without a machine-readable schema_version, so a
consumer could not detect the version from the payload alone.
Each now declares an optional schema_version integer const, mirroring
the shape in schemas/bead.v1.schema.json: const 1 for every schema
except skill-frontmatter.v2 (const 2). The field is intentionally left
out of "required" so existing documents without it still validate —
non-breaking. scenario.v1 keeps its legacy "version" field alongside.
Schemas declaring schema_version: 19/34 → 34/34.
Closes soc-wzgo (API-C2, epic soc-ab5g).
* docs(contracts): regenerate context-map after merging main
The merge of origin/main pulled a discovery SKILL.md description edit
without its companion context-map regeneration, so
validate-context-map-drift flagged 1 stale line. Regenerated via
scripts/generate-context-map.sh. Drifted lines: 1 → 0.
2026-05-16 11:05:36 -04:00
--cross-spec Allow ModelSpec drift (gate #4)
2026-05-02 08:20:17 -04:00
--dry-run Run gates and exit without writing a Run manifest
--ground-truth string Ground-truth row id (head of supersession chain)
--harness string Harness id (recorded into manifest)
--harness-dir string Path to harness source dir for snapshot + gate #8
-h, --help help for run
fix: critical audit findings remediation (epic soc-ab5g) (#279)
* fix(session): sanitize init-step exec and correct BEADS_ACTOR
Two defects in `ao session spawn` runInitSteps, from the 2026-05-16
codebase audit (epic soc-ab5g):
- BEADS_ACTOR was exported as the expanded command string of the first
init step instead of the session actor identity, so beads attribution
for every init step was garbage. Thread tmpl.Identity.BeadsActorTemplate
through runInitSteps and export the var only when non-empty.
- Init steps ran via raw exec.Command("bash","-c",...) (SEC-C1). Route
init-step exec through shellutil.SanitizedBashCommand and add
sanitizeHostname() to strip shell metacharacters from {{hostname}}-class
template vars before substitution.
New regression tests: TestRunInitStepsSetsBeadsActor, TestSanitizeHostname.
Refs: soc-jhxr
* fix(autodev): replace vague 'validation failed' with a concrete summary
outputAutodevValidateResult returned fmt.Errorf("validation failed")
after already printing the detailed INVALID/ERROR lines -- a redundant,
content-free wrapper. Return a summary naming the file and the
validation-error count instead (COPY-C1, epic soc-ab5g).
Refs: soc-mpzu
* docs(eval): strip internal Day-N cadence jargon from user-facing text
eval_task.go exposed internal sprint labels ("Day-2 placeholder",
"Day-3 wires real launch", "Day-4 gate #4") in command Long
descriptions and flag help. Reword to describe current behavior
without the internal cadence (COPY-C2, epic soc-ab5g).
Refs: soc-iy7p
* fix(cli): reject unknown subcommands on group commands
Group-parent commands (daemon, beads, codex, constraint, factory,
goals, hooks, ratchet, rpi, session) had no Args validator, so an
unknown subcommand printed help to stdout and exited 0 -- breaking
`if ao rpi <bad>; then ...` scripting. Add Args: cobra.NoArgs to all
ten; unknown subcommands now exit 1 with the error on stderr
(CLI-C1, epic soc-ab5g).
Refs: soc-mlqe
* docs(cli): regenerate COMMANDS.md after eval-task help copy edit
* fix(daemon): contain dream output_dir against path traversal
DreamRunJobSpec/DreamStageJobSpec/DreamStageManifest Validate() only
TrimSpace-checked output_dir, leaving the operator-supplied job payload
free to redirect summary/log writes outside the intended tree.
validateOutputDir now rejects ".." traversal in all three Validate()
paths; outputDirContained rejects an absolute output_dir resolving
outside the daemon working tree, checked in DreamExecutor.RunJob before
MkdirAll. Containment checks: 1 (symlink only) → 3 (symlink + .. + abs).
Closes soc-ly33 (SEC-C2, epic soc-ab5g).
* fix(cli): wire ao --version flag and unify goals --json with -o
rootCmd had no Version field, so `ao --version` was unsupported even
though an `ao version` subcommand existed. Set rootCmd.Version = version
(the ldflags-injected build var) so the standard --version flag works.
goals registered its own local --json bool, disconnected from the
global -o/--output flag — `ao goals measure -o json` was ignored. Drop
goalsJSON; goalsJSONOutput() now reads GetOutput(), the sibling pattern
used by agentopsd.go, autodev.go, codex.go and ~40 other callsites. The
global --json persistent flag is inherited, so `ao goals --json` still
works; output paths honored by goals: 1 (local bool) → 2 (--json + -o).
Closes soc-nx1o (CLI-C2, epic soc-ab5g).
* perf(cli): collapse tmux probe storm in ao rpi status
checkTmuxSessionAlive forked `tmux has-session` up to 3 times per
non-terminal run, each with a 2s timeout — a status scan over N runs
issued 3N subprocesses and could stall ~6N seconds when tmux was slow
or absent.
probeTmuxSessions now runs one `tmux ls -F #{session_name}`, memoized
per process behind a mutex-guarded cache; tmuxSessionAlive filters the
snapshot in Go. resolveRPIToolchainDefaults collapses from per-run to
once. Subprocesses per status scan: 3N → 1.
Closes soc-d7v5 (PERF-C1, epic soc-ab5g). Mirrors the snapshot-then-
filter shape used elsewhere for batch probes.
* perf(cli): one-pass git capture + walk-once index in ao beads audit
ao beads audit re-shelled git per bead (one `git log --grep` per bead,
one `git log --since` per bead-path pair) and re-walked the worktree
per pattern (recordAuditStaleFinding probes up to 10 patterns/bead, so
up to 10N full-repo walks for N beads).
captureAuditCommits now runs a single `git log --all --name-only`,
parsed into auditCommit records; grepCommitsForID and
fileChangesSinceCommits filter that slice in Go. repoContentCache walks
the scoped roots once (lazily) and memoizes a path->content map shared
across every pattern probe. git subprocesses per audit: O(beads) → 1;
repo walks: O(10*beads) → 1. Mirrors the snapshot-then-filter shape
just applied to ao rpi status.
Closes soc-2grz (PERF-C2, epic soc-ab5g).
* fix(schemas): declare schema_version const in 15 unversioned schemas
15 of 34 schemas under schemas/ carried versioned filenames (or implied
a stable contract) without a machine-readable schema_version, so a
consumer could not detect the version from the payload alone.
Each now declares an optional schema_version integer const, mirroring
the shape in schemas/bead.v1.schema.json: const 1 for every schema
except skill-frontmatter.v2 (const 2). The field is intentionally left
out of "required" so existing documents without it still validate —
non-breaking. scenario.v1 keeps its legacy "version" field alongside.
Schemas declaring schema_version: 19/34 → 34/34.
Closes soc-wzgo (API-C2, epic soc-ab5g).
* docs(contracts): regenerate context-map after merging main
The merge of origin/main pulled a discovery SKILL.md description edit
without its companion context-map regeneration, so
validate-context-map-drift flagged 1 stale line. Regenerated via
scripts/generate-context-map.sh. Drifted lines: 1 → 0.
2026-05-16 11:05:36 -04:00
--inspect-command string Inspect command recorded into the Run manifest (not executed yet)
2026-05-02 08:20:17 -04:00
--inspect-version string Inspect AI version stamped into manifest (default "0.3.216")
--model-spec string ModelSpec id (already captured via ao eval models capture)
--n-samples int Override Suite.n_samples
--quick Mark Run as quick_session=true (excluded from --vs auto-baseline pool)
--rig-id string Rig identifier stamped into the Run manifest
--sample-split string Sample split (dev|holdout); default from suite
--seeds string Comma-separated seeds (>=3, per §4)
--suite string Suite id or path to suite.yaml (required)
```
##### `ao eval task show`
Print a registered Task summary
```
ao eval task show <task-id> [flags]
```
2026-04-24 22:27:11 -04:00
---
2026-04-11 17:23:33 -04:00
### `ao evolve`
Run the v2 autonomous improvement loop.
```
2026-05-21 11:56:04 -04:00
ao evolve [command]
2026-04-11 17:23:33 -04:00
```
**Flags: **
```
--auto-clean Run stale RPI cleanup before each phased cycle
--auto-clean-stale-after duration Only auto-clean runs older than this age (default 24h0m0s)
--bd-sync-policy string Legacy bd landing checkpoint policy: auto|always|never (auto/always run 'bd export -o /dev/null' on current bd releases) (default "auto")
--cleanup-prune-branches Run legacy branch cleanup during supervisor cleanup
--cleanup-prune-worktrees Run git worktree prune during supervisor cleanup (default true)
--command-timeout duration Timeout for supervisor external commands (git/bd/gate scripts) (default 20m0s)
--compile Enable Compile producer cadence before queue selection
--compile-defrag Run defrag sweep after Compile mine producer tick
--compile-interval duration Minimum interval between Compile producer ticks (0 = every cycle) (default 30m0s)
--compile-since string Lookback window for Compile mine producer (default "26h")
--cycle-delay duration Delay between completed cycles
--cycle-retries int Automatic retry count per cycle after a failed attempt
--detached-branch-prefix string Branch prefix used by detached HEAD self-heal (default "codex/auto-rpi")
--detached-heal Auto-create/switch to a named branch when HEAD is detached
--ensure-cleanup Run stale-run cleanup after each cycle (cleanup guarantee)
--failure-policy string Cycle failure policy: stop|continue (default "stop")
--gate-fast-script string Fast validation gate script path (default "scripts/validate-go-fast.sh")
--gate-policy string Quality/security gate policy: off|best-effort|required (default "off")
--gate-security-script string Security gate script path (default "scripts/security-gate.sh")
-h, --help help for evolve
--kill-switch-path string Supervisor kill-switch file path checked at cycle boundaries (absolute or repo-relative) (default ".agents/rpi/KILL")
--landing-branch string Landing target branch (empty resolves origin/HEAD, then current branch, then main)
--landing-commit-message string Commit message template for landing policies that commit (default "chore(rpi): autonomous cycle {{cycle}}")
--landing-lock-path string Landing lock file path for synchronized integration (absolute or repo-relative) (default ".agents/rpi/landing.lock")
--landing-policy string Landing policy after successful cycle: off|commit|sync-push (default "off")
--lease Acquire a single-flight supervisor lease lock before running
--lease-path string Lease lock file path (absolute or repo-relative) (default ".agents/rpi/supervisor.lock")
--lease-ttl duration Lease heartbeat TTL for supervisor lock metadata (default 2m0s)
--max-cycles int Maximum cycles (0 = unlimited, stop when queue empty)
2026-05-21 12:21:51 -04:00
--mode string Execution contract: 'burst' (default, agent self-regulates) or 'loop' (operator-driven; STOP markers mechanically refused) (default "burst")
2026-04-11 17:23:33 -04:00
--ralph Enable Ralph-mode preset for unattended external loop supervision (implies supervisor defaults with safe nonstop settings)
--repo-filter string Only process queue items targeting this repo (empty = all)
--retry-backoff duration Backoff between cycle retry attempts (default 30s)
--supervisor Enable autonomous supervisor mode (lease lock, self-heal, retries, gates, cleanup) (default true)
```
2026-05-21 11:56:04 -04:00
**Subcommands: **
feat(evolve): Phase 2 of /evolve --mode=loop — ladder + cron self-adjust + typed blocked events (soc-g2qd #phase-2) (#397)
## Why
Phase 2 of soc-g2qd: ship the CLI enforcement primitives the skill's
prompt-text alone can't guarantee.
| Bead | What it gives the operator-loop |
|---|---|
| soc-mlbm | `ao evolve next-work` — 5-step programmatic ladder; agent
stops guessing what to claim next |
| soc-un0m | `ao cron self-adjust` — renders cron template + emits JSON
spec; replaces manual CronList/Delete/Create per cycle |
| soc-g34d | `ao evolve blocked` — typed blocked events at
`.agents/evolve/blocked.jsonl`; agent logs rather than halts |
## What changed
| Surface | Change |
|---|---|
| `cli/cmd/ao/evolve_next_work.go` + `_test.go` | New subcommand + L2
integration tests |
| `cli/internal/evolve/ladder/` | 5-step ladder package (shape_filter,
grep_siblings, primitive_test, cross_hop_pickup, bug_fallback) with
table-driven unit tests |
| `cli/cmd/ao/cron.go` | New top-level `ao cron` command |
| `cli/cmd/ao/cron_self_adjust.go` + `_test.go` | New subcommand; calls
`evolve.VerifyMarkers` + `evolve.Render` from #394; writes audit row to
`.agents/evolve/cron-history.jsonl`; emits JSON spec to stdout (harness
orchestrates CronCreate) |
| `cli/cmd/ao/evolve_blocked.go` + `_test.go` | New subcommand:
`--reason` (write), `--list [--tail N] [--json]` (read), `--clear
<cycle>` (operator) |
| Generated: `cli/docs/COMMANDS.md`, `registry.json`,
`docs/cli-skills-map.md` | Regen for 3 new subcommands |
| `evals/agentops-core/cli-command-surface-matrix.json` + smoke fixture
| Counts bumped 73/199/272 → 74/202/276 |
## How tested
- L2 integration: each new subcommand has L2 tests using fixture
workspaces
- L1 unit: 5-step ladder per-step table tests + JSONL schema validation
on blocked records
- Mechanical: `go test ./cli/...` 0 → 0 failures;
cli-command-surface-smoke.sh `cli-help-matrix-ok`;
check-no-tracked-agents.sh exits 0
## Counts
CLI heading counts: top 73 → 74, sub 199 → 202, all 272 → 276.
Sibling pattern: `cron-history.jsonl` + `blocked.jsonl` follow the
cycle-history.jsonl JSONL append-only shape from soc-5qit. Ladder
structure mirrors the in-prompt cascade in `references/scout-mode.md` —
making it programmatic per §A5.
[no-sibling for cron-self-adjust] First-of-kind: no prior subcommand
emits a cron-spec JSON for harness orchestration. The CLI does the safe
work (template render + marker verify + audit row); the harness owns
CronCreate.
See: `docs/plans/2026-05-21-evolve-loop-epic-design.md` §A4, §A5, §A6
Closes-scenario: soc-mlbm#next-work-ladder
Closes-scenario: soc-un0m#cron-self-adjust
Closes-scenario: soc-g34d#typed-blocked-events
Bounded-context: BC5-Runtime
Evidence: cli/cmd/ao/evolve_next_work.go
2026-05-21 14:09:41 -04:00
#### `ao evolve blocked`
Record or inspect typed blocked-events emitted by the /evolve loop.
```
ao evolve blocked [flags]
```
**Flags: **
```
--bead string Bead id the agent was working on (write mode, optional)
--clear string Clear mode: delete entries for the given cycle id (operator-only)
--cycle string Override cycle-id (write mode; defaults to date-derived counter)
-h, --help help for blocked
--json Read mode: emit JSON instead of human-readable text
--ladder-step-failed int Ladder step that failed (write mode, optional)
--list Read mode: list blocked events
--needed-context string Missing context description (write mode, optional)
--reason string Reason text (write mode)
--tail int Read mode: show last N entries (default 10)
```
2026-05-21 11:56:04 -04:00
#### `ao evolve config`
Display the resolved per-repo /evolve preferences.
```
ao evolve config [flags]
```
**Flags: **
```
-h, --help help for config
--json Emit JSON instead of YAML
--show Print the resolved preferences (defaults + preferences.yaml)
```
feat(evolve): Phase 2 of /evolve --mode=loop — ladder + cron self-adjust + typed blocked events (soc-g2qd #phase-2) (#397)
## Why
Phase 2 of soc-g2qd: ship the CLI enforcement primitives the skill's
prompt-text alone can't guarantee.
| Bead | What it gives the operator-loop |
|---|---|
| soc-mlbm | `ao evolve next-work` — 5-step programmatic ladder; agent
stops guessing what to claim next |
| soc-un0m | `ao cron self-adjust` — renders cron template + emits JSON
spec; replaces manual CronList/Delete/Create per cycle |
| soc-g34d | `ao evolve blocked` — typed blocked events at
`.agents/evolve/blocked.jsonl`; agent logs rather than halts |
## What changed
| Surface | Change |
|---|---|
| `cli/cmd/ao/evolve_next_work.go` + `_test.go` | New subcommand + L2
integration tests |
| `cli/internal/evolve/ladder/` | 5-step ladder package (shape_filter,
grep_siblings, primitive_test, cross_hop_pickup, bug_fallback) with
table-driven unit tests |
| `cli/cmd/ao/cron.go` | New top-level `ao cron` command |
| `cli/cmd/ao/cron_self_adjust.go` + `_test.go` | New subcommand; calls
`evolve.VerifyMarkers` + `evolve.Render` from #394; writes audit row to
`.agents/evolve/cron-history.jsonl`; emits JSON spec to stdout (harness
orchestrates CronCreate) |
| `cli/cmd/ao/evolve_blocked.go` + `_test.go` | New subcommand:
`--reason` (write), `--list [--tail N] [--json]` (read), `--clear
<cycle>` (operator) |
| Generated: `cli/docs/COMMANDS.md`, `registry.json`,
`docs/cli-skills-map.md` | Regen for 3 new subcommands |
| `evals/agentops-core/cli-command-surface-matrix.json` + smoke fixture
| Counts bumped 73/199/272 → 74/202/276 |
## How tested
- L2 integration: each new subcommand has L2 tests using fixture
workspaces
- L1 unit: 5-step ladder per-step table tests + JSONL schema validation
on blocked records
- Mechanical: `go test ./cli/...` 0 → 0 failures;
cli-command-surface-smoke.sh `cli-help-matrix-ok`;
check-no-tracked-agents.sh exits 0
## Counts
CLI heading counts: top 73 → 74, sub 199 → 202, all 272 → 276.
Sibling pattern: `cron-history.jsonl` + `blocked.jsonl` follow the
cycle-history.jsonl JSONL append-only shape from soc-5qit. Ladder
structure mirrors the in-prompt cascade in `references/scout-mode.md` —
making it programmatic per §A5.
[no-sibling for cron-self-adjust] First-of-kind: no prior subcommand
emits a cron-spec JSON for harness orchestration. The CLI does the safe
work (template render + marker verify + audit row); the harness owns
CronCreate.
See: `docs/plans/2026-05-21-evolve-loop-epic-design.md` §A4, §A5, §A6
Closes-scenario: soc-mlbm#next-work-ladder
Closes-scenario: soc-un0m#cron-self-adjust
Closes-scenario: soc-g34d#typed-blocked-events
Bounded-context: BC5-Runtime
Evidence: cli/cmd/ao/evolve_next_work.go
2026-05-21 14:09:41 -04:00
#### `ao evolve next-work`
Run the 5-step next-work ladder and recommend a bead to claim.
```
ao evolve next-work [flags]
```
**Flags: **
```
--bd-binary string Override path to the 'bd' binary (default: resolves via PATH)
-h, --help help for next-work
--include-operator-shape Do not filter operator-shape beads at step 1
--json Emit JSON instead of human-readable text
--mode string Execution contract: 'burst' (default) or 'loop' (default "burst")
```
2026-05-21 12:21:51 -04:00
#### `ao evolve write-stop-marker`
Write a DORMANT, STOP, or KILL marker under .agents/evolve/.
```
ao evolve write-stop-marker [flags]
```
**Flags: **
```
-h, --help help for write-stop-marker
--marker string Marker name: dormant, stop, or kill
--mode string Execution contract: 'burst' or 'loop' (loop refuses unconditionally) (default "burst")
--reason string Reason text written to the marker file
```
2026-04-11 17:23:33 -04:00
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao feedback-loop`
2026-02-26 05:48:41 -05:00
Automatically close the MemRL feedback loop by updating utilities of cited learnings.
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao feedback-loop [flags]
2026-02-21 19:41:50 -05:00
```
2026-02-26 05:48:41 -05:00
**Flags: **
```
--alpha float EMA learning rate (default 0.1)
--citation-type string Filter citations by type (retrieved, applied, all) (default "retrieved")
2026-05-07 09:06:51 -04:00
--drain Walk citations.jsonl and feed entries with zero feedback_at sentinel (idempotent)
--drain-reward float Neutral reward applied to drained citations (0.0-1.0) (default 0.5)
2026-02-26 05:48:41 -05:00
-h, --help help for feedback-loop
--reward float Override reward value (0.0-1.0); -1 = compute from transcript (default -1)
--session string Session ID to process
--transcript string Path to transcript for reward computation
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao goals`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Track, measure, and validate project fitness goals.
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao goals [command]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
fix: resolve 32 vibe findings (2 critical, 7 high, 12 medium, 11 low)
Fix all findings from the v2.17.0..HEAD vibe review across 12 source files:
Critical: panic guards for negative budget in truncateToCharBudget and
dead prefix slice in generateArtifactID. High: bead override in batch
extract, json file counting in metrics, constraint index.json exclusion,
complexity reduction in curate status/verify (38→<25), flexible hook
script count assertion. Medium: truncate panic guards, error logging for
silent failures, null→[] JSON output, goals auto-detect (GOALS.md then
GOALS.yaml), raw var→getter usage, truncate-before-lock race fix. Low:
scanner.Err() checks, os.Stdout→cmd.OutOrStdout(), dry-run output
differentiation.
Docs: 5 missing INDEX.md concept links, curation-pipeline v1 status
callout. Tests: new TestSeed_DryRun_JSON. Regen: COMMANDS.md, embedded
hooks synced. All gates pass: build, vet, test, gocyclo, heal, doc-gate.
2026-02-24 16:51:26 -05:00
--file string Path to goals file (auto-detects GOALS.md then GOALS.yaml)
2026-02-23 12:32:23 -05:00
-h, --help help for goals
2026-04-13 14:15:32 -04:00
--timeout int Check timeout in seconds (default 240)
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
#### `ao goals measure`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Run goal checks and produce a snapshot
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao goals measure [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
measure, m
```
2026-02-21 19:41:50 -05:00
**Flags: **
```
2026-04-26 06:13:00 +00:00
--directives Output directives as JSON (skip gate checks)
--exclude-tag string Skip goals whose Tags include this value (e.g. long-cycle)
--goal string Measure a single goal by ID
-h, --help help for measure
Executable spec layer (epic soc-58nt, F2–F5): GOALS as BDD acceptance criteria (#292)
* feat(goals): F2.0 scenario-result artifact contract + producer/writer
bead: soc-58nt.2.6
* docs(goals): F4.0 trace link convention ADR-0005
bead: soc-58nt.4.8
* docs(goals): F3.0 domain-slice manifest contract + ADR-0004
bead: soc-58nt.3.8
- schemas/domain-slice-manifest.v1.schema.json: JSON Schema (draft/2020-12,
additionalProperties:false) for domain-slice manifests. All required fields:
domain, version, bounded_context, directive_ids (d-<slug> pattern), scenario_ids,
context_roots, allowed_read_globs, denied_read_globs, validation_commands, owner.
- docs/adr/ADR-0004-domain-slice-manifest-contract.md: records four decisions:
(A) command shape is ao rpi phased --domain <name>; (B) manifest is durable
tracked artifact at docs/domains/<name>/manifest.yaml; (C) reconciles with the
domain skill (vocabulary), context-map.md (architecture view), and skill
frontmatter — no overlap; (D) Go model named domainSliceManifest, explicitly
distinct from rpi_phased_manifest.go's phaseManifest. Cross-references ADR-0003.
- docs/domains/README.md: explains the directory, field table, relationship to
the three pre-existing domain surfaces, and how to add a new slice.
- docs/domains/example/manifest.yaml: fully populated example; validated against
the schema via jsonschema (PASSED).
* feat(goals): F2.1 scenario-result aggregation reader
bead: soc-58nt.2.1
* feat(rpi): F3.1 domainSliceManifest model + loader
Implements the domainSliceManifest Go model and loader in
cli/internal/domainslice/ per the F3.0 contract (ADR-0004, Decision D).
Uses gopkg.in/yaml.v3 with KnownFields(true) to reject unknown fields,
mirrors the schema's additionalProperties:false. Validates all required
fields, directive_id pattern (^d-[a-z0-9][a-z0-9-]*$), context_roots
minItems:1, and validation_commands sub-fields with field-named errors.
Explicitly distinct from phaseManifest (rpi_phased_manifest.go).
28 tests pass (L1 unit + L2 fixture round-trip via docs/domains/example/manifest.yaml).
bead: soc-58nt.3.1
* feat(goals): F4.1 read-only executable-spec trace graph walker
bead: soc-58nt.4.1
* feat(goals): F2.2 per-directive scenario_satisfaction + threshold verdict
bead: soc-58nt.2.2
* feat(rpi): F3.2 ao rpi phased --domain scoping
bead: soc-58nt.3.2
* feat(goals): F4.2/F4.3 ao goals trace --from / --orphans
beads: soc-58nt.4.2 soc-58nt.4.3
* feat(goals): F4.4 ao goals render — GOALS.md to Gherkin
bead: soc-58nt.4.4
* feat(rpi): F3.3a domain-scope audit evidence
bead: soc-58nt.3.3
* feat(goals): F2.3 scenario_satisfaction JSON field + --scenarios-only
Per-directive scenario satisfaction added to ao goals measure: 0 -> 8
new JSON fields and a --scenarios-only mode that skips gate execution.
bead: soc-58nt.2.3
* feat(rpi): F3.4 ao rpi phased --scaffold-domain
bead: soc-58nt.3.4
* test(goals): commit missing goals-trace scenario-results fixture
The F4.1/F4.2 walker tests reference a scenario-results.json fixture under
a gitignored .agents/ subpath; it was never force-added and a clean
checkout (and CI) lacks it, failing 5 scenario_result tests. Force-add it.
bead: soc-58nt.4.1
* fix(goals): F4.1 tighten goalstrace scenario-claim heuristic
bead: soc-58nt.4.9
- Tighten scenarioTokenRe: auto- tokens now require at least two
hyphen-separated slug segments (auto-X-Y…), so single-word English
compounds like auto-merge and auto-update are no longer matched.
- Downgrade broken_bead_scenario_claim from error to warning when the
claim comes from a heuristic (ConfidenceLow) free-text match; per
ADR-0005 §4.1 only an explicit Scenarios: line constitutes a broken
explicit link and may produce an error.
- Add beads_test.go with table-driven tests covering: English auto-*
false-positive rejection, real multi-segment auto-* ID detection,
explicit missing scenario → error, heuristic missing → warning only,
resolvable scenario → no defect, end-to-end Walk with auto-merge bead
produces no error-severity finding.
* test(goals): F2.T1 regression-coverage audit + gap fill
bead: soc-58nt.2.4
* ci(goals): F1.6 wire executable-spec link lint + trace-orphans (warn-first)
bead: soc-58nt.1.9
* feat(rpi): F3.3b runtime hook enforcement of domain scope
bead: soc-58nt.3.9
* test(goals): F2.T2 e2e script for scenario-satisfaction gate
bead: soc-58nt.2.5
* docs(goals): F5.0 re-steer policy + mutation-safety contract (ADR-0006)
bead: soc-58nt.5.9
* docs(goals): fix streak-reset prose in ADR-0006 (cleanup)
bead: soc-58nt.5.9
[no-sibling] prose fixup only, no structural change
0 → 0 schema fields changed
* test(goals): F4.T1 regression-coverage audit + gap fill
bead: soc-58nt.4.6
* feat(wiki): land wiki bounded context waves 1-4 (epic soc-behj)
Phased strangler consolidating ao's .agents/-touching logic into one
cli/internal/wiki bounded context. Each wave gated by the 102 cmd/ao
integration tests staying green; legacy command surface untouched.
- W1 soc-1lju FrontmatterCodec — all 5 frontmatter parsers delegate
- W2 soc-36lw CorpusLocator — agentsDirIn moved, 17 call sites migrated
- W2 soc-f4tr Artifact + Claim domain types with subtype invariants
- W3 soc-vot0 persistent WikiIndex — JSONL, incremental by content-hash
- W3 soc-r08p FreshnessPolicy — claim-level evidence-driven freshness
- W4 soc-ijp8 WikiPipeline — subsumes llmwiki loop, 3 stages wired
- W4 soc-q50a port conformance suite
Also anchors .gitignore's bare wiki/ pattern with a !cli/internal/wiki/
negation — the new package was being silently ignored.
Wave 5 (ao wiki command group) is not included in this commit.
* test(goals): F4.T2 e2e script for trace chain
bead: soc-58nt.4.7
* test(rpi): F3.T1 regression-coverage audit + gap fill
bead: soc-58nt.3.6
* test(rpi): F3.T2 e2e script for domain-scoped RPI
bead: soc-58nt.3.7
* feat(goals): F5.1 verdict ledger schema + writer
bead: soc-58nt.5.1
* feat(goals): F5.2 re-steer policy engine + verdict-ledger producer hookup
bead: soc-58nt.5.2
* feat(goals): F5.4 feedback-to-learning compiler
Adds cli/internal/feedbackcompiler — scans the verdict ledger for
fail->pass directive transitions and drafts a learning entry in
docs/learnings/ for each transition found. Drafts carry status: draft
and directive_id frontmatter (ADR-0005 §2.6). Never auto-promotes.
Idempotent: skips existing drafts on re-run.
Also documents the auto-draft workflow in
skills/forge/references/feedback-compiler-drafts.md with a compact
reference-link in skills/forge/SKILL.md (under 248-line limit).
Synced to skills-codex/forge/ and regenerated codex hashes.
bead: soc-58nt.5.4
* docs(goals): F5.5 compound-engineering retro in /post-mortem
Extend the /post-mortem skill with a Compound-Engineering Retro section
that compares iteration N vs N-1 for a domain slice using the F5.1 verdict
ledger (.agents/goals/verdict-ledger.json). The mode emits a comparative
delta — directives that improved (fail→pass, satisfaction up), regressed
(pass→fail, satisfaction down), or held stable — plus learning yield since
N-1, written as a status:draft learning to .agents/learnings/.
Detailed step-by-step procedure (CE.0–CE.5) lives in
references/compound-engineering-retro.md; SKILL.md carries a compact
trigger/commands summary and links to it. Both files synced to
skills-codex/post-mortem/ with updated codex hashes.
bead: soc-58nt.5.5
* feat(goals): F5.3 ao goals steer --auto with human-gated confirmation
bead: soc-58nt.5.3
* test(goals): F5.T1 regression-coverage audit + gap fill
bead: soc-58nt.5.7
* test(goals): F5.T2 e2e script for auto re-steer
bead: soc-58nt.5.8
* docs(goals): F2.4 docs regen for scenario-satisfaction gate + epic CLI artifacts
Regenerate cli/docs/COMMANDS.md and registry.json from a clean worktree at
HEAD so the soc-58nt command surface is documented without leaking unrelated
peer WIP into the generated docs.
F2 (soc-58nt.2.7): document scenario_satisfaction JSON shape, --scenarios-only,
result-artifact resolution, and exit codes in skills/goals/SKILL.md +
references/executable-spec-chain.md; cross-ref ao goals measure/trace from
skills/scenario/SKILL.md.
Epic-wide artifacts also landed here because they regenerate atomically across
F2-F5: COMMANDS.md/registry.json (all new ao goals/rpi surface), cli-skills-map
heading count, skills-codex hashes, ADR-0004/0005/0006 documentation-index
links, and the F2-F5 e2e CI lanes in validate.yml.
ao capabilities and ao robot-docs need no manual edits — both build their
command/flag surface from the live cobra tree, so new commands register
automatically (Global Rule G5 satisfied by construction).
bead: soc-58nt.2.7
* docs(domain): F3.5 domain-as-loop docs for domain-scoped RPI
Document the domain-slice runtime in skills/domain/SKILL.md (a "Domain as a
scoped RPI loop" section connecting the Slice primitive to ao rpi phased
--domain / --scaffold-domain / --force) and add the Domain-Slice row to the
modes table in skills/scaffold/SKILL.md, mirroring the existing Project/
Component/CI mode-row shape. The scaffold skill's Domain-Slice Mode section
already covered the workflow; this lands the missing modes-table entry so the
mode count is 3 -> 4.
The COMMANDS.md/registry/CI-lane regen for F3 landed in soc-58nt.2.7.
skills-codex hashes for the two changed skills refreshed via
scripts/regen-codex-hashes.sh; codex-parity audit clean.
bead: soc-58nt.3.5
* docs(goals): F5.6 re-steer loop docs in /post-mortem
Cross-reference the auto re-steer loop from the Compound-Engineering Retro
section of skills/post-mortem/SKILL.md: when the compound retro names a
chronically regressing directive, ao goals steer recommend prints
policy-driven directive mutations from the same verdict ledger and ao goals
steer apply writes the mutation to GOALS.md, human-gated via the non-lossy
patcher (ADR-0006). Mirrors the existing "closing the loop" cross-ref shape
used elsewhere in the skill's See Also prose.
The ao goals steer recommend/apply COMMANDS.md surface, the F5 e2e CI lane,
and the ADR-0006 documentation-index link landed atomically in soc-58nt.2.7's
epic-wide regen; the re-steer contract detail lives in
skills/goals/references/executable-spec-chain.md (also in 2.7).
skills-codex/post-mortem hash refreshed; codex-parity audit clean.
bead: soc-58nt.5.6
* docs(goals): F4.5 docs regen for goals trace + render (epic-subsumed)
F4's docs deliverables — the `ao goals trace` and `ao goals render` entries in
cli/docs/COMMANDS.md, the F4 trace-chain e2e CI lane in validate.yml, the
ADR-0005 documentation-index link, and the Trace/Render mode sections plus the
trace contract in skills/goals/SKILL.md + references/executable-spec-chain.md —
all co-landed atomically in soc-58nt.2.7's epic-wide CLI-reference regen
(commit 37798abe), because COMMANDS.md/registry.json regenerate as one unit
across F2-F5 and cannot be split per-bead.
This empty commit records soc-58nt.4.5 as complete with no further file
changes. Matches the epic-subsumed-bead convention: regen artifacts land once,
later beads point at the lead regen commit.
bead: soc-58nt.4.5
* test(goals): fix flag-global leak breaking full goals-measure run
TestGoalsIntegration ran 'goals measure --directives' via cobra, which
sets the package-global goalsMeasureDirectives and never resets it.
soc-58nt's new TestGoalsMeasure_FullMode* tests branch on that global,
so the unfiltered 'go test ./cmd/ao/...' run failed (gates skipped,
directives array emitted instead of the full snapshot+scenarios object).
-run filters masked it. Restore the global after Execute.
bead: soc-58nt.2.4
* fix(ci): correct soc-58nt skill/codex artifacts and CI-policy parity
Resolves 6 red CI checks on PR #292 (crank/soc-58nt) after merging main:
- skill-integrity: reword the "no scaffold subcommand" note in
skills/scaffold/SKILL.md so it no longer trips the heal INVALID_AO_CMD
substring check; copy skills/forge/references/examples.md into
skills-codex/forge/references/ so the codex forge dead-link clears.
- validate-codex-generated-artifacts: strip leaked non-Codex frontmatter
from skills-codex/forge/SKILL.md down to name + description.
- validate-codex-runtime-sections: remove the residual mixed-runtime
"Cross-vendor analog" line (Anthropic Managed Agents) from codex forge;
convert /forge slash-command refs to $forge Codex invocation style.
- validate-ci-policy-parity: add executable-spec-link-integrity
(non-blocking) to the AGENTS.md non-blocking list so it matches the
workflow's continue-on-error classification (warn-only F1.6 gate added
by soc-58nt without parity co-update).
- doc-release-gate: the link-validation broken link was the same codex
forge references/examples.md dead link, fixed above.
- agentops-contract-canaries: update the cli-command-surface canary
fixture + eval JSON for the 185->187 / 257->259 subcommand count after
soc-58nt added `ao goals render` and `ao goals trace`.
Also ports the soc-58nt "Closing the loop with re-steer" paragraph into
skills-codex/post-mortem/SKILL.md and regenerates codex artifact hashes
and registry.json after the merge.
* fix(test): set repo-local git identity in rpi-phased-domain e2e
CI runners have no global git identity; the temp-repo 'git commit' in the
F3.7 e2e exited 128 (empty ident name). Configure a repo-local identity.
bead: soc-58nt.3.7
* fix(goals): use canonical practice slug bdd-gherkin
soc-58nt files cited the practice slug 'bdd'; the canonical slug in
PRACTICE-REGISTRY.md is 'bdd-gherkin'. Clears the practice-citations
advisory check (9 invalid slug citations -> 0).
bead: soc-58nt.2.7
* fix(goals): add missing practices field to F5 gap-test file
goals_steer_auto_gap_test.go lacked a // practices: header; the
practice-citations --strict gate flags missing fields. Matches its
sibling goals_steer_auto_test.go.
bead: soc-58nt.5.7
* fix(security): resolve gosec G122 + golangci-lint errcheck/staticcheck HIGH findings
Drive scripts/security-gate.sh --mode quick to 0 HIGH findings.
gosec G122 (CWE-367 TOCTOU): goalstrace/artifacts.go reads files inside a
filepath.WalkDir callback via an os.Root-scoped handle (os.OpenRoot), closing
the check-to-use window and blocking symlink escape.
golangci-lint errcheck (~25): unchecked defer Close / os.Remove returns.
Resource-cleanup closes use explicit-ignore (defer func(){ _ = X.Close() }()).
Durability-gating closes before a rename (llm/review.go tmp.Close) are checked
and wrapped.
golangci-lint staticcheck (~21): ST1005 (drop trailing punctuation from error
strings), QF1001 (De Morgan's law), QF1002 (tagged switch), QF1012
(fmt.Fprintf over WriteString+Sprintf), S1016 (struct-literal -> conversion),
S1017 (strings.TrimSuffix), S1040 (drop redundant type assertion), SA1012
(context.TODO over nil Context), SA4032 (drop dead GOOS branch under build
constraint), SA9003 (remove empty branch).
* ci(security): make security-toolchain-gate blocking
Remove continue-on-error: true from the security-toolchain-gate job and drop
the "(advisory)" name suffix so a CRITICAL/HIGH security-gate finding fails
the validate summary job. The job is already in summary.needs, so removing
continue-on-error promotes it into the contains(needs.*.result,'failure')
fail-set.
AGENTS.md: drop security-toolchain-gate from the (non-blocking) prose list
and the Advisory Job Triage SLA table; update its CI-jobs-table row to
describe the blocking failure mode. validate-ci-policy-parity confirms the
AGENTS blocking set matches the workflow summary fail-set (7 non-blocking).
---------
Co-authored-by: Codex <codex@example.invalid>
2026-05-17 15:31:15 -04:00
--scenarios-only Evaluate only executable-spec scenario satisfaction; skip shell gate-command execution
2026-05-02 12:15:11 -04:00
--total-timeout int Overall measurement timeout in seconds (0 disables)
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao goals validate`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Validate GOALS.yaml structure and wiring
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao goals validate [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
validate, v
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao goals drift`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Compare snapshots for regressions
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao goals drift [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
drift, d
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao goals export`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Export latest snapshot as JSON (for CI)
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao goals export [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
export, e
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao goals history`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Show goal measurement history
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao goals history [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
history, h
```
2026-02-21 19:41:50 -05:00
**Flags: **
```
2026-02-23 12:32:23 -05:00
--goal string Filter history to a specific goal
-h, --help help for history
--since string Show entries since date (YYYY-MM-DD)
2026-02-21 19:41:50 -05:00
```
Executable spec layer (epic soc-58nt, F2–F5): GOALS as BDD acceptance criteria (#292)
* feat(goals): F2.0 scenario-result artifact contract + producer/writer
bead: soc-58nt.2.6
* docs(goals): F4.0 trace link convention ADR-0005
bead: soc-58nt.4.8
* docs(goals): F3.0 domain-slice manifest contract + ADR-0004
bead: soc-58nt.3.8
- schemas/domain-slice-manifest.v1.schema.json: JSON Schema (draft/2020-12,
additionalProperties:false) for domain-slice manifests. All required fields:
domain, version, bounded_context, directive_ids (d-<slug> pattern), scenario_ids,
context_roots, allowed_read_globs, denied_read_globs, validation_commands, owner.
- docs/adr/ADR-0004-domain-slice-manifest-contract.md: records four decisions:
(A) command shape is ao rpi phased --domain <name>; (B) manifest is durable
tracked artifact at docs/domains/<name>/manifest.yaml; (C) reconciles with the
domain skill (vocabulary), context-map.md (architecture view), and skill
frontmatter — no overlap; (D) Go model named domainSliceManifest, explicitly
distinct from rpi_phased_manifest.go's phaseManifest. Cross-references ADR-0003.
- docs/domains/README.md: explains the directory, field table, relationship to
the three pre-existing domain surfaces, and how to add a new slice.
- docs/domains/example/manifest.yaml: fully populated example; validated against
the schema via jsonschema (PASSED).
* feat(goals): F2.1 scenario-result aggregation reader
bead: soc-58nt.2.1
* feat(rpi): F3.1 domainSliceManifest model + loader
Implements the domainSliceManifest Go model and loader in
cli/internal/domainslice/ per the F3.0 contract (ADR-0004, Decision D).
Uses gopkg.in/yaml.v3 with KnownFields(true) to reject unknown fields,
mirrors the schema's additionalProperties:false. Validates all required
fields, directive_id pattern (^d-[a-z0-9][a-z0-9-]*$), context_roots
minItems:1, and validation_commands sub-fields with field-named errors.
Explicitly distinct from phaseManifest (rpi_phased_manifest.go).
28 tests pass (L1 unit + L2 fixture round-trip via docs/domains/example/manifest.yaml).
bead: soc-58nt.3.1
* feat(goals): F4.1 read-only executable-spec trace graph walker
bead: soc-58nt.4.1
* feat(goals): F2.2 per-directive scenario_satisfaction + threshold verdict
bead: soc-58nt.2.2
* feat(rpi): F3.2 ao rpi phased --domain scoping
bead: soc-58nt.3.2
* feat(goals): F4.2/F4.3 ao goals trace --from / --orphans
beads: soc-58nt.4.2 soc-58nt.4.3
* feat(goals): F4.4 ao goals render — GOALS.md to Gherkin
bead: soc-58nt.4.4
* feat(rpi): F3.3a domain-scope audit evidence
bead: soc-58nt.3.3
* feat(goals): F2.3 scenario_satisfaction JSON field + --scenarios-only
Per-directive scenario satisfaction added to ao goals measure: 0 -> 8
new JSON fields and a --scenarios-only mode that skips gate execution.
bead: soc-58nt.2.3
* feat(rpi): F3.4 ao rpi phased --scaffold-domain
bead: soc-58nt.3.4
* test(goals): commit missing goals-trace scenario-results fixture
The F4.1/F4.2 walker tests reference a scenario-results.json fixture under
a gitignored .agents/ subpath; it was never force-added and a clean
checkout (and CI) lacks it, failing 5 scenario_result tests. Force-add it.
bead: soc-58nt.4.1
* fix(goals): F4.1 tighten goalstrace scenario-claim heuristic
bead: soc-58nt.4.9
- Tighten scenarioTokenRe: auto- tokens now require at least two
hyphen-separated slug segments (auto-X-Y…), so single-word English
compounds like auto-merge and auto-update are no longer matched.
- Downgrade broken_bead_scenario_claim from error to warning when the
claim comes from a heuristic (ConfidenceLow) free-text match; per
ADR-0005 §4.1 only an explicit Scenarios: line constitutes a broken
explicit link and may produce an error.
- Add beads_test.go with table-driven tests covering: English auto-*
false-positive rejection, real multi-segment auto-* ID detection,
explicit missing scenario → error, heuristic missing → warning only,
resolvable scenario → no defect, end-to-end Walk with auto-merge bead
produces no error-severity finding.
* test(goals): F2.T1 regression-coverage audit + gap fill
bead: soc-58nt.2.4
* ci(goals): F1.6 wire executable-spec link lint + trace-orphans (warn-first)
bead: soc-58nt.1.9
* feat(rpi): F3.3b runtime hook enforcement of domain scope
bead: soc-58nt.3.9
* test(goals): F2.T2 e2e script for scenario-satisfaction gate
bead: soc-58nt.2.5
* docs(goals): F5.0 re-steer policy + mutation-safety contract (ADR-0006)
bead: soc-58nt.5.9
* docs(goals): fix streak-reset prose in ADR-0006 (cleanup)
bead: soc-58nt.5.9
[no-sibling] prose fixup only, no structural change
0 → 0 schema fields changed
* test(goals): F4.T1 regression-coverage audit + gap fill
bead: soc-58nt.4.6
* feat(wiki): land wiki bounded context waves 1-4 (epic soc-behj)
Phased strangler consolidating ao's .agents/-touching logic into one
cli/internal/wiki bounded context. Each wave gated by the 102 cmd/ao
integration tests staying green; legacy command surface untouched.
- W1 soc-1lju FrontmatterCodec — all 5 frontmatter parsers delegate
- W2 soc-36lw CorpusLocator — agentsDirIn moved, 17 call sites migrated
- W2 soc-f4tr Artifact + Claim domain types with subtype invariants
- W3 soc-vot0 persistent WikiIndex — JSONL, incremental by content-hash
- W3 soc-r08p FreshnessPolicy — claim-level evidence-driven freshness
- W4 soc-ijp8 WikiPipeline — subsumes llmwiki loop, 3 stages wired
- W4 soc-q50a port conformance suite
Also anchors .gitignore's bare wiki/ pattern with a !cli/internal/wiki/
negation — the new package was being silently ignored.
Wave 5 (ao wiki command group) is not included in this commit.
* test(goals): F4.T2 e2e script for trace chain
bead: soc-58nt.4.7
* test(rpi): F3.T1 regression-coverage audit + gap fill
bead: soc-58nt.3.6
* test(rpi): F3.T2 e2e script for domain-scoped RPI
bead: soc-58nt.3.7
* feat(goals): F5.1 verdict ledger schema + writer
bead: soc-58nt.5.1
* feat(goals): F5.2 re-steer policy engine + verdict-ledger producer hookup
bead: soc-58nt.5.2
* feat(goals): F5.4 feedback-to-learning compiler
Adds cli/internal/feedbackcompiler — scans the verdict ledger for
fail->pass directive transitions and drafts a learning entry in
docs/learnings/ for each transition found. Drafts carry status: draft
and directive_id frontmatter (ADR-0005 §2.6). Never auto-promotes.
Idempotent: skips existing drafts on re-run.
Also documents the auto-draft workflow in
skills/forge/references/feedback-compiler-drafts.md with a compact
reference-link in skills/forge/SKILL.md (under 248-line limit).
Synced to skills-codex/forge/ and regenerated codex hashes.
bead: soc-58nt.5.4
* docs(goals): F5.5 compound-engineering retro in /post-mortem
Extend the /post-mortem skill with a Compound-Engineering Retro section
that compares iteration N vs N-1 for a domain slice using the F5.1 verdict
ledger (.agents/goals/verdict-ledger.json). The mode emits a comparative
delta — directives that improved (fail→pass, satisfaction up), regressed
(pass→fail, satisfaction down), or held stable — plus learning yield since
N-1, written as a status:draft learning to .agents/learnings/.
Detailed step-by-step procedure (CE.0–CE.5) lives in
references/compound-engineering-retro.md; SKILL.md carries a compact
trigger/commands summary and links to it. Both files synced to
skills-codex/post-mortem/ with updated codex hashes.
bead: soc-58nt.5.5
* feat(goals): F5.3 ao goals steer --auto with human-gated confirmation
bead: soc-58nt.5.3
* test(goals): F5.T1 regression-coverage audit + gap fill
bead: soc-58nt.5.7
* test(goals): F5.T2 e2e script for auto re-steer
bead: soc-58nt.5.8
* docs(goals): F2.4 docs regen for scenario-satisfaction gate + epic CLI artifacts
Regenerate cli/docs/COMMANDS.md and registry.json from a clean worktree at
HEAD so the soc-58nt command surface is documented without leaking unrelated
peer WIP into the generated docs.
F2 (soc-58nt.2.7): document scenario_satisfaction JSON shape, --scenarios-only,
result-artifact resolution, and exit codes in skills/goals/SKILL.md +
references/executable-spec-chain.md; cross-ref ao goals measure/trace from
skills/scenario/SKILL.md.
Epic-wide artifacts also landed here because they regenerate atomically across
F2-F5: COMMANDS.md/registry.json (all new ao goals/rpi surface), cli-skills-map
heading count, skills-codex hashes, ADR-0004/0005/0006 documentation-index
links, and the F2-F5 e2e CI lanes in validate.yml.
ao capabilities and ao robot-docs need no manual edits — both build their
command/flag surface from the live cobra tree, so new commands register
automatically (Global Rule G5 satisfied by construction).
bead: soc-58nt.2.7
* docs(domain): F3.5 domain-as-loop docs for domain-scoped RPI
Document the domain-slice runtime in skills/domain/SKILL.md (a "Domain as a
scoped RPI loop" section connecting the Slice primitive to ao rpi phased
--domain / --scaffold-domain / --force) and add the Domain-Slice row to the
modes table in skills/scaffold/SKILL.md, mirroring the existing Project/
Component/CI mode-row shape. The scaffold skill's Domain-Slice Mode section
already covered the workflow; this lands the missing modes-table entry so the
mode count is 3 -> 4.
The COMMANDS.md/registry/CI-lane regen for F3 landed in soc-58nt.2.7.
skills-codex hashes for the two changed skills refreshed via
scripts/regen-codex-hashes.sh; codex-parity audit clean.
bead: soc-58nt.3.5
* docs(goals): F5.6 re-steer loop docs in /post-mortem
Cross-reference the auto re-steer loop from the Compound-Engineering Retro
section of skills/post-mortem/SKILL.md: when the compound retro names a
chronically regressing directive, ao goals steer recommend prints
policy-driven directive mutations from the same verdict ledger and ao goals
steer apply writes the mutation to GOALS.md, human-gated via the non-lossy
patcher (ADR-0006). Mirrors the existing "closing the loop" cross-ref shape
used elsewhere in the skill's See Also prose.
The ao goals steer recommend/apply COMMANDS.md surface, the F5 e2e CI lane,
and the ADR-0006 documentation-index link landed atomically in soc-58nt.2.7's
epic-wide regen; the re-steer contract detail lives in
skills/goals/references/executable-spec-chain.md (also in 2.7).
skills-codex/post-mortem hash refreshed; codex-parity audit clean.
bead: soc-58nt.5.6
* docs(goals): F4.5 docs regen for goals trace + render (epic-subsumed)
F4's docs deliverables — the `ao goals trace` and `ao goals render` entries in
cli/docs/COMMANDS.md, the F4 trace-chain e2e CI lane in validate.yml, the
ADR-0005 documentation-index link, and the Trace/Render mode sections plus the
trace contract in skills/goals/SKILL.md + references/executable-spec-chain.md —
all co-landed atomically in soc-58nt.2.7's epic-wide CLI-reference regen
(commit 37798abe), because COMMANDS.md/registry.json regenerate as one unit
across F2-F5 and cannot be split per-bead.
This empty commit records soc-58nt.4.5 as complete with no further file
changes. Matches the epic-subsumed-bead convention: regen artifacts land once,
later beads point at the lead regen commit.
bead: soc-58nt.4.5
* test(goals): fix flag-global leak breaking full goals-measure run
TestGoalsIntegration ran 'goals measure --directives' via cobra, which
sets the package-global goalsMeasureDirectives and never resets it.
soc-58nt's new TestGoalsMeasure_FullMode* tests branch on that global,
so the unfiltered 'go test ./cmd/ao/...' run failed (gates skipped,
directives array emitted instead of the full snapshot+scenarios object).
-run filters masked it. Restore the global after Execute.
bead: soc-58nt.2.4
* fix(ci): correct soc-58nt skill/codex artifacts and CI-policy parity
Resolves 6 red CI checks on PR #292 (crank/soc-58nt) after merging main:
- skill-integrity: reword the "no scaffold subcommand" note in
skills/scaffold/SKILL.md so it no longer trips the heal INVALID_AO_CMD
substring check; copy skills/forge/references/examples.md into
skills-codex/forge/references/ so the codex forge dead-link clears.
- validate-codex-generated-artifacts: strip leaked non-Codex frontmatter
from skills-codex/forge/SKILL.md down to name + description.
- validate-codex-runtime-sections: remove the residual mixed-runtime
"Cross-vendor analog" line (Anthropic Managed Agents) from codex forge;
convert /forge slash-command refs to $forge Codex invocation style.
- validate-ci-policy-parity: add executable-spec-link-integrity
(non-blocking) to the AGENTS.md non-blocking list so it matches the
workflow's continue-on-error classification (warn-only F1.6 gate added
by soc-58nt without parity co-update).
- doc-release-gate: the link-validation broken link was the same codex
forge references/examples.md dead link, fixed above.
- agentops-contract-canaries: update the cli-command-surface canary
fixture + eval JSON for the 185->187 / 257->259 subcommand count after
soc-58nt added `ao goals render` and `ao goals trace`.
Also ports the soc-58nt "Closing the loop with re-steer" paragraph into
skills-codex/post-mortem/SKILL.md and regenerates codex artifact hashes
and registry.json after the merge.
* fix(test): set repo-local git identity in rpi-phased-domain e2e
CI runners have no global git identity; the temp-repo 'git commit' in the
F3.7 e2e exited 128 (empty ident name). Configure a repo-local identity.
bead: soc-58nt.3.7
* fix(goals): use canonical practice slug bdd-gherkin
soc-58nt files cited the practice slug 'bdd'; the canonical slug in
PRACTICE-REGISTRY.md is 'bdd-gherkin'. Clears the practice-citations
advisory check (9 invalid slug citations -> 0).
bead: soc-58nt.2.7
* fix(goals): add missing practices field to F5 gap-test file
goals_steer_auto_gap_test.go lacked a // practices: header; the
practice-citations --strict gate flags missing fields. Matches its
sibling goals_steer_auto_test.go.
bead: soc-58nt.5.7
* fix(security): resolve gosec G122 + golangci-lint errcheck/staticcheck HIGH findings
Drive scripts/security-gate.sh --mode quick to 0 HIGH findings.
gosec G122 (CWE-367 TOCTOU): goalstrace/artifacts.go reads files inside a
filepath.WalkDir callback via an os.Root-scoped handle (os.OpenRoot), closing
the check-to-use window and blocking symlink escape.
golangci-lint errcheck (~25): unchecked defer Close / os.Remove returns.
Resource-cleanup closes use explicit-ignore (defer func(){ _ = X.Close() }()).
Durability-gating closes before a rename (llm/review.go tmp.Close) are checked
and wrapped.
golangci-lint staticcheck (~21): ST1005 (drop trailing punctuation from error
strings), QF1001 (De Morgan's law), QF1002 (tagged switch), QF1012
(fmt.Fprintf over WriteString+Sprintf), S1016 (struct-literal -> conversion),
S1017 (strings.TrimSuffix), S1040 (drop redundant type assertion), SA1012
(context.TODO over nil Context), SA4032 (drop dead GOOS branch under build
constraint), SA9003 (remove empty branch).
* ci(security): make security-toolchain-gate blocking
Remove continue-on-error: true from the security-toolchain-gate job and drop
the "(advisory)" name suffix so a CRITICAL/HIGH security-gate finding fails
the validate summary job. The job is already in summary.needs, so removing
continue-on-error promotes it into the contains(needs.*.result,'failure')
fail-set.
AGENTS.md: drop security-toolchain-gate from the (non-blocking) prose list
and the Advisory Job Triage SLA table; update its CI-jobs-table row to
describe the blocking failure mode. validate-ci-policy-parity confirms the
AGENTS blocking set matches the workflow summary fail-set (7 non-blocking).
---------
Co-authored-by: Codex <codex@example.invalid>
2026-05-17 15:31:15 -04:00
#### `ao goals render`
Render the executable-spec layer as BDD/Gherkin text.
```
ao goals render [flags]
```
**Flags: **
```
-h, --help help for render
--out string Write Gherkin to this file instead of stdout
```
2026-05-17 07:18:41 -04:00
#### `ao goals scenarios`
List or create the executable-spec scenarios linked to GOALS.md directives.
```
ao goals scenarios [flags]
```
**Flags: **
```
--create string Create a scenario from this goal description and link it to --directive
--directive int Directive display number (filter when listing, target when creating)
--directive-id string Filter listing to one directive by stable Directive ID
-h, --help help for scenarios
--lint Lint the directive↔scenario link graph instead of listing
--source string Source for a created scenario (human, agent, prod-telemetry) (default "human")
--status string Status for a created scenario (active, draft, retired) (default "draft")
--strict With --lint, exit non-zero on warnings as well as errors
--threshold float Satisfaction threshold for a created scenario (default 0.8)
```
Executable spec layer (epic soc-58nt, F2–F5): GOALS as BDD acceptance criteria (#292)
* feat(goals): F2.0 scenario-result artifact contract + producer/writer
bead: soc-58nt.2.6
* docs(goals): F4.0 trace link convention ADR-0005
bead: soc-58nt.4.8
* docs(goals): F3.0 domain-slice manifest contract + ADR-0004
bead: soc-58nt.3.8
- schemas/domain-slice-manifest.v1.schema.json: JSON Schema (draft/2020-12,
additionalProperties:false) for domain-slice manifests. All required fields:
domain, version, bounded_context, directive_ids (d-<slug> pattern), scenario_ids,
context_roots, allowed_read_globs, denied_read_globs, validation_commands, owner.
- docs/adr/ADR-0004-domain-slice-manifest-contract.md: records four decisions:
(A) command shape is ao rpi phased --domain <name>; (B) manifest is durable
tracked artifact at docs/domains/<name>/manifest.yaml; (C) reconciles with the
domain skill (vocabulary), context-map.md (architecture view), and skill
frontmatter — no overlap; (D) Go model named domainSliceManifest, explicitly
distinct from rpi_phased_manifest.go's phaseManifest. Cross-references ADR-0003.
- docs/domains/README.md: explains the directory, field table, relationship to
the three pre-existing domain surfaces, and how to add a new slice.
- docs/domains/example/manifest.yaml: fully populated example; validated against
the schema via jsonschema (PASSED).
* feat(goals): F2.1 scenario-result aggregation reader
bead: soc-58nt.2.1
* feat(rpi): F3.1 domainSliceManifest model + loader
Implements the domainSliceManifest Go model and loader in
cli/internal/domainslice/ per the F3.0 contract (ADR-0004, Decision D).
Uses gopkg.in/yaml.v3 with KnownFields(true) to reject unknown fields,
mirrors the schema's additionalProperties:false. Validates all required
fields, directive_id pattern (^d-[a-z0-9][a-z0-9-]*$), context_roots
minItems:1, and validation_commands sub-fields with field-named errors.
Explicitly distinct from phaseManifest (rpi_phased_manifest.go).
28 tests pass (L1 unit + L2 fixture round-trip via docs/domains/example/manifest.yaml).
bead: soc-58nt.3.1
* feat(goals): F4.1 read-only executable-spec trace graph walker
bead: soc-58nt.4.1
* feat(goals): F2.2 per-directive scenario_satisfaction + threshold verdict
bead: soc-58nt.2.2
* feat(rpi): F3.2 ao rpi phased --domain scoping
bead: soc-58nt.3.2
* feat(goals): F4.2/F4.3 ao goals trace --from / --orphans
beads: soc-58nt.4.2 soc-58nt.4.3
* feat(goals): F4.4 ao goals render — GOALS.md to Gherkin
bead: soc-58nt.4.4
* feat(rpi): F3.3a domain-scope audit evidence
bead: soc-58nt.3.3
* feat(goals): F2.3 scenario_satisfaction JSON field + --scenarios-only
Per-directive scenario satisfaction added to ao goals measure: 0 -> 8
new JSON fields and a --scenarios-only mode that skips gate execution.
bead: soc-58nt.2.3
* feat(rpi): F3.4 ao rpi phased --scaffold-domain
bead: soc-58nt.3.4
* test(goals): commit missing goals-trace scenario-results fixture
The F4.1/F4.2 walker tests reference a scenario-results.json fixture under
a gitignored .agents/ subpath; it was never force-added and a clean
checkout (and CI) lacks it, failing 5 scenario_result tests. Force-add it.
bead: soc-58nt.4.1
* fix(goals): F4.1 tighten goalstrace scenario-claim heuristic
bead: soc-58nt.4.9
- Tighten scenarioTokenRe: auto- tokens now require at least two
hyphen-separated slug segments (auto-X-Y…), so single-word English
compounds like auto-merge and auto-update are no longer matched.
- Downgrade broken_bead_scenario_claim from error to warning when the
claim comes from a heuristic (ConfidenceLow) free-text match; per
ADR-0005 §4.1 only an explicit Scenarios: line constitutes a broken
explicit link and may produce an error.
- Add beads_test.go with table-driven tests covering: English auto-*
false-positive rejection, real multi-segment auto-* ID detection,
explicit missing scenario → error, heuristic missing → warning only,
resolvable scenario → no defect, end-to-end Walk with auto-merge bead
produces no error-severity finding.
* test(goals): F2.T1 regression-coverage audit + gap fill
bead: soc-58nt.2.4
* ci(goals): F1.6 wire executable-spec link lint + trace-orphans (warn-first)
bead: soc-58nt.1.9
* feat(rpi): F3.3b runtime hook enforcement of domain scope
bead: soc-58nt.3.9
* test(goals): F2.T2 e2e script for scenario-satisfaction gate
bead: soc-58nt.2.5
* docs(goals): F5.0 re-steer policy + mutation-safety contract (ADR-0006)
bead: soc-58nt.5.9
* docs(goals): fix streak-reset prose in ADR-0006 (cleanup)
bead: soc-58nt.5.9
[no-sibling] prose fixup only, no structural change
0 → 0 schema fields changed
* test(goals): F4.T1 regression-coverage audit + gap fill
bead: soc-58nt.4.6
* feat(wiki): land wiki bounded context waves 1-4 (epic soc-behj)
Phased strangler consolidating ao's .agents/-touching logic into one
cli/internal/wiki bounded context. Each wave gated by the 102 cmd/ao
integration tests staying green; legacy command surface untouched.
- W1 soc-1lju FrontmatterCodec — all 5 frontmatter parsers delegate
- W2 soc-36lw CorpusLocator — agentsDirIn moved, 17 call sites migrated
- W2 soc-f4tr Artifact + Claim domain types with subtype invariants
- W3 soc-vot0 persistent WikiIndex — JSONL, incremental by content-hash
- W3 soc-r08p FreshnessPolicy — claim-level evidence-driven freshness
- W4 soc-ijp8 WikiPipeline — subsumes llmwiki loop, 3 stages wired
- W4 soc-q50a port conformance suite
Also anchors .gitignore's bare wiki/ pattern with a !cli/internal/wiki/
negation — the new package was being silently ignored.
Wave 5 (ao wiki command group) is not included in this commit.
* test(goals): F4.T2 e2e script for trace chain
bead: soc-58nt.4.7
* test(rpi): F3.T1 regression-coverage audit + gap fill
bead: soc-58nt.3.6
* test(rpi): F3.T2 e2e script for domain-scoped RPI
bead: soc-58nt.3.7
* feat(goals): F5.1 verdict ledger schema + writer
bead: soc-58nt.5.1
* feat(goals): F5.2 re-steer policy engine + verdict-ledger producer hookup
bead: soc-58nt.5.2
* feat(goals): F5.4 feedback-to-learning compiler
Adds cli/internal/feedbackcompiler — scans the verdict ledger for
fail->pass directive transitions and drafts a learning entry in
docs/learnings/ for each transition found. Drafts carry status: draft
and directive_id frontmatter (ADR-0005 §2.6). Never auto-promotes.
Idempotent: skips existing drafts on re-run.
Also documents the auto-draft workflow in
skills/forge/references/feedback-compiler-drafts.md with a compact
reference-link in skills/forge/SKILL.md (under 248-line limit).
Synced to skills-codex/forge/ and regenerated codex hashes.
bead: soc-58nt.5.4
* docs(goals): F5.5 compound-engineering retro in /post-mortem
Extend the /post-mortem skill with a Compound-Engineering Retro section
that compares iteration N vs N-1 for a domain slice using the F5.1 verdict
ledger (.agents/goals/verdict-ledger.json). The mode emits a comparative
delta — directives that improved (fail→pass, satisfaction up), regressed
(pass→fail, satisfaction down), or held stable — plus learning yield since
N-1, written as a status:draft learning to .agents/learnings/.
Detailed step-by-step procedure (CE.0–CE.5) lives in
references/compound-engineering-retro.md; SKILL.md carries a compact
trigger/commands summary and links to it. Both files synced to
skills-codex/post-mortem/ with updated codex hashes.
bead: soc-58nt.5.5
* feat(goals): F5.3 ao goals steer --auto with human-gated confirmation
bead: soc-58nt.5.3
* test(goals): F5.T1 regression-coverage audit + gap fill
bead: soc-58nt.5.7
* test(goals): F5.T2 e2e script for auto re-steer
bead: soc-58nt.5.8
* docs(goals): F2.4 docs regen for scenario-satisfaction gate + epic CLI artifacts
Regenerate cli/docs/COMMANDS.md and registry.json from a clean worktree at
HEAD so the soc-58nt command surface is documented without leaking unrelated
peer WIP into the generated docs.
F2 (soc-58nt.2.7): document scenario_satisfaction JSON shape, --scenarios-only,
result-artifact resolution, and exit codes in skills/goals/SKILL.md +
references/executable-spec-chain.md; cross-ref ao goals measure/trace from
skills/scenario/SKILL.md.
Epic-wide artifacts also landed here because they regenerate atomically across
F2-F5: COMMANDS.md/registry.json (all new ao goals/rpi surface), cli-skills-map
heading count, skills-codex hashes, ADR-0004/0005/0006 documentation-index
links, and the F2-F5 e2e CI lanes in validate.yml.
ao capabilities and ao robot-docs need no manual edits — both build their
command/flag surface from the live cobra tree, so new commands register
automatically (Global Rule G5 satisfied by construction).
bead: soc-58nt.2.7
* docs(domain): F3.5 domain-as-loop docs for domain-scoped RPI
Document the domain-slice runtime in skills/domain/SKILL.md (a "Domain as a
scoped RPI loop" section connecting the Slice primitive to ao rpi phased
--domain / --scaffold-domain / --force) and add the Domain-Slice row to the
modes table in skills/scaffold/SKILL.md, mirroring the existing Project/
Component/CI mode-row shape. The scaffold skill's Domain-Slice Mode section
already covered the workflow; this lands the missing modes-table entry so the
mode count is 3 -> 4.
The COMMANDS.md/registry/CI-lane regen for F3 landed in soc-58nt.2.7.
skills-codex hashes for the two changed skills refreshed via
scripts/regen-codex-hashes.sh; codex-parity audit clean.
bead: soc-58nt.3.5
* docs(goals): F5.6 re-steer loop docs in /post-mortem
Cross-reference the auto re-steer loop from the Compound-Engineering Retro
section of skills/post-mortem/SKILL.md: when the compound retro names a
chronically regressing directive, ao goals steer recommend prints
policy-driven directive mutations from the same verdict ledger and ao goals
steer apply writes the mutation to GOALS.md, human-gated via the non-lossy
patcher (ADR-0006). Mirrors the existing "closing the loop" cross-ref shape
used elsewhere in the skill's See Also prose.
The ao goals steer recommend/apply COMMANDS.md surface, the F5 e2e CI lane,
and the ADR-0006 documentation-index link landed atomically in soc-58nt.2.7's
epic-wide regen; the re-steer contract detail lives in
skills/goals/references/executable-spec-chain.md (also in 2.7).
skills-codex/post-mortem hash refreshed; codex-parity audit clean.
bead: soc-58nt.5.6
* docs(goals): F4.5 docs regen for goals trace + render (epic-subsumed)
F4's docs deliverables — the `ao goals trace` and `ao goals render` entries in
cli/docs/COMMANDS.md, the F4 trace-chain e2e CI lane in validate.yml, the
ADR-0005 documentation-index link, and the Trace/Render mode sections plus the
trace contract in skills/goals/SKILL.md + references/executable-spec-chain.md —
all co-landed atomically in soc-58nt.2.7's epic-wide CLI-reference regen
(commit 37798abe), because COMMANDS.md/registry.json regenerate as one unit
across F2-F5 and cannot be split per-bead.
This empty commit records soc-58nt.4.5 as complete with no further file
changes. Matches the epic-subsumed-bead convention: regen artifacts land once,
later beads point at the lead regen commit.
bead: soc-58nt.4.5
* test(goals): fix flag-global leak breaking full goals-measure run
TestGoalsIntegration ran 'goals measure --directives' via cobra, which
sets the package-global goalsMeasureDirectives and never resets it.
soc-58nt's new TestGoalsMeasure_FullMode* tests branch on that global,
so the unfiltered 'go test ./cmd/ao/...' run failed (gates skipped,
directives array emitted instead of the full snapshot+scenarios object).
-run filters masked it. Restore the global after Execute.
bead: soc-58nt.2.4
* fix(ci): correct soc-58nt skill/codex artifacts and CI-policy parity
Resolves 6 red CI checks on PR #292 (crank/soc-58nt) after merging main:
- skill-integrity: reword the "no scaffold subcommand" note in
skills/scaffold/SKILL.md so it no longer trips the heal INVALID_AO_CMD
substring check; copy skills/forge/references/examples.md into
skills-codex/forge/references/ so the codex forge dead-link clears.
- validate-codex-generated-artifacts: strip leaked non-Codex frontmatter
from skills-codex/forge/SKILL.md down to name + description.
- validate-codex-runtime-sections: remove the residual mixed-runtime
"Cross-vendor analog" line (Anthropic Managed Agents) from codex forge;
convert /forge slash-command refs to $forge Codex invocation style.
- validate-ci-policy-parity: add executable-spec-link-integrity
(non-blocking) to the AGENTS.md non-blocking list so it matches the
workflow's continue-on-error classification (warn-only F1.6 gate added
by soc-58nt without parity co-update).
- doc-release-gate: the link-validation broken link was the same codex
forge references/examples.md dead link, fixed above.
- agentops-contract-canaries: update the cli-command-surface canary
fixture + eval JSON for the 185->187 / 257->259 subcommand count after
soc-58nt added `ao goals render` and `ao goals trace`.
Also ports the soc-58nt "Closing the loop with re-steer" paragraph into
skills-codex/post-mortem/SKILL.md and regenerates codex artifact hashes
and registry.json after the merge.
* fix(test): set repo-local git identity in rpi-phased-domain e2e
CI runners have no global git identity; the temp-repo 'git commit' in the
F3.7 e2e exited 128 (empty ident name). Configure a repo-local identity.
bead: soc-58nt.3.7
* fix(goals): use canonical practice slug bdd-gherkin
soc-58nt files cited the practice slug 'bdd'; the canonical slug in
PRACTICE-REGISTRY.md is 'bdd-gherkin'. Clears the practice-citations
advisory check (9 invalid slug citations -> 0).
bead: soc-58nt.2.7
* fix(goals): add missing practices field to F5 gap-test file
goals_steer_auto_gap_test.go lacked a // practices: header; the
practice-citations --strict gate flags missing fields. Matches its
sibling goals_steer_auto_test.go.
bead: soc-58nt.5.7
* fix(security): resolve gosec G122 + golangci-lint errcheck/staticcheck HIGH findings
Drive scripts/security-gate.sh --mode quick to 0 HIGH findings.
gosec G122 (CWE-367 TOCTOU): goalstrace/artifacts.go reads files inside a
filepath.WalkDir callback via an os.Root-scoped handle (os.OpenRoot), closing
the check-to-use window and blocking symlink escape.
golangci-lint errcheck (~25): unchecked defer Close / os.Remove returns.
Resource-cleanup closes use explicit-ignore (defer func(){ _ = X.Close() }()).
Durability-gating closes before a rename (llm/review.go tmp.Close) are checked
and wrapped.
golangci-lint staticcheck (~21): ST1005 (drop trailing punctuation from error
strings), QF1001 (De Morgan's law), QF1002 (tagged switch), QF1012
(fmt.Fprintf over WriteString+Sprintf), S1016 (struct-literal -> conversion),
S1017 (strings.TrimSuffix), S1040 (drop redundant type assertion), SA1012
(context.TODO over nil Context), SA4032 (drop dead GOOS branch under build
constraint), SA9003 (remove empty branch).
* ci(security): make security-toolchain-gate blocking
Remove continue-on-error: true from the security-toolchain-gate job and drop
the "(advisory)" name suffix so a CRITICAL/HIGH security-gate finding fails
the validate summary job. The job is already in summary.needs, so removing
continue-on-error promotes it into the contains(needs.*.result,'failure')
fail-set.
AGENTS.md: drop security-toolchain-gate from the (non-blocking) prose list
and the Advisory Job Triage SLA table; update its CI-jobs-table row to
describe the blocking failure mode. validate-ci-policy-parity confirms the
AGENTS blocking set matches the workflow summary fail-set (7 non-blocking).
---------
Co-authored-by: Codex <codex@example.invalid>
2026-05-17 15:31:15 -04:00
#### `ao goals trace`
Walk the executable-spec trace chain defined in docs/adr/ADR-0005.
```
ao goals trace [flags]
```
**Flags: **
```
--from string Render the trace lineage rooted at this directive, scenario, or bead ID
-h, --help help for trace
--orphans Audit the whole chain for broken references (errors) and missing yields (warnings)
--strict Escalate warning-class defects to a non-zero exit (ADR-0005 §4.2)
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao goals add`
2026-02-21 19:41:50 -05:00
2026-02-24 07:23:29 -05:00
Add a new goal
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao goals add <id> <check-command> [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
add, a
```
2026-02-21 19:41:50 -05:00
**Flags: **
```
2026-02-23 12:32:23 -05:00
--description string Goal description
-h, --help help for add
--type string Goal type (health, architecture, quality, meta)
--weight int Goal weight (1-10) (default 5)
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao goals init`
feat(cli): add GOALS.md OODA-driven intent layer with directives
GOALS.md (version 4) extends GOALS.yaml with strategic intent sections:
mission, north/anti stars, directives with steer values, and markdown
gates tables. Evolve can now act on directives when beads and gates are
empty, addressing the 58% idle rate from stagnation.
Go library:
- Directive type, GoalFile extensions (Format, NorthStars, AntiStars, Directives)
- DetectFormat/ResolveGoalsPath auto-detection (GOALS.md preferred when both exist)
- 5-function markdown parser with case-insensitive heading matching
- RenderGoalsMD template renderer, round-trip tested
- 26 new tests (19 parser + 7 format detection)
CLI commands:
- ao goals init: interactive GOALS.md bootstrap (--non-interactive)
- ao goals steer: add/remove/prioritize directives
- ao goals prune: remove stale gates referencing missing paths
- ao goals measure --directives: output directives as JSON
- ao goals validate: reports format and directive count
- ao goals add: format-aware writeback (md or yaml)
- ao goals migrate --to-md: convert YAML to markdown format
Skills:
- /goals rewritten with 5 OODA verbs (init/measure/steer/validate/prune)
- /evolve Step 3 rewritten with directive-based cascade
- Schema docs updated for both formats
Pre-mortem fixes applied: format-aware writeback, version 4 for markdown,
case-insensitive headings, --directives/--goal mutual exclusion.
2026-02-24 06:37:01 -05:00
Bootstrap a new GOALS.md file
```
2026-02-26 06:42:03 -05:00
ao goals init [flags]
feat(cli): add GOALS.md OODA-driven intent layer with directives
GOALS.md (version 4) extends GOALS.yaml with strategic intent sections:
mission, north/anti stars, directives with steer values, and markdown
gates tables. Evolve can now act on directives when beads and gates are
empty, addressing the 58% idle rate from stagnation.
Go library:
- Directive type, GoalFile extensions (Format, NorthStars, AntiStars, Directives)
- DetectFormat/ResolveGoalsPath auto-detection (GOALS.md preferred when both exist)
- 5-function markdown parser with case-insensitive heading matching
- RenderGoalsMD template renderer, round-trip tested
- 26 new tests (19 parser + 7 format detection)
CLI commands:
- ao goals init: interactive GOALS.md bootstrap (--non-interactive)
- ao goals steer: add/remove/prioritize directives
- ao goals prune: remove stale gates referencing missing paths
- ao goals measure --directives: output directives as JSON
- ao goals validate: reports format and directive count
- ao goals add: format-aware writeback (md or yaml)
- ao goals migrate --to-md: convert YAML to markdown format
Skills:
- /goals rewritten with 5 OODA verbs (init/measure/steer/validate/prune)
- /evolve Step 3 rewritten with directive-based cascade
- Schema docs updated for both formats
Pre-mortem fixes applied: format-aware writeback, version 4 for markdown,
case-insensitive headings, --directives/--goal mutual exclusion.
2026-02-24 06:37:01 -05:00
```
**Flags: **
```
-h, --help help for init
--non-interactive Use defaults without prompting
fix: resolve 32 vibe findings (2 critical, 7 high, 12 medium, 11 low)
Fix all findings from the v2.17.0..HEAD vibe review across 12 source files:
Critical: panic guards for negative budget in truncateToCharBudget and
dead prefix slice in generateArtifactID. High: bead override in batch
extract, json file counting in metrics, constraint index.json exclusion,
complexity reduction in curate status/verify (38→<25), flexible hook
script count assertion. Medium: truncate panic guards, error logging for
silent failures, null→[] JSON output, goals auto-detect (GOALS.md then
GOALS.yaml), raw var→getter usage, truncate-before-lock race fix. Low:
scanner.Err() checks, os.Stdout→cmd.OutOrStdout(), dry-run output
differentiation.
Docs: 5 missing INDEX.md concept links, curation-pipeline v1 status
callout. Tests: new TestSeed_DryRun_JSON. Regen: COMMANDS.md, embedded
hooks synced. All gates pass: build, vet, test, gocyclo, heal, doc-gate.
2026-02-24 16:51:26 -05:00
--template string Goal template (go-cli, python-lib, web-app, rust-cli, generic)
feat(cli): add GOALS.md OODA-driven intent layer with directives
GOALS.md (version 4) extends GOALS.yaml with strategic intent sections:
mission, north/anti stars, directives with steer values, and markdown
gates tables. Evolve can now act on directives when beads and gates are
empty, addressing the 58% idle rate from stagnation.
Go library:
- Directive type, GoalFile extensions (Format, NorthStars, AntiStars, Directives)
- DetectFormat/ResolveGoalsPath auto-detection (GOALS.md preferred when both exist)
- 5-function markdown parser with case-insensitive heading matching
- RenderGoalsMD template renderer, round-trip tested
- 26 new tests (19 parser + 7 format detection)
CLI commands:
- ao goals init: interactive GOALS.md bootstrap (--non-interactive)
- ao goals steer: add/remove/prioritize directives
- ao goals prune: remove stale gates referencing missing paths
- ao goals measure --directives: output directives as JSON
- ao goals validate: reports format and directive count
- ao goals add: format-aware writeback (md or yaml)
- ao goals migrate --to-md: convert YAML to markdown format
Skills:
- /goals rewritten with 5 OODA verbs (init/measure/steer/validate/prune)
- /evolve Step 3 rewritten with directive-based cascade
- Schema docs updated for both formats
Pre-mortem fixes applied: format-aware writeback, version 4 for markdown,
case-insensitive headings, --directives/--goal mutual exclusion.
2026-02-24 06:37:01 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao goals meta`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Run and report meta-goals only
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
```
2026-02-26 06:42:03 -05:00
ao goals meta [flags]
2026-02-23 12:32:23 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao goals migrate`
2026-02-23 12:32:23 -05:00
2026-02-24 07:41:36 -05:00
Migrate goals between formats.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao goals migrate [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
migrate, mg
```
feat(cli): add GOALS.md OODA-driven intent layer with directives
GOALS.md (version 4) extends GOALS.yaml with strategic intent sections:
mission, north/anti stars, directives with steer values, and markdown
gates tables. Evolve can now act on directives when beads and gates are
empty, addressing the 58% idle rate from stagnation.
Go library:
- Directive type, GoalFile extensions (Format, NorthStars, AntiStars, Directives)
- DetectFormat/ResolveGoalsPath auto-detection (GOALS.md preferred when both exist)
- 5-function markdown parser with case-insensitive heading matching
- RenderGoalsMD template renderer, round-trip tested
- 26 new tests (19 parser + 7 format detection)
CLI commands:
- ao goals init: interactive GOALS.md bootstrap (--non-interactive)
- ao goals steer: add/remove/prioritize directives
- ao goals prune: remove stale gates referencing missing paths
- ao goals measure --directives: output directives as JSON
- ao goals validate: reports format and directive count
- ao goals add: format-aware writeback (md or yaml)
- ao goals migrate --to-md: convert YAML to markdown format
Skills:
- /goals rewritten with 5 OODA verbs (init/measure/steer/validate/prune)
- /evolve Step 3 rewritten with directive-based cascade
- Schema docs updated for both formats
Pre-mortem fixes applied: format-aware writeback, version 4 for markdown,
case-insensitive headings, --directives/--goal mutual exclusion.
2026-02-24 06:37:01 -05:00
**Flags: **
```
-h, --help help for migrate
--to-md Convert GOALS.yaml to GOALS.md format
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao goals prune`
feat(cli): add GOALS.md OODA-driven intent layer with directives
GOALS.md (version 4) extends GOALS.yaml with strategic intent sections:
mission, north/anti stars, directives with steer values, and markdown
gates tables. Evolve can now act on directives when beads and gates are
empty, addressing the 58% idle rate from stagnation.
Go library:
- Directive type, GoalFile extensions (Format, NorthStars, AntiStars, Directives)
- DetectFormat/ResolveGoalsPath auto-detection (GOALS.md preferred when both exist)
- 5-function markdown parser with case-insensitive heading matching
- RenderGoalsMD template renderer, round-trip tested
- 26 new tests (19 parser + 7 format detection)
CLI commands:
- ao goals init: interactive GOALS.md bootstrap (--non-interactive)
- ao goals steer: add/remove/prioritize directives
- ao goals prune: remove stale gates referencing missing paths
- ao goals measure --directives: output directives as JSON
- ao goals validate: reports format and directive count
- ao goals add: format-aware writeback (md or yaml)
- ao goals migrate --to-md: convert YAML to markdown format
Skills:
- /goals rewritten with 5 OODA verbs (init/measure/steer/validate/prune)
- /evolve Step 3 rewritten with directive-based cascade
- Schema docs updated for both formats
Pre-mortem fixes applied: format-aware writeback, version 4 for markdown,
case-insensitive headings, --directives/--goal mutual exclusion.
2026-02-24 06:37:01 -05:00
Remove goals referencing nonexistent files
```
2026-02-26 06:42:03 -05:00
ao goals prune [flags]
feat(cli): add GOALS.md OODA-driven intent layer with directives
GOALS.md (version 4) extends GOALS.yaml with strategic intent sections:
mission, north/anti stars, directives with steer values, and markdown
gates tables. Evolve can now act on directives when beads and gates are
empty, addressing the 58% idle rate from stagnation.
Go library:
- Directive type, GoalFile extensions (Format, NorthStars, AntiStars, Directives)
- DetectFormat/ResolveGoalsPath auto-detection (GOALS.md preferred when both exist)
- 5-function markdown parser with case-insensitive heading matching
- RenderGoalsMD template renderer, round-trip tested
- 26 new tests (19 parser + 7 format detection)
CLI commands:
- ao goals init: interactive GOALS.md bootstrap (--non-interactive)
- ao goals steer: add/remove/prioritize directives
- ao goals prune: remove stale gates referencing missing paths
- ao goals measure --directives: output directives as JSON
- ao goals validate: reports format and directive count
- ao goals add: format-aware writeback (md or yaml)
- ao goals migrate --to-md: convert YAML to markdown format
Skills:
- /goals rewritten with 5 OODA verbs (init/measure/steer/validate/prune)
- /evolve Step 3 rewritten with directive-based cascade
- Schema docs updated for both formats
Pre-mortem fixes applied: format-aware writeback, version 4 for markdown,
case-insensitive headings, --directives/--goal mutual exclusion.
2026-02-24 06:37:01 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
prune, p
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao goals steer`
feat(cli): add GOALS.md OODA-driven intent layer with directives
GOALS.md (version 4) extends GOALS.yaml with strategic intent sections:
mission, north/anti stars, directives with steer values, and markdown
gates tables. Evolve can now act on directives when beads and gates are
empty, addressing the 58% idle rate from stagnation.
Go library:
- Directive type, GoalFile extensions (Format, NorthStars, AntiStars, Directives)
- DetectFormat/ResolveGoalsPath auto-detection (GOALS.md preferred when both exist)
- 5-function markdown parser with case-insensitive heading matching
- RenderGoalsMD template renderer, round-trip tested
- 26 new tests (19 parser + 7 format detection)
CLI commands:
- ao goals init: interactive GOALS.md bootstrap (--non-interactive)
- ao goals steer: add/remove/prioritize directives
- ao goals prune: remove stale gates referencing missing paths
- ao goals measure --directives: output directives as JSON
- ao goals validate: reports format and directive count
- ao goals add: format-aware writeback (md or yaml)
- ao goals migrate --to-md: convert YAML to markdown format
Skills:
- /goals rewritten with 5 OODA verbs (init/measure/steer/validate/prune)
- /evolve Step 3 rewritten with directive-based cascade
- Schema docs updated for both formats
Pre-mortem fixes applied: format-aware writeback, version 4 for markdown,
case-insensitive headings, --directives/--goal mutual exclusion.
2026-02-24 06:37:01 -05:00
Manage directives
```
2026-02-26 06:42:03 -05:00
ao goals steer [command]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
##### `ao goals steer add`
Add a new directive
```
ao goals steer add <title> [flags]
```
**Flags: **
```
--description string Directive description (required)
-h, --help help for add
--steer string Steer direction (increase, decrease, hold, explore) (default "increase")
```
Executable spec layer (epic soc-58nt, F2–F5): GOALS as BDD acceptance criteria (#292)
* feat(goals): F2.0 scenario-result artifact contract + producer/writer
bead: soc-58nt.2.6
* docs(goals): F4.0 trace link convention ADR-0005
bead: soc-58nt.4.8
* docs(goals): F3.0 domain-slice manifest contract + ADR-0004
bead: soc-58nt.3.8
- schemas/domain-slice-manifest.v1.schema.json: JSON Schema (draft/2020-12,
additionalProperties:false) for domain-slice manifests. All required fields:
domain, version, bounded_context, directive_ids (d-<slug> pattern), scenario_ids,
context_roots, allowed_read_globs, denied_read_globs, validation_commands, owner.
- docs/adr/ADR-0004-domain-slice-manifest-contract.md: records four decisions:
(A) command shape is ao rpi phased --domain <name>; (B) manifest is durable
tracked artifact at docs/domains/<name>/manifest.yaml; (C) reconciles with the
domain skill (vocabulary), context-map.md (architecture view), and skill
frontmatter — no overlap; (D) Go model named domainSliceManifest, explicitly
distinct from rpi_phased_manifest.go's phaseManifest. Cross-references ADR-0003.
- docs/domains/README.md: explains the directory, field table, relationship to
the three pre-existing domain surfaces, and how to add a new slice.
- docs/domains/example/manifest.yaml: fully populated example; validated against
the schema via jsonschema (PASSED).
* feat(goals): F2.1 scenario-result aggregation reader
bead: soc-58nt.2.1
* feat(rpi): F3.1 domainSliceManifest model + loader
Implements the domainSliceManifest Go model and loader in
cli/internal/domainslice/ per the F3.0 contract (ADR-0004, Decision D).
Uses gopkg.in/yaml.v3 with KnownFields(true) to reject unknown fields,
mirrors the schema's additionalProperties:false. Validates all required
fields, directive_id pattern (^d-[a-z0-9][a-z0-9-]*$), context_roots
minItems:1, and validation_commands sub-fields with field-named errors.
Explicitly distinct from phaseManifest (rpi_phased_manifest.go).
28 tests pass (L1 unit + L2 fixture round-trip via docs/domains/example/manifest.yaml).
bead: soc-58nt.3.1
* feat(goals): F4.1 read-only executable-spec trace graph walker
bead: soc-58nt.4.1
* feat(goals): F2.2 per-directive scenario_satisfaction + threshold verdict
bead: soc-58nt.2.2
* feat(rpi): F3.2 ao rpi phased --domain scoping
bead: soc-58nt.3.2
* feat(goals): F4.2/F4.3 ao goals trace --from / --orphans
beads: soc-58nt.4.2 soc-58nt.4.3
* feat(goals): F4.4 ao goals render — GOALS.md to Gherkin
bead: soc-58nt.4.4
* feat(rpi): F3.3a domain-scope audit evidence
bead: soc-58nt.3.3
* feat(goals): F2.3 scenario_satisfaction JSON field + --scenarios-only
Per-directive scenario satisfaction added to ao goals measure: 0 -> 8
new JSON fields and a --scenarios-only mode that skips gate execution.
bead: soc-58nt.2.3
* feat(rpi): F3.4 ao rpi phased --scaffold-domain
bead: soc-58nt.3.4
* test(goals): commit missing goals-trace scenario-results fixture
The F4.1/F4.2 walker tests reference a scenario-results.json fixture under
a gitignored .agents/ subpath; it was never force-added and a clean
checkout (and CI) lacks it, failing 5 scenario_result tests. Force-add it.
bead: soc-58nt.4.1
* fix(goals): F4.1 tighten goalstrace scenario-claim heuristic
bead: soc-58nt.4.9
- Tighten scenarioTokenRe: auto- tokens now require at least two
hyphen-separated slug segments (auto-X-Y…), so single-word English
compounds like auto-merge and auto-update are no longer matched.
- Downgrade broken_bead_scenario_claim from error to warning when the
claim comes from a heuristic (ConfidenceLow) free-text match; per
ADR-0005 §4.1 only an explicit Scenarios: line constitutes a broken
explicit link and may produce an error.
- Add beads_test.go with table-driven tests covering: English auto-*
false-positive rejection, real multi-segment auto-* ID detection,
explicit missing scenario → error, heuristic missing → warning only,
resolvable scenario → no defect, end-to-end Walk with auto-merge bead
produces no error-severity finding.
* test(goals): F2.T1 regression-coverage audit + gap fill
bead: soc-58nt.2.4
* ci(goals): F1.6 wire executable-spec link lint + trace-orphans (warn-first)
bead: soc-58nt.1.9
* feat(rpi): F3.3b runtime hook enforcement of domain scope
bead: soc-58nt.3.9
* test(goals): F2.T2 e2e script for scenario-satisfaction gate
bead: soc-58nt.2.5
* docs(goals): F5.0 re-steer policy + mutation-safety contract (ADR-0006)
bead: soc-58nt.5.9
* docs(goals): fix streak-reset prose in ADR-0006 (cleanup)
bead: soc-58nt.5.9
[no-sibling] prose fixup only, no structural change
0 → 0 schema fields changed
* test(goals): F4.T1 regression-coverage audit + gap fill
bead: soc-58nt.4.6
* feat(wiki): land wiki bounded context waves 1-4 (epic soc-behj)
Phased strangler consolidating ao's .agents/-touching logic into one
cli/internal/wiki bounded context. Each wave gated by the 102 cmd/ao
integration tests staying green; legacy command surface untouched.
- W1 soc-1lju FrontmatterCodec — all 5 frontmatter parsers delegate
- W2 soc-36lw CorpusLocator — agentsDirIn moved, 17 call sites migrated
- W2 soc-f4tr Artifact + Claim domain types with subtype invariants
- W3 soc-vot0 persistent WikiIndex — JSONL, incremental by content-hash
- W3 soc-r08p FreshnessPolicy — claim-level evidence-driven freshness
- W4 soc-ijp8 WikiPipeline — subsumes llmwiki loop, 3 stages wired
- W4 soc-q50a port conformance suite
Also anchors .gitignore's bare wiki/ pattern with a !cli/internal/wiki/
negation — the new package was being silently ignored.
Wave 5 (ao wiki command group) is not included in this commit.
* test(goals): F4.T2 e2e script for trace chain
bead: soc-58nt.4.7
* test(rpi): F3.T1 regression-coverage audit + gap fill
bead: soc-58nt.3.6
* test(rpi): F3.T2 e2e script for domain-scoped RPI
bead: soc-58nt.3.7
* feat(goals): F5.1 verdict ledger schema + writer
bead: soc-58nt.5.1
* feat(goals): F5.2 re-steer policy engine + verdict-ledger producer hookup
bead: soc-58nt.5.2
* feat(goals): F5.4 feedback-to-learning compiler
Adds cli/internal/feedbackcompiler — scans the verdict ledger for
fail->pass directive transitions and drafts a learning entry in
docs/learnings/ for each transition found. Drafts carry status: draft
and directive_id frontmatter (ADR-0005 §2.6). Never auto-promotes.
Idempotent: skips existing drafts on re-run.
Also documents the auto-draft workflow in
skills/forge/references/feedback-compiler-drafts.md with a compact
reference-link in skills/forge/SKILL.md (under 248-line limit).
Synced to skills-codex/forge/ and regenerated codex hashes.
bead: soc-58nt.5.4
* docs(goals): F5.5 compound-engineering retro in /post-mortem
Extend the /post-mortem skill with a Compound-Engineering Retro section
that compares iteration N vs N-1 for a domain slice using the F5.1 verdict
ledger (.agents/goals/verdict-ledger.json). The mode emits a comparative
delta — directives that improved (fail→pass, satisfaction up), regressed
(pass→fail, satisfaction down), or held stable — plus learning yield since
N-1, written as a status:draft learning to .agents/learnings/.
Detailed step-by-step procedure (CE.0–CE.5) lives in
references/compound-engineering-retro.md; SKILL.md carries a compact
trigger/commands summary and links to it. Both files synced to
skills-codex/post-mortem/ with updated codex hashes.
bead: soc-58nt.5.5
* feat(goals): F5.3 ao goals steer --auto with human-gated confirmation
bead: soc-58nt.5.3
* test(goals): F5.T1 regression-coverage audit + gap fill
bead: soc-58nt.5.7
* test(goals): F5.T2 e2e script for auto re-steer
bead: soc-58nt.5.8
* docs(goals): F2.4 docs regen for scenario-satisfaction gate + epic CLI artifacts
Regenerate cli/docs/COMMANDS.md and registry.json from a clean worktree at
HEAD so the soc-58nt command surface is documented without leaking unrelated
peer WIP into the generated docs.
F2 (soc-58nt.2.7): document scenario_satisfaction JSON shape, --scenarios-only,
result-artifact resolution, and exit codes in skills/goals/SKILL.md +
references/executable-spec-chain.md; cross-ref ao goals measure/trace from
skills/scenario/SKILL.md.
Epic-wide artifacts also landed here because they regenerate atomically across
F2-F5: COMMANDS.md/registry.json (all new ao goals/rpi surface), cli-skills-map
heading count, skills-codex hashes, ADR-0004/0005/0006 documentation-index
links, and the F2-F5 e2e CI lanes in validate.yml.
ao capabilities and ao robot-docs need no manual edits — both build their
command/flag surface from the live cobra tree, so new commands register
automatically (Global Rule G5 satisfied by construction).
bead: soc-58nt.2.7
* docs(domain): F3.5 domain-as-loop docs for domain-scoped RPI
Document the domain-slice runtime in skills/domain/SKILL.md (a "Domain as a
scoped RPI loop" section connecting the Slice primitive to ao rpi phased
--domain / --scaffold-domain / --force) and add the Domain-Slice row to the
modes table in skills/scaffold/SKILL.md, mirroring the existing Project/
Component/CI mode-row shape. The scaffold skill's Domain-Slice Mode section
already covered the workflow; this lands the missing modes-table entry so the
mode count is 3 -> 4.
The COMMANDS.md/registry/CI-lane regen for F3 landed in soc-58nt.2.7.
skills-codex hashes for the two changed skills refreshed via
scripts/regen-codex-hashes.sh; codex-parity audit clean.
bead: soc-58nt.3.5
* docs(goals): F5.6 re-steer loop docs in /post-mortem
Cross-reference the auto re-steer loop from the Compound-Engineering Retro
section of skills/post-mortem/SKILL.md: when the compound retro names a
chronically regressing directive, ao goals steer recommend prints
policy-driven directive mutations from the same verdict ledger and ao goals
steer apply writes the mutation to GOALS.md, human-gated via the non-lossy
patcher (ADR-0006). Mirrors the existing "closing the loop" cross-ref shape
used elsewhere in the skill's See Also prose.
The ao goals steer recommend/apply COMMANDS.md surface, the F5 e2e CI lane,
and the ADR-0006 documentation-index link landed atomically in soc-58nt.2.7's
epic-wide regen; the re-steer contract detail lives in
skills/goals/references/executable-spec-chain.md (also in 2.7).
skills-codex/post-mortem hash refreshed; codex-parity audit clean.
bead: soc-58nt.5.6
* docs(goals): F4.5 docs regen for goals trace + render (epic-subsumed)
F4's docs deliverables — the `ao goals trace` and `ao goals render` entries in
cli/docs/COMMANDS.md, the F4 trace-chain e2e CI lane in validate.yml, the
ADR-0005 documentation-index link, and the Trace/Render mode sections plus the
trace contract in skills/goals/SKILL.md + references/executable-spec-chain.md —
all co-landed atomically in soc-58nt.2.7's epic-wide CLI-reference regen
(commit 37798abe), because COMMANDS.md/registry.json regenerate as one unit
across F2-F5 and cannot be split per-bead.
This empty commit records soc-58nt.4.5 as complete with no further file
changes. Matches the epic-subsumed-bead convention: regen artifacts land once,
later beads point at the lead regen commit.
bead: soc-58nt.4.5
* test(goals): fix flag-global leak breaking full goals-measure run
TestGoalsIntegration ran 'goals measure --directives' via cobra, which
sets the package-global goalsMeasureDirectives and never resets it.
soc-58nt's new TestGoalsMeasure_FullMode* tests branch on that global,
so the unfiltered 'go test ./cmd/ao/...' run failed (gates skipped,
directives array emitted instead of the full snapshot+scenarios object).
-run filters masked it. Restore the global after Execute.
bead: soc-58nt.2.4
* fix(ci): correct soc-58nt skill/codex artifacts and CI-policy parity
Resolves 6 red CI checks on PR #292 (crank/soc-58nt) after merging main:
- skill-integrity: reword the "no scaffold subcommand" note in
skills/scaffold/SKILL.md so it no longer trips the heal INVALID_AO_CMD
substring check; copy skills/forge/references/examples.md into
skills-codex/forge/references/ so the codex forge dead-link clears.
- validate-codex-generated-artifacts: strip leaked non-Codex frontmatter
from skills-codex/forge/SKILL.md down to name + description.
- validate-codex-runtime-sections: remove the residual mixed-runtime
"Cross-vendor analog" line (Anthropic Managed Agents) from codex forge;
convert /forge slash-command refs to $forge Codex invocation style.
- validate-ci-policy-parity: add executable-spec-link-integrity
(non-blocking) to the AGENTS.md non-blocking list so it matches the
workflow's continue-on-error classification (warn-only F1.6 gate added
by soc-58nt without parity co-update).
- doc-release-gate: the link-validation broken link was the same codex
forge references/examples.md dead link, fixed above.
- agentops-contract-canaries: update the cli-command-surface canary
fixture + eval JSON for the 185->187 / 257->259 subcommand count after
soc-58nt added `ao goals render` and `ao goals trace`.
Also ports the soc-58nt "Closing the loop with re-steer" paragraph into
skills-codex/post-mortem/SKILL.md and regenerates codex artifact hashes
and registry.json after the merge.
* fix(test): set repo-local git identity in rpi-phased-domain e2e
CI runners have no global git identity; the temp-repo 'git commit' in the
F3.7 e2e exited 128 (empty ident name). Configure a repo-local identity.
bead: soc-58nt.3.7
* fix(goals): use canonical practice slug bdd-gherkin
soc-58nt files cited the practice slug 'bdd'; the canonical slug in
PRACTICE-REGISTRY.md is 'bdd-gherkin'. Clears the practice-citations
advisory check (9 invalid slug citations -> 0).
bead: soc-58nt.2.7
* fix(goals): add missing practices field to F5 gap-test file
goals_steer_auto_gap_test.go lacked a // practices: header; the
practice-citations --strict gate flags missing fields. Matches its
sibling goals_steer_auto_test.go.
bead: soc-58nt.5.7
* fix(security): resolve gosec G122 + golangci-lint errcheck/staticcheck HIGH findings
Drive scripts/security-gate.sh --mode quick to 0 HIGH findings.
gosec G122 (CWE-367 TOCTOU): goalstrace/artifacts.go reads files inside a
filepath.WalkDir callback via an os.Root-scoped handle (os.OpenRoot), closing
the check-to-use window and blocking symlink escape.
golangci-lint errcheck (~25): unchecked defer Close / os.Remove returns.
Resource-cleanup closes use explicit-ignore (defer func(){ _ = X.Close() }()).
Durability-gating closes before a rename (llm/review.go tmp.Close) are checked
and wrapped.
golangci-lint staticcheck (~21): ST1005 (drop trailing punctuation from error
strings), QF1001 (De Morgan's law), QF1002 (tagged switch), QF1012
(fmt.Fprintf over WriteString+Sprintf), S1016 (struct-literal -> conversion),
S1017 (strings.TrimSuffix), S1040 (drop redundant type assertion), SA1012
(context.TODO over nil Context), SA4032 (drop dead GOOS branch under build
constraint), SA9003 (remove empty branch).
* ci(security): make security-toolchain-gate blocking
Remove continue-on-error: true from the security-toolchain-gate job and drop
the "(advisory)" name suffix so a CRITICAL/HIGH security-gate finding fails
the validate summary job. The job is already in summary.needs, so removing
continue-on-error promotes it into the contains(needs.*.result,'failure')
fail-set.
AGENTS.md: drop security-toolchain-gate from the (non-blocking) prose list
and the Advisory Job Triage SLA table; update its CI-jobs-table row to
describe the blocking failure mode. validate-ci-policy-parity confirms the
AGENTS blocking set matches the workflow summary fail-set (7 non-blocking).
---------
Co-authored-by: Codex <codex@example.invalid>
2026-05-17 15:31:15 -04:00
##### `ao goals steer apply`
Apply the top re-steer recommendation to GOALS.md via the non-lossy directive-block patcher. Requires policy auto_apply:true AND explicit human confirmation (interactive prompt, or --auto --yes for scripts). A run without confirmation never changes GOALS.md.
```
ao goals steer apply [flags]
```
**Flags: **
```
--auto Equivalent to --yes: explicit non-interactive consent to apply
-h, --help help for apply
--policy string Re-steer policy path (default: docs/re-steer-policy.json)
--yes Pre-confirm the apply for non-interactive/scripted use (explicit consent)
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
##### `ao goals steer prioritize`
Move a directive to a new position
```
ao goals steer prioritize <number> <new-position> [flags]
```
Executable spec layer (epic soc-58nt, F2–F5): GOALS as BDD acceptance criteria (#292)
* feat(goals): F2.0 scenario-result artifact contract + producer/writer
bead: soc-58nt.2.6
* docs(goals): F4.0 trace link convention ADR-0005
bead: soc-58nt.4.8
* docs(goals): F3.0 domain-slice manifest contract + ADR-0004
bead: soc-58nt.3.8
- schemas/domain-slice-manifest.v1.schema.json: JSON Schema (draft/2020-12,
additionalProperties:false) for domain-slice manifests. All required fields:
domain, version, bounded_context, directive_ids (d-<slug> pattern), scenario_ids,
context_roots, allowed_read_globs, denied_read_globs, validation_commands, owner.
- docs/adr/ADR-0004-domain-slice-manifest-contract.md: records four decisions:
(A) command shape is ao rpi phased --domain <name>; (B) manifest is durable
tracked artifact at docs/domains/<name>/manifest.yaml; (C) reconciles with the
domain skill (vocabulary), context-map.md (architecture view), and skill
frontmatter — no overlap; (D) Go model named domainSliceManifest, explicitly
distinct from rpi_phased_manifest.go's phaseManifest. Cross-references ADR-0003.
- docs/domains/README.md: explains the directory, field table, relationship to
the three pre-existing domain surfaces, and how to add a new slice.
- docs/domains/example/manifest.yaml: fully populated example; validated against
the schema via jsonschema (PASSED).
* feat(goals): F2.1 scenario-result aggregation reader
bead: soc-58nt.2.1
* feat(rpi): F3.1 domainSliceManifest model + loader
Implements the domainSliceManifest Go model and loader in
cli/internal/domainslice/ per the F3.0 contract (ADR-0004, Decision D).
Uses gopkg.in/yaml.v3 with KnownFields(true) to reject unknown fields,
mirrors the schema's additionalProperties:false. Validates all required
fields, directive_id pattern (^d-[a-z0-9][a-z0-9-]*$), context_roots
minItems:1, and validation_commands sub-fields with field-named errors.
Explicitly distinct from phaseManifest (rpi_phased_manifest.go).
28 tests pass (L1 unit + L2 fixture round-trip via docs/domains/example/manifest.yaml).
bead: soc-58nt.3.1
* feat(goals): F4.1 read-only executable-spec trace graph walker
bead: soc-58nt.4.1
* feat(goals): F2.2 per-directive scenario_satisfaction + threshold verdict
bead: soc-58nt.2.2
* feat(rpi): F3.2 ao rpi phased --domain scoping
bead: soc-58nt.3.2
* feat(goals): F4.2/F4.3 ao goals trace --from / --orphans
beads: soc-58nt.4.2 soc-58nt.4.3
* feat(goals): F4.4 ao goals render — GOALS.md to Gherkin
bead: soc-58nt.4.4
* feat(rpi): F3.3a domain-scope audit evidence
bead: soc-58nt.3.3
* feat(goals): F2.3 scenario_satisfaction JSON field + --scenarios-only
Per-directive scenario satisfaction added to ao goals measure: 0 -> 8
new JSON fields and a --scenarios-only mode that skips gate execution.
bead: soc-58nt.2.3
* feat(rpi): F3.4 ao rpi phased --scaffold-domain
bead: soc-58nt.3.4
* test(goals): commit missing goals-trace scenario-results fixture
The F4.1/F4.2 walker tests reference a scenario-results.json fixture under
a gitignored .agents/ subpath; it was never force-added and a clean
checkout (and CI) lacks it, failing 5 scenario_result tests. Force-add it.
bead: soc-58nt.4.1
* fix(goals): F4.1 tighten goalstrace scenario-claim heuristic
bead: soc-58nt.4.9
- Tighten scenarioTokenRe: auto- tokens now require at least two
hyphen-separated slug segments (auto-X-Y…), so single-word English
compounds like auto-merge and auto-update are no longer matched.
- Downgrade broken_bead_scenario_claim from error to warning when the
claim comes from a heuristic (ConfidenceLow) free-text match; per
ADR-0005 §4.1 only an explicit Scenarios: line constitutes a broken
explicit link and may produce an error.
- Add beads_test.go with table-driven tests covering: English auto-*
false-positive rejection, real multi-segment auto-* ID detection,
explicit missing scenario → error, heuristic missing → warning only,
resolvable scenario → no defect, end-to-end Walk with auto-merge bead
produces no error-severity finding.
* test(goals): F2.T1 regression-coverage audit + gap fill
bead: soc-58nt.2.4
* ci(goals): F1.6 wire executable-spec link lint + trace-orphans (warn-first)
bead: soc-58nt.1.9
* feat(rpi): F3.3b runtime hook enforcement of domain scope
bead: soc-58nt.3.9
* test(goals): F2.T2 e2e script for scenario-satisfaction gate
bead: soc-58nt.2.5
* docs(goals): F5.0 re-steer policy + mutation-safety contract (ADR-0006)
bead: soc-58nt.5.9
* docs(goals): fix streak-reset prose in ADR-0006 (cleanup)
bead: soc-58nt.5.9
[no-sibling] prose fixup only, no structural change
0 → 0 schema fields changed
* test(goals): F4.T1 regression-coverage audit + gap fill
bead: soc-58nt.4.6
* feat(wiki): land wiki bounded context waves 1-4 (epic soc-behj)
Phased strangler consolidating ao's .agents/-touching logic into one
cli/internal/wiki bounded context. Each wave gated by the 102 cmd/ao
integration tests staying green; legacy command surface untouched.
- W1 soc-1lju FrontmatterCodec — all 5 frontmatter parsers delegate
- W2 soc-36lw CorpusLocator — agentsDirIn moved, 17 call sites migrated
- W2 soc-f4tr Artifact + Claim domain types with subtype invariants
- W3 soc-vot0 persistent WikiIndex — JSONL, incremental by content-hash
- W3 soc-r08p FreshnessPolicy — claim-level evidence-driven freshness
- W4 soc-ijp8 WikiPipeline — subsumes llmwiki loop, 3 stages wired
- W4 soc-q50a port conformance suite
Also anchors .gitignore's bare wiki/ pattern with a !cli/internal/wiki/
negation — the new package was being silently ignored.
Wave 5 (ao wiki command group) is not included in this commit.
* test(goals): F4.T2 e2e script for trace chain
bead: soc-58nt.4.7
* test(rpi): F3.T1 regression-coverage audit + gap fill
bead: soc-58nt.3.6
* test(rpi): F3.T2 e2e script for domain-scoped RPI
bead: soc-58nt.3.7
* feat(goals): F5.1 verdict ledger schema + writer
bead: soc-58nt.5.1
* feat(goals): F5.2 re-steer policy engine + verdict-ledger producer hookup
bead: soc-58nt.5.2
* feat(goals): F5.4 feedback-to-learning compiler
Adds cli/internal/feedbackcompiler — scans the verdict ledger for
fail->pass directive transitions and drafts a learning entry in
docs/learnings/ for each transition found. Drafts carry status: draft
and directive_id frontmatter (ADR-0005 §2.6). Never auto-promotes.
Idempotent: skips existing drafts on re-run.
Also documents the auto-draft workflow in
skills/forge/references/feedback-compiler-drafts.md with a compact
reference-link in skills/forge/SKILL.md (under 248-line limit).
Synced to skills-codex/forge/ and regenerated codex hashes.
bead: soc-58nt.5.4
* docs(goals): F5.5 compound-engineering retro in /post-mortem
Extend the /post-mortem skill with a Compound-Engineering Retro section
that compares iteration N vs N-1 for a domain slice using the F5.1 verdict
ledger (.agents/goals/verdict-ledger.json). The mode emits a comparative
delta — directives that improved (fail→pass, satisfaction up), regressed
(pass→fail, satisfaction down), or held stable — plus learning yield since
N-1, written as a status:draft learning to .agents/learnings/.
Detailed step-by-step procedure (CE.0–CE.5) lives in
references/compound-engineering-retro.md; SKILL.md carries a compact
trigger/commands summary and links to it. Both files synced to
skills-codex/post-mortem/ with updated codex hashes.
bead: soc-58nt.5.5
* feat(goals): F5.3 ao goals steer --auto with human-gated confirmation
bead: soc-58nt.5.3
* test(goals): F5.T1 regression-coverage audit + gap fill
bead: soc-58nt.5.7
* test(goals): F5.T2 e2e script for auto re-steer
bead: soc-58nt.5.8
* docs(goals): F2.4 docs regen for scenario-satisfaction gate + epic CLI artifacts
Regenerate cli/docs/COMMANDS.md and registry.json from a clean worktree at
HEAD so the soc-58nt command surface is documented without leaking unrelated
peer WIP into the generated docs.
F2 (soc-58nt.2.7): document scenario_satisfaction JSON shape, --scenarios-only,
result-artifact resolution, and exit codes in skills/goals/SKILL.md +
references/executable-spec-chain.md; cross-ref ao goals measure/trace from
skills/scenario/SKILL.md.
Epic-wide artifacts also landed here because they regenerate atomically across
F2-F5: COMMANDS.md/registry.json (all new ao goals/rpi surface), cli-skills-map
heading count, skills-codex hashes, ADR-0004/0005/0006 documentation-index
links, and the F2-F5 e2e CI lanes in validate.yml.
ao capabilities and ao robot-docs need no manual edits — both build their
command/flag surface from the live cobra tree, so new commands register
automatically (Global Rule G5 satisfied by construction).
bead: soc-58nt.2.7
* docs(domain): F3.5 domain-as-loop docs for domain-scoped RPI
Document the domain-slice runtime in skills/domain/SKILL.md (a "Domain as a
scoped RPI loop" section connecting the Slice primitive to ao rpi phased
--domain / --scaffold-domain / --force) and add the Domain-Slice row to the
modes table in skills/scaffold/SKILL.md, mirroring the existing Project/
Component/CI mode-row shape. The scaffold skill's Domain-Slice Mode section
already covered the workflow; this lands the missing modes-table entry so the
mode count is 3 -> 4.
The COMMANDS.md/registry/CI-lane regen for F3 landed in soc-58nt.2.7.
skills-codex hashes for the two changed skills refreshed via
scripts/regen-codex-hashes.sh; codex-parity audit clean.
bead: soc-58nt.3.5
* docs(goals): F5.6 re-steer loop docs in /post-mortem
Cross-reference the auto re-steer loop from the Compound-Engineering Retro
section of skills/post-mortem/SKILL.md: when the compound retro names a
chronically regressing directive, ao goals steer recommend prints
policy-driven directive mutations from the same verdict ledger and ao goals
steer apply writes the mutation to GOALS.md, human-gated via the non-lossy
patcher (ADR-0006). Mirrors the existing "closing the loop" cross-ref shape
used elsewhere in the skill's See Also prose.
The ao goals steer recommend/apply COMMANDS.md surface, the F5 e2e CI lane,
and the ADR-0006 documentation-index link landed atomically in soc-58nt.2.7's
epic-wide regen; the re-steer contract detail lives in
skills/goals/references/executable-spec-chain.md (also in 2.7).
skills-codex/post-mortem hash refreshed; codex-parity audit clean.
bead: soc-58nt.5.6
* docs(goals): F4.5 docs regen for goals trace + render (epic-subsumed)
F4's docs deliverables — the `ao goals trace` and `ao goals render` entries in
cli/docs/COMMANDS.md, the F4 trace-chain e2e CI lane in validate.yml, the
ADR-0005 documentation-index link, and the Trace/Render mode sections plus the
trace contract in skills/goals/SKILL.md + references/executable-spec-chain.md —
all co-landed atomically in soc-58nt.2.7's epic-wide CLI-reference regen
(commit 37798abe), because COMMANDS.md/registry.json regenerate as one unit
across F2-F5 and cannot be split per-bead.
This empty commit records soc-58nt.4.5 as complete with no further file
changes. Matches the epic-subsumed-bead convention: regen artifacts land once,
later beads point at the lead regen commit.
bead: soc-58nt.4.5
* test(goals): fix flag-global leak breaking full goals-measure run
TestGoalsIntegration ran 'goals measure --directives' via cobra, which
sets the package-global goalsMeasureDirectives and never resets it.
soc-58nt's new TestGoalsMeasure_FullMode* tests branch on that global,
so the unfiltered 'go test ./cmd/ao/...' run failed (gates skipped,
directives array emitted instead of the full snapshot+scenarios object).
-run filters masked it. Restore the global after Execute.
bead: soc-58nt.2.4
* fix(ci): correct soc-58nt skill/codex artifacts and CI-policy parity
Resolves 6 red CI checks on PR #292 (crank/soc-58nt) after merging main:
- skill-integrity: reword the "no scaffold subcommand" note in
skills/scaffold/SKILL.md so it no longer trips the heal INVALID_AO_CMD
substring check; copy skills/forge/references/examples.md into
skills-codex/forge/references/ so the codex forge dead-link clears.
- validate-codex-generated-artifacts: strip leaked non-Codex frontmatter
from skills-codex/forge/SKILL.md down to name + description.
- validate-codex-runtime-sections: remove the residual mixed-runtime
"Cross-vendor analog" line (Anthropic Managed Agents) from codex forge;
convert /forge slash-command refs to $forge Codex invocation style.
- validate-ci-policy-parity: add executable-spec-link-integrity
(non-blocking) to the AGENTS.md non-blocking list so it matches the
workflow's continue-on-error classification (warn-only F1.6 gate added
by soc-58nt without parity co-update).
- doc-release-gate: the link-validation broken link was the same codex
forge references/examples.md dead link, fixed above.
- agentops-contract-canaries: update the cli-command-surface canary
fixture + eval JSON for the 185->187 / 257->259 subcommand count after
soc-58nt added `ao goals render` and `ao goals trace`.
Also ports the soc-58nt "Closing the loop with re-steer" paragraph into
skills-codex/post-mortem/SKILL.md and regenerates codex artifact hashes
and registry.json after the merge.
* fix(test): set repo-local git identity in rpi-phased-domain e2e
CI runners have no global git identity; the temp-repo 'git commit' in the
F3.7 e2e exited 128 (empty ident name). Configure a repo-local identity.
bead: soc-58nt.3.7
* fix(goals): use canonical practice slug bdd-gherkin
soc-58nt files cited the practice slug 'bdd'; the canonical slug in
PRACTICE-REGISTRY.md is 'bdd-gherkin'. Clears the practice-citations
advisory check (9 invalid slug citations -> 0).
bead: soc-58nt.2.7
* fix(goals): add missing practices field to F5 gap-test file
goals_steer_auto_gap_test.go lacked a // practices: header; the
practice-citations --strict gate flags missing fields. Matches its
sibling goals_steer_auto_test.go.
bead: soc-58nt.5.7
* fix(security): resolve gosec G122 + golangci-lint errcheck/staticcheck HIGH findings
Drive scripts/security-gate.sh --mode quick to 0 HIGH findings.
gosec G122 (CWE-367 TOCTOU): goalstrace/artifacts.go reads files inside a
filepath.WalkDir callback via an os.Root-scoped handle (os.OpenRoot), closing
the check-to-use window and blocking symlink escape.
golangci-lint errcheck (~25): unchecked defer Close / os.Remove returns.
Resource-cleanup closes use explicit-ignore (defer func(){ _ = X.Close() }()).
Durability-gating closes before a rename (llm/review.go tmp.Close) are checked
and wrapped.
golangci-lint staticcheck (~21): ST1005 (drop trailing punctuation from error
strings), QF1001 (De Morgan's law), QF1002 (tagged switch), QF1012
(fmt.Fprintf over WriteString+Sprintf), S1016 (struct-literal -> conversion),
S1017 (strings.TrimSuffix), S1040 (drop redundant type assertion), SA1012
(context.TODO over nil Context), SA4032 (drop dead GOOS branch under build
constraint), SA9003 (remove empty branch).
* ci(security): make security-toolchain-gate blocking
Remove continue-on-error: true from the security-toolchain-gate job and drop
the "(advisory)" name suffix so a CRITICAL/HIGH security-gate finding fails
the validate summary job. The job is already in summary.needs, so removing
continue-on-error promotes it into the contains(needs.*.result,'failure')
fail-set.
AGENTS.md: drop security-toolchain-gate from the (non-blocking) prose list
and the Advisory Job Triage SLA table; update its CI-jobs-table row to
describe the blocking failure mode. validate-ci-policy-parity confirms the
AGENTS blocking set matches the workflow summary fail-set (7 non-blocking).
---------
Co-authored-by: Codex <codex@example.invalid>
2026-05-17 15:31:15 -04:00
##### `ao goals steer recommend`
Run the re-steer policy engine over the verdict ledger and print recommended directive mutations and skip reasons. GOALS.md is never modified. Use `ao goals steer apply` to apply a recommendation.
```
ao goals steer recommend [flags]
```
**Flags: **
```
-h, --help help for recommend
--policy string Re-steer policy path (default: docs/re-steer-policy.json)
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
##### `ao goals steer remove`
Remove a directive by number
```
ao goals steer remove <number> [flags]
```
---
2026-03-03 14:38:28 -05:00
### `ao handoff`
Write a structured JSON handoff artifact that captures session context
```
ao handoff [summary] [flags]
```
**Flags: **
```
--collect Auto-collect git/bead state into the artifact
--dry-run Print artifact to stdout without writing file
--epic string Epic ID for RPI context
--goal string What the session was working on
-h, --help help for handoff
--no-kill Write artifact without restarting the session via tmux
--rpi-phase int RPI phase number (populates RPI context, sets type=rpi)
--run-id string Run ID for RPI context
```
---
feat(orchestration): dual-runtime OrchestrationPort foundation (ag-nk67 #orchestration-foundation) (#598)
## What
The **dual-runtime OrchestrationPort foundation** — the seam that gates
the
`[EPIC] AgentOps × Claude Managed Agents integration (dual-runtime)`
application epics.
Implements the 3-category model (Claude Workflow / NTM swarm / plain
skill) behind a
single `OrchestrationPort` with safe degradation **NTM → Claude-native →
beads floor**
and a global `AGENTOPS_ORCHESTRATION=off` opt-out.
Derived from a live 3-legged spike (`~/dev/agentops-3cat-spike/`): safe
degradation is
solvable at the selection layer; parallel buys quality/independence not
wall-clock at
small N; NTM is a multi-vendor control plane that runs Claude/Codex as
panes.
## What's in it (10 slices, agent-team driven)
- **Port + adapters** — `cli/internal/ports/orchestration.go` (idiomatic
to existing ports pattern) + new `cli/internal/orchestration/` pkg:
`Selector`, `ntm_probe` (capability detection via `ntm
--robot-capabilities`, not `command -v`), `beads_floor` +
`OrchestrationResult` parity type, degradation-conformance test.
- **Live CLI** — `ao orchestrate select` (`--pin`/`--opt-out`/`--json`);
COMMANDS.md regenerated.
- **Contracts** — `schemas/orchestration-{backend,result}.v1` + paired
`docs/contracts/` docs (structural-floor gated: 41 contracts).
- **Prose** — swarm/shared/crank rewritten NTM>native>beads; **gc
demoted** (soc-2rtm0); `rpi_phased_stream.go` doc-comment fixed.
- **Skills** — `automation-shape-routing` (the 3-category router) +
`workflow-builder` + meta-skill authoring chain wired (`context_rel`);
skill counts synced.
- `lib/orchestrate-select.sh` selector seam.
## Verification (local)
`go build ./...` clean · `go vet` clean · **56 Go tests pass**
(orchestration 31, ports 10, cmd/ao orchestrate 15) · structural-floor
PASS (41) · `lib/orchestrate-select.sh --self-test` 6/6 · live command:
`--json`→claude (NTM absent), `--opt-out`→beads, `--pin claude`→claude.
## Notes
- Bundles the foundation + the routing/authoring skills as one coherent
dual-runtime arc.
- NTM/Claude executors are stubs (the parity contract is real); concrete
executors land in the application epics this gates.
- Two-ladders distinction preserved (spawn-backend ladder A vs CLI
phase-executor ladder B) — see `docs/contracts/orchestration-ports.md`.
Closes-scenario: ag-nk67#orchestration-foundation
Bounded-context: BC5-Runtime
Evidence: cli/internal/orchestration/conformance_test.go
2026-05-29 14:42:45 -04:00
### `ao orchestrate`
Tooling for the orchestration safe-degradation ladder
```
ao orchestrate [command]
```
**Subcommands: **
#### `ao orchestrate select`
Resolve the orchestration backend via the safe-degradation ladder
```
ao orchestrate select [flags]
```
**Flags: **
```
-h, --help help for select
--json Emit the selection trace as JSON
--opt-out Bypass swarm engines and run on the beads floor
--pin string Force a backend: ntm|claude|codex|beads (overrides --opt-out and availability)
```
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao ratchet`
2026-02-21 19:41:50 -05:00
2026-04-05 09:15:27 -04:00
Track progress through the phased RPI workflow.
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao ratchet [command]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
#### `ao ratchet check`
2026-02-21 19:41:50 -05:00
Check if prerequisites are satisfied for a workflow step.
```
2026-02-26 06:42:03 -05:00
ao ratchet check <step> [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
check, c
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao ratchet next`
2026-02-21 19:41:50 -05:00
Show the next pending step in the RPI workflow.
```
2026-02-26 06:42:03 -05:00
ao ratchet next [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
next, n
```
2026-02-21 19:41:50 -05:00
**Flags: **
```
--epic string Filter by epic ID
-h, --help help for next
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao ratchet spec`
2026-02-21 19:41:50 -05:00
Find and output the current spec artifact path.
```
2026-02-26 06:42:03 -05:00
ao ratchet spec [flags]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao ratchet status`
2026-02-21 19:41:50 -05:00
Display the current state of the ratchet chain.
```
2026-02-26 06:42:03 -05:00
ao ratchet status [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
status, s
```
2026-02-21 19:41:50 -05:00
**Flags: **
```
--chain string Filter by chain ID
--epic string Filter by epic ID
-h, --help help for status
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao ratchet validate`
2026-02-21 19:41:50 -05:00
Validate that an artifact meets quality requirements.
```
2026-02-26 06:42:03 -05:00
ao ratchet validate <step> [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
--changes strings Files to validate
-h, --help help for validate
--lenient Allow legacy artifacts without schema_version (expires in 90 days)
--lenient-expiry int Days until lenient bypass expires (default 90)
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao ratchet promote`
2026-02-21 19:41:50 -05:00
Record promotion of an artifact to a higher tier.
```
2026-02-26 06:42:03 -05:00
ao ratchet promote <artifact> [flags]
2026-02-21 19:41:50 -05:00
```
2026-05-02 22:18:50 -04:00
**Aliases: **
```
promote, p
```
2026-02-21 19:41:50 -05:00
**Flags: **
```
-h, --help help for promote
--to int Target tier (0-4, required) (default -1)
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao ratchet record`
2026-02-21 19:41:50 -05:00
Record that a workflow step has been completed.
```
2026-02-26 06:42:03 -05:00
ao ratchet record <step> [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
--cycle int RPI cycle number (1 for first, 2+ for iterations)
-h, --help help for record
--input string Input artifact path
--lock Lock the step (engage ratchet) (default true)
--output string Output artifact path (required)
--parent-epic string Parent epic ID from prior RPI cycle
--tier int Quality tier (0-4) (default -1)
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao ratchet skip`
2026-02-21 19:41:50 -05:00
Record that a step was intentionally skipped.
```
2026-02-26 06:42:03 -05:00
ao ratchet skip <step> [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
-h, --help help for skip
--reason string Reason for skipping (required)
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao ratchet find`
2026-02-21 19:41:50 -05:00
Search for artifacts across all locations.
```
2026-02-26 06:42:03 -05:00
ao ratchet find <pattern> [flags]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao ratchet trace`
2026-02-21 19:41:50 -05:00
Trace an artifact back through the ratchet chain.
```
2026-02-26 06:42:03 -05:00
ao ratchet trace <artifact> [flags]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao ratchet migrate`
2026-02-21 19:41:50 -05:00
Migrate chain from legacy YAML format to JSONL.
```
2026-02-26 06:42:03 -05:00
ao ratchet migrate [flags]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao ratchet migrate-artifacts`
2026-02-21 19:41:50 -05:00
Add schema_version: 1 to existing .agents/ artifacts.
```
2026-02-26 06:42:03 -05:00
ao ratchet migrate-artifacts [path] [flags]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao rpi`
2026-02-21 19:41:50 -05:00
2026-04-05 09:15:27 -04:00
Commands for automating the RPI lifecycle.
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao rpi [command]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
#### `ao rpi cancel`
2026-02-21 19:41:50 -05:00
2026-02-21 21:46:54 -05:00
Cancel active RPI orchestration runs via a CLI kill switch.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao rpi cancel [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-02-21 21:46:54 -05:00
--all Cancel all active runs discovered under current/sibling roots
--dry-run Show what would be cancelled without sending signals
-h, --help help for cancel
--run-id string Cancel one active run by run ID
--signal string Signal to send: TERM|KILL|INT (default "TERM")
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao rpi cleanup`
2026-02-21 21:18:52 -05:00
2026-02-21 21:46:54 -05:00
Detect and clean up stale RPI phased runs.
2026-02-21 21:18:52 -05:00
```
2026-02-26 06:42:03 -05:00
ao rpi cleanup [flags]
2026-02-21 21:18:52 -05:00
```
**Flags: **
```
2026-02-21 21:46:54 -05:00
--all Clean up all stale runs
--dry-run Show what would be done without making changes
-h, --help help for cleanup
--prune-branches Delete legacy RPI branches (rpi/*, codex/auto-rpi-*)
--prune-worktrees Run 'git worktree prune' after cleanup
--run-id string Clean up a specific run by ID
--stale-after duration Only clean runs older than this age (0 disables age filtering)
2026-02-21 21:18:52 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao rpi loop`
2026-02-21 19:41:50 -05:00
Execute RPI cycles in a loop, consuming from next-work.jsonl.
```
2026-02-26 06:42:03 -05:00
ao rpi loop [goal] [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
--auto-clean Run stale RPI cleanup before each phased cycle
--auto-clean-stale-after duration Only auto-clean runs older than this age (default 24h0m0s)
2026-03-07 13:26:49 -05:00
--bd-sync-policy string Legacy bd landing checkpoint policy: auto|always|never (auto/always run 'bd export -o /dev/null' on current bd releases) (default "auto")
2026-02-21 21:46:54 -05:00
--cleanup-prune-branches Run legacy branch cleanup during supervisor cleanup
2026-02-21 19:41:50 -05:00
--cleanup-prune-worktrees Run git worktree prune during supervisor cleanup (default true)
2026-02-21 21:18:52 -05:00
--command-timeout duration Timeout for supervisor external commands (git/bd/gate scripts) (default 20m0s)
feat(knowledge): rename athena → compile + add Karpathy-style knowledge compiler
Rename the athena skill to compile — a descriptive name that communicates
what it actually does. Extend with Karpathy's LLM Knowledge Bases architecture:
- New compile phase: LLM reads raw .agents/ artifacts and produces interlinked
markdown wiki at .agents/compiled/ with index.md, log.md, backlinks
- New lint phase: detects contradictions, orphan pages, stale claims, coverage gaps
- Pluggable compute backend via AGENTOPS_COMPILE_RUNTIME (ollama|claude|openai)
- Hash-based incremental compilation (only recompile changed sources)
- compile.sh engine with security fixes (no shell injection, path traversal guard)
- Full rename across 93 files: skills, docs, CLI, tests, hooks, scripts, codex
Existing Mine → Grow → Defrag cycle preserved as phases within the larger
compile workflow. No vector DB — compiled wiki IS the retrieval layer.
2026-04-05 17:57:40 -04:00
--compile Enable Compile producer cadence before queue selection
--compile-defrag Run defrag sweep after Compile mine producer tick
--compile-interval duration Minimum interval between Compile producer ticks (0 = every cycle) (default 30m0s)
--compile-since string Lookback window for Compile mine producer (default "26h")
2026-02-21 19:41:50 -05:00
--cycle-delay duration Delay between completed cycles
--cycle-retries int Automatic retry count per cycle after a failed attempt
--detached-branch-prefix string Branch prefix used by detached HEAD self-heal (default "codex/auto-rpi")
--detached-heal Auto-create/switch to a named branch when HEAD is detached
--ensure-cleanup Run stale-run cleanup after each cycle (cleanup guarantee)
--failure-policy string Cycle failure policy: stop|continue (default "stop")
--gate-fast-script string Fast validation gate script path (default "scripts/validate-go-fast.sh")
--gate-policy string Quality/security gate policy: off|best-effort|required (default "off")
--gate-security-script string Security gate script path (default "scripts/security-gate.sh")
-h, --help help for loop
2026-02-21 21:46:54 -05:00
--kill-switch-path string Supervisor kill-switch file path checked at cycle boundaries (absolute or repo-relative) (default ".agents/rpi/KILL")
2026-02-21 19:41:50 -05:00
--landing-branch string Landing target branch (empty resolves origin/HEAD, then current branch, then main)
--landing-commit-message string Commit message template for landing policies that commit (default "chore(rpi): autonomous cycle {{cycle}}")
2026-02-21 21:18:52 -05:00
--landing-lock-path string Landing lock file path for synchronized integration (absolute or repo-relative) (default ".agents/rpi/landing.lock")
2026-02-21 21:46:54 -05:00
--landing-policy string Landing policy after successful cycle: off|commit|sync-push (default "off")
2026-02-21 19:41:50 -05:00
--lease Acquire a single-flight supervisor lease lock before running
--lease-path string Lease lock file path (absolute or repo-relative) (default ".agents/rpi/supervisor.lock")
--lease-ttl duration Lease heartbeat TTL for supervisor lock metadata (default 2m0s)
--max-cycles int Maximum cycles (0 = unlimited, stop when queue empty)
2026-02-26 21:35:05 -05:00
--ralph Enable Ralph-mode preset for unattended external loop supervision (implies supervisor defaults with safe nonstop settings)
2026-02-21 19:41:50 -05:00
--repo-filter string Only process queue items targeting this repo (empty = all)
--retry-backoff duration Backoff between cycle retry attempts (default 30s)
--supervisor Enable autonomous supervisor mode (lease lock, self-heal, retries, gates, cleanup)
```
fix(nightly): ship 5 retrospective code fixes (truncate, standards gate, probed_stale_at, dream-probe, bd-install) (#156)
* fix(goals): preserve diagnostic tail in truncateOutput
Head-only truncation at 500 runes cut the operator hint off the end of
gate output. The 2026-04-26 nightly retrospective showed flywheel-
compounding's "sessions must use 'ao lookup --cite ...'" tail being lost
mid-word for verbose runs.
New shape: when input exceeds 500 runes, keep first 200 + truncation
marker + last 200 runes. Short inputs untouched. Verified against live
ao goals measure --json — six long-output gates (flywheel-proof,
hook-preflight, go-cli-tests, contract-compatibility, install-smoke,
flywheel-lifecycle) now expose both their failure label and their
trailing fix-it.
Source: 2026-04-26 nightly retro task 1.
* feat(ci): add standards-injector reference completeness gate
hooks/standards-injector.sh fails open when a mapped <lang> is missing
its reference file. That's how `.js` lost standards inject for weeks
until the 2026-04-26 nightly caught it. New gate parses the case
statement, asserts every mapped lang has skills/standards/references/
<lang>.md, and runs in pre-push and CI.
Wires:
- scripts/check-standards-injector-completeness.sh (new)
- scripts/pre-push-gate.sh (slot 27b under hook category)
- .github/workflows/validate.yml (parallel job + summary deps)
- tests/scripts/check-standards-injector-completeness.bats (6 cases:
happy path, missing-named, |-alternation, parser-empty, real-repo)
Removing skills/standards/references/javascript.md temporarily makes
the gate FAIL with a clear message; restoring makes it PASS.
Source: 2026-04-26 nightly retro task 2.
* feat(rpi): add probed_stale_at + probed_by + ao rpi mark-probed
When a nightly probes a queue item and finds it stale, the knowledge
dies in the digest — tomorrow's run re-probes the same item. Adds
optional probed_stale_at (RFC3339) and probed_by fields to the v1.3
item schema, the Go round-trip type, the schema-rows acceptance test,
and a new `ao rpi mark-probed --id=... --by=...` subcommand for future
nightlies to write these without hand-editing JSON.
- docs/contracts/next-work.schema.md (Item table)
- cli/internal/rpi/types.go (NextWorkItem fields, omitempty)
- cli/internal/rpi/types_test.go (round-trip + omitempty)
- cli/cmd/ao/rpi_mark_probed.go (new subcommand)
- cli/cmd/ao/rpi_mark_probed_test.go (4 cases)
- cli/docs/COMMANDS.md (regenerated)
- tests/scripts/check-next-work-schema-rows.bats (acceptance case)
validate-next-work-contract-parity.sh stays green.
Source: 2026-04-26 nightly retro task 3.
* fix(overnight): probe Dream packets for staleness before emit
Three nightlies in a row emitted the same two stale packets ("philosophy
doc", "next-work schema v1.3") because no gate verified the cited
surface wasn't already shipped. Curator now runs a 5-second tractability
probe against each candidate's TargetFiles + scripts/ refs in the
morning command before writing it. Conclusively-stale packets are
suppressed; the suppression is recorded as a dream-curator-suppressed
entry on the run summary so operators see what was skipped instead of a
silent gap.
- cli/cmd/ao/overnight.go (overnightSummary.CuratorSuppressed)
- cli/cmd/ao/overnight_packets.go (probeDreamPacketStaleness,
extractScriptsRef, suppression plumbed through
buildDreamMorningPacketPlans return)
- cli/cmd/ao/overnight_packets_test.go (suppression-on-existing-target +
emits-when-inconclusive integration tests)
Source: 2026-04-26 nightly retro task 4.
* chore(scripts): add install-bd.sh installer
bd has been "unavailable" in three consecutive nightly runs. Upstream
(steveyegge/beads) publishes signed cross-platform binaries for
darwin/linux on amd64/arm64. New installer detects the platform,
downloads the matching tarball, installs to ~/.local/bin/bd, and
verifies via `bd version`. Idempotent: short-circuits when the
requested version is already present (use --force to override).
- scripts/install-bd.sh (new, executable)
- tests/scripts/install-bd.bats (4 offline-safe cases)
Verified end-to-end on darwin/arm64: download + extract + verify all
green.
Source: 2026-04-26 nightly retro task 5.
* fix(ci): align bats stub and AGENTS table with new standards-injector gate
PR #156 introduced scripts/check-standards-injector-completeness.sh
without:
- adding a make_stub for it in tests/scripts/pre-push-gate.bats setup;
three pre-push-gate bats tests (404, 414, 415) used a FAKE_REPO that
lacked the new script and the gate fired "missing executable", so
status came back non-zero
- listing it in the AGENTS.md CI table; validate-ci-policy-parity.sh
diffs the table against validate.yml summary.needs and flagged 2
drift groups
Both gates pass locally now.
2026-04-26 19:26:04 -04:00
#### `ao rpi mark-probed`
Set probed_stale_at and probed_by on a next-work item whose tractability
```
ao rpi mark-probed [flags]
```
**Flags: **
```
--at string Override the probed-at timestamp (RFC3339); defaults to now
--by string Probe author tag, e.g. nightly/2026-04-26-v3 (required)
-h, --help help for mark-probed
--id string Item identifier (id, bead_id, or title) to stamp (required)
--queue string Path to next-work.jsonl (default ".agents/rpi/next-work.jsonl")
```
2026-02-26 21:35:05 -05:00
#### `ao rpi nudge`
Send a message to an active tmux-backed RPI phase session.
```
ao rpi nudge [message] [flags]
```
**Flags: **
```
--all-workers Send nudge to every worker session for the phase
-h, --help help for nudge
--message string Nudge message to send
--phase int Phase number to target (1-3; defaults to run's current phase)
--run-id string Run ID to target (defaults to latest phased state)
--worker int Send nudge to one worker (for example: 1)
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao rpi parallel`
2026-02-24 05:29:34 -05:00
Run multiple RPI epics concurrently, each in an isolated git worktree.
```
2026-02-26 06:42:03 -05:00
ao rpi parallel [goals...] [flags]
2026-02-24 05:29:34 -05:00
```
**Flags: **
```
2026-05-03 18:45:51 -04:00
--auto-merge Opt in to legacy merge/cleanup after successful epics
2026-02-24 05:29:34 -05:00
--gate-script string Validation script to run after all merges (e.g., scripts/ci-local-release.sh)
-h, --help help for parallel
--manifest string Path to epic manifest file (JSON)
--merge-order string Comma-separated epic names for merge order (default: manifest order or arg order)
2026-05-03 18:45:51 -04:00
--no-merge Compatibility alias for the default preserve-for-review behavior
2026-02-24 05:29:34 -05:00
--phase-timeout duration Timeout per epic (kills subprocess if exceeded) (default 1h30m0s)
--runtime-cmd string Runtime command for phased sessions (default: claude)
--tmux Spawn epics in tmux windows for interactive visibility
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao rpi phased`
2026-02-21 19:41:50 -05:00
Orchestrate the full RPI lifecycle using 3 consolidated phases.
```
2026-02-26 06:42:03 -05:00
ao rpi phased <goal> [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
--auto-clean-stale Run stale-run cleanup before starting phased execution
--auto-clean-stale-after duration Only clean stale runs older than this age when auto-clean is enabled (default 24h0m0s)
2026-03-03 14:38:28 -05:00
--budget string Override phase budgets in seconds (<phase>:<seconds>, comma-separated), e.g. discovery:300,validation:120
2026-04-11 10:19:50 -04:00
--discovery-artifact string Path to a pre-validated discovery artifact (markdown) used to skip Phase 1 when combined with --from=implementation
Executable spec layer (epic soc-58nt, F2–F5): GOALS as BDD acceptance criteria (#292)
* feat(goals): F2.0 scenario-result artifact contract + producer/writer
bead: soc-58nt.2.6
* docs(goals): F4.0 trace link convention ADR-0005
bead: soc-58nt.4.8
* docs(goals): F3.0 domain-slice manifest contract + ADR-0004
bead: soc-58nt.3.8
- schemas/domain-slice-manifest.v1.schema.json: JSON Schema (draft/2020-12,
additionalProperties:false) for domain-slice manifests. All required fields:
domain, version, bounded_context, directive_ids (d-<slug> pattern), scenario_ids,
context_roots, allowed_read_globs, denied_read_globs, validation_commands, owner.
- docs/adr/ADR-0004-domain-slice-manifest-contract.md: records four decisions:
(A) command shape is ao rpi phased --domain <name>; (B) manifest is durable
tracked artifact at docs/domains/<name>/manifest.yaml; (C) reconciles with the
domain skill (vocabulary), context-map.md (architecture view), and skill
frontmatter — no overlap; (D) Go model named domainSliceManifest, explicitly
distinct from rpi_phased_manifest.go's phaseManifest. Cross-references ADR-0003.
- docs/domains/README.md: explains the directory, field table, relationship to
the three pre-existing domain surfaces, and how to add a new slice.
- docs/domains/example/manifest.yaml: fully populated example; validated against
the schema via jsonschema (PASSED).
* feat(goals): F2.1 scenario-result aggregation reader
bead: soc-58nt.2.1
* feat(rpi): F3.1 domainSliceManifest model + loader
Implements the domainSliceManifest Go model and loader in
cli/internal/domainslice/ per the F3.0 contract (ADR-0004, Decision D).
Uses gopkg.in/yaml.v3 with KnownFields(true) to reject unknown fields,
mirrors the schema's additionalProperties:false. Validates all required
fields, directive_id pattern (^d-[a-z0-9][a-z0-9-]*$), context_roots
minItems:1, and validation_commands sub-fields with field-named errors.
Explicitly distinct from phaseManifest (rpi_phased_manifest.go).
28 tests pass (L1 unit + L2 fixture round-trip via docs/domains/example/manifest.yaml).
bead: soc-58nt.3.1
* feat(goals): F4.1 read-only executable-spec trace graph walker
bead: soc-58nt.4.1
* feat(goals): F2.2 per-directive scenario_satisfaction + threshold verdict
bead: soc-58nt.2.2
* feat(rpi): F3.2 ao rpi phased --domain scoping
bead: soc-58nt.3.2
* feat(goals): F4.2/F4.3 ao goals trace --from / --orphans
beads: soc-58nt.4.2 soc-58nt.4.3
* feat(goals): F4.4 ao goals render — GOALS.md to Gherkin
bead: soc-58nt.4.4
* feat(rpi): F3.3a domain-scope audit evidence
bead: soc-58nt.3.3
* feat(goals): F2.3 scenario_satisfaction JSON field + --scenarios-only
Per-directive scenario satisfaction added to ao goals measure: 0 -> 8
new JSON fields and a --scenarios-only mode that skips gate execution.
bead: soc-58nt.2.3
* feat(rpi): F3.4 ao rpi phased --scaffold-domain
bead: soc-58nt.3.4
* test(goals): commit missing goals-trace scenario-results fixture
The F4.1/F4.2 walker tests reference a scenario-results.json fixture under
a gitignored .agents/ subpath; it was never force-added and a clean
checkout (and CI) lacks it, failing 5 scenario_result tests. Force-add it.
bead: soc-58nt.4.1
* fix(goals): F4.1 tighten goalstrace scenario-claim heuristic
bead: soc-58nt.4.9
- Tighten scenarioTokenRe: auto- tokens now require at least two
hyphen-separated slug segments (auto-X-Y…), so single-word English
compounds like auto-merge and auto-update are no longer matched.
- Downgrade broken_bead_scenario_claim from error to warning when the
claim comes from a heuristic (ConfidenceLow) free-text match; per
ADR-0005 §4.1 only an explicit Scenarios: line constitutes a broken
explicit link and may produce an error.
- Add beads_test.go with table-driven tests covering: English auto-*
false-positive rejection, real multi-segment auto-* ID detection,
explicit missing scenario → error, heuristic missing → warning only,
resolvable scenario → no defect, end-to-end Walk with auto-merge bead
produces no error-severity finding.
* test(goals): F2.T1 regression-coverage audit + gap fill
bead: soc-58nt.2.4
* ci(goals): F1.6 wire executable-spec link lint + trace-orphans (warn-first)
bead: soc-58nt.1.9
* feat(rpi): F3.3b runtime hook enforcement of domain scope
bead: soc-58nt.3.9
* test(goals): F2.T2 e2e script for scenario-satisfaction gate
bead: soc-58nt.2.5
* docs(goals): F5.0 re-steer policy + mutation-safety contract (ADR-0006)
bead: soc-58nt.5.9
* docs(goals): fix streak-reset prose in ADR-0006 (cleanup)
bead: soc-58nt.5.9
[no-sibling] prose fixup only, no structural change
0 → 0 schema fields changed
* test(goals): F4.T1 regression-coverage audit + gap fill
bead: soc-58nt.4.6
* feat(wiki): land wiki bounded context waves 1-4 (epic soc-behj)
Phased strangler consolidating ao's .agents/-touching logic into one
cli/internal/wiki bounded context. Each wave gated by the 102 cmd/ao
integration tests staying green; legacy command surface untouched.
- W1 soc-1lju FrontmatterCodec — all 5 frontmatter parsers delegate
- W2 soc-36lw CorpusLocator — agentsDirIn moved, 17 call sites migrated
- W2 soc-f4tr Artifact + Claim domain types with subtype invariants
- W3 soc-vot0 persistent WikiIndex — JSONL, incremental by content-hash
- W3 soc-r08p FreshnessPolicy — claim-level evidence-driven freshness
- W4 soc-ijp8 WikiPipeline — subsumes llmwiki loop, 3 stages wired
- W4 soc-q50a port conformance suite
Also anchors .gitignore's bare wiki/ pattern with a !cli/internal/wiki/
negation — the new package was being silently ignored.
Wave 5 (ao wiki command group) is not included in this commit.
* test(goals): F4.T2 e2e script for trace chain
bead: soc-58nt.4.7
* test(rpi): F3.T1 regression-coverage audit + gap fill
bead: soc-58nt.3.6
* test(rpi): F3.T2 e2e script for domain-scoped RPI
bead: soc-58nt.3.7
* feat(goals): F5.1 verdict ledger schema + writer
bead: soc-58nt.5.1
* feat(goals): F5.2 re-steer policy engine + verdict-ledger producer hookup
bead: soc-58nt.5.2
* feat(goals): F5.4 feedback-to-learning compiler
Adds cli/internal/feedbackcompiler — scans the verdict ledger for
fail->pass directive transitions and drafts a learning entry in
docs/learnings/ for each transition found. Drafts carry status: draft
and directive_id frontmatter (ADR-0005 §2.6). Never auto-promotes.
Idempotent: skips existing drafts on re-run.
Also documents the auto-draft workflow in
skills/forge/references/feedback-compiler-drafts.md with a compact
reference-link in skills/forge/SKILL.md (under 248-line limit).
Synced to skills-codex/forge/ and regenerated codex hashes.
bead: soc-58nt.5.4
* docs(goals): F5.5 compound-engineering retro in /post-mortem
Extend the /post-mortem skill with a Compound-Engineering Retro section
that compares iteration N vs N-1 for a domain slice using the F5.1 verdict
ledger (.agents/goals/verdict-ledger.json). The mode emits a comparative
delta — directives that improved (fail→pass, satisfaction up), regressed
(pass→fail, satisfaction down), or held stable — plus learning yield since
N-1, written as a status:draft learning to .agents/learnings/.
Detailed step-by-step procedure (CE.0–CE.5) lives in
references/compound-engineering-retro.md; SKILL.md carries a compact
trigger/commands summary and links to it. Both files synced to
skills-codex/post-mortem/ with updated codex hashes.
bead: soc-58nt.5.5
* feat(goals): F5.3 ao goals steer --auto with human-gated confirmation
bead: soc-58nt.5.3
* test(goals): F5.T1 regression-coverage audit + gap fill
bead: soc-58nt.5.7
* test(goals): F5.T2 e2e script for auto re-steer
bead: soc-58nt.5.8
* docs(goals): F2.4 docs regen for scenario-satisfaction gate + epic CLI artifacts
Regenerate cli/docs/COMMANDS.md and registry.json from a clean worktree at
HEAD so the soc-58nt command surface is documented without leaking unrelated
peer WIP into the generated docs.
F2 (soc-58nt.2.7): document scenario_satisfaction JSON shape, --scenarios-only,
result-artifact resolution, and exit codes in skills/goals/SKILL.md +
references/executable-spec-chain.md; cross-ref ao goals measure/trace from
skills/scenario/SKILL.md.
Epic-wide artifacts also landed here because they regenerate atomically across
F2-F5: COMMANDS.md/registry.json (all new ao goals/rpi surface), cli-skills-map
heading count, skills-codex hashes, ADR-0004/0005/0006 documentation-index
links, and the F2-F5 e2e CI lanes in validate.yml.
ao capabilities and ao robot-docs need no manual edits — both build their
command/flag surface from the live cobra tree, so new commands register
automatically (Global Rule G5 satisfied by construction).
bead: soc-58nt.2.7
* docs(domain): F3.5 domain-as-loop docs for domain-scoped RPI
Document the domain-slice runtime in skills/domain/SKILL.md (a "Domain as a
scoped RPI loop" section connecting the Slice primitive to ao rpi phased
--domain / --scaffold-domain / --force) and add the Domain-Slice row to the
modes table in skills/scaffold/SKILL.md, mirroring the existing Project/
Component/CI mode-row shape. The scaffold skill's Domain-Slice Mode section
already covered the workflow; this lands the missing modes-table entry so the
mode count is 3 -> 4.
The COMMANDS.md/registry/CI-lane regen for F3 landed in soc-58nt.2.7.
skills-codex hashes for the two changed skills refreshed via
scripts/regen-codex-hashes.sh; codex-parity audit clean.
bead: soc-58nt.3.5
* docs(goals): F5.6 re-steer loop docs in /post-mortem
Cross-reference the auto re-steer loop from the Compound-Engineering Retro
section of skills/post-mortem/SKILL.md: when the compound retro names a
chronically regressing directive, ao goals steer recommend prints
policy-driven directive mutations from the same verdict ledger and ao goals
steer apply writes the mutation to GOALS.md, human-gated via the non-lossy
patcher (ADR-0006). Mirrors the existing "closing the loop" cross-ref shape
used elsewhere in the skill's See Also prose.
The ao goals steer recommend/apply COMMANDS.md surface, the F5 e2e CI lane,
and the ADR-0006 documentation-index link landed atomically in soc-58nt.2.7's
epic-wide regen; the re-steer contract detail lives in
skills/goals/references/executable-spec-chain.md (also in 2.7).
skills-codex/post-mortem hash refreshed; codex-parity audit clean.
bead: soc-58nt.5.6
* docs(goals): F4.5 docs regen for goals trace + render (epic-subsumed)
F4's docs deliverables — the `ao goals trace` and `ao goals render` entries in
cli/docs/COMMANDS.md, the F4 trace-chain e2e CI lane in validate.yml, the
ADR-0005 documentation-index link, and the Trace/Render mode sections plus the
trace contract in skills/goals/SKILL.md + references/executable-spec-chain.md —
all co-landed atomically in soc-58nt.2.7's epic-wide CLI-reference regen
(commit 37798abe), because COMMANDS.md/registry.json regenerate as one unit
across F2-F5 and cannot be split per-bead.
This empty commit records soc-58nt.4.5 as complete with no further file
changes. Matches the epic-subsumed-bead convention: regen artifacts land once,
later beads point at the lead regen commit.
bead: soc-58nt.4.5
* test(goals): fix flag-global leak breaking full goals-measure run
TestGoalsIntegration ran 'goals measure --directives' via cobra, which
sets the package-global goalsMeasureDirectives and never resets it.
soc-58nt's new TestGoalsMeasure_FullMode* tests branch on that global,
so the unfiltered 'go test ./cmd/ao/...' run failed (gates skipped,
directives array emitted instead of the full snapshot+scenarios object).
-run filters masked it. Restore the global after Execute.
bead: soc-58nt.2.4
* fix(ci): correct soc-58nt skill/codex artifacts and CI-policy parity
Resolves 6 red CI checks on PR #292 (crank/soc-58nt) after merging main:
- skill-integrity: reword the "no scaffold subcommand" note in
skills/scaffold/SKILL.md so it no longer trips the heal INVALID_AO_CMD
substring check; copy skills/forge/references/examples.md into
skills-codex/forge/references/ so the codex forge dead-link clears.
- validate-codex-generated-artifacts: strip leaked non-Codex frontmatter
from skills-codex/forge/SKILL.md down to name + description.
- validate-codex-runtime-sections: remove the residual mixed-runtime
"Cross-vendor analog" line (Anthropic Managed Agents) from codex forge;
convert /forge slash-command refs to $forge Codex invocation style.
- validate-ci-policy-parity: add executable-spec-link-integrity
(non-blocking) to the AGENTS.md non-blocking list so it matches the
workflow's continue-on-error classification (warn-only F1.6 gate added
by soc-58nt without parity co-update).
- doc-release-gate: the link-validation broken link was the same codex
forge references/examples.md dead link, fixed above.
- agentops-contract-canaries: update the cli-command-surface canary
fixture + eval JSON for the 185->187 / 257->259 subcommand count after
soc-58nt added `ao goals render` and `ao goals trace`.
Also ports the soc-58nt "Closing the loop with re-steer" paragraph into
skills-codex/post-mortem/SKILL.md and regenerates codex artifact hashes
and registry.json after the merge.
* fix(test): set repo-local git identity in rpi-phased-domain e2e
CI runners have no global git identity; the temp-repo 'git commit' in the
F3.7 e2e exited 128 (empty ident name). Configure a repo-local identity.
bead: soc-58nt.3.7
* fix(goals): use canonical practice slug bdd-gherkin
soc-58nt files cited the practice slug 'bdd'; the canonical slug in
PRACTICE-REGISTRY.md is 'bdd-gherkin'. Clears the practice-citations
advisory check (9 invalid slug citations -> 0).
bead: soc-58nt.2.7
* fix(goals): add missing practices field to F5 gap-test file
goals_steer_auto_gap_test.go lacked a // practices: header; the
practice-citations --strict gate flags missing fields. Matches its
sibling goals_steer_auto_test.go.
bead: soc-58nt.5.7
* fix(security): resolve gosec G122 + golangci-lint errcheck/staticcheck HIGH findings
Drive scripts/security-gate.sh --mode quick to 0 HIGH findings.
gosec G122 (CWE-367 TOCTOU): goalstrace/artifacts.go reads files inside a
filepath.WalkDir callback via an os.Root-scoped handle (os.OpenRoot), closing
the check-to-use window and blocking symlink escape.
golangci-lint errcheck (~25): unchecked defer Close / os.Remove returns.
Resource-cleanup closes use explicit-ignore (defer func(){ _ = X.Close() }()).
Durability-gating closes before a rename (llm/review.go tmp.Close) are checked
and wrapped.
golangci-lint staticcheck (~21): ST1005 (drop trailing punctuation from error
strings), QF1001 (De Morgan's law), QF1002 (tagged switch), QF1012
(fmt.Fprintf over WriteString+Sprintf), S1016 (struct-literal -> conversion),
S1017 (strings.TrimSuffix), S1040 (drop redundant type assertion), SA1012
(context.TODO over nil Context), SA4032 (drop dead GOOS branch under build
constraint), SA9003 (remove empty branch).
* ci(security): make security-toolchain-gate blocking
Remove continue-on-error: true from the security-toolchain-gate job and drop
the "(advisory)" name suffix so a CRITICAL/HIGH security-gate finding fails
the validate summary job. The job is already in summary.needs, so removing
continue-on-error promotes it into the contains(needs.*.result,'failure')
fail-set.
AGENTS.md: drop security-toolchain-gate from the (non-blocking) prose list
and the Advisory Job Triage SLA table; update its CI-jobs-table row to
describe the blocking failure mode. validate-ci-policy-parity confirms the
AGENTS blocking set matches the workflow summary fail-set (7 non-blocking).
---------
Co-authored-by: Codex <codex@example.invalid>
2026-05-17 15:31:15 -04:00
--domain string Scope the run to a domain slice (loads docs/domains/<name>/manifest.yaml; phase prompts carry its boundaries)
2026-02-21 19:41:50 -05:00
--fast-path Force fast path (--quick for gates)
Executable spec layer (epic soc-58nt, F2–F5): GOALS as BDD acceptance criteria (#292)
* feat(goals): F2.0 scenario-result artifact contract + producer/writer
bead: soc-58nt.2.6
* docs(goals): F4.0 trace link convention ADR-0005
bead: soc-58nt.4.8
* docs(goals): F3.0 domain-slice manifest contract + ADR-0004
bead: soc-58nt.3.8
- schemas/domain-slice-manifest.v1.schema.json: JSON Schema (draft/2020-12,
additionalProperties:false) for domain-slice manifests. All required fields:
domain, version, bounded_context, directive_ids (d-<slug> pattern), scenario_ids,
context_roots, allowed_read_globs, denied_read_globs, validation_commands, owner.
- docs/adr/ADR-0004-domain-slice-manifest-contract.md: records four decisions:
(A) command shape is ao rpi phased --domain <name>; (B) manifest is durable
tracked artifact at docs/domains/<name>/manifest.yaml; (C) reconciles with the
domain skill (vocabulary), context-map.md (architecture view), and skill
frontmatter — no overlap; (D) Go model named domainSliceManifest, explicitly
distinct from rpi_phased_manifest.go's phaseManifest. Cross-references ADR-0003.
- docs/domains/README.md: explains the directory, field table, relationship to
the three pre-existing domain surfaces, and how to add a new slice.
- docs/domains/example/manifest.yaml: fully populated example; validated against
the schema via jsonschema (PASSED).
* feat(goals): F2.1 scenario-result aggregation reader
bead: soc-58nt.2.1
* feat(rpi): F3.1 domainSliceManifest model + loader
Implements the domainSliceManifest Go model and loader in
cli/internal/domainslice/ per the F3.0 contract (ADR-0004, Decision D).
Uses gopkg.in/yaml.v3 with KnownFields(true) to reject unknown fields,
mirrors the schema's additionalProperties:false. Validates all required
fields, directive_id pattern (^d-[a-z0-9][a-z0-9-]*$), context_roots
minItems:1, and validation_commands sub-fields with field-named errors.
Explicitly distinct from phaseManifest (rpi_phased_manifest.go).
28 tests pass (L1 unit + L2 fixture round-trip via docs/domains/example/manifest.yaml).
bead: soc-58nt.3.1
* feat(goals): F4.1 read-only executable-spec trace graph walker
bead: soc-58nt.4.1
* feat(goals): F2.2 per-directive scenario_satisfaction + threshold verdict
bead: soc-58nt.2.2
* feat(rpi): F3.2 ao rpi phased --domain scoping
bead: soc-58nt.3.2
* feat(goals): F4.2/F4.3 ao goals trace --from / --orphans
beads: soc-58nt.4.2 soc-58nt.4.3
* feat(goals): F4.4 ao goals render — GOALS.md to Gherkin
bead: soc-58nt.4.4
* feat(rpi): F3.3a domain-scope audit evidence
bead: soc-58nt.3.3
* feat(goals): F2.3 scenario_satisfaction JSON field + --scenarios-only
Per-directive scenario satisfaction added to ao goals measure: 0 -> 8
new JSON fields and a --scenarios-only mode that skips gate execution.
bead: soc-58nt.2.3
* feat(rpi): F3.4 ao rpi phased --scaffold-domain
bead: soc-58nt.3.4
* test(goals): commit missing goals-trace scenario-results fixture
The F4.1/F4.2 walker tests reference a scenario-results.json fixture under
a gitignored .agents/ subpath; it was never force-added and a clean
checkout (and CI) lacks it, failing 5 scenario_result tests. Force-add it.
bead: soc-58nt.4.1
* fix(goals): F4.1 tighten goalstrace scenario-claim heuristic
bead: soc-58nt.4.9
- Tighten scenarioTokenRe: auto- tokens now require at least two
hyphen-separated slug segments (auto-X-Y…), so single-word English
compounds like auto-merge and auto-update are no longer matched.
- Downgrade broken_bead_scenario_claim from error to warning when the
claim comes from a heuristic (ConfidenceLow) free-text match; per
ADR-0005 §4.1 only an explicit Scenarios: line constitutes a broken
explicit link and may produce an error.
- Add beads_test.go with table-driven tests covering: English auto-*
false-positive rejection, real multi-segment auto-* ID detection,
explicit missing scenario → error, heuristic missing → warning only,
resolvable scenario → no defect, end-to-end Walk with auto-merge bead
produces no error-severity finding.
* test(goals): F2.T1 regression-coverage audit + gap fill
bead: soc-58nt.2.4
* ci(goals): F1.6 wire executable-spec link lint + trace-orphans (warn-first)
bead: soc-58nt.1.9
* feat(rpi): F3.3b runtime hook enforcement of domain scope
bead: soc-58nt.3.9
* test(goals): F2.T2 e2e script for scenario-satisfaction gate
bead: soc-58nt.2.5
* docs(goals): F5.0 re-steer policy + mutation-safety contract (ADR-0006)
bead: soc-58nt.5.9
* docs(goals): fix streak-reset prose in ADR-0006 (cleanup)
bead: soc-58nt.5.9
[no-sibling] prose fixup only, no structural change
0 → 0 schema fields changed
* test(goals): F4.T1 regression-coverage audit + gap fill
bead: soc-58nt.4.6
* feat(wiki): land wiki bounded context waves 1-4 (epic soc-behj)
Phased strangler consolidating ao's .agents/-touching logic into one
cli/internal/wiki bounded context. Each wave gated by the 102 cmd/ao
integration tests staying green; legacy command surface untouched.
- W1 soc-1lju FrontmatterCodec — all 5 frontmatter parsers delegate
- W2 soc-36lw CorpusLocator — agentsDirIn moved, 17 call sites migrated
- W2 soc-f4tr Artifact + Claim domain types with subtype invariants
- W3 soc-vot0 persistent WikiIndex — JSONL, incremental by content-hash
- W3 soc-r08p FreshnessPolicy — claim-level evidence-driven freshness
- W4 soc-ijp8 WikiPipeline — subsumes llmwiki loop, 3 stages wired
- W4 soc-q50a port conformance suite
Also anchors .gitignore's bare wiki/ pattern with a !cli/internal/wiki/
negation — the new package was being silently ignored.
Wave 5 (ao wiki command group) is not included in this commit.
* test(goals): F4.T2 e2e script for trace chain
bead: soc-58nt.4.7
* test(rpi): F3.T1 regression-coverage audit + gap fill
bead: soc-58nt.3.6
* test(rpi): F3.T2 e2e script for domain-scoped RPI
bead: soc-58nt.3.7
* feat(goals): F5.1 verdict ledger schema + writer
bead: soc-58nt.5.1
* feat(goals): F5.2 re-steer policy engine + verdict-ledger producer hookup
bead: soc-58nt.5.2
* feat(goals): F5.4 feedback-to-learning compiler
Adds cli/internal/feedbackcompiler — scans the verdict ledger for
fail->pass directive transitions and drafts a learning entry in
docs/learnings/ for each transition found. Drafts carry status: draft
and directive_id frontmatter (ADR-0005 §2.6). Never auto-promotes.
Idempotent: skips existing drafts on re-run.
Also documents the auto-draft workflow in
skills/forge/references/feedback-compiler-drafts.md with a compact
reference-link in skills/forge/SKILL.md (under 248-line limit).
Synced to skills-codex/forge/ and regenerated codex hashes.
bead: soc-58nt.5.4
* docs(goals): F5.5 compound-engineering retro in /post-mortem
Extend the /post-mortem skill with a Compound-Engineering Retro section
that compares iteration N vs N-1 for a domain slice using the F5.1 verdict
ledger (.agents/goals/verdict-ledger.json). The mode emits a comparative
delta — directives that improved (fail→pass, satisfaction up), regressed
(pass→fail, satisfaction down), or held stable — plus learning yield since
N-1, written as a status:draft learning to .agents/learnings/.
Detailed step-by-step procedure (CE.0–CE.5) lives in
references/compound-engineering-retro.md; SKILL.md carries a compact
trigger/commands summary and links to it. Both files synced to
skills-codex/post-mortem/ with updated codex hashes.
bead: soc-58nt.5.5
* feat(goals): F5.3 ao goals steer --auto with human-gated confirmation
bead: soc-58nt.5.3
* test(goals): F5.T1 regression-coverage audit + gap fill
bead: soc-58nt.5.7
* test(goals): F5.T2 e2e script for auto re-steer
bead: soc-58nt.5.8
* docs(goals): F2.4 docs regen for scenario-satisfaction gate + epic CLI artifacts
Regenerate cli/docs/COMMANDS.md and registry.json from a clean worktree at
HEAD so the soc-58nt command surface is documented without leaking unrelated
peer WIP into the generated docs.
F2 (soc-58nt.2.7): document scenario_satisfaction JSON shape, --scenarios-only,
result-artifact resolution, and exit codes in skills/goals/SKILL.md +
references/executable-spec-chain.md; cross-ref ao goals measure/trace from
skills/scenario/SKILL.md.
Epic-wide artifacts also landed here because they regenerate atomically across
F2-F5: COMMANDS.md/registry.json (all new ao goals/rpi surface), cli-skills-map
heading count, skills-codex hashes, ADR-0004/0005/0006 documentation-index
links, and the F2-F5 e2e CI lanes in validate.yml.
ao capabilities and ao robot-docs need no manual edits — both build their
command/flag surface from the live cobra tree, so new commands register
automatically (Global Rule G5 satisfied by construction).
bead: soc-58nt.2.7
* docs(domain): F3.5 domain-as-loop docs for domain-scoped RPI
Document the domain-slice runtime in skills/domain/SKILL.md (a "Domain as a
scoped RPI loop" section connecting the Slice primitive to ao rpi phased
--domain / --scaffold-domain / --force) and add the Domain-Slice row to the
modes table in skills/scaffold/SKILL.md, mirroring the existing Project/
Component/CI mode-row shape. The scaffold skill's Domain-Slice Mode section
already covered the workflow; this lands the missing modes-table entry so the
mode count is 3 -> 4.
The COMMANDS.md/registry/CI-lane regen for F3 landed in soc-58nt.2.7.
skills-codex hashes for the two changed skills refreshed via
scripts/regen-codex-hashes.sh; codex-parity audit clean.
bead: soc-58nt.3.5
* docs(goals): F5.6 re-steer loop docs in /post-mortem
Cross-reference the auto re-steer loop from the Compound-Engineering Retro
section of skills/post-mortem/SKILL.md: when the compound retro names a
chronically regressing directive, ao goals steer recommend prints
policy-driven directive mutations from the same verdict ledger and ao goals
steer apply writes the mutation to GOALS.md, human-gated via the non-lossy
patcher (ADR-0006). Mirrors the existing "closing the loop" cross-ref shape
used elsewhere in the skill's See Also prose.
The ao goals steer recommend/apply COMMANDS.md surface, the F5 e2e CI lane,
and the ADR-0006 documentation-index link landed atomically in soc-58nt.2.7's
epic-wide regen; the re-steer contract detail lives in
skills/goals/references/executable-spec-chain.md (also in 2.7).
skills-codex/post-mortem hash refreshed; codex-parity audit clean.
bead: soc-58nt.5.6
* docs(goals): F4.5 docs regen for goals trace + render (epic-subsumed)
F4's docs deliverables — the `ao goals trace` and `ao goals render` entries in
cli/docs/COMMANDS.md, the F4 trace-chain e2e CI lane in validate.yml, the
ADR-0005 documentation-index link, and the Trace/Render mode sections plus the
trace contract in skills/goals/SKILL.md + references/executable-spec-chain.md —
all co-landed atomically in soc-58nt.2.7's epic-wide CLI-reference regen
(commit 37798abe), because COMMANDS.md/registry.json regenerate as one unit
across F2-F5 and cannot be split per-bead.
This empty commit records soc-58nt.4.5 as complete with no further file
changes. Matches the epic-subsumed-bead convention: regen artifacts land once,
later beads point at the lead regen commit.
bead: soc-58nt.4.5
* test(goals): fix flag-global leak breaking full goals-measure run
TestGoalsIntegration ran 'goals measure --directives' via cobra, which
sets the package-global goalsMeasureDirectives and never resets it.
soc-58nt's new TestGoalsMeasure_FullMode* tests branch on that global,
so the unfiltered 'go test ./cmd/ao/...' run failed (gates skipped,
directives array emitted instead of the full snapshot+scenarios object).
-run filters masked it. Restore the global after Execute.
bead: soc-58nt.2.4
* fix(ci): correct soc-58nt skill/codex artifacts and CI-policy parity
Resolves 6 red CI checks on PR #292 (crank/soc-58nt) after merging main:
- skill-integrity: reword the "no scaffold subcommand" note in
skills/scaffold/SKILL.md so it no longer trips the heal INVALID_AO_CMD
substring check; copy skills/forge/references/examples.md into
skills-codex/forge/references/ so the codex forge dead-link clears.
- validate-codex-generated-artifacts: strip leaked non-Codex frontmatter
from skills-codex/forge/SKILL.md down to name + description.
- validate-codex-runtime-sections: remove the residual mixed-runtime
"Cross-vendor analog" line (Anthropic Managed Agents) from codex forge;
convert /forge slash-command refs to $forge Codex invocation style.
- validate-ci-policy-parity: add executable-spec-link-integrity
(non-blocking) to the AGENTS.md non-blocking list so it matches the
workflow's continue-on-error classification (warn-only F1.6 gate added
by soc-58nt without parity co-update).
- doc-release-gate: the link-validation broken link was the same codex
forge references/examples.md dead link, fixed above.
- agentops-contract-canaries: update the cli-command-surface canary
fixture + eval JSON for the 185->187 / 257->259 subcommand count after
soc-58nt added `ao goals render` and `ao goals trace`.
Also ports the soc-58nt "Closing the loop with re-steer" paragraph into
skills-codex/post-mortem/SKILL.md and regenerates codex artifact hashes
and registry.json after the merge.
* fix(test): set repo-local git identity in rpi-phased-domain e2e
CI runners have no global git identity; the temp-repo 'git commit' in the
F3.7 e2e exited 128 (empty ident name). Configure a repo-local identity.
bead: soc-58nt.3.7
* fix(goals): use canonical practice slug bdd-gherkin
soc-58nt files cited the practice slug 'bdd'; the canonical slug in
PRACTICE-REGISTRY.md is 'bdd-gherkin'. Clears the practice-citations
advisory check (9 invalid slug citations -> 0).
bead: soc-58nt.2.7
* fix(goals): add missing practices field to F5 gap-test file
goals_steer_auto_gap_test.go lacked a // practices: header; the
practice-citations --strict gate flags missing fields. Matches its
sibling goals_steer_auto_test.go.
bead: soc-58nt.5.7
* fix(security): resolve gosec G122 + golangci-lint errcheck/staticcheck HIGH findings
Drive scripts/security-gate.sh --mode quick to 0 HIGH findings.
gosec G122 (CWE-367 TOCTOU): goalstrace/artifacts.go reads files inside a
filepath.WalkDir callback via an os.Root-scoped handle (os.OpenRoot), closing
the check-to-use window and blocking symlink escape.
golangci-lint errcheck (~25): unchecked defer Close / os.Remove returns.
Resource-cleanup closes use explicit-ignore (defer func(){ _ = X.Close() }()).
Durability-gating closes before a rename (llm/review.go tmp.Close) are checked
and wrapped.
golangci-lint staticcheck (~21): ST1005 (drop trailing punctuation from error
strings), QF1001 (De Morgan's law), QF1002 (tagged switch), QF1012
(fmt.Fprintf over WriteString+Sprintf), S1016 (struct-literal -> conversion),
S1017 (strings.TrimSuffix), S1040 (drop redundant type assertion), SA1012
(context.TODO over nil Context), SA4032 (drop dead GOOS branch under build
constraint), SA9003 (remove empty branch).
* ci(security): make security-toolchain-gate blocking
Remove continue-on-error: true from the security-toolchain-gate job and drop
the "(advisory)" name suffix so a CRITICAL/HIGH security-gate finding fails
the validate summary job. The job is already in summary.needs, so removing
continue-on-error promotes it into the contains(needs.*.result,'failure')
fail-set.
AGENTS.md: drop security-toolchain-gate from the (non-blocking) prose list
and the Advisory Job Triage SLA table; update its CI-jobs-table row to
describe the blocking failure mode. validate-ci-policy-parity confirms the
AGENTS blocking set matches the workflow summary fail-set (7 non-blocking).
---------
Co-authored-by: Codex <codex@example.invalid>
2026-05-17 15:31:15 -04:00
--force With --scaffold-domain: overwrite an existing manifest
2026-02-21 19:41:50 -05:00
--from string Start from phase (discovery, implementation, validation; aliases: research, plan, pre-mortem, crank, vibe, post-mortem) (default "discovery")
-h, --help help for phased
--interactive Enable human gates at research and plan phases
--live-status Stream phase progress to a live-status.md file
--max-retries int Maximum retry attempts per gate (default: 3) (default 3)
2026-04-05 09:15:27 -04:00
--mixed Enable cross-vendor mixed-model execution (planner and reviewer from different vendors)
2026-03-03 14:38:28 -05:00
--no-budget Disable all phase budgets and run without time-box transitions
--no-dashboard Disable auto-opening the web dashboard
--no-test-first Opt out of strict-quality spec-first execution (do not pass --test-first to /crank)
2026-02-21 19:41:50 -05:00
--no-worktree Disable worktree isolation (run in current directory)
--phase-timeout duration Maximum wall-clock runtime per phase (0 disables timeout) (default 1h30m0s)
feat(rip): sever + delete gc-bridge glue, phased engine keeps non-gc backends (soc-2rtm0 #gcglue-rip wave2) (#513)
Wave 2 of 5 of the orchestration-substrate retirement (soc-2rtm0).
Severs the Gas City (gc) bridge glue from the phased RPI engine and
deletes it. The phased engine keeps its non-gc backends
(auto/direct/stream/tmux); the `gc` runtime mode is removed. Wave 1
(factory) merged as #512.
## What changed (Edge B sever, per recon map)
**Typedef relocation:** Moved the injectable `gcExecFn`/`gcLookFn`
func-typedefs out of the deleted `gc_bridge.go` into the KEEP file
`rpi_phased_context.go`, renamed to `execFn`/`lookFn` (they are no
longer gc-specific — used by `rpi_phased_setup.go`, `tracker_health.go`,
`rpi_phased_stream.go`, `rpi_phased_context.go` for runtime/binary
preflight). All callsites updated.
**Phased selector patched (drop `gc` backend):**
- `rpi_phased_stream.go` — removed the `case "gc":` executor + the
auto-gc-preferred branch (auto now goes straight to stream) + the
`gcExecutor` backendMode type-assertion.
- `rpi_phased.go` — removed the `gc` preflight branch, the auto-gc
branch, `preflightGCRuntimeAvailability`, and `gc` from the `--runtime`
flag help + completion list.
- `rpi_phased_context.go` — `validateRuntimeMode` drops `gc`; removed
the `GasCityClient`/`GCCityPath`/`GCCityName` opts fields (their type
died with `rpi_phased_gc.go`).
- `doctor.go` — removed the GasCity Bridge + GasCity Product Runtime
health checks (`checkGasCityBridge*`, `checkGasCityProductRuntime*`,
`formatGasCityDiagnostic`); rest of doctor (daemon/ledger/openclaw
checks) untouched.
- `rpi_phased_domain_enforce.go` — emptied `opaqueRuntimeModes` (gc was
the only opaque runtime); kept the `unavailable` enforcement schema
path.
**Files deleted:** `gc_bridge.go`, `gc_events.go`, `rpi_phased_gc.go` +
their `_test.go` sidecars + `gc_test_helpers_test.go`.
**Spillover fixes (both viral helpers defined in deleted files):**
- `codex_runtime.go` re-pointed to `bridge.CompareSemver` (was using
`compareSemver`, a thin wrapper that lived in `gc_bridge.go`).
- `writeSSEFrame` test helper relocated into `rpi_integration_test.go`
(the remaining daemon-gascity L3 smoke test that uses it).
**Docs/generated:** scrubbed the CLAUDE.md "Gas City (gc) bridge" line
and `cli/internal/gascity/AGENTS.md` cross-ref; regenerated
`cli/docs/COMMANDS.md` + `registry.json`.
## Scope boundary
The daemon's own GasCity client (`internal/gascity`, `internal/daemon`
`GasCityClientAdapter`, `agentworker`) is a separate surface — left
untouched (that's wave 5). No CI gate referenced the deleted glue
(confirmed).
## Verification (all green)
- `gofmt -l` clean (my files) · `go build ./...` · `go vet ./...` · `go
test ./...` (11834 passed, 68 pkgs)
- `tests/smoke-test.sh` · `tests/cli/test-json-flag-consistency.sh` (15
pass, 0 err)
- `scripts/test-agentops-contract-canaries.sh` (failures=0)
- `scripts/validate-ci-policy-parity.sh` (63 rows) ·
`scripts/generate-registry.sh --check` (up to date)
- `tests/docs/validate-doc-release.sh` (CLI headings 72) ·
`check-docs-learning-references.sh` · `cli-docs-parity` stable ·
`check-test-staleness.sh` (0 stale)
Diff stat: 23 files, +72 / -4099 (delete-heavy rip; insertions
concentrated in deliberately-edited files).
Closes-scenario: soc-2rtm0#cascade-rip
Bounded-context: BC5-Runtime
Evidence: .agents/discovery/2026-05-24-rip-caller-map.md
2026-05-24 12:57:37 -04:00
--runtime string Phase runtime mode: auto|direct|stream|tmux (default "auto")
2026-02-26 14:08:15 -05:00
--runtime-cmd string Runtime command used for phase prompts (Claude uses '-p'; Codex uses 'exec') (default "claude")
Executable spec layer (epic soc-58nt, F2–F5): GOALS as BDD acceptance criteria (#292)
* feat(goals): F2.0 scenario-result artifact contract + producer/writer
bead: soc-58nt.2.6
* docs(goals): F4.0 trace link convention ADR-0005
bead: soc-58nt.4.8
* docs(goals): F3.0 domain-slice manifest contract + ADR-0004
bead: soc-58nt.3.8
- schemas/domain-slice-manifest.v1.schema.json: JSON Schema (draft/2020-12,
additionalProperties:false) for domain-slice manifests. All required fields:
domain, version, bounded_context, directive_ids (d-<slug> pattern), scenario_ids,
context_roots, allowed_read_globs, denied_read_globs, validation_commands, owner.
- docs/adr/ADR-0004-domain-slice-manifest-contract.md: records four decisions:
(A) command shape is ao rpi phased --domain <name>; (B) manifest is durable
tracked artifact at docs/domains/<name>/manifest.yaml; (C) reconciles with the
domain skill (vocabulary), context-map.md (architecture view), and skill
frontmatter — no overlap; (D) Go model named domainSliceManifest, explicitly
distinct from rpi_phased_manifest.go's phaseManifest. Cross-references ADR-0003.
- docs/domains/README.md: explains the directory, field table, relationship to
the three pre-existing domain surfaces, and how to add a new slice.
- docs/domains/example/manifest.yaml: fully populated example; validated against
the schema via jsonschema (PASSED).
* feat(goals): F2.1 scenario-result aggregation reader
bead: soc-58nt.2.1
* feat(rpi): F3.1 domainSliceManifest model + loader
Implements the domainSliceManifest Go model and loader in
cli/internal/domainslice/ per the F3.0 contract (ADR-0004, Decision D).
Uses gopkg.in/yaml.v3 with KnownFields(true) to reject unknown fields,
mirrors the schema's additionalProperties:false. Validates all required
fields, directive_id pattern (^d-[a-z0-9][a-z0-9-]*$), context_roots
minItems:1, and validation_commands sub-fields with field-named errors.
Explicitly distinct from phaseManifest (rpi_phased_manifest.go).
28 tests pass (L1 unit + L2 fixture round-trip via docs/domains/example/manifest.yaml).
bead: soc-58nt.3.1
* feat(goals): F4.1 read-only executable-spec trace graph walker
bead: soc-58nt.4.1
* feat(goals): F2.2 per-directive scenario_satisfaction + threshold verdict
bead: soc-58nt.2.2
* feat(rpi): F3.2 ao rpi phased --domain scoping
bead: soc-58nt.3.2
* feat(goals): F4.2/F4.3 ao goals trace --from / --orphans
beads: soc-58nt.4.2 soc-58nt.4.3
* feat(goals): F4.4 ao goals render — GOALS.md to Gherkin
bead: soc-58nt.4.4
* feat(rpi): F3.3a domain-scope audit evidence
bead: soc-58nt.3.3
* feat(goals): F2.3 scenario_satisfaction JSON field + --scenarios-only
Per-directive scenario satisfaction added to ao goals measure: 0 -> 8
new JSON fields and a --scenarios-only mode that skips gate execution.
bead: soc-58nt.2.3
* feat(rpi): F3.4 ao rpi phased --scaffold-domain
bead: soc-58nt.3.4
* test(goals): commit missing goals-trace scenario-results fixture
The F4.1/F4.2 walker tests reference a scenario-results.json fixture under
a gitignored .agents/ subpath; it was never force-added and a clean
checkout (and CI) lacks it, failing 5 scenario_result tests. Force-add it.
bead: soc-58nt.4.1
* fix(goals): F4.1 tighten goalstrace scenario-claim heuristic
bead: soc-58nt.4.9
- Tighten scenarioTokenRe: auto- tokens now require at least two
hyphen-separated slug segments (auto-X-Y…), so single-word English
compounds like auto-merge and auto-update are no longer matched.
- Downgrade broken_bead_scenario_claim from error to warning when the
claim comes from a heuristic (ConfidenceLow) free-text match; per
ADR-0005 §4.1 only an explicit Scenarios: line constitutes a broken
explicit link and may produce an error.
- Add beads_test.go with table-driven tests covering: English auto-*
false-positive rejection, real multi-segment auto-* ID detection,
explicit missing scenario → error, heuristic missing → warning only,
resolvable scenario → no defect, end-to-end Walk with auto-merge bead
produces no error-severity finding.
* test(goals): F2.T1 regression-coverage audit + gap fill
bead: soc-58nt.2.4
* ci(goals): F1.6 wire executable-spec link lint + trace-orphans (warn-first)
bead: soc-58nt.1.9
* feat(rpi): F3.3b runtime hook enforcement of domain scope
bead: soc-58nt.3.9
* test(goals): F2.T2 e2e script for scenario-satisfaction gate
bead: soc-58nt.2.5
* docs(goals): F5.0 re-steer policy + mutation-safety contract (ADR-0006)
bead: soc-58nt.5.9
* docs(goals): fix streak-reset prose in ADR-0006 (cleanup)
bead: soc-58nt.5.9
[no-sibling] prose fixup only, no structural change
0 → 0 schema fields changed
* test(goals): F4.T1 regression-coverage audit + gap fill
bead: soc-58nt.4.6
* feat(wiki): land wiki bounded context waves 1-4 (epic soc-behj)
Phased strangler consolidating ao's .agents/-touching logic into one
cli/internal/wiki bounded context. Each wave gated by the 102 cmd/ao
integration tests staying green; legacy command surface untouched.
- W1 soc-1lju FrontmatterCodec — all 5 frontmatter parsers delegate
- W2 soc-36lw CorpusLocator — agentsDirIn moved, 17 call sites migrated
- W2 soc-f4tr Artifact + Claim domain types with subtype invariants
- W3 soc-vot0 persistent WikiIndex — JSONL, incremental by content-hash
- W3 soc-r08p FreshnessPolicy — claim-level evidence-driven freshness
- W4 soc-ijp8 WikiPipeline — subsumes llmwiki loop, 3 stages wired
- W4 soc-q50a port conformance suite
Also anchors .gitignore's bare wiki/ pattern with a !cli/internal/wiki/
negation — the new package was being silently ignored.
Wave 5 (ao wiki command group) is not included in this commit.
* test(goals): F4.T2 e2e script for trace chain
bead: soc-58nt.4.7
* test(rpi): F3.T1 regression-coverage audit + gap fill
bead: soc-58nt.3.6
* test(rpi): F3.T2 e2e script for domain-scoped RPI
bead: soc-58nt.3.7
* feat(goals): F5.1 verdict ledger schema + writer
bead: soc-58nt.5.1
* feat(goals): F5.2 re-steer policy engine + verdict-ledger producer hookup
bead: soc-58nt.5.2
* feat(goals): F5.4 feedback-to-learning compiler
Adds cli/internal/feedbackcompiler — scans the verdict ledger for
fail->pass directive transitions and drafts a learning entry in
docs/learnings/ for each transition found. Drafts carry status: draft
and directive_id frontmatter (ADR-0005 §2.6). Never auto-promotes.
Idempotent: skips existing drafts on re-run.
Also documents the auto-draft workflow in
skills/forge/references/feedback-compiler-drafts.md with a compact
reference-link in skills/forge/SKILL.md (under 248-line limit).
Synced to skills-codex/forge/ and regenerated codex hashes.
bead: soc-58nt.5.4
* docs(goals): F5.5 compound-engineering retro in /post-mortem
Extend the /post-mortem skill with a Compound-Engineering Retro section
that compares iteration N vs N-1 for a domain slice using the F5.1 verdict
ledger (.agents/goals/verdict-ledger.json). The mode emits a comparative
delta — directives that improved (fail→pass, satisfaction up), regressed
(pass→fail, satisfaction down), or held stable — plus learning yield since
N-1, written as a status:draft learning to .agents/learnings/.
Detailed step-by-step procedure (CE.0–CE.5) lives in
references/compound-engineering-retro.md; SKILL.md carries a compact
trigger/commands summary and links to it. Both files synced to
skills-codex/post-mortem/ with updated codex hashes.
bead: soc-58nt.5.5
* feat(goals): F5.3 ao goals steer --auto with human-gated confirmation
bead: soc-58nt.5.3
* test(goals): F5.T1 regression-coverage audit + gap fill
bead: soc-58nt.5.7
* test(goals): F5.T2 e2e script for auto re-steer
bead: soc-58nt.5.8
* docs(goals): F2.4 docs regen for scenario-satisfaction gate + epic CLI artifacts
Regenerate cli/docs/COMMANDS.md and registry.json from a clean worktree at
HEAD so the soc-58nt command surface is documented without leaking unrelated
peer WIP into the generated docs.
F2 (soc-58nt.2.7): document scenario_satisfaction JSON shape, --scenarios-only,
result-artifact resolution, and exit codes in skills/goals/SKILL.md +
references/executable-spec-chain.md; cross-ref ao goals measure/trace from
skills/scenario/SKILL.md.
Epic-wide artifacts also landed here because they regenerate atomically across
F2-F5: COMMANDS.md/registry.json (all new ao goals/rpi surface), cli-skills-map
heading count, skills-codex hashes, ADR-0004/0005/0006 documentation-index
links, and the F2-F5 e2e CI lanes in validate.yml.
ao capabilities and ao robot-docs need no manual edits — both build their
command/flag surface from the live cobra tree, so new commands register
automatically (Global Rule G5 satisfied by construction).
bead: soc-58nt.2.7
* docs(domain): F3.5 domain-as-loop docs for domain-scoped RPI
Document the domain-slice runtime in skills/domain/SKILL.md (a "Domain as a
scoped RPI loop" section connecting the Slice primitive to ao rpi phased
--domain / --scaffold-domain / --force) and add the Domain-Slice row to the
modes table in skills/scaffold/SKILL.md, mirroring the existing Project/
Component/CI mode-row shape. The scaffold skill's Domain-Slice Mode section
already covered the workflow; this lands the missing modes-table entry so the
mode count is 3 -> 4.
The COMMANDS.md/registry/CI-lane regen for F3 landed in soc-58nt.2.7.
skills-codex hashes for the two changed skills refreshed via
scripts/regen-codex-hashes.sh; codex-parity audit clean.
bead: soc-58nt.3.5
* docs(goals): F5.6 re-steer loop docs in /post-mortem
Cross-reference the auto re-steer loop from the Compound-Engineering Retro
section of skills/post-mortem/SKILL.md: when the compound retro names a
chronically regressing directive, ao goals steer recommend prints
policy-driven directive mutations from the same verdict ledger and ao goals
steer apply writes the mutation to GOALS.md, human-gated via the non-lossy
patcher (ADR-0006). Mirrors the existing "closing the loop" cross-ref shape
used elsewhere in the skill's See Also prose.
The ao goals steer recommend/apply COMMANDS.md surface, the F5 e2e CI lane,
and the ADR-0006 documentation-index link landed atomically in soc-58nt.2.7's
epic-wide regen; the re-steer contract detail lives in
skills/goals/references/executable-spec-chain.md (also in 2.7).
skills-codex/post-mortem hash refreshed; codex-parity audit clean.
bead: soc-58nt.5.6
* docs(goals): F4.5 docs regen for goals trace + render (epic-subsumed)
F4's docs deliverables — the `ao goals trace` and `ao goals render` entries in
cli/docs/COMMANDS.md, the F4 trace-chain e2e CI lane in validate.yml, the
ADR-0005 documentation-index link, and the Trace/Render mode sections plus the
trace contract in skills/goals/SKILL.md + references/executable-spec-chain.md —
all co-landed atomically in soc-58nt.2.7's epic-wide CLI-reference regen
(commit 37798abe), because COMMANDS.md/registry.json regenerate as one unit
across F2-F5 and cannot be split per-bead.
This empty commit records soc-58nt.4.5 as complete with no further file
changes. Matches the epic-subsumed-bead convention: regen artifacts land once,
later beads point at the lead regen commit.
bead: soc-58nt.4.5
* test(goals): fix flag-global leak breaking full goals-measure run
TestGoalsIntegration ran 'goals measure --directives' via cobra, which
sets the package-global goalsMeasureDirectives and never resets it.
soc-58nt's new TestGoalsMeasure_FullMode* tests branch on that global,
so the unfiltered 'go test ./cmd/ao/...' run failed (gates skipped,
directives array emitted instead of the full snapshot+scenarios object).
-run filters masked it. Restore the global after Execute.
bead: soc-58nt.2.4
* fix(ci): correct soc-58nt skill/codex artifacts and CI-policy parity
Resolves 6 red CI checks on PR #292 (crank/soc-58nt) after merging main:
- skill-integrity: reword the "no scaffold subcommand" note in
skills/scaffold/SKILL.md so it no longer trips the heal INVALID_AO_CMD
substring check; copy skills/forge/references/examples.md into
skills-codex/forge/references/ so the codex forge dead-link clears.
- validate-codex-generated-artifacts: strip leaked non-Codex frontmatter
from skills-codex/forge/SKILL.md down to name + description.
- validate-codex-runtime-sections: remove the residual mixed-runtime
"Cross-vendor analog" line (Anthropic Managed Agents) from codex forge;
convert /forge slash-command refs to $forge Codex invocation style.
- validate-ci-policy-parity: add executable-spec-link-integrity
(non-blocking) to the AGENTS.md non-blocking list so it matches the
workflow's continue-on-error classification (warn-only F1.6 gate added
by soc-58nt without parity co-update).
- doc-release-gate: the link-validation broken link was the same codex
forge references/examples.md dead link, fixed above.
- agentops-contract-canaries: update the cli-command-surface canary
fixture + eval JSON for the 185->187 / 257->259 subcommand count after
soc-58nt added `ao goals render` and `ao goals trace`.
Also ports the soc-58nt "Closing the loop with re-steer" paragraph into
skills-codex/post-mortem/SKILL.md and regenerates codex artifact hashes
and registry.json after the merge.
* fix(test): set repo-local git identity in rpi-phased-domain e2e
CI runners have no global git identity; the temp-repo 'git commit' in the
F3.7 e2e exited 128 (empty ident name). Configure a repo-local identity.
bead: soc-58nt.3.7
* fix(goals): use canonical practice slug bdd-gherkin
soc-58nt files cited the practice slug 'bdd'; the canonical slug in
PRACTICE-REGISTRY.md is 'bdd-gherkin'. Clears the practice-citations
advisory check (9 invalid slug citations -> 0).
bead: soc-58nt.2.7
* fix(goals): add missing practices field to F5 gap-test file
goals_steer_auto_gap_test.go lacked a // practices: header; the
practice-citations --strict gate flags missing fields. Matches its
sibling goals_steer_auto_test.go.
bead: soc-58nt.5.7
* fix(security): resolve gosec G122 + golangci-lint errcheck/staticcheck HIGH findings
Drive scripts/security-gate.sh --mode quick to 0 HIGH findings.
gosec G122 (CWE-367 TOCTOU): goalstrace/artifacts.go reads files inside a
filepath.WalkDir callback via an os.Root-scoped handle (os.OpenRoot), closing
the check-to-use window and blocking symlink escape.
golangci-lint errcheck (~25): unchecked defer Close / os.Remove returns.
Resource-cleanup closes use explicit-ignore (defer func(){ _ = X.Close() }()).
Durability-gating closes before a rename (llm/review.go tmp.Close) are checked
and wrapped.
golangci-lint staticcheck (~21): ST1005 (drop trailing punctuation from error
strings), QF1001 (De Morgan's law), QF1002 (tagged switch), QF1012
(fmt.Fprintf over WriteString+Sprintf), S1016 (struct-literal -> conversion),
S1017 (strings.TrimSuffix), S1040 (drop redundant type assertion), SA1012
(context.TODO over nil Context), SA4032 (drop dead GOOS branch under build
constraint), SA9003 (remove empty branch).
* ci(security): make security-toolchain-gate blocking
Remove continue-on-error: true from the security-toolchain-gate job and drop
the "(advisory)" name suffix so a CRITICAL/HIGH security-gate finding fails
the validate summary job. The job is already in summary.needs, so removing
continue-on-error promotes it into the contains(needs.*.result,'failure')
fail-set.
AGENTS.md: drop security-toolchain-gate from the (non-blocking) prose list
and the Advisory Job Triage SLA table; update its CI-jobs-table row to
describe the blocking failure mode. validate-ci-policy-parity confirms the
AGENTS blocking set matches the workflow summary fail-set (7 non-blocking).
---------
Co-authored-by: Codex <codex@example.invalid>
2026-05-17 15:31:15 -04:00
--scaffold-domain string Write a domain-slice manifest template at docs/domains/<name>/manifest.yaml and exit (does NOT run RPI)
2026-02-21 19:41:50 -05:00
--stall-timeout duration Maximum time without progress before declaring stall (0 disables) (default 10m0s)
--stream-startup-timeout duration Maximum time to wait for first stream event before falling back to direct execution (0 disables) (default 45s)
--swarm-first Default each phase to swarm/agent-team execution; fall back to direct execution if swarm runtime is unavailable (default true)
2026-03-03 14:38:28 -05:00
--test-first Default to strict-quality spec-first execution by passing --test-first to /crank (default true)
2026-02-26 21:35:05 -05:00
--tmux-workers int When --runtime tmux, number of worker sessions spawned per phase (default 1)
2026-02-21 19:41:50 -05:00
```
2026-02-28 19:56:10 -05:00
#### `ao rpi serve`
2026-03-01 06:41:02 -05:00
Start a production RPI orchestration run or stream its live dashboard.
2026-02-28 19:56:10 -05:00
```
2026-03-01 06:41:02 -05:00
ao rpi serve [goal | run-id] [flags]
2026-02-28 19:56:10 -05:00
```
**Flags: **
```
2026-04-05 09:15:27 -04:00
-h, --help help for serve
--no-open Do not open browser automatically
--orchestrate Treat first argument as a goal and run full RPI orchestration
--port int Port to listen on (default 7799)
--run-id string Run ID to watch explicitly (must match rpi-<8-12 hex> or <12 hex>)
--runtime string Phase runtime mode for orchestration: auto|direct|stream|tmux
--runtime-cmd string Runtime command for orchestration phase prompts (Claude uses '-p'; Codex uses 'exec')
2026-02-28 19:56:10 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao rpi status`
2026-02-21 19:41:50 -05:00
Display active and recent RPI phased runs.
```
2026-02-26 06:42:03 -05:00
ao rpi status [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
feat(rip)!: carve the daemon — delete internal/daemon + agentopsd, GC is the substrate (soc-2rtm0 #daemon-carve wave5) (#515)
Wave 5 of 5 (the finale) of the orchestration-substrate retirement
(soc-2rtm0). AgentOps stops being the orchestration substrate; GC is the
substrate. The always-on out-of-session supervisor (the daemon) is
deleted; GC's controller replaces it. Features that ran AS daemon jobs
(wiki build, llmwiki loop) keep their BUILDER CORE (in-process /
GC-callable) but lose the daemon-job-executor wrapper.
## Deleted
- `cli/internal/daemon/` — the whole package (71 .go files + testdata +
AGENTS.md).
- `cli/cmd/ao/`: `agentopsd.go`, `daemon_jobs.go`, `daemon_soak.go`,
`daemon_fake_policy.go`, `rpi_phased_daemon.go` (+ their tests).
- Daemon-only tests: `rpi_status_daemon_test.go`,
`rpi_integration_test.go`, `doctor_product_runtime_test.go`.
- `internal/doctor/fix_daemon.go` (+test) + the daemon
runtime/ledger-health/telemetry/openclaw-consumer checks and the
`--product-runtime` flag in `doctor.go` (the `ao doctor` command itself
is KEPT).
- The `ao daemon`/`agentopsd` command registration (went with
`agentopsd.go`).
- Daemon test scripts: `scripts/validate-daemon-product-e2e.sh`,
`tests/scripts/test-daemon-product-e2e.sh`.
No daemon CI gates existed in `validate.yml` / `ci-jobs.yaml` to remove
(prior waves had already cleared them).
## Severed (KEEP features — builders stay, daemon-job-executor wrappers
removed)
- **wiki** (`internal/wiki/pipeline.go`): removed the
`daemon.JobExecutor` impl
(`JobTypes`/`RunJob`/`PipelineJobSpec`/`parsePipelineJobSpec`/`jobResultFromOutcome`)
+ the daemon import. The builder core — `WikiPipeline`, `RunStage`,
`SelectStage`, the ingest/query/lint runners — is untouched; `ao wiki
lint/query/promote` run in-process.
- **llmwiki** (`internal/llmwiki/executor.go`): removed
`LLMWikiLoopExecutor` + `LoopJobSpec` + the daemon import. KEPT the leaf
builder core in the same file (`Stage`, stage constants, `StageHandler`,
`StageResult`, `DefaultLintIntervalHours`, `SelectStage`,
`rawHasNewerFiles`, `lintIsStale`) — `stages.go` (the real handlers) and
`internal/scope` depend on these. No new package needed; the shared
types already lived in this leaf file.
- **rpi status** (`cmd/ao/rpi_status.go`): severed the
`--daemon`/`--daemon-url`/`--daemon-fallback` read path. `ao rpi status`
now reads only the local run registry (`.agents/rpi/runs/`) — a KEEP
feature. Relocated the tiny `cobraContext` helper here (it lived in the
deleted `agentopsd.go`, only consumer is this file).
- **rpi phased** (`cmd/ao/rpi_phased.go`, `rpi_phased_context.go`):
removed the `--daemon-submit` short-circuit + flags + the
`DaemonSubmit/URL/Token/Fallback` opts fields (only consumer was the
deleted submit path).
## Lost capabilities (intentional, daemon-only)
- `ao rpi status --daemon` (read RPI job state from agentopsd) and `ao
rpi phased --daemon-submit` (queue an RPI run to agentopsd).
- llmwiki `LoopJobSpec.AllowPlaceholderOutputs` opt-in gating (the
placeholder-output-disabled skip) — that gate lived in the removed
daemon-job wrapper, not the stage handlers.
- `ao doctor` daemon runtime/ledger-health/telemetry/openclaw-consumer
checks + `--product-runtime`.
## Verification (all green)
- `gofmt -l` clean (my files), `go build ./...`, `go vet ./...`, `go
test ./...` → 11920 passed, 0 failed, 65 packages.
- `scripts/release-smoke-test.sh` → 108 pass / 0 fail (EXPECTED_COMMANDS
never listed daemon; no scrub needed).
- `tests/windows/test-windows-smoke.ps1` → `Invoke-GoTest` list has no
`./internal/daemon` ref (nothing to scrub).
- `internal/quality/stale_refs.go` → no daemon/agentopsd
deprecated-command entries (`TestDoctorStaleReplacementsExist` passes).
- `tests/smoke-test.sh`, `tests/cli/test-json-flag-consistency.sh`
(15/0), `scripts/test-agentops-contract-canaries.sh` (failures=0 after
fixing the cli-command-surface heading-count fixture/eval 68/179/247 →
67/172/239 and the `ao daemon` refs in `skills/dream` +
`skills-codex/dream`).
- Regenerated `cli/docs/COMMANDS.md` + `registry.json`;
`regen-codex-hashes.sh --check` clean; `validate-ci-policy-parity.sh`
PASS; doc link/learning-ref checks pass; `heal.sh --strict` clean.
Diff stat: 113 files changed, 95 insertions, 34,978 deletions.
Closes-scenario: soc-2rtm0#cascade-rip
Bounded-context: BC5-Runtime
Evidence: .agents/discovery/2026-05-24-rip-caller-map.md
2026-05-24 17:11:20 -04:00
-h, --help help for status
--watch Poll every 5s and redraw (Ctrl-C to exit)
2026-02-21 19:41:50 -05:00
```
2026-02-26 21:35:05 -05:00
#### `ao rpi stream`
Read normalized per-run C2 events from events.jsonl.
```
ao rpi stream [flags]
```
**Flags: **
```
--follow Follow for newly appended events
--format string Output format: human|json|sse (default "human")
-h, --help help for stream
--run-id string Run ID to stream (defaults to latest phased state)
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao rpi verify`
2026-02-21 19:41:50 -05:00
Verify integrity of the RPI ledger.
```
2026-02-26 06:42:03 -05:00
ao rpi verify [flags]
2026-02-21 19:41:50 -05:00
```
2026-04-28 23:54:11 -04:00
**Flags: **
```
-h, --help help for verify
--latest Verify the latest RPI ledger state (compatibility alias; current workspace ledger is latest)
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao session`
2026-02-21 19:41:50 -05:00
Session lifecycle operations.
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao session [command]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
2026-05-21 00:27:09 -04:00
#### `ao session bootstrap`
Universal init prompt for any agent spawned into an AgentOps repo.
```
ao session bootstrap [flags]
```
**Flags: **
```
--json Emit the full status object as JSON (default: 1-line summary).
--no-mail Skip the mcp-agent-mail probe even if the MCP server is reachable.
--robot Same as --json but tighter exit-code contract for hooks.
-h, --help help for bootstrap
--json Emit machine-readable status as JSON
--no-mail Skip the mcp-agent-mail probe
--robot Robot mode: JSON output with tight exit-code contract for SessionStart hooks
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao session close`
2026-02-21 19:41:50 -05:00
Close a session by forging its transcript, extracting learnings,
```
2026-02-26 06:42:03 -05:00
ao session close [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-04-05 09:15:27 -04:00
--auto-extract Extract lightweight learnings (quality-filtered) and write handoff artifact
2026-02-21 19:41:50 -05:00
-h, --help help for close
--session string Session ID to close (default: most recent transcript)
```
---
feat(cli): ao validate --gate — exit-code verdict for GC retry + CI (#ao-validate-gate) (#516)
## What
New top-level `ao validate` umbrella command with `--gate`
(exit-code-as-verdict) mode. This is the dependency the GC reference
City needs — GC's `check={max_attempts}` retry, CI steps, and `ao rpi`'s
internal validate phase can run one command and branch on the exit code.
Spec: `.agents/discovery/2026-05-24-gvkj6-finalize-runbook.md` ("`ao
validate --gate` — SPEC" section).
## Exit-code contract (`--gate`)
| Code | Meaning |
|---|---|
| `0` | PASS or WARN (gate passes) |
| `1` | FAIL (gate fails) |
| `2` | internal/setup error (distinct so a broken gate is never read as
a clean pass) |
- WARN exits `0` by default (advisory); `--strict` / `--warn-as-fail`
promotes WARN → exit `1`.
- Deterministic: **no network, no LLM**. Safe for GC
`check.max_attempts`, CI, and `ao rpi`.
- `--json` emits `{"verdict","issues","warnings","gate_exit"}` in both
modes.
## How (composed, not reinvented)
Reuses the existing `ratchet.Validator` (`ValidateWithOptions`) over the
resolved file set (`--changes`, `--bead`, or auto-located RPI outputs);
aggregates each result's `Valid`/`Issues`/`Warnings` into a single
PASS/WARN/FAIL verdict; maps verdict → exit code via a `gateExitError`
typed error caught in `Execute()` (same pattern as
`doctorExitError`/`AgentsLintError`). The existing `ao
ratchet/scenario/goals validate` sub-surfaces are untouched. New logic
is just the aggregation + mapping (well under the complexity budget).
## Residue handled (command-surface +1)
- Regenerated `cli/docs/COMMANDS.md`, `registry.json` (166 commands),
`docs/cli-skills-map.md`.
- Bumped `cli-command-surface` canary
(`cli-command-surface-matrix.json`) + smoke fixture heading counts: top
68→69, all 247→248 (sub unchanged — flat command).
- Added `validate` to release-smoke `EXPECTED_COMMANDS` + a `test_help
"ao validate --help"` line.
- Registered `validate` in `cobra_commands_test.go` `expectedCmds` (both
lists).
## Tests
L1 (`aggregateVerdict`, `gateExitForVerdict`, `gateExitError`) + L2
(full `runValidate` over real temp-dir artifacts) asserting exact exit
codes: PASS=0, WARN=0, WARN+`--strict`=1, FAIL=1, internal=2, and the
`--json` contract.
## Verified green
`gofmt` clean · `go build`/`go vet`/`go test ./cmd/ao
./internal/ratchet` · manual exit-code check (0/1/2) ·
`release-smoke-test.sh` (0 failed) · `test-json-flag-consistency.sh` (0
errors) · `validate-cli-skills-map.sh` (PASS) · `cli-command-surface`
canary (failures=0) · `regen-codex-hashes.sh --check` clean ·
`validate-ci-policy-parity.sh` PASS.
Closes-scenario: soc-ba1un#ao-validate-gate
Bounded-context: BC4-Evidence
Evidence: .agents/discovery/2026-05-24-gvkj6-finalize-runbook.md
2026-05-24 15:48:04 -04:00
### `ao validate`
Run a deterministic validation gate over RPI artifacts and emit a single
```
ao validate [flags]
```
**Flags: **
```
--bead string Validate artifacts bound to a bead id
--changes strings Explicit files to validate
--gate Exit-code mode: 0=PASS/WARN, 1=FAIL, 2=error
-h, --help help for validate
--json Structured verdict (honored in both modes)
--lenient Allow legacy artifacts without schema_version
--lenient-expiry int Days until lenient bypass expires (default 90)
--strict Promote WARN to FAIL (exit 1)
--warn-as-fail Alias for --strict
```
---
2026-02-23 12:32:23 -05:00
### `ao completion`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
Generate shell completion scripts for ao.
2026-02-21 19:41:50 -05:00
```
refactor(cli): go cli quality discovery batch (gc-bridge, json contracts, leaf-help smoke) (#162)
* docs: add go cli quality discovery plan
* fix(cli): harden gc bridge version parsing
* docs(go): align complexity policy with gates
* docs(cli): classify command surface
* fix(cli): enforce json output contracts
* feat(cli): expand completion coverage
* refactor(cli): pilot badge options writer
* refactor(cli): inject contradict output writer
* refactor(cli): inject notebook update writer
* fix(cli): enable gc runtime smoke coverage
* fix(cli): align gc bridge with gascity v1
* Release v2.39.0
* fix(tests): align next-work schema test with widened type enum
Commit ed35c47f added `docs` and `chore` to the script's VALID_TYPES,
but tests/scripts/check-next-work-schema-rows.bats:42 still used
`type:"docs"` as its supposed-to-be-rejected example, so the test
now passes through the validator — `bats-tests` has been red on
main since.
Switch the rejected-type example to `finding`, which is still
outside the enum and is also the canonical example cited in the
script's own header comment ("type=finding ... caught at push time").
Local: 11/11 in tests/scripts/check-next-work-schema-rows.bats pass.
* docs: capture finding generator postmortem (#157)
* fix(rpi): sort verdicts deterministically in context and status helpers (#158)
BuildPhaseContext and JoinVerdicts iterated the verdicts map directly,
producing non-deterministic output across runs. Sort keys before
rendering so prompt injection and status logs are reproducible.
Closes council finding W-7 (context-orchestration-leverage batch). The
related buildHandoffContext path was already fixed to delegate to
FormatVerdicts (which sorts); this completes the remaining helpers.
- cli/internal/rpi/status.go: sort keys in JoinVerdicts
- cli/internal/rpi/phased_context.go: sort keys in BuildPhaseContext
- tests: replace "ordering not deterministic" waivers with exact-order
asserts and add a 50-run stability check
https://claude.ai/code/session_01Qw4bZvXUNuLs8Rp1j1homB
Co-authored-by: Claude <noreply@anthropic.com>
* fix(codex): audit noisy hook injections (#159)
* docs: add competitive radar (#160)
* feat(agents): harden operator control plane (#161)
* docs(discovery): plan agents control plane hardening
* feat(agents): harden operator control plane
* Release v2.39.0
* fix(tests): align next-work schema test with widened type enum
Commit ed35c47f added `docs` and `chore` to the script's VALID_TYPES,
but tests/scripts/check-next-work-schema-rows.bats:42 still used
`type:"docs"` as its supposed-to-be-rejected example, so the test
now passes through the validator — `bats-tests` has been red on
main since.
Switch the rejected-type example to `finding`, which is still
outside the enum and is also the canonical example cited in the
script's own header comment ("type=finding ... caught at push time").
Local: 11/11 in tests/scripts/check-next-work-schema-rows.bats pass.
* docs: capture finding generator postmortem (#157)
* fix(rpi): sort verdicts deterministically in context and status helpers (#158)
BuildPhaseContext and JoinVerdicts iterated the verdicts map directly,
producing non-deterministic output across runs. Sort keys before
rendering so prompt injection and status logs are reproducible.
Closes council finding W-7 (context-orchestration-leverage batch). The
related buildHandoffContext path was already fixed to delegate to
FormatVerdicts (which sorts); this completes the remaining helpers.
- cli/internal/rpi/status.go: sort keys in JoinVerdicts
- cli/internal/rpi/phased_context.go: sort keys in BuildPhaseContext
- tests: replace "ordering not deterministic" waivers with exact-order
asserts and add a 50-run stability check
https://claude.ai/code/session_01Qw4bZvXUNuLs8Rp1j1homB
Co-authored-by: Claude <noreply@anthropic.com>
* fix(codex): audit noisy hook injections (#159)
* docs: add competitive radar (#160)
* fix(merge): drop unused AgentsDoctorError ref and prune allowlist entries without production refs
---------
Co-authored-by: Claude <noreply@anthropic.com>
* fix(merge): resolve conflicts by taking PR's refactored contradict/codex_runtime, main's overnight test schema
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-04-26 23:09:48 -04:00
ao completion [bash|zsh|fish|powershell]
2026-02-21 19:41:50 -05:00
```
2026-02-23 12:32:23 -05:00
---
2026-02-21 19:41:50 -05:00
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao config`
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
View and manage AgentOps configuration.
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
```
2026-04-05 09:15:27 -04:00
ao config [command]
2026-02-23 12:32:23 -05:00
```
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
**Flags: **
2026-02-21 19:41:50 -05:00
```
2026-02-23 12:32:23 -05:00
-h, --help help for config
--show Show resolved configuration with sources
2026-02-21 19:41:50 -05:00
```
2026-04-05 09:15:27 -04:00
**Subcommands: **
#### `ao config models`
Display the current model cost tier settings with sources.
```
ao config models [flags]
```
**Flags: **
```
-h, --help help for models
--set-skill string Set a skill-specific tier override (e.g. council=quality)
--set-tier string Set the default model cost tier (quality, balanced, budget)
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao memory`
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
Manage repo-root MEMORY.md for cross-runtime access
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao memory [command]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
#### `ao memory sync`
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
Write recent session history to a repo-root MEMORY.md with managed block markers.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao memory sync [flags]
2026-02-21 19:41:50 -05:00
```
2026-02-26 05:48:41 -05:00
**Flags: **
2026-02-21 19:41:50 -05:00
2026-02-23 12:32:23 -05:00
```
2026-03-02 07:30:30 -05:00
-h, --help help for sync
--max-entries int Maximum session entries to keep (default 10)
--output-file string Output path (default: MEMORY.md in repo root)
--quiet Suppress output
2026-02-23 12:32:23 -05:00
```
2026-02-21 19:41:50 -05:00
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
### `ao notebook`
2026-02-26 05:48:41 -05:00
Manage the session notebook (MEMORY.md)
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao notebook [command]
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
**Subcommands: **
#### `ao notebook update`
2026-02-23 12:32:23 -05:00
2026-02-26 05:48:41 -05:00
Reads the most recent session data and updates MEMORY.md with a "Last Session"
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao notebook update [flags]
2026-02-21 19:41:50 -05:00
```
2026-02-26 05:48:41 -05:00
**Flags: **
fix: resolve 32 vibe findings (2 critical, 7 high, 12 medium, 11 low)
Fix all findings from the v2.17.0..HEAD vibe review across 12 source files:
Critical: panic guards for negative budget in truncateToCharBudget and
dead prefix slice in generateArtifactID. High: bead override in batch
extract, json file counting in metrics, constraint index.json exclusion,
complexity reduction in curate status/verify (38→<25), flexible hook
script count assertion. Medium: truncate panic guards, error logging for
silent failures, null→[] JSON output, goals auto-detect (GOALS.md then
GOALS.yaml), raw var→getter usage, truncate-before-lock race fix. Low:
scanner.Err() checks, os.Stdout→cmd.OutOrStdout(), dry-run output
differentiation.
Docs: 5 missing INDEX.md concept links, curation-pipeline v1 status
callout. Tests: new TestSeed_DryRun_JSON. Regen: COMMANDS.md, embedded
hooks synced. All gates pass: build, vet, test, gocyclo, heal, doc-gate.
2026-02-24 16:51:26 -05:00
```
2026-02-26 05:48:41 -05:00
-h, --help help for update
--max-lines int Maximum lines in MEMORY.md (default 190)
--memory-file string Path to MEMORY.md (auto-detected if omitted)
--quiet Suppress output (for hooks)
--session string Specific session ID to update from
--source string Source: auto|sessions|pending (default "auto")
fix: resolve 32 vibe findings (2 critical, 7 high, 12 medium, 11 low)
Fix all findings from the v2.17.0..HEAD vibe review across 12 source files:
Critical: panic guards for negative budget in truncateToCharBudget and
dead prefix slice in generateArtifactID. High: bead override in batch
extract, json file counting in metrics, constraint index.json exclusion,
complexity reduction in curate status/verify (38→<25), flexible hook
script count assertion. Medium: truncate panic guards, error logging for
silent failures, null→[] JSON output, goals auto-detect (GOALS.md then
GOALS.yaml), raw var→getter usage, truncate-before-lock race fix. Low:
scanner.Err() checks, os.Stdout→cmd.OutOrStdout(), dry-run output
differentiation.
Docs: 5 missing INDEX.md concept links, curation-pipeline v1 status
callout. Tests: new TestSeed_DryRun_JSON. Regen: COMMANDS.md, embedded
hooks synced. All gates pass: build, vet, test, gocyclo, heal, doc-gate.
2026-02-24 16:51:26 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
feat(ao): add 'ao beads verify|lint|harvest' stale-citation tooling
Three subcommands under a new 'ao beads' command group that complement
the bd CLI without replacing it. All commands degrade gracefully when
bd is not on PATH (warn + exit 0).
## Commands
### ao beads verify <bead-id>
Reads 'bd show <id>', extracts file paths, function references, and
backticked symbols from the description (or close reason for closed
beads), and checks each citation against HEAD. Reports FRESH / STALE /
UNKNOWN status per citation.
Bare filenames (e.g. 'loop.go' with no path) are treated specially:
the verifier walks cli/, skills/, docs/, scripts/, .agents/ to find
matches and reports FRESH if unique, UNKNOWN if ambiguous (with the
resolved path suggestions), STALE if zero matches.
Exit codes: 0 clean, 1 stale found, 2 bd error.
### ao beads lint [--status=open]
Batch-runs verify across every bead matching a status filter and
aggregates results. Exit code signals overall staleness — suitable
as a weekly audit or pre-release gate.
### ao beads harvest <bead-id>
Materialises a closed bead's close reason as a learning file at
.agents/learnings/YYYY-MM-DD-<id>-<slug>.md with frontmatter. Only
operates on closed beads. --dry-run prints to stdout instead of writing.
Compresses the bd-close → learnings pipeline into one command, so
operators running 'bd close <id> --reason "..."' can immediately
promote the reason into the knowledge flywheel.
## Design
* execBD / bdAvailable are package-level function vars so tests can
inject fakes without touching PATH (pattern consistent with existing
cmd/ao test hooks).
* parseBDShow is tolerant of both open and closed bead formats. Closed
beads hide their original description and surface a 'Close reason:'
line instead; the parser captures both and Body() prefers CloseReason.
* listBeadIDs uses a permissive <rig>-<ident> grammar so it handles
flat rows, hierarchy rows (├──/└── tree chars), and future bd shape
tweaks without breaking.
* No hard dependency on bd for tests — all L2 tests mock execBD and
drive the parse/verify/render logic directly.
## Tests
cli/cmd/ao/beads_test.go (L2, 23 tests):
* beadSlugify: basic, punctuation, truncation, empty, punct-only
* parseBDShow: canonical open, closed with Close reason, empty errors
* bdShowParsed.Body: prefers CloseReason, falls back to Description
* extractCitations: file+line, function refs, backticked symbols, dedup
* verifyFileCitation: fresh, stale, line-suffix handling
* isClosedStatus: substring matching across bd status-field shapes
* listBeadIDs: flat + tree output, non-bead lines skipped
* verifyBead: bd-absent graceful degradation + end-to-end with fake
* renderLearningBody: frontmatter + body composition
cli/cmd/ao/cobra_commands_test.go:
* beads added to expectedCmds + parentExpectations (verify|lint|harvest)
## Smoke test
Ran against na-h61 (the bead closed earlier today). Found:
- 4 FRESH, 0 STALE, 1 UNKNOWN (ambiguous bare 'types.go' — resolved
to 6 candidates, correctly suggested full paths)
- harvest --dry-run produced a clean learning file with frontmatter
- lint --status=closed found 49 clean / 1 genuinely stale (na-63f.8
references summary.json/summary.md which doesn't exist anywhere)
## Files
cli/cmd/ao/beads.go (new, ~550 LOC)
cli/cmd/ao/beads_test.go (new, ~280 LOC)
cli/cmd/ao/cobra_commands_test.go (+3 lines — beads in registry)
cli/docs/COMMANDS.md (regenerated)
## Why
Closes the last 3 items of the 7-item summary table from today's
retrospective. The first 4 items (--evidence, --commit-ready,
--discovery-artifact, stale-scope planning rule) landed in 63c8b81a.
The na-h61 session earlier today showed that bead descriptions drift
from HEAD within hours of being filed. Two of the five beads I closed
today had factually wrong descriptions (na-h61 cited a nonexistent
cli/cmd/ao/fitness.go; na-khk cited a non-reproducible env leak).
'ao beads verify' catches exactly this pattern before a new session
commits to the wrong mental model.
2026-04-11 08:36:23 -04:00
### `ao beads`
Commands that help maintain the bd issue tracker alongside the main
```
ao beads [command]
```
**Subcommands: **
2026-04-13 09:08:55 -04:00
#### `ao beads audit`
Audits open and in-progress beads for backlog hygiene issues.
```
ao beads audit [flags]
```
**Flags: **
```
--auto-close Close likely-fixed beads when commit or file-change evidence is found
-h, --help help for audit
--json Emit audit report as JSON
--strict Exit 1 when any likely-fixed, likely-stale, or consolidatable bead is found
```
#### `ao beads cluster`
Analyzes open beads for domain overlap and suggests consolidation groups.
```
ao beads cluster [flags]
```
**Flags: **
```
--apply Reparent non-representative beads under the cluster representative
-h, --help help for cluster
--json Emit cluster report as JSON
```
feat(ao): add 'ao beads verify|lint|harvest' stale-citation tooling
Three subcommands under a new 'ao beads' command group that complement
the bd CLI without replacing it. All commands degrade gracefully when
bd is not on PATH (warn + exit 0).
## Commands
### ao beads verify <bead-id>
Reads 'bd show <id>', extracts file paths, function references, and
backticked symbols from the description (or close reason for closed
beads), and checks each citation against HEAD. Reports FRESH / STALE /
UNKNOWN status per citation.
Bare filenames (e.g. 'loop.go' with no path) are treated specially:
the verifier walks cli/, skills/, docs/, scripts/, .agents/ to find
matches and reports FRESH if unique, UNKNOWN if ambiguous (with the
resolved path suggestions), STALE if zero matches.
Exit codes: 0 clean, 1 stale found, 2 bd error.
### ao beads lint [--status=open]
Batch-runs verify across every bead matching a status filter and
aggregates results. Exit code signals overall staleness — suitable
as a weekly audit or pre-release gate.
### ao beads harvest <bead-id>
Materialises a closed bead's close reason as a learning file at
.agents/learnings/YYYY-MM-DD-<id>-<slug>.md with frontmatter. Only
operates on closed beads. --dry-run prints to stdout instead of writing.
Compresses the bd-close → learnings pipeline into one command, so
operators running 'bd close <id> --reason "..."' can immediately
promote the reason into the knowledge flywheel.
## Design
* execBD / bdAvailable are package-level function vars so tests can
inject fakes without touching PATH (pattern consistent with existing
cmd/ao test hooks).
* parseBDShow is tolerant of both open and closed bead formats. Closed
beads hide their original description and surface a 'Close reason:'
line instead; the parser captures both and Body() prefers CloseReason.
* listBeadIDs uses a permissive <rig>-<ident> grammar so it handles
flat rows, hierarchy rows (├──/└── tree chars), and future bd shape
tweaks without breaking.
* No hard dependency on bd for tests — all L2 tests mock execBD and
drive the parse/verify/render logic directly.
## Tests
cli/cmd/ao/beads_test.go (L2, 23 tests):
* beadSlugify: basic, punctuation, truncation, empty, punct-only
* parseBDShow: canonical open, closed with Close reason, empty errors
* bdShowParsed.Body: prefers CloseReason, falls back to Description
* extractCitations: file+line, function refs, backticked symbols, dedup
* verifyFileCitation: fresh, stale, line-suffix handling
* isClosedStatus: substring matching across bd status-field shapes
* listBeadIDs: flat + tree output, non-bead lines skipped
* verifyBead: bd-absent graceful degradation + end-to-end with fake
* renderLearningBody: frontmatter + body composition
cli/cmd/ao/cobra_commands_test.go:
* beads added to expectedCmds + parentExpectations (verify|lint|harvest)
## Smoke test
Ran against na-h61 (the bead closed earlier today). Found:
- 4 FRESH, 0 STALE, 1 UNKNOWN (ambiguous bare 'types.go' — resolved
to 6 candidates, correctly suggested full paths)
- harvest --dry-run produced a clean learning file with frontmatter
- lint --status=closed found 49 clean / 1 genuinely stale (na-63f.8
references summary.json/summary.md which doesn't exist anywhere)
## Files
cli/cmd/ao/beads.go (new, ~550 LOC)
cli/cmd/ao/beads_test.go (new, ~280 LOC)
cli/cmd/ao/cobra_commands_test.go (+3 lines — beads in registry)
cli/docs/COMMANDS.md (regenerated)
## Why
Closes the last 3 items of the 7-item summary table from today's
retrospective. The first 4 items (--evidence, --commit-ready,
--discovery-artifact, stale-scope planning rule) landed in 63c8b81a.
The na-h61 session earlier today showed that bead descriptions drift
from HEAD within hours of being filed. Two of the five beads I closed
today had factually wrong descriptions (na-h61 cited a nonexistent
cli/cmd/ao/fitness.go; na-khk cited a non-reproducible env leak).
'ao beads verify' catches exactly this pattern before a new session
commits to the wrong mental model.
2026-04-11 08:36:23 -04:00
#### `ao beads harvest`
Reads a closed bead via 'bd show <id>' and writes its closure reason
```
ao beads harvest <bead-id> [flags]
```
**Flags: **
```
--dry-run Print the learning content to stdout without writing a file
-h, --help help for harvest
--out-dir string Directory to write the learning file into (default ".agents/learnings")
```
#### `ao beads lint`
Runs 'ao beads verify' on every bead matching a status filter and
```
ao beads lint [flags]
```
**Flags: **
```
-h, --help help for lint
--json Emit lint report as JSON
--status string bd status filter (open, closed, all) (default "open")
```
feat(scripts): auto-resume-stale-claims driver (soc-vuu6.27 slice 4a #auto-resume-driver) (#385)
## Why
Slice 4a of soc-vuu6.27 (fungible-swarm death recovery). The bead
originally specified an "agentopsd job spec" but the operational essence
is a periodic driver that calls slice 2 + slice 3 — that intent is met
by a shell wrapper today, faster and with smaller surface than touching
agentopsd internals. Slice 4b (`` filed) tracks the agentopsd-native
variant for later.
**Stacked on slice 3's branch** (which is stacked on slice 2). When the
chain merges, this rebases onto main.
## What
`scripts/auto-resume-stale-claims.sh` — one-shot driver suitable for
cron, systemd timers, or future agentopsd job wrapping:
1. Calls `ao beads stale-claims --threshold=<N>h --json` (slice 2).
2. For each stale bead, calls `ao beads resume <id> --agent
<recovery-agent>` (slice 3).
3. Per-bead OK/FAIL output + summary line. Exit code summarizes the run.
Flags: `--threshold` `--agent` `--dry-run` `--max` (cap per-run
transfers; default 25) `--quiet`. Exit 0 = success or no candidates;
exit 1 = at least one failure; exit 2 = usage/env error.
## Test
9 bats tests, all passing. Stubs `ao` via PATH so the harness is
deterministic. Covers: zero candidates, multi-candidate happy path,
--dry-run, partial failure, --max cap, --threshold passthrough, --quiet
suppression, unknown-flag error, missing-ao error.
Self-dogfood: With slices 2 and 3 landed plus a stale-claim simulator,
running this driver against the real bd backend transfers stale claims
and emits one claim_transferred event per transfer (slice 3 contract).
## Follow-up
- Slice 4b (``) — agentopsd-native job spec wrapping this driver.
Closes-scenario: soc-vuu6.27#auto-resume-driver
Bounded-context: BC2-Loop
Evidence: scripts/auto-resume-stale-claims.sh
Evidence: tests/scripts/auto-resume-stale-claims.bats
---------
Co-authored-by: Codex <codex@example.invalid>
2026-05-20 20:37:27 -04:00
#### `ao beads resume`
Transfers a stale claim via 'bd update <bead-id> --claim', then appends a
```
ao beads resume <bead-id> [flags]
```
**Flags: **
```
--agent string New claimant id (defaults to BEADS_ACTOR env var, else ao-beads-resume).
-h, --help help for resume
--json Emit the claim_transferred event to stdout (always written to ledger).
--ledger string Path to the provenance ledger (relative to repo root). (default "docs/provenance/ledger.jsonl")
```
feat(beads): ao beads scenarios extract → Gherkin to stdout (ag-ljd #scenarios-extract-stdout) (#567)
## Summary
Slice 1 of **ag-dwq** (child bead **ag-ljd**). Adds `ao beads scenarios
extract <bead-id>`: a deterministic, dependency-free, **dry-run**
command that converts a bead's free-text acceptance criteria into a
candidate Gherkin `## Scenarios` block printed to stdout. The bead is
never modified.
- **`cli/internal/scenarios`** (new, pure domain): `Extract(acceptance)
([]Scenario, error)` + `Render([]Scenario) string`. Word-boundary
`given`/`when`/`then` matching so `forgiven`/`whenever` don't
false-match; each clause must carry a letter so prose merely
*mentioning* "Given/When/Then" isn't mistaken for a scenario.
- **`cli/cmd/ao/beads_scenarios.go`** (new): subcommand under the
existing `ao beads` surface, fetching via the `execBD show --json` seam.
Agent-ergonomic (Directive 13): `--json` emits data on stdout /
diagnostics on stderr; `bd`-unavailable degrades gracefully (warn + exit
0); errors name the corrective action (manual authoring).
- **`cli/docs/COMMANDS.md`** regenerated. `capabilities` / `robot-docs`
pick the command up automatically via the live command-tree walk.
### Out of scope (later slices of ag-dwq)
`--write` / operator-confirmed update · idempotent `## Scenarios` guard
+ `--force` · `scenarios validate` + Gherkin-parser dep · LLM fallback
for non-deterministic prose.
## Test plan
- [x] `cd cli && go test ./internal/scenarios/...` — 12 cases
(single/multi-bullet, sentence-form, mixed casing, skip-unparseable,
empty→error, no-keywords→error, word-boundary, prose-mention→error,
Render exactness, round-trip)
- [x] `cd cli && go test ./cmd/ao -run BeadsScenarios` — L2 with stubbed
`bd`: stdout Gherkin, `--json`, unparseable→error, bd-unavailable
graceful, `parseAcceptanceFromBDJSON`
(array/object/fallback/empty/malformed)
- [x] `cd cli && go build ./... && go test ./...` — 11950 passed, 68
packages, 0 failures
- [x] Real binary against `ag-dwq` → 5 clean scenarios; `--json` valid
Closes-scenario: ag-ljd#scenarios-extract-stdout
Bounded-context: BC1-Corpus
Evidence: cd cli && go test ./internal/scenarios/... ./cmd/ao
2026-05-28 03:42:43 -04:00
#### `ao beads scenarios`
Turn a bead's free-text acceptance criteria into structured Gherkin
```
ao beads scenarios [command]
```
##### `ao beads scenarios extract`
Read a bead's acceptance criteria via 'bd show <id> --json', convert the
```
ao beads scenarios extract <bead-id> [flags]
```
**Flags: **
```
feat(beads): idempotent '## Scenarios' guard + --force for scenarios extract (ag-kyn #scenarios-guard) (#568)
## Summary
Next slice of the open epic **ag-dwq** (Gherkin scenarios extractor).
Slice 1 (`ag-ljd`, the dry-run `extract` command) merged in #567; this
adds the **idempotent guard** (ag-dwq scenario 3):
`ao beads scenarios extract <id>` now **refuses** when the bead already
carries a `## Scenarios` block — prints a diagnostic to stderr naming
`--force` as the corrective action, exits 0, emits nothing on stdout —
**unless `--force`** is passed, in which case it re-extracts and prints
normally.
- New pure `scenarios.HasScenariosBlock(text)`: detects a markdown `##
Scenarios` section heading (plural-only, case-insensitive). A bare
`Scenario:` line or singular `## Scenario:` heading does **not** match.
- Fetch now returns the bead's acceptance **and** description
(`fetchedBead`) so the guard can inspect the description, where authored
scenario blocks live.
- Stays a **dry-run**; no bead mutation on any path.
Out of scope (remain in parent ag-dwq): `--write`, `validate` subcommand
+ Gherkin parser dep, LLM fallback.
> **Bead note:** the canonical follow-up bead for this work is
**ag-kyn** (filed by a concurrent RPI cycle as a child of ag-dwq). A
duplicate bead `ag-gam` was created before ag-kyn was visible; `ag-gam`
is closed as duplicate-of `ag-kyn`. Branch name retains the `ag-gam`
token but the work closes `ag-kyn`.
## Test plan
- [x] `cd cli && go build ./... && go vet ./... && go test ./...` —
clean (66 pkg ok, 0 fail)
- [x] `go test ./internal/scenarios/ ./cmd/ao` — targeted, incl. new
`TestHasScenariosBlock` (11 cases) + 2 new L2 guard tests
- [x] Real binary: refuses on `ag-ljd` (has block), extracts on `ag-dwq`
(free-text bullets)
- [x] `cli/docs/COMMANDS.md` regenerated; `cli-command-surface-matrix`
smoke passes (69/174/243 — flags aren't headings)
Closes-scenario: ag-kyn#scenarios-guard
Bounded-context: BC1-Corpus
Evidence: cd cli && go test ./internal/scenarios/ ./cmd/ao
2026-05-28 04:07:49 -04:00
--force Extract even when the bead already has a '## Scenarios' block
-h, --help help for extract
--json Emit extracted scenarios as JSON (data on stdout) instead of a Gherkin block
2026-05-28 05:38:45 -04:00
--write After printing the block and an operator y/N confirmation, append it to the bead via 'bd update'
feat(beads): ao beads scenarios extract → Gherkin to stdout (ag-ljd #scenarios-extract-stdout) (#567)
## Summary
Slice 1 of **ag-dwq** (child bead **ag-ljd**). Adds `ao beads scenarios
extract <bead-id>`: a deterministic, dependency-free, **dry-run**
command that converts a bead's free-text acceptance criteria into a
candidate Gherkin `## Scenarios` block printed to stdout. The bead is
never modified.
- **`cli/internal/scenarios`** (new, pure domain): `Extract(acceptance)
([]Scenario, error)` + `Render([]Scenario) string`. Word-boundary
`given`/`when`/`then` matching so `forgiven`/`whenever` don't
false-match; each clause must carry a letter so prose merely
*mentioning* "Given/When/Then" isn't mistaken for a scenario.
- **`cli/cmd/ao/beads_scenarios.go`** (new): subcommand under the
existing `ao beads` surface, fetching via the `execBD show --json` seam.
Agent-ergonomic (Directive 13): `--json` emits data on stdout /
diagnostics on stderr; `bd`-unavailable degrades gracefully (warn + exit
0); errors name the corrective action (manual authoring).
- **`cli/docs/COMMANDS.md`** regenerated. `capabilities` / `robot-docs`
pick the command up automatically via the live command-tree walk.
### Out of scope (later slices of ag-dwq)
`--write` / operator-confirmed update · idempotent `## Scenarios` guard
+ `--force` · `scenarios validate` + Gherkin-parser dep · LLM fallback
for non-deterministic prose.
## Test plan
- [x] `cd cli && go test ./internal/scenarios/...` — 12 cases
(single/multi-bullet, sentence-form, mixed casing, skip-unparseable,
empty→error, no-keywords→error, word-boundary, prose-mention→error,
Render exactness, round-trip)
- [x] `cd cli && go test ./cmd/ao -run BeadsScenarios` — L2 with stubbed
`bd`: stdout Gherkin, `--json`, unparseable→error, bd-unavailable
graceful, `parseAcceptanceFromBDJSON`
(array/object/fallback/empty/malformed)
- [x] `cd cli && go build ./... && go test ./...` — 11950 passed, 68
packages, 0 failures
- [x] Real binary against `ag-dwq` → 5 clean scenarios; `--json` valid
Closes-scenario: ag-ljd#scenarios-extract-stdout
Bounded-context: BC1-Corpus
Evidence: cd cli && go test ./internal/scenarios/... ./cmd/ao
2026-05-28 03:42:43 -04:00
```
feat(beads): ao beads scenarios validate <id> — well-formedness check (ag-5cz #scenarios-validate) (#569)
## Summary
Slice 4 of **ag-dwq** (child bead **ag-5cz**). Adds `ao beads scenarios
validate <bead-id>`: a read-only, **dependency-free** validator for an
authored `## Scenarios` Gherkin block. It is the inverse acceptance gate
of the `extract` slice (#567) — extract turns acceptance into a
candidate block; validate confirms an authored block is well-formed.
- **`cli/internal/scenarios/validate.go`** (new, pure domain):
`ParseBlock(text) ([]Scenario, error)` + `Validate(text) error`. A
deterministic in-repo parser — **no `github.com/cucumber/gherkin-go`
dependency** (the bead's open design question, resolved toward the
repo's established dependency-free pattern). Each scenario must declare
a name and a Given/When/Then step in that order with a non-empty body;
`And`/`But` lines are accepted as continuations. Refactored into
`groupScenarios`/`assemble`/`checkStepOrder` to stay under the
cyclomatic-complexity budget (max 14 < 25).
- **`cli/cmd/ao/beads_scenarios.go`**: `validate` subcommand under the
existing `ao beads scenarios` surface. Agent-ergonomic (Directive 13):
exits 0 when well-formed, non-zero **naming the parse error** otherwise;
`--json` emits a verdict object (`{bead_id,valid,scenarios}` on success
/ `{bead_id,valid:false,error}` on failure) on **stdout** with
diagnostics on **stderr**; `bd`-unavailable degrades gracefully (warn +
exit 0).
- **`cli/docs/COMMANDS.md`** regenerated. `capabilities` / `robot-docs`
pick the command up automatically via the live command-tree walk.
Surface heading counts are **unchanged** (validate is a `#####` leaf
under the existing beads-scenarios group, so the `#{3,4}`
command-surface canary is unaffected).
### Out of scope (remaining ag-dwq slices)
`--write` / operator-confirmed bead update (**ag-3gm**) · LLM fallback
for non-deterministic prose. Parent **ag-dwq** stays OPEN.
## Test plan
- [x] `cd cli && go test ./internal/scenarios/...` — 14-case
`TestParseBlock` table (well-formed single/multi, And/But continuations,
block bounded by following heading, prose-prefixed block, no-block,
no-Scenario, missing-name, missing Given/When/Then, out-of-order,
empty-body, And-before-primary) + Validate nil/error + Render round-trip
- [x] `cd cli && go test ./cmd/ao -run Scenarios` — L2 with stubbed
`bd`: well-formed exit 0, malformed error, no-block error, `--json`
success/failure verdicts, bd-unavailable graceful, read-only contract
(no `bd update`)
- [x] `cd cli && go build ./... && go vet ./... && go test ./...` —
11951 passed, 69 packages, 0 failures
- [x] Real binary: `ao beads scenarios validate ag-3gm` → exit 0 (1
scenario well-formed); `ag-dwq` (free-text) → exit 1 naming the missing
block; `--json` verdicts valid
- [x] `gocyclo -over 15 internal/scenarios/` — clean;
`scripts/generate-cli-reference.sh --check` — up to date;
command-surface smoke — `top=69 sub=174 all=243`, exit 0
Closes-scenario: ag-5cz#scenarios-validate
Bounded-context: BC1-Corpus
Evidence: cd cli && go test ./internal/scenarios/... ./cmd/ao -run
Scenarios
2026-05-28 04:31:40 -04:00
##### `ao beads scenarios validate`
Read a bead via 'bd show <id> --json' and validate its authored
```
ao beads scenarios validate <bead-id> [flags]
```
**Flags: **
```
-h, --help help for validate
--json Emit a structured validation verdict as JSON on stdout
```
2026-05-20 20:22:31 -04:00
#### `ao beads stale-claims`
Lists in_progress beads whose claim activity is older than --threshold.
```
ao beads stale-claims [flags]
```
**Flags: **
```
-h, --help help for stale-claims
--json Emit JSON array conforming to stale-claim-event.v1 (event_type: stale_detected).
--threshold float Staleness threshold in hours (claim updated more than N hours ago). (default 4)
```
feat(ao): add 'ao beads verify|lint|harvest' stale-citation tooling
Three subcommands under a new 'ao beads' command group that complement
the bd CLI without replacing it. All commands degrade gracefully when
bd is not on PATH (warn + exit 0).
## Commands
### ao beads verify <bead-id>
Reads 'bd show <id>', extracts file paths, function references, and
backticked symbols from the description (or close reason for closed
beads), and checks each citation against HEAD. Reports FRESH / STALE /
UNKNOWN status per citation.
Bare filenames (e.g. 'loop.go' with no path) are treated specially:
the verifier walks cli/, skills/, docs/, scripts/, .agents/ to find
matches and reports FRESH if unique, UNKNOWN if ambiguous (with the
resolved path suggestions), STALE if zero matches.
Exit codes: 0 clean, 1 stale found, 2 bd error.
### ao beads lint [--status=open]
Batch-runs verify across every bead matching a status filter and
aggregates results. Exit code signals overall staleness — suitable
as a weekly audit or pre-release gate.
### ao beads harvest <bead-id>
Materialises a closed bead's close reason as a learning file at
.agents/learnings/YYYY-MM-DD-<id>-<slug>.md with frontmatter. Only
operates on closed beads. --dry-run prints to stdout instead of writing.
Compresses the bd-close → learnings pipeline into one command, so
operators running 'bd close <id> --reason "..."' can immediately
promote the reason into the knowledge flywheel.
## Design
* execBD / bdAvailable are package-level function vars so tests can
inject fakes without touching PATH (pattern consistent with existing
cmd/ao test hooks).
* parseBDShow is tolerant of both open and closed bead formats. Closed
beads hide their original description and surface a 'Close reason:'
line instead; the parser captures both and Body() prefers CloseReason.
* listBeadIDs uses a permissive <rig>-<ident> grammar so it handles
flat rows, hierarchy rows (├──/└── tree chars), and future bd shape
tweaks without breaking.
* No hard dependency on bd for tests — all L2 tests mock execBD and
drive the parse/verify/render logic directly.
## Tests
cli/cmd/ao/beads_test.go (L2, 23 tests):
* beadSlugify: basic, punctuation, truncation, empty, punct-only
* parseBDShow: canonical open, closed with Close reason, empty errors
* bdShowParsed.Body: prefers CloseReason, falls back to Description
* extractCitations: file+line, function refs, backticked symbols, dedup
* verifyFileCitation: fresh, stale, line-suffix handling
* isClosedStatus: substring matching across bd status-field shapes
* listBeadIDs: flat + tree output, non-bead lines skipped
* verifyBead: bd-absent graceful degradation + end-to-end with fake
* renderLearningBody: frontmatter + body composition
cli/cmd/ao/cobra_commands_test.go:
* beads added to expectedCmds + parentExpectations (verify|lint|harvest)
## Smoke test
Ran against na-h61 (the bead closed earlier today). Found:
- 4 FRESH, 0 STALE, 1 UNKNOWN (ambiguous bare 'types.go' — resolved
to 6 candidates, correctly suggested full paths)
- harvest --dry-run produced a clean learning file with frontmatter
- lint --status=closed found 49 clean / 1 genuinely stale (na-63f.8
references summary.json/summary.md which doesn't exist anywhere)
## Files
cli/cmd/ao/beads.go (new, ~550 LOC)
cli/cmd/ao/beads_test.go (new, ~280 LOC)
cli/cmd/ao/cobra_commands_test.go (+3 lines — beads in registry)
cli/docs/COMMANDS.md (regenerated)
## Why
Closes the last 3 items of the 7-item summary table from today's
retrospective. The first 4 items (--evidence, --commit-ready,
--discovery-artifact, stale-scope planning rule) landed in 63c8b81a.
The na-h61 session earlier today showed that bead descriptions drift
from HEAD within hours of being filed. Two of the five beads I closed
today had factually wrong descriptions (na-h61 cited a nonexistent
cli/cmd/ao/fitness.go; na-khk cited a non-reproducible env leak).
'ao beads verify' catches exactly this pattern before a new session
commits to the wrong mental model.
2026-04-11 08:36:23 -04:00
#### `ao beads verify`
Reads a bead description via 'bd show <id>' and checks every file
```
ao beads verify <bead-id> [flags]
```
**Flags: **
```
-h, --help help for verify
--json Emit verification report as JSON instead of human-readable text
--verbose Include FRESH citations in the output (default: stale only)
```
---
2026-04-11 21:58:46 -04:00
### `ao compile`
Compile makes the existing AgentOps knowledge compiler available through the ao CLI.
```
ao compile [flags]
```
**Flags: **
```
2026-04-15 09:32:06 -04:00
--batch-size int Max changed files per LLM prompt (prevents single-giant-prompt on large corpora) (default 25)
2026-04-11 21:58:46 -04:00
--compile-only Skip mine and defrag; run compile plus lint
--defrag-only Only run mechanical defrag cleanup
--force Recompile all source artifacts regardless of hashes
2026-04-15 13:55:25 -04:00
--force-repair Actually delete orphans during --repair. Without --force-repair, --repair runs dry.
2026-04-11 21:58:46 -04:00
--full Run the full mine, compile, lint, and defrag cycle
-h, --help help for compile
--incremental Compile only changed source artifacts (default true)
--lint-only Only lint the existing compiled wiki
2026-04-15 09:32:06 -04:00
--max-batches int Cap number of compile batches per invocation (0 = unlimited)
2026-04-11 21:58:46 -04:00
--mine-only Only mine new knowledge signal
--output-dir string Compiled wiki output directory (default ".agents/compiled")
--quiet Suppress human progress output
2026-04-15 12:45:40 -04:00
--repair Remove orphaned fallback stubs from .agents/compiled/ (files with no inbound wikilink traffic)
--reset Delete .agents/compiled/ and .hashes.json before compiling (force full rebuild)
2026-04-11 21:58:46 -04:00
--runtime string LLM runtime override for headless compilation (ollama, claude, openai)
--since string Mine lookback window for full and mine-only modes (default "26h")
--sources string Source .agents root to compile (default ".agents")
```
---
2026-04-10 22:48:10 -04:00
### `ao corpus`
Commands that inspect the local .agents/ corpus quality.
```
ao corpus [command]
```
**Subcommands: **
feat(cli): ao corpus capture — 7th adapter CLI-exposed; BC1 R/W pair complete on CLI
Cycle 151 applies the cycle-147 template to a 7th adapter:
productionCorpusWriter (cycle 113). Closes the BC1 CorpusReader+
Writer pair on the CLI side (cycle 146 already shipped 'ao corpus
inject' for the reader).
New surface:
ao corpus capture --path <relpath> --body "..." [--meta k=v ...]
ao corpus capture --path x --body-file f.md
echo "..." | ao corpus capture --path x --body-stdin
Wraps productionCorpusWriter. Three body-source options
(--body, --body-file, --body-stdin) are mutually exclusive — the
helper rejects multiple sources to force one explicit choice.
Metadata via --meta key=value (repeatable). Path safety inherited
from the production adapter (rejects absolute paths and parent
traversal).
Live smoke (round-trip):
$ ao corpus capture --root /tmp --path smoke.md --body "hello"
created /tmp/smoke.md
$ cat /tmp/smoke.md
hello from cycle 151
New nuance from this cycle: 'body source' validation. The template
previously didn't model "one of N alternatives required" inputs.
Solved with a small corpusCaptureResolveBody helper that counts
sources and errors clearly. Future cycles applying the template to
adapters with mutually-exclusive input modes can copy this pattern.
New files:
- cli/cmd/ao/corpus_capture.go (172 lines) — corpusCaptureCmd
added under existing corpusCmd. Three body sources + metadata +
injectable captureFn. Compile-time port wiring via
productionCorpusWriter.
- cli/cmd/ao/corpus_capture_test.go (165 lines) — 8 tests:
empty path rejected, body required, multiple-sources rejected,
inline body to stub, stdin body, meta parsed, malformed meta
rejected, --body-file reads content, stub error wrapped.
cli/docs/COMMANDS.md regenerated.
7 of 14 production adapters now CLI-exposed (50%!):
loop history + ci latest/recent + corpus inject + corpus capture
+ operator record/list + harness status + gate run.
7 adapters remain unexposed. Exposing all 14 is now a deterministic
path; expose ad-hoc as needs surface.
Time: ~10 min. LOC: 337. Tests: 8. Slightly above template band
because of the body-source-resolution helper — accounted for in
the new nuance documented above.
Cycle 151 / template-applied CLI-wiring 4th application.
BC1 R/W pair now complete on the CLI side.
2026-05-12 21:34:14 -04:00
#### `ao corpus capture`
Write an artifact to a corpus root via the typed BC1
```
ao corpus capture --path <relpath> [--body <text>] [--body-file <file>] [--body-stdin] [--root <dir>] [--meta k=v ...] [flags]
```
**Flags: **
```
--body string body text (mutually exclusive with --body-file and --body-stdin)
--body-file string read body from file
--body-stdin read body from stdin
-h, --help help for capture
--meta stringArray metadata key=value (repeatable)
--path string relative path within root (required)
--root string corpus root (default: .agents/learnings/)
```
2026-04-10 22:48:10 -04:00
#### `ao corpus fitness`
Compute the corpus-quality fitness vector for the current .agents/
```
ao corpus fitness [flags]
```
**Flags: **
```
-h, --help help for fitness
--json Emit the fitness vector as JSON
```
2026-05-12 21:23:44 -04:00
#### `ao corpus inject`
Read knowledge from a corpus root via the typed BC1
```
ao corpus inject [--query <text>] [--root <path>] [--limit N] [flags]
```
**Flags: **
```
-h, --help help for inject
--limit int max items to emit (0 = all) (default 10)
--query string ranking query (empty = all items, score 0)
--root string corpus root (default: .agents/learnings/)
```
feat(corpus): snapshot/restore + freshness gate (D11)
Closes soc-ymph.11 — Directive D11 (Corpus durability snapshot/restore).
Why
- Routine cleanup periodically wipes most of .agents/. Without a
durable copy, the corpus moat claim becomes fragile every time the
operator runs maintenance. soc-rv5p documented the 2026-05-07
incident that motivated this work.
What
- cli/cmd/ao/corpus_snapshot.go: two new subcommands.
* ao corpus snapshot — tar.gz the .agents/ tree into
$AGENTOPS_CORPUS_SNAPSHOT_DIR (default ~/.agentops/corpus-snapshots),
write a sidecar .manifest.json with file_count, total_bytes,
sha256, RFC3339 created_at. Atomic via tmp+rename.
* ao corpus restore — extract a snapshot tarball, with path-
traversal defense, --from/--latest source resolution, --into
destination (default .agents), --overwrite gate that moves the
existing tree to .agents.bak-<ts>/ before extracting and only
removes the backup after a successful extract.
- scripts/check-corpus-freshness.sh: structural freshness gate.
Fails when the newest tarball in the snapshot dir is older than
AGENTOPS_CORPUS_FRESHNESS_DAYS (default 7). Skips cleanly when
no snapshot dir or no tarballs (greenfield boxes); honors
AGENTOPS_CORPUS_FRESHNESS_SKIP=1.
- GOALS.md: new gate row corpus-freshness, weight 4.
- .github/workflows/validate.yml: new validate-corpus-freshness job
(always-on; sets the SKIP env on CI runners since they don't carry
a snapshot dir). Registered in summary.needs[] and summary echo
per validate-ci-policy-parity contract.
- scripts/pre-push-gate.sh: new always-on check 22g. Fast (<100ms)
in the SKIP path; real teeth on operator boxes with a snapshot
dir.
- AGENTS.md: CI Jobs row for validate-corpus-freshness.
- tests/scripts/pre-push-gate.bats: stub for the new gate script.
- cli/docs/COMMANDS.md: regenerated to include corpus snapshot/restore
(cobra-conformance test would fail otherwise).
Round-trip smoke
- Snapshot of a 2-file .agents/ tree round-trips byte-identical
through tar.gz + sha256 manifest.
- check-corpus-freshness.sh: SKIP (no dir) → SKIP (env) → PASS
(fresh) → FAIL (10d old > 7d threshold). All four paths.
- bats: 51/51 ok.
- go test ./cmd/ao/... -run "TestCorpus |TestCobra" : 165 pass.
- validate-ci-policy-parity: PASS (53 jobs, 7 non-blocking).
- pre-push --fast (PRE_PUSH_SKIP_EVAL=1 for the soc-l4yt canary flake):
both passes green with "ok corpus freshness".
Companion bead: soc-rv5p (closed) — original incident.
2026-05-11 17:31:59 -04:00
#### `ao corpus restore`
Untars a snapshot produced by ao corpus snapshot. By default refuses to overwrite an
```
ao corpus restore [flags]
```
**Flags: **
```
--from string Explicit snapshot tarball path
-h, --help help for restore
--into string Destination directory (default: .agents) (default ".agents")
--json Emit the result as JSON to stdout
--latest Pick the newest tarball in the snapshot dir
--overwrite Replace an existing destination directory (with .bak rescue)
```
#### `ao corpus snapshot`
Writes the entire .agents/ tree as a tar.gz to a durable directory outside the repo,
```
ao corpus snapshot [flags]
```
**Flags: **
```
-h, --help help for snapshot
--json Emit the manifest as JSON to stdout
--output-dir string Override snapshot dir (default: $AGENTOPS_CORPUS_SNAPSHOT_DIR or ~/.agentops/corpus-snapshots)
```
2026-04-10 22:48:10 -04:00
---
2026-03-01 17:58:00 -05:00
### `ao defrag`
Defrag performs mechanical cleanup of the knowledge base:
```
ao defrag [flags]
```
**Flags: **
```
--dedup Flag learnings with >80% content similarity
-h, --help help for defrag
2026-03-02 07:30:30 -05:00
--output-dir string Directory for defrag report JSON (default ".agents/defrag")
2026-03-01 17:58:00 -05:00
--prune Find orphaned learnings not referenced in patterns or research
--quiet Suppress progress output
--stale-days int Days after which an unreferenced learning is considered stale (default 30)
```
---
2026-04-05 09:15:27 -04:00
### `ao findings`
Manage promoted finding artifacts under .agents/findings/.
```
ao findings [command]
```
**Subcommands: **
#### `ao findings export`
Export finding artifacts to another repo or findings directory
```
ao findings export <id...> [flags]
```
**Flags: **
```
--all Export every local finding
--force Overwrite destination files if they already exist
-h, --help help for export
--to string Destination repo root or .agents/findings directory
```
#### `ao findings list`
List active findings
```
ao findings list [query] [flags]
```
**Flags: **
```
--all Include retired and superseded findings
-h, --help help for list
--limit int Maximum findings to return (default 20)
```
#### `ao findings pull`
Pull finding artifacts from another repo or findings directory
```
ao findings pull <id...> [flags]
```
**Flags: **
```
--all Pull every source finding
--force Overwrite local files if they already exist
--from string Source repo root or .agents/findings directory
-h, --help help for pull
```
#### `ao findings retire`
Retire a finding artifact
```
ao findings retire <id> [flags]
```
**Flags: **
```
--by string Retired-by marker (defaults to current user or ao findings retire)
-h, --help help for retire
```
#### `ao findings stats`
Summarize local finding artifact inventory
```
ao findings stats [flags]
```
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao forge`
2026-02-24 21:19:46 -05:00
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
The forge command extracts knowledge candidates from various sources.
2026-02-24 21:19:46 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao forge [command]
2026-02-24 21:19:46 -05:00
```
2026-02-26 05:48:41 -05:00
**Subcommands: **
2026-02-24 21:19:46 -05:00
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao forge batch`
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
Find and process pending transcripts in bulk.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao forge batch [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-02-26 05:48:41 -05:00
--dir string Specific directory to scan (default: all Claude project dirs)
--extract Trigger extraction after forging
-h, --help help for batch
--max int Maximum transcripts to process (0 = all)
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao forge markdown`
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
Parse markdown (.md) files and extract knowledge candidates.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao forge markdown <path-or-glob> [flags]
2026-02-21 19:41:50 -05:00
```
2026-02-26 05:48:41 -05:00
**Flags: **
2026-02-21 19:41:50 -05:00
2026-02-26 05:48:41 -05:00
```
-h, --help help for markdown
--queue Queue for learning extraction at next session start
--quiet Suppress all output (for hooks)
```
2026-04-12 00:55:33 -04:00
#### `ao forge review`
Review draft session pages in .agents/ao/sessions/ and promote
```
ao forge review [flags]
```
**Flags: **
```
2026-04-12 05:44:55 -04:00
--dry-run Show what would be promoted without writing
--eval string Evaluate review decisions against a labeled JSON manifest without writing
-h, --help help for review
2026-04-28 23:54:11 -04:00
--reviewer-endpoint string Ollama HTTP endpoint for --reviewer-model (fallback: $AGENTOPS_LLM_ENDPOINT or http://localhost:11434)
2026-04-12 05:44:55 -04:00
--reviewer-model string LLM model tag for Tier 2 reviewer decisions (e.g. gemma2:9b)
--sessions-dir string Directory containing session pages (default: .agents/ao/sessions)
2026-04-12 00:55:33 -04:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
#### `ao forge transcript`
2026-02-26 05:48:41 -05:00
Parse Claude Code JSONL transcript files and extract knowledge candidates.
2026-02-21 19:41:50 -05:00
```
2026-02-26 06:42:03 -05:00
ao forge transcript <path-or-glob> [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-04-12 00:24:25 -04:00
-h, --help help for transcript
--last-session Process only the most recent transcript
2026-04-28 23:54:11 -04:00
--legacy-local-llm Allow legacy local Ollama/Gemma fallback for --tier=1 when no AgentWorker queue is configured
--llm-endpoint string Legacy Ollama HTTP endpoint for --tier=1 (fallback: $AGENTOPS_LLM_ENDPOINT or http://localhost:11434)
--max-chars int Per-chunk character budget for --tier=1 legacy local LLM mode (default: conservative built-in budget)
--model string Legacy local LLM model tag for --tier=1 (e.g. gemma2:9b)
2026-04-12 00:24:25 -04:00
--queue Queue session for learning extraction at next session start
--quiet Suppress all output (for hooks)
2026-04-28 23:54:11 -04:00
--tier int Tier 1 transcript processing: enqueue to configured Dream worker; local Ollama fallback requires --legacy-local-llm
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
2026-04-05 09:15:27 -04:00
### `ao harvest`
Walks all .agents/ directories across the workspace, extracts learnings,
```
ao harvest [flags]
```
**Flags: **
```
-h, --help help for harvest
--include string Artifact types to include (comma-separated) (default "learnings,patterns,research")
--max-file-size int Skip files larger than this (bytes) (default 1048576)
2026-04-30 11:08:22 -04:00
--max-promotions int Advisory volume gate: emit a stderr WARN when promotions exceed this count (0 disables; AO_MAX_PROMOTIONS env var as fallback). Never blocks. (default 500)
2026-04-05 09:15:27 -04:00
--min-confidence float Minimum confidence for promotion (default 0.5)
--output-dir string Directory for harvest catalog output (default ".agents/harvest")
--promote-to string Promotion destination for high-value artifacts (default ~/.agents/learnings)
--quiet Suppress progress output
--roots string Base directories to scan (comma-separated) (default ~/gt)
```
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao inject`
2026-02-21 19:41:50 -05:00
2026-04-28 15:26:51 -04:00
Inject searches and outputs relevant knowledge for explicit or JIT context.
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao inject [context] [flags]
2026-02-21 19:41:50 -05:00
```
**Flags: **
```
2026-05-02 12:29:59 -04:00
--apply-decay Apply confidence decay before ranking
--bead string Bead ID for work-scoped knowledge injection
--context string Context query for filtering (alternative to positional arg)
--for string Skill name — assembles context per skill's context declaration
--format string Output format: markdown, json (default "markdown")
-h, --help help for inject
--index-only Output compact knowledge index table instead of full content
--max-tokens int Maximum tokens to output (default 1500)
--no-cite Disable citation recording
--predecessor string Path to predecessor handoff file for context injection
--profile Include .agents/profile.md identity artifact in output
--quarantine-flagged Quarantine flagged learnings from quality report
--session string Session ID for citation tracking (auto-generated if empty)
--session-type string Session type for scoring boost (career, research, debug, implement, brainstorm)
--utility-weight utility: Multiplier on utility's contribution to ranking (0=disable, 1=default, >1=emphasize). Reads utility: frontmatter; closes the eval-verdict-compiler loop. (default 1)
2026-02-21 19:41:50 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
2026-04-05 09:15:27 -04:00
### `ao knowledge`
Knowledge turns a mature .agents corpus into operator-ready surfaces.
```
ao knowledge [command]
```
**Subcommands: **
#### `ao knowledge activate`
Run the full knowledge activation outer loop
```
ao knowledge activate [flags]
```
**Flags: **
```
--goal string Optional goal for briefing compilation during activation
-h, --help help for activate
```
#### `ao knowledge beliefs`
Refresh the belief book from promoted evidence
```
ao knowledge beliefs [flags]
```
#### `ao knowledge brief`
Compile a goal-time briefing
```
ao knowledge brief [flags]
```
**Flags: **
```
--goal string Goal to compile into a briefing
-h, --help help for brief
```
#### `ao knowledge gaps`
Report thin topics, promotion gaps, and next mining work
```
ao knowledge gaps [flags]
```
#### `ao knowledge playbooks`
Refresh playbook candidates from healthy topics
```
ao knowledge playbooks [flags]
```
**Flags: **
```
-h, --help help for playbooks
--include-thin Include thin topics when building playbook candidates
```
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao lookup`
2026-02-24 21:19:46 -05:00
Lookup retrieves full content of specific knowledge artifacts.
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao lookup [id] [flags]
2026-02-24 21:19:46 -05:00
```
**Flags: **
```
--bead string Filter by source bead ID
2026-04-05 09:15:27 -04:00
--cite string Citation type to record for returned artifacts: retrieved, reference, applied (default "retrieved")
2026-02-24 21:19:46 -05:00
-h, --help help for lookup
--json JSON output
--limit int Maximum results to return (default 3)
--no-cite Skip citation recording
--query string Search query for relevance matching
--session string Session ID for citation tracking
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
feat: add ao mind command and standardize skill YAML frontmatter
Integrate mind knowledge graph tool as `ao mind` subcommand (scan,
normalize, link, index, all, graph) wrapping python3 -m mind. Update
all 9 skill output templates to emit standardized YAML frontmatter
(id, type, date) with source wikilinks for RPI chain skills. Mirror
all changes to skills-codex/ for parity.
Also includes: hooks coverage test updates, go-complexity precommit
guard, ci-local-release allowlist fix, and new integration/lint tests.
2026-02-26 11:54:10 -05:00
### `ao mind`
Scan, normalize, link, and index .agents/ markdown into an Obsidian knowledge graph.
```
ao mind [command]
```
**Subcommands: **
#### `ao mind all`
Run full pipeline (normalize → link → index)
```
ao mind all [flags]
```
#### `ao mind graph`
Show graph statistics
```
ao mind graph [flags]
```
#### `ao mind index`
Rebuild the graph index
```
ao mind index [flags]
```
#### `ao mind link`
Insert wikilinks between related artifacts
```
ao mind link [flags]
```
#### `ao mind normalize`
Add/fix YAML frontmatter on .agents/ markdown
```
ao mind normalize [flags]
```
#### `ao mind scan`
Show what needs normalization
```
ao mind scan [flags]
```
---
2026-03-01 17:58:00 -05:00
### `ao mine`
Mine scans all reachable data sources for patterns and insights
```
ao mine [flags]
```
**Flags: **
```
2026-03-02 06:48:56 -05:00
--emit-work-items Append actionable mine findings to .agents/rpi/next-work.jsonl for evolve to pick up
-h, --help help for mine
--output-dir string Directory for mine output JSON (default ".agents/mine")
--quiet Suppress progress output
--since string How far back to look (e.g. 26h, 7d) (default "26h")
2026-03-06 08:03:07 -05:00
--sources string Comma-separated sources to mine (git, agents, code, events) (default "git,agents,code")
2026-03-01 17:58:00 -05:00
```
---
2026-05-07 09:06:51 -04:00
### `ao patterns`
Maintenance commands for the .agents/patterns/ directory.
```
ao patterns [command]
```
**Subcommands: **
#### `ao patterns repair-filenames`
Walk .agents/patterns/*.md, detect filenames whose hyphenated segments
```
ao patterns repair-filenames [flags]
```
**Flags: **
```
--apply Perform renames (default: dry-run, no disk writes)
--dir string Patterns directory to repair (default: <cwd>/.agents/patterns)
-h, --help help for repair-filenames
--quiet Suppress per-rename output
```
---
2026-04-05 09:15:27 -04:00
### `ao retrieval-bench`
Measure Precision@K and MRR against a curated corpus of learning artifacts.
```
ao retrieval-bench [flags]
```
**Flags: **
```
2026-05-02 10:17:23 -04:00
--corpus string Path to benchmark corpus directory
--global Include ~/.agents/learnings/ (cross-rig aggregated store, requires --live)
-h, --help help for retrieval-bench
--json JSON output
--k int K for Precision@K (default 3)
--live Benchmark against real .agents/learnings/ instead of synthetic corpus
2026-05-02 10:35:31 -04:00
--search-backend string Search backend for --search-eval (local-lexical, ao-auto, agentic-rg, wiki-link-expand, rerank-llamacpp) (default "local-lexical")
2026-05-02 10:17:23 -04:00
--search-compare-backends string Comma-separated search backends to compare for --search-eval
--search-eval string Path to an ao-search eval manifest with queries and ground_truth paths
--search-root string Repo root to search for --search-eval (defaults to current directory)
2026-04-05 09:15:27 -04:00
```
---
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
### `ao search`
2026-02-21 19:41:50 -05:00
2026-04-05 09:15:27 -04:00
Search workspace session history and repo-local AgentOps knowledge.
2026-02-25 06:10:51 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
ao search <query> [flags]
2026-02-25 06:10:51 -05:00
```
**Flags: **
```
2026-04-05 09:15:27 -04:00
--cass Require upstream cass session-history search
--cite string Optional citation type to record for matching repo-local artifacts: retrieved, reference, applied
-h, --help help for search
--limit int Maximum results to return (default 10)
--local Force repo-local AgentOps search only
--session string Session ID for citation tracking (defaults to the active runtime session)
2026-04-12 11:12:36 -04:00
--type string Filter by type: session(s), learning(s), pattern(s), finding(s), research, compiled, vault-source(s), decision(s), knowledge
2026-04-05 09:15:27 -04:00
--use-sc Try Smart Connections semantic search first (requires Obsidian)
2026-02-25 06:10:51 -05:00
```
refactor: flatten CLI namespace and liquidate debt
Remove 5 namespace parent commands (know, work, quality, settings, start)
and register all 49 leaf commands directly on rootCmd. Flat namespace is
simpler for users; GroupID-based help provides visual grouping without
requiring namespace tokens.
Namespace flattening (184 files):
- Delete know.go, work.go, quality.go, settings.go, start.go
- Invert deprecatedCommands map (old namespace paths → flat paths)
- Update 127 consumer files (hooks, skills, docs, scripts, tests)
Debt liquidation (7 items from post-mortem):
- Fix 62 broken smoke test invocations
- Delete 118 LOC dead deprecatedAlias code
- Widen doctor scan to docs/, scripts/, and subdirectories
- Expand expectedCmds test to all 49 commands (floor 45)
- Add bidirectional expectedCmds sync check
- Create sweep-namespace-references.sh automation
- Fix EXPECTED_COMMANDS array to list flat commands
- Escape sed variables in sweep script
All Go tests pass (36s). All conformance checks pass.
2026-02-26 09:27:38 -05:00
---
2026-04-12 09:57:44 -04:00
### `ao sessions`
Manage derived session pages under .agents/ao/sessions without touching source transcripts.
```
ao sessions [command]
```
**Subcommands: **
2026-04-25 16:52:21 -04:00
#### `ao sessions index`
Maintain derived session pages under .agents/ao/sessions.
```
ao sessions index [flags]
```
**Flags: **
```
-h, --help help for index
--prune-orphans Delete derived session pages whose source_jsonl no longer exists
--sessions-dir string Directory containing derived session pages (default: .agents/ao/sessions)
```
2026-05-05 18:03:10 -04:00
#### `ao sessions spawn`
Read a session template, expand variables, run init steps, and create
```
ao sessions spawn <template-path> [flags]
```
**Flags: **
```
--date string Override date for template expansion (default: today, YYYY-MM-DD)
--dry-run Print expanded template and init steps without executing
-h, --help help for spawn
--no-tmux Run init steps but skip tmux session creation
```
2026-04-25 16:52:21 -04:00
---
### `ao trace`
Trace the provenance of an artifact back to its source transcript.
```
ao trace <artifact-path> [flags]
```
**Flags: **
```
--graph Show ASCII provenance graph
-h, --help help for trace
```
---
2026-05-18 09:29:12 -04:00
### `ao wiki`
ao wiki is the experimental unified surface for the wiki bounded context.
```
ao wiki [command]
```
**Subcommands: **
#### `ao wiki doctor`
Report on the wiki corpus directory and the persistent index.
```
ao wiki doctor [flags]
```
**Flags: **
```
--base string Corpus base directory (default: current directory)
-h, --help help for doctor
```
#### `ao wiki index`
Scan the .agents/ corpus and update the persistent JSONL document index.
```
ao wiki index [flags]
```
**Flags: **
```
--base string Corpus base directory (default: current directory)
-h, --help help for index
```
#### `ao wiki inject`
Assemble just-in-time .agents/ context.
```
ao wiki inject [flags]
```
#### `ao wiki lint`
Walk the wiki tree and write a dated lint report.
```
ao wiki lint [flags]
```
**Flags: **
```
-h, --help help for lint
--vault string Vault root (default: current directory)
```
#### `ao wiki promote`
Promote mature wiki pages into authored content.
```
ao wiki promote [flags]
```
**Flags: **
```
-h, --help help for promote
--vault string Vault root (default: current directory)
```
#### `ao wiki query`
Answer a pending wiki question into wiki/synthesis/.
```
ao wiki query [flags]
```
**Flags: **
```
-h, --help help for query
--vault string Vault root (default: current directory)
```
#### `ao wiki search`
Rank documents in the wiki index against a free-text query.
```
ao wiki search <query> [flags]
```
**Flags: **
```
--base string Corpus base directory (default: current directory)
-h, --help help for search
--limit int Maximum results to print (default 20)
--reindex Rebuild the index before searching
```
---
feat(cli): ao agent bundle — emit runtime-specific AgentOps-native Agent definitions (ag-eguw0 #agent-bundle) (#618)
## What
New `ao agent` cobra noun + `bundle` verb — emits a **runtime-specific
Agent definition** that stitches the AgentOps skill set + the `ao` tool
surface so an out-of-session loop (Managed Agent / Codex-NTM swarm) runs
under the same guardrails. Third child of epic **ag-7s9fo** (after
ag-2wln skill #616, ag-mptr CI gate #617).
- `--runtime managed` → Managed Agents JSON (model + stitched
instructions + `skills[]` + `ao` MCP tool descriptor;
self-hosted-sandbox block on `--sandbox self-hosted`).
- `--runtime codex-ntm` → NTM bundle (skills-codex/agent-native ref +
pane bootstrap running `ao session bootstrap` + `ao inject`); no MCP —
Codex shells `ao` directly.
- Default skills: `session-bootstrap, standards, validation,
provenance`. Flags: `--skills`, `--sandbox`, `--out`, `--json`.
## Security — HARD REFUSAL (NOT-ZDR)
Managed Agents are **not** ZDR. `buildAgentBundle` refuses (non-zero
exit + explicit message) if any selected skill **names/paths a
holdout/eval surface** or its `SKILL.md` body carries a holdout marker
(`private_holdout` / `ground_truth` / `holdout target`).
`AGENTOPS_HOLDOUT_EVALUATOR` does **not** authorize leaking holdout to a
cloud agent. The eval substrate stays LOCKED (no relitigation of
`~/.agents/evals/SCHEMA.md`). Fails closed.
## Tests (TDD-first)
`cli/cmd/ao/agent_bundle_test.go` — 7 cases on the pure
`buildAgentBundle` seam: managed defaults + `ao` MCP descriptor;
self-hosted sandbox block; codex-ntm shape (bootstrap + reference, no
MCP); **holdout refusal**; unknown runtime; default-skill set; managed
JSON required-keys (= the schema contract). All funcs CC < 15 (budget
25). `go vet` clean; full `cmd/ao` suite 9204 pass.
## Gates handled
- Added `agent` to **both** `expectedCmds` lists
(TestCobraExpectedCmdsMatchRegistration).
- Regenerated `cli/docs/COMMANDS.md` (TestCobraConformance) +
`docs/cli-skills-map.md`.
- `ao agent bundle` reads as `public-tested`/`covered`.
`docs/cli-surface.md` left at its standing tolerated state (non-blocking
inventory; reverted to avoid sweeping in unrelated #613 eval-outcomes
drift).
## Notes for review
- **Naming**: `ao agent` (singular, new) sits beside `ao agents`
(plural, AGENTS.md doctor/lint) — different domains, but the
singular/plural proximity is a UX smell. Proceeded per epic spec;
trivial rename if you'd prefer (e.g. `ao agentdef bundle`).
- **Schema follow-up**: the managed-output structural contract is
test-enforced (required-keys); a formal
`schemas/agent-definition.schema.json` + validator wiring can land later
if a downstream consumer needs strict validation. Kept out to bound this
PR.
- Instructions are stitched as skill **names + preamble**, not full
bodies — bounded payload + the agent loads full skills at runtime via
the `ao` tool surface (also avoids over-inlining).
Closes-scenario: ag-eguw0#agent-bundle
Bounded-context: BC5-Runtime
Evidence: cli/cmd/ao/agent_bundle_test.go
2026-05-30 01:28:41 -04:00
### `ao agent`
Emit a runtime-specific Agent definition (Managed Agents payload or
```
ao agent [command]
```
**Subcommands: **
#### `ao agent bundle`
Stitch the selected AgentOps skills + the ao tool surface into an
```
ao agent bundle [flags]
```
**Flags: **
```
-h, --help help for bundle
--json Emit machine-readable JSON (always JSON for now; reserved for parity)
--out string Write the bundle to this path instead of stdout
--runtime string Target runtime: managed | codex-ntm (required)
--sandbox string Sandbox placement: self-hosted | cloud
--skills string Comma-separated skill names (default: session-bootstrap,standards,validation,provenance)
```
---
2026-04-25 16:52:21 -04:00
### `ao agents`
Tooling for the .agents/ knowledge surface that backs the
```
ao agents [command]
```
**Subcommands: **
#### `ao agents doctor`
Combine ao agents inspect and ao agents lint into a single
```
ao agents doctor [flags]
```
**Flags: **
```
--agents-dir string Path to the .agents/ directory under inspection (default ".agents")
--contract string Path to the .agents/ write-surfaces contract doc (default "docs/contracts/agents-write-surfaces.md")
-h, --help help for doctor
--json Emit machine-readable JSON
--script string Path to the lint script (default "scripts/check-agents-write-surfaces.sh")
--skills-dir string Path to the skills/ directory used for skill-owned-subdir cross-check (default "skills")
--strict Exit non-zero on any orphan or undocumented surface
```
#### `ao agents inspect`
Read the .agents/ write-surface contract and emit a structured
```
ao agents inspect [flags]
```
**Flags: **
```
--contract string Path to the .agents/ write-surfaces contract doc (default "docs/contracts/agents-write-surfaces.md")
-h, --help help for inspect
--json Emit machine-readable JSON
```
#### `ao agents lint`
Wrap scripts/check-agents-write-surfaces.sh and surface its
```
ao agents lint [flags]
```
**Flags: **
```
-h, --help help for lint
--json Forward --json to the lint script
--script string Path to the lint script (default "scripts/check-agents-write-surfaces.sh")
```
---
### `ao extract`
Check for pending session extractions and output a prompt for Claude to process.
```
ao extract [flags]
```
**Flags: **
```
--all Process all pending entries
--bead string Bead ID to tag extracted learnings with
--clear Clear pending queue without processing
-h, --help help for extract
--max-content int Maximum characters of session content to include (default 3000)
```
---
### `ao help`
Help provides help for any command in the application.
```
ao help [command] [flags]
```
---
feat(cli): ao mcp serve --print-tools — curated MCP tool-descriptor surface (ag-h1mk #mcp-print-tools) (#619)
## What
New `ao mcp` noun + `serve` verb exposing **`--print-tools --json`** —
the curated, read-mostly MCP tool surface a hosted/SDK Claude loop uses
to orient and self-check. It's the descriptor `ao agent bundle --runtime
managed` (#618) already references. **Claude-only** (Codex shells `ao`
directly).
**Slice 1 of ag-3ucpd** (split per the evolve scope filter — the full
MCP server is genuinely oversized: a from-scratch JSON-RPC stdio
transport + live integration test, no MCP library vendored). This ships
the deterministic, high-value, fully-testable descriptor surface now;
the live transport + transport-round-trip integration test is carved to
the **ag-3ucpd** umbrella for a fresh context.
- `mcpToolDescriptors()` — 6 curated tools (`session_bootstrap`,
`inject`, `corpus_inject`, `standards`, `validate`, `goals_measure`)
with name + description + input_schema + holdout-sensitive flag.
- `mcpToolDenied()` — deterministic **NOT-ZDR holdout refusal**: a tool
call whose args reference `holdout` / `ground_truth` / `.agents/evals`
is denied (cloud MCP surface; eval substrate LOCKED;
`AGENTOPS_HOLDOUT_EVALUATOR` does **not** unlock the cloud surface).
- Bare `ao mcp serve` (no `--print-tools`) errors loudly pointing at the
ag-3ucpd live-transport follow-up — never a silent no-op.
## Tests (TDD-first)
`cli/cmd/ao/mcp_serve_test.go` — 6 cases: curated surface (6 tools,
schemas present), holdout refusal (query + path-escape), clean-call
allowed, `--print-tools` JSON shape, live-transport-not-yet error. `go
vet` clean, gocyclo < 15, full `cmd/ao` suite **9210 pass**.
## New-`ao`-command surfaces (all 5 regenerated up-front)
The corpus-encoded checklist from #618's three-round discovery — applied
in one shot, expecting one-shot-green:
1. `expectedCmds` ×2 (`mcp` inserted alphabetically) ·
2. `cli/docs/COMMANDS.md` (TestCobraConformance) ·
3. `registry.json` (69→70 commands, 164→165 SKU) ·
4. `cli-command-surface-matrix` eval fixtures (71/177/248 → 72/178/250;
smoke PASS) ·
5. `docs/cli-surface.md`+`.json` (`ao mcp serve` covered).
Scope-only diff (10 files, all mcp-attributable; no unrelated drift).
Closes-scenario: ag-h1mk#mcp-print-tools
Bounded-context: BC5-Runtime
Evidence: cli/cmd/ao/mcp_serve_test.go
2026-05-30 01:51:19 -04:00
### `ao mcp`
Model Context Protocol surface for out-of-session Claude loops (Managed
```
ao mcp [command]
```
**Subcommands: **
#### `ao mcp serve`
Emit the curated MCP tool surface (--print-tools) consumable by
```
ao mcp serve [flags]
```
**Flags: **
```
-h, --help help for serve
--json Machine-readable JSON (always JSON for --print-tools; reserved for parity)
--print-tools Emit the curated tool surface as JSON and exit
```
---
feat(rpi): materialize harvested next-work into durable beads (ag-9jle.3 #lessons-to-beads) (#633)
## What
Closes the missing half of the BDD-Gherkin-wave loop — **lessons →
beads**. Harvested follow-ups landed in `.agents/rpi/next-work.jsonl` as
a queue but never became durable beads, so the flywheel executed without
compounding into the tracker.
New **`ao next-work materialize`**:
- Reads unmaterialized items from `next-work.jsonl` and `bd create`s one
durable bead each.
- Carries `source_epic` + `proof_ref` on **bd's native `--metadata`** —
*not* a forked provenance format. The real provenance graph edge is
deferred to `ag-x31t.4`'s future `ao provenance add`.
- **Idempotent** via the existing per-item `bead_id` back-reference.
Re-runs skip already-materialized / consumed / held-for-review items.
- Flags: `--file`, `--dry-run`, `--json`, `--source-epic`,
`--materialized-by`.
- `skills/post-mortem/references/harvest-next-work.md` now invokes it
after the queue-write (CLI owns the deterministic core; the skill just
calls it).
## First failing test (Gherkin contract)
> Given a completed wave with a harvested follow-up · When materialize
runs · Then a durable bead exists via `bd create` carrying
`source_epic`/`proof_ref`, not only a `next-work.jsonl` queue line.
`TestNextWorkMaterialize_CreatesDurableBeadWithProvenance` + 6 more
(idempotency, skips-consumed/held, dry-run-no-mutation, source-epic
filter, 2 mapping tables) — all green.
## Compass-not-maps pivots vs the locked plan
Verifying each premise before executing (the W1-reconciliation
overstated-scope lesson) caught two beats that were **already done**:
1. The schema fields `source_epic`/`proof_ref` already exist in
`next-work-{item,batch}.v1.schema.json` — dropped the "add fields" beat.
2. The idempotency anchor `NextWorkItem.BeadID` already exists — no new
field invented.
## Boundary
Zero `ag-x31t` files touched; `validate.yml` untouched (parked per
handoff). `ao next-work` is collision-free (distinct from the existing
`ao evolve next-work` ladder recommender).
## Validation
- `cli/cmd/ao` package: all tests green except pre-existing
`TestCronSelfAdjust_RoundTrip` (macOS-only `/tmp` vs `/private/tmp` path
bug — fails identically on clean `main`, passes on CI Linux).
- `TestCobraConformance` + `TestCobraExpectedCmdsMatchRegistration`
updated for the new command; `COMMANDS.md` regenerated.
- `go vet` + `gofmt` clean.
Closes-scenario: ag-9jle.3#lessons-to-beads
Bounded-context: BC3-Loop
Evidence: cli/cmd/ao/next_work_materialize_test.go
2026-05-30 13:55:39 -04:00
### `ao next-work`
Commands that act on the carry-forward next-work queue that /post-mortem
```
ao next-work [command]
```
**Subcommands: **
#### `ao next-work materialize`
Read .agents/rpi/next-work.jsonl and create one durable bead per
```
ao next-work materialize [flags]
```
**Flags: **
```
--dry-run Show what would be created without creating beads or mutating the queue
--file string Path to next-work.jsonl (default: <cwd>/.agents/rpi/next-work.jsonl)
-h, --help help for materialize
--json Emit a machine-readable JSON summary
--materialized-by string Actor recorded in provenance metadata (default "next-work-materialize")
--source-epic string Only materialize items whose batch source_epic equals this value
```
---
feat(provenance): provenance_edges write-model + ao provenance add (ag-x31t.4 #provenance-write-model) (#649)
## What
Builds the WRITE side of the SDLC provenance/intent graph (ag-x31t slice
1). Adds `ao provenance add` / `ao provenance list` plus a new
`cli/internal/provenancegraph` package that seals typed, evidence-backed
edges onto the per-record hash-chained ledger at
`docs/provenance/ledger.jsonl`.
Consumes the schema merged in #637
(`schemas/agentops-sdlc-provenance.v1.schema.json`). Does not touch the
schema (.2), export (.5), or gate (.6).
## CQRS doctrine
Per CLAUDE.md and the council architecture, the committed JSONL ledger
is the **audit authority and source of truth**; any Dolt
`provenance_edges` table is a rebuildable projection that loses on
disagreement. So this command appends the JSONL ledger directly. Hashing
reuses the `cli/internal/rpi/ledger.go` discipline: `payload_hash =
sha256(canonical payload)`, `hash = sha256(payload_hash + "\n" +
prev_hash)`, genesis `prev_hash=""`.
## Behavior
- `ao provenance add <from-id> <to-id> --relation ... [--from-type
--to-type --trust-tier --evidence --ts --json]` — seals + appends one
schema-valid edge. **Idempotent** on edge identity
(endpoints+relation+evidence+trust-tier), so a re-run with a different
timestamp is a no-op.
- `ao provenance list [--json --from-id --relation]` — reads edges back
in chain order.
## Tests (TDD, table-driven, exact-value asserts)
- `edge_test.go`: field/enum validation, deterministic hash chain,
schema-version forcing, tamper + chain-link detection, identity
stability, JSON field-name parity with the v1 schema.
- `store_test.go`: append→read round-trip + persisted-chain verify,
idempotency, reject-invalid-before-write (no file created), corrupt-line
rejection, and **validation of emitted edges against the merged schema
via `scripts/validate-provenance-ledger.sh`**.
- `provenance_add_test.go`: add produces a schema-valid sealed edge +
list reads it back, idempotent no-op, invalid-relation error, list
filters.
## Gates
- `cd cli && go build ./... && go vet ./... && go test ./...` — all
green (11949 pass).
- Command-surface bumped: regenerated `cli/docs/COMMANDS.md`, updated
`cli-command-surface-smoke.sh` + `cli-command-surface-matrix.json` (top
73→74, sub 183→185, all 256→259), added `provenance` to cobra
expectedCmds; `validate-cli-skills-map.sh` PASS.
Closes-scenario: ag-x31t.4#provenance-write-model
Bounded-context: BC4-Factory
Evidence: cli/cmd/ao/provenance_add.go
2026-05-31 13:02:55 -04:00
### `ao provenance`
Append-only write model for the SDLC provenance/intent graph
```
ao provenance [command]
```
**Subcommands: **
#### `ao provenance add`
Append one schema-valid, hash-chained provenance edge linking a source
```
ao provenance add <from-id> <to-id> [flags]
```
**Flags: **
```
--evidence string Optional evidence pointer (path, commit, CI run URL, event id)
--from-type string Source node type (decision|artifact|bead|...) (default "decision")
-h, --help help for add
--json Emit the sealed edge as JSON
--relation string Typed relation (required), e.g. decision_produces_artifact
--to-type string Target node type (decision|artifact|bead|...) (default "artifact")
--trust-tier string Trust tier (authored|inferred|mined) (default "authored")
--ts string Override the UTC RFC3339 timestamp (defaults to now)
```
feat(provenance): ao provenance export deterministic hash-chained (ag-x31t.5 #provenance-export) (#651)
## What
Adds `ao provenance export`: a deterministic, hash-chained rendering of
the committed provenance ledger (`docs/provenance/ledger.jsonl`).
- Reads the ledger, **canonically sorts** edges by `(ts, from_id, to_id,
relation)` (with type/trust/evidence tie-breakers for a total order),
then **re-seals** them into a fresh per-record hash chain.
- Output is **byte-identical on re-run** regardless of the ledger's
physical append order. Default = JSONL (one compact edge per line);
`--json` = indented array; `--verify` = one-line OK summary, no varying
body.
- The re-chained export **verifies with no Dolt server** — the committed
JSONL is the audit authority, and re-chaining uses only the in-process
hashing in `cli/internal/provenancegraph` (same `prev_hash` discipline
as the rpi ledger). No reinvented Edge/hash logic: new
`CanonicalSort`/`ReChain` helpers reuse `Seal`/`VerifyChain`.
## Tests (TDD-first)
- `chain_test.go`: canonical-sort ordering + stability + non-mutation,
order-independent re-chain, byte-identical serialization, empty ledger,
invalid-edge rejection, tamper detection.
- `provenance_export_test.go`: deterministic bytes across runs, chain
verifies, empty ledger (`[]` not `null`), `--verify` summary,
tampered-ledger rejection.
## Derived surfaces regenerated
- `cli/docs/COMMANDS.md` (cobra conformance)
- `evals/agentops-core/fixtures/cli-command-surface-smoke.sh` +
`cli-command-surface-matrix.json` (sub 185→186, all 259→260)
- `registry.json` unchanged: it counts top-level commands only
(subcommands not tracked; top-level count = 72).
## Gates
`go build` / `go vet` / `go test ./...` green; gosec clean on the new
files; CLI-skills-map, JSON-flag-consistency, and
`generate-cli-reference.sh --check` all pass.
Closes-scenario: ag-x31t.5#provenance-export
Bounded-context: BC4-Factory
Evidence: cli/cmd/ao/provenance_export.go
2026-05-31 13:34:45 -04:00
#### `ao provenance export`
Read docs/provenance/ledger.jsonl, canonically sort its edges by
```
ao provenance export [flags]
```
**Flags: **
```
-h, --help help for export
--json Emit a single indented JSON array instead of JSONL
--verify Verify the re-chained export and print only a one-line summary
```
feat(provenance): provenance_edges write-model + ao provenance add (ag-x31t.4 #provenance-write-model) (#649)
## What
Builds the WRITE side of the SDLC provenance/intent graph (ag-x31t slice
1). Adds `ao provenance add` / `ao provenance list` plus a new
`cli/internal/provenancegraph` package that seals typed, evidence-backed
edges onto the per-record hash-chained ledger at
`docs/provenance/ledger.jsonl`.
Consumes the schema merged in #637
(`schemas/agentops-sdlc-provenance.v1.schema.json`). Does not touch the
schema (.2), export (.5), or gate (.6).
## CQRS doctrine
Per CLAUDE.md and the council architecture, the committed JSONL ledger
is the **audit authority and source of truth**; any Dolt
`provenance_edges` table is a rebuildable projection that loses on
disagreement. So this command appends the JSONL ledger directly. Hashing
reuses the `cli/internal/rpi/ledger.go` discipline: `payload_hash =
sha256(canonical payload)`, `hash = sha256(payload_hash + "\n" +
prev_hash)`, genesis `prev_hash=""`.
## Behavior
- `ao provenance add <from-id> <to-id> --relation ... [--from-type
--to-type --trust-tier --evidence --ts --json]` — seals + appends one
schema-valid edge. **Idempotent** on edge identity
(endpoints+relation+evidence+trust-tier), so a re-run with a different
timestamp is a no-op.
- `ao provenance list [--json --from-id --relation]` — reads edges back
in chain order.
## Tests (TDD, table-driven, exact-value asserts)
- `edge_test.go`: field/enum validation, deterministic hash chain,
schema-version forcing, tamper + chain-link detection, identity
stability, JSON field-name parity with the v1 schema.
- `store_test.go`: append→read round-trip + persisted-chain verify,
idempotency, reject-invalid-before-write (no file created), corrupt-line
rejection, and **validation of emitted edges against the merged schema
via `scripts/validate-provenance-ledger.sh`**.
- `provenance_add_test.go`: add produces a schema-valid sealed edge +
list reads it back, idempotent no-op, invalid-relation error, list
filters.
## Gates
- `cd cli && go build ./... && go vet ./... && go test ./...` — all
green (11949 pass).
- Command-surface bumped: regenerated `cli/docs/COMMANDS.md`, updated
`cli-command-surface-smoke.sh` + `cli-command-surface-matrix.json` (top
73→74, sub 183→185, all 256→259), added `provenance` to cobra
expectedCmds; `validate-cli-skills-map.sh` PASS.
Closes-scenario: ag-x31t.4#provenance-write-model
Bounded-context: BC4-Factory
Evidence: cli/cmd/ao/provenance_add.go
2026-05-31 13:02:55 -04:00
#### `ao provenance list`
Read the provenance edges recorded in docs/provenance/ledger.jsonl, in
```
ao provenance list [flags]
```
**Flags: **
```
--from-id string Filter to edges whose from_id matches
-h, --help help for list
--json Emit machine-readable JSON
--relation string Filter to edges with this relation
```
---
2026-05-04 21:43:07 -04:00
### `ao registry`
Query the unified registry
```
ao registry [command]
```
**Subcommands: **
#### `ao registry list`
List registry entries
```
ao registry list [flags]
```
**Flags: **
```
-h, --help help for list
--type string Filter by surface type (skills, hooks, stores, jobs, evals, cli, cadence)
```
---
2026-04-25 16:52:21 -04:00
### `ao scenario`
Create, list, and validate holdout scenarios stored in .agents/holdout/.
```
ao scenario [command]
```
**Subcommands: **
2026-04-24 22:53:53 -04:00
#### `ao scenario add`
Author a schema-compliant holdout scenario in .agents/holdout/.
```
ao scenario add <goal> [flags]
```
**Flags: **
```
--expected-outcome string Expected observable outcome (default: inferred from goal)
-h, --help help for add
--narrative string Narrative description (default: inferred from goal)
--source string Scenario source (human, agent, prod-telemetry) (default "human")
--status string Scenario status (active, draft, retired) (default "draft")
--threshold float Satisfaction threshold in [0,1] (default 0.8)
```
2026-04-25 16:52:21 -04:00
#### `ao scenario init`
Initialize .agents/holdout/ directory for scenario storage
```
ao scenario init [flags]
```
#### `ao scenario list`
List holdout scenarios
```
ao scenario list [flags]
```
**Flags: **
```
-h, --help help for list
--status string Filter by status (active, draft, retired)
```
#### `ao scenario validate`
Validate holdout scenarios against schema
```
ao scenario validate [flags]
```
---
2026-05-01 20:47:41 -04:00
### `ao scope`
Declare which directories are in scope for the current work session.
```
ao scope [command]
```
**Flags: **
```
-h, --help help for scope
--json Emit JSON output
--lock string Override scope-lock path (defaults to $AO_SCOPE_LOCK or .agents/scope.lock)
```
**Subcommands: **
#### `ao scope freeze`
Freeze one or more directories (additive)
```
ao scope freeze <dir> [<dir>...] [flags]
```
#### `ao scope status`
Show current scope-lock state
```
ao scope status [flags]
```
#### `ao scope unfreeze`
Unfreeze one (or all if no arg) directories
```
ao scope unfreeze [<dir>...] [flags]
```
---
### `ao skills`
Tooling for the skills/ source-of-truth and its skills-codex/
```
ao skills [command]
```
**Subcommands: **
#### `ao skills check`
Walk skills/ and skills-codex/, validating each skill's YAML
```
ao skills check [flags]
```
**Flags: **
```
-h, --help help for check
--json Emit machine-readable JSON
--skill string Restrict the audit to a single skill name
--strict Exit non-zero on any finding (CI mode)
```
feat(skills): queryable skill catalog JSON + ao skills (soc-vuu6.4 #skill-catalog-json) (#640)
## What
Slice 2 of the skill-catalog bead (soc-vuu6.4): the **queryable
surface** over the generated `skills/catalog.json`. Slice 1 (the
generator, schema, drift gate, and `catalog.json` itself) landed in PR
#379; this adds the `ao skills` query commands the bead's acceptance
criterion calls for.
- New `cli/internal/skills/catalog.go` — loads `skills/catalog.json` and
a **pure, table-tested** query engine
(`List`/`Consumers`/`Producers`/`Mermaid`). No SKILL.md re-parsing;
reads the committed, CI-synced catalog.
- New `cli/cmd/ao/skills_query.go` — four cobra subcommands:
- `ao skills list [--role --produces --consumes --practice
--user-invocable] [--json]`
- `ao skills consumers <skill> [--json]`
- `ao skills producers <output> [--json]`
- `ao skills graph [--format mermaid]`
- Regenerated `cli/docs/COMMANDS.md`; bumped the cli-command-surface
fixtures (`sub` 179→183, `all` 252→256) for the 4 new subcommands.
## Why
`registry.json` and `catalog.json` existed but had no query API — agents
grepping "which skill produces X?" had to scan markdown. This turns the
catalog into a queryable surface (the bead blocks `ao skill new`, which
needs sibling-skill defaults).
## Acceptance
> `ao skills list ... --json` returns the matching skill set in <100ms.
Verified: `ao skills list --produces result.json --json` → `[beads,
discovery]`; `ao skills consumers rpi` → 5 skills; `ao skills graph`
emits deterministic Mermaid. Latency well under 100ms.
## Scope notes
- Did **not** regenerate `skills/catalog.json` — it carries pre-existing
drift on `main` (the `check-skill-catalog-drift` gate is I0/advisory).
This PR only *consumes* the catalog; regenerating would sweep in
unrelated drift.
- The bead's illustrative `--tier judge` example does not map to the
real generated schema (which has no `tier` field — it uses
`hexagonal_role`, `produces`, `consumes`, `practices`). Filters
implemented against the actual catalog fields.
## Tests
`cli/internal/skills/catalog_test.go` (engine, exact-value table tests +
load round-trip) and `cli/cmd/ao/skills_query_test.go` (JSON shape, sort
invariants, flag validation, mermaid header) — all green. `go build`/`go
vet`/`go test ./...` pass; conformance + command-surface smoke pass.
Closes-scenario: soc-vuu6.4#skill-catalog-json
Bounded-context: BC1-Corpus
Evidence: cli/internal/skills/catalog.go
2026-05-31 12:36:45 -04:00
#### `ao skills consumers`
Print the skills whose consumes[] list includes <skill> — i.e. who
```
ao skills consumers <skill> [flags]
```
**Flags: **
```
-h, --help help for consumers
--json Emit machine-readable JSON
```
feat(cli): ao skills find <intent> skill discovery (ag-a97 #find-ranks) (#563)
## Summary
Turns the 75-skill catalog from oral tradition into a queryable surface.
`ao skills find <intent>` scores every `skills/*/SKILL.md` against a
free-text
intent and returns the top matches (name, one-line description, score) —
so an
agent gets a discovery API instead of memorizing skill names.
- **Scoring engine** (`cli/internal/skills/find.go`) — pure,
deterministic
token-overlap. A query word hitting the skill **name** counts most, a
declared
**trigger** next, a **description** word least, with light plural/stem
tolerance (`loop` ↔ `loops`). Scores normalized to `[0,1]`; ties broken
by
name. No filesystem access, so it is fully table-testable.
- **Loader** (`cli/internal/skills/load.go`) — reads
`skills/*/SKILL.md`, parses
frontmatter (`name`, `description`, best-effort top-level / `metadata`
triggers). No static index file: a newly added skill is found on the
next run.
- **Command** (`cli/cmd/ao/skills_find.go`) — `--json` / `--limit`
(default 5),
stdout-as-data / stderr-as-diagnostics. An unmatched intent **exits 0**
with a
stderr note, not an error. Unknown-flag typo hints inherited from the
root
cobra config; `--limit < 1` returns a usage error naming the fix.
- Regenerated `cli/docs/COMMANDS.md`.
### Notes / corrections
- The bead's premise ("each SKILL.md has a populated `triggers:` array")
is
inaccurate — phase-1 discovery found **0/75** top-level `triggers:`
arrays;
intent lives as prose in `description`, with `metadata.triggers` in ~10
skills.
Scoring therefore treats name+description as the primary signal and
triggers as
an optional boost.
- Bounded context: the slice reads the **skills corpus** (SKILL.md
content), so
`BC1-Corpus` (the plan's draft `BC4-Practice` does not exist — BC4 is
Evidence).
- Deferred to follow-ups: `ao skills list --by-trigger` /
`--list-triggers`
(ag-0r0) and backfilling structured triggers across SKILL.md (ag-piv).
## Test plan
- [x] `cd cli && go test ./internal/skills/... ./cmd/ao` (green)
- [x] `cd cli && go build ./... && go vet ./internal/skills/...
./cmd/ao`
- [x] `scripts/generate-cli-reference.sh` (COMMANDS.md in conformance)
- [x] `bash skills/heal-skill/scripts/heal.sh --strict` (All clean)
- [x] `ao autodev validate --file PROGRAM.md --json` → `valid: true`
- [x] Manual smoke: `ao skills find "close the loop"`, `--json --limit
3`, unmatched intent
Closes-scenario: ag-a97#find-ranks-relevant-skills
Bounded-context: BC1-Corpus
Evidence: cli/internal/skills/find_test.go + go test
./internal/skills/... ./cmd/ao
2026-05-28 00:15:43 -04:00
#### `ao skills find`
Score every skills/<name>/SKILL.md against a free-text intent and
```
ao skills find <intent> [flags]
```
**Flags: **
```
-h, --help help for find
--json Emit machine-readable JSON on stdout
--limit int Maximum number of results to return (default 5)
```
feat(skills): queryable skill catalog JSON + ao skills (soc-vuu6.4 #skill-catalog-json) (#640)
## What
Slice 2 of the skill-catalog bead (soc-vuu6.4): the **queryable
surface** over the generated `skills/catalog.json`. Slice 1 (the
generator, schema, drift gate, and `catalog.json` itself) landed in PR
#379; this adds the `ao skills` query commands the bead's acceptance
criterion calls for.
- New `cli/internal/skills/catalog.go` — loads `skills/catalog.json` and
a **pure, table-tested** query engine
(`List`/`Consumers`/`Producers`/`Mermaid`). No SKILL.md re-parsing;
reads the committed, CI-synced catalog.
- New `cli/cmd/ao/skills_query.go` — four cobra subcommands:
- `ao skills list [--role --produces --consumes --practice
--user-invocable] [--json]`
- `ao skills consumers <skill> [--json]`
- `ao skills producers <output> [--json]`
- `ao skills graph [--format mermaid]`
- Regenerated `cli/docs/COMMANDS.md`; bumped the cli-command-surface
fixtures (`sub` 179→183, `all` 252→256) for the 4 new subcommands.
## Why
`registry.json` and `catalog.json` existed but had no query API — agents
grepping "which skill produces X?" had to scan markdown. This turns the
catalog into a queryable surface (the bead blocks `ao skill new`, which
needs sibling-skill defaults).
## Acceptance
> `ao skills list ... --json` returns the matching skill set in <100ms.
Verified: `ao skills list --produces result.json --json` → `[beads,
discovery]`; `ao skills consumers rpi` → 5 skills; `ao skills graph`
emits deterministic Mermaid. Latency well under 100ms.
## Scope notes
- Did **not** regenerate `skills/catalog.json` — it carries pre-existing
drift on `main` (the `check-skill-catalog-drift` gate is I0/advisory).
This PR only *consumes* the catalog; regenerating would sweep in
unrelated drift.
- The bead's illustrative `--tier judge` example does not map to the
real generated schema (which has no `tier` field — it uses
`hexagonal_role`, `produces`, `consumes`, `practices`). Filters
implemented against the actual catalog fields.
## Tests
`cli/internal/skills/catalog_test.go` (engine, exact-value table tests +
load round-trip) and `cli/cmd/ao/skills_query_test.go` (JSON shape, sort
invariants, flag validation, mermaid header) — all green. `go build`/`go
vet`/`go test ./...` pass; conformance + command-surface smoke pass.
Closes-scenario: soc-vuu6.4#skill-catalog-json
Bounded-context: BC1-Corpus
Evidence: cli/internal/skills/catalog.go
2026-05-31 12:36:45 -04:00
#### `ao skills graph`
Render the skill dependency graph (A --> B means A consumes B) from
```
ao skills graph [flags]
```
**Flags: **
```
--format string Graph output format (mermaid) (default "mermaid")
-h, --help help for graph
```
#### `ao skills list`
Filter the generated skill catalog by hexagonal role, produced or
```
ao skills list [flags]
```
**Flags: **
```
--consumes string Filter to skills that consume this port/sibling
-h, --help help for list
--json Emit machine-readable JSON
--practice string Filter to skills that apply this practice
--produces string Filter to skills that produce this port/artifact
--role string Filter by hexagonal_role (domain, driving-adapter, ...)
--user-invocable string Filter by user-invocability (true|false)
```
#### `ao skills producers`
Print the skills whose produces[] list includes <output> — i.e. who
```
ao skills producers <output> [flags]
```
**Flags: **
```
-h, --help help for producers
--json Emit machine-readable JSON
```
2026-05-01 20:47:41 -04:00
---