Build — will it ship?
Brief 143

Implement to Spec

The build loop. Takes the open acceptance criteria, asks the scope, then lands each one as a failing test, the least code to pass it, and a verified commit.

BUILDLOG.md4 phases4 lenses~3.0k chars

Free & open · no signup · read-only — it ends by asking · nothing leaves your machine

What it does

You are working inside this repo — a product repo with a ratified SPEC.md. Mission: turn open acceptance criteria into working code — test first, one AC per verified commit, the gate green after every step.

This is a Build brief: it writes code, but only inside the scope the operator picks at the Phase 2 gate.

What it looks for

4 lenses it looks through

Phase 2 sweeps the codebase through every one of these, citing file and line for each finding.

1

Dependency order

which ACs must land first: schemas before consumers, interfaces before implementations

2

The pinning test

for each AC, the smallest failing test that would prove it, named test_ac_<n>_...

3

Blast radius

the files each AC touches; flag overlaps that force sequencing

4

Ambiguity

ACs you cannot test as written go back to 142 as spec questions, never into improvised code

The deliverable

What lands in your repo

One structured report at the repo root — or in reports/, if you keep one — the same shape every time, ready for a teammate — or the optional Studio — to act on.

BUILDLOG.md
1
Session
date · branch · scope agreed · gate state at start and end
2
Built
AC · commit · the test that proves it
3
Skipped
AC · why: ambiguous, blocked, or bigger than specced
4
Spec questions
what goes back to 142
One file. Evidence-backed. It ends by asking before touching anything.
How it works

What it makes the agent do

Every Goal Prompt follows the same four steps, so results are consistent and repeatable — no matter which one you run.

1
Phase 1

Load the contract

Read SPEC.md.

2
Phase 2

Plan, then ask the scope

Triage the open ACs.

3
Phase 3

The loop

For each AC in the agreed scope, on a branch build/<date>.

4
Phase 4

Report

Append to BUILDLOG.md at repo root.

Get started

Three ways to run this Goal Prompt

01 · COPY

Paste it in

Copy it and paste it into your agent inside the repo you want checked.

02 · INSTALL

As a slash command

Install the goal plugin once — two commands — then just type /goal:implement-to-spec.

1/plugin marketplace add GhostlyGawd/goal-prompts
2/plugin install goal@goal-prompts

Or install only this Goal Prompt as /goal-implement-to-spec:

curl -fsSL https://goal-prompts.vercel.app/install | BRIEF=143 sh
03 · AGENT

From an agent (MCP)

Let an agent fetch it mid-conversation, or pull the raw Goal Prompt by URL.

https://goal-prompts.vercel.app/raw/143.md
Transparency

The exact prompt

Nothing hidden — this is the whole Goal Prompt, verbatim. Read it in a minute, edit it, or copy it as-is.

Read the full brief (2,976 characters)
# Goal: Implement to Spec

You are working inside this repo — a product repo with a ratified `SPEC.md`. Mission: turn open acceptance criteria into working code — test first, one AC per verified commit, the gate green after every step.

This is a Build brief: it writes code, but only inside the scope the operator picks at the Phase 2 gate.

## Phase 1 — Load the contract
- Read `SPEC.md`; list every AC and its status. Read `BUILDLOG.md` for what earlier sessions built and skipped.
- Run `scripts/check`. It must be green before you build; a red start means fix that first or stop — never build on red.
- Read `DECISIONS.md` — past choices bind this session.

## Phase 2 — Plan, then ask the scope
Triage the open ACs:
1. **Dependency order** — which ACs must land first: schemas before consumers, interfaces before implementations
2. **The pinning test** — for each AC, the smallest failing test that would prove it, named `test_ac_<n>_...`
3. **Blast radius** — the files each AC touches; flag overlaps that force sequencing
4. **Ambiguity** — ACs you cannot test as written go back to 142 as spec questions, never into improvised code

Show the numbered build plan. Then stop. Report only — end by asking the scope: all open ACs, the next N in order, or a named set.

## Phase 3 — The loop
For each AC in the agreed scope, on a branch `build/<date>`:
1. Write the failing test for AC-n; run `scripts/check`; watch it fail for the stated reason.
2. Write the least code that passes; run `scripts/check`; green means commit `feat(AC-n): <criterion>`.
3. Red after your change? Fix or revert before touching the next AC — the PostToolUse hook holds you to this.
4. Update the AC's `status:` in `SPEC.md` in the same commit.

Never edit the harness layer (`scripts/`, `.githooks/`, `.github/`, `.claude/`, `tests/harness/`). If the gate itself seems wrong, stop and report — that fix belongs to the operator.

## Phase 4 — Report
Append to `BUILDLOG.md` at repo root:
1. **Session** — date · branch · scope agreed · gate state at start and end
2. **Built** — AC · commit · the test that proves it
3. **Skipped** — AC · why: ambiguous, blocked, or bigger than specced
4. **Spec questions** — what goes back to 142

If `BUILDLOG.md` already exists from previous sessions, append below the last entry — the log is history, and history never gets rewritten.

## Rules
- No test, no code: every AC lands as a failing test first
- The agreed scope is the whole job — nothing outside it gets built, fixed, or refactored in passing
- A new dependency requires a `DECISIONS.md` entry in the same commit; the gate checks for it
- No `SPEC.md` at this root? Say so in a one-paragraph null report and stop — run 141 and 142 first.
- If a `reports/` directory exists at the repo root, write the report there instead of the root.
- Before asking, present the top findings as a ranked list in plain words
- Report only — end by asking the scope at the Phase 2 gate before writing any code

House rules for this Goal Prompt

  • No test, no code: every AC lands as a failing test first
  • The agreed scope is the whole job — nothing outside it gets built, fixed, or refactored in passing
  • A new dependency requires a DECISIONS.md entry in the same commit; the gate checks for it
  • No SPEC.md at this root? Say so in a one-paragraph null report and stop — run 141 and 142 first.
  • If a reports/ directory exists at the repo root, write the report there instead of the root.
  • Before asking, present the top findings as a ranked list in plain words
  • Report only — end by asking the scope at the Phase 2 gate before writing any code
Keep exploring

Pairs well with

Curated neighbors — briefs that answer the adjacent question, worth running in the same session.

More Build briefs

Runs inside these playbooks — curated sequences you can launch with one paste: