Requirements clarification and review engineering workflow

Document type
Field manual
Updated
Reading time
11 min

mattpocock/skills setup guide: install skills, configure your repo, and use PRDs, vertical issues, TDD and reviews, with prompts and a login example.

SourceOpen original report
Document details
mattpocock/skills
stars
112.9K
forks
9.9K
Data as of

mattpocock/skills is Matt Pocock's open-source engineering skill set for AI agents. The repo describes its approach as real engineering, distinct from vibe coding. Its small, composable, modifiable skills divide development into stages: clarify requirements with grill-with-docs, create a PRD with to-prd, split vertical slices with to-issues, implement with tdd, then finish with review, diagnose and improve-codebase-architecture. This manual covers installation and setup, the skill inventory, recommended workflows, prompt templates and a complete login implementation example.

Official engineering skills
10
Minimum configuration
6
Core workflow stages
5
One-command installation
npx

01Overview

AI engineering workflow constraints

mattpocock/skills is a set of engineering workflows for AI agents that takes a feature from requirements clarification to release. It covers PRDs, issue breakdown, TDD implementation, review, diagnose and architecture cleanup; it is not provided as a single prompt. The repo describes its approach as real engineering, distinct from vibe coding, with small, composable and modifiable agent skills.

Each skill corresponds to an engineering action and provides instructions for that action:

  • /grill-with-docs challenges requirements and aligns domain language.

  • /to-prd combines conversation context and codebase understanding into a PRD.

  • /to-issues splits a PRD into independently implementable vertical slices.

  • /tdd implements through red-green-refactor.

  • /review checks a diff along the Standards and Spec axes.

Skills connect through the repo's issue tracker and domain docs; setup configures these locations first.

Skill design follows clarification, planning, implementation and review in order. The official README also says agents accelerate software entropy, so use /zoom-out and /improve-codebase-architecture periodically to examine system design.

  1. grill-with-docs

  2. to-prd

  3. to-issues

  4. tdd

  5. review

  6. diagnose

Treat it as a constraint layer for AI engineering workflows, not a prompt library. The correct order is: clarify requirements → write a PRD → split into vertical issues → implement with TDD → review → diagnose / architecture cleanup.

— mattpocock/skills usage principles · Translated from Chinese

02Installation and setup

Skill installation and repo setup

The official quickstart installs with one npx command. Choose your coding agent and select /setup-matt-pocock-skills.

bash
# Official quickstart
npx skills@latest add mattpocock/skills

After installation, run the setup skill once in your coding agent. It configures the repo's issue tracker, triage labels and domain docs locations for /to-prd, /to-issues, /tdd, /diagnose and other skills.

bash
/setup-matt-pocock-skills

Initial setup rules

Specify the issue tracker, triage labels and domain doc layout together during setup, giving later skills fixed read/write locations.

bash
/setup-matt-pocock-skills
This repo uses GitHub Issues.
Use these triage labels:
- needs-triage
- needs-info
- ready-for-agent
- ready-for-human
- wontfix
Use a single-context domain doc layout:
- CONTEXT.md at repo root
- ADRs in docs/adr/

03Skill inventory

Skills and engineering actions

The official reference lists 10 engineering skills:

  • diagnose

  • grill-with-docs

  • triage

  • improve-codebase-architecture

  • setup-matt-pocock-skills

  • tdd

  • to-issues

  • to-prd

  • zoom-out

  • prototype

The cards also include /review and /handoff, which are commonly used in workflows, grouped by work stage. The five core skills grill-with-docs, to-prd, to-issues, tdd and review can complete a workflow cycle.

Setup · 01

/setup-matt-pocock-skills

repo configuration

The skill configures the issue tracker, triage labels and domain docs locations for downstream skills. Run it first after installation.

Clarify · 02

/grill-with-docs

Requirements clarification

Before starting a feature, the skill challenges requirements, aligns domain language and checks existing code and documentation. It asks one question at a time and updates CONTEXT.md.

Plan · 03

/to-prd

PRD creation

The skill combines the current conversation and codebase understanding into a PRD with problem, solution, user stories, implementation/testing decisions and out of scope. It does not interview the user again.

Plan · 04

/to-issues

Vertical slice breakdown

The skill splits a PRD into independently implementable, demoable end-to-end slices (tracer bullets), marked AFK / HITL with dependency order. It does not create isolated schema/API/UI layer tasks.

Build · 05

/tdd

TDD implementation

The skill uses red-green-refactor to test observable behavior through public interfaces, excluding implementation details. It works on one behavior at a time in a vertical loop.

Debug · 06

/diagnose

Systematic debugging

The skill establishes feedback loop → reproduce → minimise → hypothesise → instrument → fix → regression test. It creates a reproducible pass/fail signal before fixing.

Review · 07

/review

Branch review

The skill compares the diff against a fixed point along the Standards and Spec axes. It reports blocking, non-blocking, missing tests and spec mismatch.

Understand · 08

/zoom-out

System overview

The skill clarifies a piece of code's role in the overall system, for an initial overview when taking over an unfamiliar codebase.

Architecture · 09

/improve-codebase-architecture

Architecture cleanup

The skill identifies shallow module interfaces, exposed complexity and maintenance problems caused by software entropy accumulated through rapid agent coding.

Handoff · 10

/handoff

Task handoff

Before interrupting a long task, the skill produces a handoff doc for the next agent and preserves task context.

Triage · 11

/triage

Issue classification

This official engineering skill classifies incoming issues using the triage labels configured during setup.

Prototype · 12

/prototype

Prototype exploration

This official engineering skill creates and validates disposable prototypes to explore directions before entering the formal PRD process.

Scenarios and skills

ScenarioAvoidRecommended use
Vague requirementsAsking the agent to start immediately/grill-with-docs
Large featureAsking the agent to finish everything at once/to-prd → /to-issues → /tdd for each issue
BugAsking the agent to fix it immediately/diagnose to establish a repro loop first
TestsAsking the agent to increase coverage/tdd for observable behavior
ReviewAsking the agent "Check if anything is wrong"/review main with a fixed point
Disorganized architectureAsking the agent to refactor all/zoom-out → /improve-codebase-architecture

04Recommended workflows

Three scenarios and three workflows

A. New feature planning

Set up repo rules, then use grill-with-docs to clarify requirements and write them to CONTEXT.md / ADR. Use to-prd to create a PRD and to-issues to split thin vertical slices. Implement each issue with tdd, then compare against the main branch with review main.

bash
/setup-matt-pocock-skills
/grill-with-docs
/to-prd
/to-issues
/tdd
/review main

B. Bug fixes

Use diagnose to establish a reproducible feedback loop, then tdd to add a regression test and fix the bug. Finish with review main to check existing behavior.

Diagnosis sequence: feedback loop → reproduce → minimise → hypothesise → instrument → fix → regression-test. Establish an automatically runnable pass/fail signal before fixing, to avoid guessing at the bug.

bash
/diagnose
/tdd
/review main

C. Architecture cleanup

For codebases disorganized by rapid agent coding, start with zoom-out for a system overview, then use improve-codebase-architecture to identify shallow interfaces and exposed complexity. Verify changes with tdd and finish with review main. The official README says agents accelerate software entropy, requiring periodic attention to system design.

bash
/zoom-out
/improve-codebase-architecture
/tdd
/review main

05Prompt templates

Reusable prompts by stage

Paste the templates for each stage and replace the bracketed content. /grill-with-docs asks the agent to pose one question at a time, recommend an answer for each and inspect the codebase when needed; the agent reads code for answers available in the codebase.

text
/grill-with-docs
I want to build [feature name].
Current goal:
[Describe what you want to do in 3-5 sentences]
Known constraints:
- [Technical constraints]
- [Product constraints]
- [Parts that must not change]
Please challenge the plan against the existing codebase, domain language, and ADRs.
Ask one question at a time.
For every question, provide your recommended answer.
If the answer can be found in the codebase, inspect the code instead of asking me.

/to-prd combines current conversation context and codebase understanding into a PRD without interviewing the user again. The PRD covers:

  • problem

  • solution

  • user stories

  • implementation decisions

  • testing decisions

  • out of scope

bash
/to-prd
Create a PRD from the current conversation and codebase context.
Requirements:
- Do not add features we did not discuss.
- Use existing domain language from CONTEXT.md.
- Prefer existing test seams.
- Include user stories, implementation decisions, testing decisions, out-of-scope items.
- Publish it to the configured issue tracker.
bash
/to-issues
Break this PRD into independently implementable vertical slices.
Rules:
- Prefer many thin slices over few thick slices.
- Each slice must be demoable or verifiable on its own.
- Mark each slice as AFK or HITL.
- Show dependencies between slices.
- Use acceptance criteria.
- Do not create horizontal tasks like "build API", "build UI", "write tests"
  unless they are part of a complete vertical slice.

/tdd tests observable behavior through public interfaces, not implementation details. It uses a vertical red-green loop, completing one test and its implementation at a time instead of writing all tests before implementation.

bash
/tdd
Implement issue #[issue-number] using strict TDD.
Rules:
- One behavior at a time.
- Write one failing test first.
- Implement only enough code to pass that test.
- Tests must verify public behavior, not implementation details.
- Do not mock internal collaborators unless unavoidable.
- After green, refactor only when tests pass.
- Run typecheck, lint, and tests before finishing.
text
/diagnose
Bug:
[Describe the bug]
Observed behavior:
[What actually happens]
Expected behavior:
[What should happen]
Reproduction:
[Steps, command, URL, test, log]
Constraints:
- Do not guess before building a feedback loop.
- Create the smallest deterministic repro possible.
- Add a regression test after fixing.

/review compares the diff against a fixed point along the Standards and Spec axes, using issue references, PRD/spec, repo coding standards, CONTEXT, ADR and config as evidence.

bash
/review main
Review this branch against main.
Check two axes:
1. Standards: does the code follow this repo's documented standards?
2. Spec: does the implementation match the originating issue / PRD?
Report:
- Blocking issues
- Non-blocking issues
- Missing tests
- Spec mismatch
- Suggested fixes

06Implementation example

Login feature clarification and PR workflow

This email/password login example starts with /grill-with-docs, uses /to-prd and /to-issues for planning and breakdown, implements the first issue with /tdd, and finishes with /review main.

~/projects/app · mattpocock/skills


$ You › /grill-with-docs
  I want to add email/password login to this app.
  Known requirements:
  - Users can sign in with email and password.
  - Invalid credentials should show a safe generic error.
  - Successful login redirects to dashboard.
  - Reuse existing auth/session code if available.
  - Do not add OAuth in this scope.
  Ask one question at a time. Recommend an answer for each.


# [inspects src/auth/* before asking, reuses existing session layer]
claude: Claude ›
  hl: Q1 / Does the existing session use a cookie or token?(I found that src/auth/session.ts
       hl: already uses an httpOnly cookie; I recommend keeping it without adding a separate token path)
  …After clarifying four questions, write the terminology and decisions to CONTEXT.md


$ You › /to-prd
  Use existing auth terminology from CONTEXT.md.
  Out of scope: OAuth, password reset, email verification.


# [synthesises PRD from conversation + codebase · publishes to issue tracker]
ok: PRD: problem / solution / user stories / testing decisions / out-of-scope


$ You › /to-issues
  Break the login PRD into vertical slices.
  Each must include behavior, acceptance criteria, dependency order.


claude: Claude ›
  #123 Login form happy path        AFK  Valid credentials → redirect to dashboard
  #124 Invalid credentials handling AFK  Invalid credentials → generic error
  #125 Session persistence check    AFK  Stay signed in after a refresh
  #126 Auth copy / UX review        HITL Human review of error messages and UX


$ You › /tdd
  Implement issue #123 using strict red-green-refactor.
  Start with the highest-level test seam available.
  Do not implement invalid credential handling yet.


# [RED] one failing test: valid creds → redirect dashboard
# [GREEN] minimal code to pass · [REFACTOR] tests still green
ok: typecheck ✓  lint ✓  tests ✓


$ You › /review main
  Does this match #123? Are tests behavior-based?
  Did we implement any out-of-scope auth features?


# [compares diff against main · Standards + Spec]
ok: Spec: matches #123 · no OAuth / reset leaked in
hl: Non-blocking: error copy awaits #126 HITL review

        

Workflow verification

  • grill-with-docs reads src/auth/* before asking questions, finding answers already available in the codebase.

  • to-issues splits login into independently demoable vertical slices, marked AFK and HITL.

  • tdd implements one behavior at a time and does not implement #124 error handling in advance.

  • review uses the Spec axis to confirm no out-of-scope OAuth functionality was added.

07Usage rules and minimum configuration

Six skills for a minimum configuration

Minimum viable configuration

These 6 skills complete an engineering workflow cycle. Add /diagnose for repos needing more debugging; add /zoom-out, /improve-codebase-architecture and /handoff for large codebases.

bash
/setup-matt-pocock-skills
/grill-with-docs
/to-prd
/to-issues
/tdd
/review

# Add for repos with frequent Debug work
/diagnose

# Add for a large codebase
/zoom-out  /improve-codebase-architecture  /handoff

Treat it as a constraint layer for AI engineering workflows, not a prompt library. Clarify requirements → write a PRD → split into vertical issues → implement with TDD → review → diagnose / architecture cleanup.

— mattpocock/skills · Usage order · Translated from Chinese