Evidence and objective
Parent: #652. #599 requires qualification, consumer cutover and deletion of superseded first-party code. #621/#622 already distinguish source preservation from semantic correctness. Build an experimental specification-refinement tool that improves replacement behavior without making the model its own correctness authority.
Implementation
- Extract a bounded component dependency graph from the supported .om representation. Record each entity's input/output/trap/effect/resource contract, consumers, source/profile versions and evidence provenance.
- Distinguish immutable authoritative contracts and external requirements from revisable explanatory specifications. Candidate refinement may clarify a hypothesis; it cannot silently weaken the required behavior or judge.
- Refine callees before callers. Collapse recursive strongly connected components for bounded joint treatment; refuse unsupported cyclic analysis rather than assuming an acyclic graph.
- Preserve a small bounded set of complementary candidates using explicit correctness/cost criteria. Freeze archive size, proposal count, tie-breaking and failure sampling. Prevent combinatorial search from expanding without budget.
- Generate candidate .om implementations against each specification set, evaluate on development tests, and retain the exact before/after entity and consumer outcomes. Keep final benchmark tests independent of the search.
- Compare static documentation, a single iterative specification, dependency ordering alone and bounded multi-candidate refinement at equal total budgets.
- Include one real replacement case with its current owner. Qualification includes dependent consumers and deletion under #599; a generated natural-language description alone is not replacement completion.
Acceptance and controls
- A local fix that breaks a caller is detected; whole affected dependency closure is evaluated.
- Recursive component, shared dependency, misleading self-generated test and intentionally weakened specification cases are covered.
- Candidate descriptions cannot edit immutable contract IDs, evaluation policy or expected final-test outcomes.
- Renamed/moved entities and changed dependencies invalidate only justified cached evidence, without reusing stale proofs.
- Report entity correctness, module/consumer correctness, repair cost, regression count and archive/search overhead.
- An untouched task family tests whether improved specifications transfer to new features or a declared external-language adapter.
- Review evidence separates useful documentation from formal specification and tests from proofs.
- Deliver .om implementation plus a small reproducible tutorial through #624/#619, not a second documentation service.
Dependencies
Consumes #653 and #625. Reuses #621 dependency metadata where available and #623 evidence classes. Native contract synthesis may consume results but is not a hard prerequisite for the first bounded experiment.
Research: SpecForge. Its DevEval+ gains motivate this experiment; they are not expected gains for Omega or proof of universal replacement.
Delivery contract
This is a finite workstream under Omega #599, not a new whole-system plan. Read aien-architecture-mv PLAN_AUTHORITY.md, CURRENT_EXECUTION_PLAN.md, the architecture release #190 ledger, applicable AGENTS.md and directory .crumb files, current issue comments and live worktree claims before editing. Record one owner and exact paths; reuse existing compiler, runtime, trainer, store, judge and publisher owners.
The final first-party implementation is seeded .om throughout, including experiment runners, data generation, build/release automation and project-owned tests. Qualify each replacement, cut consumers over, then delete superseded active-tree code and obsolete dependencies. Consult old code in Git history; preserve immutable historical evidence. No new .osc path, foreign runtime/compiler fallback, Python/Rust/C product wrapper or parallel authority service. Missing .om features are scoped dependencies for their existing owners. Independent third-party oracles may run outside the delivered build/runtime closure with disclosed identities.
Pin source, seed/compiler, model/tokenizer/template, dataset/split, policy, arithmetic profile, target and executable identities. Preserve raw failures and actual exit codes. Distinguish IMPLEMENTED from QUALIFIED and PASS/FAIL/INCONCLUSIVE/NOT_RUN; host/emulator evidence never establishes physical GPU qualification. Do not close an implementation issue from a plan or artifact hash alone. Use existing local hardware scheduling and publication/review workflow; do not interrupt active chip runs. A research result may legitimately be negative, but a stub or an unexecuted required gate is not completion. Keep private data local and preserve existing owner-controlled sharing rules.