# GAP paper-to-code map The original implementation batches adjacent conceptual stages into two model calls. Prompt-A returns the ordered proof-plan nodes and mutable slots; Prompt-B re-instantiates that plan and returns the regenerated proof and question. The package writes each conceptual output separately so every paper stage is visible in an end-to-end run without changing either prompt. The ordered nodes form a path-structured DAG, the exact graph induced by a minimal sequential proof plan. `ProofPlanDAG` validates node identity, dependencies, acyclicity, terminal connectivity, and order. The five judges receive stable node IDs with the method-label sequence, and a verdict is valid only when its step-by-step check covers every node. | Paper operation | Implementation | Saved artifact | |---|---|---| | Surface rename | `SurfacePipeline.run_family` | `surface__variant.json` | | 1. Reference solution to proof structure | `KernelPipeline.extract_plan` + `ProofPlanDAG` validation | `01_proof_dag.json` | | 2. Content-free method plan | `KernelPipeline.extract_plan` | `02_method_plan.json` | | 3. Mutable-slot identification | `KernelPipeline.extract_plan` | `03_mutable_slots.json` | | 4. Proof regeneration | `KernelPipeline.generate_candidate` | `04_regenerated_proof.json` | | 5. Problem rendering | `KernelPipeline.generate_candidate` | `05_variant_question.json` | | Five-judge verification | `KernelPipeline.verify_candidate` | five call records and one iteration record per round | | Consecutive-pass protocol | `KernelPipeline.verify_candidate` | `K=2`; any rejection resets the streak | | Repair loop | `KernelPipeline._repair` | complete corrected question and solution; at most `T=15` rounds | ## Per-item artifacts ```text items// input.json config.json calls/.json stages/.json iterations/.json final.json ``` Prompt literals are byte-locked by `PROMPT_SHA256SUMS` and `tests/test_prompts.py`. The OpenAI adapter does not pass a temperature argument; `o3` therefore uses its supported default.