Blog

    OpenSpec and AI-Assisted Software Development: The Spec, the Task List and Review Before Code Merges

    By GauravSeptember 21, 20269 mins read
    On this page

    OpenSpec AI-assisted software development is a way of working where every change to a codebase starts as a written spec and a task list, an AI coding agent implements the tasks, and a person reviews the result against the spec before it merges. The spec, not the chat history, becomes the record of what was asked for and why.

    Engineering leaders and founders using AI coding agents will find what goes into a change proposal, how to write requirements an agent can follow, how to break work into tasks, and what review before merge should check.

    What is OpenSpec AI-assisted software development?

    OpenSpec AI-assisted software development is spec-driven development for AI coding agents: a change begins as a proposal with requirements, scenarios and a task list that a person approves, the agent implements those tasks, and a reviewer checks the code against the approved spec before merging and archiving the change.

    Bringing AI coding agents into your team?

    We set up spec-driven workflows so agent-written code is reviewable and traceable.

    OpenSpec describes itself as spec-driven development for AI coding assistants. Its propose step creates a change folder holding proposal.md (why and what is changing), spec files with requirements and scenarios, design.md (the technical approach) and tasks.md (an implementation checklist). The archive step moves the finished change into an archive folder and updates the project's specs.

    The tool is one way to run the method. The habits behind it, writing intent down, splitting it into checkable tasks and reviewing against the written intent, work with any agent and any repository.

    Why write the spec before the agent writes code?

    You write the spec first because an agent will confidently build whatever it infers from a vague prompt, and a vague prompt leaves nothing to review against. A short spec turns a conversation into a contract.

    • Shared intent: the product owner, the engineer and the agent read the same requirements.
    • Smaller surprises: gaps and contradictions show up in a document, before they show up in code.
    • Reviewable output: the reviewer asks whether the code meets the spec, not whether it looks plausible.
    • History: months later, the archived change explains why the code is the way it is.

    What goes into a good change proposal?

    A good change proposal states why the change is needed, what will change and what will not, in language a non-engineer on the team can check. It stays short enough to read in one sitting.

    • Why: the problem or request, with a link to the ticket or conversation it came from.
    • What changes: the behaviour, screens, APIs or data that will be different.
    • Out of scope: related work that is deliberately left for later.
    • Risks: data migrations, security impact, performance or external systems touched.
    • Approval: who agreed to the proposal and when.

    How do you write requirements an agent can follow?

    You write requirements an agent can follow as short statements of behaviour, each with one or more concrete scenarios that say what input leads to what result. Scenarios double as test cases.

    For example, a requirement might read: a clinic administrator can export the day's appointment list as a CSV file. One scenario: given three appointments today and one cancelled, when the administrator exports, then the file has three rows and excludes the cancelled one. A second scenario covers a day with no appointments.

    Avoid requirements that describe implementation, such as which library to use, unless the choice matters to the business. Leave room for the agent and the engineer to pick the approach, and record the choice in the design notes.

    What goes into the design notes?

    The design notes record how the change will be built: the approach chosen, the alternatives rejected and why, and anything a reviewer needs to know that the requirements do not say. They are where technical decisions are agreed before the agent starts.

    • Approach: the modules, endpoints or tables involved and how they fit together.
    • Decisions: libraries, patterns or data structures chosen, each with a one-line reason.
    • Constraints: performance limits, backwards compatibility and external interfaces that must not change.
    • Open questions: anything still to settle, with an owner, so the agent does not guess.

    How should the task list be broken down?

    The task list should be broken into steps small enough that each one can be implemented, tested and reviewed on its own, in an order where every step leaves the code working.

    • One concern per task: a migration, an endpoint, a screen or a test suite, not all four.
    • Tests named in the task: which scenario each task satisfies.
    • Dependencies in order: data changes before the code that reads them.
    • Checkable completion: the agent ticks a task off only when its tests pass.

    Long tasks hide problems. When an agent reports a large task as done, the reviewer has to reconstruct what happened; small tasks keep each change readable.

    What does review before merge check?

    Review before merge checks that the code does what the spec says, nothing more, and that it meets the team's security and quality standards. Agent-written code gets the same review as human-written code, plus a closer look at scope.

    NIST's Secure Software Development Framework, SP 800-218 version 1.1, includes practice PW.7: review and/or analyze human-readable code to identify vulnerabilities and verify compliance with security requirements. Its tasks let the organization choose manual review, automated analysis or both, and call for recording and triaging the issues found.

    Review before merge for agent-written changes
    CheckQuestion the reviewer asksEvidence
    Spec coverageIs every requirement and scenario implemented?Tests mapped to scenarios
    ScopeDid the agent change anything the spec did not ask for?Diff limited to listed files and areas
    SecurityAre inputs validated and secrets kept out of code?Static analysis results and manual review notes
    DataAre migrations reversible and safe on real data volumes?Migration plan and dry run
    TasksIs every task ticked only where its tests pass?CI run on the final commit
    Spec-driven AI development in four stages: a person writes and approves the proposal, requirements and design, the task list orders small testable tasks, the AI coding agent implements one task at a time with tests, and review checks spec coverage, scope and security before merge and archive

    Who owns each step?

    Each step has a named owner, because an agent cannot be accountable for a change. Ownership keeps the workflow from becoming a loop of the agent approving its own work.

    • Product owner: approves the proposal, requirements and scenarios.
    • Engineer: edits the design notes and task list, and supervises the agent while it works.
    • Reviewer: a second engineer who did not run the agent checks the result against the spec.
    • Team lead: decides the threshold for when a change needs a full spec.

    Archiving the change and keeping specs current

    Archiving the change folds the approved requirements into the project's living specs, so the next change starts from an accurate description of the system. Without that step, specs drift away from the code over time.

    Treat the specs folder like code: changes go through review, and a requirement that the code no longer meets is either fixed in code or removed from the spec in the same pull request.

    Specs and standing rules are different documents

    A spec describes one change; standing rules describe how the agent must behave on every change, such as coding conventions, test commands and data handling. Keep them apart, so each spec stays short and focused on the feature.

    How do teams adopt spec-driven development step by step?

    Teams adopt spec-driven development gradually, starting with one kind of change and widening once the habit holds.

    • Step 1: pick a class of work, such as new API endpoints, and require a proposal and task list for it.
    • Step 2: agree a short template for proposals, requirements and scenarios.
    • Step 3: have the agent draft the proposal, and a person edit and approve it.
    • Step 4: let the agent implement tasks one at a time, with tests per scenario.
    • Step 5: review against the spec using a fixed checklist, then merge and archive.
    • Step 6: look back after several changes at review findings and adjust the template.

    When is a full spec too much?

    A full spec is too much for a typo, a dependency bump or a one-line bug fix with an obvious test. Set a simple threshold, for example any change to behaviour, data or an external interface needs a proposal, and let smaller changes go through normal review.

    Write the threshold down in the team guide so nobody has to argue it case by case.

    What are the common mistakes with spec-driven AI development?

    The common mistakes with spec-driven AI development turn the spec into paperwork or let the agent drift away from it.

    • Approving an agent-drafted proposal without reading it.
    • Writing requirements with no scenarios, so nothing can be tested.
    • One giant task that covers the whole change.
    • Merging when tests pass without checking scope against the spec.
    • Never archiving, so the specs describe a system that no longer exists.

    What does spec-driven development mean for cost and delivery?

    Spec-driven development moves effort earlier: more time writing and approving intent, less time untangling code that solved the wrong problem. The trade is usually worth it once agents write a large share of the code.

    • Product owners spend time on proposals and scenarios, so plan for it.
    • Reviewers need the spec next to the diff, which changes how reviews are scheduled.
    • CI should run scenario tests on every task, not only at the end.
    • Specs become an asset for onboarding, audits and future changes.

    How Agnotic helps with AI-assisted development

    Agnotic Technologies builds software for clients with AI coding agents inside a spec-driven workflow: proposals and scenarios agreed with your team, small tasks with tests, and review against the spec before every merge. We can also set the workflow up for your in-house team and run the first changes alongside them.

    Make agent-written code reviewable

    Spec first, small tasks, and review against what was agreed.

    Sources

    Frequently Asked Questions

    Engineering leaders and founders whose teams already use AI coding agents for real features and want changes that can be reviewed and traced. It suits teams where product owners can write or check requirements.

    Talk to an engineer about your project

    Tell us how your team uses AI coding agents today. We will suggest where a spec-driven workflow fits and how to introduce it.