Session 4
AI 2010, intermediateWriting Specifications Well
Treat a specification as a contract agreed before an agent writes any code: the behaviour, the constraints, what is out of scope, and how "done" will be proven. Participants will turn session 3's inputs into a spec by letting the agent interview them first, on the principle that every question it asks back is something the inputs did not say; write acceptance criteria a test can prove rather than qualities such as "quickly"; review an agent's work through that evidence, because no one can read every line it writes; and meet the spec-driven frameworks already in use, including the Amadeus AI-DLC and its human validation gate after every stage.
60 minutes
Homework due before your sitting of session 5 on 4 December 2026
Recording
This browser blocks the SharePoint player, even when you are signed in.
Watch the recording in SharePointOpen in SharePoint — use this if the player above is blank, or asks you to sign in.
Captions and a transcript are available in the SharePoint player.
Homework
Due before your sitting of session 5 on .
- Task
- From your example last session, create a spec using the concepts covered in this session. At the start of session 5, a few participants will show their specs.
- Deliverable
- A spec file, in Markdown format.
- File name
{lastname}-{firstname}-ai2010-session4.md- Submit to
- Homework submissions folder
Every submission is entered into a draw for exclusive program swag, awarded at the end of the semester.
Notes
Summary
- A specification is a contract. It records what will be built, its constraints and how “done” will be proven, and is agreed before the agent writes any code.
- The aim is a predictable outcome, not more process. A model is non-deterministic; a spec narrows what it can do and replaces back-and-forth with a shared source of truth.
- You still own the code. Since no one can read every line an agent writes, you review the evidence instead: tests and observable acceptance criteria.
- Let the agent interview you. Every question it asks is something missing from your inputs. The class turned session 3’s bag fee inputs into a spec this way.
- The Amadeus AI-DLC is spec-driven development. The course teaches the principles by hand first, so the framework makes sense when you adopt it.
Key concepts
What spec-driven development is
The definition is changing quickly. Three that were shared:
- IBM: a detailed specification of implementation details is written and agreed before development begins.
- Birgitta Böckeler, Thoughtworks: write a spec before writing code with AI, “documentation first”. The spec becomes the source of truth for the human and the AI.
- Sam Hatoum: explicit specifications materially guide implementation and verification, moving software intent into a more durable medium: intent, then specification, then implementation, then evidence.
The session’s own: requirements, constraints, design rules and acceptance criteria are written and agreed before the AI writes any code. For the team, the spec is a shareable, reviewable description of the product, its design, tests, operations and deployment. For the agent, it is guardrails for planning, implementation and verification.
- Prompt first: “Add authentication.” The agent chooses whatever libraries and approach it likes, and you find out afterwards what it did.
- Spec first: approved behaviour, constraints, exclusions and the proof — this kind of authentication, against this service, done when these checks pass.
Why it is worth the time up front
- Clarity and alignment between you and the agent, tested through a shared source of truth.
- Faster implementation, because the agent asks less and guesses less, at the cost of more work beforehand.
- Predictable delivery. The same prompt to an LLM can give a different result each time. The spec is what makes the outcome predictable.
Without a workflow, AI gives fast output but fragile delivery: context drifts, decisions are lost from the model’s context, and quality depends on how well you prompt. A structured workflow supplies the intent, evidence, definition of done and guardrails the model needs.
It is not waterfall
The stages look like the traditional SDLC — requirements, design, development, testing, deployment and maintenance — and the inputs are the same ones Navitaire has always used: PRDs, UX designs, user stories, personas. What differs is the agent doing the development, and the speed. You don’t design every corner up front: you state the intent, give it to the agent with feedback loops, and iterate, far faster than any agile method allowed.
You own the code, so review the evidence
When you push an agent’s code in a pull request, you are still accountable for anything that goes wrong with it. Reading every generated line quickly becomes untenable, so review moves from the code to reviewable outcomes: the tests and the observable criteria that give you the confidence to push. That is the move from vibe coding to agentic engineering.
Five properties of a good spec
A good spec carries decisions and context, is bounded (its scope is explicit), is testable and is provable. Most Navitaire products have very few unit tests because they have been hard to write and mock; with AI that is largely no longer an obstacle, and if code isn’t testable you can tell the agent to make it so.
Acceptance criteria must be things a test can prove:
- Vague: “Calculate the bag fee quickly.”
- Observable: “Given an eligible passenger with one standard first bag, return a zero fee.”
Human in the loop
The Amadeus AI-DLC puts a validation gate after every stage: a person verifies the plan, the set-up before implementation, and the result before release. The agent is never simply left to get on with it.
Greenfield and brownfield need different inputs
- Greenfield, building from nothing like the bag fee calculator: ground the agent with a PRD or product brief, personas, journeys and flow diagrams, mock-ups, examples and stakeholders — who it is for and how you will know it works.
- Brownfield, adding to existing code such as New Skies: many of those questions are already answered. Give the agent Confluence pages, the code base, data models, integrations and any existing unit, integration or smoke tests.
What the agent does and what you do
The agent works from as much context as you can give it and iterates with you, as a developer would. You choose the right inputs, resolve the open questions, approve the scope and judge the outcome. Templates and skills give consistent guardrails, but are no substitute for thinking: the thinking still belongs to you, and the agent helps you do it.
Skills age as models improve
A year ago prompts told the model its role — “you are a baggage expert”. Harnesses now build that guidance into their system prompts, and frameworks need far less explicit instruction than they did. One suggestion from a podcast: clear out your skills about every six months and reassess which you still need.
How long does a spec live?
There was no settled answer, and no Navitaire process yet.
- Spec as source. One school of thought treats the spec as the source of truth: every change is made to the spec first, and it is always kept current.
- A living document. Matt leans towards the agile view: the spec need not be versioned, and the ultimate source of truth is the code. Requirements documents have always ended up filed away; a bug becomes a new problem statement in Azure DevOps and joins the ticket history.
- Versioned by release. A participant suggested keeping a spec per New Skies release, so an agent can compare 4.11 and 4.12 when chasing a bug. Ryan agreed it is a fair use, and added that the agent should compare the source code too, since not every change gets documented — and reading a whole code base is trivial for an agent.
- Updating the spec after the code. Possible, but that is documentation more than specification. Updating human-facing material such as Confluence pages this way is useful, as is reverse-documenting an existing architecture with an LLM.
Nothing in software is truly deterministic — even a compiler or .NET upgrade can change how code behaves — so be pragmatic about how specs are used.
Methods and frameworks
Exercise: from PRD to spec
The exercise continues the bag fee calculator from session 3, with the airport agent
persona and a PRD in docs/inputs.
- Choose a PRD. Session 3’s is deliberately vague, about 12 lines, and produces many questions. A new, fuller PRD in the class materials already documents prices, oversize rules and more. Ryan used the fuller one.
- Ask for an interview, not a spec. The prompt asks the agent to work through the decisions as a tree, to ask every question it can’t answer in one round, to find out for itself anything it can by reading a file, and to ask only what you need to decide.
- Answer the questions. Expect around a dozen or more: scope (which PRD phases), whether fees apply per trip or per flight, stacking rules, currency. The demonstration accepted the defaults for speed; don’t.
- Then say “write the spec”. The spec holds the answers, not the questions. Ryan’s had user stories, implementation decisions, testing decisions, what is out of scope, and the open questions still to answer — which should be answered and replaced with the decisions before anything is built.
The demonstration used no skills and no AI-DLC: just “build me a spec from a PRD”.
Ready-made tools for writing specs
There is a plethora of them. The ones shown:
- The EA spec planner, a planning agent by Derek Holmes of the EA team, in Azure
DevOps. It writes no code, pre-fills security, data contracts, APIs and EA coding
conventions, and writes the spec in one repeatable format. Copy it into
.github/agentsand restart Visual Studio Code. In the demonstration the restarted editor did not pick it up, so check that the spec came out in its format. - Matt Pocock’s skills, written for the
frustrations of vibe coding: “the agent didn’t do what I wanted”, “the agent is too
verbose”. Grill me keeps questioning you; grill with docs does the same
against your documentation. The approach is a conversation with the harness,
grounded in engineering practice such as domain-driven design, building a glossary
and context files as it goes. Add the skills to your
.githubfolder. - The Amadeus AI-DLC, built on AWS’s AI-DLC. It has five stages, each followed by a human gate: initialization, ideation, inception, construction and operations. It currently runs only in Kiro and the Kiro CLI, and a GitHub Copilot plugin is coming. Kiro walks you through the AWS version by default, starting by looking for documentation in the project and asking you questions. The Amadeus version is installed from its repository on Amadeus’s GitHub Enterprise; if you can’t reach that, use its mirror in Azure DevOps.
Practical takeaways
- Expect to adopt the Amadeus AI-DLC. AI-native pods are rolling out across the company, and everyone will eventually be part of one. The details are changing fast, so don’t get too attached to them.
- It was built for Amadeus, not Navitaire. It assumes tools such as Eve for code scanning where Navitaire uses Rainforest, and Jira where Navitaire uses Azure DevOps. If you hit a gap, step back, find a pragmatic alternative, and report it to Matt and Ryan, who are working with the Amadeus team to close the gaps.
- Keep GitHub Copilot in interactive mode so that it asks you its questions. Switched to Autopilot, it skips many of them and sometimes answers them itself.
- Treat every question as a gap. Each one the agent asks is something your inputs didn’t say.
- Read specs as HTML. The Markdown is what the agent needs; for your own review, ask the agent for an HTML version that is easier to read, in whatever style helps you. It costs tokens, but makes omissions easier to spot.
- Don’t YOLO the answers. The demonstration accepted defaults for speed, which is probably how a phase Ryan couldn’t account for, an “airport pilot”, ended up in his spec.
Key terms
| Term | Meaning |
|---|---|
| Spec-driven development (SDD) | Writing and agreeing a specification before an agent writes code, and holding the agent to it |
| Specification (spec) | The contract for a change: behaviour, constraints, exclusions and how it will be proven |
| Definition of done | The agreed, checkable conditions that mean the work is finished |
| Acceptance criteria | Observable statements a test can prove, not qualities such as “quickly” |
| Human in the loop | A person verifying the work at each stage rather than leaving the agent to it |
| Validation gate | The human check after each stage of the AI-DLC |
| AI-DLC | The AI development lifecycle, a structured spec-driven workflow; Amadeus’s is built on AWS’s |
| Greenfield | Building something new, with no existing code |
| Brownfield | Adding to or changing an existing code base |
| Spec as source | The view that the spec, kept current, is the source of truth rather than the code |
| Vibe coding | Prompt-first back-and-forth with an agent, with the intent left implicit |
Resources mentioned
- The course repository, in the session 4 folder: on GitHub, which needs membership of the amadeus-nav organization, or its mirror in Azure DevOps. If you can reach neither, the code is under the downloads.
- Spec-driven frameworks and who to ask about them:
- The Amadeus AI-DLC, with its repository mirrored in Azure DevOps for anyone without access to Amadeus’s GitHub Enterprise — Matt Kimber and Ryan Lifferth
- The AWS AI-DLC
- Matt Pocock’s skills for real engineers — Matt Kimber
- Superpowers — Bryan Nokleby
- OpenSpec — Cameron Harp, who uses it daily
- GitHub Spec Kit
- The elephant-goldfish model, a new approach from Google
- Videos:
- Sculpt, not spec, with Scott Hanselman and Mark Russinovich
- Spec-driven development vs. waterfall: what’s different for AI coding?
- The spec-driven development course, from DeepLearning.AI and JetBrains
- What is a plethora?, from Three Amigos
- Reading and listening:
- Understanding spec-driven development: Kiro, spec-kit and Tessl, by Birgitta Böckeler
- What is spec-driven development?, a Thoughtworks podcast with Birgitta Böckeler and Laura Tacho