Back/Engineering/Codex/GitHub Copilot
AdvancedEngineeringCodexGitHub Copilot

Implement Features Using Spec-First Development and an AI Coding Agent

Shift from writing implementation code to writing human-readable specifications. Write a detailed spec in a markdown file, and let an AI agent handle the entire process of coding, testing, and verification, using the spec as the single source of truth.

Implement Features Using Spec-First Development and an AI Coding Agent

Tools Used

Codex

OpenAI's cloud-based AI software engineering agent that can execute code, run tests, and handle complex multi-file tasks autonomously.

GitHub Copilot

AI pair programmer

02Step-by-Step Guide
1

Dictate or Write the Initial Idea

Use a tool like Whisper to perform a 'brain dump' and dictate the functionality of a new feature. This raw transcript serves as the source material for the spec.

2

Generate a Formal Spec Document

Feed the raw transcript to a language model like Codex, providing it with examples of existing specs from your library to learn the format. Prompt it to write a formal spec.

Prompt:
Here's our other like spec library. Learn the format, take my information, write a spec.
3

Commit the Spec to the Repo

After refining the AI-generated spec, check the final markdown file (e.g., feature_name.md) into a dedicated /agent-specs/ folder in your GitHub repository. This file is now the source of truth.

4

Trigger the Autonomous Build Agent

Point your coding agent at the new spec file in the repository and give it a simple command to start the implementation process.

Prompt:
Build it.
5

Agent Builds and Verifies Autonomously

The agent writes the required code and uses a detailed Verification section within the spec, along with a custom CLI tool, to continuously test its own work against the defined behavior.

6

Maintain and Update via the Spec

For any future updates or changes to the feature, modify the human-readable markdown spec file, not the code itself. The agent will then automatically update the implementation based on the revised spec.

Start shipping
better products.

Join 100,000+ product managers who use ChatPRD to write better docs, align teams faster, and build products users love.

Free to start
No credit card
SOC 2 certified
Enterprise ready
Implement Features Using Spec-First Development and an AI Coding Agent | AI Workflows