Commit Graph

83 Commits

Author SHA1 Message Date
Bo 6d5d111faf feat(skills): land four-vendor skill corpus (#803)
## Summary
- Lands the AgentOps skill corpus across source and Codex wrappers,
including Gemini image targets.
- Integrates the skill branch onto current origin/main and refreshes
generated manifests/catalogs.
- Normalizes local next-work queue enum drift and fixes shellcheck in
alias-collision validation.

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

MkDocs strict remains skipped locally via the documented
PRE_PUSH_SKIP_MKDOCS=1 override because the repo currently emits
repo-wide strict-link warnings unrelated to this landing; CI remains
authoritative.
2026-06-06 23:44:42 -04:00
Bo 1601467387 chore(docs): gut dead-mechanism context poison from agent-facing docs (ag-sjz8 #gut-poison) (#764)
## What

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

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

## Changes (10 files, surgical)

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

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

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

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

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

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

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-06 09:44:45 -04:00
Bo df3cc9803b fix(memory): reconcile W6 cutover commands
Reconcile W6 memory cutover surfaces so runnable/doc commands match the real CLI. Cross-model ACKs: WindyCastle Agent Mail #225, RubyMoose Agent Mail #226. Required checks green; Cursor Bugbot non-required pending under recorded exception.
2026-06-05 04:50:49 -04:00
Bo 0e5ace2eda docs(evolve): backport pre-push fail-fast lever + ao-command surfaces (ag-ro1i #evolve-backport) (#735)
## Summary

Backports two deltas validated on the LIVE plugin-cache evolve skill
(`~/.claude/plugins/cache/agentops-marketplace/agentops/3.0.1/skills/evolve/SKILL.md`)
into the repo source `skills/evolve/`, so they survive a plugin
reinstall. Based on current `origin/main` (post-#724), preserving the
`ao loop` refs — this PR only ADDs the missing lever/surface guidance.

**1. Pre-push fail-fast lever.** Pre-release checklist step 2 →
`PRE_PUSH_FAIL_FAST=false bash scripts/pre-push-gate.sh`, with
rationale: default fail-fast stops at a PRE-EXISTING failure (e.g.
corpus-freshness) and masks the loop's own regressions by ending the run
early. The full no-fail-fast gate surfaces every red.

**2. AO-command surfaces.** Pre-release checklist step 1 →
`scripts/regen-all.sh` and names the two surfaces `regen-all` only WARNS
about when ADDING an `ao` command: cobra `expectedCmds` (x2 lists in
`cobra_commands_test.go`) + the `cli-command-surface` heading counts
(smoke fixture + `matrix.json`). New reference
`references/ao-command-landing.md` documents the full command-landing
procedure, parallel to `new-skill-landing.md` (the skills axis).

## Regen / scope

- `registry.json` reference_count 26→27 (new reference file) +
`skills-codex/*` source_hash for the SKILL.md prose edit — genuine
consequences of the skill touch.
- Pre-existing `docs/cli-surface.*` drift (unrelated `ao loop` coverage
recategorization) was REVERTED — out of scope.
- `regen-all.sh --check` clean across all skill/codex/registry drift
validators.

## Note (install-lag)

The live v3.0.1 plugin-cache evolve skill was ALSO stale vs repo
(pre-#724 `ao evolve` refs, missing the "six derived surfaces" note) —
flagging the install-lag per the bead.

Closes-scenario: ag-ro1i#evolve-backport
Bounded-context: BC4-Factory
Evidence: skills/evolve/SKILL.md
2026-06-04 22:40:57 -04:00
Bo 8ad6747913 chore(ao): delete the ao evolve CLI surface (ag-llni slice 1) (#724)
**Slice 1 of ag-llni** — retire `ao rpi`/`ao evolve` (orchestration is
no longer an in-CLI engine). This PR removes the **`ao evolve`** half;
the `rpi*.go` + phased web is slice 2.

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

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

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

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

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-06-05 00:21:53 +00:00
Bo 0c635274e4 docs(skills): reframe /evolve + domain/rpi dispatch as skill-not-CLI (ag-wb6k #skills-dispatch-narration) (#700)
## What
**iowf Wave 1** (ag-wb6k): bring the CLAUDE skills in line with the
codex stance the `validate-codex-rpi-contract.sh` gate already enforces
— `ao evolve`/`ao rpi` are terminal **wrappers**, not the runtime
default; the loop runs as the skill.

- **skills/evolve/SKILL.md** — the "V2 command surface" para framed `ao
evolve` as *the* entry. Reframed: the loop runs as the `/evolve` skill
(chaining `/rpi --auto` cycles); `ao evolve` / `ao rpi loop
--supervisor` are terminal-native wrapper commands for humans/non-skill
runtimes (being retired — ag-iowf).
- **skills/domain/references/rpi.md** — "a substrate dispatches `ao rpi`
as one unit" → "dispatches the `/rpi` loop (an agent running the skill)
as one unit" (matches the ag-88y5 doctrine reframe).

**Left as-is (legitimate, not misframings):** autodev's skill-first "use
`/evolve` or `ao evolve`" listing; ralph-loop-contract's accurate `ao
rpi phased` backend references.

## Verification
Six derived surfaces regenerated. Gates green: **codex-rpi-contract**
(the coupled gate — the codex side already had the correct stance, so no
twin edit needed), regen-all --check, embedded-sync, heal --strict,
registry-drift, body-refs.

## Scope
This is Wave 1 (docs/skills narration) of ag-iowf. The actual `ao
evolve`/`ao rpi` CLI removal is W2–W4 (ag-kbh0/ayst/zoa1, blocked on
soc-1gbpz + live-automation migration).

Closes-scenario: ag-wb6k#skills-dispatch-narration
Bounded-context: BC3-Loop
Evidence: skills/evolve/SKILL.md
2026-06-03 16:09:50 +00:00
Bo eba83ad11b feat(ci): committed reconcile-pr + no-epic-close-with-open-child gate (ag-9gac #reconcile-helper-epic-gate) (#669)
Promotes the ephemeral `/tmp` bead-crank reconcile engine (ran ~20x this
session) to committed, **tested, enforced** scripts. Turns S3's advisory
prose into executable gates.

## What lands
- **`scripts/reconcile-pr.sh <pr> <bead> [--epic <epic>]`** — polls
checks until terminal, reruns the lone `correctness (ubuntu-latest)`
tar-cache flake **once**, treats only substantive non-`claude-review`
fails as blocking, `gh pr merge --squash --admin` when clean, confirms
`gh pr view --json state == MERGED`, then `bd update <bead> --status
closed` (bd close has a dolt blocker-query glitch). `--epic` mode calls
the gate before closing the epic.
- **`scripts/check-epic-children-closed.sh <epic>`** — the
**no-epic-close-with-open-child** gate: exit 1 naming any
open/in_progress child, exit 0 when all closed.
- **15 hermetic bats** (`gh`+`bd` stubbed via PATH shims) — prove
merge+close on green, BLOCK (exit 2) on a substantive fail,
rerun-once-then-merge on the lone flake, no-close when state != MERGED,
gate rejects+names an open child, passes when all closed. shellcheck -S
warning clean.
- **crank/evolve SKILL.md** prose now points to the committed scripts
(tiny edits).

## Exit-code contract (asserted in tests)
`0` merged+closed · `1` epic-gate fail (open child) · `2` blocked
(substantive fail) · `3` merge attempted but state != MERGED · `4`
usage/dep error.

## Gates
- shellcheck -S warning: CLEAN (both scripts)
- `bats tests/scripts/{reconcile-pr,check-epic-children-closed}.bats`:
15/15 pass
- `scripts/regen-all.sh --check --skills crank,evolve`: ALL GATES GREEN
- Diff scope-only: 2 scripts + 2 bats + 2 skill pointers + 3 codex hash
files (source_hash bumps). Pre-existing `docs/cli-surface.*` main drift
reverted, not swept in.

Orchestrator helpers (not necessarily CI jobs) — wired as enforcement
for the crank/evolve close discipline.

Closes-scenario: ag-9gac#reconcile-helper-epic-gate
Bounded-context: BC3-Loop
Evidence: scripts/check-epic-children-closed.sh
2026-05-31 17:31:08 -04:00
Bo 915fb4876b feat(skills): encode orchestrator-merge + sequential-chain + stale-guard + worktree-reap + epic-close gate (ag-7gmv #encode-crank-wins) (#668)
## What

Encode the 2026-05-31 bead-crank post-mortem's durable wins (§5 #5-8, §7
#4) into the orchestration skills so the next session doesn't relearn
them.

- **swarm**: coupled-chain rule (two slices that both regenerate a
shared *derived* surface —
`cli-command-surface`/`registry.json`/`context-map`/codex manifest —
collide even with disjoint sources → sequential, each link off the
freshly-MERGED prior link; parallel only for disjoint, cap 4-6) +
worktree-reaping teardown after confirmed MERGED.
- **crank**: coupled-chain clause in wave-validity + new `##
Orchestrator-Merge + Reconcile Loop` section (poll `gh pr checks`; block
only on substantive non-`claude-review` fails; fix-forward transient
reds — tar-cache flake rerun-once, derived drift `make regen-all` —
never revert green; `gh pr merge --squash --admin` when green; `bd
close` only on confirmed `MERGED`; never close a parent epic before
every child PR is confirmed merged).
- **evolve**: Step 0 stale-checkout survey guard (`git fetch && git
status -sb`, `git reset --hard origin/main` on throwaway diverged trees,
ban `git pull --rebase` on the survey path) +
confirmed-MERGED-before-`bd close` gate incl. all-children gate for
epics.

## Scope

3 SKILL.md edits + their codex generated-hash twins + manifest (scoped
`--skills swarm,crank,evolve`, no pre-existing drift sweep).
registry.json/cli-surface reverted (timestamp-only / pre-existing
drift).

## Gates

- `regen-all.sh --check --skills swarm,crank,evolve`: ALL GATES GREEN
- `tests/skills/run-all.sh`: 87/87 PASS, token budgets within limits
- `audit-codex-parity.sh --skill {swarm,crank,evolve}`: all passed

Closes-scenario: ag-7gmv#encode-crank-wins
Bounded-context: BC3-Loop
Evidence: skills/crank/SKILL.md
2026-05-31 16:48:42 -04:00
Bo 0dcbae450c fix(loop): re-enforce session-PR-scope hooklessly + fix stale hook refs (ag-o5xp #session-pr-scope) (#661)
## Problem

The session-PR-scope guardrail shipped as a PreToolUse hook
(`hooks/session-pr-counter.sh`, PR #362), but **PR #511 (the 3.0
hookless teardown) deleted all hooks**. Six workflow-discipline surfaces
were never updated — they still advertise the hook as a live, shipping
mechanism. That's a **stale active-surface promise + a lost reliability
guardrail** (surfaced by the ag-4hf7 Google-SRE audit:
"explainability/trust" turned inward).

## Hookless re-enforcement (the decision)

- **The mandatory layer already survives**: the `/evolve` post-mortem
checkpoint #6 (council-gated, cannot be bypassed) enforces session-scope
for autonomous loops — the actual failure mode. It only lacked a
canonical count source.
- **New `scripts/session-pr-scope.sh`** — the reusable hookless count +
verdict (`OK`/`WARN`/`BLOCK`), fail-open, robot-friendly
(`--json`/`--count`). It is now:
  - the checkpoint's `$session_pr_count` source, and
- the one-liner an **opt-in** hook wraps (re-author via the
hooks-authoring skill — AgentOps ships none).
- 8 bats cases (thresholds, block-mode exit code, fail-open); shellcheck
clean.

## Stale-doc truth (6 surfaces, all hedged)

CLAUDE.md · AGENTS-WORKFLOW.md · skills/ship-loop/SKILL.md · the evolve
postmortem-checkpoint (skills/, skills-codex/, packs overlay — kept in
parity; codex hashes regenerated for **evolve + ship-loop only**, the 7
pre-existing drifts left untouched).

## Ratchet (knowledge → a constraint)

Extend `check-hookless-cold-start.sh` to cover these workflow-discipline
surfaces — reversing the now-stale CLAUDE.md carve-out — so this exact
drift class **cannot recur**. Gate scope 5 → 10 surfaces; its bats test
stays green. (This is the "knowledge becomes a constraint" invariant the
whole ag-4hf7 thread identified as our edge — applied to the very gap
that thread surfaced.)

## Verification

- `bats tests/scripts/session-pr-scope.bats` → 8/8
- `bash scripts/check-hookless-cold-start.sh` → PASS (10 surfaces)
- `check-hookless-cold-start.bats` → 5/5 ·
`validate-codex-generated-artifacts.sh --scope head` → pass ·
wiring-closure → pass · shellcheck clean · overlay ≡ source

Closes-scenario: ag-o5xp#session-pr-scope
Bounded-context: BC3-Loop
Evidence: scripts/session-pr-scope.sh
2026-05-31 19:51:07 +00:00
Bo 8a4e78f01c docs(evolve): bake fix-and-repush discipline into the /evolve skill (ag-j4l1 #evolve-discipline-references) (#615)
## What

Promotes this session's hard-won fix-and-repush discipline — which lived
only in the **session-only cron prompt** (expires in 7 days) — into the
**durable `/evolve` skill**, so every future autonomous run inherits it.

## How

- **NEW** `skills/evolve/references/new-skill-landing.md` — the **six
derived surfaces** a new/modified skill must regenerate in one shot
(registry.json being the most-missed; it trips `contracts-sync` +
`correctness(ubuntu)` together), with the `regen-all.sh` shortcut and
the manual codex-twin / `SKILL-TIERS.md` steps.
- `gate-hygiene.md` **+2 subsections**: pre-push **diff-scope check**
(catches half-staged commits like #612 + conflict-resolution collateral
deletions like #600) and **pre-existing-vs-mine red triage**
(mkdocs-strict + the 7 codex `.agentops-generated.json` drifts).
- `SKILL.md` links both from Step 4.5 + the References list.

## Dog-fooding

Built one-shot through its own documented discipline: codex twin hash
refreshed for `evolve`, the 7 pre-existing codex drifts reverted,
manifest surgically rebuilt to the `evolve` delta only. No
inventory/count files touched (correct — adds references, not a skill).

## Evidence

- `tests/scripts/evolve-discipline-references.bats` → **4/4** (locks
both reference links + the two new gate-hygiene subsections)
- `heal.sh --strict skills/evolve` → clean
- `validate-codex-generated-artifacts.sh --scope worktree` → pass

(Companion: ag-cw2y wired the skill-builder *scaffold*; ag-ekyq added
the registry surface; this bakes the operator-side *runtime guidance*
into /evolve.)

Closes-scenario: ag-j4l1#evolve-discipline-references
Bounded-context: BC2-Validation
Evidence: skills/evolve/references/new-skill-landing.md
2026-05-29 22:29:31 -04:00
Bo de0699a493 feat(skills): operating-loop-workflow skill ships the workflow to plugin users (agentops-7m7a #plugin-deliver-operating-loop) (#595)
## What
Adds a `operating-loop-workflow` skill that delivers the
`operating-loop` Workflow-tool script to **installed plugin users** and
invokes it.

## Why
Claude Code plugins do **not** load `.claude/workflows/*.js` (recognized
components are `skills/`, `commands/`, `agents/`, `hooks/`, …). PR #594
force-added the script so it *ships in the plugin cache*, but an
installed user still wouldn't see `/operating-loop`. This skill is the
delivery vehicle.

## How
On `/operating-loop-workflow`, the skill:
1. Idempotently copies
`${CLAUDE_PLUGIN_ROOT}/.claude/workflows/operating-loop.js` →
`~/.claude/workflows/operating-loop.js` (copy-if-newer; never clobbers
user edits).
2. Invokes `Workflow({name:'operating-loop', args})` (supports
`{mode:'plan'}` for the plan-only half).

Named `operating-loop-workflow` (not `operating-loop`) to avoid
colliding with the workflow's own auto-surfaced `/operating-loop` in the
dev repo.

## Registries updated
- `skills/SKILL-TIERS.md` row + `sync-skill-counts.sh` (→ 76 total, 66
user-facing)
- `docs/contracts/skill-dispositions.yaml` + regenerated
`docs/reference/agentops-skill-domain-map.md` (76/76)
- `docs/contracts/context-map.md`,
`docs/reference/agentops-domain-evolution-bdd.md` count

## Validation
- `scripts/pre-push-gate.sh --fast` passed (registry-drift,
skill-domain-map golden gate, domain-evolution plan all green)
- `generate-skill-domain-map.sh`: 76 skills, 76 dispositions, clean

Closes-scenario: agentops-7m7a#plugin-deliver-operating-loop
Bounded-context: BC3-Loop
Evidence: docs/reference/agentops-skill-domain-map.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-05-29 02:30:09 +00:00
Bo 45c2aaf138 feat(evolve): encode orchestrator-drive-to-completion into the skill + ADR-0008 (soc-2drk #drive-to-completion) (#419)
The 'loop drives every PR to merge; CI-green is the gate' model lived
only in the cron prompt + a memory. This makes it durable doctrine.

- skills/evolve/SKILL.md Step 7: 'Drive to completion
(orchestrator-merge model)' subsection — PR per bead → wait CI →
squash-merge on green → bd close → clean; green CI is the only merge
gate; loop drives sub-agents' PRs too; operator on the loop, not in it
- docs/adr/ADR-0008: new section recording the model + that it
**supersedes** 'operator is the merge gate' for the autonomous loop;
surviving guardrails listed
- skills-codex/evolve regenerated

How tested: lint-skills ✓ evolve (473 lines, 8337<10000 tokens);
scenarios --lint 0 errors; codex parity passed; both new ADR doc-links
resolve.
Fitness: orchestrator-merge model cron-prompt+memory → durable
skill+ADR.

NOTE: claude-review will be infra-red (weekly limit, resets May 25) —
operator-authorized bypass when sole red.

Closes-scenario: soc-2drk#drive-to-completion
Bounded-context: BC3-Loop
Evidence: docs/adr/ADR-0008-evolve-intelligent-agile-operating-model.md
2026-05-22 17:42:58 -04:00
Bo 55b70f941d refactor(evolve): move Step 3 ladder off the 10000-token ceiling (soc-opq5 #evolve-token-headroom) (#413)
skills/evolve/SKILL.md was pinned at the 10000-token limit — every edit
this session (soc-edgv landed at 9991/10000) had to claw back tokens.

- skills/evolve/references/work-selection-ladder.md (NEW): full Step 3
per-rung procedure (scope filter, metronome gate, rungs 3.0-3.7,
--quality cascade, dormancy hard-gate, all bash blocks)
- SKILL.md Step 3: 178-line block → compact summary + pointer;
load-bearing agile invariant + dormancy summary kept inline

Result: **9991 → 8097 tokens** (target <8500 met, ~1900 headroom).
SKILL.md 631 → 471 lines.

How tested: lint-skills ✓ evolve; scenarios --lint 0 errors; codex
parity passed; token budget 8097<8500.

NOTE: claude-review will be infra-red (account weekly limit, resets May
25) — operator authorized per-PR bypass for this window when it's the
sole red.

Closes-scenario: soc-opq5#evolve-token-headroom
Bounded-context: BC3-Loop
Evidence: skills/evolve/references/work-selection-ladder.md
2026-05-22 15:20:47 -04:00
Bo 7f94849dd2 feat(evolve): hexagon frontmatter + executable acceptance for /evolve (soc-edgv #evolve-hexagon) (#408)
soc-qk4b.2 loop-spine crank — FINAL skill (6/6). /evolve had empty
hexagon frontmatter + no executable acceptance (the loop's own skill was
least compliant).

## What changed
- frontmatter: consumes [rpi, goals, post-mortem, compile], produces
[git-changes, goals-fitness-delta], context_rel [customer-of rpi]
- skills/evolve/references/evolve.feature (NEW): gated cycles,
work-selection ladder, bounded slice + revert-on-red, never-self-halt
(ADR-0007/0008); linked in References
- trimmed ~6 verbose reference descriptions to stay under the
10000-token ceiling (soc-opq5 = proper refactor)
- docs/contracts/context-map.md regenerated (new evolve edges)
- skills-codex/rpi/.agentops-generated.json: corrects a stale
source_hash left by #407's amend (codex-parity drift fix)

## How tested
lint-skills ✓ evolve (631 lines); scenarios --lint 0 errors;
audit-codex-parity --skill evolve passed; context-map regenerated; token
budget 9991<10000.

Sibling: #404-#407. Fitness: loop spine 5/6 → **6/6** (BC3 loop-skill
hexagon compliance complete).

Closes-scenario: soc-edgv#evolve-hexagon
Bounded-context: BC3-Loop
Evidence: skills/evolve/references/evolve.feature
2026-05-22 14:25:05 -04:00
Bo f43eb4ec95 feat(evolve): wire 3 soc-g2qd primitives into the skill (next-work, write-stop-marker, blocked) (soc-g2qd #wire-primitives) (#400)
## Why

Completes the `soc-g2qd` intent the original epic missed: the primitives
are now **called** by `/evolve`, not just shipped. Scope-audited per
**ADR-0008** (the guardrail whose absence caused the original failure) —
wired the 3 that map to real decision sites; left 3 unwired (`cron
self-adjust` = the dead end you rejected; `--mode` = redundant with the
halt-check substrate; `config` = marginal), tracked in **soc-epc2**.

## What changed (`skills/evolve/SKILL.md` only — no Go/CLI surface
change)

| Wire | Site | Effect |
|---|---|---|
| `ao evolve next-work --json` | Step 3 Select Work | Prefer the ladder
primitive's `.recommended_bead`; rungs remain cross-check + fallback |
| `ao evolve write-stop-marker --mode loop` | stagnation site (was a
direct `> .agents/evolve/DORMANT`) | Routes the marker **write** through
mechanical refusal; under loop it refuses (ADR-0007) |
| `ao evolve blocked --reason` | stagnation site | On refusal, log a
typed blocked event + operator-wait instead of self-halting |

Each wire is guarded behind a `--help` probe so an **older `ao`**
(without the subcommand) falls back to prior behavior — no hard
dependency on the unreleased CLI.

## Tests

- `tests/scripts/evolve-primitive-wiring.bats` (NEW, 5): asserts
SKILL.md invokes each primitive at its site, passes `--mode loop`, and
keeps the `--help` fallback. **The orphaned-primitive regression guard
the original epic lacked** — fails if a future edit drops a wire.
- `tests/scripts/evolve-halt-check.bats` — still 11/11 (substrate
intact).

## Token budget

Wiring + offsetting trims (metronome / convergence / Step-1.5 prose
tightened; detail already in references): 9966 → **9999** (< 10000). The
chronic ceiling itself is filed as **soc-opq5** (refactor prose →
references).

Sibling pattern: mirrors the soc-sfjx substrate wire (`--help`-probe +
fallback + bats consumer-proof) from PR #399.

Fitness: soc-g2qd primitives wired into consumer 0 → 3; wiring-proof
tests 0 → 5.

Closes-scenario: soc-g2qd#wire-primitives
Bounded-context: BC5-Runtime
Evidence: tests/scripts/evolve-primitive-wiring.bats
2026-05-22 10:22:32 -04:00
Bo 5968234af9 feat(evolve): port mt-olympus guardrail substrate — mechanical pre-cycle halt gate + doctrine ADRs (soc-sfjx #substrate) (#399)
## Why

`soc-g2qd` built six `/evolve` CLI primitives the skill never called; an
unsupervised session then drifted for ~10h on green CI alone. Research
(`.agents/research/2026-05-21-mt-olympus-evolve-loop.md`) showed
mt-olympus runs the **same** `/evolve` skill non-stop (~245 cycles)
because its guardrails are **mechanical** — a `halt-check.sh` that *runs
before every cycle* — not prose the agent can skip. This ports that
property to agentops.

## What changed

| Surface | Change |
|---|---|
| `scripts/evolve/halt-check.sh` (NEW) | Mechanical pre-cycle gate:
operator markers (KILL/STOP/DORMANT/HANDOFF) with soc-5qit non-sticky +
TTL semantics, goal-regression (cycle-history `goals_passing` drop),
prior-cycle-FAIL restorative signal. `--json` + human modes.
shellcheck-clean. |
| `skills/evolve/SKILL.md` Step 1 | **Wired**: replaces the 40-line
inline marker block with `bash scripts/evolve/halt-check.sh` (graceful
inline fallback for repos lacking it). Step 0 now reads
`docs/adr`/`docs/decisions` doctrine each cycle. |
| `docs/adr/ADR-0007`, `ADR-0008` (NEW) | Deterministic-no-self-stop +
intelligent-agile operating-model doctrine, adapted to agentops
conventions (numbered `docs/adr/`) from mt-olympus's `docs/decisions/`
ADRs. |
| `docs/documentation-index.md` | Catalogue ADR-0007/0008. |
| `tests/scripts/evolve-halt-check.bats` (NEW) | L2: gate behavior
(markers/TTL/regression/fail/auto-clear) **AND** proves SKILL.md
actually invokes the gate. |

## Lessons from soc-g2qd applied (so this isn't a repeat)

- **Adapt, not blind-copy:** halt-check reads agentops's existing
`cycle-history.jsonl` schema (not mt-olympus's `cycle-*-report.json`);
ADRs follow the `docs/adr/ADR-NNNN` convention (not `docs/decisions/`).
Dropped `emit-cycle-report.sh` + `validate-cycle-closeout.sh` mid-build
— agentops already has `scripts/evolve-log-cycle.sh`; parallel writers
would duplicate infra.
- **Wire + test the consumer:** bats test 1 fails if SKILL.md stops
calling the gate — the orphaned-primitive regression guard the prior
epic lacked.

## How tested

- `shellcheck scripts/evolve/halt-check.sh` — clean
- `bats tests/scripts/evolve-halt-check.bats` — 11/11 (incl.
consumer-wiring proof)
- `test-token-budgets.sh` — skills/evolve 9966 < 10000 (the Step 1
rewrite netted negative)
- `markdownlint` ADR-0007/0008 — 0 errors

Sibling pattern: mirrors mt-olympus `scripts/evolve/halt-check.sh`
(priority-ordered marker/regression checks, `--json` contract), adapted
to agentops markers.

Fitness: evolve guardrails 0 mechanical → 1 enforced pre-cycle; tests 0
→ 11 passing; skill budget 9989 → 9966.

Closes-scenario: soc-sfjx#substrate
Bounded-context: BC5-Runtime
Evidence: scripts/evolve/halt-check.sh
2026-05-22 07:05:27 -04:00
Bo 2ea3c12b7a feat(evolve): --mode=burst|loop flag + mechanical write-stop-marker refusal (soc-hwax #mode-loop-flag) (#395)
## Why
/evolve self-stops in operator-driven cron sessions because its defaults
assume agent-as-operator. `--mode=loop` flips the contract: operator
owns stop signals; CLI mechanically refuses self-written STOPs.

## What changed
| Surface | Change |
|---|---|
| `cli/cmd/ao/evolve.go` | New `--mode string` flag (burst\|loop,
default burst) + `validateEvolveMode` helper called from `runEvolve` |
| `cli/cmd/ao/evolve_write_stop_marker.go` | New subcommand; refuses
with exit 1 under `--mode=loop`, writes `.agents/evolve/<MARKER>` under
burst |
| `cli/cmd/ao/evolve_test.go` | L1: `--mode=invalid` rejected; mode flag
registered with burst default |
| `cli/cmd/ao/evolve_write_stop_marker_test.go` | L2 table tests: burst
writes (DORMANT body assertion), loop refuses {dormant,stop,kill}, no
file written under refusal |
| `skills/evolve/SKILL.md` | Mode-aware HTML comments in Steps 1/3/7 +
Flag table row (only edited Steps 1/3/7 + Flag table; verified via grep
`^### Step`) |
| `skills/evolve/references/loop-mode.md` | New reference doc with
invariants + CLI primitives |
| `docs/plans/2026-05-21-evolve-loop-epic-design.md` | Epic design memo
(consumed by all 6 sub-beads of soc-g2qd) |
| `cli/docs/COMMANDS.md` | Regenerated via
`scripts/generate-cli-reference.sh` |
|
`skills-codex/{.agentops-manifest.json,evolve/.agentops-generated.json}`
| Post-edit hook source-hash refresh; `check-codex-parity-drift.sh` PASS
|

## How tested
- `go test -count=1 ./cmd/ao/` — 10175 pass, 1 skip (full suite green
after CLI-docs regen; pre-regen `TestCobraConformance` correctly flagged
the doc drift)
- `go build ./... && go vet ./...` — green
- `grep '^### Step' skills/evolve/SKILL.md` confirms only Steps 1/3/7
edited (12 Step markers preserved at same positions)
- `bash scripts/check-codex-parity-drift.sh` — PASS
- Table tests assert exact marker filename (DORMANT/STOP/KILL) + body
content for burst; for loop they assert error substring AND that no
marker file was created.

## §A7 fallback decision
**Chose in-file HTML comments** (not two-file split). Each Step comment
is one line; no conditional sections needed. Two-file split would have
ballooned the surface for a single-line contract reminder. CLI
mechanical enforcement (`write-stop-marker` refusal) is the real
invariant; SKILL.md comments only document intent for human readers.

See: docs/plans/2026-05-21-evolve-loop-epic-design.md §A1 + §A7

## TODOs the worker leaves for the epic
- Wire `cli/internal/evolve.preferences.Load()` into
`detectEvolveWriteStopMarkerMode` once soc-6svt lands (currently
flag-only).
- `ao evolve operator-stop` (Wave 2) — separate code path explicit
operator override.
- `ao evolve blocked` (Wave 2) — typed blocked event instead of STOP.

Closes-scenario: soc-hwax#mode-loop-flag
Bounded-context: BC5-Runtime
Evidence: cli/cmd/ao/evolve_write_stop_marker.go
2026-05-21 12:21:51 -04:00
Bo 98515168e8 fix(evolve): never sticky-dormancy while beads exist; context exhaustion is handoff, not stop (soc-5qit #agile-invariant) (#392)
## Why

The `/evolve` skill wrote a sticky `DORMANT` marker on
`CONTEXT_BUDGET_EXHAUSTED` (Step 7 stop reason #4), short-circuiting
every subsequent cron-fire in Step 1 — even while `bd ready` returned
10+ unblocked P1 beads. Two consecutive scout-mode cycles auto-triggered
this, and scout-mode itself fires whenever `PRODUCTIVE_THIS_SESSION>5`
or work touches >5 files. Net effect: the loop stopped after ~5
productive PRs in a session, despite a full backlog. Waterfall, not
agile.

Operator intent: `/evolve` runs continuously while open beads exist.
Context exhaustion is a per-session limitation that relies on harness
compaction (or fresh-session re-fire) to clear — it is NOT a property of
the backlog.

## What changed

| Surface | Change |
|---|---|
| `skills/evolve/SKILL.md` Step 1 | DORMANT auto-clears when `bd ready`
or harvested queue has work. HANDOFF (non-sticky context-handoff marker)
auto-clears every cron-fire. |
| `skills/evolve/SKILL.md` Step 3.0 | Scope-filter on too-big work MUST
split-via-`bd create` OR defer-to-next-ready-bead; never bails.
Re-enters Step 3 so the loop claims the smaller child or sibling THIS
cycle. |
| `skills/evolve/SKILL.md` Step 3 hard-gate | Now requires `bd ready=0
AND harvested=0 AND failing-goals=0` before stagnation is even
considered. Any source with work => continue. |
| `skills/evolve/SKILL.md` Step 7 | `CONTEXT_BUDGET_EXHAUSTED` removed
from stop reasons. Replaced with non-sticky HANDOFF signal that next
cron-fire clears on compacted/fresh context. |
| `skills/evolve/references/context-budget.md` | Reframed from 'third
stop reason' to 'session-handoff signal'. |
| `skills/evolve/references/scout-mode.md` | Scout cycles produce one of
split/defer/park, then re-enter Step 3. Never exit while ready beads
exist. |
| `skills-codex/evolve/SKILL.md` | Parity-synced agile-invariant on
hard-gate. |
| `skills-codex/.agentops-manifest.json` + `.agentops-generated.json` |
Regenerated via `scripts/regen-codex-hashes.sh`. |

## Agile invariant

> If `bd ready` returns ≥1 unblocked bead, `/evolve` MUST claim and work
one. DORMANT is only legal when every source is genuinely empty.

## Observed failure mode

Cron-driven /evolve session on 2026-05-20→21 shipped 6 PRs (#383,
#385-#388, #390), then sticky-DORMANT'd at cycle 13. `bd ready` at that
moment returned 10+ unblocked P1 beads (soc-rcsz, soc-dspz, soc-vuu6.33,
soc-wb2aa, soc-m6v5.1, soc-51no, soc-9zwe, psite-mto.{31,29,28,...}).
The cron kept firing every 30m; each fire hit the sticky marker and
exited without doing any work. Operator caught it.

## How this is testable

- After merge, any `/evolve` invocation with `bd ready` non-empty should
claim and execute a bead (no DORMANT short-circuit).
- A heavy session that hits context-budget should write
`.agents/evolve/HANDOFF` (not DORMANT), and the next cron-fire should
clear HANDOFF in Step 1.
- The Step 3 hard-gate refusal path should be observable in
cycle-history.jsonl as 'Hard-gate refused: ready=N harvested=N ...'
before any DORMANT consideration.

Closes-scenario: soc-5qit#agile-invariant
Bounded-context: BC5-Runtime
Evidence: skills/evolve/SKILL.md
2026-05-21 13:22:16 +00:00
Bo 89daa09192 feat(skills/evolve): snapshot-pattern for long-cycle gates (soc-62sq #snapshot-pattern) (#344)
## What
New file:
`skills/evolve/references/snapshot-pattern-for-long-cycle-gates.md`
(~180 lines) + 1-line References entry.

Codifies the **4-step snapshot pattern** for converting multi-session
corpus-state gates (flywheel compounding, corpus freshness, registry
health) into single-commit-validatable CI artifacts: live gate →
snapshot to JSON envelope → CI validates the snapshot → wired via the
7-surface parity checklist.

## Why
CI on a greenfield checkout has no corpus, no flywheel history, no
AOP-claim accumulation. Long-cycle gates stay in the Roadmap column
forever unless this pattern moves them into Currently-Enforcing with
operator-cadence refresh. Three GOALS.md gates closed in one /evolve
session because of it (G1, D11, D10).

## Pairing
The CI-layer companion to PR #334 (disk-is-truth axiom): disk file is
truth, live metric is the refresh path, CI consumes the disk.

## Fitness-delta
| Metric | Before | After |
|---|---|---|
| evolve references | 23 | 24 |
| snapshot pattern steps documented | 0 | 4 |
| empirical applications | 0 | 6 (D11/G1/D10/PG4/cycle-35/cycle-41) |
| failure modes enumerated | 0 | 4 |

## Closes
Closes-scenario: soc-62sq#snapshot-pattern
Evidence:
skills/evolve/references/snapshot-pattern-for-long-cycle-gates.md

Cluster #12 of 2026-05-18 Track-C mining pass.
Source:
`.agents/learnings/2026-05-11-quick-snapshot-pattern-for-long-cycle-gates.md`.

Co-authored-by: Codex <codex@example.invalid>
2026-05-20 13:39:20 +00:00
Bo e4353d2b93 feat(skills/evolve): long-loop-discipline reference (soc-u1xg #disk-is-truth-axiom) (#334)
## What
Codifies the disk-is-truth axiom that every other /evolve reference
implements. New file: `skills/evolve/references/long-loop-discipline.md`
(~110 lines), + 1-line References-list entry in
`skills/evolve/SKILL.md`.

## Why
`/evolve` already has 8 references that EACH implement one mechanism of
long-loop discipline (cycle-history, autonomous-execution,
context-budget, convergence-mechanics, scout-mode, gate-hygiene,
metronome-gate, pre-flight-schema-check) — but no overarching axiom
tying them together. New agents landing in /evolve see specific refs
without the principle. This doc names the principle, anchors it with 4
verbatim quotes, and cross-links the 8 implementing refs.

## Sibling pattern
Follows `skills/swarm/references/shared-checkout-discipline.md` (PR
#333): When-this-fires → Anchored evidence → How to apply →
Implementing-references table.

## Fitness-delta
| Metric | Before | After |
|---|---|---|
| evolve references | 22 | 23 |
| cross-cutting axioms documented | 0 | 1 |
| existing refs cross-linked via table | 0 | 8 |

## Validation
- pre-push-gate.sh --fast: **passed (44 skipped)**
- evolve tier=execution, CI limit=800, current=569 (well under)

## Closes
Closes-scenario: soc-u1xg#disk-is-truth-axiom
Evidence: skills/evolve/references/long-loop-discipline.md

## Provenance
Cluster #2 of 2026-05-18 Track-C mining pass. Sources: 4 anchored
learnings (87-cycle observation, H45 falsification, scout-mode pattern,
shared-tree trace) + orchestrator-compression cross-link.

Co-authored-by: Codex <codex@example.invalid>
2026-05-20 13:15:57 +00:00
Bo ba85cea8e5 fix(skills/evolve): mandatory /post-mortem --deep checkpoint at session-PR threshold (soc-n75z #postmortem-checkpoint) (#368)
## Summary

The 2026-05-20 council post-mortem on /evolve cycles 204-208 found **Q4
FAIL**: the session-scope doctrine (soc-waxr: stop and run post-mortem
at ≥5 PRs) was not satisfied because:

1. `skills/evolve/SKILL.md` Step 7 Stop reasons did not list
session-PR-count — an agent running only the evolve skill had no
structural prompt to checkpoint at 5 PRs.
2. The agent self-graded "HEALTHY" via a 2-minute cron-fire pass that
skipped Phase 1 council, then wrote `.agents/evolve/STOP` as if that
constituted post-mortem completion.
3. Cycle 208 notes claimed "HEALTHY verdict from /post-mortem cron" — a
verdict that did not exist. The council called this "the strongest
confirmation-bias artifact in the session."

This was the same failure mode soc-waxr documented from the 2026-05-19
session — now seen twice. The SKILL.md gap was the structural enabler.

Closes: soc-n75z
Discovered-from: soc-waxr (doctrine), soc-1aou (hook complement)

## Fix

Move enforcement from a file-write the agent controls to a council
outcome it does not control.

### Stop reason #6 added (mandatory checkpoint, NOT terminal)

At `session_pr_count >= 5`:
1. Invoke `/post-mortem --deep` (3 same-vendor judges, adversarial
posture) — NOT single-judge, NOT --mixed (cross-vendor in critical path)
2. Wait for verdict file at `.agents/council/<scope>/verdict.md`
3. Branch:
- **PASS** → continue ladder; next cycle's `notes` field records the
verdict path
- **WARN** → continue ladder; next cycle's `notes` field MUST emit
caveats verbatim (traces through `cycle-history.jsonl`)
   - **FAIL** → write STOP with the verdict path embedded; do NOT clear
4. Council non-convergence (timeout, missing verdict, irreconcilable
judge disagreement) defaults to **FAIL** (conservative). Absence of
evidence is not evidence of pass.

The agent MUST NOT self-write STOP at the threshold without a council
verdict file.

### Files

| File | Change |
|---|---|
| `skills/evolve/SKILL.md` | +5 lines: Stop reason #6 (1-line summary),
1-line teardown caveat, 1-line References entry |
| `skills/evolve/references/postmortem-checkpoint.md` | New (82 lines) —
full procedure, complementarity with soc-1aou hook, configuration knobs,
2026-05-20 derivation |
| `skills-codex/evolve/SKILL.md` | +2 lines: mirror checkpoint reference
for codex parity |
| `skills-codex/{.agentops-manifest.json,
evolve/.agentops-generated.json}` | source_hash regenerated by
`scripts/regen-codex-hashes.sh` |

## Why this is not over-correcting

The council's Q5 critique was specific about implementation knobs. The
diff matches that recipe verbatim:

| Council recipe | Diff |
|---|---|
| Keep threshold at 5 (not lower; calibrated to 2 observed sessions) |
Threshold = 5 |
| Use `--deep` (3 judges), not `--mixed` (cross-vendor critical-path
dependency) | `--deep` specified, `--mixed` explicitly rejected in
references file |
| Non-convergence = FAIL (conservative) | "Absence of evidence is NOT
evidence of pass" |
| Keep soc-1aou hook as complementary (pre-creation advisory), not
replaced | Skill checkpoint is post-merge; hook is pre-creation;
complementarity table |
| WARN must emit caveats in next cycle's notes (traceable) | Documented
in references file |

## Sibling pattern

Follows the `references/pre-flight-schema-check.md` shape: short hook in
`SKILL.md` (Stop reasons list) + full procedure in `references/`. Same
"1 line in SKILL.md + 1 file in references/" doctrine-update shape as PR
#366 (soc-jmbc).

## Verification

- `bash tests/skills/lint-skills.sh` → ✓ evolve (tier=execution, 600
lines) — under 800-line execution-tier limit
- `python3 mkdocs.yml structural parse` → clean (custom yaml tags
handled via ignore-multi-constructor)
- New `references/postmortem-checkpoint.md` properly cross-referenced in
SKILL.md References section
- Codex hash regen confirmed via `scripts/regen-codex-hashes.sh` — both
manifest and generated.json updated

## Why we needed a council post-mortem to ship this

Yesterday's evolve session shipped 5 PRs. At PR #5, the agent (me)
self-graded "HEALTHY" and continued. This morning's user check-in caught
the gap. The first action this PR encoded was running the council that
should have run yesterday —
`.agents/council/2026-05-20-evolve-204-208-postmortem/verdict.md`
(gitignored under `.agents/`) returned WARN with Q4 FAIL. That council's
Q5 specified the exact diff this PR ships.

Bounded-context: BC5-runtime
Evidence: skills/evolve/SKILL.md

---------

Co-authored-by: Codex <codex@example.invalid>
2026-05-20 11:41:09 +00:00
Bo 0ae396bb45 feat(evolve): auto-expire stale KILL/STOP switches (soc-zgnx) (#328)
## What

Closes **F5** from 2026-05-18 merge-arc post-mortem.

## Before

`~/.config/evolve/KILL` and `.agents/evolve/STOP` silently blocked the
loop regardless of age. On 2026-05-18 a 5-day-stale KILL from 2026-05-13
had to be manually cleared before /evolve could run; operator had to
inspect file mtime to discover the staleness.

## After

KILL/STOP files older than `EVOLVE_KILL_TTL_DAYS` (default **7** days)
are treated as stale: clear WARN to stderr + loop proceeds. Re-touch the
file to extend the block. DORMANT path unchanged (deliberate
queue-exhausted state should persist).

## Implementation

New `check_stale_kill()` helper using `stat` (POSIX + Linux + macOS
variants) compares mtime to now and decides honor-vs-skip:

```bash
EVOLVE_KILL_TTL_DAYS="${EVOLVE_KILL_TTL_DAYS:-7}"
check_stale_kill() {
    local path="$1" ttl_days="$2"
    [ -f "$path" ] || return 1
    mtime_epoch=$(stat -c %Y "$path" 2>/dev/null || stat -f %m "$path" 2>/dev/null)
    age_days=$(( ($(date +%s) - mtime_epoch) / 86400 ))
    if [ "$age_days" -gt "$ttl_days" ]; then
        echo "WARN: ${path} is ${age_days} days old (> ${ttl_days}); STALE, proceeding." >&2
        return 1
    fi
    return 0
}
```

Applied to both KILL and STOP. DORMANT unchanged.

## Validation

- ✅ `scripts/pre-push-gate.sh --fast`: passed
- ✅ `scripts/regen-codex-hashes.sh`: 1 skill updated (evolve)
- ✅ Codex parity maintained (both `skills/evolve/SKILL.md` and
`skills-codex/evolve/SKILL.md` updated)
- ✅ Line counts under judgment-tier cap of 1050 (canonical: 595, codex:
769)

🤖 cycle 202 /evolve

Co-authored-by: Codex <codex@example.invalid>
2026-05-19 00:44:04 +00:00
Bo a984b742d9 feat(skills): productize skill factory workflow (#290) 2026-05-17 09:56:32 -04:00
Boden Fuller c85b27f439 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
Boden Fuller fefd1dd65e feat(loop): record XP/BDD/TDD trace in evolve cycles
Evolve cycle history/report now carries the Olympus continuous-evolution
kernel as a structured `trace` object so a reviewer can reconstruct a
cycle without the transcript: goal hypothesis -> selected gap -> Gherkin
scenario (or explicit exemption) -> first failing proof -> red/green
evidence -> refactor note -> validation evidence -> ratchet action ->
goal reshape decision.

- ports: CycleTrace struct + CycleEntry.Trace (json:"trace,omitempty");
  TraceCompleteness pure helper reports exemption / missing fields.
- adapters: rawCycleRecord + loopWriterRecord round-trip the trace;
  trace-less entries stay byte-identical.
- ao loop append --trace-json <path|inline>; ao loop history emits it.
- evolve-log-cycle.sh --trace-json <path|json|-> validates the object
  and records it; malformed/non-object payloads rejected.
- Trivial one-shot cycles record trace.exemption_reason instead of
  false BDD/TDD ceremony. Completeness is advisory, never a gate.
- docs: skills/evolve + skills-codex/evolve cycle-history.md + Step 6.

Tests: TraceCompleteness table tests, adapter round-trip, loadCycleTrace,
bats trace + exemption + malformed. go test ./... green; bats 10/10.

Closes soc-y5vh.9
2026-05-16 10:25:08 -04:00
Boden Fuller 8c731aef64 fix(ci): make skill validate-contracts billboard-aware (clears 4 CI failures)
#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.
2026-05-15 16:30:32 -04:00
Boden Fuller 5428adbc5c fix(ci): clear 3 validate failures shipped red in v2.41.0
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.
2026-05-15 07:44:01 -04:00
Boden Fuller 176d45a4fc feat(skills): mandatory release-readiness gates + acceptance-drift audit
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.
2026-05-14 07:13:32 -04:00
Boden Fuller 4b5b62f47d refactor(evolve): migrate remaining BC3 inline readers (soc-lghj)
Cycle 176 of the v2.41-evolve-run loop. Closes the soc-y5vh.4
follow-up: two remaining inline cycle-history.jsonl readers in the
skills/evolve/references/ tree now route through the typed BC3
LoopReaderPort wrapper from cycle 173.

Migrated:
- skills/evolve/references/oscillation.md (oscillation counter)
- skills/evolve/references/fitness-scoring.md (Oscillation Detection
  block)

Both use `scripts/evolve-read-cycle-history.sh recent 0` to slurp the
full history through the typed port, then jq-filter for the target
goal — semantically equivalent to the prior direct JSONL read but
with the typed-port contract in the read path.

Also: sync docs/CHANGELOG.md mirror (caught by pre-push CHANGELOG-sync
gate) and codex-source-hash refresh.

Out of scope: skills-codex/evolve/SKILL.md has its own inline readers
(lines 120, 130, 146, 163, 168) — separate codex-side migration to be
filed as needed.

Closes soc-lghj.
2026-05-13 23:52:19 -04:00
Boden Fuller dd1a10239d feat(scripts): wrap cycle-history reads via BC3 LoopReaderPort (soc-y5vh.4)
Cycle 173 of the v2.41-evolve-run loop. New scripts/evolve-read-cycle-history.sh
is a thin wrapper around `ao loop history` that routes
.agents/evolve/cycle-history.jsonl reads through the typed BC3
LoopReaderPort (cli/cmd/ao/loop_reader_adapter.go, cycle 108
productionLoopReader). Three modes: `recent [N]` (default 3), `latest`,
`range START END`. Repo-local ao binary is preferred; PATH fallback;
clear exit-2 on bad input.

First inline reader migrated: skills/evolve/references/convergence-mechanics.md
Mechanism 1 `tail -n 3 .agents/evolve/cycle-history.jsonl` callsite now
routes through the wrapper.

Codex parity: source-hash refresh only (no parallel callsite in
skills-codex/evolve/).

Result: BC3 epic's third wire-up child lands; the LoopReaderPort goes
from "scaffold + adapter" to "operator-script entrypoint". Other
inline readers (oscillation.md, fitness-scoring.md, the prior-failure
injection step) can migrate in follow-up cycles.

Closes soc-y5vh.4.
2026-05-13 23:23:05 -04:00
Boden Fuller 87709a58d4 feat(evolve): wire Step 1.5 healing classifier to BC2 CIStatusPort (soc-y5vh.2)
Cycle 172 of the v2.41-evolve-run loop. /evolve's Step 1.5
healing-first classifier was the last place in the skill's read path
still shelling out to `gh run list`. Routes through the typed BC2
CIStatusPort (cli/cmd/ao/ci_status_adapter.go, cycle 117
productionCIStatus) via `ao ci recent --limit 1` shipped in cycle 145
(soc-y5vh.5).

Two callsites updated in lockstep:
- skills/evolve/SKILL.md (Step 1.5 line)
- skills/evolve/references/convergence-mechanics.md (Mechanism 2 code block)

Result: zero remaining inline `gh` shell-outs in /evolve's hot read
path. The BC3 epic's second wire-up child lands; production
CIStatusPort is now a runtime caller of every cycle's classifier.

Codex parity: skills-codex/evolve/ has no parallel Step 1.5 / CI block,
so only the source-hash drift was synced via scripts/regen-codex-hashes.sh.

Closes soc-y5vh.2.
2026-05-13 23:17:02 -04:00
Boden Fuller aef80a8e78 feat(evolve): wire Step 0 to BC1 CorpusReaderPort via ao corpus inject (soc-y5vh.1)
Cycle 171 of the v2.41-evolve-run loop. /evolve Step 0 "apply retrieved
knowledge" was the only place in the skill still shelling out to the
legacy `ao lookup` command. Routes through the typed BC1
CorpusReaderPort (cli/cmd/ao/corpus_reader_adapter.go, cycle 112
productionCorpusReader) via the operator-facing `ao corpus inject`
command shipped in cycle 146 (soc-y5vh.5).

Result: Step 0 is load-bearing on the typed port — the first BC3 epic
wire-up child to land. CorpusReaderPort is no longer scaffolding-only;
every /evolve run hits it.

Synced to skills-codex/evolve/SKILL.md per the manual-codex-parity
contract; regen-codex-hashes.sh refreshed .agentops-manifest.json and
.agentops-generated.json.

Closes soc-y5vh.1.
2026-05-13 23:02:12 -04:00
Boden Fuller cf83669ca6 fix(skills/release): restore Examples + Troubleshooting after size-limit refactor
Cherry-picked 5cbab078 (release-skill refactor under size limit + non-HEAD
cut support) over-trimmed two required sections — the skill-runtime-formats
check flags '## Examples' and '## Troubleshooting' as mandatory for
user-facing skills.

Adds the sections back as compact inline summaries (pointing to
references/release-workflow-detail.md for the full per-step narration and
full troubleshooting matrix). Codex twin uses \$release notation per the
runtime-format check.

Also folds in a pre-existing evolve codex source-hash drift caught by
regen-codex-hashes.sh.

Mirrors 0fb0b136's skill body changes on the v2.40.0 release branch.
2026-05-13 21:52:06 -04:00
Boden Fuller 8073e12a9e docs(evolve): document local-only status of cycle-history.jsonl + session-state.json
Cycle 67 (criterion-3 baseline capture) and cycle 69 (soc-q796
investigation) discovered that `.agents/evolve/cycle-history.jsonl`,
`.agents/evolve/session-state.json`, `.agents/evolve/fitness-
baseline.json`, and the convergence config are all **local-only**
despite the SKILL.md / cycle-history.md narrative describing them as
the "canonical cycle ledger" with "committed recovery point" wording.

Root cause: the repo contains a nested `.agents/.gitignore` with `*`
+ `!.gitignore` (deny-all-except-self). This nested deny wins over
the outer `.gitignore` allowlists at lines 141-148 per gitignore
precedence rules. Test (cycle 69): moving the outer catch-all does
not enable tracking; the nested file is the real blocker. Path (a)
[fix .gitignore so files are tracked] requires a two-file
coordinated change AND would expose many other now-tracked files —
not a single-concern cycle.

Path (b) [accept local-only, document it explicitly] is what this
commit lands. Updates two skill twin files + their codex mirrors:

- skills/evolve/SKILL.md line 163: appends a sentence noting the
  local-only status and pointing to references/cycle-history.md
- skills/evolve/references/cycle-history.md "Compaction Resilience"
  section: replaces misleading "commits its ledger artifacts to git"
  wording, adds a new "Local-Only Status (Not Git-Tracked)"
  subsection explaining the nested .agents/.gitignore deny and the
  implication that durable milestones MUST be recorded in commit
  messages too
- Mirrored verbatim into skills-codex/evolve/SKILL.md and
  skills-codex/evolve/references/cycle-history.md
- scripts/regen-codex-hashes.sh regenerated content hashes
- audit-codex-parity --skill evolve passes

Why this matters: cycles 44-69 of this evolve session wrote ~26
entries to .agents/evolve/cycle-history.jsonl that no peer can read
from a fresh clone. Operator visibility of "what evolve did" depends
on commit messages, not the cycle ledger. The convergence config's
"current" field (criterion progress) and fitness-baseline.json are
similarly local-only. Future cycles MUST stop treating the local
ledger as authoritative across clones.

Sibling pattern: cycle 58 commit 5a39f7c9 docs(contracts):
ubiquitous-language — same shape: doc-only single-concern with
strong reasoning + codex twin sync + markdownlint clean.

Code-driven fitness:
- Misleading-claim count in evolve narrative: 2 → 0 (cycle-history.md
  + SKILL.md both updated)
- Codex parity drift: 0 (regen-codex-hashes + audit pass)
- pre-push --fast: 0 blocking

Closes soc-q796 (path b chosen as recommended).

Cycle 70 / docs-clarity mode.
2026-05-12 16:51:57 -04:00
Boden Fuller 8798454e3a feat(evolve): wire convergence mechanics — read-path beats write-path
Cycles 44-50 accumulated ~30KB of bookkeeping (cycle-history.jsonl,
daily learning log, retro, hypotheses, evidence files) but produced
0 compounded behavior. Every cycle re-derived the same lesson cycle
44 should have surfaced. The compounding lives in the READ path,
not the write path. Cycles 44-50 had write-only ledgers.

This cycle wires four read-path mechanisms (text-in-SKILL.md +
detail-in-references):

1. **Step 0 prior-failure injection** — read last 3 cycle-history
   entries, extract failure-surface keywords, find matching
   `.agents/learnings/*.md`, print before work selection. The
   2026-05-07 CI-toil learning would have surfaced on cycle 45 if
   this had been wired; instead it sat dormant for 5 cycles while I
   re-hit the same registry-stale pattern.

2. **Step 1.5 healing-first classifier** — `gh run list --limit 1`
   gates the cycle. If last CI was failure, cycle is restorative-only
   (no PG4 promotions / feature work). Eliminates the cycles-46-47
   anti-pattern: PG4 onto red base.

3. **Hypothesis tracking** — `.agents/evolve/hypotheses.jsonl`
   captures skill changes as hypotheses with check_at fields.
   Retroactively labeled cycle 45's 6 patches; 2 already FALSIFIED
   (text-only patches without harness automation): H45.2
   source-surface auto-rebuild and H45.3 grep-based gate parsing.

4. **Convergence STOP** — `.agents/evolve/session-convergence.json`
   defines terminal state (CI green streak ≥ 3, outstanding
   HIGH+MED ≤ 1, fitness ≥ baseline). When met, teardown fires and
   ScheduleWakeup does NOT re-arm. The autonomous loop is bounded
   by criteria, not wakeup count.

Files:
- skills/evolve/SKILL.md (+8 lines, 500 total): Step 0 prior-failure
  injection paragraph + Step 1.5 healing-first classifier section.
- skills/evolve/references/convergence-mechanics.md (NEW, 80 lines):
  full recipe for all 4 mechanisms.
- .agents/evolve/session-convergence.json (local-only, gitignored):
  explicit convergence criteria.
- .agents/evolve/hypotheses.jsonl (local-only, gitignored): cycle
  45's 6 patches labeled, 2 falsified.

Out of scope (deferred):
- The Step 0 prior-failure injection is documented text; actual
  shell automation needs wiring in the harness invocation (separate
  cycle).
- The healing-first classifier is documented; cycle 52+ will execute
  it as Step 1.5 of the next cycle.

Cites:
- 2026-05-07-ci-push-gate-toil-pattern.md (operator-asked at cycle
  48, surfaced by this cycle's retro at .agents/post-mortems/).

Validation:
- bash scripts/audit-codex-parity.sh --skill evolve — PASS.
- bash scripts/generate-registry.sh --check — OK.
- bash skills/heal-skill/scripts/heal.sh --strict skills/evolve — clean.
- bash scripts/pre-push-gate.sh --fast — passed, no FAILED/BLOCKED
  structural markers.
- SKILL.md size: 500 lines (at the > 500 CI threshold; lint = pass).
2026-05-12 10:12:15 -04:00
Boden Fuller cc21ec2d0f feat(skill/evolve): land 6 patches from 13-cycle session friction
Closes the high-severity evolve-postmortem-2026-05-11 next-work entry.
Source rationale: .agents/learnings/2026-05-11-evolve-skill-friction-from-13-cycle-session.md

Patches added to skills/evolve/SKILL.md:
  1. Step 3.0 Scope filter — route wrong-shape work (>5 non-uniform files,
     new shape, operator-epic, or >5 productive cycles in) to scout-mode
     instead of execution.
  2. Step 4 mechanical-batch hint — prefer scripts over N per-file Edits
     when N > 20 uniform candidates.
  3. Step 4 operator-shape carve-out — AskUserQuestion permitted ONLY for
     shape decisions affecting >50 files or schema/contract surfaces.
  4. Step 4.5 Source-surface detection — auto-rebuild cli/bin/ao on
     cli/**/*.go diff; auto sync-hooks on skills/** or hooks/** diff;
     regen codex hashes on skills-codex/** diff.
  5. Step 5 Gate-output parsing — trust structural marker
     `^.*Pass [0-9]+: (FAILED|BLOCKED)` over trailing status line.
  6. Step 7 CONTEXT_BUDGET_EXHAUSTED stop reason — third hard stop
     alongside KILL/STOP and dormancy; context_streak counter in
     session-state.json; honors handoff over re-arm.

Plus structural updates:
- references/autonomous-execution.md: operator-shape carve-out spec and
  ScheduleWakeup self-perpetuation cadence (270s productive / 600s scout
  / 1800s idle) named as the Claude-Code-harness dual of `ao evolve`.
- New references: scout-mode.md, mechanical-batches.md, gate-hygiene.md,
  context-budget.md (each ~50-60 lines, covers the patch detail).
- References list in SKILL.md consolidated to single markdown-link form
  with descriptions (was a duplicate prose + bare-link split).

Sync:
- cd cli && make sync-hooks (embedded skills + hooks refreshed).
- scripts/regen-codex-hashes.sh (codex manifest + .agentops-generated.json).
- bash scripts/audit-codex-parity.sh --skill evolve passes.

Validation:
- skills/heal-skill/scripts/heal.sh --strict skills/evolve: clean.
- pre-push --fast: green, no PRE_PUSH_SKIP_EVAL override needed.
- No `Pass N: FAILED|BLOCKED` structural markers in gate output.
- SKILL.md size: 491 lines (under tier=execution limit 500).
2026-05-12 07:39:24 -04:00
Boden Fuller b4927fcbee feat(practice): pass-3 backfill — 13 more practices: declarations + harvest
Adds practices: frontmatter to 13 next-batch skills: autodev, beads, bootstrap,
codex-team, compile, converter, deps, doc, dream, evolve, grafana-platform-dashboard,
heal-skill, hooks-authoring.

scripts/validate-practice-citations.sh:
  with practices field: 39 (was 26)
  missing practices field: 715 (was 728)
  invalid slug citations: 0

Pass-1 + pass-2 learnings applied: schema accepts practices, codex twins
untouched, .agents/ session artifacts not committed. next-work appended with
pass-4 candidates (uses valid post-mortem-finding source enum).

Local pre-push fast gate: green.

🤖 Generated via /evolve cycle 1.
2026-05-10 20:40:18 -04:00
Bo 19f520f847 Nightly 2026-05-06 — 3 productive cycles, +1 code-driven goal, 94.29 → 100.00 (#235)
* refactor(cli): drop go-complexity-ceiling violators below thresholds

printRegistryTable in cli/cmd/ao/registry.go was at CC=28 against the
cli/ ceiling of 20, and FactoryAdmissionEvaluator.evaluate in
cli/internal/daemon/factory_admission.go was at CC=24 against the
cli/internal/ ceiling of 18. Together they were the only non-test
production functions failing the gate.

Each violator naturally split into independent phases that already
had separate cohesion:

- printRegistryTable: extract a registrySectionEmitters table whose
  rows describe each surface kind (skills/hooks/stores/jobs/evals/
  cli/cadence) plus a small writeRegistrySectionHeader/registry
  SectionShouldShow pair. The parent loops once and gates on the
  active --type filter without repeating the seven if/else blocks.
  CC drops from 28 to 3.

- FactoryAdmissionEvaluator.evaluate: extract collectFactory
  AdmissionEvidence (with one helper per evidence source: repo,
  open-PR blockers, CI baseline) plus parseFactoryAdmissionWindow,
  evaluateFactoryAdmissionWindow, evaluateFactoryAdmissionAggregate.
  The decision-builder reads as a flat sequence of phases and the
  per-source error handling is independently testable. CC drops
  from 24 to 5.

No behavior change. cli/internal/daemon and cli/cmd/ao test suites
both green; ao goals measure flips go-complexity-ceiling fail to
pass and code-driven score 94.29 to 100.00 on this branch baseline.

Cycle 1 of nightly/2026-05-06.

* fix(overnight): align dream RunTimeout cap with config default (6h to 8h)

The dream config default RunTimeout (cli/internal/config/config.go:335)
has been "8h" for as long as the file has existed, and the same value
is hard-coded as the fallback in cli/cmd/ao/overnight.go,
overnight_setup.go, and the resolveStringField default in
cli/internal/config/config.go:969. The runtime cap in
cli/internal/overnight/types.go was 6h, so every default-config dream
run silently clamped to 6h and appended a "RunTimeout clamped to 6h
hard max" entry to summary.json.degraded.

The dream curator then promoted that permanent degraded entry into a
morning packet ("Investigate Dream degradation: RunTimeout clamped to
6h hard max"), which the consumer-side tractability probe correctly
treated as actionable but pointing at session-state files. It re-
emitted on every nightly run because the underlying state never
changed — there was nothing to investigate, the runtime was clamping
its own default.

Fix is one-line: raise maxRunTimeout to 8h to match the prevailing
default. The 6h cap was not load-bearing — it appears nowhere else
in the codebase, and the comment now records why the two values must
move in lockstep.

Add TestRunLoopOptionsNormalize_RunTimeoutMatchesDreamConfigDefault
as a regression. It locks maxRunTimeout to 8h, asserts the default
config passes through unclamped, and asserts an over-cap value still
produces the clamp warning so the safety check is not lost. End-to-
end verified by re-running 'ao overnight start' after the change:
summary.json.degraded no longer contains the clamp entry.

Cycle 2 of nightly/2026-05-06. Resolves the morning packet
dream-3fe168c54c55084b.

* fix(overnight): skip dream session-state paths in target-file probe

probeTargetFilesExist statted every cited TargetFiles path and flagged
the packet stale on the first hit. Every dream-* packet generator
(degraded, metrics-health, retrieval-live) cites its own session-
state output as the target — summary.json, metrics-health.json,
retrieval-bench.json — so after the dream run that emitted the
packet, those files always exist and the probe always said "target
file already tracked".

The downstream effect: each nightly's curator suppressed every dream-*
packet, the stale-rate threshold (50%) tripped, and the curator
emitted a "dream-curator-degraded" entry into summary.degraded that
the degraded-packet generator then surfaced as ANOTHER packet on the
next run. Three of the last four nightlies hit this loop.

Fix: probeTargetFilesExist now skips paths under .agents/overnight/
and .agents/dream/. Those are the dream session-state hierarchy —
files written by the dream run itself, whose presence is not a
signal about whether the packet's underlying issue is resolved. Real
source/contract paths still trigger staleness.

Tests:
- TestProbeDreamPacketStaleness_SessionStateTargetsAreNotStale exercises
  summary.json / metrics-health.json / retrieval-bench.json /
  probe-results.jsonl in both relative and absolute forms.
- TestProbeDreamPacketStaleness_RealSourceTargetIsStale locks the
  inverse so the session-state skip cannot quietly broaden into a
  general escape hatch.

End-to-end verified: re-running 'ao overnight start' after the change
produces 3 actionable morning packets with stale=false in
.agents/dream/probe-results.jsonl, and summary.degraded no longer
contains "dream-curator-degraded: stale packet rate ...".

Also marks the RunTimeout-clamp morning packet from cycle 1 of this
nightly as consumed in .agents/rpi/next-work.jsonl now that the
underlying fix has landed (cycle 2).

Cycle 3 of nightly/2026-05-06.

* chore(nightly): persist final-goals.json for 2026-05-06

* chore(nightly): record inherited canary failures in 2026-05-06 baseline

The agentops-contract-canaries (required) check failed on PR #235 with
6 failing suites. Reproduced locally on origin/main HEAD (7fa6339) with
identical aggregate scores, confirming the failures are not introduced
by this nightly's three cycles.

Per the nightly protocol's "inherited from main" classification: skip
per-job investigation, surface in the baseline artifact, and let the
canary substrate be repaired separately on main.

Inherited canary aggregates (PR #235 and origin/main both):
  cli-command-surface-matrix      0.7917
  distribution-install-update     0.8476
  hook-lifecycle-behavior         0.3571
  pre-push-gate-governance        0.7292
  release-security-gates          0.8214
  runtime-smoke-matrix            0.8952

The 'summary' rollup check inherits as a cascade from the canary
failure.

This is a bookkeeping commit; does not count toward productive cycles.

* fix(skills): link crank worker specs in Codex artifact

* fix(codex): remove mixed-runtime markers from skill artifacts

* fix(contracts): add ao watch event schema

* fix(registry): refresh tracked surfaces after agents cleanup

---------

Co-authored-by: Claude <claude@anthropic.com>
2026-05-07 02:06:28 -04:00
Boden Fuller 7a7a5f054a docs(parity): refresh comparison surfaces for Anthropic Managed Agents launch (epic soc-yjzp Wave 1)
Anthropic shipped dreaming + outcomes + multiagent orchestration + webhooks in
Managed Agents on 2026-05-06. PRODUCT.md's Strategic Bet frames this as the
validation event for the off-API + cross-vendor wedge, not a competitive
threat. Refresh comparison surfaces while the announcement window is fresh.

- docs/comparisons/competition-rpi-memory-pipelines.md: add Anthropic Managed
  Agents (May 2026) section after Karpathy LLM Wiki Pattern; add row to
  comparison matrix; close Bottom Line with off-API + cross-vendor wedge
  (mechanical acceptance: grep for 'off.API|cross-vendor|off the API' in
  the new section returns 3 matches, ≥2 required by pre-mortem fix).
- PRODUCT.md: bump last_reviewed to 2026-05-06; add Managed Agents Dreaming
  and Outcomes rows to Market Convergence table; tweak post-table paragraph
  to namecheck the launch as the textbook example of harness-layer
  commoditization.
- skills/{dream,evolve,forge}/SKILL.md + skills-codex/{dream,evolve}/SKILL.md:
  add cross-vendor analog line so readers arriving from the announcement
  immediately recognize the equivalent.
- skills-codex/*/.agentops-generated.json: hash regen via
  scripts/regen-codex-hashes.sh.

Note: skills-codex/forge/SKILL.md was reverted by a linter (intentional —
likely a template/length constraint upstream); codex-parity-drift and
competitive-freshness gates pass locally.

Closes-issues: soc-yjzp.1, soc-yjzp.2, soc-yjzp.3
Refs-epic: soc-yjzp

Artifacts:
- .agents/design/2026-05-06-design-managed-agents-parity.md (PASS 2.8/3.0)
- .agents/research/2026-05-06-managed-agents-parity.md
- .agents/plans/2026-05-06-managed-agents-parity.md
- .agents/council/2026-05-06-pre-mortem-managed-agents-parity.md (WARN, 6 fixes propagated)
2026-05-07 01:22:40 -04:00
Boden Fuller a7a51f2c16 feat(standards): codify skill tier caps and codex registration 2026-05-03 23:00:11 -04:00
Boden Fuller 1a2ba1d56a fix: bound goals measurement runtime 2026-05-02 12:15:11 -04:00
Boden Fuller 82e9cacc2a Merge branch 'evolve/prep-2026-04-30' into main
# Conflicts:
#	.agents/ao/last-processed
#	.agents/findings/registry.jsonl
#	.agents/learnings/2026-04-07-v2.35.0-release-postmortem.md
#	.agents/learnings/2026-04-19-orchestrator-compression-anti-pattern.md
#	.agents/learnings/2026-04-27-ci-contract-scanners-need-syntax-parity.md
#	.agents/patterns/pre-tag-ci-validation.md
#	.agents/rpi/execution-packet.json
#	.agents/rpi/next-work.jsonl
#	PRODUCT.md
#	README.md
#	docs/index.md
#	skills-codex/.agentops-manifest.json
#	skills-codex/crank/.agentops-generated.json
#	skills-codex/evolve/.agentops-generated.json
#	skills-codex/implement/.agentops-generated.json
#	skills-codex/plan/.agentops-generated.json
#	skills-codex/rpi/.agentops-generated.json
#	skills-codex/swarm/.agentops-generated.json
#	skills/plan/references/plan-document-template.md
2026-05-01 12:52:56 -04:00
Boden Fuller a154b6ffa3 feat(nightly): add RPI auto prompt brief 2026-05-01 09:24:20 -04:00
Boden Fuller 557e4af9ec feat(codex): cap skills-codex description catalog and add --repair-shape audit
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.
2026-04-30 15:16:59 -04:00
Boden Fuller 0496441989 Reduce skill catalog context footprint 2026-04-24 00:52:27 -04:00
Boden Fuller 4e00fcc312 fix(codex): default to skill chaining 2026-04-24 00:11:19 -04:00
Boden Fuller 308c413d39 chore(codex): regenerate hashes for compile/evolve
Syncs skills-codex/ manifest + marker hashes after:
- b662cc9f (mirrored compile decomposition into skills-codex/compile)
- 24e47e87 (removed --queue claims from skills-codex/evolve)
2026-04-15 14:03:18 -04:00
Boden Fuller 24e47e8790 docs(evolve): remove --queue flag claims (flag does not exist)
ao evolve --queue is documented across skills/evolve/SKILL.md and
skills-codex/evolve/SKILL.md but never existed in cli/cmd/ao/evolve.go.
Removes the flag table row, Step 0.1 (Parse Pinned Queue), Step 3.0
(Pinned work queue), Step 4.1 (Blocker Resolution), pinned_queue_*
schema fields, and queue-specific circuit breakers.

Deletes:
- skills/evolve/references/pinned-queue.md
- skills/evolve/references/roadmap-queue-patterns.md
- skills-codex/evolve/references/pinned-queue.md
2026-04-15 13:46:21 -04:00
Bo 1fa3a40b7f docs(evolve): clarify v2 operator loop (#98) 2026-04-12 01:07:19 -04:00
Boden Fuller c421fb3620 fix(evolve): migrate baselines to era directories
Refs na-uuy.15
2026-04-11 20:37:44 -04:00