Free resources
Guide8 min readChecked

Structured AI Coding: the starter kit

Answer a few questions before you prompt, and your AI coding tool stops guessing. Fewer rewrites, fewer wasted tokens, safer apps.

Structured AI Coding: the starter kit: a free guide from DevX Group LLC
What it does
Four short notes you write before the agent writes any code: requirements, a decision record, a product outline and a spec, with templates and a worked example.
Who it is for
People building apps with Claude Code, Codex, Cursor or any AI coding tool who are tired of rewrites.

The idea in one line

Write four short notes, in this order, before the agent writes any code.

  1. Requirements: who is it for, what must it do?
  2. ADR: why this choice?
  3. PRD: why build it?
  4. Spec: how exactly?

What is inside

PartWhat you get
1The 4-question requirements checklist, with a worked example (an invoice app)
2A one-page ADR template (architecture decision record)
3A one-page PRD outline
4Three free open-source repos that automate the rest, plus a safety block

Copy a part into a Markdown file in your project, fill it in, and paste it at the start of your first prompt. Ten minutes of answers now saves hours of prompts later.

Get the files

Everything on this page, ready to keep.

Download the starter kit (PDF, 5 pages)

Step 1: the 4-question requirements checklist

Put these at the top of requirements.md. Answer in plain words. If you do not know, write "unknown" and ask your agent to interview you.

Markdown
# Requirements

1. Who is it for, and what one problem do they have?
2. What must it do? List must-have, nice-to-have, and not now.
3. How will I know each item works? One check per item.
4. What are the limits? Data it handles, who may see it, deadline, tools you must use.
QuestionWorked example: a small invoice app
1. Who and what problem?Freelancers who invoice from spreadsheets and forget to chase late payments.
2. What must it do?Must: create an invoice, send it as PDF, mark paid. Nice: reminders. Not now: multiple currencies, team accounts.
3. How will I know?I can create and send an invoice in under 2 minutes. A paid invoice never shows as overdue.
4. Limits?Customer emails are private (only the owner sees them). Works on a phone. Launch in 4 weeks.

Tip: give your agent this prompt, then paste only the finished checklist into your first build prompt.

Copy and paste
Interview me one question at a time until you are confident, then turn my answers into this checklist.

Step 2: a one-page ADR template

An ADR (architecture decision record) is a half-page note about one big choice that is hard to undo: the database, the login method, the hosting. It stops the AI from changing its mind every session. Save it as docs/adr/0001-title.md and tell the agent: "Follow ADR 0001."

Markdown
# ADR 0001: [short title of the decision]
Status: proposed | accepted | replaced by ADR 000X
Date: YYYY-MM-DD

## Context
What problem forces a choice? What limits matter?

## Options
1. Option A
2. Option B
3. Option C

## Decision
We choose [option], because [one or two reasons].

## Consequences
Benefits: what gets easier.
Trade-offs: what gets harder, what we give up.
PartFilled example (invoice app)
ContextWe need to store invoices and customer emails, and keep each owner's data private.
Options(1) A hosted Postgres database with row-level rules. (2) A local file per user. (3) A document database.
DecisionHosted Postgres. Invoices are related records, and row-level rules keep each user's data apart.
ConsequencesBenefits: strong privacy rules, easy reports. Trade-offs: needs internet, a monthly cost after the free tier, and we must write the privacy rules carefully.

Step 3: a one-page PRD outline

A PRD (product requirements document) says what you are building and why, never how. One rule: write the problem, not the solution. Technical choices go in the spec.

  1. Problem and who has it. Two or three lines, plus one real piece of evidence: a quote, a number, a support message.
  2. What success looks like. One measurable line you can check after launch, like "A new user sends their first invoice in under 2 minutes."
  3. Must-have, nice-to-have. Copy these from your requirements checklist.
  4. What we will not build. Naming what is out stops scope from growing.
  5. Risks and open questions. What could go wrong? What do you still not know?

Step 4: three free repos and a safety block

RepoUse it for
addyosmani/agent-skills (MIT)The interview-me skill: your agent asks you questions one at a time to build the requirements checklist. Also has an ADR skill and a security skill.
adr/madrMADR: a short Markdown template for ADRs. The easiest one to copy.
Fission-AI/OpenSpec (MIT)Turns your idea into four plain Markdown files (proposal, specs, design, tasks) before any code. Build one task at a time.

Paste this security block into your spec:

Markdown
## Security rules
1. Secrets (keys, passwords) never go in code or in the repo.
2. The server checks every input. Never trust the browser.
3. Every user can only see their own data.
4. Put limits on every request that costs money or time.
5. Every task needs a passing test before it counts as done.
6. Ask the agent to list what it could not check.

This block helps you catch common mistakes. It does not make an app "secure"; keep testing and reviewing.