Blog / Spec-Driven Development

Acceptance criteria examples: Best practices for agile teams

Arkoder Team


Acceptance criteria define clear, testable conditions that ensure development efforts align with business goals. Without specific examples, teams risk misinterpretation, rework, and missed deadlines. This article provides practical examples across industries. It highlights how tools like Arkoder’s Spec Wizard help developers create precise, automated specifications directly within their IDE, ensuring clarity from the start.

What Are Acceptance Criteria and Why They Matter

Acceptance criteria serve as the foundational contract between business objectives and technical execution. They transform vague ideas into testable conditions, ensuring that every feature delivered meets specific quality standards and user expectations without ambiguity or rework.

Defining 'Done' in Agile Development

In the fast-paced environment of modern software development, the definition of "done" is often the source of significant friction between teams. Without a clear, shared understanding of completion, developers may consider a feature finished once the code compiles, while product owners expect a fully tested, documented, and user-ready implementation. This discrepancy leads to wasted time and diminished trust. Acceptance criteria bridge this gap by providing an objective checklist that both parties agree upon before any work begins. When these criteria are explicit, the team can move with confidence, knowing exactly what success looks like. This clarity reduces the need for constant clarification during sprints, allowing developers to focus on building rather than guessing requirements. Furthermore, it establishes a consistent standard across the entire organization, ensuring that every story, regardless of complexity, undergoes the same rigorous validation process. This consistency is crucial for maintaining high velocity without sacrificing quality, as it eliminates the subjective interpretation of completion that often plagues unstructured projects.

The Risk of Implicit Requirements

One of the most dangerous pitfalls in software engineering is relying on implicit requirements. These are assumptions made by team members that are never explicitly stated but are expected to be understood. For instance, a request to "improve search performance" might implicitly mean "reduce load time by fifty percent," but without explicit criteria, a developer might only optimize database queries without considering cache strategies or UI responsiveness. Implicit requirements are fragile because they exist only in the minds of individuals. When team members change roles or leave the company, this knowledge is lost, leading to broken functionality or misaligned expectations. By forcing requirements into explicit, written criteria, teams eliminate ambiguity. This practice ensures that every nuance, from edge cases to error handling, is considered and documented. It also facilitates better onboarding for new team members, who can immediately understand the scope and constraints of a feature. Explicit criteria act as a safeguard against scope creep and miscommunication, ensuring that the final product aligns perfectly with the initial vision. This precision is particularly vital in large enterprises where multiple teams and stakeholders interact, as it provides a single source of truth that everyone can reference.

Aligning Stakeholders and Developers

Effective collaboration between product owners, business analysts, and development teams is essential for project success. Acceptance criteria serve as a communication tool that aligns these diverse groups around a common goal. During sprint planning, these criteria spark necessary conversations about functionality, usability, and technical constraints. They encourage stakeholders to articulate their needs clearly, while developers ask critical questions about edge cases and system behavior. This collaborative dialogue ensures that all perspectives are considered before coding begins, reducing the likelihood of costly changes later in the development cycle. When stakeholders see their requirements reflected in precise criteria, they feel more confident in the development process. Similarly, developers appreciate the clarity, as it allows them to plan their technical approach with greater accuracy. This alignment fosters a culture of transparency and accountability, where everyone understands their role in delivering value. By focusing on agreed-upon criteria, teams can prioritize tasks more effectively and measure progress objectively. This shared understanding minimizes friction and enhances team cohesion, leading to higher quality outputs and faster time to market. Ultimately, well-defined acceptance criteria empower teams to deliver solutions that truly meet user needs, driving business value and customer satisfaction.

How to Write Effective Acceptance Criteria

Defining precise success metrics is the cornerstone of successful software delivery. Teams that prioritize clarity over speed often see fewer defects and faster deployment cycles. This section explores the mechanics of crafting robust criteria that bridge the gap between business intent and technical execution.

Best Practices for Clarity and Measurability

The foundation of any reliable requirement lies in its specificity. Vague instructions lead to divergent implementations, where developers and testers interpret tasks differently. To prevent this misalignment, teams must adopt a rigorous approach to language and metrics.

Using Quantitative Metrics

Subjective terms like "fast," "responsive," or "easy to use" are the enemies of quality assurance. These words lack universal meaning and cannot be verified through automated testing or manual inspection without significant ambiguity. Instead, engineers should anchor requirements in hard numbers that define clear pass or fail states. For instance, rather than stating that a page loads quickly, a specification might require that the initial content display occurs within 200 milliseconds under standard network conditions. Such quantifiable targets allow continuous integration pipelines to automatically validate performance without human intervention. When defining these metrics, it is crucial to establish the context of the measurement. Does the two-second threshold apply to the first load or subsequent requests? By specifying the baseline conditions, teams ensure that the metric remains a consistent standard across all development environments. This precision reduces the back-and-forth communication during sprint reviews, as both parties agree on the exact numerical boundary before a single line of code is written.

Avoiding Ambiguous Language

Language plays a critical role in how requirements are understood. Words such as "approximately," "possibly," or "should" introduce uncertainty into the development process. A requirement that states the system "should handle errors gracefully" leaves the developer to guess what constitutes graceful handling. It might mean showing a user-friendly message, logging the error, or restarting a service. To eliminate this guesswork, use imperative and definitive language. Replace conditional suggestions with direct commands. Instead of "The user should be able to reset their password," write "The system must send a password reset link to the registered email address within five minutes." This shift in phrasing transforms a suggestion into a mandatory behavior. It empowers the automated tools and the development team to know exactly what needs to be built and tested. Clear language also facilitates better code reviews, as reviewers can easily check if the implemented feature matches the explicit instruction. By standardizing terminology across the team, organizations reduce the cognitive load required to interpret new tickets, allowing developers to focus on complex problem-solving rather than decoding vague requests.

Integrating AI and Automation Tools

Modern development workflows are increasingly reliant on artificial intelligence to maintain consistency and speed. Leveraging specialized tools allows teams to move beyond static documentation into dynamic, validated specifications that adapt to the codebase.

Using Arkoder’s Spec Wizard for Precise Definitions

One of the most significant hurdles in writing effective criteria is the initial drafting phase. Product owners may have a clear vision but struggle to translate it into technical requirements. Arkoder’s Spec Wizard addresses this challenge by guiding users through a structured definition process. As an agentic extension for VS Code, it connects directly to the integrated development environment, ensuring that specifications are created in the context of the actual project. When initiating a new feature, the Spec Wizard asks targeted questions to refine the user’s intent. It leverages the existing knowledge base of the active project to suggest relevant technical constraints and historical patterns. This interaction results in a comprehensive, editable specification that is immediately available to the AI agent. The wizard does not just write text; it structures the acceptance criteria in a format that can be directly consumed by automated testing frameworks. This seamless integration ensures that the criteria are not an afterthought but a core component of the development workflow, reducing the time spent on documentation and increasing the accuracy of the initial implementation.

Leveraging Private LLM Inference for Validation

Data security is a paramount concern for enterprises handling sensitive intellectual property. Public AI models often require sending code snippets or specifications to external servers, raising risks of data leakage. Arkoder differentiates itself by offering private LLM inference, where all computational processes occur within the user’s secure infrastructure. This means that acceptance criteria, along with the underlying code and project specifications, never leave the local environment or the controlled private cloud. This architecture allows teams to use advanced AI capabilities for validation without compromising security. The private LLM can analyze the written criteria against the codebase to identify inconsistencies, missing edge cases, or logical contradictions. For example, if a criterion requires data encryption but the code uses an unencrypted storage method, the local inference engine can flag this discrepancy immediately. This real-time feedback loop enhances the quality of the criteria themselves, ensuring they are technically feasible and secure. By keeping the data private, organizations maintain full ownership of their intellectual property while still benefiting from the power of large language models.

Collaborative Writing Techniques

Acceptance criteria are not the sole responsibility of the product owner. They are the result of a shared understanding between business stakeholders and technical experts. Collaborative techniques ensure that the final document reflects both user needs and technical constraints.

The Role of Product Owners

Product owners serve as the primary voice of the customer, but they must collaborate closely with developers to ensure feasibility. A common mistake is defining criteria in isolation, leading to requirements that are difficult or expensive to implement. Effective product owners engage in continuous dialogue with the engineering team. They present the desired outcome and invite technical feedback early in the process. This collaboration helps refine the criteria to be both valuable and achievable. For instance, a product owner might request a complex real-time synchronization feature. The developer might suggest a simpler polling mechanism that meets the user’s core need with less overhead. By negotiating these details, the product owner ensures that the criteria remain aligned with business value while respecting technical reality. This role requires strong communication skills and a deep understanding of the product roadmap. The product owner must also prioritize the criteria, distinguishing between must-have features for launch and nice-to-have improvements for future iterations. This prioritization guides the team’s focus and ensures that critical acceptance conditions are defined first.

Team Workshops for Requirement Refinement

Workshops provide a structured environment for cross-functional teams to define requirements collectively. These sessions, often involving developers, testers, product owners, and sometimes end-users, leverage diverse perspectives to uncover hidden assumptions and edge cases. During a workshop, the team might use techniques like story mapping or scenario brainstorming to visualize the user journey. This visual approach helps identify gaps in the logic that might be missed when working individually. For example, a developer might point out a specific API limitation that affects a user story, while a tester might highlight a potential security vulnerability in the login process. By discussing these aspects openly, the team can adjust the acceptance criteria to include necessary technical validations or security checks. Workshops also foster a sense of shared ownership, as every team member contributes to the final definition. This collective agreement reduces the likelihood of misunderstandings during development and testing. The output of these sessions is a refined set of criteria that has been vetted by multiple viewpoints, resulting in higher quality software and fewer defects in production.

Given-When-Then Examples and Behavior-Driven Development

Behavior-Driven Development shifts the focus from technical implementation to business value by structuring acceptance criteria in a language that developers, testers, and product owners can all understand. This approach minimizes ambiguity and ensures that every line of code serves a verified purpose.

Understanding the Gherkin Syntax

Gherkin provides a simple, structured language known as "executable specifications." It allows teams to write scenarios in a plain text format that is easy to read for non-technical stakeholders while remaining machine-readable for automation tools. The syntax relies on a few key English keywords to define the structure of a test case. These keywords create a clear narrative flow that mirrors how users interact with software. By standardizing this language, teams reduce the friction often seen in traditional requirement documents, which are frequently filled with technical jargon or vague descriptions. This shared vocabulary becomes the single source of truth for what the application should do.

Crafting Logical Scenarios

Creating effective scenarios requires breaking down complex user journeys into discrete, testable steps. Each step must be atomic, meaning it represents a single action or condition that can be verified independently. This granular approach allows for precise error reporting when tests fail. Instead of a vague failure message, teams can pinpoint exactly which part of the user journey broke. This method also encourages collaboration, as product owners can validate the logic of the scenario before any code is written.

Defining Initial Contexts (Given)

The "Given" step establishes the preconditions required for the scenario to run. It sets the stage by defining the state of the system, the user’s role, or the data available. For example, a specification might start with "Given a registered user is logged in." This ensures that the test environment is predictable and consistent. Without a clear "Given" step, subsequent actions lack context, making it difficult to reproduce failures. Teams often use fixtures or setup scripts to automate the creation of these initial conditions, ensuring that every test starts from a known baseline. This precision is crucial for maintaining reliability in automated test suites.

Specifying User Actions (When)

The "When" step describes the specific interaction or event that triggers the behavior under test. It represents the user’s action or the system’s trigger. Examples include "When the user clicks the submit button" or "When the system processes the payment." This step must be precise and unambiguous. It should not describe the implementation details, such as which API endpoint is called, but rather the functional intent. This abstraction allows developers to change the underlying technology without breaking the acceptance criteria, as long as the user experience remains consistent. The clarity of the "When" step directly impacts the maintainability of the test suite.

Verifying Expected Outcomes (Then)

The "Then" step defines the expected result of the action. It asserts that the system has changed in a specific, verifiable way. This could involve checking the UI, validating database records, or confirming API responses. For instance, "Then the user sees a success message" or "Then the account balance is updated by $100." Each "Then" step is a validation point that confirms the system behaves as intended. Teams should aim for multiple "Then" steps to cover different aspects of the outcome, such as user feedback and backend data consistency. This comprehensive verification ensures that no edge cases are overlooked.

Integrating BDD with Development Workflows

Integrating Behavior-Driven Development into the daily workflow transforms acceptance criteria from static documents into active components of the development process. This integration bridges the gap between planning and execution, ensuring that quality is built into the product from the start rather than tested in at the end.

Automated Testing Integration

Modern development environments allow Gherkin scenarios to be directly linked to automated test code. Tools like Cucumber or SpecFlow parse the plain text scenarios and execute corresponding test scripts. This seamless connection ensures that the specifications remain up to date with the codebase. If a feature changes, the developer updates both the code and the scenario, keeping the documentation alive. This automated verification provides immediate feedback, reducing the time between writing code and confirming its correctness. The result is a more robust and reliable software delivery pipeline.

Continuous Feedback Loops

BDD fosters a culture of continuous feedback by involving all team members in the validation process. Product owners can run scenarios to verify that new features meet business requirements without needing technical expertise. Developers receive immediate feedback on whether their code meets the acceptance criteria. Testers use the scenarios as a comprehensive test suite, ensuring coverage of all specified behaviors. This collaborative loop accelerates the delivery of value while maintaining high quality standards. By embedding these checks into the CI/CD pipeline, teams can deploy with confidence, knowing that every change has been verified against the agreed-upon specifications. This approach aligns perfectly with agile principles, promoting transparency and adaptability in software development.

Practical Acceptance Criteria Examples Across Industries

Abstract principles become genuinely useful only when they are translated into the concrete language of a specific domain. A criterion that works for a marketing website rarely survives contact with a payment ledger, a medical record, or a multi-tenant billing system. The following examples illustrate how the same underlying discipline of observable, verifiable statements adapts to the regulatory constraints, failure modes, and vocabulary of different industries. Teams should read them as patterns rather than templates, extracting the structural logic and reapplying it to their own context.

E-Commerce and Retail Platforms

Commerce systems concentrate risk in a handful of paths where money, inventory, and user expectations intersect. Vague criteria in these areas produce the most expensive defects, because a mistake in checkout is simultaneously a technical failure, a revenue loss, and a customer trust incident. Criteria here must be expressed in terms of what the customer observes and what the ledger records, never in terms of which service performed the work.

Shopping Cart and Checkout Flows

A well-written checkout criterion describes a complete journey with a deterministic outcome. For example: given a registered customer with three items in the cart and a valid saved payment method, when the customer confirms the order, then a single order record must be created, the payment authorization must be captured exactly once, the inventory for each purchased variant must decrease by the corresponding quantity, and the confirmation page must display the order reference generated by the backend. Notice that the criterion forbids duplicate charges without naming any specific gateway, and that it asserts both the user-visible result and the persisted state. Additional criteria should cover the negative paths: an expired card must produce a user-visible message within two seconds without creating an order record, and a stock depletion occurring between cart display and confirmation must surface a specific out-of-stock message listing the affected items rather than failing silently.

Inventory and Pricing Consistency

Catalog consistency criteria protect against the subtle drift that appears when caches, search indexes, and transactional databases evolve independently. A representative statement: given a price change applied by an administrator, when the update is committed, then the product detail page, the category listing, the search results, and the cart must all reflect the new price within sixty seconds, and any cart that was loaded before the change must display a warning before proceeding to payment. Similar criteria should govern inventory propagation, including the rule that an item marked as unavailable must never be purchasable through a stale cached page. These conditions are testable through automated checks that compare the rendered output against the source of truth, which makes them ideal candidates for continuous verification in the deployment pipeline.

Fintech and Payment Processing

Financial software operates under a stricter burden of proof than almost any other domain. Regulators, auditors, and reconciliation teams all require that behavior be demonstrable after the fact, which means acceptance criteria must specify not only what happens but what evidence remains. Idempotency, traceability, and explicit monetary precision are non-negotiable ingredients of every criterion in this space.

Transaction Limits and Fraud Controls

Consider a transfer feature subject to daily limits: given an account whose accumulated transfers during the current calendar day total nine thousand euros, when the user attempts a transfer of two thousand euros, then the system must reject the operation, must not create a pending transaction, must return an error identifying the exceeded limit and the remaining allowance, and must record a declined attempt entry with a timestamp and a correlation identifier. The criterion deliberately separates three observable facts — the user message, the absence of side effects, and the audit record — because fraud review depends on all three. Related criteria must define how limits reset, how they interact with refunds, and how a manual override by a privileged operator is logged.

Reconciliation and Auditability

A reconciliation criterion might state: given a settlement file received from the provider at the end of the business day, when the batch process completes, then every settled transaction must match exactly one internal transaction record, unmatched entries must be reported in a dedicated exception table with the provider reference, and the totals of matched amounts must equal the settlement total to the cent, or the process must abort without partially updating balances. The insistence on cents, on the all-or-nothing behavior, and on a persistent exception list transforms an internal quality goal into something an external auditor can verify. Every criterion in this domain should be phrased so that a compliance reviewer could check it manually from the raw data alone.

Healthcare and Regulated Environments

Systems that touch patient data combine the technical demands of financial software with the privacy obligations of regulation. Criteria must therefore treat access control and audit history as first-class functional requirements rather than infrastructure concerns, and they must be written so that an inspector can trace any change to an identified actor and a stated purpose.

Access Control and Audit Trails

A representative criterion: given a clinician assigned to department A, when the clinician opens the record of a patient admitted under department B, then access must be denied by default, the attempt must be logged with the user identifier, the record identifier, the timestamp, and the client address, and the patient must be able to see the attempt in the access history. The requirement binds three layers together: the enforcement decision, the immutable log entry, and the transparency obligation toward the data subject. Additional criteria should cover emergency override scenarios, specifying exactly which fields must be captured to justify a break-glass access, and the maximum delay before the override appears in the compliance dashboard.

Clinical Data Integrity

Integrity criteria for clinical records typically forbid destructive updates. A usable statement is: given a previously stored measurement, when an authorized professional submits a correction, then the original value must remain retrievable together with the correction, both versions must carry distinct identifiers and timestamps, and any derived report generated after the correction must indicate that a revision exists. This wording captures versioning without prescribing a storage technology, and it gives testers an unambiguous rule: no read path may ever return a value without its revision context. Criteria of this shape protect against the most damaging class of defect in regulated software, where the system silently loses the provenance of a record.

SaaS, Multi-Tenant and B2B Products

Multi-tenant platforms add a dimension that single-tenant applications never face: every behavior must hold in isolation per tenant, and every limit must degrade gracefully rather than catastrophically. Criteria in this space should be written with explicit tenant scoping and with the expectation that the system will eventually be stressed.

Role-Based Permissions

A permission criterion might read: given a user holding the analyst role within tenant X, when the user requests the audit export of tenant Y, then the request must be rejected with an authorization error, no data from tenant Y may appear in the response body, and the rejection must be recorded in the platform security log. Two details make this criterion valuable in practice: the assertion about the response body prevents information leakage through error detail, and the tenant scoping is stated on both sides of the boundary, so a test written from it cannot accidentally pass by relying on a global filter applied elsewhere in the stack.

Quotas, Billing and Graceful Degradation

Usage-based products need criteria that describe what happens at the edges. For example: given a workspace that has consumed ninety-eight percent of its monthly allowance, when a member triggers an additional operation, then the operation must succeed while the interface displays a warning indicating the remaining allowance, and once the allowance is exhausted further operations must return a specific limit error without corrupting existing data or interrupting read access. A parallel criterion should define the behavior of the billing integration: when the period closes, an invoice line must be generated whose quantity matches the recorded consumption, and any discrepancy greater than the reconciliation tolerance must block the invoice rather than issue a corrected amount months later. Framing quotas in terms of observable behavior, warnings, and preserved data keeps the requirement honest and prevents the classic failure where a limit silently truncates work already in progress.

Turning Examples into a Repeatable Practice

These examples share a common grammar: a starting state, a triggering action, and a set of observable consequences that include the user experience, the persisted data, and the evidence left behind. Once a team internalizes that grammar, it stops arguing about wording and starts arguing about substance, which is exactly where the value lies. The practical discipline is to treat every acceptance criterion as a small contract with three parties: the business stakeholder who needs the behavior, the engineer who must implement it, and the verification process that must confirm it later. When all three can read the same sentence and reach the same conclusion, the criterion is finished. When any of them must ask a clarifying question, the criterion is still a draft.

Tools accelerate this discipline but do not replace it. A structured specification workflow, such as the one provided by Arkoder’s Spec Wizard inside the development environment, shortens the distance between a rough idea and a testable contract, and private inference keeps the resulting artifacts inside the organization’s own boundary. The final measure of success, however, remains human: fewer surprises during review, fewer defects escaping into production, and a shared definition of done that survives the departure of the person who originally wrote it.

← Back