55 Commits

Author SHA1 Message Date
Boden Fuller 1e073d8363 chore: purge archived AO↔Olympus bridge integration + prefer local Go in precommit hook
Olympus (ol) was the power-user daemon predecessor to AgentOps, archived
in strategic-direction.md. The bridge contracts (SPEC_ONLY, never
enforced), MemRL policy surface, OL quarantine constraints collector, and
supporting scripts/tests all referenced a now-dead integration. Purging
them removes ~2400 lines of stale surface area.

## Deleted files
- docs/ol-bridge-contracts.md
- docs/architecture/ao-olympus-ownership-matrix.md
- docs/plans/2026-02-13-ao-olympus-bridge-next-steps.md
- docs/contracts/memrl-policy-integration.md
- docs/contracts/memrl-policy.schema.json
- docs/contracts/memrl-policy.profile.example.json
- cli/cmd/ao/inject_ol_test.go
- skills/vibe/scripts/ol-validate.sh + codex mirror
- skills-codex/swarm/scripts/ol-ratchet.sh, ol-wave-loader.sh
- tests/ol-integration/ (entire directory)

## CLI code stripped
- internal/search/types.go: OLConstraint struct + InjectedKnowledge.OLConstraints field
- internal/search/inject_run.go: CollectOLConstraints, WriteConstraintsSection, quarantineRelPath const, all related trim/render logic
- cmd/ao/inject.go: gatherOLConstraints, collectOLConstraints wrapper, olConstraint type alias, init-time call site
- Package comments in provenance/storage/types/formatter updated "olympus" → "agentops"
- formatter/markdown.go: session tag "olympus" → "agentops" (+ test update)
- Tests: deleted TestCollectOLConstraints + TestInject_collectOLConstraints, stripped OL subtests from TestFormatKnowledgeMarkdown and TestInject_*, renamed "olympus" literal test data to "other-repo"
- rpi_phased_context.go: stripped "matches Olympus DefaultTimeout" and "Modeled on Olympus internal/git/worktree.go" comments

## Docs + skills stripped
- mkdocs.yml nav: 3 entries removed (AO-Olympus Matrix, MemRL Policy, OL-AO Bridge)
- docs/INDEX.md, contracts/index.md, architecture/index.md, index.md: cross-refs removed
- strategic-direction.md: retirement rationale compressed to one paragraph
- docs/context-packet.md, positioning/devops-for-vibe-coding.md, plans/README.md: OL-specific content removed
- skills/vibe/SKILL.md + codex mirror, swarm/SKILL.md: OL script refs removed
- skills/vibe/references/deep-checks.md, plan/references/planning-rules.md (+ codex), pre-mortem/references/council-fail-patterns.md (+ codex): OL rule/pattern entries removed
- skills-codex hashes regenerated (plan, pre-mortem, swarm, vibe)

## Precommit hook fix
- hooks/go-test-precommit.sh: prefer ~/.local/go/bin/go when present. Hooks
  don't inherit interactive-shell PATH, so apt-provided go-1.22 would
  otherwise override a user-local 1.26 install. Mirrors the zshrc pattern.

## Retained (historical / useful)
- strategic-direction.md: 1-paragraph archival note
- Historical release notes (docs/releases/*.md) — immutable past-release record
- cli/testdata/transcripts/real-2.4mb.jsonl — captured test fixture
- docs/brownian-ratchet.md ol-rg3p bead-ID refs — internal bead prefix, not Olympus

## Verification
- go build ./... && go vet ./... clean
- go test ./... clean except pre-existing TestGCBridgeVersion_Live panic
- scripts/docs-build.sh --check (mkdocs strict) clean
- scripts/check-contract-compatibility.sh passes
- scripts/regen-codex-hashes.sh run — 4 skills updated
2026-04-19 14:33:00 -04:00
Boden Fuller cc6750c4e8 feat(docs,skills): rebuild Pages site with MkDocs Material + harden RPI orchestrator delegation contract
## Docs site — boshu2.github.io/agentops

- Replace Jekyll minima with MkDocs Material (slate dark palette default)
- Landing hero scoped to .landing-hero (no gradient bleed on inner pages)
- Section landings (getting-started, architecture, reference, contracts, levels) with narrative ledes
- Generate skill catalog + per-skill pages from skills/*/SKILL.md at build
- Generate CLI reference from cli/docs/ at build (fails build on missing source)
- Fix every internal link via one-shot migration (scripts/migrations/2026-04-19-fix-docs-links.py)
- Wire mkdocs build --strict into pre-push gate (Check 25a)
- Replace .github/workflows/pages.yml with .github/workflows/docs.yml (actions/deploy-pages)
- README + docs/CONTRIBUTING updated with docs-build toolchain on-ramp
- tests/docs/validate-links.sh patched to understand mkdocs-generated paths

## RPI orchestrator strict-delegation contract

- Strict sub-skill delegation is now the default for /rpi, /discovery, /validation. No --full flag — always on.
- Canonical contract in skills/shared/references/strict-delegation-contract.md (plus Codex mirror)
- Forged learning with detection phrases + corrective actions (ao-inject-ready)
- Rename --no-lifecycle -> --no-scaffold in /discovery (Claude + Codex) with deprecation alias through v2.40.0
- Harden inline-work hotspots with orchestrator-owned markers in /crank STEPS 3a.3, 6.5, 8.7 + Inline Work Policy footer
- Flag consistency: --auto and --interactive scopes documented; --complexity syntax formalized
- CHANGELOG [Unreleased] documents + scaffolds; runtime hook enforcement explicitly deferred

## fix(hooks): go-test-precommit skips when no Go files staged

- Previously ran go vet + go build unconditionally, blocking non-Go commits when Go toolchain was missing or at a different version
- Now checks staged diff and exits cleanly if no *.go or go.{mod,sum,work} files are staged
- Applied to both hooks/ (source) and cli/embedded/hooks/ (synced)

Provenance: full RPI lifecycle with strict delegation at every phase boundary (Phase 1 Skill(discovery) -> Phase 2 Skill(crank) -> Phase 3 Skill(validation) -> Skill(vibe), Skill(post-mortem), Skill(retro)).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 10:37:58 -04:00
Boden Fuller 50cf99fed9 feat(validation): swarm evidence schema + validator + gate wiring
Defines a tracked contract for swarm worker result files living under
.agents/swarm/results/<task>.json. These files were implicitly shaped
but never validated — misshapen packets could silently break crank
result ingestion.

- schemas/swarm-evidence.schema.json: JSON Schema. Required: task,
  status, files_changed, notes. Optional: tests, gate, evidence,
  before/after counters. additionalProperties=true permits task-specific
  extensions.
- scripts/validate-swarm-evidence.sh: jq-based validator accepting a
  file or directory. ajv fallback when available. Exit 0 pass, 1 fail.
- docs/contracts/swarm-evidence.md: human-readable contract doc with
  example and schema link. Added to docs/INDEX.md catalog.
- scripts/pre-push-gate.sh: new section 26b ('swarm evidence schema')
  invokes the validator on every push.
- scripts/check-contract-compatibility.sh: extended ref resolution to
  also search schemas/ so docs/contracts/*.md can cite
  schemas/*.schema.json without tripping the cataloguing check.

Consumes ag-yhr 'Implement executable swarm evidence schema validation'.
2026-04-15 16:48:17 -04:00
Boden Fuller a01235a3a8 feat(dream): add adaptive long-haul corroboration 2026-04-14 23:12:36 -04:00
Boden Fuller 8df916ed7f feat(dream): add yield telemetry to reports 2026-04-14 22:37:00 -04:00
Boden Fuller 4d9f0a110b feat(dream): emit actionable morning packets 2026-04-14 20:53:15 -04:00
Boden Fuller 2bfeb5bd35 docs(constraints): clarify active constraint inputs 2026-04-13 09:52:30 -04:00
Boden Fuller 1a51354917 docs(team-runner): clarify claude sandbox semantics 2026-04-12 11:51:20 -04:00
Bo 4c5321c636 feat(dream): add local curator adapter (#97) 2026-04-12 00:24:25 -04:00
Boden Fuller 2af0f4bd02 test(overnight): cover live tree hash statuses
Refs na-1iv
2026-04-11 21:00:19 -04:00
Boden Fuller 7e4e34ad9e feat(overnight): M8 C1 Option A — pre-commit fitness gate (closes na-h61)
Reorder the Dream RunLoop iteration body so fitness is measured against
the staging tree BEFORE cp.Commit() instead of against the already-mutated
live tree after. Under strict mode, a regression halt now fires before
the live ~/.agents/ is ever touched — external observers never see a
regressed state.

## What changed

Before (Option B):
  REDUCE → COMMIT → VerifyMetadataRoundTripPostCommit → MEASURE → DELTA → HALT
  On regression: status=halted-on-regression-POST-commit, NO rollback,
  live tree already mutated.

After (Option A, this commit):
  REDUCE → MEASURE (against cp.StagingDir) → DELTA → HALT (with Rollback)
         → COMMIT → VerifyMetadataRoundTripPostCommit
  On strict-mode regression/plateau: cp.Rollback() discards staging,
  status=halted-on-regression-PRE-commit, live tree untouched.

## Why the original 395 LOC estimate was inflated

Prior session deferred M8 as a ~395 LOC architectural change requiring
dedicated --complexity=full --mixed council. This session's pre-flight
council validation (3-judge --tdd mode) discovered that the staging
infrastructure already existed in the codebase:

  * cp.StagingDir is a full mirror of .agents/ subpaths
    (checkpoint.go:194-223)
  * REDUCE already writes into cp.StagingDir (reduce.go:186)
  * cp.Rollback() is safe at any state (checkpoint.go:345)
  * cp.StagingDir/.agents/ is a valid cwd for corpus.Compute — no
    signature change needed

The actual fix was a sequencing bug, not missing infrastructure.
Real size: ~300 LOC (code + tests + docs). Real re-plumbing: 1 existing
test (TestRunLoop_RegressionHaltStrict status assertion), well under
the pre-agreed 5-broken-tests abort gate.

## Files

cli/internal/overnight/types.go
  + StatusHaltedOnRegressionPreCommit (new enum value)
  + Validate() + IsCorpusCompounded() switches updated
  + StatusHaltedOnRegressionPostCommit kept for backward compat with
    persisted pre-M8 iterations

cli/internal/overnight/loop.go
  - Removed old COMMIT block at former loop.go:332-348
  - Removed old post-commit metadata check at former 350-360
  - Added new MEASURE block at former position, pointing RunMeasure at
    cp.StagingDir via a local RunLoopOptions copy
  - Added cp.Rollback() to the measure-error branch
  - Added cp.Rollback() + StatusHaltedOnRegressionPreCommit to the strict
    regression halt branch (and removed writeCommittedButFlaggedMarker,
    which was post-commit-specific)
  - Added cp.Rollback() + StatusHaltedOnRegressionPreCommit to the strict
    plateau halt branch
  - Inserted new COMMIT block + post-commit metadata check AFTER the
    warn-only rescue path, before the per-iter persist+append
  - Warn-only rescue path itself unchanged (tolerated regressions still
    commit; that's the whole point of warn-only)

cli/internal/overnight/loop_fitness_injection_test.go
  + TestM8_StrictRegression_HaltsPreCommit (T1 — the core wiring)
  + TestM8_StagingDiscardedOnPreCommitHalt (T2 — proves Rollback fired)
  + TestM8_HappyPath_CommitsNormally (T4 — pass-through not broken)
  ~ TestRunLoop_RegressionHaltStrict — status assertion updated to
    StatusHaltedOnRegressionPreCommit
  ~ TestRunLoop_WarnOnlyBudgetExhausted — same update; budget-exhausted
    fall-through to strict halt now uses PreCommit (consistency invariant)

docs/contracts/dream-run-contract.md
  + Iteration structure now documents 4 stages with Option A sequencing
  + Halt conditions table updated with new iter status values
  + Historical note explains the shift + why PostCommit status is kept

## Test results

* 4 new M8 tests pass
* 2 existing tests updated + pass
* Full overnight package green
* Full cli test suite green (go test ./...)
* Race detector clean (go test -race ./internal/overnight/...)
* go vet clean
* Scope gate: 1 broken existing test (< 5 abort threshold)

## Dream RunLoop Correctness epic status

M1-M7 + M8 + M9 all landed. Epic complete. M9 ratchet upgrade (warn→fail)
still gated on 1-2 clean post-679552ae main runs; na-h61 was the last
deferred item.

Closes: na-h61
Refs: .agents/council/2026-04-11-m8-assumption-validation-consolidated.md
      .agents/council/2026-04-11-m8-assumption-validation-judge{1,2}.md
2026-04-11 08:05:48 -04:00
Boden Fuller 13b10c8237 fix(overnight): split "rolled-back" into IterationStatus enum (C2)
The legacy "rolled-back" string at loop.go carried two fundamentally
different semantics at two producer sites:

  loop.go REDUCE pre-commit failure    — corpus NOT on disk
  loop.go post-commit regression halt  — corpus IS on disk

The second was a LIE: the label claimed rollback while cp.Commit()
had already compounded the corpus into the live tree. Operators
reading the morning report saw "rolled-back" and assumed no-op,
when in fact the mutation was permanent.

Fix: introduce a 5-value IterationStatus enum in types.go with
StatusRolledBackPreCommit and StatusHaltedOnRegressionPostCommit
as distinct constants. Update both producer sites. Add a
committed-but-flagged marker file in iteration_store.go that
operators can find via directory listing. Fix the Micro-epic 2
rehydration logic to use IsCorpusCompounded as the baseline
predicate (closing the known-limitation documented at
.agents/council/2026-04-10-pre-mortem-microepic-2-cycle-history.md
#pm-20260410-m2-005).

Ship the Status Precedence Truth Table in docs/contracts/dream-report.md
so the enum semantics are documented, not tribal.

Touches:
- cli/internal/overnight/types.go (IterationStatus enum + Validate + IsCorpusCompounded)
- cli/internal/overnight/loop.go (rename + rehydration predicate update + other status literals)
- cli/internal/overnight/iteration_store.go (marker helpers)
- cli/internal/overnight/overnight_e2e_test.go (predicate update)
- cli/cmd/ao/overnight.go (explicit string() cast at the Steps boundary)
- docs/contracts/dream-report.md (enum + truth table + historical note)
- Test additions: 4 L1 enum + 4 L1 marker + 3 L2 rehydration/hash invariant

The TestRunLoop_LiveTreeHashInvariant test lands the StatusDone case
only; follow-up fixture engineering for the other 4 status values is
tracked in bd issue na-1iv.

Plan: .agents/plans/2026-04-10-microepic-3-status-enum.md
Pre-mortem: .agents/council/2026-04-10-pre-mortem-microepic-3-status-enum.md
Closes known-limitation from .agents/council/2026-04-10-pre-mortem-microepic-2-cycle-history.md
2026-04-10 22:25:55 -04:00
Boden Fuller d20e21bd90 feat(overnight): persist cycle history + rehydrate on resume (C1)
Writes each Dream iteration to <outputDir>/<runID>/iterations/iter-N.json
via atomic CreateTemp -> Sync -> Rename -> fsyncDir, and rehydrates prior
iterations at RunLoop startup so a crashed or MEASURE-failed run resumes
with full history and a correct prevSnapshot baseline.

Fixes the 2026-02-22 evolve-overnight failure mode where a crashed run
silently lost iteration history and restarted from a fresh baseline.

Also fixes the pre-existing IterationID contract drift at loop.go:145:
the documented format at types.go:10 is "<run-id>-iter-<N>" but the
runtime generated just "iter-N". Now matches the documented contract.

Touches:
- cli/internal/overnight/iteration_store{.go,_test.go} (new)
- cli/internal/overnight/loop_testhooks.go (new; test-only fault hook)
- cli/internal/overnight/loop_resume_test.go (new; L2 resume + ID regression)
- cli/internal/overnight/loop.go (persist + rehydrate + ID fix + plateau replay)
- cli/internal/overnight/types.go (add required RunID field)
- cli/internal/overnight/{stages,boundary,overnight_e2e}_test.go (set RunID)
- cli/cmd/ao/overnight.go (wire summary.RunID into RunLoopOptions)
- docs/contracts/dream-report.md, docs/contracts/dream-run-contract.md
- skills/dream/SKILL.md, skills-codex/dream/SKILL.md (+ regen codex hashes)

Prevents direct recurrence of the 115-cycle runaway from 2026-02-22.
Plan: .agents/plans/2026-04-10-microepic-2-cycle-history.md
Pre-mortem: .agents/council/2026-04-10-pre-mortem-microepic-2-cycle-history.md
2026-04-10 21:43:00 -04:00
Boden Fuller b49c1204a0 feat(overnight): wave 5 — e2e tests, fixture, v1 reader, contracts, skill docs
Dream nightly compounder plan rev 2, Wave 5 (Issues 11, 12, 13)
executed by two parallel workers.

Issue 11 — L2 e2e tests + 150+ learning fixture + frozen v1 reader:

- NEW cli/internal/overnight/fixture/gen_fixture.go: deterministic
  fixture generator producing 150 learnings + 20 findings + 5
  patterns + 3 knowledge files with realistic metadata distribution
  (maturity mix 0.50/0.30/0.15/0.05, source_bead on 60%, utility
  0.1-0.9, mtime spanning 180 days). Parked at fixture/ not
  testdata/ because Go excludes testdata/ from package resolution.
  Two non-obvious tunings: pseudo-random hex bodies avoid dedup
  trigram overlap, and pattern[0] embeds all learning filenames to
  avoid orphan pruning during REDUCE.

- NEW cli/internal/overnight/overnight_e2e_test.go: three L2 tests
  driving INGEST + REDUCE + MEASURE against the full 150-learning
  fixture. TestRunLoop_L2_FullIteration_CorpusQualityMoves asserts
  catalog build, checkpoint, stage-order, metadata round-trip,
  findings routed, next-work.jsonl written, and fitness vector
  populated. TestRunLoop_L2_MetadataStripDetected exercises the
  pm-005 regression at L2 scale with checkpoint rollback.
  TestRunLoop_L2_CompoundFilterCliff_DoesNotSilentlyKillCorpus is
  the pm-015 guard: asserts no corpus-quality metric drops by more
  than 0.30 between iterations (the "cliff" threshold from
  2026-04-02-flywheel-quality-fixes).

- NEW cli/cmd/ao/testdata/v1_reader/summary_v1.go: frozen v1
  reader struct snapshot of overnightSummary at 2026-04-09 HEAD.
  Only struct definitions, no methods, to prevent drift.

- EXTENDED cli/cmd/ao/overnight_test.go: added
  TestRunOvernight_SchemaV2IsV1BackwardCompatible (pm-008 fix).
  Constructs a minimal v2 summary, marshals it, unmarshals into
  the frozen v1 reader, and asserts every v1 field is populated.
  Previous tests untouched.

Issue 12 — Contract v2 bumps:

- docs/contracts/dream-run-contract.md: new v2 iteration-loop
  section. Documents INGEST -> REDUCE -> MEASURE, the 5
  checkpointed subpaths, 5 halt conditions, 5 anti-goals, 6 new
  flags, startup recovery protocol, and the pm-011 concurrency
  guard. V1 content + Wave 2's "Retrieval-bench determinism"
  subsection preserved.

- docs/contracts/dream-report.md: Schema v2 section documenting
  the 4 new top-level fields (iterations, fitness_delta,
  plateau_reason, regression_reason) and the IterationSummary
  shape (14 fields). Explicit backward-compat guarantee
  referencing TestRunOvernight_SchemaV2IsV1BackwardCompatible.

Issue 13 — Skill docs:

- skills/dream/SKILL.md: added Compounding Loop (v2) section with
  anti-goals, 3 new /dream start examples, iteration sub-summary
  bullet in Output, Delineation vs /evolve table. 207/250 line
  budget.
- skills/harvest/SKILL.md: nightly-usage blockquote pointing at
  /dream start as the primary nightly driver and noting the
  .agents/overnight/run.lock refusal during Dream runs.
- skills/evolve/SKILL.md: Delineation vs /dream section
  (identical verbatim table to dream/SKILL.md — must be kept in
  sync). Pointer added in See Also.

Verification:
- go build ./... OK
- go vet ./... OK
- go test ./internal/overnight/... all green (e2e + unit)
- go test ./cmd/ao/ all green (incl. schema v2 backward-compat)
- heal.sh --strict clean
- check-contract-compatibility.sh 0 failures / 0 warnings

Follow-up flagged (not blocking): skills-codex/ parity for dream/
harvest/evolve needs a pass of scripts/audit-codex-parity.sh +
regen-codex-hashes.sh to propagate the markdown changes.

Refs: plan Issues 11/12/13, pre-mortem pm-008/011/012/015.
2026-04-10 12:53:58 -04:00
Boden Fuller 1f30e073aa feat(overnight): wave 1-2 — skeleton + independent components
Dream nightly compounder (plan rev 2). Lands Wave 1 skeleton and
Wave 2 parallel components per the file-conflict matrix.

Wave 1 — cli/internal/overnight/ skeleton:
- doc.go with package contract + anti-goals (no code mutation, no
  /rpi, no git ops, no symlinks, no swarm)
- types.go with RunLoopOptions and normalize() defaults (2h budget,
  6h max, K=2 plateau window, 0.05 regression floor, 512MB checkpoint
  cap, 12h stale-lock threshold)
- loop.go with public RunLoop surface (stub for Wave 3 stage drivers)

Wave 2 — independent components (zero file overlap, 6 workers):
- checkpoint.go: two-phase-commit staging overlay with marker-file
  crash-recovery protocol. VerifyMetadataRoundTrip computes set-diff
  over ALL frontmatter keys (pm-005 fix — no hardcoded allowlist)
- fitness.go / plateau.go: FitnessSnapshot.Delta with per-metric
  floors; PlateauState with K=2 minimum (pm-FEAS-08) and noisy-sample
  absorption
- findings_router.go: scans .agents/findings/f-*.md, dedups against
  next-work.jsonl by finding ID, regex-gates registry.json and
  README.md (pm-MISS-06 fix)
- queue.go: evolve pinned-queue format parser
- cli/internal/lifecycle/close_loop.go: extracted from
  cli/cmd/ao/flywheel_close_loop.go (pm-001 fix — the original plan
  mis-identified feedback_loop.go as a close-loop stub;
  feedback_loop.go is untouched). Dependency-injected ExecuteCloseLoop
  lets Dream's REDUCE call close-loop in-process. cmd/ao adapter
  preserves byte-for-byte stdout compatibility.
- cli/internal/corpus/: new package computing FitnessVector from the
  local corpus. Dedicated cli/cmd/ao/corpus.go CLI (pm-002 fix —
  corpus-quality stays OUT of the goals Directive subsystem).
- retrieval_bench.go + dream-run-contract.md: documented existing
  determinism (pm-012 fix — no --seed flag added, would be dead work).

Tests: 58 new tests across internal/overnight, internal/corpus,
and internal/lifecycle, all L1 unit tests per AI-native test shape.
All passing. 50+ pre-existing close-loop-adjacent cmd/ao tests
preserved unmodified.

Build: go build ./... OK, go vet ./... OK, all three new package
test suites green.

Refs: .agents/plans/2026-04-09-dream-nightly-compounder.md (rev 2),
.agents/council/2026-04-09-pre-mortem-dream-nightly-compounder.md
(attempt 1 FAIL → 15 findings patched → attempt 2 WARN/PROCEED).
2026-04-10 12:08:34 -04:00
Boden Fuller ee515c82d6 feat: ship layered dream operator surfaces 2026-04-09 21:06:05 -04:00
Boden Fuller ad07b9baca feat: ship dream overnight runtime slice 2026-04-09 20:03:10 -04:00
Boden Fuller f6e122b946 docs: package codex native hooks release 2026-04-09 16:54:53 -04:00
Boden Fuller 4a179cd94d docs(codex): update hookless references to reflect native hooks in v0.115.0+
Codex CLI v0.115.0+ supports native hooks (SessionStart, Stop,
UserPromptSubmit, PreToolUse, PostToolUse). Update skills, CLI help
text, and docs to reflect this:

- Skills: using-agentops, recover, quickstart, post-mortem, rpi
  now document native hooks as primary, hookless as fallback
- CLI: codex.go help text updated (ao codex start/stop are fallback)
- Docs: architecture, contracts, flywheel, session-lifecycle updated
  with codex-native-hooks runtime mode alongside hookless fallback
2026-04-07 09:44:47 -04:00
Boden Fuller 8f9a868457 feat(rpi): cherry-pick proof-backed next-work visibility from ag-k9jk
From codex/ag-k9jk (3f5f096b) with conflict resolution:
- classifyNextWorkCompletionProof + nextWorkProofDecision types
- nextWorkSearchRoot utility
- context_explain: collectContextExplainNextWorkProofSuppressions
- stigmergic_packet: proof-backed filtering in flattenNextWorkEntries
- Schema/contract: ProofRef validation, harvest-next-work guidance
- Parity gate additions in validate-next-work-contract-parity.sh
- Post-mortem SKILL.md + codex copy updated

Conflicts resolved: keep main's shouldSkipLegacyFailedEntry (CompletionEvidence),
add branch's proof classification infrastructure alongside.
2026-04-05 10:38:07 -04:00
Boden Fuller 7691366418 fix(rpi): cherry-pick legacy failed entry preservation from ag-wfo3
From codex/ag-wfo3 (91abb072) with conflict resolution:
- Keep main's proof-backed shouldSkipLegacyFailedEntry (CompletionEvidence check)
- Fix test to match readQueueEntries behavior (returns all non-consumed,
  proof filtering is downstream via shouldSkipLegacyFailedEntry)
- next-work.schema.md doc updates
2026-04-05 10:34:20 -04:00
Boden Fuller 0a7ecf8c49 docs: cherry-pick research→finding registry bridge from ag-wfo3
From codex/ag-wfo3 (59fb8ece): documents how research findings should
flow into the finding registry for downstream planning/pre-mortem.
2026-04-05 10:20:56 -04:00
Boden Fuller 24b8d29738 fix: purge tracked .agents artifacts 2026-04-03 09:33:31 -04:00
Boden Fuller 2fc5234911 refactor(hooks): keep Claude startup surface in CLAUDE.md 2026-04-02 15:52:33 -04:00
Boden Fuller 6df03bdbb3 feat(hooks): add claude factory startup routing 2026-04-02 15:32:50 -04:00
Boden Fuller 0034b77f33 feat: consume knowledge operator surfaces at runtime 2026-04-01 21:50:43 -04:00
Boden Fuller 4df690fcba feat: add session intelligence explainability 2026-04-01 19:04:36 -04:00
Boden Fuller 781a83e320 feat(contracts): add hook runtime contract with Claude/Codex/manual event mapping
Defines the canonical supported/adapted/unsupported event matrix across
runtimes. Codex uses skill-driven lifecycle (ao codex start/stop) instead
of hook callbacks. PreToolUse/PostToolUse documented as unsupported in Codex.

Implements: ag-35a.1
2026-03-28 14:34:21 -04:00
Boden Fuller d8c349a60c feat(skills): teach evolve to use PROGRAM.md 2026-03-23 12:40:41 -04:00
Boden Fuller 63e0b0fc18 feat(cli): add PROGRAM.md autodev contract 2026-03-23 10:54:10 -04:00
Boden Fuller cec1e6030a hotfix: include pending repo updates 2026-03-21 11:50:30 -04:00
Boden Fuller b5316baef7 fix: align codex skill bundle with runtime contract 2026-03-21 10:08:27 -04:00
Boshu2 1332005911 fix(converter): strip task primitives instead of mapping to unavailable tools
todo_write and update_plan are NOT available as Codex tools (empirically
verified via codex exec). Previous mapping was wrong — now strips all
Task*/Team*/SendMessage lines instead.

Also:
- Add Skill(skill="X") → $X rewrite rule
- Add Skill() invocation check to conformance validator
- Update contract doc with corrected mapping table
- Regen all 54 codex skills: 0 conformance failures, 0 SKILL.md primitives
2026-03-14 10:01:36 -04:00
Boshu2 e046774f90 fix(converter): map Claude primitives to Codex equivalents instead of stripping
Previous approach stripped all Claude primitive lines. Now maps to real
Codex tools where equivalents exist:
- TaskCreate → todo_write
- TaskList/TaskUpdate/TaskGet → update_plan
- Edit tool → apply_patch
- Read tool → read_file
- Grep tool → rg
- Glob tool → glob_file_search
- Agent(subagent_type=Explore) → explorer role
- TeamCreate/SendMessage → strip (truly absent in Codex)

Update contract doc with Codex built-in tools table and mapping.
Update conformance validator to accept mapped tool names.
Regenerate all 54 codex skills.

Sources: developers.openai.com/codex/skills, /multi-agent, /cli/reference
2026-03-14 03:15:42 -04:00
Boshu2 c0dc87dd7c feat(codex): add Codex skill API contract and conformance validator
- docs/contracts/codex-skill-api.md: source of truth for Codex runtime
  skill structure, frontmatter, discovery paths, multi-agent primitives
- scripts/validate-codex-api-conformance.sh: checks generated codex
  skills against actual Codex API (baseline: 12 failures, 124 refs)
- Add contract to docs/INDEX.md
2026-03-14 03:01:53 -04:00
Boshu2 b657b25e26 chore: preserve flywheel rpi v2 wip 2026-03-09 21:24:30 -04:00
Boshu2 02dcef9d76 merge: integrate preserved finding compiler rpi work
# Conflicts:
#	docs/INDEX.md
2026-03-09 17:00:13 -04:00
Boshu2 7af9ad5f9c chore: preserve finding compiler rpi worktree 2026-03-09 16:56:15 -04:00
Test 899c0eaea5 feat: add finding registry prevention ratchet 2026-03-09 16:44:54 -04:00
Test 73a4fb7c13 feat(skills): add repo-native orchestration profile 2026-03-09 14:50:59 -04:00
Test e0d4a8a55d feat: add headless Claude team backend 2026-03-09 13:34:36 -04:00
Boden Fuller 954822db42 fix(cli): harden historical AO/RPI mining contracts 2026-03-06 08:03:11 -05:00
Boden Fuller 97a3a4175f feat(context-leverage): resolve 9 post-mortem tech-debt items with TDD
Wave 1 (code):
- Extract formatVerdicts + renderHandoffField helpers (CC 25→19)
- Add maxGateRetryDepth=5 hard ceiling for gate retry recursion
- Remove dead selectHandoffFields (replaced by fieldAllowed)
- Replace bc dependency with awk in proof-run.sh
- Surface audit trail write errors via VerbosePrintf
- Consolidate hardcoded *4 magic constant → InjectCharsPerToken

Wave 2 (docs/skills):
- Document NarrativeCap=0 disambiguation semantics
- Add mandatory file-conflict matrix to /plan Step 5
- Add grep-for-existing-functions to /implement and /crank

11 new tests, all existing tests pass. Vibe: WARN (addressed).
2026-03-02 18:00:50 -05:00
Boden Fuller 433b4f4d71 feat(context-leverage): wave 0 — tests, quality gate, goals, contract
Wave 0 of Context Orchestration Leverage epic (4 parallel agents):

P2: State/context/dashboard test coverage
- NEW rpi_phased_state_test.go: 15 tests for writePhaseResult,
  validatePriorPhaseResult, savePhasedState, loadPhasedState,
  parsePhasedState, readRunHeartbeat
- Extended rpi_phased_context_test.go: +8 tests for buildPromptForPhase,
  buildPhaseContext, readPhaseSummaries, parsePhaseBudgetSpec
- NEW rpi_phased_dashboard_test.go: 3 tests for embedded HTTP dashboard

H: Goal pruning for thesis alignment
- Pruned directives 7→6 (removed mission control + nudge protocol,
  added flywheel compounding proof)
- Pruned gates 19→16 (removed rpi-serve-smoke, consolidated complexity)

C1: Knowledge quality detection gate
- NEW inject_quality_gate.go: scanLearningQuality, assessLearningFile
- NEW inject_quality_gate_test.go: 5 tests for quality scoring

Contract: B↔D interface specification
- NEW docs/contracts/context-assembly-interface.md: phaseManifest schema,
  token budget API, select→assemble→truncate integration point
2026-03-02 16:23:31 -05:00
Boden Fuller a170614eed feat(ag-u5t): wave 1 — git-worker-guard, embedded parity gate, swarm evidence validation, time_boxed phase result
Wave 1 of strict-quality epic (ag-u5t), 4 issues in parallel:

- ag-u5t.1: git-worker-guard.sh blocks git commit/push/add-all for swarm workers
- ag-u5t.2: embedded_parity section in task-validation-gate auto-validates hook sync
- ag-u5t.3: validate-swarm-evidence.sh enforces fail-closed evidence validation
- ag-u5t.5: time_boxed phase result status in RPI phased runner

Also fixes: test harness cwd leak from bare cd in constraint-compiler tests,
adds test coverage for commit-review-gate, intent-echo, research-loop-detector.

173/173 hook tests pass. All Go tests pass. Embedded sync verified.
2026-03-02 11:22:16 -05:00
Boden Fuller e0ce0ccd40 fix(headless): remove redundant run-rpi-headless.sh — ao rpi already exists
The headless RPI phase runner duplicated what `ao rpi` already does,
without its ratchet tracking, telemetry, or phased-state integration.
The real value was the test helper improvements and standards doc.
2026-03-02 10:17:40 -05:00
Boden Fuller 65d8855b12 feat(headless): add headless invocation standards and RPI phase runner
- Add bin/run-rpi-headless.sh: chains RPI phases as separate headless
  Claude invocations, each invoking the actual skills (/research, /plan,
  /crank, /vibe, /post-mortem) so the full skill chain executes
- Add docs/contracts/headless-invocation-standards.md: documents when to
  use --dangerously-skip-permissions (skill chains) vs --allowedTools
  (controlled prompts), timeout strategy, and session chaining
- Update test-helpers.sh: add --no-session-persistence, --max-budget-usd,
  configurable ALLOWED_TOOLS env var (default: skip-permissions for tests)
- Update release-smoke-test.sh: add --no-session-persistence,
  --max-budget-usd, scoped --allowedTools for fast test (no skill exec)

Key insight: skills chain skills — --allowedTools constrains the entire
session including tools used inside skill execution, so skill-invoking
workflows must use --dangerously-skip-permissions with timeout/budget
as the safety rails instead.
2026-03-02 10:08:14 -05:00
Boden Fuller 04a9e456bc docs(crank): add swarm worker result evidence schema 2026-03-02 08:06:36 -05:00
Boden Fuller d38ed52e31 feat(rpi): implement phase-1 c2 center surfaces 2026-02-26 21:35:15 -05:00
Boden Fuller 488a36b589 fix(cli): address cycle 3 post-mortem findings — all 8 items
Swarm of 6 workers (8 items combined into 6 due to file conflicts):

- Fix merge-worktrees.sh: propagate file deletions, preserve permissions (-fp)
- Consolidate test helpers: add t.Cleanup to chdirTo, delete cov3W2CaptureStdout
  and cov3W2ChdirTemp, update 9 caller files
- Add go mod tidy + symlink checks to post-merge-check.sh
- Add Scope Overflow + Maintenance Protocol to agent-footguns.md
- Create resolveProjectDir migration tracker (5/87 callsites documented)
- Create dispatch-checklist.md for standard agent prompt references
2026-02-26 20:06:03 -05:00