## What
Round-3 Gas City doctrine sweep — **skills/ slice** (**ag-r6g1**). Five
skill surfaces still framed Gas City as THE live out-of-session
substrate; re-narrated to **NTM + MCP + managed-agents** per
[`docs/3.0.md`](docs/3.0.md).
## Surfaces (5 source + 6 regenerated derived, +20 −20)
- `skills/compile/SKILL.md` + `skills-codex/compile` twin — "run it on
Gas City" → the out-of-session substrate (NTM + MCP + managed-agents).
- `skills/discovery/references/best-practices.md` +
`skills/validation/references/best-practices.md` — magic-compounding
anti-pattern row's "Gas City for out-of-session" → "the out-of-session
substrate: NTM + MCP + managed-agents".
- `skills/swarm/references/shared-checkout-discipline.md` — "`ao evolve`
via Gas City" → "`ao evolve` on the substrate".
- Regenerated: `registry.json` + codex `.agentops-generated.json`
hashes/manifest for the 4 edited skills.
## Scope
Triaged each ref — only **present-tense live-substrate** framing was
changed; already-correct historical/reference mentions were left alone.
**ag-r6g1 stays OPEN**: the docs/ narrative slice (~30 refs) is deferred
to a later tick. `docs/cli-surface.*` drift excluded (pre-existing,
unrelated to this change).
## Verification (full gate, pre-push)
- `generate-registry.sh --check` OK · codex parity audit passed ·
`regen-all.sh --check` ALL GREEN · markdownlint 0 errors ·
skill-isolation/size clean.
Closes-scenario: ag-r6g1#skills-slice
Bounded-context: BC1-Corpus
Evidence: skills/compile/SKILL.md
## What
Adds the concrete **blind sub-agent judge** spawn mechanism in `/vibe`
and `/validation`, building on ag-lmdx.4 (#658) which added the
author!=validator refusal contract + `ao turn verify --allow-self`.
Per operator mechanism (Bo 2026-05-30): validation MAY run in the
authoring session, but the JUDGE must be a fresh-context sub-agent
acting as if it has no authoring context. lmdx.4 supplied the
invariant/refusal + the CLI guard; this bead supplies the actual spawn
instruction.
## Changes
- **`skills/vibe/SKILL.md` Step 4.5** — adds the MANDATORY blind
sub-agent judge spawn: when validating in the authoring session, spawn
the acceptance judge via Agent/Task tool, hand it ONLY the diff/artifact
+ acceptance scenarios + verdict contract (never the authoring
conversation), use its verdict, record `judge_id` != `author_id`. Keeps
lmdx.4's refusal + `--allow-self` escape + `ao turn verify` enforcement.
- **`skills/validation/SKILL.md`** — new "Blind Sub-Agent Judge" section
+ **`references/dag.md` STEP 1** guard that refuses to certify
acceptance (`<promise>DONE</promise>`) when `judge_id == author_id`.
- **`vibe.feature` + `validation.feature`** — testable scenarios
matching the bead acceptance (self-validation still gets an independent
judge; missing blind judge is refused).
- **Codex twins** mirrored verbatim (no symlinks); manifest hashes
spliced to vibe+validation only (8 pre-existing codex drifts left
untouched).
## Gates
- `tests/skills/run-all.sh`: PASS (87/0/0)
- `scripts/audit-codex-parity.sh --skill {vibe,validation}`: PASS
- `scripts/check-codex-parity-drift.sh`: PASS
- `scripts/validate-codex-generated-manifest.sh`: OK (81 skills)
- `scripts/check-scenario-test-linkage.sh`: PASS (both .feature files
allowlisted doc-only)
- No Go touched.
Closes-scenario: ag-9jle.5#blind-judge
Bounded-context: BC2-Validation
Evidence: skills/vibe/SKILL.md
PR #490's SELF-TEST.md additions left the codex source_hash drifted for
plan/research/validation (hash_tree is over the whole skill dir; CI
checks --scope head so it merged green). `regen-codex-hashes.sh` → "All
hashes up to date". Scoped diff (3 generated.json + manifest).
NOTE: claude-review infra-red (weekly limit) — operator-authorized
bypass when sole red.
Closes-scenario: soc-uz3x2#regen-codex-hashes
Bounded-context: BC1-Corpus
Evidence: skills-codex/.agentops-manifest.json
#275's billboard refactor thinned process-skill SKILL.md files and moved
detail into references/, but the validate contracts still grepped SKILL.md.
skill-lint + smoke-test: relax content-presence checks in crank/implement/
post-mortem/swarm validate.sh to scan the skill as a unit (SKILL.md +
references/); structural/identity checks stay SKILL.md-only. test-first-smoke
updated to match relocated SPEC/TEST WAVE + Step 0/4 headings.
skill-lint line caps: trim flywheel 310 -> 286 (cap 300), using-agentops
261 -> 239 (cap 250) by removing redundant prose, no content lost.
skill-integrity: link 3 orphaned references (crank/branch-isolation,
validation/flags + release-readiness-gates).
codex parity: regenerate stale skills-codex source hashes (77 skills).
Local: run-all.sh PASS, heal.sh --strict clean, smoke-test PASS.
The v2.41.0 release commit (eb119f48) shipped with three CI checks
already red — they were `skipped` in the intervening push (path filter
didn't trigger them), so the release validation missed them.
registry-check — registry.json was stale. The v2.41 BC arc added 10
new `ao` subcommands (cycles 144-153) without regenerating the
registry. Ran scripts/generate-registry.sh: 158 CLI commands,
77 skills, 46 hooks now recorded.
skill-integrity — `references/flags.md not linked in SKILL.md`. The
cycle-d59c0d60 size-fix extracted the flags table to references/flags.md
but linked it with a backtick code-span (`` `references/flags.md` ``)
instead of a markdown link. heal.sh --strict requires a real link or a
Read instruction. Changed to `[references/flags.md](references/flags.md)`.
contract-canaries (two suites):
- cli-command-surface-matrix: the heading-count baseline was stale
(top=64 sub=159 all=223) — the v2.41 arc grew the surface to
top=70 sub=173 all=243. Updated both the eval expectation and the
fixture script's hardcoded guard.
- distribution-install-update: the codex-native install canary flags
`/skillname` slash-command references in skills-codex/**/SKILL.md
(Codex uses `$skillname` notation). The mandatory-release-gates
commit (176d45a4) copied `/release` and `/evolve` verbatim from the
source skills into skills-codex/evolve + validation. Converted all
7 refs to `$release` / `$evolve`.
Codex hashes regenerated for evolve + validation.
Verified locally: heal.sh --strict clean; cli-command-surface-smoke.sh
passes; test-codex-native-install.sh "PASS: Codex-native install flow
verified (77 skills)"; generate-registry.sh diff committed.
The prior commit (176d45a4) added the STEP 1.7.5 Release-Readiness Gates
block inline in skills/validation/SKILL.md, pushing it from 249 lines
(at the tier=meta 250-line skill-lint hard cap) to 304 lines — caught
by ci-local-release.sh's skill-lint check this same session.
Extract two blocks to references:
- skills/validation/references/release-readiness-gates.md (new) —
full STEP 1.7.5 procedure: IS_RELEASE_CONTEXT detection, the three
gates (full pre-push, ci-local-release.sh, generate-cli-reference.sh
with cleanliness check), phase-summary recording, skip suppression,
rationale.
- skills/validation/references/flags.md (new) — full flag table that
previously inlined in the skill body.
Also dedupe two stray duplicate flag rows from the earlier edit
sequence.
Result: skills/validation/SKILL.md back to 248 lines (≤250 limit).
Skill-lint: ✓ validation (tier=meta, 248 lines).
Codex parity hash refreshed.
Operator caught a real failure mode in the v2.41-evolve-run validation:
/vibe and /post-mortem both returned PASS, and the validation skill
recommended /release 2.41.0, despite three load-bearing gates never
having run:
- scripts/pre-push-gate.sh (full, not --fast)
- scripts/ci-local-release.sh
- scripts/generate-cli-reference.sh (the branch removed a CLI flag)
Fix: make the gates mechanical, not advisory.
skills/validation/SKILL.md
Adds STEP 1.7.5 "Release-Readiness Gates" — MANDATORY when
IS_RELEASE_CONTEXT=1 (auto-detected from branch name pattern
release/*, v*-prep, v*-evolve-run, v\d+\.\d+*; or --release-context
flag; or CLI/skills/hooks/contracts changes with release intent).
Failure to run any gate emits FAIL. Validation MUST NOT recommend
/release until all three pass (or are N/A). Adds --release-context
and --skip-release-gates flags. Adds the new failure mode to the
blocking-FAIL list in Gate Detail.
skills/evolve/SKILL.md (Teardown)
Adds release-context teardown checklist. When the loop runs on a
release-shaped branch, teardown MUST emit the explicit pre-release
checklist (regen CLI docs, full pre-push, ci-local-release.sh,
optional /evolve smoke) instead of recommending /release. The
handoff artifact (READY-TO-TAG.md) carries the checklist verbatim
unchecked; "ready to tag" means the boxes are checked, not that
cycles were green.
skills/validation/references/four-surface-closure.md
Documentation surface now requires regenerated cli/docs/COMMANDS.md
when the diff modifies cobra.Command{ or .Flags() in cli/cmd/.
Detection script + FAIL on stale-after-regen.
skills/post-mortem/references/closure-integrity-audit.md
Adds Check 5 "Acceptance-Text vs Delivered Drift" — for each closed
child, parses the bead's Acceptance: section, extracts named gates
(check-*.sh, pre-push-gate, ci-local-release), and WARNs when the
close-note does not confirm the named gate ran green. Also flags OR
alternatives in acceptance where the close-note doesn't state which
branch was chosen. WARN-level (wording variance is expected).
Origin: cycle 182 of v2.41-evolve-run, where soc-w6vh.4 acceptance
named check-worktree-disposition as pass requirement but was closed
on an operator-action basis (gate still fails on broader fleet state).
Codex parity:
skills-codex/validation/SKILL.md — STEP 1.7.5 mirrored
skills-codex/validation/references/four-surface-closure.md — CLI check mirrored
skills-codex/evolve/SKILL.md — release teardown checklist mirrored
skills-codex/post-mortem/references/closure-integrity-audit.md — Check 5 mirrored
regen-codex-hashes.sh refreshed manifest + 3 generated.json files
Source: operator feedback after v2.41-evolve-run validation overstated
release-readiness. Validates: scripts/pre-push-gate.sh --fast green.
Pass 1 of N: lands practices: frontmatter declarations on the
RPI-lifecycle and foundational skills (rpi, discovery, crank, validation,
plan, implement, vibe, pr-prep, pr-validate, post-mortem, domain,
flywheel, handoff), each citing 3-4 slugs from PRACTICE.md's 45-slug
registry.
scripts/validate-practice-citations.sh report now:
primitives scanned: 754
with practices field: 13 (was 0)
missing practices field: 741 (was 754)
invalid slug citations: 0
Schema fix in same commit (required infrastructure that was missed in
the pre-mortem audit): schemas/skill-frontmatter.v1.schema.json had
additionalProperties: false, which would have rejected every practices:
declaration via validate-manifests.sh. Added practices as a recognized
array-of-slug property; this unblocks all future backfill passes.
Codex twins intentionally NOT modified — skills-codex/* SKILL.md
frontmatter is strictly name+description by design (enforced by
scripts/validate-codex-generated-artifacts.sh). Skills-codex
.agentops-generated.json markers regenerated via regen-codex-hashes.sh
to record the source-side content drift.
Plan: .agents/plans/2026-05-10-practice-citation-backfill-rpi-core.md
Research: .agents/research/2026-05-10-practice-citation-backfill-mapping.md
Pre-mortem: .agents/council/2026-05-10-pre-mortem-practice-citation-backfill.md (PASS, with one gap noted: schema enforcement)
Bead epic: soc-hdot (14 child issues closed)
Local pre-push gate (fast): green.
* feat(rpi): executionPacket criterion contract foundation (UW0 of soc-bcrn)
Extend executionPacket with EpicCriteria []rpi.Criterion and
BeadCriteria map[string][]rpi.Criterion, backed by a new exported
rpi.Criterion type. Add JSON schema (draft 2020-12) covering envelope +
criterion shape; if/then enforces agent_judge when check_type ==
custom_rubric (pre-mortem advisory fix#1).
DoneCriteria preserved verbatim for v1 back-compat. New round-trip tests
cover criteria-populated, v1-no-criteria, custom-rubric, and omitempty
cases.
Lands soc-bcrn.1.1 (E1.1). go test ./... → 11911 passed in 50 packages.
* feat(skills): acceptance_criteria contract across discovery/plan/crank/validation (UW1 of soc-bcrn)
Wire the per-criterion contract through the lifecycle skills (text-only;
no code changes). Skill text now references the JSON schema landed in
UW0 (schemas/execution-packet.schema.json) as canonical.
soc-bcrn.1.2 — discovery/plan emit acceptance_criteria fences:
- skills/discovery/SKILL.md STEP 4 + STEP 6 amendments
- skills/discovery/references/output-templates.md links the schema
- skills/plan/SKILL.md issue-decomposition step requires the block
soc-bcrn.1.3 — crank pre-spawn read + per-criterion checkpoint:
- Step 4 instructs orchestrator to inject metadata.validation.acceptance_criteria
- Step 5.7 checkpoint format adds criterion_verdicts[]
soc-bcrn.1.4 (E1.4+E1.5 merged on shared file) — validation:
- Per-criterion verdict table replaces vibe-only
- Back-compat WARN until 2026-06-30, then FAIL (pre-mortem fix#2)
- New skills/validation/references/per-criterion-rubric.md
go test ./... → 11833 passed in 50 packages.
* fix(skills): correct check_type terminology in crank acceptance-criteria injection
Worker B's UW1 amendment hallucinated `kind (test|structure|content|command|lint)`
as the criterion field/enum. Actual schema uses `check_type` with enum
`test_pass | command_exit_zero | file_exists | grep_match | manual |
council_judge | custom_rubric`, plus the conditional `agent_judge` field
for `custom_rubric`. Replace with the verbatim shape from
schemas/execution-packet.schema.json $defs/Criterion.
Caught by self-review of 81d729fc.
* feat(rpi,skills): isolation contract + lint + addSignalWithEvidence (UW2 of soc-bcrn)
soc-bcrn.2.1 (E2.1+E2.3 merged):
- skills/rpi/references/isolation-contract.md (NEW): codifies PRODUCT.md
operational principle #5 with declaration-vs-enforcement framing,
four-lever table (text / hook / daemon / combination — recommends D),
compression patterns + false-positive guard.
- scripts/check-skill-isolation.sh (NEW, executable): bash lint that
greps phase-skill SKILL.md for compression patterns. Runs clean on
current tree; injection-regression test passes (rc=1 on 'I will
research' violation).
soc-bcrn.3.3 (E3.S2):
- session_outcome.go: addSignalWithEvidence(regex, evidence, weight)
override path; tests_pass now credited via either regex or evidence.
- internal/rpi/artifacts.go: LaneResult + ParseValidationLanesResults
(forward-compat — accepts {passed:bool}, {status:"PASS"}, {result:"PASSED"};
empty slice when packet field absent).
- rpi_evaluator.go: collectPhaseSessionOutcome reads packet
validation_lanes_results and threads any-PASS reduce to evidence path.
- session_outcome_test.go: 3 new tests cover override, both-false, regex-alone.
UW2 verify-only beads (closed without code):
- soc-bcrn.3.1 (E3.S1): captureCreatedEpicID already merged at
rpi_phased_discovery.go:43, primary callsite rpi_phased_gates.go:83.
- soc-bcrn.3.2 (E3.S3): preserveWorktreeCommits already merged at
rpi_cleanup.go:399, called BEFORE git worktree remove --force.
go test ./... → 11833 passed in 50 packages.
* feat(skills,scripts): isolation-contract cross-links + RPI surface smoke (UW3 of soc-bcrn)
soc-bcrn.2.2 (E2.2): Cross-link skills/{rpi,discovery,crank,validation}/SKILL.md
to the isolation contract reference doc landed in UW2. Each link uses
the lint-allowed `See [...](path)` form. lint runs clean.
soc-bcrn.3.4 (E3.S4): scripts/test-rpi-surface-smoke.sh (NEW, executable).
Static-surface smoke covering 6 checks: bin presence, schema validity,
skill-isolation lint, dangling commits (informational), bd workspace,
schema-criterion-fields. Returns PASS/FAIL summary.
Path-collision recovery: bead body said scripts/test-evolve-cycle-smoke.sh,
but that path was already taken by PR #241 (end-to-end cycle smoke wired
into pre-push-gate's --smoke-evolve flag). Restored the original; renamed
this new static-surface smoke to scripts/test-rpi-surface-smoke.sh. The
two scripts have distinct purposes (cycle E2E vs static surface) and
should coexist.
go test ./... → 11832 passed in 50 packages.
* docs(rpi): rollback discipline note in phase-data-contracts.md (UW4 of soc-bcrn)
soc-bcrn.3.5 (E3.W3): document phase-3-first / phase-2-second rollback
discipline. Re-routed from the plan's `program-templates/phase-{2,3}.md`
path (which doesn't exist in the repo) to the existing phase-data-contracts.md
ref doc.
Pre-mortem F3 of soc-bcrn flagged this as the primary rollback risk for
E3 (consolidated daemon epic). E3.S3 (already merged) is the worked
example: preserveWorktreeCommits (phase-3 logic) shipped BEFORE the
phase-2 cleanup-removal.
soc-bcrn.2.3 (E2.4 verify): closed without code change — isolation-contract.md
already has 3 forward-references to rpi_run.go from UW2.
go test ./... → 11834 passed in 50 packages.
* feat(daemon): RPIRunExecutor in-process runner replaces CLI-fallback shell-out (UW5/5a of soc-bcrn)
soc-bcrn.3.6 (E3.W4 sub-wave 5a, additive):
- NEW cli/internal/daemon/rpi_run.go: RPIRunExecutor with function-pointer
pattern (RPIRunFunc). Mirrors DreamExecutor structure. Validates
full-cycle specs (start_phase=1, max_phase=3) and emits artifacts
tagged executor_policy=in-process / backend=in-process.
- NEW cli/internal/daemon/rpi_run_test.go: 5 tests (runs-via-func,
rejects-wrong-jobtype, propagates-runner-error, validate-full-run,
requires-fields).
- agentopsd.go: buildAgentOpsDaemonCLIFallbackRPIExecutor now wires
RPIRunExecutor with defaultCLIFallbackRPIRunFunc that calls
runPhasedEngine in-process. New CLIFallbackRPIRunFunc option lets
tests inject fakes. buildPhasedEngineOptionsFromSpec maps obvious
fields (RunID, TestFirst, ExecutionPacketPath→DiscoveryArtifact,
PhaseTimeout); other phasedEngineOptions fields use defaults.
- agentopsd_test.go: TestAgentOpsDaemonCLIFallbackExecutorPolicyCompletesRPIRunJob
rewritten to inject a fake RPIRunFunc instead of writing fake shell
scripts. Asserts executor_policy=in-process, backend=in-process,
rpi_run_status=completed.
ADDITIVE only — RPICLIExecutor and scripts/ao-rpi-autonomous-cycle.sh
preserved for nightly-evolution.sh until sub-waves 5b/5c migrate them.
RPICLIExecutor has zero production callers after this change (only its
own test file references the type).
go test ./... → 11832 passed in 50 packages.
* fix(daemon): RPIRunExecutor wraps supervisor (gates+landing+cycles) (UW5/5a-fix of soc-bcrn)
soc-bcrn.3.8 — fix the regression sub-wave 5a introduced.
Sub-wave 5a's defaultCLIFallbackRPIRunFunc called runPhasedEngine alone,
silently losing the gate/landing/cycle semantics of the old shell wrapper
that ran ao rpi loop --supervisor. Daemon-submitted rpi.run jobs would
have skipped landing-policy enforcement.
Changes:
- RPIRunJobSpec gains 7 supervisor policy fields (all omitempty for
back-compat): MaxCycles, GatePolicy, LandingPolicy, LandingBranch,
BDSyncPolicy, FailurePolicy, KillSwitchPath.
- agentopsd.go:defaultCLIFallbackRPIRunFunc now calls executeLoopCyclesCtx
(thin context-aware wrapper around executeLoopCycles) — full supervisor
loop with gates + landing + cycle management.
- New buildSupervisorConfigFromSpec(spec, root) helper translates spec
policy fields into rpiLoopSupervisorConfig, then validates via the
supervisor's own validateLoopConfigPolicies.
- Lease disabled in daemon path (cfg.LeaseEnabled=false) — daemon already
owns queue-level claim; lease would deadlock.
- Deleted dead helper buildPhasedEngineOptionsFromSpec.
- 5 new tests: spec round-trip with policy fields, defaults-empty
back-compat, spec→cfg mapping (3 cases incl. invalid-enum rejection).
Forward-compat caveats noted in worker discoveries (NOT fully wired):
- MaxCycles in spec is read but rpiLoopSupervisorConfig has no MaxCycles
field; cycle count comes from the cobra-bound rpiMaxCycles global.
Daemon path runs one cycle (matches nightly script default).
- RunID, ExecutionPacketPath, TestFirst, PhaseTimeout in spec are not
yet projected onto the cfg.
go test ./... → 11835 passed in 50 packages.
* feat(scripts,docs): nightly-evolution + 3 docs migrate to ao daemon submit (UW5/5b of soc-bcrn)
soc-bcrn.3.7 (E3.W4 sub-wave 5b):
scripts/nightly-evolution.sh — replace shell wrapper invocation
(`scripts/ao-rpi-autonomous-cycle.sh`) with `ao daemon jobs submit
--type=rpi.run` + `ao daemon jobs wait`. Liveness-probe via `ao daemon
jobs list --json` before submit. Payload now carries supervisor policy
fields (max_cycles, gate_policy, landing_policy, optional landing_branch)
via the spec extension landed in 5a-fix; daemon executor runs the full
supervisor loop (cycles + gates + landing).
docs/contracts/agentops-daemon.md, docs/runbooks/daemon-factory-admission.md,
docs/contracts/factory-admission.md — replace stale references to
`scripts/ao-rpi-autonomous-cycle.sh` with the new in-process path
(RPIRunExecutor, cli/internal/daemon/rpi_run.go).
scripts/ao-rpi-autonomous-cycle.sh and cli/internal/daemon/rpi_cli_executor.go
remain in-tree pending sub-wave 5c (deletion).
go test ./... → 11835 passed in 50 packages.
bash -n scripts/nightly-evolution.sh → clean.
* chore(daemon): delete RPICLIExecutor + ao-rpi-autonomous-cycle.sh shell wrapper (UW5/5c of soc-bcrn)
soc-bcrn.3 final E3.W4 cleanup. After sub-waves 5a (RPIRunExecutor),
5a-fix (supervisor wrapping + policy fields), and 5b (nightly migration
to ao daemon submit), all production callers of these surfaces have been
retired. Deleting:
- cli/internal/daemon/rpi_cli_executor.go (5.6KB) — old shell-shelling executor
- cli/internal/daemon/rpi_cli_executor_test.go (6.6KB)
- scripts/ao-rpi-autonomous-cycle.sh (4.7KB) — legacy shell wrapper
Final consumer audit: zero non-comment references to RPICLIExecutor or
NewRPICLIExecutor remain. The new in-process path
(cli/internal/daemon/rpi_run.go → executeLoopCyclesCtx) carries the same
gate + landing semantics via supervisor wrapping.
go test ./... → 11833 passed in 50 packages (down from 11835 — the 2
diff is from the deleted RPICLIExecutor's own tests).
go build ./... + go vet ./... → clean.
UW5 (E3.W4 / M3.5 daemon executor swap) complete.
* docs(skills): best-practices citation table + 4 SKILL.md cross-links (UW6 of soc-bcrn)
soc-bcrn.4 (E4 — Best-practices encoding):
E4.1: NEW skills/rpi/references/best-practices.md. Table A (14 lifecycle
principles) + Table B (6 anti-patterns) extracted verbatim from
.agents/research/2026-05-07-rpi-lifecycle-sharpening.md §Objective 4.
Each row carries a source citation and which skills should encode it.
The doc explicitly says lifecycle skills MUST cite by # — never duplicate
the body.
E4.2: skills/{rpi,discovery,crank,validation}/SKILL.md — one-line
cross-link added next to the existing isolation-contract.md citation.
Each link uses the lint-allowed `See [...](path)` form. lint runs clean.
Mechanical-enforcement section in best-practices.md cross-references
prior soc-bcrn waves (UW0 schema $defs/Criterion, UW1 per-criterion-rubric,
UW2 check-skill-isolation lint).
go test ./... → 11832 passed in 50 packages.
* feat(daemon,schema): agent-update protocol surface (UW7-1 of soc-y0ct)
soc-y0ct.1 — protocol surface (schema + event types + payload structs).
Defers ac-aup.3 (rpi_run.go emission) to a follow-up bead since it
requires careful integration with the supervisor's existing event flow.
- schemas/agent-update.schema.json (NEW): draft 2020-12 envelope
{agent_update_version, event_type, payload}; 4 $defs (phase_start,
phase_complete, criterion_verdict, phase_handoff) with allOf+if/then
for type-tagged payload dispatch (mirrors UW0 Criterion's custom_rubric
pattern).
- cli/internal/daemon/types.go: 4 new EventType constants registered in
the const block AND eventTypeSet (required for ValidateEventType).
- cli/internal/daemon/agent_update.go (NEW): AgentUpdateVersion=1, 4
payload structs, 4 NewAgentUpdate*Event constructors that stamp the
version, default empty timestamps, emit only-non-zero optional fields.
Constructors deliberately leave EventID/RequestID/JobID/Actor unset —
emission caller populates those.
- cli/internal/daemon/agent_update_test.go (NEW): 7 test functions
covering const + ValidateEventType registration, 4 payload round-trips,
version stamping, and timestamp default.
Status enums per spec: phase_complete uses lowercase (success|failure|
timeout) matching JobResultStatus; criterion_verdict uses uppercase
(PASS|FAIL|SKIP) matching the verdict vocabulary in
schemas/verdict.v1.schema.json.
go test ./... → 11842 passed in 50 packages (up from 11833 — the +9 is
the new tests under ./internal/daemon/).
* feat(tests,docs): wave 0 operator canary + software-factory drift stopgap (soc-kizn.11)
Adds tests/e2e/factory-operator-canary.sh: narrow L1/L2 smoke that prints the
five operator-surface anchors (briefing, next delivery, validation, evidence,
closeout) and reports each as resolved-path or explicit-unavailable. Does not
claim factory yield, autonomous merge, or L3 proof.
Reframes the Codex section of docs/software-factory.md so the canonical
hookless route is `agentopsd` (`ao daemon submit ...`), and `ao codex *` is
documented only as deprecated legacy fallback. Strips routine `ao codex *`
recommendations from the Surface Map. Validation now passes:
`rg 'ao codex (start|stop)|ao codex ensure-(start|stop)' docs/software-factory.md
| rg -v 'hookless|compat|legacy|fallback|deprecated'` returns empty.
Full Codex skill/runtime parity cleanup remains tracked in soc-kizn.8.
* docs(skills): move forge Examples to references/ to fit 248-line CI limit (soc-pul8)
skills/forge/SKILL.md was 260 lines after the soc-yjzp.3 cross-vendor analog
edit, over the 248-line skill-lint ceiling. Moves the two Examples walkthroughs
(SessionEnd hook invocation + manual transcript mining) to
skills/forge/references/examples.md, replacing the section body with a link.
Now 237 lines. heal.sh --strict clean (new references file is linked).
hooks/skill-lint-gate.sh exits 0. Codex parity audit passes.
* fix(skills): copy rpi references into crank/discovery/validation, fix dead-ref gate
UW3 (e74b2ff0) and UW6 (2272510e) cross-linked from skills/{crank,discovery,
validation}/SKILL.md to ../rpi/references/{isolation-contract,best-practices}.md.
heal.sh's DEAD_REF check only resolves local references/ and ../shared/references/
paths, so it flagged the cross-skill links as dead — blocking pre-push.
Per CLAUDE.md "no symlinks; copy instead", copies both files into each affected
skill's own references/ dir and rewrites the SKILL.md links to local paths.
skills/validation/SKILL.md additionally compresses Setup+Gate sections, drops
the Per-criterion-verdicts example table from Phase Summary code fence, and
inlines the back-compat fallback to fit the 248-line skill-lint ceiling
(was 274, now 247).
Verified: heal.sh --strict clean across all skills; skill-lint-gate exit 0;
codex parity audit passes for crank, discovery, validation.
* chore(codex,registry): refresh codex artifacts + registry.json after skill ref edits
Auto-regenerated by `scripts/refresh-codex-artifacts.sh --scope upstream` after
the dead-ref fix touched skills/{crank,discovery,validation}/SKILL.md and
skills/forge/SKILL.md (cycle 5 close). Updates .agentops-generated.json
hashes for 7 skills + manifest + rolls registry.json reference_count for forge
(1 -> 2 after examples.md split) and knowledge_stores count refresh.
No source-code changes; this is the metadata catch-up the pre-push
codex-artifact-metadata gate flagged.
* fix(tests): nightly-evolution bats — mock daemon wait/list, assert payload not log
soc-bcrn UW5/5b migrated nightly-evolution.sh from shelling
ao-rpi-autonomous-cycle.sh to `ao daemon jobs submit` + `wait`. Two bats
tests still asserted the old shell-wrapper behavior:
- Mock `ao` only handled `daemon jobs submit`. Add handlers for
`daemon jobs wait` (returns completed) and `daemon jobs list`
(liveness probe — returns []). Also strip `--output FOO` global
flags so subcommand match still works.
- Test 462 grep'd $AO_RPI_LOG for `--landing-branch` (the legacy CLI
arg). Replace with jq assertion on the new payload file
evolve-rpi-run-payload.json.
Now 31/31 nightly-evolution bats pass (was 29/31).
* fix(skills): copy phase-data-contracts.md to fix transitive broken-link gate
isolation-contract.md (just copied to crank/discovery/validation in 053111a8)
references phase-data-contracts.md as a sibling. The doc-release link
validator flagged it as broken in the new locations because the file lived
only in skills/rpi/references/. Per CLAUDE.md "no symlinks; copy", copies
phase-data-contracts.md into each affected skill's references/ and adds the
link to each SKILL.md's Reference Documents section so heal.sh's UNLINKED_REF
check stays green. Refreshes codex .agentops-generated.json hashes for the
4 touched skills.
Verified: link validator 1990/1990 ok, heal.sh --strict clean, codex artifact
metadata + parity audits both pass.
* chore(registry): refresh registry.json after phase-data-contracts.md copies
Auto-regenerated by scripts/generate-registry.sh after commit 3ae3ce85
copied phase-data-contracts.md into crank/discovery/validation references.
Reference counts: crank 24→27, discovery 5→8, validation +3.
CI registry-check (--check mode) flagged the drift on PR #255.
* chore(registry): regen without polluting from gitignored .agents/
scripts/generate-registry.sh's build_knowledge_stores walks .agents/
which is gitignored. CI clones clean (no .agents/ tree), so its regen
output has no knowledge_stores entries; mine had them populated from
session state, causing registry-check stale-detection to fail.
Regenerate with .agents/ temporarily moved aside so the committed
registry.json matches the CI-clone's expected output. Net effect: drop
the knowledge_stores section that was a build-environment artifact.
Resolves PR #255 registry-check failure.
The codex artifact metadata gate enforces source/codex twin commits as a
matched pair. The previous commits modified skills/using-agentops and
skills/validation without touching their twins.
- skills-codex/using-agentops/SKILL.md: add $system-tuning row in the
Advanced Skills table (mirrors /system-tuning add in source)
- skills-codex/validation/SKILL.md: trim same two redundant sections as
source (Expensive Command Policy and DAG preamble code block)
- skills-codex/.agentops-manifest.json + per-skill .agentops-generated.json
hashes auto-refreshed by regen-codex-hashes.sh
Validation: codex parity PASS for both skills, heal-strict clean,
validate-codex-generated-artifacts (staged scope) PASS.
Adds a 2400-char aggregate budget for skills-codex/*/SKILL.md `description:`
fields in tests/skills/test-token-budgets.sh, then trims each skill's description
to fit (catalog now 2146/2400). Both Claude and Codex SKILL.md descriptions
are kept in sync; codex .agentops-generated.json hashes regenerated.
Adds --repair-shape to scripts/audit-codex-hooks.sh: when ~/.codex/hooks.json
is missing or in legacy-flat shape, rewrites it from hooks/codex-hooks.json
with the active plugin_root (read from .agentops-codex-install.json) and
backs up any prior file. Covered by new test_repairs_legacy_flat_shape.
Memory decay (4 .agents/ files) bumped by the SessionStart inject hook.
* 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>
## Docs site — boshu2.github.io/agentops
- Replace Jekyll minima with MkDocs Material (slate dark palette default)
- Landing hero scoped to .landing-hero (no gradient bleed on inner pages)
- Section landings (getting-started, architecture, reference, contracts, levels) with narrative ledes
- Generate skill catalog + per-skill pages from skills/*/SKILL.md at build
- Generate CLI reference from cli/docs/ at build (fails build on missing source)
- Fix every internal link via one-shot migration (scripts/migrations/2026-04-19-fix-docs-links.py)
- Wire mkdocs build --strict into pre-push gate (Check 25a)
- Replace .github/workflows/pages.yml with .github/workflows/docs.yml (actions/deploy-pages)
- README + docs/CONTRIBUTING updated with docs-build toolchain on-ramp
- tests/docs/validate-links.sh patched to understand mkdocs-generated paths
## RPI orchestrator strict-delegation contract
- Strict sub-skill delegation is now the default for /rpi, /discovery, /validation. No --full flag — always on.
- Canonical contract in skills/shared/references/strict-delegation-contract.md (plus Codex mirror)
- Forged learning with detection phrases + corrective actions (ao-inject-ready)
- Rename --no-lifecycle -> --no-scaffold in /discovery (Claude + Codex) with deprecation alias through v2.40.0
- Harden inline-work hotspots with orchestrator-owned markers in /crank STEPS 3a.3, 6.5, 8.7 + Inline Work Policy footer
- Flag consistency: --auto and --interactive scopes documented; --complexity syntax formalized
- CHANGELOG [Unreleased] documents + scaffolds; runtime hook enforcement explicitly deferred
## fix(hooks): go-test-precommit skips when no Go files staged
- Previously ran go vet + go build unconditionally, blocking non-Go commits when Go toolchain was missing or at a different version
- Now checks staged diff and exits cleanly if no *.go or go.{mod,sum,work} files are staged
- Applied to both hooks/ (source) and cli/embedded/hooks/ (synced)
Provenance: full RPI lifecycle with strict delegation at every phase boundary (Phase 1 Skill(discovery) -> Phase 2 Skill(crank) -> Phase 3 Skill(validation) -> Skill(vibe), Skill(post-mortem), Skill(retro)).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
- harvest.go: use empty defaults with ~/ descriptions instead of baking $HOME
into flag defaults, resolving cli-docs-parity failures across environments
- athena-session-defrag.sh: swap stat order to try Linux stat -c first, fixing
integer expression error when macOS stat -f succeeds but returns mount path
- skills-codex/validation: replace ao codex stop with ao codex ensure-stop to
pass codex lifecycle guard validation