---
name: prototype-first
description: Use when deciding what to build first, when about to add config, flags, an abstraction layer, error handling for undescribed cases, or tests beyond the TDD, or when deciding whether the prototype is done
title: prototype-first
canonical_url: https://skilld.dev/gh/heffrey/hordev/prototype-first
last_updated: 2026-09-24T12:29:46.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> If the user asked to install this Skill, run `npx skilld install heffrey/hordev/prototype-first`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/prototype-first`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/heffrey/hordev/prototype-first) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/prototype-first`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/prototype-first --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/prototype-first --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Prototype-First

A prototype is the thinnest end-to-end path a human can execute and judge.
The test: can the user run it, feed it real input, and see real behavior? If you
are describing what it would do instead of what it does, you are not yet a
prototype.

## Ordering: Build the Risky Slice First

Start with the load-bearing, uncertain, or architecturally risky piece. This is
what the prototype exists to falsify. Comfortable, well-understood work waits.

**Right order**: Does this language model API work as described? Build the API
call, test it on real input, prove the behavior. Then build UI around it.

**Wrong order**: Design a config system, build abstraction layers, then wire up
the model call on day three and discover the API does not work that way.

## What to Defer Explicitly

Record each deferral in `assumption-ledger`. Do not omit it silently.

- **Error handling beyond the happy path.** Handle the main success case.
  Graceful failures for edge cases come later.
- **Configurability and settings.** Hardcode values. Change them when the
  prototype proves what should vary.
- **Performance work.** Prototype for correctness. Optimize after you know it
  matters.
- **Abstraction layers for future cases.** Do not build for cases nobody has yet.
  Generalize when a second case arrives.
- **Input validation and sanitization.** Validate enough to avoid crashes in the
  happy path. Exhaustive validation is hardening work.
- **Logging, observability, telemetry.** Add these when you need them to debug
  or understand the prototype.

## What Is Never Deferred

Do not fake behavior and present it as working. Do not stub something the user
will read as real.

- **Data flow must be real.** If the prototype claims to save data, it must save
  data. If it claims to fetch from a service, it must fetch from a service.
- **User-visible output must be honest.** Do not mock results that should be
  computed.
- **Dependencies must resolve truthfully.** If the prototype depends on an
  external system, it must call that system. Do not replace it with a stub
  during prototype phase.

## Drift Detection

These are signals you have left prototype mode. Stop and recenter.

| Signal | Corrective Action |
|--------|-------------------|
| You are writing a config system or adding command-line flags. | Remove it. Hardcode the value. `assumption-ledger` records the decision. |
| You are refactoring for elegance or symmetry before proving the core works. | Halt refactoring. Prove the core first. Elegance comes in hardening. |
| You are designing for a case that nobody has written yet. | Delete the abstraction layer. Write it when you have a second case to generalize from. |
| You are adding the second or third abstraction layer. | You are over-designing. Walk back to a single layer or none. |
| You are gold-plating a passing test (adding assertions, coverage, edge case branches). | Stop. The test passes. Move on. Hardening comes later. |
| You are implementing error handling paths nobody has described as necessary. | Remove them. Handle errors in the happy path only. Add more when you see them fail. |
| Your code review checklist grows faster than your feature list. | Your checklist is for hardening, not prototyping. Pare it back. |

## Knowing When the Prototype is Done

A prototype is done when it has answered one of these questions:

1. **Does the spec hold?** The prototype either proves the spec works or falsifies
   it. If falsified, loop back to `rapid-spec` with evidence. If it holds,
   graduate to hardening.
2. **What is the real load-bearing risk?** You may have built the wrong thing.
   The prototype showed you. Now you know what to build next.
3. **What will users actually do with this?** The prototype is running in user
   hands (or a user's mental model). Their behavior contradicts or confirms the
   spec. Adjust and repeat, or move to hardening.

Do not leave prototype mode because the code is beautiful or the test suite is
comprehensive. Leave it because you have evidence.

## Interaction with `writing-tdds`

Thin does not mean untested. Tests come first even in prototype mode; there are
just fewer of them.

Write tests for the risky, load-bearing slice. Write tests for the happy path.
Do not write tests for error handling paths you have deferred, or for edge
cases you have not hit.

If your test suite is growing faster than your feature set, you are hardening,
not prototyping. Redirect tests to the critical path.

## Corrective Question

**Are we building to learn or to ship?** If the answer is "learn," you are in
prototype mode. Stay thin. Record assumptions.

If the answer is "ship," the prototype has done its job and hordev is the wrong
tool for what comes next. Hardening is well-understood work against a spec you
now trust — exactly the case where structure beats speed. Hand the branch over
and say so plainly. Do not let a prototype drift into production by accretion.

## Battle cry

"Me not that kind of orc!" — when the ask has drifted into hardening and hordev
is the wrong tool. Say the line, then hand the branch over plainly.

Once, at that moment — not every message, and never two messages running. Full
rules in `using-hordev` § Voice: conversational output only, never in artifacts,
never on bad news.
