acceptodds
Under review as a conference paper at ICLR 2027

ReqWeaver: Stage-Aligned Requirement Management for Greenfield Repository Generation

Abstract

Building a repository from scratch relies on a requirements document, but the requirements that need to be considered together change as development proceeds. Full-document input leaves agents to identify these combinations for each task, while reading on demand requires them to recognize missing information. We introduce ReqWeaver, which freezes exact source-to-stage bindings before coding and delivers the assigned passages at stage entry without a retrieval query. Completed-stage packets are retired and selected past outputs compacted; shared requirements can reappear in later packets. Optional contract compilation organizes dispersed requirements and records supplementary design choices. We evaluate ReqWeaver with three stochastic generation runs on 36 NL2Repo-Bench and 30 RepoGenesis tasks. With GPT-5.4-mini and OpenHands, ReqWeaver reaches 46.47% versus 37.20% NL2Repo-Bench Pass ( percentage points; 95% confidence interval (CI), to ) and 78.45% versus 55.03% RepoGenesis Pass ( percentage points; 95% CI, to ). Using the third ReqWeaver run block in the main evaluation and controls with the same frozen plans, evidence binding and Projection jointly reduce total tokens, including planning, by 10.56% relative to disabling both. Code is available at https://anonymous.4open.science/r/ReqWeaver-72D4/.

Primary area:
foundation or frontier models, including LLMs
Keywords:
repository-level code generation, coding agents, requirements management, context management, large language models

Reviews

Among:
Shape:
1234this paper, Bottom 27%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.00 over 2 reviews, above 27% of the others.
Reviewer_ShziOpenReview ↗
Rating
1
Confidence
2
Informativeness
1
Presentation
1
Soundness
2
Read review
Paper summary

The paper introduces ReqWeaver, a method that helps with generation of repositories. It assigns to AI coding agents the requirements that they should implement at each step. It additionally removes context that is no longer required. The authors test ReqWeaver on two benchmarks with two LLMs and three runs. It appears that ReqWeaver increases the average test-pass rate.

Critical strengths

The problem of generating lengthy repositories while ensuring that the correct requirements are taken into consideration at each step seems important and the authors show that they have managed to improve test-pass rate. Additionally, the paper appears to have multiple experiments testing various components of ReqWeaver which gives more insights about its performance and limitations to the reader.

Critical weaknesses

The contribution appears to be a combination of some existing techniques and the novelty seams incremental. Also, the paper includes some formal definitions that appear to have no contribution on the technical aspect of the paper. These definitions and the excessive use of new terminology, which sometimes is not explained properly, make a very simple workflow unnecessarily hard to follow.

Questions for authors

No questions.

2 comments
AuthorsOpenReview ↗

Reviewer 3 — Shzi | Novelty, formal definitions, and presentation

Your review lists no separate Questions. W1(a)–(c) refer to the three concerns in the Critical Weaknesses paragraph.

W1(a): Novelty

We disagree with the assessment that ReqWeaver's novelty is limited. The review identifies neither a prior method implementing the same mechanism nor the specific technical overlap.

The central contribution is to make bindings between exact requirement passages and development stages part of the execution plan. Before coding, the Scheduler establishes and freezes source-reference bindings. The controller delivers the corresponding text at stage entry, manages completed-stage context, and redelivers requirements needed by later stages. This makes the source constraints accompanying each stage, and their reuse across stages, inspectable.

Section 2 provides concrete comparisons with nearby work. RPG represents capabilities, files, data flows, and functions in a graph; PaperCoder produces architecture plans and file-level analyses; CodeSpec compiles functional chains into executable architecture and behavior specifications. ReqWeaver explicitly records which original requirement passages accompany each development stage and executes those delivery assignments through the controller. Section 3.3 and Appendix C.2.1 illustrate these operations. If the reviewer considers this mechanism already established, please identify the closest prior work and the corresponding mechanism so that we can make a specific comparison.

W1(b): Technical role of the formal definitions

We disagree that these definitions have no technical role. Method definitions specify the objects a system processes and the operations it performs; each definition need not constitute a separate algorithmic contribution.

The stage sequence and goals in §3.1 identify the work to which requirements are assigned. In §3.3, MkM_k and OkO_k distinguish automatically delivered required evidence from optional reading references, while Ek=Resolve⁡U(Mk)E_k=\operatorname{Resolve}_U(M_k) specifies how references become source text. In §3.4, Πk(Hk)\Pi_k(H_k) defines the history actually presented to the model. These objects are used in the subsequent method description and correspond to concrete evidence-delivery and context-processing operations.

We added plain-language explanations in §§3.2–3.4 and connected the notation to stage goals and source text through the existing example to make these definitions easier to follow.

W1(c): Terminology and readability

The comment that some terminology is insufficiently explained does not identify a specific term, definition, or passage, so it cannot yet be checked item by item.

We have distinguished the preprocessing Scheduler from the coding agent's Plan stage, standardized required/optional terminology in the text and Figure 2, and expanded the xlrd assignment rationale and reuse example in §3.3 and Appendix C.2.1. These edits improve clarity. A need for clarification, however, does not itself establish a lack of technical contribution. Please identify any terms or passages that remain ambiguous so that we can examine and address them specifically.

Thank you for your response. After considering your rebuttal, I have decided to maintain my original score.

Reviewer_y4KTOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper presents ReqWeaver, an execution protocol for stage-aligned requirement management in greenfield repository generation. The method pre-establishes source-to-stage bindings, proactively delivers the relevant evidence at stage entry, and manages historical context through Context Projection. Under GPT-5.4-mini/OpenHands, ReqWeaver improves Pass by 9.28 and 23.42 percentage points on NL2RepoBench and RepoGenesis, respectively. The authors further validate the method through mechanism controls and resource analysis.

Critical strengths
  1. The paper studies the alignment between requirement information and development stages in repository generation. By pre-binding requirements, stage-wise proactive delivery, and context management, it proposes an execution framework with clear motivation and practical value.

  2. The experiments cover two repository generation benchmarks and report multiple runs and confidence intervals. The end-to-end performance gains under GPT-5.4-mini have statistical support, and the Aligned–Shuffled control also provides direct evidence for the effectiveness of stage alignment.

Critical weaknesses
  1. The independent benefits of the core components remain insufficiently established. In Table 3, the confidence intervals for the performance differences between staged delivery and upfront delivery, and between Evidence Scheduling and Stage-wise RAG, all include zero; in Table 4, the incremental benefit of Context Projection is likewise uncertain. Although the Aligned–Shuffled control yields a positive result, this experiment covers only one model–benchmark combination.

  2. Limitations also remain regarding computational budget and cross-model robustness. Section 4.1 does not impose a unified aggregate compute budget, and the retained trajectories in Appendix D.5 show that ReqWeaver uses more model calls, making it difficult to fully distinguish the effect of the framework mechanism from that of additional computation. In addition, under DeepSeek V4 Pro, the confidence intervals for the end-to-end gains all include zero.

Questions for authors
  1. Can ReqWeaver and OpenHands be compared under the same token or model-call budget to further confirm the independent benefit of the method?

  2. Can the effect of stage alignment be validated on more models and tasks, and can the contributions of Evidence Scheduling, delivery timing, and Context Projection be further disentangled?

  3. Can resource statistics across multiple runs be provided, and can the independent role of optional Contract Compilation be further evaluated?

2 comments
AuthorsOpenReview ↗

Reviewer 2 — y4KT | Part 1/2: Component controls and Projection resources

Thank you for your careful review and constructive suggestions on component effects, computation, and robustness. We provide ten-run mechanism controls and three-run resource statistics below.

W and Q follow the paragraph and question order in your review; overlapping concerns are answered together.

Paper section and table numbers refer to the original submission. Supplementary experimental results are reported in this response.

Pass is reported in %, differences in percentage points, and ± denotes sample SD across runs. Each comparison states its run count.

W1, Q2: Component contributions and the scope of stage alignment

Both supplementary controls retain the original model, task set, inputs, and evaluation protocol. The access comparison contrasts Evidence Scheduling with Stage-wise RAG; the timing comparison holds the stage plan and evidence content fixed:

Supplementary retrieval and delivery-timing results:

GPT-5.4-mini/OpenHands on 36 NL2RepoBench tasks; ten-run means ± sample SD.

ComparisonRunsPass, mean ± sample SD (%)Difference (pp)95% CI (pp)
Evidence Scheduling − Stage-wise RAG1044.34 ± 2.10 vs. 37.91 ± 1.86+6.43[+4.95, +7.90]
Staged − upfront delivery1044.55 ± 1.90 vs. 41.22 ± 1.43+3.34[+2.05, +4.62]

Scheduling leads in all ten runs; staged delivery leads in nine. Both difference intervals are positive, supporting scheduling and staged delivery on the evaluated task set. These paired t intervals describe run variation over the fixed 36 tasks (ten run-level macro differences, nine degrees of freedom). The original crossed bootstrap resamples both repositories and run blocks.

Projection resource comparison with Evidence Scheduling fixed:

Original retained-run diagnostic, Appendix D.3; these resource values are not three-run means.

MetricFull HistoryProjectionChange
Input per call (K tokens)95.073.8−22.3%
Cumulative input per repository (M tokens)10.089.48−6.0%
Calls per repository106.2128.5+21.0%
Wall time per repository (min)21.4225.72+20.1%

Projection reduces input despite more calls, while wall time increases. Its separately measured three-run NL2RepoBench Pass increment is +2.27 points, 95% CI [−4.02, +8.44].

Stage alignment on additional models and tasks remains to be evaluated.


AuthorsOpenReview ↗

Reviewer 2 — y4KT | Part 2/2: Computation, cross-model results, and Compilation

Thank you also for your suggestions on computation, model robustness, and multi-run resource reporting.

Continued response to W2 and Q1/Q3. Token statistics use three runs; the Projection diagnostics in Part 1 retain their original run scope.

W2, Q1: Computation and cross-model robustness

The concern is whether the gains come simply from doing more work. Our controls compare requirement access within the staged workflow and vary delivery time with the trajectory and exact packet content fixed. Both comparisons favor the proposed mechanisms (Part 1, W1, Q2), supporting the importance of how requirements are supplied.

Model calls are not uniform units of computation because request lengths differ. The Projection table in Part 1 shows that more calls can accompany less cumulative input; output and wall time also increase in this diagnostic. We therefore report actual resource use. The three-run same-plan comparison shares frozen stage goals, order, and dependencies and includes identical planning allocations, yet consumes 10.79% fewer total tokens. This measures the joint resource effect of binding and Projection under shared plans.

Under DeepSeek V4 Pro, mean Pass gains over OpenHands are +3.04 points on NL2RepoBench and +8.92 on RepoGenesis. The positive direction agrees with GPT-5.4-mini, although the DeepSeek intervals include zero.

W2, Q3: Multi-run resource statistics and optional Compilation

The resource analysis follows the original same-plan comparison: both arms share the frozen stage plan, while the control retains full history and autonomous requirement access and ReqWeaver enables binding and Projection.

Across three runs, mean ± sample SD of total consumption falls from 130.18 ± 2.46M to 116.13 ± 1.95M tokens, a 10.79% reduction by the ratio of summed counts. Per-run reductions are 10.71%, 11.10%, and 10.56%. Planning allocations are equal within each pair. Coding input decreases by 11.14%, outweighing the 17.80% increase in output including reasoning. The joint resource savings under shared plans are consistent across all three runs.

Compilation is an optional extension for organizing requirements and recording design choices. NL2RepoBench does not enable Compilation, yet ReqWeaver improves mean Pass over OpenHands. The core method therefore operates without it. In the existing 30-task development comparison (Appendix D.8), both arms retain the compiled contract and stage plan while toggling contract evidence bindings. Pass is 77.61% without bindings and 76.14% with them, a difference of −1.47 points (95% CI [−13.07, +9.59]). This exploratory comparison combines recovery attempts and tests delivery of compiled evidence, with no clear Pass benefit.


Comments on the paper

3 comments
AuthorsOpenReview ↗

Reviewer 1 — SbNf | Part 1/2: Scheduler decisions, computation, and packet length

Thank you for your careful review and constructive suggestions on the scheduling mechanism and controlled comparisons. Your feedback helped us clarify the assignment criteria and strengthen the multi-run evidence.

We have clarified the scheduling mechanism and the existing source-grounded example, with these textual changes highlighted in blue. The complete scheduler task-message templates will be included in the appendix of the camera-ready version. This response reports ten-run retrieval and delivery-timing controls and three-run same-plan token accounting; the manuscript retains its original experimental results and reporting scopes.

W and Q follow the paragraph and question order in your review; overlapping concerns are answered together.

Paper section and table numbers refer to the original submission. Supplementary experimental results are reported in this response.

Pass is reported in %, differences in percentage points, and ± denotes sample SD across runs. Each comparison states its run count.

W1, Q1: Scheduler decisions, complete prompts, and an assignment example

The scheduling principle is to supply a requirement before the first implementation decision that depends on it. The prompt in §3.3 asks the Scheduler to organize evidence by development dependencies rather than document order: shared-interface requirements accompany the initial runnable path, module details go to the responsible implementation stage, and integration reuses requirements for cross-module checks. Required evidence specifies the behavior to implement; optional references provide supporting examples. The Scheduler applies these rules to the complete requirements and source-reference index.

The saved xlrd example in Appendix C.2.1 connects the assignments to stage goals and source text. Broad Pass must establish a runnable workbook-opening path, so it receives the import, opening, and worksheet-lookup interfaces in S010–S013. The Book stage implements collection access, iteration, and metadata, making S031–S035 required. For indexing, S031 defines book[0] and access by name, specifying the interface to implement. S086 demonstrates obtaining a worksheet and printing its name, providing a usage example beyond that contract; it remains optional. The saved Book plan lists S051–S054 and S085–S088 as optional reading.

The same source can serve a different task later. S010 guides package-interface construction in Broad Pass and public-import checks in Integration. S051–S054 are optional Book examples but required combined-use scenarios in Integration.

We will include the complete schedule-authoring and repair prompts in the appendix of the camera-ready version, covering stage guidance, schema, assignment rules, examples, and validation feedback, with named placeholders for task-specific inputs. The current Appendix C.2 provides excerpts. The LLM proposes bindings; the controller validates and freezes the plan, then delivers the assigned source text at stage entry.

W2, Q2: Computation and per-stage packet length

The controls in Appendix B.3 examine requirement access, delivery timing, and stage assignment within the staged workflow:

Control designs and Pass differences:

GPT-5.4-mini/OpenHands, 36 NL2RepoBench tasks. Ten-run results are supplementary; the three-run alignment result is from the original submission.

ComparisonControl designRunsPass difference, pp (95% CI)
Scheduling − Stage-wise RAGStaged workflow and full history; RAG uses the corresponding Scheduling packet's character budget10+6.43 [+4.95, +7.90]
Staged − upfront deliverySame trajectory and exact packet content10+3.34 [+2.05, +4.62]
Aligned − ShuffledSame packet collection, workspace, trajectory, prompt wrapper, and history policy3+2.74 [+0.23, +5.24]

RAG selects whole sections with a smallest-section fallback, so realized lengths are not exactly matched. Shuffling preserves the packet collection but changes per-stage lengths. The ten-run CIs use paired run-level t intervals on the fixed task set; the original alignment CI uses the crossed bootstrap.

The same-plan resource comparison also shares frozen stage goals, order, and dependencies and allocates identical planning costs. All three runs show token savings, with a 10.79% aggregate reduction (Part 2). Together, these results provide evidence about access, timing, assignment, and resource use. Equal-compute end-to-end gains and alignment under exactly matched per-stage lengths remain separate questions.


AuthorsOpenReview ↗

Reviewer 1 — SbNf | Part 2/2: Token consumption and component evidence

Thank you also for suggesting multi-run resource measurements and clearer component analysis.

Continued response to W2 and Q3. Token statistics use three runs; the retrieval and timing controls use ten. ± denotes sample SD across runs.

W2, Q3: Token reduction and component effects

(a) Token reduction across three runs

The token reduction holds across all three runs: 10.71%, 11.10%, and 10.56%. Mean total consumption falls from 130.18 ± 2.46M to 116.13 ± 1.95M tokens, a 10.79% reduction by the ratio of summed counts.

This response supplements the original same-plan accounting with three runs, each over 36 NL2RepoBench repositories. Both arms share the frozen stage plan and receive equal planning allocations. The control retains full history and autonomous requirement access; ReqWeaver enables evidence binding and Projection. This comparison measures their joint resource effect.

Actual token consumption under shared stage plans:

Each run covers 36 NL2RepoBench repositories. Counts include the same planning allocation within each pair; output includes reasoning.

RunConfigurationPlanning tokensCoding input tokensCoding output tokens, including reasoning
42Control1,398,672125,384,216982,463
42ReqWeaver1,398,672111,527,3841,151,827
123Control1,451,836130,216,4871,018,752
123ReqWeaver1,451,836115,304,6291,204,316
456Control1,425,309127,661,725995,007
456ReqWeaver1,425,309113,743,9551,173,501

Coding input decreases by 11.14%, outweighing the 17.80% output increase. Cached input is included in input, and reasoning in output, each counted once. The original single-run result is run 456, including tokens consumed by the incomplete boltons control.

(b) Mechanism evidence and separate binding/Projection effects

The ten-run Scheduling–Stage-wise RAG comparison yields a mean Pass gain of 6.43 percentage points (95% CI [+4.95, +7.90]). With the stage plan and evidence content fixed, staged delivery improves on upfront delivery by 3.34 points ([+2.05, +4.62]). These supplementary results support scheduling and staged delivery on the evaluated task set. Their 95% CIs are paired t intervals over ten run-level macro differences on the fixed 36 tasks (nine degrees of freedom), describing variation across runs. The original crossed bootstrap resamples both repositories and run blocks, covering both sources of variation.

Projection's context-management effect is measured with Evidence Scheduling fixed. In the original retained-run diagnostic (Appendix D.3), input per call falls from 95.0K to 73.8K (−22.3%), and cumulative input per repository from 10.08M to 9.48M (−6.0%). Its three-run NL2RepoBench Pass increment is +2.27 points, 95% CI [−4.02, +8.44]. The input reduction is directly observed; the standalone performance increment remains uncertain. These Projection-only diagnostics complement the joint binding-plus-Projection token accounting above.


Thank you for the detailed response. It addressed the questions I raised in my initial review. I have decided to maintain my original rating. Best of luck!

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.