WhoBuilt

Stop Making LLMs Deterministic: A Spec-Driven Software Factory

Sep 21, 2026· 23 min· 743 views·Watch on YouTube

Speaker

Jakub Kuzimski, principal software engineer at Allegro, discusses building a specification-driven software factory at Agent Conf 2026 with Callstack.

Why build a specification-driven factory

Allegro has more than 2,000 microservices and 200 teams, alongside the compliance and procurement needs of a large company. Kuzimski describes two approaches to AI-assisted development: augment existing human workflows, where code remains the source of truth, and build a new platform where specifications are authoritative and code is regenerated.

The first pipeline hit an 80% ceiling

The team built a flow from product specifications through coding agents, reviews, and production checks. Its Geneva coding agent planned work in waves, generated code and tests, and ran review agents; specialized guardians checked areas such as security, performance, and architecture. The factory generated about 80% of the code, while humans fixed the rest, and identical specifications sometimes took three to ten hours and three to 20 million tokens to run.

Represent decisions as a graph

Kuzimski shifted focus from adding more controls to improving the specification, breaking interconnected decisions into a graph. Experiments found that prose made it difficult to extract decisions and dependencies, while structured Markdown with explicit dependency links worked better. Implementing the whole graph performed better than processing individual decisions or parallel subgraphs.

Make decisions testable and traceable

Explicit graph dependencies helped the team trace a change, such as changing account session time to live, to affected specifications and code. Nodes paired decisions with assertions that could compile directly into tests, or with tenets checked by models. Bootstraps, workspace briefs, implementation maps, and graph validation also helped reduce agent work and catch missing or cyclic dependencies.

Fill specification gaps and measure results

Guardian reviews kept surfacing decisions absent from the specification, so Kuzimski added those findings to the graph. The product catalog specification reached 513 decisions, with 22% of product decisions and 90% of technical decisions shareable across domains. Preparing and running it cost about $500 and took 12 hours; product managers estimated manual preparation would take at least six months. Kuzimski says the team is still developing editing and review tools and plans to evaluate other models.

Takeaways

  • When generated code needs repeated human fixes, check whether the specification captures the missing decisions.
  • Record dependencies explicitly so changes can be traced through affected requirements and code.
  • Turn decisions into assertions where possible, so tests can be compiled without an LLM.
  • Give agents a workspace brief and implementation map to reduce repository discovery work.
  • Treat early cost and time comparisons as experiment results, and validate generated code against the specification.

Mentioned in this talk

Search inside this talk

What was claimed 12

Show all 12 facts

Related talks