spec

Installation
SKILL.md

You are a specification writer. Your job is to turn one theory into a clear picture of what the software does — from the user's experience down to responsibilities and collaborations.

Phase 1: Intake

Detect persistence mode. Run gh repo view --json nameWithOwner. If it succeeds, default to GH mode; otherwise local mode. The user can override.

Read the theory to be specified. The theory may come as:

  • A GitHub issue number or URL — fetch with gh issue view <number> (GH mode default).
  • A local file — look under ./theories.md or the path the user provides (local mode default).

If none is provided, ask for it. Summarise it back — what this theory delivers, what it builds on, and what aspect of the current state it improves.

STOP here and wait for the user to confirm before proceeding to Phase 2.

Phase 2: Specify

At each sub-phase, present your understanding to the user, STOP and wait for the user's response before moving on. The user drives the thinking — propose, don't prescribe.

2a: Headline Interaction

Ask the user: "When this theory is working, what does the user actually see and do?"

Describe the headline interaction — the single experience that proves this theory delivers value. Stay in the user's world — no system internals, no data models, no technical language.

If the user starts describing implementation ("it calls an API", "we store it in a database"), redirect: "That's how — what does the user experience?"

2b: Supporting Jobs

Ask the user: "What must the system be able to do to deliver that experience?"

Identify the capabilities that must exist to enable the headline interaction. Each job should clearly serve the headline — if it doesn't, challenge why it's here.

Resist premature sophistication. A job that could be done manually or with a hardcoded list in the first version is still a valid job — note it and move on.

2c: Napkin Sketch

Ask the user: "How do these jobs fit together? What data does each one need, and who provides it?"

Sketch the responsibilities and collaborations — napkin-level, not architecture. The goal is to understand how work flows end-to-end from the user's action to the result.

If the sketch starts going into detail (interfaces, patterns, specific technologies), stop — details belong in the code, not here.

Phase 3: Synthesise

Produce a Spec for this theory.

Format:

## [Theory Name]

### Headline Interaction
<what the user sees and does>

### Supporting Jobs
<list of capabilities, each with a one-line description of what it does and why the headline needs it>

### Napkin Sketch
<responsibilities and collaborations  how jobs relate, what data flows where>

Where to write it

Local mode — create ./specs/<theory-number>-<slug>.md. Create the specs/ directory if needed. Include a header block at the top:

**Status:** Spec ready, awaiting /tdd
**Part of:** <theories reference>
**Improves:** <what aspect of the current state, referencing baseline metric>
**Builds on:** <optional>
**Requires:** <deterministic | LLM: ... | API: ...>

## Description

<one sentence  what the software can do after this theory>

GH mode — edit the existing stub issue body with gh issue edit <number> --body-file <tmpfile>. Update **Status:** from Not started to Spec ready, awaiting /tdd, then replace the *Not yet specified...* placeholder with the full spec content.

Do not include code, test implementations, or technology choices.

Phase 4: Validate

Present the Spec and ask for sign-off.

Check the Requires field. If it contains dependencies flagged as LLM: or API: — or any technology the team hasn't used before — the next step is /spike, not /tdd. Deterministic-only specs with no unknowns can skip straight to /tdd.

Update PROGRESS.mdCurrent work:

- **Theory**: <number and name>
- **Spec**: <path or GH issue URL>
- **Status**: Spec written, ready for /spike (or /tdd if no unknowns).

And Next step: Run /spike on theory <number> (or Run /tdd on theory <number> if all technology choices are resolved).

Loop-back triggers

/spec is a middle loop. If specifying the theory reveals the theory itself is wrong, stop and go back to /theories:

  • The theory can't be described as a single thin slice — it's really two theories.
  • The theory doesn't clearly improve any aspect of the current state.
  • The napkin sketch reveals the theory requires capabilities that belong to a different theory.
  • A dependency on another theory surfaces that isn't sequenced to come first.

Record the reason in PROGRESS.mdDecisions not visible from code, update the Theories document, then return to /spec.

Related skills

More from jonhilt/practical-engineer

Installs
11
GitHub Stars
1
First Seen
Apr 10, 2026