Commit Graph

77 Commits

Author SHA1 Message Date
Bo c639d2a52e docs(architecture): canonize the agent-factory spine + membrane-first North Stars (ag-yv25 #canonize-spine) (#758)
## What

Canonizes the **agent-factory architecture spine** — the foundational
document that guides the build. AgentOps as a Kubernetes-style control
plane for the first *stochastic, untrusted* workload (AI agents).

- **`docs/architecture/the-agent-factory.md`** — thesis, control/data
plane, the **AgentPod / SwarmJob / Volume** compute model, **Roles ×
Primitives** (RBAC × canon function × primitive — naming the
verification role the **Oracle**), the **one-way / two-way door
register**, the **cost law** (tokens follow reversibility), the honest
boundaries, and the dependency-ordered build sequence.
- **`docs/architecture/the-agent-factory.feature`** — the architecture
fitness functions (`@enforced` vs `@to-build`).
- **`GOALS.md`** — North Stars now lead with the **verification
membrane**; the knowledge flywheel demoted to the compounding layer
beneath it.

## Why this is wave 1 of `ag-yv25`

This is the **canonize** wave. Fitness gates (wave 2) and the keystone
wiring (wave 3) remain open under the epic. The build proceeds
foundation-up: `ag-o2tc` (HA store) → `ag-egpu` (workload-object API) →
`ag-v1xk` (reconcile controller) → scheduler / self-healing.

## Review provenance (dogfood)

Reviewed *through the membrane* across **three cross-model council
passes** (Opus 4.8 + gpt-5.5): the architecture verdict, the Pod-model
debate (converged on AgentPod), and the final whole-spine pass — **both
vendors endorse**. Verified against the kernel (`liveness.Disjoint`,
`quorum.CheckSignificantAction`, the `roleCapabilities` matrix). Per
`liveness.SignificantActionDocCanonization`, canonizing this doc is
itself a membrane-gated action.

Closes-scenario: ag-yv25#canonize-spine
Bounded-context: BC5-Runtime
Evidence: .agents/council/2026-06-05-verdict-the-agent-factory.md,
.agents/council/2026-06-05-debate-pod-model.md,
.agents/council/2026-06-05-verdict-final-spine.md
2026-06-05 17:12:52 -04:00
Bo 4e4842865d feat(goals): anti-regeneration fitness goal — teardown-removed apparatus stays removed (ag-8ok #anti-regen) (#591)
3.1 teardown **keystone** (ag-8ok), discovered-from ag-097. Makes
subtraction a *measured* fitness outcome so the `/evolve` loop can't
quietly rebuild what the teardown removed.

### The design (NOT a size metric — that's a GOALS.md Anti-Star)
GOALS.md "## Anti Stars" forbids "Goals that measure code metrics
instead of user outcomes." So this is a **stay-removed guard**, not a
"fewer lines/files/jobs is better" ratchet: it fails *only* when a
surface the teardown explicitly removed comes **back**. Legitimate new
growth is fine; only regrowth of specifically-removed apparatus fails.
That's a real outcome ("the slop we removed stays removed"), not a size
metric.

This session is the live evidence ag-8ok predicts: planning regenerated
duplicate P1 beads (ag-cbt/ag-2oi) faster than the system pruned.
Without an anti-regeneration signal, the loop's merge=reward incentive
re-grows apparatus.

### What changed (additive only)
- `scripts/check-no-apparatus-regrowth.sh` — reads a manifest of removed
paths; exit 0 if all stay gone, exit 1 (per-path message) on regrowth.
`--json`/`--manifest`/`--root` flags.
- `scripts/removed-apparatus.txt` — the data-driven manifest (5
surfaces: wikiworker #589, plans/worker #581, gascity + bridge/gc.go
#590). Future teardown waves append here in the same change that lands
the deletion.
- `GOALS.md` — one measurable goal (`no-apparatus-regrowth`, weight 5)
wired to the script + one strategic Directive (D15,
`d-teardown-removed-apparatus-stays-removed`), framed as an outcome. No
North/Anti-Star edits.
- `tests/scripts/check-no-apparatus-regrowth.bats` — 8 tests
(PASS-when-absent, FAIL-when-regrown, json, missing-manifest, and a
guard that the real committed manifest passes on the real tree).

### Verification
- `bash scripts/check-no-apparatus-regrowth.sh` → PASS, all 5 stay
removed, exit 0
- `bats` 8/8 · `shellcheck` clean
- `ao goals measure` (built from source) surfaces
`no-apparatus-regrowth: PASS`; `--directives` lists D15; `goals
validate` valid

Closes-scenario: ag-8ok#anti-regen
Bounded-context: BC1-Corpus
Evidence: spec/teardown-2026-05-28/
2026-05-28 20:44:39 -04:00
Bo 8af560f678 fix(ci): reconcile hookless gates and flywheel snapshot
Squash merge PR #546. Local evidence: doc-release, smoke, snapshot gate, pre-push Bats, snapshot Bats, structural gates, and pre-push --fast passed. PR GitHub Actions were blocked in runner setup by GitHub codeload/action download failures before repository code executed. Snapshot records current corpus as DECAYING rather than preserving stale compounding evidence.
2026-05-26 08:19:50 -04:00
Bo 1ba0ca8120 feat(rip)!: kill schedule/plans/watch/overnight commands+engines — GC owns scheduling (soc-2rtm0 #kill-schedule-overnight wave3-4) (#514)
Wave 3+4 of the soc-2rtm0 orchestration-substrate rip. Operator
decision: **kill the schedule/plans/watch/overnight commands AND their
engines entirely** — GC owns all scheduling/overnight/watch; AgentOps
keeps only rpi/evolve/crank/swarm as loops.

## Killed (commands + engines)
- `cli/cmd/ao/`: `overnight*.go` (overnight, council, curator, packets,
setup, longhaul, daemon, tier1), `dream_subcycle.go`, `schedule.go`,
`watch.go`, `plans*.go` (+ all tests).
- `cli/internal/schedule/` — clean delete (only `schedule.go` +
`agentopsd.go` imported it).
- `cli/internal/overnight/` — the overnight engine, deleted whole.
- Daemon refs severed (daemon stays, wave 5): removed `agentopsd.go`
dream-executor + crash-recovery + `--schedule-file` loading; removed the
`dream` soak scenario.
- Removed `ao init --with-schedule` (seeded config for the now-dead
daemon scheduler).
- Retired the `dream` skill (claude + codex) to a GC-pointer stub.

## KEEP-feature severance (HARD CONSTRAINT)
- **harvest** (KEEP): lock helpers
(`LockIsStale`/`ReadLockPID`/`ProcessAlive`/`WriteLockPID`)
**extracted** from `overnight/recovery.go` into new
`cli/internal/lockfile` package; `harvest.go` repointed. Generic
process-lock machinery, not overnight-specific.
- **forge** (KEEP): `writeJSONAtomic` + `buildCuratorID` + curator-queue
types **extracted** into `cli/cmd/ao/forge_curator_id.go`; forge
curator-queue enqueue path preserved.
- **evolve** (KEEP): the `--dream-first`/`--dream-only` Phase-1 dream
sub-cycle was **severed** (capability genuinely overnight/dream-only).
**LOST CAPABILITY** — flagged below.
- `forge/runmine.go` + `wiki/artifact.go` only referenced overnight in
comments (no real import) — untouched.

## CI gates / docs / fixtures reconciled
- Removed `dream-end-user-coverage` GOALS gate +
`scripts/check-schedule-example.sh` + `schedule.yaml.example` +
`goals-affects-files.yaml` entry; updated GOALS Directive #8.
- Fixed `cli-command-surface` canary: heading counts 72/194/266 →
68/179/247, dropped deleted `plans.go` artifact check.
- Deleted `dream-software-factory-operator` eval; dropped deleted
`plans.go` check from `session-continuity-context` eval.
- Regenerated `COMMANDS.md`, `cli-skills-map.md`, `registry.json`;
regenerated codex hashes.
- No dedicated validate.yml/ci-jobs.yaml job existed for these surfaces
(verified) — `validate-ci-policy-parity` stays PASS.

## Lost capability (flagged)
- `ao evolve --dream-first` / `--dream-only` (run the
knowledge-compounding dream loop before/instead of code cycles) is gone.
Knowledge compounding now runs out-of-session via GC. The nightly-CI
dream-cycle proof job (built on KEEP harvest/forge/inject/defrag
primitives) is unaffected.

## Verification (all green)
`cd cli && gofmt -l` clean · `go build ./...` · `go vet ./...` · `go
test ./...` (zero FAIL) · `tests/smoke-test.sh` ·
`tests/cli/test-json-flag-consistency.sh` (0 errors) ·
`scripts/test-agentops-contract-canaries.sh` (**failures=0**) ·
doc-release gate · `heal --strict` clean · skill-lint · codex parity ·
ci-policy-parity.

## Follow-up (out of scope, build-green-safe to defer)
Narrative docs (`docs/scheduling.md`, `docs/ARCHITECTURE.md`,
comparisons, etc.) still mention the killed `ao overnight`/`ao schedule`
commands in prose. No CI gate validates ao-subcommand existence in
narrative docs, so these do not block; a doc-sweep is a separate
follow-up.

Closes-scenario: soc-2rtm0#cascade-rip
Bounded-context: BC5-Runtime
Evidence: .agents/discovery/2026-05-24-rip-caller-map.md
2026-05-24 14:56:20 -04:00
Bo ee748d580d feat(rip)!: retire factory command + contract corpus (soc-2rtm0 #cascade-rip) (#512)
**Wave 1 of the orchestration-substrate cascade rip** (soc-2rtm0). The
full cascade (daemon + dream/overnight + schedule/plans/watch + gc-glue
+ factory) is ~50K LOC across deeply-entangled packages — far past one
reviewable PR. Per the bead's slice directive and the recon map's
serial-by-wave verdict, this ships as sequential PRs by wave. **This is
the factory wave** (the only cleanly-disjoint slice — no KEEP-feature
entanglement).

## What this retires (operator-confirmed FULL factory retire)

**Go command surface** (no external non-test caller — clean delete):
- `cmd/ao/factory.go`, `factory_admit.go`, `factory_pilot.go`,
`factory_admission_adapter.go` (+ all tests)
- `internal/ports/factory_admission.go` +
`inmemory_factory_admission.go` (+ test) — the port was only wired to
the daemon by the deleted production adapter
- severed factory flag save/restore + command-tree assertions from
`cobra_commands_test.go` / `testutil_test.go`

**Contract corpus** (scripts, schemas, contract docs, runbooks,
fixtures, tests):
- `scripts/check-factory-{admission,claim-ledger,yield-ledger}.sh`
- `schemas/factory-{admission,work-order,yield}.v1.schema.json`
- `docs/contracts/factory-{admission,claim-ledger,yield-ledger}.*`
-
`docs/runbooks/{factory-manual-merge,daemon-factory-admission,cloud-frontier-pilot}.md`
- `tests/e2e/factory-operator-canary.sh`,
`tests/integration/test-factory-claim-ledger-ci-job.sh`,
`tests/scripts/test-factory-admission-contracts.py`,
`tests/fixtures/factory-*`
- orphaned `aggregate-observation-log` subsystem (script + integration
test + fixtures) — its only data source was the deleted
`factory-claim-ledger-strict` CI job

**CI / generated reconciliation:**
- removed 3 factory jobs from `validate.yml` (+ both `needs:` arrays +
verdict echoes); removed entries from `ci-jobs.yaml`; regenerated
`AGENTS-CI.md` (63 jobs)
- removed factory gate-ids from `GOALS.md`; trimmed
`contracts-structural-floor` factory references
- regenerated `registry.json` (177→174 CLI commands), `COMMANDS.md` (−70
lines), `cli-skills-map.md` (73→72 headings)
- updated `cli-command-surface-matrix` canary spec + fixture counts
(`top=72 sub=194 all=266`); scrubbed deleted-file links from
`documentation-index.md`, `SCHEMAS.md`, `contracts/index.md`,
`agentopsd-control-plane.md`, `insert-schema-practices.py`

## Deliberately left for the daemon-carve wave
Daemon-owned factory job types (`factory.admission`,
`factory.local-pilot`) and the `agentopsd` routing-policy schema remain
— they belong to `internal/daemon/` and retire when the daemon does.

## Gates verified green locally
`gofmt`/`go build`/`go vet`, full Go test (**11830 pass**),
`validate-ci-policy-parity`, `contract-compatibility`,
`contracts-structural-floor`, `registry --check`, `doc-release` (0
broken links), `smoke-test`, `json-flag-consistency` (0 errors),
**`contract-canaries` (failures=0)**, codex-hashes, `pre-push-gate.bats`
(55).

Diff: 66 files changed, ~16 insertions / ~5680 deletions.

Closes-scenario: soc-2rtm0#cascade-rip
Bounded-context: BC5-Runtime
Evidence: .agents/discovery/2026-05-24-rip-caller-map.md
2026-05-24 12:29:22 -04:00
Bo 74ea26d13d feat(goals): link strategic directives to scenarios (soc-m8tdn #directives-scenarios) (#486)
## What

All 14 GOALS.md strategic directives reported `zero-scenario-directive`
warnings under `ao goals scenarios --lint` (the warn-only
`executable-spec-link-integrity` / F1.6 gate) because none carried a
linked active scenario — `ao goals measure --directives` showed every
directive at 0/0 scenarios.

This links each of the 14 directives to a schema-valid, status=`active`
promoted spec scenario using the canonical non-lossy linker `ao goals
scenarios --create ... --status active`. That command:

- assigns each directive a stable `directive_id` (e.g.
`d-gate-the-install-path`),
- authors one scenario per directive under `spec/scenarios/` carrying
the directive's `directive_id` (bidirectional link), and
- patches each directive's `**Scenarios:**` line via the byte-level
non-lossy patcher.

Each scenario `goal` is a real Given/When/Then acceptance grounded in
that directive's actual CI gate or steer metric (smoke-test suites,
install-smoke, validate-quarantine-empty, flywheel-lifecycle,
go-complexity, codex-parity, nightly dream-cycle, close-loop skill
drafts, workbench eval, check-loop-shape, corpus snapshot/restore,
agent-ergonomics, reinforcement contract) — not filler.

## Verification

| Check | Before | After |
|---|---|---|
| `ao goals scenarios --lint` | `0 error(s), 14 warning(s)` (all
`zero-scenario-directive`) | `No executable-spec link defects found.` |
| `ao goals scenarios --lint --strict` | (would fail) | clean, exit 0 |
| `ao goals validate` | exit 0 | exit 0 |
| markdownlint GOALS.md | — | 0 errors |
| scenarios vs `schemas/scenario.v1.schema.json` | — | 14/14 validate |
| `go test ./internal/goals/... ./internal/scenario/...` | — | 416 pass
|

GOALS.md diff: **+28 insertions / 0 deletions** (non-lossy — 14
directives × blank line + `**Scenarios:**` line). No code, no
`validate.yml`, no `registry.json`, no hooks touched.

Closes-scenario: soc-m8tdn#directives-scenarios
Bounded-context: BC1-Corpus
Evidence: GOALS.md
2026-05-23 20:10:54 -04:00
Bo 4dd53dffa3 docs(3.0): canonical 3.0 north star + weave into sources of truth (soc-25sgs #3.0-north-star) (#468)
W0 of the 3.0 reconciliation (operator-ratified). Grounds the repo
before reconciliation work.

- **docs/3.0.md (NEW)** — single source of truth: the SDLC↔CDLC loop
(BDD/Gherkin planning → tests → bounded build through ports → both-ends
behavior+contract validation → feedback → ratchet), the
BDD/DDD/Hexagonal/TDD waist, context density, and a precise
hookless-first explanation (hooks = quiet adapters, not
noise-injectors). + 3.0-ready acceptance + non-goals.
- Woven into README, PRODUCT.md, GOALS.md, CLAUDE.md,
docs/documentation-index.md, mkdocs.yml nav.

Pure grounding: no code, no bead closes, no features. Links verified;
additions-only.

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

Closes-scenario: soc-25sgs#3.0-north-star
Bounded-context: BC1-Corpus
Evidence: docs/3.0.md
2026-05-23 09:27:56 -04:00
Bo 2686e657b8 feat(goals): add the reinforcement-contract directive (soc-i653o #goals-reinforcement-contract) (#417)
soc-tk1d behavior-science frame, **surface 4/4 — FINAL**. Encodes the
*consequence* half of behavior shaping as a strategic directive /evolve
measures against.

- GOALS.md directive #14 'Every behavior has a consequence
(reinforcement contract)': gates=reward, ratchet=lock-in, extinguish by
removing cue+reward (not prose), gateless behavior drifts, promotion is
operator-applied
- Distinct from directive #12 (intent-shape); #14 is the consequence
system. Warn-only doctrine — reuses #12's signals, no new gate

⚠️ HAND-EDITED, not via `ao goals steer add` — that CLI round-trips
GOALS.md **lossily**: it deleted the entire Three-Gap Contract Proof
Surface section, the Gates table, and a claim marker. Caught in
adversarial self-review (40+/61- diff anomaly). Bug filed.

How tested: `ao goals measure --directives --json` surfaces #14; final
diff +8/-0; Three-Gap + Gates table + claim marker verified intact.
Fitness: behavior-science surfaces 3/4 → 4/4.

Closes-scenario: soc-i653o#goals-reinforcement-contract
Bounded-context: BC5-Runtime
Evidence: GOALS.md
2026-05-22 15:50:32 -04:00
Bo 1f0e545a51 Executable spec layer (epic soc-58nt, F2–F5): GOALS as BDD acceptance criteria (#292)
* feat(goals): F2.0 scenario-result artifact contract + producer/writer

bead: soc-58nt.2.6

* docs(goals): F4.0 trace link convention ADR-0005

bead: soc-58nt.4.8

* docs(goals): F3.0 domain-slice manifest contract + ADR-0004

bead: soc-58nt.3.8

- schemas/domain-slice-manifest.v1.schema.json: JSON Schema (draft/2020-12,
  additionalProperties:false) for domain-slice manifests. All required fields:
  domain, version, bounded_context, directive_ids (d-<slug> pattern), scenario_ids,
  context_roots, allowed_read_globs, denied_read_globs, validation_commands, owner.
- docs/adr/ADR-0004-domain-slice-manifest-contract.md: records four decisions:
  (A) command shape is ao rpi phased --domain <name>; (B) manifest is durable
  tracked artifact at docs/domains/<name>/manifest.yaml; (C) reconciles with the
  domain skill (vocabulary), context-map.md (architecture view), and skill
  frontmatter — no overlap; (D) Go model named domainSliceManifest, explicitly
  distinct from rpi_phased_manifest.go's phaseManifest. Cross-references ADR-0003.
- docs/domains/README.md: explains the directory, field table, relationship to
  the three pre-existing domain surfaces, and how to add a new slice.
- docs/domains/example/manifest.yaml: fully populated example; validated against
  the schema via jsonschema (PASSED).

* feat(goals): F2.1 scenario-result aggregation reader

bead: soc-58nt.2.1

* feat(rpi): F3.1 domainSliceManifest model + loader

Implements the domainSliceManifest Go model and loader in
cli/internal/domainslice/ per the F3.0 contract (ADR-0004, Decision D).
Uses gopkg.in/yaml.v3 with KnownFields(true) to reject unknown fields,
mirrors the schema's additionalProperties:false. Validates all required
fields, directive_id pattern (^d-[a-z0-9][a-z0-9-]*$), context_roots
minItems:1, and validation_commands sub-fields with field-named errors.
Explicitly distinct from phaseManifest (rpi_phased_manifest.go).
28 tests pass (L1 unit + L2 fixture round-trip via docs/domains/example/manifest.yaml).

bead: soc-58nt.3.1

* feat(goals): F4.1 read-only executable-spec trace graph walker

bead: soc-58nt.4.1

* feat(goals): F2.2 per-directive scenario_satisfaction + threshold verdict

bead: soc-58nt.2.2

* feat(rpi): F3.2 ao rpi phased --domain scoping

bead: soc-58nt.3.2

* feat(goals): F4.2/F4.3 ao goals trace --from / --orphans

beads: soc-58nt.4.2 soc-58nt.4.3

* feat(goals): F4.4 ao goals render — GOALS.md to Gherkin

bead: soc-58nt.4.4

* feat(rpi): F3.3a domain-scope audit evidence

bead: soc-58nt.3.3

* feat(goals): F2.3 scenario_satisfaction JSON field + --scenarios-only

Per-directive scenario satisfaction added to ao goals measure: 0 -> 8
new JSON fields and a --scenarios-only mode that skips gate execution.

bead: soc-58nt.2.3

* feat(rpi): F3.4 ao rpi phased --scaffold-domain

bead: soc-58nt.3.4

* test(goals): commit missing goals-trace scenario-results fixture

The F4.1/F4.2 walker tests reference a scenario-results.json fixture under
a gitignored .agents/ subpath; it was never force-added and a clean
checkout (and CI) lacks it, failing 5 scenario_result tests. Force-add it.

bead: soc-58nt.4.1

* fix(goals): F4.1 tighten goalstrace scenario-claim heuristic

bead: soc-58nt.4.9

- Tighten scenarioTokenRe: auto- tokens now require at least two
  hyphen-separated slug segments (auto-X-Y…), so single-word English
  compounds like auto-merge and auto-update are no longer matched.
- Downgrade broken_bead_scenario_claim from error to warning when the
  claim comes from a heuristic (ConfidenceLow) free-text match; per
  ADR-0005 §4.1 only an explicit Scenarios: line constitutes a broken
  explicit link and may produce an error.
- Add beads_test.go with table-driven tests covering: English auto-*
  false-positive rejection, real multi-segment auto-* ID detection,
  explicit missing scenario → error, heuristic missing → warning only,
  resolvable scenario → no defect, end-to-end Walk with auto-merge bead
  produces no error-severity finding.

* test(goals): F2.T1 regression-coverage audit + gap fill

bead: soc-58nt.2.4

* ci(goals): F1.6 wire executable-spec link lint + trace-orphans (warn-first)

bead: soc-58nt.1.9

* feat(rpi): F3.3b runtime hook enforcement of domain scope

bead: soc-58nt.3.9

* test(goals): F2.T2 e2e script for scenario-satisfaction gate

bead: soc-58nt.2.5

* docs(goals): F5.0 re-steer policy + mutation-safety contract (ADR-0006)

bead: soc-58nt.5.9

* docs(goals): fix streak-reset prose in ADR-0006 (cleanup)

bead: soc-58nt.5.9
[no-sibling] prose fixup only, no structural change
0 → 0 schema fields changed

* test(goals): F4.T1 regression-coverage audit + gap fill

bead: soc-58nt.4.6

* feat(wiki): land wiki bounded context waves 1-4 (epic soc-behj)

Phased strangler consolidating ao's .agents/-touching logic into one
cli/internal/wiki bounded context. Each wave gated by the 102 cmd/ao
integration tests staying green; legacy command surface untouched.

- W1 soc-1lju  FrontmatterCodec — all 5 frontmatter parsers delegate
- W2 soc-36lw  CorpusLocator — agentsDirIn moved, 17 call sites migrated
- W2 soc-f4tr  Artifact + Claim domain types with subtype invariants
- W3 soc-vot0  persistent WikiIndex — JSONL, incremental by content-hash
- W3 soc-r08p  FreshnessPolicy — claim-level evidence-driven freshness
- W4 soc-ijp8  WikiPipeline — subsumes llmwiki loop, 3 stages wired
- W4 soc-q50a  port conformance suite

Also anchors .gitignore's bare wiki/ pattern with a !cli/internal/wiki/
negation — the new package was being silently ignored.

Wave 5 (ao wiki command group) is not included in this commit.

* test(goals): F4.T2 e2e script for trace chain

bead: soc-58nt.4.7

* test(rpi): F3.T1 regression-coverage audit + gap fill

bead: soc-58nt.3.6

* test(rpi): F3.T2 e2e script for domain-scoped RPI

bead: soc-58nt.3.7

* feat(goals): F5.1 verdict ledger schema + writer

bead: soc-58nt.5.1

* feat(goals): F5.2 re-steer policy engine + verdict-ledger producer hookup

bead: soc-58nt.5.2

* feat(goals): F5.4 feedback-to-learning compiler

Adds cli/internal/feedbackcompiler — scans the verdict ledger for
fail->pass directive transitions and drafts a learning entry in
docs/learnings/ for each transition found. Drafts carry status: draft
and directive_id frontmatter (ADR-0005 §2.6). Never auto-promotes.
Idempotent: skips existing drafts on re-run.

Also documents the auto-draft workflow in
skills/forge/references/feedback-compiler-drafts.md with a compact
reference-link in skills/forge/SKILL.md (under 248-line limit).
Synced to skills-codex/forge/ and regenerated codex hashes.

bead: soc-58nt.5.4

* docs(goals): F5.5 compound-engineering retro in /post-mortem

Extend the /post-mortem skill with a Compound-Engineering Retro section
that compares iteration N vs N-1 for a domain slice using the F5.1 verdict
ledger (.agents/goals/verdict-ledger.json). The mode emits a comparative
delta — directives that improved (fail→pass, satisfaction up), regressed
(pass→fail, satisfaction down), or held stable — plus learning yield since
N-1, written as a status:draft learning to .agents/learnings/.

Detailed step-by-step procedure (CE.0–CE.5) lives in
references/compound-engineering-retro.md; SKILL.md carries a compact
trigger/commands summary and links to it. Both files synced to
skills-codex/post-mortem/ with updated codex hashes.

bead: soc-58nt.5.5

* feat(goals): F5.3 ao goals steer --auto with human-gated confirmation

bead: soc-58nt.5.3

* test(goals): F5.T1 regression-coverage audit + gap fill

bead: soc-58nt.5.7

* test(goals): F5.T2 e2e script for auto re-steer

bead: soc-58nt.5.8

* docs(goals): F2.4 docs regen for scenario-satisfaction gate + epic CLI artifacts

Regenerate cli/docs/COMMANDS.md and registry.json from a clean worktree at
HEAD so the soc-58nt command surface is documented without leaking unrelated
peer WIP into the generated docs.

F2 (soc-58nt.2.7): document scenario_satisfaction JSON shape, --scenarios-only,
result-artifact resolution, and exit codes in skills/goals/SKILL.md +
references/executable-spec-chain.md; cross-ref ao goals measure/trace from
skills/scenario/SKILL.md.

Epic-wide artifacts also landed here because they regenerate atomically across
F2-F5: COMMANDS.md/registry.json (all new ao goals/rpi surface), cli-skills-map
heading count, skills-codex hashes, ADR-0004/0005/0006 documentation-index
links, and the F2-F5 e2e CI lanes in validate.yml.

ao capabilities and ao robot-docs need no manual edits — both build their
command/flag surface from the live cobra tree, so new commands register
automatically (Global Rule G5 satisfied by construction).

bead: soc-58nt.2.7

* docs(domain): F3.5 domain-as-loop docs for domain-scoped RPI

Document the domain-slice runtime in skills/domain/SKILL.md (a "Domain as a
scoped RPI loop" section connecting the Slice primitive to ao rpi phased
--domain / --scaffold-domain / --force) and add the Domain-Slice row to the
modes table in skills/scaffold/SKILL.md, mirroring the existing Project/
Component/CI mode-row shape. The scaffold skill's Domain-Slice Mode section
already covered the workflow; this lands the missing modes-table entry so the
mode count is 3 -> 4.

The COMMANDS.md/registry/CI-lane regen for F3 landed in soc-58nt.2.7.
skills-codex hashes for the two changed skills refreshed via
scripts/regen-codex-hashes.sh; codex-parity audit clean.

bead: soc-58nt.3.5

* docs(goals): F5.6 re-steer loop docs in /post-mortem

Cross-reference the auto re-steer loop from the Compound-Engineering Retro
section of skills/post-mortem/SKILL.md: when the compound retro names a
chronically regressing directive, ao goals steer recommend prints
policy-driven directive mutations from the same verdict ledger and ao goals
steer apply writes the mutation to GOALS.md, human-gated via the non-lossy
patcher (ADR-0006). Mirrors the existing "closing the loop" cross-ref shape
used elsewhere in the skill's See Also prose.

The ao goals steer recommend/apply COMMANDS.md surface, the F5 e2e CI lane,
and the ADR-0006 documentation-index link landed atomically in soc-58nt.2.7's
epic-wide regen; the re-steer contract detail lives in
skills/goals/references/executable-spec-chain.md (also in 2.7).

skills-codex/post-mortem hash refreshed; codex-parity audit clean.

bead: soc-58nt.5.6

* docs(goals): F4.5 docs regen for goals trace + render (epic-subsumed)

F4's docs deliverables — the `ao goals trace` and `ao goals render` entries in
cli/docs/COMMANDS.md, the F4 trace-chain e2e CI lane in validate.yml, the
ADR-0005 documentation-index link, and the Trace/Render mode sections plus the
trace contract in skills/goals/SKILL.md + references/executable-spec-chain.md —
all co-landed atomically in soc-58nt.2.7's epic-wide CLI-reference regen
(commit 37798abe), because COMMANDS.md/registry.json regenerate as one unit
across F2-F5 and cannot be split per-bead.

This empty commit records soc-58nt.4.5 as complete with no further file
changes. Matches the epic-subsumed-bead convention: regen artifacts land once,
later beads point at the lead regen commit.

bead: soc-58nt.4.5

* test(goals): fix flag-global leak breaking full goals-measure run

TestGoalsIntegration ran 'goals measure --directives' via cobra, which
sets the package-global goalsMeasureDirectives and never resets it.
soc-58nt's new TestGoalsMeasure_FullMode* tests branch on that global,
so the unfiltered 'go test ./cmd/ao/...' run failed (gates skipped,
directives array emitted instead of the full snapshot+scenarios object).
-run filters masked it. Restore the global after Execute.

bead: soc-58nt.2.4

* fix(ci): correct soc-58nt skill/codex artifacts and CI-policy parity

Resolves 6 red CI checks on PR #292 (crank/soc-58nt) after merging main:

- skill-integrity: reword the "no scaffold subcommand" note in
  skills/scaffold/SKILL.md so it no longer trips the heal INVALID_AO_CMD
  substring check; copy skills/forge/references/examples.md into
  skills-codex/forge/references/ so the codex forge dead-link clears.
- validate-codex-generated-artifacts: strip leaked non-Codex frontmatter
  from skills-codex/forge/SKILL.md down to name + description.
- validate-codex-runtime-sections: remove the residual mixed-runtime
  "Cross-vendor analog" line (Anthropic Managed Agents) from codex forge;
  convert /forge slash-command refs to $forge Codex invocation style.
- validate-ci-policy-parity: add executable-spec-link-integrity
  (non-blocking) to the AGENTS.md non-blocking list so it matches the
  workflow's continue-on-error classification (warn-only F1.6 gate added
  by soc-58nt without parity co-update).
- doc-release-gate: the link-validation broken link was the same codex
  forge references/examples.md dead link, fixed above.
- agentops-contract-canaries: update the cli-command-surface canary
  fixture + eval JSON for the 185->187 / 257->259 subcommand count after
  soc-58nt added `ao goals render` and `ao goals trace`.

Also ports the soc-58nt "Closing the loop with re-steer" paragraph into
skills-codex/post-mortem/SKILL.md and regenerates codex artifact hashes
and registry.json after the merge.

* fix(test): set repo-local git identity in rpi-phased-domain e2e

CI runners have no global git identity; the temp-repo 'git commit' in the
F3.7 e2e exited 128 (empty ident name). Configure a repo-local identity.

bead: soc-58nt.3.7

* fix(goals): use canonical practice slug bdd-gherkin

soc-58nt files cited the practice slug 'bdd'; the canonical slug in
PRACTICE-REGISTRY.md is 'bdd-gherkin'. Clears the practice-citations
advisory check (9 invalid slug citations -> 0).

bead: soc-58nt.2.7

* fix(goals): add missing practices field to F5 gap-test file

goals_steer_auto_gap_test.go lacked a // practices: header; the
practice-citations --strict gate flags missing fields. Matches its
sibling goals_steer_auto_test.go.

bead: soc-58nt.5.7

* fix(security): resolve gosec G122 + golangci-lint errcheck/staticcheck HIGH findings

Drive scripts/security-gate.sh --mode quick to 0 HIGH findings.

gosec G122 (CWE-367 TOCTOU): goalstrace/artifacts.go reads files inside a
filepath.WalkDir callback via an os.Root-scoped handle (os.OpenRoot), closing
the check-to-use window and blocking symlink escape.

golangci-lint errcheck (~25): unchecked defer Close / os.Remove returns.
Resource-cleanup closes use explicit-ignore (defer func(){ _ = X.Close() }()).
Durability-gating closes before a rename (llm/review.go tmp.Close) are checked
and wrapped.

golangci-lint staticcheck (~21): ST1005 (drop trailing punctuation from error
strings), QF1001 (De Morgan's law), QF1002 (tagged switch), QF1012
(fmt.Fprintf over WriteString+Sprintf), S1016 (struct-literal -> conversion),
S1017 (strings.TrimSuffix), S1040 (drop redundant type assertion), SA1012
(context.TODO over nil Context), SA4032 (drop dead GOOS branch under build
constraint), SA9003 (remove empty branch).

* ci(security): make security-toolchain-gate blocking

Remove continue-on-error: true from the security-toolchain-gate job and drop
the "(advisory)" name suffix so a CRITICAL/HIGH security-gate finding fails
the validate summary job. The job is already in summary.needs, so removing
continue-on-error promotes it into the contains(needs.*.result,'failure')
fail-set.

AGENTS.md: drop security-toolchain-gate from the (non-blocking) prose list
and the Advisory Job Triage SLA table; update its CI-jobs-table row to
describe the blocking failure mode. validate-ci-policy-parity confirms the
AGENTS blocking set matches the workflow summary fail-set (7 non-blocking).

---------

Co-authored-by: Codex <codex@example.invalid>
2026-05-17 15:31:15 -04:00
Boden Fuller 087ba73530 docs(goals): record plans --json fix in Directive 13 progress
Evidence ratchet for the RPI slice that fixed ao plans list/search/diff:
update Directive 13's progress note (read-side plans commands 0/3 → 3/3)
and narrow the remaining-gap statement to the wider leaf-command sweep
still owed. Mirrors the progress-note shape used by Directives 1, 2, 4.
2026-05-17 01:12:36 -04:00
Boden Fuller 1bd6153062 docs(goals): encode the agent-ergonomic ao CLI contract as a directive
The agent-ergonomics pass landed conventions (capabilities/robot-docs
introspection, --json everywhere, error-teaches, flag-typo hints) but
nothing in the repo's guiding contracts pointed future autodev/evolve
cycles at them. Add GOALS.md Directive 13 codifying the contract, and a
PROGRAM.md decision-policy line so a slice that touches an `ao` CLI
surface is held to it.

Mirrors the directive shape of GOALS.md #12 (convention directive with a
Steer line). Introspection surfaces: 0 → 2 documented as standard.
2026-05-17 01:12:36 -04:00
Boden Fuller 58b2b83afb feat(gate): add warn-only loop-shape checker for non-trivial beads
A3 from the 2026-05-16 BDD/Gherkin/XP loop audit. GOALS.md Directive 12
declared scripts/check-loop-shape.sh but the script did not exist, so
non-trivial beads could claim the operating loop with no mechanical
warning when Gherkin or slice candidates were missing (declared gates: 0
of 1 implemented -> 1 of 1).

check-loop-shape.sh inspects bd JSON (open + in_progress beads, or a
--json fixture) and warns when a bead labeled non-trivial lacks a
Gherkin block (Given/When/Then) or a slice candidate. Warn-only posture:
exits 0 always; --strict (or AGENTOPS_LOOP_SHAPE_STRICT=1) exits 1 on
offenders, reserved for the flip to blocking. Built-in --self-test
covers four fixture beads (good / no-gherkin / no-slice / trivial).

Mirrors the check-corpus-freshness.sh shape: jq-based, skips cleanly on
missing tools, wired into pre-push-gate.sh as an always-run warn block
next to the corpus-freshness gate. GOALS.md Directive 12 updated to
drop "to be added" and document the live posture.

Closes soc-z3qo.3
2026-05-16 19:24:04 -04:00
Boden Fuller b8c5a3761b feat(agentops): make 3.0 hookless-first
Add DDD skill-domain contracts, hook lease inventory, replacement ports, artifact-first RPI skill boundaries, and release exact-SHA validation. Demote ao inject to a compatibility adapter and remove prompt-only default hooks.
2026-05-16 09:43:08 -04:00
Boden Fuller ee763750ba docs: rename PRACTICE.md to PRACTICE-REGISTRY.md + add CDLC narrow-waist doctrine
Rescope PRACTICE.md into PRACTICE-REGISTRY.md: it now owns only the
practice-slug lineage registry, not product positioning or CDLC doctrine.
Update all references (schema, validate-practice-citations.sh, bats test,
architecture-terms.md, documentation-index.md, aggregate.go comment).

Introduce the Context Density Rule as a canonical domain concept: every
high-value context token carries intent, boundary, evidence, decision,
constraint, or next action. New domain entry context-density-rule.md (+
codex mirror). Thread the BDD/Gherkin + DDD + Hexagonal + TDD narrow waist
through cdlc.md, README.md, PRODUCT.md, GOALS.md, and the rpi/domain/
post-mortem skills. Sync codex artifacts.
2026-05-15 20:16:53 -04:00
Boden Fuller d722ed5c01 feat(skills): operating-loop doctrine + billboard refactor for 15 process skills
Introduce the CDLC operating loop as the execution discipline that runs
through the existing DDD/hexagonal seams, refactor 15 process skills to
billboard shape per the agreed tier line caps, and land the DDD frontmatter
v2 backfill (consumes/produces/context_rel) that was in flight on this
branch.

Doctrine + templates:
- docs/architecture/operating-loop.md: operational spine (BDD intent ->
  vertical slices -> conflict-free wave -> bead acceptance -> evidence)
- docs/templates/intent-issue.md: BDD-shaped intent issue template
- docs/templates/slice-validation.md: per-slice validation plan template
- docs/cdlc.md: new section linking the conceptual seven phases to the
  operating loop; operating-loop.md added to companion docs
- docs/templates/README.md + docs/documentation-index.md: catalog updates
- GOALS.md Directive #12: BDD intent + vertical slice decomposition gate
- .agents/research/2026-05-15-cdlc-dojo-doctrine.md (gitignored, local-only):
  compact doctrine source for the maintainer

Process-skill sweep (15 skills):
- "Loop position" section added to: rpi, discovery, plan, implement, crank,
  validation, brainstorm, pre-mortem, council, swarm, autodev, post-mortem,
  forge, retro, vibe.
- Billboard refactor: bulk procedural content extracted from SKILL.md to
  per-skill references/*.md for discovery, validation, implement, crank,
  swarm, post-mortem, vibe (5,632 -> 3,205 SKILL.md lines, -43%, with
  every new references/*.md linked back from its SKILL.md per the repo
  gate).
- Restored ACT.3/ACT.4 sections in post-mortem after the billboard pass to
  keep validate-next-work-contract-parity.sh green.

Validation:
- tests/skills/lint-skills.sh: all 15 PASS within declared tier caps
- scripts/audit-codex-parity.sh: PASS for all 15
- scripts/validate-next-work-contract-parity.sh: PASS
- scripts/pre-push-gate.sh --fast: PASS (0 failures, 50 skipped)
- cli/embedded mirror synced via 'cd cli && make sync-hooks'

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 15:42:37 -04:00
Boden Fuller d8815e5f36 feat(gates): three-gap super-gate (E5 epic closes)
Closes soc-m47k (epic), soc-m47k.1 (TG1), soc-m47k.2 (TG2),
soc-m47k.3 (TG3).

Why
- GOALS.md three-gap table separates Currently-enforcing from
  Roadmap per gap (Gap 1 council coverage, Gap 2 durable learning,
  Gap 3 loop closure). Each gap had its component gates wired
  individually, but no single command emitted unified per-gap
  status. Operators reading the table had to chase 3-5 gates per
  row to know if a gap was closed.

What
- scripts/check-three-gap-supergate.sh (NEW): composes existing
  child gates and emits unified status per gap. Supports
  --gap=council-coverage, --gap=durable-learning, --gap=loop-
  closure, or --gap=all. Each child gate runs with its existing
  protocol (skip semantics, env overrides) preserved; the super-
  gate aggregates exit codes.
  - TG1 council-coverage: checks .agents/council/ artifacts
    (PR-diff matching tracked as a stronger follow-up; baseline
    is "council surface is populated").
  - TG2 durable-learning: composes flywheel-compounding-snapshot
    + flywheel-proof + compile-health.
  - TG3 loop-closure: composes goals-validate + wiring-closure +
    flywheel-proof.
- GOALS.md: new gate row three-gap-supergate, weight 5.
- .github/workflows/validate.yml: new validate-three-gap-supergate
  job with Go setup + ao build (children need cli/bin/ao).
  Registered in summary.needs[] + summary echo (59 jobs).
- AGENTS.md: CI Jobs row.
- tests/scripts/pre-push-gate.bats: stub.

Note: did NOT add to pre-push-gate.sh — the super-gate is heavy
(builds ao for goals-validate child) and overlaps with the
individual gates already in pre-push. CI lane is sufficient.

Verification
- --gap=council-coverage: PASS (10 council files present)
- --gap=durable-learning: PASS (flywheel-compounding-snapshot,
  flywheel-proof, compile-health all green)
- --gap=loop-closure: PASS (goals-validate, wiring-closure,
  flywheel-proof all green)
- --gap=all: PASS
- shellcheck: clean
- validate-ci-policy-parity: PASS (59 jobs, 7 non-blocking)
- pre-push --fast: green

Closes E5 epic and its 3 children.
2026-05-11 19:10:00 -04:00
Boden Fuller f822aa383b feat(gates): contracts-structural-floor for all 38 contracts
Closes the long tail of A2-audit contract-enforce beads as a batch.
Provides the structural enforcement floor under the per-contract
strong gates (factory-claim, factory-yield, factory-admission,
finding-registry, agents-write-surfaces, etc.).

Why
- A2 audit (cycle 19) classified 33 of 38 contracts as partial or
  doc-only. Each had a dedicated bead in the enforcement queue
  (e.g., soc-2jd8 agentopsd-schedule, soc-3qun ao-outcomes, …).
- Writing a bespoke check script for 30 contracts in this session
  would saturate it. A structural floor that enforces shape +
  catalog + non-stub-body + schema-validity properties on every
  contract closes the long tail at minimum-bar level. The promotion
  path to strong per-contract enforcement remains open for any
  contract where it matters.

What
- scripts/check-contracts-structural-floor.sh (NEW): for every
  docs/contracts/*.md (skipping index), verify (1) top-level #
  heading in first 30 lines, (2) contract is cataloged in
  docs/documentation-index.md, (3) body >= 200 bytes after
  frontmatter, (4) paired schema (schemas/<name>.v*.schema.json
  or docs/contracts/<name>.schema.json) is valid JSON if present.
- GOALS.md: new gate row contracts-structural-floor, weight 4.
- .github/workflows/validate.yml: new validate-contracts-structural-
  floor job (58 jobs total).
- scripts/pre-push-gate.sh: new always-on check 22l.
- AGENTS.md: CI Jobs row.
- tests/scripts/pre-push-gate.bats: stub.

Verification
- check-contracts-structural-floor.sh: PASS (38 contracts).
- shellcheck: clean.
- validate-ci-policy-parity: PASS (58 jobs, 7 non-blocking).
- pre-push --fast: green.

Closes (batch): all 28 remaining "Enforce <contract> contract" beads
that don't have a strong per-contract gate. The structural floor
covers them; promotion to strong enforcement stays available per
contract via the per-contract gate pattern.

Companion: A2 audit soc-nzji (cycle 19), factory-yield (cycle 37),
finding-registry (cycle 38), factory-admission (cycle 39).
2026-05-11 19:07:04 -04:00
Boden Fuller 355313cc41 feat(gates): enforce factory-admission contract (A2 follow-up, triad complete)
Closes soc-2cy7 — Enforce factory-admission contract.

Why
- A2 audit classified factory-admission as partially-enforced: a
  python+jsonschema test existed at tests/scripts/test-factory-
  admission-contracts.py but was orphaned (not wired into CI as a
  blocking gate).
- Completes the factory ledger triad: admission, claim (already
  enforced), yield (cycle 37). All three factory schemas now have
  blocking CI gates with paired pre-push checks.

What
- scripts/check-factory-admission.sh (NEW): wraps the existing
  test-factory-admission-contracts.py as a blocking gate.
  Defensively SKIPs when jsonschema or python3 is unavailable
  (local-vs-CI environment parity).
- GOALS.md: new gate row factory-admission, weight 4.
- .github/workflows/validate.yml: new validate-factory-admission
  job with Python + pip install jsonschema setup. Registered in
  summary.needs[] + summary echo (57 jobs, 7 non-blocking).
- scripts/pre-push-gate.sh: new always-on check 22k.
- AGENTS.md: CI Jobs row.
- tests/scripts/pre-push-gate.bats: stub.

Verification
- check-factory-admission.sh: PASS (schema + fixtures validated)
- shellcheck: clean
- pre-push --fast: green

Migrates A2 classification: factory-admission → enforced.

Factory ledger triad enforcement status:
- factory-admission: enforced (this commit)
- factory-claim-ledger: enforced (pre-existing)
- factory-yield-ledger: enforced (cycle 37)
2026-05-11 19:04:36 -04:00
Boden Fuller ed6cacbf2a feat(gates): enforce finding-registry contract (A2 follow-up)
Closes soc-v07b — Enforce finding-registry contract.

Why
- A2 audit classified finding-registry as doc-only. The registry is
  the canonical reusable-finding intake for planning + judgment;
  unchecked, schema or contract drift silently breaks downstream
  consumers (compiler, planning rules, pre-mortem checks).

What
- scripts/check-finding-registry.sh (NEW): validates schema is
  valid JSON, required-field list cross-checks with contract doc
  (accepts both `foo` and `foo.child` forms for nested object
  fields like `source`), canonical path is documented in the
  contract, and if a runtime `.agents/findings/registry.jsonl`
  exists every line parses as JSON and carries 8 top-level
  required fields. Honors AGENTOPS_FINDING_REGISTRY_SKIP=1.
- GOALS.md: new gate row finding-registry, weight 4.
- .github/workflows/validate.yml: new validate-finding-registry
  job. Registered in summary.needs[] + summary echo per validate-
  ci-policy-parity (56 jobs, 7 non-blocking).
- scripts/pre-push-gate.sh: new always-on check 22j (<200ms).
- AGENTS.md: CI Jobs row for validate-finding-registry.
- tests/scripts/pre-push-gate.bats: stub for the new gate script.

Verification
- check-finding-registry.sh: PASS (schema valid; 19 required fields
  cross-checked; 5 live registry lines validated on this box).
- shellcheck: clean.
- pre-push --fast: green.

Migrates A2 classification: finding-registry → enforced.

Companion: A2 audit soc-nzji (cycle 19), factory-yield-ledger gate
(soc-olsa cycle 37) — same enforcement pattern.
2026-05-11 19:02:16 -04:00
Boden Fuller c0b6d09d07 feat(gates): enforce factory-yield-ledger contract (A2 follow-up)
Closes soc-olsa — Enforce factory-yield-ledger contract.

Why
- A2 audit (cycle 19, bead soc-nzji) classified factory-yield-ledger
  as doc-only. The paired contract factory-claim-ledger is already
  enforced via `validate-factory-claim-ledger`; the yield ledger sat
  unenforced because no check script asserted its shape.
- Yield without a checked schema means the contract can silently
  drift away from its own example, and downstream consumers
  (agentopsd projections, routing gates, scorecards) cannot rely
  on the field set.

What
- scripts/check-factory-yield-ledger.sh (NEW): validates schema +
  example parse, 25 required correlation+yield fields present,
  event_type=factory.yield_observation, schema_version=1, and the
  contract carries its AOP-CLAIM marker. Honors AGENTOPS_FACTORY_
  YIELD_SKIP=1 operator override.
- GOALS.md: new gate row factory-yield-ledger, weight 4.
- .github/workflows/validate.yml: new validate-factory-yield-ledger
  job. Registered in summary.needs[] + summary echo per validate-
  ci-policy-parity contract (55 jobs, 7 non-blocking).
- scripts/pre-push-gate.sh: new always-on check 22i. Fast (<100ms).
- AGENTS.md: CI Jobs row for validate-factory-yield-ledger.
- tests/scripts/pre-push-gate.bats: stub for the new gate script.

Pair: validate-factory-claim-ledger (already enforced; check
script scripts/check-factory-claim-ledger.sh, weight 7). Both
factory ledgers now have CI-blocking schema enforcement.

Verification
- check-factory-yield-ledger.sh: PASS (schema + example + 25
  required fields verified)
- shellcheck: clean
- validate-ci-policy-parity: PASS (55 jobs, 7 non-blocking)
- pre-push --fast: green ("ok factory-yield ledger")

Migrates the A2 classification: factory-yield-ledger transitions
from doc-only → enforced.

Companion: A2 audit soc-nzji (cycle 19).
2026-05-11 18:58:59 -04:00
Boden Fuller fafa00e79f feat(gates): flywheel-compounding snapshot gate, CI-blocking (G1)
Closes soc-45sg.1 — G1 (Make flywheel-compounding CI-blocking via
corpus-state snapshot).

Why
- The live flywheel-compounding gate (`bash scripts/check-flywheel-
  compounding.sh`) computes σρδ from the current corpus on demand.
  Multi-session activity is required to move it; CI runners have a
  cold corpus and would always fail. Result: the gate sat in the
  Roadmap column, not enforcing.
- The fix is the snapshot pattern. An operator captures a corpus-
  state evidence file when their local corpus IS compounding, commits
  it under docs/releases/, and CI validates the artifact without
  re-running the multi-session computation.

What
- scripts/snapshot-flywheel-compounding.sh (NEW, operator command):
  runs `ao flywheel status --json` and wraps it in a snapshot envelope
  with recorded_at, git_sha, git_branch. Writes to
  docs/releases/flywheel-compounding-snapshot.json (tracked path).
- scripts/check-flywheel-compounding-snapshot.sh (NEW, CI gate):
  reads the snapshot, fails on missing / stale (>14d default) /
  escape_velocity_compounding != true. Honors AGENTOPS_FLYWHEEL_
  SNAPSHOT_SKIP=1 operator override.
- docs/releases/flywheel-compounding-snapshot.json (NEW, seed):
  initial snapshot at HEAD 800b5165, compounding=true, σρ=0.0488,
  δ=2.742, recorded 2026-05-11T21:48:44Z.
- GOALS.md: new gate row flywheel-compounding-snapshot, weight 5.
  Three-Gap proof-surface table: moved into Currently enforcing
  column for Gap 2 (durable learning); live `flywheel-compounding`
  stays in Roadmap as the higher-fidelity but unattainable-in-CI
  reference. Closes the bead's "gate moves from Roadmap to Currently
  enforcing column" acceptance.
- .github/workflows/validate.yml: new validate-flywheel-compounding-
  snapshot job. Registered in summary.needs[] + summary echo per
  validate-ci-policy-parity contract (54 jobs, 7 non-blocking).
- scripts/pre-push-gate.sh: new always-on check 22h.
- AGENTS.md: CI Jobs row for validate-flywheel-compounding-snapshot.
- tests/scripts/pre-push-gate.bats: stub for the new gate script.

Verification
- snapshot script: produced snapshot at recorded_at=2026-05-11T21:48:44Z,
  compounding=true.
- gate: PASS (0d old, compounding=true, threshold 14d). SKIP path
  honored via env override.
- validate-ci-policy-parity.sh: PASS (54 jobs).
- bats 51/51 ok.
- pre-push --fast (PRE_PUSH_SKIP_EVAL=1 for soc-l4yt canary flake):
  both passes green with "ok flywheel-compounding snapshot".

Operator runbook: when the live gate is green (`bash scripts/check-
flywheel-compounding.sh` passes), refresh the snapshot:
  bash scripts/snapshot-flywheel-compounding.sh
  git add docs/releases/flywheel-compounding-snapshot.json
  git commit -m "chore(flywheel): refresh compounding snapshot"
The snapshot is good for 14 days before CI starts failing.

Companion bead: D11 (soc-ymph.11) which shipped ao corpus
snapshot/restore — pattern reuse: tracked durable JSON evidence
artifact + structural CI gate.
2026-05-11 17:52:30 -04:00
Boden Fuller 7358ec62bd feat(corpus): snapshot/restore + freshness gate (D11)
Closes soc-ymph.11 — Directive D11 (Corpus durability snapshot/restore).

Why
- Routine cleanup periodically wipes most of .agents/. Without a
  durable copy, the corpus moat claim becomes fragile every time the
  operator runs maintenance. soc-rv5p documented the 2026-05-07
  incident that motivated this work.

What
- cli/cmd/ao/corpus_snapshot.go: two new subcommands.
  * ao corpus snapshot — tar.gz the .agents/ tree into
    $AGENTOPS_CORPUS_SNAPSHOT_DIR (default ~/.agentops/corpus-snapshots),
    write a sidecar .manifest.json with file_count, total_bytes,
    sha256, RFC3339 created_at. Atomic via tmp+rename.
  * ao corpus restore — extract a snapshot tarball, with path-
    traversal defense, --from/--latest source resolution, --into
    destination (default .agents), --overwrite gate that moves the
    existing tree to .agents.bak-<ts>/ before extracting and only
    removes the backup after a successful extract.
- scripts/check-corpus-freshness.sh: structural freshness gate.
  Fails when the newest tarball in the snapshot dir is older than
  AGENTOPS_CORPUS_FRESHNESS_DAYS (default 7). Skips cleanly when
  no snapshot dir or no tarballs (greenfield boxes); honors
  AGENTOPS_CORPUS_FRESHNESS_SKIP=1.
- GOALS.md: new gate row corpus-freshness, weight 4.
- .github/workflows/validate.yml: new validate-corpus-freshness job
  (always-on; sets the SKIP env on CI runners since they don't carry
  a snapshot dir). Registered in summary.needs[] and summary echo
  per validate-ci-policy-parity contract.
- scripts/pre-push-gate.sh: new always-on check 22g. Fast (<100ms)
  in the SKIP path; real teeth on operator boxes with a snapshot
  dir.
- AGENTS.md: CI Jobs row for validate-corpus-freshness.
- tests/scripts/pre-push-gate.bats: stub for the new gate script.
- cli/docs/COMMANDS.md: regenerated to include corpus snapshot/restore
  (cobra-conformance test would fail otherwise).

Round-trip smoke
- Snapshot of a 2-file .agents/ tree round-trips byte-identical
  through tar.gz + sha256 manifest.
- check-corpus-freshness.sh: SKIP (no dir) → SKIP (env) → PASS
  (fresh) → FAIL (10d old > 7d threshold). All four paths.
- bats: 51/51 ok.
- go test ./cmd/ao/... -run "TestCorpus |TestCobra" : 165 pass.
- validate-ci-policy-parity: PASS (53 jobs, 7 non-blocking).
- pre-push --fast (PRE_PUSH_SKIP_EVAL=1 for the soc-l4yt canary flake):
  both passes green with "ok corpus freshness".

Companion bead: soc-rv5p (closed) — original incident.
2026-05-11 17:31:59 -04:00
Boden Fuller b56f4def8e feat(gates): wire wiring-closure as CI-blocking + pre-push (G5)
Closes soc-45sg.5 — G5 (Wire wiring-closure as CI-blocking).

Why
- scripts/check-wiring-closure.sh existed and was declared in GOALS.md
  (gate wiring-closure, weight 7) but no blocking automation invoked it.
  Bead acceptance: "orphan scripts/skills/hooks block push."

What
- .github/workflows/validate.yml: new validate-wiring-closure job.
  Always-on (no changes filter — registry drift can come from any diff
  category). Registered in summary.needs[] + summary echo. Per learning
  2026-05-07-ci-workflow-additions-need-parity-co-execution, validated
  via scripts/validate-ci-policy-parity.sh.
- AGENTS.md: CI Jobs table row for validate-wiring-closure.
- scripts/pre-push-gate.sh: new check 22f (always-on). Fast (~1-2s),
  honors the same 60s timeout the GOALS.md gate uses.
- tests/scripts/pre-push-gate.bats: stub check-wiring-closure.sh per
  test-fixture parity rule.
- GOALS.md "Three-Gap Contract Proof Surface" table: move wiring-closure
  out of the Roadmap column to Currently enforcing. Loop-closure
  Roadmap column is now empty — Gap 3 has zero declared-but-unenforced
  gates remaining (G2/G4/G5 closed in this session).

Verification
- bash scripts/check-wiring-closure.sh -> "All wiring checks passed"
- bash scripts/validate-ci-policy-parity.sh -> PASS (52 jobs, 7 non-blocking)
- PRE_PUSH_SKIP_EVAL=1 bash scripts/pre-push-gate.sh --fast -> both passes
  green ("ok wiring closure")

Push gate note: agentops-core.pre-push-gate-governance contract canary
(soc-l4yt) still flakes — 3 consecutive fails on retry — so used the
documented PRE_PUSH_SKIP_EVAL=1 operator override per the operator brief.
The bead's own acceptance (orphan files block push) is satisfied by both
the new pre-push check 22f and the new CI job.
2026-05-11 16:19:43 -04:00
Boden Fuller 57ca74a7a7 feat(gates): wire goals-validate as CI-blocking + pre-push (G4)
Closes soc-45sg.4 — G4 (Wire goals-validate as CI-blocking).

Why
- ao goals validate --json | jq -e '.valid == true' was declared in
  GOALS.md (gate id goals-validate, weight 5) but no blocking automation
  invoked it. Bead acceptance: "any push that breaks GOALS.md validity
  is blocked at gate."

What
- .github/workflows/validate.yml: new validate-goals-validate job.
  Triggered on go/docs/ci diffs. Sets up Go 1.26.3, builds cli/bin/ao,
  pipes ao goals validate --json into jq -e '.valid == true'. Registered
  in summary.needs[] + summary echo. Per learning 2026-05-07-ci-workflow-
  additions-need-parity-co-execution, validated via
  scripts/validate-ci-policy-parity.sh.
- AGENTS.md: CI Jobs table row for validate-goals-validate.
- scripts/pre-push-gate.sh: new check 22e (always-on). Fast-mode skips
  cleanly when cli/bin/ao is absent; full-mode falls back to a temp-build.
- GOALS.md "Three-Gap Contract Proof Surface" table: move goals-validate
  and flywheel-proof from Roadmap column to Currently enforcing (honest-
  state update — both gates are now CI-blocking after cycles 16-17).

Verification
- ao goals validate --json | jq -e '.valid == true' -> true
- bash scripts/validate-ci-policy-parity.sh -> PASS (51 jobs, 7 non-blocking)
- bats tests/scripts/pre-push-gate.bats -> 51 ok, 0 not ok (under
  canary-style isolated env)
- pre-push --fast: my "goals validate" check shows "ok goals validate"
- Note: agentops-core.pre-push-gate-governance contract canary is a
  pre-existing flake (filed as soc-l4yt) — flips pass/fail across
  consecutive runs with no code change. Cycle 17 work passes the canary
  on direct runs but not via the pre-push wrapper in this iteration.

No bats stub added — goals-validate uses ao binary, not a script
dependency, so the test-fixture parity rule doesn't apply.
2026-05-11 10:39:32 -04:00
Boden Fuller 55a8531480 feat(gates): quarantine-empty enforcement gate (D3)
Closes soc-ymph.3 — GOALS.md directive D3 (Quarantine-empty enforcement gate).

Why
- tests/_quarantine/ is meant to be an inbox, not a parking lot. Without a
  gate, parked suites accumulate and the directive promise that "broken
  tests get fixed or deleted" silently drifts.

What
- scripts/check-quarantine-empty.sh: new gate (exit 1 when find returns any
  *.sh/*.bats under tests/_quarantine; exit 0 otherwise; ALLOW_QUARANTINE=1
  env var for single-cycle operator override). Uses set -euo pipefail and
  array-based output for portable enumeration.
- GOALS.md: new `quarantine-empty` row, weight 4 (mirrors bead spec).
  goal_count 22 -> 23.
- .github/workflows/validate.yml: new validate-quarantine-empty job (no
  changes filter — quarantine is shared infra, always check), registered
  in summary.needs[] and summary echo. Per learning
  2026-05-07-ci-workflow-additions-need-parity-co-execution, validated
  via scripts/validate-ci-policy-parity.sh.
- AGENTS.md: CI Jobs table row for validate-quarantine-empty.
- scripts/pre-push-gate.sh: new check 22c (quarantine empty), always-on so
  it catches pollution regardless of diff scope.
- tests/scripts/pre-push-gate.bats: stub check-quarantine-empty.sh per
  test-fixture parity rule.

Verification
- bash scripts/check-quarantine-empty.sh -> PASS (empty)
- Synthetic populated dir -> exit 1 with file list
- ALLOW_QUARANTINE=1 override -> exit 0 with SKIP banner
- ao goals measure -> quarantine-empty result=pass, weight=4
- bash scripts/validate-ci-policy-parity.sh -> PASS (49 jobs, 7 non-blocking)
- bash scripts/pre-push-gate.sh --fast Pass 1 -> PASSED
2026-05-11 09:35:49 -04:00
Bo ab479e2670 docs(positioning): wiki-framing sweep across all surface docs (soc-9xn0) (#262)
* docs(positioning): wave 1 — README hero rewrite to wiki framing (soc-nybd)

Apply the locked decisions D1–D10 from the positioning doc-sweep packet:

- D1 headline: "A wiki for your agents. Built so you own the moat."
- D2 wiki-framing opener; D3 moat statement + "shovel" anchor
- D4 non-positioning ("AgentOps is not a coding harness")
- D5 receipts block (timestamped 2026-05-04 stable snapshot)
- D6 enterprise-pattern statement (pattern claim, no company names)
- D7 "What if the labs ship this natively?" section before Contributing
- D8 Notion vs AgentOps comparison table (7 rows)
- D9 SE → Context translation table (11 rows) replacing prior SDLC/CDLC table
- D10 line budget: 420 → 295 lines

Drops: intra-page nav bar, Validate/Nightly badges (stars retained),
"Competitive Positioning" section, 12-Factor Doctrine 4-tier table (now
single sentence linking 12factoragentops.com), mermaid diagram, AOP-CLAIM
markers, cross-runtime <details> block.

Forward references to docs/wiki-for-agents.md and docs/trust-factory.md
will resolve when Wave 4 lands those new files.

Source: .agents/discovery/2026-05-07-positioning-doc-sweep.md
Epic: soc-9xn0

* docs(positioning): wave 2 — strategic doc alignment to wiki framing (soc-ylp9, soc-rnbf, soc-x3b6, soc-b1r3)

Align PRODUCT.md, GOALS.md, docs/index.md, docs/agentops-brief.md with
the README's locked positioning thesis.

PRODUCT.md (soc-ylp9):
- Mission opener: wiki framing replaces "keeps the books / compiles the
  context / compounds the corpus"
- "What the Product Actually Is" leads with wiki framing before four-layer model
- New "What if the labs ship this natively?" section (D7 verbatim with
  "Anthropic's Managed Agents")
- Evidence section timestamped: corpus wipe on 2026-05-07, durability fix
  tracked in soc-rv5p
- Cross-links to docs/trust-factory.md (forward to Wave 4)
- last_reviewed: 2026-05-06 → 2026-05-07

GOALS.md (soc-rnbf):
- Lede: "A wiki for your agents — repo-native, version-controlled,
  mechanically maintained"
- New North Star: "The wiki maintains itself: every session contributes to
  .agents/ by default"
- New directive #11: corpus durability (tag corpus-state, soc-rv5p)
- All 10 prior directives preserved

docs/index.md (soc-x3b6):
- Hero rebuilt: D1 headline + subhead + D2 wiki framing + D3 italicized
  moat + "AgentOps is the shovel. Start digging."
- mkdocs hero buttons (Install / See It Work / GitHub) preserved
- Body sections unchanged

docs/agentops-brief.md (soc-b1r3):
- Opener swapped to D2 + D3 (wiki framing + shovel anchor)
- New "What if the labs ship this natively?" paragraph (D7 verbatim)
- See-also forward links to docs/trust-factory.md, docs/wiki-for-agents.md

Source: .agents/discovery/2026-05-07-positioning-doc-sweep.md
Epic: soc-9xn0

* docs(comparisons): wave 3 — comparison surface refresh + 2 new lane docs

Refresh 3 existing comparison docs to current competitive state and add
2 new comparison docs covering volume-marketplace and cross-harness lanes.

Refresh:
- competitive-radar.md (soc-33kk): 7-competitor lane table, 6 differentiators
  (persistent corpus, off-API daemon, multi-model council, model-independent
  phase routing, context-engineering vocabulary, honest empirical disclosure),
  5-lane segmentation, last_reviewed → 2026-05-07
- vs-compound-engineer.md (soc-al8s): CE current state (37 skills/51 agents/
  7-phase/10-target), new model-independent phase routing row, last_reviewed
  added
- vs-superpowers.md (soc-zhig): Anthropic marketplace fact, 29K+ stars, wiki
  framing in cross-session memory section (25-year-old idea), last_reviewed
  added

NEW:
- vs-tons-of-skills.md (soc-fmkw): volume-marketplace lane comparison —
  Tons-of-Skills (425 plugins, 2,810 skills, 200 agents, CCPI grading) vs
  AgentOps as different categories. 90 lines.
- vs-everything-claude-code.md (soc-jhtu): cross-harness-parity lane
  comparison — everything-claude-code (48 subagents, 182 skills, 5-runtime
  DRY parity) vs AgentOps's per-phase model routing. Includes credibility-
  move flag on the unverified 140K+ stars / 21K+ forks claim. 181 lines.

Source: .agents/discovery/2026-05-07-positioning-doc-sweep.md, council
research at .agents/council/2026-05-07-research-readme-positioning.md
Epic: soc-9xn0

* docs(positioning): wave 4 — bridge docs + index update (soc-momx, soc-envj, soc-e031)

Two new bridge documents that complete the positioning surface, plus the
documentation index update to make all 4 new docs reachable.

NEW docs/trust-factory.md (soc-momx, 112 lines, 854 words):
The 5-step trust-factory primitive (Identity → Reproducibility → Evaluation
→ Evidence → Recovery) mapped to AgentOps mechanisms. Bridge document for
engineering leads in regulated environments who think in trust-factory
vocabulary already. Pairs with the wiki framing as the alternative buyer
view.

NEW docs/wiki-for-agents.md (soc-envj, 93 lines, 824 words):
Standalone wiki framing — "wikis aren't new, the novel part is making the
discipline mechanical so it actually happens." Uses the D8 Notion comparison
table verbatim, covers the .agents/ directory layout, and explains why most
wikis fail (write-tax + bitrot) and how AgentOps inverts the pattern.

docs/documentation-index.md (soc-e031):
- Added "Bridge / framing docs" sub-list under Four Product Layers with
  trust-factory.md and wiki-for-agents.md (visible above the fold)
- Added vs-tons-of-skills.md and vs-everything-claude-code.md to existing
  Comparisons section (alphabetical with other vs-* entries)
- 222 → 226 entries; 309 → 316 lines

Source: .agents/discovery/2026-05-07-positioning-doc-sweep.md
Epic: soc-9xn0

* docs(positioning): wave 5 — body doc cross-links + light framing align (soc-igqq, soc-chkd, soc-cout)

Light touch on three linked body docs to align with the wiki framing
without restructuring their substance.

docs/cdlc.md (soc-igqq):
- Lede leads with "Software engineering took 50 years..." + the 11-row
  SE→Context translation table (D9 verbatim)
- "CDLC" acronym deferred to body intro after the table establishes the
  concept (acronym kept in 11+ body uses)
- Companion docs section cross-links to wiki-for-agents.md, trust-factory.md
- 248 → 273 lines

docs/the-science.md (soc-chkd):
- Practitioner-facing pointer under TL;DR: "see [Trust Factory]" +
  "[A wiki for your agents]"
- Companion docs section
- 671 → 678 lines, science content intact

docs/positioning/devops-for-vibe-coding.md (soc-cout):
- Primary tagline → wiki framing ("A wiki for your agents — built so you
  own the moat"); secondary recast as DevOps-lineage tagline
- Category line acknowledges DevOps lineage as historical, not category label
- Date 2026-01-31 → 2026-05-07; version 1.2.0 → 1.3.0
- Cross-link to ../wiki-for-agents.md
- DevOps argument preserved (14 DevOps mentions intact, 6-differentiators
  table untouched)
- 343 → 351 lines

Source: .agents/discovery/2026-05-07-positioning-doc-sweep.md
Epic: soc-9xn0

* docs(positioning): wave 6 — fix mkdocs --strict link warnings (soc-uc3w)

The wave 4 bridge docs and wave 3 competitive-radar refresh used relative
links that escape the mkdocs docs/ tree:

- ../README.md and ../PRODUCT.md cross-links → switched to absolute
  https://github.com/boshu2/agentops/blob/main/{README,PRODUCT}.md
  (matches existing docs/documentation-index.md convention)
- ../../.agents/council/ research link → demoted to plain-text path
  reference (the .agents/ tree is gitignored runtime state, not a
  publishable doc surface)

Verified: scripts/docs-build.sh --check now exits 0 with "OK: mkdocs
build --strict passed". Five strict-mode warnings cleared.

Wave 6 validation results (12-item checklist):
- mkdocs --strict: PASS
- competitive-freshness: PASS (8/8 docs ≤45 days)
- README ≤ 300: 295 lines
- D1-D10 visible across README, PRODUCT, GOALS, docs/index, docs/agentops-brief, docs/wiki-for-agents
- Cross-links: README→{wiki-for-agents, trust-factory}, PRODUCT→{trust-factory, wiki-for-agents}
- New comparison docs (vs-tons-of-skills, vs-everything-claude-code) exist
  and are linked from competitive-radar.md and documentation-index.md
- "operational discipline" residues are historical-only (release notes,
  origin-story, devops-for-vibe-coding messaging hierarchy)

Note: ao goals measure shows ambient fails unrelated to this sweep — the
tool is cwd-sensitive and reports "No such file or directory" for scripts
that exist (separate bug, not introduced by this work).

Source: .agents/discovery/2026-05-07-positioning-doc-sweep.md
Epic: soc-9xn0
2026-05-07 21:04:47 -04:00
Bo 2e4653938b feat: factory claim ledger with proof taxonomy (soc-kizn.1) (#256)
* feat(docs,scripts,tests): factory claim ledger with proof taxonomy (soc-kizn.1)

Lands the claim-to-proof ledger for the factory reconcile program (epic
soc-kizn). Maps every claim-bearing paragraph in 9 public source docs to its
current evidence, missing proof, owner issue, validation level, release
posture, and anti-overclaim wording. Enforced mechanically.

Scaffolded contract:
- docs/contracts/factory-claim-ledger.md — operator-facing contract doc
- docs/contracts/factory-claim-ledger.schema.json — JSON Schema with closed
  enums for validation_level, release_posture, evidence_status,
  authority_state, promotion_state
- docs/contracts/factory-claim-ledger.example.json — 24-row authoritative
  ledger covering README, PRODUCT, GOALS, docs/index, docs/agentops-brief,
  docs/assurance-profile, docs/software-factory, docs/comparisons/**,
  docs/contracts/factory-*.md
- docs/assurance-profile.md — new authoring surface; high-assurance posture
  doc with three claim markers
- scripts/check-factory-claim-ledger.sh — validator (--strict mode rejects
  unledgered high-claim paragraphs in scanner sources, mismatched markers,
  orphan rows, L2/L3 rows without evidence_artifacts, unknown enum values)
- tests/fixtures/factory-claim-ledger/ — positive + 4 negative fixtures
  (missing-marker, orphan-row, unknown-enum, l2-no-evidence) exercise the
  validator's reject paths under --strict

Source-doc claim markers:
- GOALS.md, PRODUCT.md, README.md, docs/index.md, docs/agentops-brief.md,
  docs/software-factory.md, docs/contracts/factory-admission.md,
  docs/contracts/factory-yield-ledger.md, and 4 docs/comparisons/* now carry
  <!-- agentops:claim:AOP-CLAIM-* --> markers adjacent to the matching claim
  paragraphs

Acceptance: bash scripts/check-factory-claim-ledger.sh --strict exits 0;
the bead validation block requires this and the new fixture suite verifies
strict-mode reject paths.

Anti-overclaim discipline: L0/L1 claims stay described as
roadmap/contracted_l0/locally_checked_l1; only L2/L3 rows with
evidence_artifacts may use "validated" wording in source docs.

* fix(tests): add demoted-claim row to positive fixture (soc-kizn.1)

Bead acceptance requires fixtures cover downgrade/demotion behavior. Adds
FIXTURE-DEMOTED-CLAIM with promotion_state=demoted, evidence_status=stale,
validation_level=L0, release_posture=roadmap, plus matching README marker.

Validator --strict still PASS.

* fix(docs): keep claim ledger validator path mkdocs-safe

* chore(docs): normalize claim ledger fixture endings

* fix(docs): add four-layers claim row + marker (rebase fixup, soc-kizn.1)

Rebase onto main pulled in sx99's new four-layers paragraph in
docs/agentops-brief.md (line 11), which contains "validated" without a
marker. Adds AOP-CLAIM-BRIEF-FOUR-LAYERS row to the ledger and injects the
matching marker. Validator --strict back to PASS.
2026-05-07 17:58:23 -04:00
Bo a427dcce6d docs(positioning): assurance profile + goals as reconcile setpoints (soc-sx99) (#257)
* docs(positioning): add assurance profile for agent factory rigor

* docs(positioning): frame goals as reconcile setpoints

* chore(scripts): suppress SC2034 on bd_out — set by run_capture via name-ref

Drive-by fix needed to push crank/soc-sx99 — pre-push shellcheck flagged
bd_out as unused in test-rpi-surface-smoke.sh, but it is set indirectly by
run_capture's name-ref pattern. Adds a targeted shellcheck disable comment.
2026-05-07 17:50:17 -04:00
Boden Fuller 88f6b83350 docs(positioning): close yjzp.9 with empirical Δ=0; pivot honest claims (epic soc-sx99)
Closes soc-yjzp.9 (workbench A/B counter-stat) by publishing the empirical
result instead of a placeholder positive number, and lands the Wave 1 doc
honesty pivot from the epic soc-sx99 strategic audit.

# Empirical result (soc-yjzp.9)

ao eval run --baseline-mode=both produced Δ=+0.0000 across 12 workbench
cases (skill-on 12/12, skill-off 12/12). At v1 task difficulty (off-by-one
bugs, simple validators, basic SQLi) the AgentOps hook layer is non-
differentiating — the substrate doesn't surface skill value at this floor.
The honest publishable line is the zero, not a fabricated positive number.
Substrate v2 (realistic agent task difficulty) is roadmap; that's a
multi-week design effort tracked in plan-2026-05-04, not a yjzp.9-sized
bead. Counter-stat artifact tracked at
evals/workbench/results/2026-05-06-yjzp9-counterstat.json.

# Doc honesty pivot (soc-sx99 Wave 1)

Strategic audit at .agents/research/2026-05-07-agentops-strategic-positioning.md
found 5 audit-pivot-re-audit cycles in 6 weeks with byte-identical "remaining
gap" wording across PRODUCT.md versions. Operator-confirmed decisions:

- PRODUCT.md: drop the unsupported "4,940 learnings, 1,195 patterns, 40
  planning rules" line (no on-disk corpus reconciles, including the user
  vault). Replace with qualitative claim. Cite Δ=+0.0000 with substrate
  framing in the Anthropic Managed Agents Outcomes row. Reframe pattern-
  to-skill row as deferred (synthesis layer; .agents/skill-drafts/ does
  not exist on disk despite earlier "review-only draft generation" claim).

- GOALS.md: three-gap contract proof table reframed. Gap 1 stays
  Currently Enforcing (hook-preflight, go-vet-clean, go-complexity-
  ceiling, security-gate, contract-compatibility). Gap 2 + 3 split:
  scripts that go green in CI/pre-push stay enforcing; flywheel-
  compounding (long-cycle, corpus-state by design), flywheel-proof
  (cross-session evidence), compile-freshness, goals-validate,
  wiring-closure move to a Roadmap column with "declared, not yet
  enforced" framing. Honesty rule documented above the table.

- README.md: hero reframed to "context compiler + validation harness
  with cross-runtime skill packaging. The daemon is the always-on
  dream." Surfaces the schedulable daemon (already shipped via
  ao schedule + ao daemon + nightly.yml + the user's headless dream/
  evolution sessions) as a co-equal flagship rather than a power-user
  feature.

- docs/comparisons/competition-rpi-memory-pipelines.md: Outcomes row
  matches the new PRODUCT.md framing.

# Why this lands together

Per the recurrence finding (f-2026-05-07-positioning-audit-cycle-
recurrence): filing more beads to fix the gaps without dropping the
overpromised claims first is what produces the audit cycle. The claim
removal precedes the gap-fill work. soc-sx99 epic Waves 2 (daemon
surfacing recipe pack) and 3 (gap-filler jobs: feedback-loop --drain,
pattern filename repair) follow as separate PRs.

# Verification

bash tests/docs/validate-doc-release.sh: PASS

# Cross-references

- Closes: soc-yjzp.9
- Epic: soc-sx99 (this is Wave 1, doc honesty)
- Research: .agents/research/2026-05-07-agentops-strategic-positioning.md
- Finding: f-2026-05-07-positioning-audit-cycle-recurrence (registered)
- Related: soc-x7hy (MemRL signal strengthening, filed earlier today)
2026-05-07 01:22:40 -04:00
Boden Fuller 56b9c88407 fix(test): add git show mock to pre-push BATS test 5
The --scope head default (5dbe1e6d) uses `git show --name-only`
instead of `git diff --name-only`. The test mock only handled
diff, causing a false-negative on go build failure detection.
2026-05-04 22:14:31 -04:00
Boden Fuller 6a475e13d8 docs(eval): remove stale suite count and add workbench to doc index
Remove hardcoded "58" eval suite count from Directive 10 (now 60 and
growing). Add eval workbench link to documentation-index.md contracts
section.
2026-05-04 12:15:40 -04:00
Boden Fuller 4ef6cf5ed4 feat(eval): expand behavioral eval suite to all 12 workbench tasks
Add the remaining 6 cases (go-02, go-04, py-02, py-03, ops-02, ops-03)
covering test-writing, refactoring, input validation, pagination,
edge-case handling, and retry logic. Suite now exercises all 12
workbench tasks across Go, Python, and DevOps components.
2026-05-04 11:20:36 -04:00
Boden Fuller f3d927cf5f refactor(daemon): reduce validateRoutingLaneGates CC from 19 to below 18
Extract validateYieldGate and validateLaneAuthority helpers from
validateRoutingLaneGates. Clears the last cli/internal/ CC threshold
violation (Directive 5). All daemon tests pass.
2026-05-04 10:04:51 -04:00
Boden Fuller 3284017705 feat(eval): add Directive 10 and eval-workbench-verify gate to GOALS.md
Add Directive 10 "Measure skill value through real-task evaluation" with
progress notes and eval-workbench-verify gate (weight 6). Update PRODUCT.md
eval gap status from open to in-progress. Fix shellcheck warnings in task
scoring scripts (SC2034 unused variable, SC2064 trap quoting).
2026-05-04 09:53:02 -04:00
Boden Fuller fda9926c20 docs(eval): refresh source-of-truth docs and declare eval gap
Update PRODUCT.md evidence section to 2026-05-04: stars 328,
open issues 8, last pushed today. Add new Known Product Gap
for missing behavioral eval system — the eval engine exists
but has no content that measures whether skill changes improve
agent outcomes. Note CC 19 violation in GOALS.md Directive 5.
2026-05-04 09:01:49 -04:00
Boden Fuller 14358b5456 feat(goals): add warn-only state-path-resolver-coverage fitness gate + pattern doc (soc-irg1.5)
New scripts/check-paths-resolver-coverage.sh ratchet measures hardcoded
".agents/" string literals across executable surfaces (cli/cmd/ao,
cli/internal, hooks, lib, scripts) and prints a per-surface metric. Always
exits 0 (warn-only) per warn-then-fail-ratchet pattern; flip to blocking
is a separate follow-up issue after 2 weeks of baseline data. New gate
state-path-resolver-coverage wired into GOALS.md (weight 3, tag warn-only).
Pattern doc .agents/patterns/2026-05-01-state-path-resolver.md documents
the bash + Go resolver surfaces, recipes, and anti-patterns. Embedded
hooks re-synced via make sync-hooks per pre-mortem Finding 1.
2026-05-02 08:15:51 -04:00
Boden Fuller 1c2edcad40 feat(goals): add dream-end-user-coverage fitness gate + Directive #8 update for end-user-repo coverage (soc-hxnr.6) 2026-05-01 18:55:14 -04:00
Bo f7f182bcc8 Nightly 2026-04-29 — 9 productive cycles, +1 code goal, +2 runtime, -1 quarantined (#177)
* goals(flywheel-compounding): quarantine — reduce weight 8 → 3 (attempt 3)

Three consecutive nightlies (PR #165 2026-04-27, PR #174 2026-04-28, this
run 2026-04-29) failed to flip flywheel-compounding because the metric
requires multi-session citation activity that single-session nightly
automation legitimately cannot manufacture without gaming.

Per the run-brief rule "If 3+ consecutive nightlies attempted the same
goal without flipping the metric, the next attempt MUST be a quarantine
proposal," lower weight 8 → 3 (matching competitive-freshness, the other
slow-cadence gate). Diagnostic remains actionable from PR #174's rich
script swap.

- GOALS.md: weight 8 → 3, description annotated with rollback path
- .agents/findings/f-2026-04-29-001.md: full proposal w/ history
- .agents/goals/flywheel-compounding/attempts.jsonl: ledger persisted

Rollback: if citation corpus accumulates and gate stays green ≥7
consecutive nightlies, weight may be raised back to 5–8.

https://claude.ai/code/session_01Sjd8AFQVEcZJgdv86nP7BU

* refactor(gascity): extract assignSSEField from readRawFrame (CC 22 → ~17)

Pulled the SSE field-line switch out of SSEDecoder.readRawFrame
(cli/internal/gascity/events.go:379) into a free function:

- assignSSEField: parses one non-empty, non-comment SSE line and folds
  the field/value into the in-progress frame.

Net effect:
  before: 22 readRawFrame
  after:  readRawFrame ~17, assignSSEField ~6

cli/ at threshold 20 is now GREEN. cli/internal/ at threshold 18 still
has 2 violations (RunForgeTier1, ClassifyRPIArtifact, both CC 19).

Behavior preserved; gascity tests pass.

https://claude.ai/code/session_01Sjd8AFQVEcZJgdv86nP7BU

* refactor: drop final two CC 19 violations — go-complexity-ceiling flips

Two cohesive extractions clear the last cli/internal/ complexity offenders:

- cli/internal/llm/forge_tier1.go:
  validateAndDefaultTier1Options pulls the 12-clause guard prologue out
  of RunForgeTier1 (CC 19 → ~7). The required-fields and default-fills
  checks become trivially unit-testable.

- cli/internal/rpi/artifacts.go:
  classifyCouncilArtifact extracts the three /council/-prefixed branches
  (pre-mortem, post-mortem, vibe) out of ClassifyRPIArtifact's giant
  switch (CC 19 → ~14).

Goal effect:
  before: go-complexity-ceiling FAIL — 5 violations across cli/internal/
          (post-cycle-5; cli/ already green)
  after:  go-complexity-ceiling PASS — both cli/ (≤20) and cli/internal/
          (≤18) thresholds clean

Behavior preserved; llm and rpi tests pass.

https://claude.ai/code/session_01Sjd8AFQVEcZJgdv86nP7BU

* test(plans): replace defer os.Chdir restore with t.Chdir (16 sites)

Migrate cli/cmd/ao/plans_test.go's 16 oldWD/Chdir/defer-Chdir patterns to
the t.Chdir helper introduced in Go 1.24. The helper handles cleanup via
the test's t.Cleanup chain, eliminating defer ordering pitfalls and the
unused oldWD locals.

Net: -80/+16 lines; tests still pass.

Continues the t.Chdir migration begun in PR #174 (84 sites across 10
files); plans_test.go was the largest remaining cmd/ao site after that
batch (32 raw os.Chdir calls = 16 patterns).

https://claude.ai/code/session_01Sjd8AFQVEcZJgdv86nP7BU

* test(cmd/ao): replace defer os.Chdir restore with t.Chdir (19 sites, 4 files)

Migrate the remaining mechanical Getwd/Chdir/defer-Chdir patterns:

- dedup_test.go:           4 sites
- config_test.go:         10 sites (also drops unused "os" import)
- metrics_flywheel_test.go: 4 sites
- metrics_health_test.go:   1 site

Net: -141/+19 lines; cmd/ao tests still pass.

Two pattern variants are migrated:
  A) `oldWD, _ := os.Getwd()` + defer
  B) `oldWD, err := os.Getwd()` + nil-check + defer

Continues PR #174 + this nightly's plans_test work. Remaining cmd/ao
files (context_test, extract_test, curate_test, hooks_test, etc) use
non-mechanical patterns (e.g. multi-step Chdir within nested table-test
loops) that don't fit either A or B and need per-site review.

https://claude.ai/code/session_01Sjd8AFQVEcZJgdv86nP7BU

* ci(validate): surface warn-only suffix on continue-on-error jobs

Adds an explicit `name: <id> (warn-only)` to the four advisory jobs so
the GitHub PR status line distinguishes advisory failures from real
ones at a glance:

- agentops-eval-advisory  (warn-only)
- security-toolchain-gate (warn-only)
- doctor-check            (warn-only)
- check-test-staleness    (warn-only)

Job IDs are left unchanged to preserve `summary.needs` references and
any external branch-protection rules.

Closes harvested council-finding "Rename warn-only CI checks with
explicit suffix" (target_repo: agentops, severity: low) — chooses the
non-renaming variant ("surface continue-on-error in the GitHub status
line") since it's zero-risk for downstream refs.

Validation: `scripts/validate-ci-policy-parity.sh` — PASS (31 jobs;
4 non-blocking).

https://claude.ai/code/session_01Sjd8AFQVEcZJgdv86nP7BU

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-30 16:52:34 -04:00
Claude 5b8aecfe68 goals(flywheel-compounding): route check to rich-diagnostic script
The flywheel-compounding goal command was an inline jq -e expression
that emitted the bare string 'false' on failure. Operators saw no σρδ
structure and no hint at the failure cause, even though
scripts/check-flywheel-compounding.sh already produces a structured
diagnostic ('FAIL: σ=0 ρ=0 σρ=0 δ=… — zero citations recorded; corpus
is dormant').

Swap the GOALS.md row to invoke the script directly. Behavior is
preserved (exit 0 = PASS, exit 1 = FAIL) and ao goals validate still
parses the row. The metric remains corpus-state (citations.jsonl is
empty in this environment), but ao goals measure --json now surfaces
the actionable cause string instead of 'false'.

Heavy-goal angle: observability (cause-string, distinct from PR #165's
tag-restoration angle on the same goal).
2026-04-28 06:30:47 +00:00
Claude 577a4776f4 goals(metadata): restore long-cycle/corpus-state and runtime-artifact tags
PR #162 (refactor: go cli quality discovery batch) silently stripped the
Tags column added by the prior nightly's commit 56199e81, dropping the
classification metadata for three gates:

  - flywheel-compounding (w=8): long-cycle, corpus-state
  - compile-freshness (w=4): runtime-artifact
  - compile-no-oscillation (w=4): runtime-artifact

The Goal.Tags parser path and the JSON output plumbing are still wired
(TestParseTagsCell, TestParseGateRow_TagsHeaderColumn, etc.), so the
regression was purely in markdown content.

Why this matters for the heaviest failing gate:
flywheel-compounding's green path requires σρ > δ. Currently σ=0.65,
ρ=0, δ=0.0088 → escape velocity false. ρ=0 because no promoted
finding has been cited by NEW work; fixing it requires multi-session
corpus growth, not the current commit. Tagging it as
`long-cycle, corpus-state` lets /evolve and operator tooling recognize
this without lowering the weight or removing the gate (which would
hide the structural compounding obligation).

Same logic for compile-* — green path needs `ao defrag` to write
.agents/defrag/latest.json, which is gitignored and per-environment.

Verified: goals-validate passes; ao goals measure --json carries
non-null tags arrays for the three tagged gates.

Heavy-goal attempt history (per nightly attempts.jsonl):
This run = 1st recorded attempt for flywheel-compounding. Prior
attempts predate the per-goal attempts ledger. Angle = observability /
quarantine restoration. If this gate fails 3 consecutive nightlies
without metric movement, the next attempt should be a quarantine
proposal recommending weight reduction (8 → 3 to match other
corpus-state gates) or removal pending a corpus-growth proof.
2026-04-27 15:27:01 -04:00
Bo 9b08fb933d refactor(cli): go cli quality discovery batch (gc-bridge, json contracts, leaf-help smoke) (#162)
* docs: add go cli quality discovery plan

* fix(cli): harden gc bridge version parsing

* docs(go): align complexity policy with gates

* docs(cli): classify command surface

* fix(cli): enforce json output contracts

* feat(cli): expand completion coverage

* refactor(cli): pilot badge options writer

* refactor(cli): inject contradict output writer

* refactor(cli): inject notebook update writer

* fix(cli): enable gc runtime smoke coverage

* fix(cli): align gc bridge with gascity v1

* Release v2.39.0

* fix(tests): align next-work schema test with widened type enum

Commit ed35c47f added `docs` and `chore` to the script's VALID_TYPES,
but tests/scripts/check-next-work-schema-rows.bats:42 still used
`type:"docs"` as its supposed-to-be-rejected example, so the test
now passes through the validator — `bats-tests` has been red on
main since.

Switch the rejected-type example to `finding`, which is still
outside the enum and is also the canonical example cited in the
script's own header comment ("type=finding ... caught at push time").

Local: 11/11 in tests/scripts/check-next-work-schema-rows.bats pass.

* docs: capture finding generator postmortem (#157)

* fix(rpi): sort verdicts deterministically in context and status helpers (#158)

BuildPhaseContext and JoinVerdicts iterated the verdicts map directly,
producing non-deterministic output across runs. Sort keys before
rendering so prompt injection and status logs are reproducible.

Closes council finding W-7 (context-orchestration-leverage batch). The
related buildHandoffContext path was already fixed to delegate to
FormatVerdicts (which sorts); this completes the remaining helpers.

- cli/internal/rpi/status.go: sort keys in JoinVerdicts
- cli/internal/rpi/phased_context.go: sort keys in BuildPhaseContext
- tests: replace "ordering not deterministic" waivers with exact-order
  asserts and add a 50-run stability check

https://claude.ai/code/session_01Qw4bZvXUNuLs8Rp1j1homB

Co-authored-by: Claude <noreply@anthropic.com>

* fix(codex): audit noisy hook injections (#159)

* docs: add competitive radar (#160)

* feat(agents): harden operator control plane (#161)

* docs(discovery): plan agents control plane hardening

* feat(agents): harden operator control plane

* Release v2.39.0

* fix(tests): align next-work schema test with widened type enum

Commit ed35c47f added `docs` and `chore` to the script's VALID_TYPES,
but tests/scripts/check-next-work-schema-rows.bats:42 still used
`type:"docs"` as its supposed-to-be-rejected example, so the test
now passes through the validator — `bats-tests` has been red on
main since.

Switch the rejected-type example to `finding`, which is still
outside the enum and is also the canonical example cited in the
script's own header comment ("type=finding ... caught at push time").

Local: 11/11 in tests/scripts/check-next-work-schema-rows.bats pass.

* docs: capture finding generator postmortem (#157)

* fix(rpi): sort verdicts deterministically in context and status helpers (#158)

BuildPhaseContext and JoinVerdicts iterated the verdicts map directly,
producing non-deterministic output across runs. Sort keys before
rendering so prompt injection and status logs are reproducible.

Closes council finding W-7 (context-orchestration-leverage batch). The
related buildHandoffContext path was already fixed to delegate to
FormatVerdicts (which sorts); this completes the remaining helpers.

- cli/internal/rpi/status.go: sort keys in JoinVerdicts
- cli/internal/rpi/phased_context.go: sort keys in BuildPhaseContext
- tests: replace "ordering not deterministic" waivers with exact-order
  asserts and add a 50-run stability check

https://claude.ai/code/session_01Qw4bZvXUNuLs8Rp1j1homB

Co-authored-by: Claude <noreply@anthropic.com>

* fix(codex): audit noisy hook injections (#159)

* docs: add competitive radar (#160)

* fix(merge): drop unused AgentsDoctorError ref and prune allowlist entries without production refs

---------

Co-authored-by: Claude <noreply@anthropic.com>

* fix(merge): resolve conflicts by taking PR's refactored contradict/codex_runtime, main's overnight test schema

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-26 23:09:48 -04:00
Bo aae3f1a434 docs: add competitive radar (#160) 2026-04-26 22:58:33 -04:00
Claude 56199e8118 feat(goals): tag flywheel-compounding as long-cycle/corpus-state via Tags column
Adds an optional Tags column to the GOALS.md gates table, parses it through
to Goal.Tags, and propagates the tags into the Measurement JSON output of
`ao goals measure`. Tags are comma- or semicolon-separated, lowercased, and
empty entries are dropped.

Tags `flywheel-compounding` (w=8) with `long-cycle, corpus-state` so operator
tooling (e.g. /evolve selection) can recognize that this gate's green path
depends on multi-session corpus growth, not the current commit. Marks the
two compile-* gates with `runtime-artifact` for the same reason — their
green path requires `ao defrag` (or Dream's overnight preview) to have
written `.agents/.../defrag/latest.json` locally, and that file is gitignored.

Backwards-compatible: gates without a Tags column continue to parse as
before and emit `tags: null` in JSON output.

Tests:
- TestParseTagsCell (8 cases — empty, single, comma/semicolon, backticks,
  case-folding, dropped-empties)
- TestParseGateRow_TagsHeaderColumn — full row with tags
- TestParseGateRow_TagsAbsentByDefault — no Tags header → nil Tags
- TestParseGatesTable_TagsRoundTrip — two-row table with mixed tags
2026-04-26 05:02:03 +00:00
Bo 800eea8ac5 Nightly 2026-04-26 — 6 productive cycles, +3 goals, fitness 79.8 → 92.7 (#147)
* chore(agents): refresh next-work findings from dream 20260426T021434Z

Dream 6-iteration run added 2 new finding IDs to the queue and re-ranked
existing ones. Morning packets propose:
  - Write AgentOps philosophy doc from validated flywheel thesis
  - Audit context injection latency — are we lazy-loading everywhere we should
  - Backfill next-work queue rows to schema v1.3 and add drift validation

https://claude.ai/code/session_01MkdcbdMtkrHRVNUJdMQiRi

* refactor(harvest): split extractFromSubdir to satisfy cc≤20 ceiling

Move the WalkDir closure body into helpers (handleWalkErr,
classifyWalkDir, isArtifactFile, readArtifactFile) so the per-file
processing pipeline reads top-down without nested branches.

Closes the 25→14 complexity gap that go-complexity-ceiling has been
flagging on extract.go since the OpenRoot/TOCTOU close.

* gate(flywheel-compounding): surface σρδ + root cause on fail

Move the inline `bash -c '...jq -e .escape_velocity_compounding'` gate
into scripts/check-flywheel-compounding.sh so failing runs print the
σ/ρ/σρ/δ structure plus the dominant root cause (typically ρ=0 because
sessions only record `retrieved` citations) instead of a bare `false`
from `jq -e`.

Behavior:
  PASS  prints σ=… ρ=… σρ=… δ=… (compounding) and exits 0
  FAIL  prints σ=… ρ=… σρ=… δ=… threshold=… — <hint> and exits 1

When ρ=0 the hint specifically calls out applied/reference citations as
the missing input, which is the operator-actionable fix.

* feat(gate): runtime queue lint for next-work.jsonl schema enums

Add scripts/check-next-work-schema-rows.sh + bats tests that validate
each row in .agents/rpi/next-work.jsonl against the v1.3 enum sets
(type, severity, source, claim_status). Complements
validate-next-work-contract-parity.sh, which only checks doc/runtime
parity, by catching legacy or hand-edited rows that drift from the
schema.

Closes the dream-2463d728 packet ("Backfill next-work queue rows to
schema v1.3 and add drift validation"). Current queue is clean — gate
is preventive rather than corrective.

10 bats cases cover: missing-file pass, clean-row pass, drift on each
enum field (severity/type/source/claim_status), legacy flat rows,
malformed JSON, empty lines.

* refactor(inject): split applyConfidenceDecayMarkdown to drop CC 17→5

Extract three helpers from applyConfidenceDecayMarkdown:
  parseConfidenceField        — confidence parse with default
  mostRecentInteraction       — pick latest of last_decay_at/last_reward_at
  writeDecayedFrontmatter     — read-modify-write of frontmatter (with
                                 findFrontmatterEnd helper)

Pulls the function under the gocyclo warning threshold (15) so the
go-complexity-ceiling gate keeps its head room as new fields land.

* test(cli): cover flywheel compare/close-loop and allowlist function-level surface

Two slices to bring the cmdao-surface-parity gate green:

1. Add executeCommand-driven cobra tests for `flywheel compare` and
   `flywheel close-loop`, and extend the parent-expectations map in
   TestCobraCommandTreeRegistration so future drift is caught.

2. Allowlist five overnight-curator subcommands and two beads
   subcommands that already have function-level _test.go coverage but
   whose tests don't include the literal "ao <cmd>" string pattern the
   parity script greps for. Each entry cites the test file and a
   specific covered function/test name.

Result: parity gate goes from 8 uncovered commands → all 159 covered
or allowlisted.

* test(inject): pin extracted decay helpers (parse/recent/end)

Add focused L1 tests for the helpers introduced in the
applyConfidenceDecayMarkdown CC 17→5 refactor:

- parseConfidenceField: defaults on missing/zero/negative/unparseable
- mostRecentInteraction: picks latest, ignores bad timestamps, returns
  zero on absence
- findFrontmatterEnd: returns first closing `---`, -1 when missing

Locks the helpers' semantics so future edits don't silently change
behavior the integration test (TestApplyConfidenceDecay_*) doesn't
notice.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-26 00:26:03 -04:00
Boden Fuller 2156c627ca test(runtime): add runtime proof gates 2026-04-23 23:54:40 -04:00
Claude c0de539c11 fix(gates): fall back to Dream defrag preview for compile-* gates
compile-freshness and compile-no-oscillation both require .agents/defrag/
latest.json, a local-only artifact that is .gitignored. On machines that
run Dream but not a manual `ao defrag`, both gates fail with "not found"
even though Dream has just written a fresh defrag preview at
.agents/overnight/<run>/defrag/latest.json with the same JSON shape.

- check-compile-health.sh: when the canonical path is missing and
  COMPILE_OUTPUT_DIR is unset, fall back to the freshest overnight
  preview. CI paths (which set COMPILE_OUTPUT_DIR) remain strict.
- scripts/check-compile-oscillation.sh: new helper that mirrors the
  freshness gate's fallback and runs the oscillating-goals jq filter.
- GOALS.md: replace the inline compile-no-oscillation bash with a call to
  the new script so the fallback applies there too.

Fitness (post-cycle1 -> post-cycle2):
  compile-freshness       (w=4): fail -> pass
  compile-no-oscillation  (w=4): fail -> pass

Verified:
  ao goals measure --goal compile-freshness       -> pass
  ao goals measure --goal compile-no-oscillation  -> pass
  ao goals validate                                -> valid: true
  heal.sh --strict                                 -> clean

https://claude.ai/code/session_015RK27PGX79MsGU5XUhBxkr
2026-04-22 06:38:16 +00:00
Boden Fuller 7dd2f7c426 fix(goals): extend CLI test gate timeout 2026-04-13 14:18:50 -04:00
Boden Fuller 7a2e321d94 feat: ship dream-cycle and contribution proofs 2026-04-09 17:49:15 -04:00
Boden Fuller 24ae7090e4 test: promote runtime smoke coverage 2026-04-09 17:17:24 -04:00
Boden Fuller 6d80baf689 docs: align product framing across onboarding surfaces 2026-04-09 15:45:04 -04:00