---
title: Before prompting AI to build an app: specify what must work
description: Create a small, shared spec for no-code and vibe coding, covering inputs, validation, calculation and checkable outcomes.
date: 2026-11-22
url: https://caminhosolo.com.br/en/2026/11/specification-before-ai-prompt/
tags: [specification, vibe-coding, no-code, software-tests, prompts]
---


“Build me a quote app” sounds clear until different tools interpret it differently. One may add taxes, another omit expenses, a third silently accept negative hours.

The best first move isn't a longer prompt. It's **defining the behavior you can observe**. A short specification lets you compare visual builders and AI generators against the same expectations.

> **In brief:** describe the job, inputs, invalid states, calculation and a correct outcome. The editor is a means; acceptance criteria are the reference.

## A task without imagined commercial proof

In this lab, a fictional solo provider enters an activity, estimated hours, hourly reference and additional expenses. The tool displays a subtotal.

This isn't pricing advice or evidence that any customer would pay. **It's an invented math exercise** with no real customer data or payment collection.

It's useful for learning because you can check the result independently of the technology.

## Define behavior explicitly

| Part | Rule |
| --- | --- |
| Activity | Optional descriptive text |
| Hours | 0–1,000, up to two decimal places |
| Hourly reference | BRL 0–1,000,000 |
| Expenses | BRL 0–1,000,000 |
| Formula | Hours × hourly reference, rounded to cents, plus expenses |
| Invalid input | Missing, negative or malformed numbers give no subtotal |
| Output | Itemized fictional total in BRL |
| Privacy | No automatic sending or saving inputs |

These instructions are more useful than “make a modern-looking smart calculator.”

## Five cases both builds must pass

1. **Ordinary:** 5 hours × R$ 80 + R$ 30 = **R$ 430**.
2. **Decimals:** 1.5 hours × R$ 39.90 + R$ 0.05 = **R$ 59.90**.
3. **Zero:** 0 × 0 + 0 = **R$ 0**, without inventing a minimum fee.
4. **Invalid:** missing values and negative hours never produce a subtotal.
5. **Editing:** when a value changes, don't keep displaying the old total as if it were confirmed.

Check how the tool handles commas, rounding and text in numeric fields. One successful example isn't enough.

## A file that travels with the reader

Read or save the [shared English specification](/downloads/no-code-vibe-spec.en.md); the [Portuguese version](/downloads/no-code-vibe-spec.pt.md) contains the same rules.

Both workshops use this exact contract. If a tool can't satisfy something, the comparison must say so.

## Ask AI to review the spec before building

> Review this fictional quote-calculator specification. Find ambiguities and edge cases without adding sign-ins, payment, APIs, customer storage, AI-powered formulas or commercial claims. Do not change acceptance criteria without explaining why.

Treat its reply as a proposal. Asking whether decimal commas are allowed is useful; changing the business model without explanation isn't.

## Workshop: an agreement with the outcome

Write a one-page specification for another task you understand. A nonprogrammer should be able to explain what success looks like; a developer should be able to turn it into tests.

If you cannot say how to verify the output, it's too early to delegate.

Next, follow the [no-code workshop](/en/2026/11/no-code-quote-calculator-workshop/), then give **the same spec** to an AI builder.

**References:** [Google Sheets — formulas](https://support.google.com/docs/answer/46977) and [OWASP — AI-generated code review](https://cheatsheetseries.owasp.org/cheatsheets/Secure_Coding_with_AI_Cheat_Sheet.html).

