
A lot of time goes into implementing requirements in the form of code, tests, review, and release, but there is no guarantee that all requirements have been implemented. There could be different interpretations of requirements, some tests might be missing or done in the last moment, and traceability between requirement, implementation, and tests is managed manually. Consequently, it is possible that requirements will be missed till the QA phase or even till production, which will lead to rework and low confidence level of Pull Requests. Spec2Code solves this problem by providing structured and verifiable process of requirement-driven development. Orchestrated by IBM Bob 2.0, the prototype implements the full pipeline: extracts and structures REQ-IDs, analyzes the existing codebase, generates the changes needed for implementation, generates tests, runs pytest suite, and verifies every requirement against its associated tests. In case a particular requirement is not satisfied, the Auto-Fix Agent finds out what is wrong, makes changes in code as needed and reruns tests and verification. After all requirements were verified successfully, the pipeline produces a traceability report and PR summary. The main set of target users for Spec2Code includes software developers, quality assurance engineers, technical leads, and reviewers who deal with requirement-intensive applications. The user will provide the project requirements, target codebase, and launch the tool’s pipeline. There will be no manual check by the user on whether the implementation satisfies the specification; the user gets machine-readable verification results, test results, requirement to code to test traceability table, and ready-to-submit PR summary report. Spec2Code stands out from other approaches due to the fact that it does not consider "pytest passed" as an indicator of correctness. The main step of the verification phase is mapping each requirement to the tests it needs and labeling it as PASS only if all the required tests exist and pass. This is exemplified by the prototype using ShopFlow – an e-commerce application that includes 20 requirements. On the first run, 17 tests pass and 5 fail. The requirement verification process recognizes REQ-008 and REQ-017 as unverified. Auto-Fix Agent subsequently fixes the NotificationService, runs the tests again and reaches 22/22 passing tests and 20/20 verified requirements. The final output comprises the traceability matrix and PR summary. Moreover, Spec2Code is built to become the basis for AI-assisted development processes of the future. The hackathon prototype purposefully employs deterministic templates for dependable and repeatable demonstrations. Nevertheless, the modular structure of the prototype can be extended to include LLM-driven code generation, automatic document parsing, and GitHub PR submission. In general terms, Spec2Code transforms development from “code generated and tests passed” to “all requirements explicitly traced, tested, verified and ready for review.”
27 Sep 2026