Topology Search 4592 Plan

Status: protocol frozen before evaluation; eligibility review pending. This is

Offline topology search preregistration (#4592)

Status: protocol frozen before evaluation; eligibility review pending. This is an offline research plan, with no runtime, flow, model, or routing changes. Repository baseline: `f9a080776489268a5afe66fde740c98baa226edb` (`HEAD` equals the locally available `origin/main`). No remote refresh is allowed.

Timing and commitment

Only source/fixture inventory and protocol design precede this document. No evaluation, optimization, response replay, or outcome aggregation has run for this study. Freeze the exact document bytes with SHA-256 in the worker report before further eligibility review or execution. Do not revise this document after freezing; record deviations separately. A digest records content, not an independently authenticated timestamp.

The worker is explicitly forbidden to run `git commit` or switch branches. Consequently this preregistration is a worktree file commitment, not a git commit. No claim of a committed or independently timestamped registration is made. Do not execute a study if eligibility fails, regardless of this distinction.

Flows and eligibility gate

Nominate these existing hand-authored flows, in this order:

1. `flow-security-review-cycle`: source `agentic/code/frameworks/sdlc-complete/flows/flow-security-review-cycle.playbook.yaml`. 2. `corpus-snapshot`: source `agentic/code/frameworks/research-complete/flows/corpus-snapshot.playbook.yaml`.

Use both if eligible, otherwise the single eligible flow. A flow qualifies only if existing local assets supply all of the following, without authoring new task data or outcome assumptions:

  • Identified input cases and executable, deterministic expected-output checks

scoring the flow's task outcome, rather than schema validity alone.

  • A binding from those cases to that exact shipped flow and its fixed steps.
  • Offline deterministic step execution or replay valid when predecessor edges

change, including failure, verifier, and input-dependency behavior.

  • Existing resource observations or measurable local execution costs for all

attempted runs, including failed and partial runs.

  • At least 20 distinct cases per flow, sufficient for the frozen split below.

Inspect other existing flow bindings in `tools/eval` if neither nominee qualifies. A different flow requires a separate preregistration before running; do not quietly substitute it. If no existing flow has a scorable offline set, stop after this plan and a readiness disposition listing the exact missing assets. Do not invent cases, response tapes, labels, or graph-specific outcomes.

Evaluation set and held-out split

No eligible set is selected at registration. The known `tools/eval/datasets/composition-pilot.json` is a candidate instrument only: its 48 tasks (16 per family, 12 development / 36 held-out) and H2 graphs are synthetic fixtures, not yet established as an evaluation set for either nominee. The skill-retention fixture is likewise not assumed to evaluate a shipped flow. Neither may be relabelled as flow effectiveness evidence.

For a newly located, existing eligible set, freeze its exact case IDs, source paths and SHA-256 digests in a binding appendix before execution. Sort cases by SHA-256 of UTF-8 `4592:<flow-name>:<case-id>` (lexical ID tie-break). Use the first `floor(0.4 * N)` cases for development and all remaining cases as held-out. Never move cases, drop failures, tune against held-out results, or split variants of one underlying case across cohorts. Group related variants first; the minimum of 20 applies to independent case groups. Search code sees development inputs and scores only; the final selected topology is frozen before scoring held-out.

Existing published fixture labels cannot establish investigator blinding. If used, disclose that limitation and describe held-out separation as algorithmic, not evidence of unseen real-world performance.

Search space, objective and fixed budget

Preserve exactly the hand-authored flow's node identities, implementations, prompts, permissions, state contracts, verifier count, and outputs. Change only edges: additions/removals and verifier ordering through rewiring. Preserve entry, terminal output, required data dependencies, reachability of every node, and safety gates. Do not remove a verifier or weaken its checks. Restrict this pilot to acyclic orderings; if the baseline requires cycles, mark it ineligible for this protocol rather than flattening it.

Use the existing `tools/eval` runner, result contracts, executable checks and fixture adapter mechanisms. Extend those owners only if eligibility passes; do not create a parallel evaluator, runtime, CLI command, or schema family.

Per flow, use seed 4592 and a maximum of 32 distinct valid search candidates (baseline excluded), with at most 1,024 generated proposals, invalid proposals included. Begin with baseline neighbours; expand the highest development-ranked unexpanded candidate, breaking ties by canonical sorted edge list. Generate single-edge additions/removals in lexical endpoint order. Deduplicate all graphs. Verifier relocation is a sequence of these rewires within the same proposal cap. If fewer valid structures exist, report the exhausted space without padding.

Rank by development task success rate, then lower total charged node activations, then lower measured local execution time, then canonical edge list. Freeze one winner per flow. All unsuccessful and partial executions score zero and remain in denominators. Invalid proposals count as optimization effort, not task runs.

Each arm/case has at most `2 * node_count` activations, 12,000 fixture-observed token units, and 2,000 ms of adapter-reported execution time. Exceeding any cap is partial, scores zero, and retains costs. A separate 60-second local watchdog bounds each invocation. Do not reinterpret fixture token/time observations as measured model inference. Stop at the earlier of the proposal cap, candidate cap, or 10 minutes of local wall time per flow; budget exhaustion is reported.

All model calls, model CLI launches, HTTP requests, embeddings and paid spend have a hard budget of zero. No local model server calls either. Model inference cost is zero actual calls/USD; fixture token estimates remain labelled proxies. Report graph generation/validation time, proposal counts, development scoring time, held-out scoring time, activations and replay resource totals separately. Charge unsuccessful search attempts and control construction too. Authoring/inspection effort is unmeasured and must not be claimed as zero.

Hand-authored and random controls

The unchanged shipped flow is the hand-authored baseline on identical cases, step implementations, checks and ceilings. Do not use an easier synthetic graph as that baseline.

For the winner, draw up to 32 unique uniform random edge subsets over the same fixed nodes, conditioned on its exact edge count and the same validity rules. Use the existing seeded random/shuffle helpers with seed 4593, a fixed lexical list of allowed directed pairs, and a separate cap of 1,024 attempts. Rejection sampling retains every rejection count; stop early if exhausted. Exclude the baseline and searched winner, disclose a small support, and do not select the best random control using development or held-out scores. Freeze the random structures before any held-out scoring. Equal size means equal nodes and edge count to the winner, not just equal activation ceilings. Report baseline edge count separately when different.

Analysis and decision

Score each frozen baseline, winner and random graph once on each held-out case; the upper bound per flow is `34 held_out_N` final executions. Development scoring is at most `33 development_N` executions. Random structures are not development-selected. Record raw case/arm outcomes, graphs, failures, partials, costs and content bindings using existing eval evidence projections.

Report held-out paired success differences versus baseline and versus the mean random success per case. Use paired case-group bootstrap intervals (2,000 resamples, seed 4594, 95% percentile intervals), retaining all cases and random structures. These intervals describe this fixed offline set, not model efficacy. Report successes per total fixture tokens and activations, and total search plus evaluation cost; do not amortize optimization away.

A go for a separately reviewed follow-up study only requires an absolute held-out success gain of at least 5 percentage points over both controls, both paired interval lower bounds above zero, no new safety-check failures, and winner per-case activations/token proxies no higher than baseline. Otherwise recommend no-go. Any eligibility failure is no-go for execution due to missing evidence, not a finding that topology search is ineffective. No offline outcome authorizes shipping automatic optimization or changing any flow.

Disposition and checks

Publish eligibility evidence and any permitted results under the eval docs. If stopped, report costs/results as NOT RUN, never zero-valued performance. Harness tests are conditional on a harness change and use existing deterministic fixtures, temporary directories, and no network. With a plan-only disposition, do not create an unused harness or synthetic study merely to satisfy a checkbox. Run repository verification required by the worker brief; distinguish engineering checks from study executions. Do not edit CHANGELOG or package budget files.