feat(evolve): per-repo preferences.yaml schema + loader + ao evolve config --show (soc-6svt #preferences-yaml)#396
Merged
Conversation
…onfig --show (soc-6svt #preferences-yaml) Phase 1 of the soc-g2qd epic. Different repos need different /evolve physics. Hardcoded defaults force ADRs per-repo to override; per-repo YAML separates skill-doctrine from repo-policy. New surfaces: - schemas/evolve-preferences.v1.schema.json — JSON Schema draft-07 - cli/internal/evolve/preferences.go — typed loader with file:line errors - cli/cmd/ao/evolve_config.go — new ao evolve config --show [--json] - .agents/evolve/preferences.yaml.template — operator starter template - .gitignore — negate the template path so it ships in the repo Resolution order: defaults < preferences.yaml < CLI flag (caller-applied) Invalid keys, types, or out-of-range values exit 1 with 'preferences.yaml:line:column' context. No silent fallback. Closes-scenario: soc-6svt#preferences-yaml Bounded-context: BC5-Runtime Evidence: cli/internal/evolve/preferences.go
… subcommand (soc-6svt) Mechanical drift fix: the new `ao evolve config --show` subcommand from the parent commit drifted `cli/docs/COMMANDS.md` (TestCobraConformance fail) and `registry.json` (registry-check job fail). Both regenerated via project's standard scripts. Sibling pattern: matches the COMMANDS.md regen pattern from W1a's soc-hwax PR (#395) — same TestCobraConformance signal, same fix. Fitness: CI failures 5 → expected 3 (cli-docs-parity + registry-check clear; agentops-contract-canaries may need a baseline refresh in a follow-up commit).
…olve config subcommand (soc-6svt) The cli-command-surface-matrix canary hardcodes the count of top/sub/all command headings in cli/docs/COMMANDS.md. After this PR's `ao evolve config` subcommand: - top=73 → 73 (unchanged; new command is a subcommand, not top-level) - sub=197 → 198 (+1: `ao evolve config`) - all=270 → 271 (+1) Sibling pattern: matches how PR #390 (soc-vuu6.25 ao session bootstrap) bumped the same fixture when ao session bootstrap landed. Fitness: agentops-contract-canaries 1 failure → 0; cli-command-surface-smoke.sh passes locally (`cli-help-matrix-ok` emitted).
…tamp (soc-4ake)
The "compressed cycle ledger truncates notes to 140 chars" test (tests/scripts/export-session-summary.bats:71) wrote a cycle dated 2026-05-20T10:00:00Z and ran export-session-summary.sh which defaults to a 24h window. After 2026-05-21 that date falls outside the window and the test fails ("grep cycle 1 failed"). This bug was already filed as soc-4ake; #396 surfaced it because bats-tests runs on this PR.
Fix: replace the hardcoded date with `$(date -u +%Y-%m-%dT%H:%M:%SZ)` so the cycle always falls inside the default window.
Sibling pattern: matches the dynamic-now pattern in `write_cycle` callsites of other test files (e.g., tests/scripts/*.bats that use $(date)).
Fitness: bats-tests 1 failure → 0; export-session-summary.bats 11/11 passing locally.
Drive-by fix justification: #396 cannot merge without bats-tests green, and the bead (soc-4ake) was already filed against this exact test:line. Closing soc-4ake atomically with this commit.
boshu2
added a commit
that referenced
this pull request
May 21, 2026
…nces.yaml.template (soc-6svt follow-up) PR #396 (soc-6svt, just merged) introduced .agents/evolve/preferences.yaml.template as the operator starter template, plus a .gitignore negation to commit it. plugin-load-test was path-filtered to skip on #396 so the violation didn't surface — but it surfaces on this PR (#395), blocking soc-hwax's merge. The template is intentional state per the soc-g2qd epic design (docs/plans/2026-05-21-evolve-loop-epic-design.md §A2 — preferences.yaml shipping path). Adding it to the audit-truth allowlist alongside cycle-history.jsonl and session-state.json (the other two .agents/evolve/* tracked paths). Coordinated update: both ALLOWED_PATHS_REGEX (tracked-file check) and ALLOWED_REINCLUDES_REGEX (.gitignore negation check) get the new path. .gitignore already has the matching `!/.agents/evolve/preferences.yaml.template` line from #396. Sibling pattern: matches the way reconcile/* paths were added when the Reconciliation Engine arc shipped (comments in the script reference that addition). Fitness: plugin-load-test 1 failure → 0; check-no-tracked-agents.sh exits 0 locally.
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
Different repos have different /evolve physics. Hardcoded defaults force ADRs per-repo to override. Per-repo YAML separates skill-doctrine from repo-policy.
What changed
schemas/evolve-preferences.v1.schema.jsoncli/internal/evolve/preferences.goLoad(ctx) (*Prefs, error)with file:line error contextcli/cmd/ao/evolve_config.goao evolve config --show [--json]subcommand.agents/evolve/preferences.yaml.template.gitignoreResolution order
defaults < preferences.yaml < CLI flag (caller-applied)
Invalid keys/types -> exit 1 with
preferences.yaml:line:colcontext. Never silent fallback.How tested
ao evolve config --showexits 1, stderr has file:linepreferences.Load()table tests cover defaults, valid, invalid types, out-of-range, unknown keysgo test ./cli/internal/evolve/ ./cli/cmd/ao/green (299+ tests across both)See: docs/plans/2026-05-21-evolve-loop-epic-design.md §A2 (created by parallel worker W1a in soc-hwax PR)
Closes-scenario: soc-6svt#preferences-yaml
Bounded-context: BC5-Runtime
Evidence: cli/internal/evolve/preferences.go