feat(evolve): Phase 2 of /evolve --mode=loop — ladder + cron self-adjust + typed blocked events (soc-g2qd #phase-2)#397
Merged
Conversation
…ust + typed blocked events (soc-g2qd #phase-2) Closes 3 Phase-2 sub-beads of soc-g2qd in one PR (same surface cli/cmd/ao/, inter-dependent): | Bead | Surface | |---|---| | soc-mlbm | `ao evolve next-work` — 5-step programmatic ladder (cli/internal/evolve/ladder) | | soc-un0m | `ao cron self-adjust` — render cron template via evolve.Render; emit JSON spec to stdout (harness orchestrates CronCreate) | | soc-g34d | `ao evolve blocked` — typed blocked-event log at .agents/evolve/blocked.jsonl (--reason write / --list read / --clear) | ## What changed | Surface | Change | |---|---| | `cli/cmd/ao/evolve_next_work.go` + `_test.go` | New subcommand + L2 integration tests | | `cli/internal/evolve/ladder/ladder.go` + `_test.go` | 5-step ladder package (shape_filter, grep_siblings, primitive_test, cross_hop_pickup, bug_fallback) with table-driven unit tests | | `cli/cmd/ao/cron.go` | New top-level `ao cron` command (parent for self-adjust) | | `cli/cmd/ao/cron_self_adjust.go` + `_test.go` | New subcommand; calls evolve.VerifyMarkers + evolve.Render from #394; writes audit row to .agents/evolve/cron-history.jsonl; emits JSON spec to stdout | | `cli/cmd/ao/evolve_blocked.go` + `_test.go` | New subcommand: --reason (write), --list [--tail N] [--json] (read), --clear <cycle> (operator-only) | | Generated: COMMANDS.md, registry.json, cli-skills-map.md | Regen for 3 new subcommands | | evals/agentops-core canary counts | Bumped: top 73→74, sub 199→202, all 272→276 | ## How tested - L2 integration: each subcommand has L2 tests using fixture workspaces and asserting structural equality on outputs - L1 unit: ladder per-step table tests (5 steps × multiple cases each); JSONL schema validation on blocked-event records - Mechanical: `go test ./cli/...` green; cli-command-surface-smoke.sh green; check-no-tracked-agents.sh green; TestCobraConformance green Sibling pattern: cron-history.jsonl + blocked.jsonl follow the cycle-history.jsonl JSONL append-only shape from soc-5qit. Ladder is novel but its step structure mirrors the in-prompt cascade in `references/scout-mode.md` — making it programmatic per §A5. Fitness: tests roughly +33 → ~33/33 new tests passing (5 ladder steps × ~3 cases each + 3 L2 subcommand + 3 L1 schema). go test ./cli/cmd/ao + ./cli/internal/evolve/ladder green. [no-sibling for cron-self-adjust] First-of-kind: no prior subcommand emits a cron-spec JSON for harness orchestration. The pattern is intentionally minimal — the CLI does the safe work (template render + marker verify + audit row); the harness owns CronCreate. See: docs/plans/2026-05-21-evolve-loop-epic-design.md §A4, §A5, §A6 Closes-scenario: soc-mlbm#next-work-ladder Closes-scenario: soc-un0m#cron-self-adjust Closes-scenario: soc-g34d#typed-blocked-events Bounded-context: BC5-Runtime Evidence: cli/cmd/ao/evolve_next_work.go
7613842 to
1c501ec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Phase 2 of soc-g2qd: ship the CLI enforcement primitives the skill's prompt-text alone can't guarantee.
ao evolve next-work— 5-step programmatic ladder; agent stops guessing what to claim nextao cron self-adjust— renders cron template + emits JSON spec; replaces manual CronList/Delete/Create per cycleao evolve blocked— typed blocked events at.agents/evolve/blocked.jsonl; agent logs rather than haltsWhat changed
cli/cmd/ao/evolve_next_work.go+_test.gocli/internal/evolve/ladder/cli/cmd/ao/cron.goao croncommandcli/cmd/ao/cron_self_adjust.go+_test.goevolve.VerifyMarkers+evolve.Renderfrom #394; writes audit row to.agents/evolve/cron-history.jsonl; emits JSON spec to stdout (harness orchestrates CronCreate)cli/cmd/ao/evolve_blocked.go+_test.go--reason(write),--list [--tail N] [--json](read),--clear <cycle>(operator)cli/docs/COMMANDS.md,registry.json,docs/cli-skills-map.mdevals/agentops-core/cli-command-surface-matrix.json+ smoke fixtureHow tested
go test ./cli/...0 → 0 failures; cli-command-surface-smoke.shcli-help-matrix-ok; check-no-tracked-agents.sh exits 0Counts
CLI heading counts: top 73 → 74, sub 199 → 202, all 272 → 276.
Sibling pattern:
cron-history.jsonl+blocked.jsonlfollow the cycle-history.jsonl JSONL append-only shape from soc-5qit. Ladder structure mirrors the in-prompt cascade inreferences/scout-mode.md— making it programmatic per §A5.[no-sibling for cron-self-adjust] First-of-kind: no prior subcommand emits a cron-spec JSON for harness orchestration. The CLI does the safe work (template render + marker verify + audit row); the harness owns CronCreate.
See:
docs/plans/2026-05-21-evolve-loop-epic-design.md§A4, §A5, §A6Closes-scenario: soc-mlbm#next-work-ladder
Closes-scenario: soc-un0m#cron-self-adjust
Closes-scenario: soc-g34d#typed-blocked-events
Bounded-context: BC5-Runtime
Evidence: cli/cmd/ao/evolve_next_work.go