← Back to list

AIDLC and SDD:How two emerging methodologies work together to build features faster, safer, and…

Introduction

Mohan G · 2026-05-24 17:25 · 0 claps · 10.0 min read
#aidlc #sdd #software-development #ai #aidevelopmentplatform
Open on Medium ↗
Wiki topics: AI · AI · General

AIDLC and SDD:How two emerging methodologies work together to build features faster, safer, and smarter

Introduction

The way software gets built is changing at a pace the industry has never seen before. Two methodologies — the AI-Driven Development Lifecycle (AIDLC) and Spec-Driven Development (SDD) — are leading that change. But beyond the theory and the statistics, the real question practitioners are asking is: what does this actually look like when you’re building a feature?

This article walks through both methodologies conceptually and then demonstrates them in action through a concrete, realistic example: building a user notification preferences feature for a SaaS web application.

Understanding AIDLC

The AI-Driven Development Lifecycle is not simply “use AI while coding.” It is a structured methodology that positions AI as a collaborative participant at every phase of the development process — from requirements gathering all the way through deployment and maintenance.

Traditional SDLC phases were designed around human handoffs. A business analyst wrote requirements. A designer created wireframes. A developer wrote code. A QA engineer tested it. Each handoff introduced delays, misunderstandings, and rework. AIDLC doesn’t eliminate these phases — it compresses and enriches them by making AI an active contributor at each one.

cc:chatgpt

cc:chatgpt

The key principles of AIDLC are:

AI as collaborator, not autocomplete. The developer is not simply typing a prompt and accepting whatever comes back. They are engaging with AI iteratively, steering it, correcting it, and combining its output with domain expertise and judgment.

Context continuity. One of the biggest failures in early AI-assisted development was treating each prompt as isolated. AIDLC mandates that context — the codebase, the architecture decisions, the business rules — is actively fed to the AI throughout the lifecycle, not just during code generation.

Human review at every gate. AI accelerates each phase, but a human makes the call before moving to the next one. This preserves accountability and catches the hallucinations and architectural drift that unchecked AI generation produces.

Measurable outcomes per phase. Each phase produces a verifiable artifact — a requirements document, a design spec, a set of tests, a deployment checklist — not just code.

Understanding SDD

Spec-Driven Development takes a different but deeply complementary angle. Its central insight is simple: AI is only as good as the specification it receives.

When you prompt an AI with vague intent — “build me a notification settings page” — the AI fills in every unstated assumption with a plausible guess. It picks data structures, naming conventions, API patterns, and UI behaviours that seem reasonable in isolation but may be inconsistent with the rest of your system. The result looks functional but breaks under real-world conditions.

SDD inverts this. Before any code is written, the team produces a machine-readable, versioned specification that captures:

  • What the feature does and why
  • The precise data models involved
  • The API contracts (inputs, outputs, errors)
  • The acceptance criteria written as testable assertions
  • The constraints (security, performance, accessibility)

This specification becomes the single source of truth. AI generates code, tests, documentation, and deployment configuration from it — all coherently aligned because they all derive from the same root document.

SDD does not mean writing an exhaustive waterfall spec. A good SDD spec is lean, precise, and evolves with the feature. The discipline is in the precision, not the length.

How AIDLC and SDD Work Together

Think of AIDLC as the process and SDD as the foundation. AIDLC tells you when AI participates and how humans review its output. SDD tells you what AI works from — the spec that anchors every generation step.

Without SDD, AIDLC becomes fragile: AI is collaborating actively, but without a shared source of truth, each phase may drift from the last. Without AIDLC, SDD is just good documentation — the spec exists, but there’s no structured process for AI to act on it phase by phase.

Together, they produce something powerful: a repeatable, auditable, high-velocity workflow for building software.

A Worked Example: Notification Preferences Feature

Let’s build a Notification Preferences feature for a SaaS project management tool. Users should be able to control which notifications they receive — email, in-app, or push — for different event types like task assignments, due date reminders, and mentions.

We’ll walk through each AIDLC phase, showing how SDD underpins the work at each step.

Phase 1 — Requirements Elaboration

What happens: The product manager has a one-line user story: “As a user, I want to control my notification preferences.” In traditional SDLC, a BA would spend days turning this into a requirements document. In AIDLC, a developer and an AI collaborator do it together in an afternoon.

How it works in practice:

The developer opens a conversation with the AI and provides context — the existing product, user roles, current notification behaviour, and the one-liner from the PM. They then ask the AI to draft an expanded requirements list, probing edge cases.

The AI might surface questions like:

  • What happens to preferences when a user is on a free plan that doesn’t support push notifications?
  • Should preferences cascade from a workspace admin to individual users, or are they fully personal?
  • What is the default state for a new user — all notifications on, or only critical ones?

The developer answers each one, and the AI refines the requirements in real time. The output is a structured requirements document — not a wall of prose, but a set of clear, numbered, testable requirements.

Example output:

REQ-01: Users shall be able to independently toggle email, in-app, 
        and push notifications for each event type.
REQ-02: Push notification toggles shall be disabled and greyed out 
        for users on the Free plan, with an upgrade prompt.
REQ-03: Default state for new users shall be: email ON, in-app ON, 
        push OFF.
REQ-04: Preference changes shall take effect within 60 seconds 
        across all active sessions.
REQ-05: Users shall receive a confirmation toast on save, 
        and the UI shall reflect the saved state, not the optimistic state.

This is the beginning of the SDD spec. Every requirement is precise enough for a machine to validate against.

Phase 2 — Specification Writing (The SDD Core)

What happens: The requirements are now turned into the full SDD specification — the document that will govern every subsequent generation step. This is the most important phase. Time invested here pays dividends in every phase that follows.

How it works in practice:

The developer works with the AI to produce three artifacts:

2a. The Data Model

NotificationPreference:
  user_id: UUID (required, foreign key → users.id)
  event_type: enum [TASK_ASSIGNED, DUE_DATE_REMINDER, MENTION, 
                    COMMENT_ADDED, STATUS_CHANGED]
  channel: enum [EMAIL, IN_APP, PUSH]
  enabled: boolean
  updated_at: timestamp (auto-managed)
Constraints:
  - Unique on (user_id, event_type, channel)
  - Cannot set PUSH enabled=true if user.plan = FREE

2b. The API Contract

GET /api/v1/users/{userId}/notification-preferences
  Response 200: { preferences: NotificationPreference[] }
  Response 403: User requesting preferences of another user
PATCH /api/v1/users/{userId}/notification-preferences
  Body: { event_type, channel, enabled }
  Response 200: { updated: NotificationPreference }
  Response 400: { error: "PUSH_UNAVAILABLE_ON_FREE_PLAN" }
  Response 403: Unauthorized
  Response 422: Invalid event_type or channel value

2c. Acceptance Criteria

AC-01: Given a Pro plan user, 
       When they PATCH PUSH/TASK_ASSIGNED to enabled=true, 
       Then the response is 200 and preference is persisted.
AC-02: Given a Free plan user, 
       When they PATCH PUSH/any_event to enabled=true, 
       Then the response is 400 with error PUSH_UNAVAILABLE_ON_FREE_PLAN.
AC-03: Given preferences are saved, 
       When the user opens settings in a new browser tab within 60s, 
       Then the saved state is reflected accurately.

This spec is now the input to every subsequent phase. The AI doesn’t guess — it generates from this document.

Phase 3 — Architecture and Design

What happens: Before writing any production code, the team decides how the feature fits into the existing system — what services it touches, what new components it needs, and what patterns it follows.

How it works in practice:

The developer feeds the SDD spec plus a summary of the existing architecture to the AI and asks for a design proposal. The AI proposes a solution — in this case, a new notification_preferences table, a service layer function updateNotificationPreference, and a React settings component with optimistic UI handling.

Crucially, the developer reviews and pushes back. Perhaps the AI suggested a separate microservice, but the team is a small startup running a monolith — the developer steers the AI toward an in-process service module instead. This is the human gate: the AI proposes, the engineer decides.

The output is a one-page architecture decision record (ADR) that documents what was chosen and why. This also gets added to the spec, so future AI generation steps know the constraints.

Phase 4 — Code Generation

What happens: With the spec and ADR in hand, the team now generates the implementation. This is where most developers assume AI involvement begins — in AIDLC with SDD, it’s actually phase four of a structured process.

How it works in practice:

Rather than one giant prompt (“write the notification preferences feature”), the developer breaks generation into precise, spec-anchored tasks:

Task 1 — Database migration The developer gives the AI the data model from the spec and asks it to generate a database migration. Because the spec is precise, the AI produces exactly the right schema — including the unique constraint and the plan-based guard — without guessing.

Task 2 — Service layer The developer gives the AI the API contract and acceptance criteria and asks it to write the NotificationPreferencesService with the getPreferences and updatePreference methods. The AC conditions become the error handling logic.

Task 3 — API controller The controller is generated from the API contract section of the spec. The developer reviews each endpoint against the spec before moving on.

Task 4 — Frontend component The developer provides the API contract and REQ-05 (confirmed save state, not optimistic) and asks the AI to generate the React settings panel. Because the requirement was precise — the UI shall reflect the saved state, not the optimistic state — the AI does not implement optimistic updates, which it might have done by default.

At every task, the output is reviewed against the spec. Divergences are flagged and corrected before moving forward. This is not waterfall — if a requirement turns out to be wrong or incomplete, the developer updates the spec first, then regenerates.

Phase 5 — Test Generation

What happens: The acceptance criteria from the SDD spec are now turned into executable tests. This is one of the most valuable phases because the tests are grounded in the same document as the code — they genuinely test what the feature is supposed to do, not just what the developer happened to implement.

How it works in practice:

The developer feeds the acceptance criteria to the AI and asks it to generate unit and integration tests. Because the ACs are written in a structured Given/When/Then format, the AI produces well-structured tests with minimal ambiguity.

For AC-02:

def test_push_preference_blocked_for_free_plan_user():
    user = create_user(plan=FREE)
    response = client.patch(
        f"/api/v1/users/{user.id}/notification-preferences",
        json={"event_type": "TASK_ASSIGNED", 
              "channel": "PUSH", 
              "enabled": True},
        headers=auth_headers(user)
    )
    assert response.status_code == 400
    assert response.json()["error"] == "PUSH_UNAVAILABLE_ON_FREE_PLAN"

The developer also asks the AI to identify any edge cases not covered by the ACs — for example, what happens if the event_type field contains an unlisted value. If the AI surfaces a genuine gap, the spec is updated and a new AC is added. The tests and spec stay in sync.

Phase 6 — Review and Hardening

What happens: The generated code, tests, and spec are reviewed together. The AI participates in this phase too — not as a generator, but as a reviewer.

How it works in practice:

The developer asks the AI to read the final implementation and the spec side by side and identify any discrepancies. Common findings at this stage:

  • An error code in the implementation (PLAN_RESTRICTION) doesn't match the spec (PUSH_UNAVAILABLE_ON_FREE_PLAN) — a future API client would break.
  • The migration is missing an index on user_id — a performance issue the spec didn't specify but the AI flags from context.
  • The frontend component doesn’t disable the PUSH toggle visually on Free plan — REQ-02 says it should be greyed out, but the implementation only blocks the API call.

Each finding either triggers a fix or a spec update (if the spec was wrong). The spec remains the arbiter.

Phase 7 — Documentation and Deployment

What happens: Documentation and deployment configuration are generated from the spec, not written from scratch.

How it works in practice:

The API contract section of the spec becomes the OpenAPI documentation with minimal translation. The acceptance criteria become the feature’s changelog entry. The data model becomes the entity relationship diagram in the internal wiki.

The deployment checklist — database migration order, feature flag configuration, rollback procedure — is generated by giving the AI the ADR and asking it to produce a deployment runbook. Because the architecture decisions were documented, the AI can reason about the deployment correctly.

What This Looks Like in Team Practice

For a small team, this workflow might feel heavier than just opening a code editor and prompting an AI to “build the thing.” That feeling is a short-term friction with a long-term payoff.

The spec, once written, means that:

  • A second developer joining mid-feature has a complete source of truth.
  • A bug report two months later can be diagnosed against the spec to determine whether it’s a defect or a requirement gap.
  • The next similar feature (say, email digest preferences) reuses 60% of the spec structure and generates correspondingly faster.
  • Onboarding new AI tools — a new code model, a new test generator — is painless because the spec is tool-agnostic.

The AIDLC structure means that AI is not a wild card that introduces unpredictable changes. It is a known participant with a defined role at each phase, and a human reviews its output before it propagates forward.

Common Pitfalls to Avoid

Writing a vague spec and expecting precision. “Users can manage their notifications” is not a spec. If the AC can be interpreted two ways, the AI will pick one and the developer will discover the choice at code review.

Skipping the spec update when requirements change. The moment the code diverges from the spec and the spec isn’t updated, the spec stops being the source of truth. Discipline here is everything.

Treating AI output as final. In AIDLC, every phase has a human gate. An AI-generated migration that looks right but missing a constraint, or a test that passes vacuously, can slip through if review is skipped under deadline pressure.

Over-specifying upfront. SDD is not waterfall. The spec should cover what is known and leave room for discovery. It evolves — but it evolves deliberately, with each change recorded.

Conclusion

AIDLC and SDD are not silver bullets, and they are not magic. They are disciplined approaches to a genuine problem: how do you get the productivity benefits of AI generation without sacrificing the coherence, security, and maintainability of the resulting software?

The notification preferences example above shows what this looks like in practice. The feature was built faster than traditional methods — but the speed came not from prompting carelessly and hoping for the best. It came from investing in a precise spec upfront, using AI as a structured collaborator at each phase, and keeping humans in the decision seat at every gate.

That combination — human judgment directing AI capability, anchored by a shared specification — is the pattern that will define high-quality software development for the years ahead.


메타데이터
post_id
c9592be93ab2
slug
aidlc-and-sdd-how-two-emerging-methodologies-work-together-to-build-features-faster-safer-and-c9592be93ab2
url
https://medium.com/@itismohan.g/aidlc-and-sdd-how-two-emerging-methodologies-work-together-to-build-features-faster-safer-and-c9592be93ab2
canonical_url
https://medium.com/@itismohan.g/aidlc-and-sdd-how-two-emerging-methodologies-work-together-to-build-features-faster-safer-and-c9592be93ab2
author_url
https://medium.com/@itismohan.g
status
ok
fetched_at
2026-06-09 15:37:30