Contents
    Application Development

    Spec-Driven Development: What It Is, When It Pays Off, and How to Use It with Jmix

    Spec-Driven Development (SDD) is a way of working with an AI coding agent in which a written specification comes before the code. A human and the agent agree on what will be built and how it will be checked, and only then does the agent implement the functionality. How seriously teams treat spec files varies a lot. For some, they are a one-off artifact that is thrown away once the task is done. For others, it is the main artifact, and the code is regenerated from it.

    SDD is one of several ways to work with a coding agent, and most of the confusion around the name comes from mixing it up with its neighbors. This entry starts with a short list of terms and a map of those approaches, then covers how SDD works, when it pays off, what to use when it does not, and how it combines with the Jmix framework and Jmix Studio.

    Terms used in this entry

    • Coding agent. An AI model that works in your project on its own: reads files, edits code, runs commands and tests, and reports back. Examples include Claude Code, Codex, Cursor, Junie.
    • Spec (specification). A short written description of one change: the goal, acceptance criteria and what is out of scope. It is written before the code and reviewed by a human.
    • Acceptance criteria. Checkable statements in a spec that say when the change is done, for example "opening someone else's booking by its URL is denied".
    • Plan mode. A mode in which the agent explores the code and proposes a plan but edits nothing until a human approves it.
    • Project rules. Instructions the agent reads in every session: architecture, conventions, what not to do. They usually live in AGENTS.md or CLAUDE.md. Böckeler calls this persistent context a memory bank.
    • Skill. A packaged piece of knowledge for the agent, such as how to write a role or a migration in a given framework, which the agent loads when the task needs it.
    • MCP (Model Context Protocol). An open protocol through which an agent calls external tools: the IDE, documentation, a browser, and a code generator.
    • Harness. Everything around the model that steers and checks it: rules, skills, tools and automatic checks.
    • Gate. A check the change must pass before it counts as done: IDE inspections, a build with tests, a person looking at the result.
    • Deterministic generator. A tool that produces the same output for the same input, such as a scaffolding wizard or a refactoring recipe. An agent is the opposite: its output can differ from run to run.
    • Jmix Studio. The IntelliJ IDEA plugin for Jmix with visual designers and wizards that generate entities, screens, roles and database changelogs.
    • Changelog. A Liquibase file that describes a database schema change. Jmix applies changelogs at startup.

    Ways to work with a coding agent

    Each approach below answers the same four questions differently: what the source of truth is, where a human checks the result, how much preparation it costs, and where it breaks down. Tools are named only as examples, as of November 2026. Product names and statuses in this area change within months.


    Approach Source of truth Where the human checks Preparation cost Where it breaks down
    Prompt and iterate ("vibe coding") What runs on screen Looks at whether it works None The code grows and nobody knows why it is the way it is
    Plan first A plan inside the agent session Approves the plan before edits Minutes The plan lives for one session; the team never sees it
    Tests first Tests Reviews the tests Medium Behavior that is hard to express as a test; the agent bends code or tests to get green
    Spec-driven development The spec Reviews the spec before code High Small tasks get inflated; the spec drifts away from the code
    Investing in the agent's environment Project rules and framework knowledge Gates: inspections, tests, a person in the browser High once, low afterwards Rules go stale; without gates the agent skips them
    Agent plus deterministic generators The generator's template Picks the tool for the task Low, if a generator exists No generator for the task
    Agent takes a ticket to a pull request The ticket Reviews the pull request Low per task, high for CI and tests Vague tickets, huge pull requests
    Orchestration of several agents The orchestrator's plan Reviews the end result High, many tokens Errors compound; expensive

    Prompt and iterate. Andrej Karpathy named it in February 2025: "fully give in to the vibes... forget that the code even exists". He also gave it its limit in the same post: "not too bad for throwaway weekend projects". For a prototype or a one-off script, that limit is the whole point. For code someone must maintain, it is the problem.

    Plan first. The agent reads the code, proposes a plan, and edits nothing until a human approves it. Most agents now have this as a built-in mode: plan mode in Claude Code and Cursor, /plan in Codex CLI, a plan mode in Gemini CLI and Kiro, a Plan agent in GitHub Copilot for VS Code. It is the cheapest way to catch the wrong direction before code exists. The plan disappears with the session, though, so it does not help the next person who picks up the task.

    Tests first. The human creates or approves failing tests, and the agent makes them pass. Kent Beck describes this as the core of what he calls augmented coding, as opposed to vibe coding: "In augmented coding you care about the code, its complexity, the tests, & their coverage." The weak spot is documented. Anthropic's system card for Claude 3.7 Sonnet describes the model special-casing code to pass tests and modifying the tests themselves, and Beck reports an agent "disabling or deleting tests". Tests are a strong source of truth only if someone watches what happens to them.

    Spec-driven development. A spec describes the change and its acceptance criteria, a human reviews it, and the agent implements it. The next two sections cover it in detail.

    Investing in the agent's environment. Instead of describing each change in depth, the team invests in what the agent sees in every session: project rules in AGENTS.md or CLAUDE.md, framework knowledge in skills, and automatic checks. The vocabulary is still settling. "Context engineering" became popular in mid-2025, and "harness engineering" appeared in early 2026; Birgitta Böckeler of Thoughtworks sums it up as "Agent = Model + Harness". In her SDD review, she uses "memory bank", a term from the Cline community, for the same persistent context. AGENTS.md is an open format now stewarded by the Agentic AI Foundation under the Linux Foundation, and skills (SKILL.md) were published by Anthropic as an open standard in December 2025.

    Agent plus deterministic generators. For template work, the agent does not write the code itself. A generator does: a scaffolding wizard, a code generator, a refactoring recipe. The agent decides what is needed, and the generator produces the same canonical output every time. The clearest public example is OpenRewrite: through Moderne's MCP server, an agent can find and run refactoring recipes instead of editing hundreds of files by hand. In Jmix the generator is Jmix Studio, and this case gets its own section below.

    Agent takes a ticket to a pull request. The agent works asynchronously in an isolated cloud environment: it picks up an issue and returns a branch or a pull request for review. Examples are GitHub Copilot coding agent, OpenAI Codex cloud tasks, Google Jules, Devin and Cursor Cloud Agents. The human's work moves to two places: writing a ticket precise enough to act on, and reviewing what comes back. The surrounding CI and test suite carry most of the quality.

    Orchestration of several agents. One agent plans and hands parts of the work to sub-agents with their own context, or a second agent reviews the first one's output. Claude Code subagents and automated pull-request reviewers are common examples. It is the most expensive option: in Anthropic's measurements, a single agent uses about 4 times more tokens than a chat, and a multi-agent system about 15 times more.

    The approaches combine, and they do not form a maturity ladder. The same team can fix a typo by prompting, build a feature from a spec and leave screen scaffolding to a generator, all in one day. Two things matter in every row more than the choice of row: the context the agent works in, and a check that does not depend on the agent's own report.

    How SDD works

    The cycle is the same across tools; only the names differ. Describe the change, let the agent turn it into a technical plan, break the plan into tasks, implement task by task, check against the spec. A human reviews each step before the next one starts.

    Böckeler, who compared the main SDD tools in October 2025, describes three levels of how seriously the spec is taken:

    • Spec-first: "A well thought-out spec is written first, and then used in the AI-assisted development workflow for the task at hand."
    • Spec-anchored: "The spec is kept even after the task is complete, to continue using it for evolution and maintenance of the respective feature."
    • Spec-as-source: "The spec is the main source file over time, and only the spec is edited by the human, the human never touches the code."

    She notes that all SDD approaches she found are spec-first, and fewer aim higher.

    The main SDD tools as of November 2026:

    • spec-kit from GitHub. A CLI that prepares a project for one of many coding agents and adds commands for each step: a constitution once per project, then specify, plan, tasks, implement and converge for each feature, with optional clarify, checklist and analyze steps in between. Separate processes for bug fixes and for assessing an idea mean a small fix no longer must go through the full feature cycle.
    • Kiro from AWS. An IDE built around specs, with three files per change: requirements.md (or bugfix.md for a bug), design.md and tasks.md. Requirements are written in EARS notation ("WHEN ]condition\] THE SYSTEM SHALL ]behavior\]"). A Quick Spec mode generates all three files without approval steps.
    • OpenSpec. Built for existing codebases. Each change lives in its own folder with a proposal, spec deltas, a design and tasks; archiving the change merges its deltas into the project's permanent specs. In Böckeler's terms this is spec-anchored by design, although OpenSpec does not use her term.

    Tessl, the third tool in Böckeler's review, explored spec-as-source in a closed beta in 2025: generated files carried a GENERATED FROM SPEC - DO NOT EDIT marker. The company has since repositioned itself as a platform for agent skills, and spec-as-source remains an experiment rather than a practice.

    Here is what a spec looks like, using one feature from the room booking app we built on our Jmix training courses:

    ## Booking visibility
    
    Goal: an employee sees and edits only the bookings they organize.
    An office manager sees all the bookings.
    
    Acceptance criteria
    - AC1 The booking list shows an employee only their own bookings.
    - AC2 Opening someone else's booking by its URL is denied, no data is shown.
    - AC3 An office manager sees every booking.
    - AC4 The rule holds in data access, not only in the list on the screen.
    
    Out of scope: approval of bookings.

    The useful parts are AC2 and AC4. They make the agent enforce the rule where the data is loaded instead of filtering the visible list, and they give the reviewer something concrete to check.

    When SDD pays off, and what to use instead

    The cost of SDD is review time. Böckeler's examples show it well. Kiro turned a small bug into "4 'user stories' with a total of 16 acceptance criteria", and spec-kit produced so many repetitive markdown files that she wrote "I'd rather review code than all these markdown files". She also saw the agent ignore parts of the spec and generate duplicates of classes the spec said already existed. A spec gives a sense of control. It does not replace checking the code.

    So, pick the approach per task:


    Task Fitting approach Why
    A feature that touches data model, access rules and UI at once SDD The spec pins down decisions that span layers, and review catches mistakes early
    Security and access rules SDD, with tests on the rules "Almost right" is wrong here, and acceptance criteria name exactly what to check
    Integration with an external system SDD The contract with the other side has to be written down anyway
    Several people or several agent sessions on one feature SDD, spec-anchored if the feature lives long The spec is the shared memory that a chat session is not
    A medium change in code you know well Plan first A plan catches the wrong direction at a fraction of the cost of a full spec
    A service method with clear inputs and outputs Tests first The tests are the spec, and they keep checking after the change ships
    A small bug with a known cause Prompt and iterate Writing the spec would take longer than the fix
    A prototype or research with no clear goal yet Prompt and iterate, then throw it away There is nothing to specify yet
    Template code: CRUD screens, migrations, boilerplate A generator Deterministic output beats a review of probabilistic output
    A queue of well-defined small tickets An agent taking tickets to pull requests Review effort moves to the pull request, where it is cheapest

    A lighter variant: the spec as a checkpoint

    Between plan mode and full SDD there is a practical middle ground, and it is what we teach on our Jmix courses. It takes something from SDD and something from investing in the agent's environment.

    The spec is short. The agent writes it from a short prompt, and a human reviews it before any code exists. It stays in the repository as a record of the decision, but nobody maintains it afterwards. The code remains the main artifact, so in Böckeler's terms this is spec-first.

    The variant works because the weight is carried elsewhere:

    • The environment sets the rules. Project rules live in AGENTS.md, framework knowledge lives in skills, so the spec only describes the business change, and the implementation prompt is one line pointing at it.
    • Gates instead of trust. Gate 1 is IDE inspections, Gate 2 is a clean build with tests, Gate 3 is a person checking the result in the browser.
    • Template work goes to Studio. The agent does not write CRUD screens or database changelogs. The Studio wizards do, and the agent takes the logic and the non-standard behavior.

    People sometimes read the last point as "the developer creates entities and screens by hand". That is not what happens. The developer runs a wizard that takes seconds, and the agent works on the part where its judgment is worth paying for. The next section explains the split.

    Two examples from our course rehearsals show what each part is responsible for.

    Reviewing the spec before code. Asked to prepare the app for deployment, the agent wrote a spec that also included a multi-stage Docker build, a database driver in the build, a storage path from environment variables, and admin password rotation. All four are reasonable in production, and all four were out of scope for the task. They were removed in spec review, before a line of code was written.

    Checks the spec cannot replace. In one run, a hand-written database changelog lost an ON DELETE CASCADE on a foreign key. All tests were green, and deleting a record in the browser failed. In another, a validation error from the data layer reached the user as a raw error dialog instead of a notification, again with green tests. Only Gate 3 caught them. A spec says what should happen; a check says whether it did.

    Agent or Studio: what to use when

    Jmix Studio is the IntelliJ IDEA plugin for Jmix development: visual designers for entities, screens and roles, and wizards that generate standard code. With a coding agent in the same IDE, a team has two ways to produce most artifacts, and choosing between them is part of the design.

    The principle is predictability. A generator is deterministic: the same input gives the same canonical output, instantly, and the reviewer already knows what it looks like. An agent is probabilistic: it reads the context and makes decisions, and every run can differ, so every output needs review. Template work, where the right answer is known in advance, belongs to the generator. Work that needs decisions belongs to the agent. The spec covers both, because a contract stays a contract whoever executes it.

    Our course rehearsals give a concrete picture. On a live run, the Studio wizard took the project from three views to fifteen list and detail views in about half a minute, and the running application picked them up without a restart. In an earlier rehearsal, we gave the agent one sample screen and asked it to scale the pattern to a dozen entities. With skills and guidelines loaded, it still spent tens of minutes reproducing what the wizard outputs, and the reviewer then had a dozen descriptors to read instead of none.

    The database changelog is the same story with a sharper edge. Studio generates Liquibase changelogs from the difference between the entity model and the database, so a cascade appears in the database exactly where the model declares it. The ON DELETE CASCADE that went missing in the example above was lost in a changelog the agent wrote itself. With the changelog from Studio, that bug cannot appear.

    Small model edits work the same way. Adding a "future or present" check to a booking's start and end dates is two clicks in the entity designer. Asking the agent for it means the agent reads the codebase and the skills and probably asks a question first.


    Task Better tool Why
    Liquibase changelog Studio Generated from the model diff, deterministic, canonical
    CRUD list and detail views Studio wizard All screens in seconds, in the form every Jmix developer recognizes
    A few attributes or a validation annotation on an entity Studio entity designer Faster than explaining it to the agent
    A data model for a new feature with many entities and rules Agent, from a spec The decisions come from requirements, and the spec records them
    Bringing generated screens in line with the spec Agent Needs the spec's context: which children are edited inside the parent, which fields are hidden
    A role with standard entity permissions Studio role editor Declarative, nothing to decide
    Row-level access ("only my bookings") Agent, from a spec, with tests Logic and edge cases, checked against acceptance criteria
    Business logic, validation across entities, services Agent This is where its judgement is worth the money and the time
    Non-standard screen behavior Agent Studio has no wizard for it
    Project setup, add-ons, data store settings Studio Standard, repeatable steps

    On one feature, the two tools take turns. For the screens of the booking app, the agent first wrote a spec: which screens are needed, which component to use for which attribute type, and that floors are edited inside their building and rooms inside their floor. Then the developer generated the list and detail views with the Studio wizard. The agent brought the generated views in line with the spec, and the three gates checked the result. The rule we give the agent in its project instructions follows from this: when unsure about the canonical form of an artifact, ask for a sample from Studio. A reference from the wizard keeps the agent within bounds.

    Where Jmix helps any approach

    Jmix is a Java framework for business applications: data model, security, UI and the infrastructure around them. Its contribution to working with an agent is not limited to SDD.

    • Fewer decisions to make. Entities, roles, screens and database migrations have a canonical form in Jmix, so neither a spec nor a plan has to settle architecture. They describe the business rule, and the framework already fixes where that rule goes.
    • Declarative artifacts are easy to review. A resource or row-level role, a fetch plan or a screen descriptor is short and declarative, so the reviewer can read it next to the acceptance criteria. In the booking example, AC1, AC2 and AC4 map onto one row-level role.
    • The environment exists already. The Jmix Agent Toolkit installs skills for Jmix features, adds a guidelines block to AGENTS.md and registers MCP servers for the JetBrains IDE, Context7, Jmix documentation and Playwright. In Jmix Studio 3.0 and later it is one action. The IDE inspections that serve as Gate 1 are the same ones a developer sees.
    • A generator for the template work. Studio provides deterministic generators out of the box.

    None of this requires a particular agent or model. The set of rules and skills works with Claude Code, Codex, OpenCode, Junie, Cline and other agents that read AGENTS.md.

    When Jmix is not the point

    Jmix is not always the right base for a public high-load website, a mobile or consumer app, a data pipeline without a UI, or a script or command-line tool. SDD may still be useful there; Jmix adds little.

    Inside a Jmix project, the combination with SDD adds little in three cases:

    • Small changes in an existing app. A field, a column, a label: Studio or a direct edit is faster than any spec.
    • Plain CRUD with no logic. The Studio wizard is the spec. Writing one by hand duplicates it.
    • Heavy custom front-end work. Where most of the effort goes into custom components and styling, the framework's canonical forms help less, and review goes back to reading code.

    A checklist

    Choosing an approach:

    • 1. How many layers does the change touch? One layer rarely needs a spec; a plan or a prompt will do.
    • 2. Is part of the work template code? If a generator exists for it, use the generator and give the agent the rest.
    • 3. How will you check the results? Name the gate for each acceptance criterion, or the test for each behavior.
    • 4. Who will review, and when? Review time is the real cost of every approach described here.

    If you chose a spec:

    • 5. Is the agent's environment in place? Without project rules and framework skills, the spec must carry them, and it grows.
    • 6. Does anyone need the spec after the change ships? If yes, you are moving towards spec-anchored and need a way to keep it current. If no, keep it as a record and do not maintain it.

    Sources