Core Algorithms

Reference pseudocode for the four algorithms that drive FDRP: convergence measurement, gate transitions, expert expansion, and cross-model verification.

Algorithm 1

CVT Computation

Computes the Convergence Velocity Tensor from a single wave's results. The CVT combines three independent signals into a scalar that measures how close the planning run is to convergence. Each factor is bounded [0, 1], so the composite CVT is also bounded [0, 1].

1FUNCTION compute_cvt(wave_results): 2 // Count domains not seen in any previous wave 3 new_domains count domains NOT IN previous waves 4 total_domains count ALL unique domains 5 new_domain_ratio new_domains / total_domains 6 7 // Aggregate expert confidence scores 8 confidences [r.confidence FOR r IN wave_results] 9 avg_confidence mean(confidences) 10 11 // Measure unresolved contradictions 12 contradictions count findings WHERE 2+ experts disagree 13 total_findings count ALL findings 14 contradiction_rate contradictions / total_findings 15 16 // Composite: all three factors must be high for convergence 17 RETURN (1 - new_domain_ratio) × avg_confidence × (1 - contradiction_rate)

The multiplicative structure is deliberate: if any one factor is poor (many new domains, low confidence, or high contradictions), the CVT drops regardless of the other two. This prevents a run from appearing converged when only one dimension is stable.

Algorithm 2

Gate Progression

Evaluates whether a run should transition to the next phase. Transitions are monotonic — the system can only advance forward. The MATURE to CONVERGED transition requires both a high CVT and passing cross-model verification, providing a dual-gate safeguard.

1FUNCTION check_gate_transition(run): 2 cvt compute_cvt(run.latest_wave) 3 current_phase run.phase 4 5 IF current_phase = SEED AND cvt 0.3: 6 TRANSITION TO GROWING 7 8 ELSE IF current_phase = GROWING AND cvt 0.6: 9 TRANSITION TO MATURE 10 11 ELSE IF current_phase = MATURE AND cvt 0.8: 12 IF cross_model_verification_passes(run): 13 TRANSITION TO CONVERGED 14 ELSE: 15 EMIT warning "CVT high but verification failed" 16 17 ELSE IF current_phase = CONVERGED: 18 IF configuration_freeze_approved(run): 19 TRANSITION TO FROZEN

Note the asymmetry at line 11: the MATURE → CONVERGED gate is the only transition with a dual requirement (CVT threshold and cross-model verification). This reflects the principle that higher-stakes decisions require stronger evidence. The warning at line 15 prevents silent failure when the CVT looks good but independent models disagree.

Algorithm 3

Wave Dispatch (Spiral-Out)

Dispatches the next wave of expert analysis. The spiral-out pattern ensures coverage expands into blind spots — areas that existing experts identified as outside their competence. Each wave's experts nominate domains for the next wave, creating a self-expanding frontier.

1FUNCTION dispatch_next_wave(run): 2 // Identify gaps in current coverage 3 blind_spots analyze_blind_spots(run.findings) 4 nominated_domains expert_nominate_domains(run.experts, blind_spots) 5 6 // Generate and dispatch specialist experts 7 FOR EACH domain IN nominated_domains: 8 expert generate_expert(domain, run.context) 9 prompt craft_expert_prompt(expert, run.history) 10 DISPATCH expert WITH prompt 11 12 // Collect and integrate results 13 WAIT FOR all experts to complete 14 15 new_findings collect_results() 16 contradictions detect_contradictions(new_findings, run.findings) 17 run.findings.extend(new_findings) 18 run.cvt compute_cvt(run) 19 20 RETURN run

The spiral-out pattern is what gives FDRP its coverage guarantee. Unlike fixed expert panels, the set of domains under analysis grows organically based on what each wave discovers. In the antimatter building case study, this pattern expanded coverage from 12 initial domains to 47 across five waves — domains like cryo-vibration coupling and GaN power amplifier thermal management that no initial brief would have anticipated.

Algorithm 4

Cross-Model Verification

Verifies HIGH and CRITICAL findings using N≥3 independent LLMs. Each model is prompted as a domain-specific expert (not a generic verifier), ensuring the evaluation matches the finding's technical domain. A supermajority vote determines the finding's status.

1FUNCTION cross_model_verify(findings): 2 models [Claude_Opus, GPT_5, Gemini_3] 3 verified [] 4 5 FOR EACH finding IN findings WHERE finding.severity HIGH: 6 votes [] 7 8 FOR EACH model IN models: 9 // Frame as domain expert, not generic verifier 10 prompt frame_as_expert(finding.domain, finding) 11 vote model.evaluate(prompt) // AGREE | DISAGREE | UNCERTAIN 12 votes.append(vote) 13 14 // Supermajority decision 15 IF count(AGREE, votes) 2: 16 finding.status VERIFIED 17 ELSE IF count(DISAGREE, votes) 2: 18 finding.status CHALLENGED 19 EMIT retraction_candidate(finding) 20 ELSE: 21 finding.status UNCERTAIN 22 QUEUE FOR human review 23 24 verified.append(finding) 25 26 RETURN verified

The expert-framing at line 10 is critical. A finding about cryogenic vibration isolation must be evaluated by a model prompted as a cryogenics specialist, not a generic "please verify this" prompt. This principle (BIND-046 in the FDRP rule system) ensures the verifying model brings domain-appropriate reasoning rather than surface-level pattern matching.

The three-way outcome (VERIFIED / CHALLENGED / UNCERTAIN) prevents false certainty. When models disagree without a clear majority, the finding is queued for human review rather than being silently accepted or rejected. In practice, approximately 8% of findings enter the UNCERTAIN state, and human review has overturned model consensus in 3 of 58 production runs.