PTENES
MODULE 1.6 β€” FINAL

🏁 Module 1.6 β€” Complete Workflow

From idea to merged PR. Weaves all of Matt Pocock’s skills into a single, repeatable cycle: setup β†’ grill β†’ PRD β†’ issues β†’ triage β†’ TDD β†’ review β†’ merge.

8
Stages
~45
Minutes
Advanced
Level
Practice
Type
1

βš™οΈ Initial setup: /setup-matt-pocock-skills

Before running any other skill, the repository needs to be configured once. O /setup-matt-pocock-skills interviews you about three points and records the decisions in version-controlled filesβ€”every other skill reads this context to behave the right way.

🎯 What setup decides

  • β€’ Issue tracker: GitHub Issues, Linear, or a local folder issues/ in markdown. It defines where /to-prd e /to-issues will write.
  • β€’ Label vocabulary: the roles of the /triage (needs-triage, ready-for-afk, blocked, etc.) become real labels in the tracker.
  • β€’ Doc layout: where it lives CONTEXT.md, where the ADRs go, and how the /grill-with-docs should update them.

πŸ’» Typical skill prompts

$ /setup-matt-pocock-skills

β†’ Qual issue tracker este repo usa?
   [1] GitHub Issues  [2] Linear  [3] Local (issues/*.md)

β†’ Onde fica a documentaΓ§Γ£o viva?
   docs/CONTEXT.md (default)  ou caminho customizado

β†’ Pasta de ADRs?
   docs/adr/ (default)

βœ“ Gravado em .claude/skills-config.json
βœ“ Stub de docs/CONTEXT.md criado
βœ“ Labels recomendadas listadas (rode `gh label create ...`)

πŸ’‘ Practical tip

Run /setup-matt-pocock-skills once per repo, right after cloning. Commit the .claude/skills-config.json and of the CONTEXT.md β€” that way, everyone on the team inherits the same workflow.

CONCEPT 1
Setup is per repo, not global
CONCEPT 2
Decisions become version-controlled files
CONCEPT 3
Enables the other skills
CONCEPT 4
Run it once, not all the time
2

πŸ”₯ Step 1 β€” Grilling (alignment)

Every new feature starts with the /grill-with-docs. It questions your idea against the existing domain: the vocabulary of CONTEXT.md, previous ADRs, known constraints. The output isn’t codeβ€”it’s alignment.

πŸ“ What comes out of grilling

  • β€’ CONTEXT.md updated: new domain terms, resolved ambiguities, refined scope.
  • β€’ New ADRs: architectural decisions that came up during grilling become files in docs/adr/.
  • β€’ Conversation saved: the transcript is available to the /to-prd use as input.

🚫 DO NOT skip this step

Skipping grilling is the #1 mistake people make when starting with the skills. Without alignment, you generate PRDs based on wrong assumptions β€” and the cascade turns into rework. 15 minutes of grilling save 3 hours of refactoring.

CONCEPT 1
Grilling always comes first
CONCEPT 2
Output is alignment, not code
CONCEPT 3
Updates CONTEXT.md inline
CONCEPT 4
Generates ADRs when it makes decisions
3

πŸ“„ Step 2 β€” /to-prd (synthesize)

With the grilling conversation fresh, /to-prd synthesizes everything into a PRD and creates an issue in the tracker. Note: there’s no new interview β€” the skill uses the current session context + CONTEXT.md.

🧠 Why no new interview

Asking everything again would be a wasteβ€”the agent has already seen the discussion. The skill extracts, don't collection. This changes the kind of relationship you have with the agent: each skill is a node in a pipeline, not an isolated conversation.

  • 67% fewer redundant questions compared with PRDs created from scratch
  • Context preserved: terms, constraints, and ADRs are already in the narrative

πŸ“‹ Generated PRD (example)

# PRD: ImportaΓ§Γ£o CSV de leads

## Problema
Time comercial cola CSV no Slack; ninguΓ©m importa.
~40 leads/semana perdidos.

## SoluΓ§Γ£o proposta
Endpoint POST /leads/import aceita CSV multipart.
Valida colunas obrigatΓ³rias (email, nome, fonte).
Deduplica por email. Retorna relatΓ³rio.

## Fora de escopo
- UI de upload (vem em PRD futuro)
- Enriquecimento de dados

## CritΓ©rios de aceite
- [ ] CSV vΓ‘lido importa em <5s para 1000 linhas
- [ ] Linhas invΓ‘lidas retornam no response, nΓ£o 500
- [ ] Idempotente: re-upload nΓ£o duplica

## DecisΓ΅es herdadas
ADR-012: validaΓ§Γ£o via Zod (nΓ£o Yup).
ADR-019: jobs >2s vΓ£o pra fila, nΓ£o inline.
CONCEPT 1
Synthesize, don’t interview
CONCEPT 2
Create an issue in the tracker
CONCEPT 3
Cites inherited ADRs
CONCEPT 4
Define β€œout of scope”
4

πŸ”ͺ Step 3 β€” /to-issues (slice)

A PRD isn’t executable. /to-issues breaks the PRD into vertical slices β€” each slice is an independent issue that delivers visible value on its own.

βœ“ Vertical slices (DO)

  • βœ“ "Accept a CSV upload and return the row count" β€” testable end to end
  • βœ“ "Validate required columns with a 400 error" β€” delivers visible behavior
  • βœ“ "Deduplicate by email on insert" β€” can be merged on its own
  • βœ“ Each one has an acceptance criterion in the PR

βœ— Isolated technical tasks (AVOID)

  • βœ— "Create Zod schema" β€” delivers nothing on its own
  • βœ— "Add csv-parse dependency" β€” invisible
  • βœ— "Refactor leads service" β€” mergeable?? What for?
  • βœ— "Endpoint setup with no logic" β€” empty PR

πŸ’‘ Practical tip

Test each slice with the question: "If I merge just this one, will someone use it tomorrow?" If the answer is "no, the others need to come along," the slice is horizontal β€” break it down again.

CONCEPT 1
Vertical, not horizontal
CONCEPT 2
Each slice can be merged on its own
CONCEPT 3
Acceptance criteria per issue
CONCEPT 4
Test: β€œwould someone use this tomorrow?”
5

🚦 Step 4 β€” /triage (prioritize)

Fresh issues arrive with the label needs-triage. O /triage moves them one at a time roles state machine β€” each state describes where the issue is in the pipeline and who can act.

1

needs-triage

Initial state β€” just came from /to-issues

No one has reviewed it yet. It may be poorly split, duplicated, or out of priority. Blocks execution.

2

needs-discussion

There’s ambiguity that /grill didn’t resolve

Requires synchronous conversation with a human. Return to grilling if needed.

3

ready-for-human

Ready, but needs a senior dev

There’s architectural nuanceβ€”the agent alone isn’t enough. A human takes over.

4

ready-for-afk

The agent runs on its own while you go to lunch

Crystal-clear acceptance criteria, short scope, low risk. /tdd works things out while you're away.

5

blocked

Depends on something external

Third-party API, product decision, another unmerged issue. Back to the queue when unblocked.

6

in-progress β†’ done

Terminal states of the cycle

PR opened β†’ in progress. PR merged β†’ done. Issue closes automatically via β€œCloses #N”.

CONCEPT 1
Each issue has a role
CONCEPT 2
Roles are actual labels in the tracker
CONCEPT 3
ready-for-afk = TDD candidate
CONCEPT 4
States transition; they don’t accumulate
6

πŸ§ͺ Step 5 β€” Implementation with /tdd

Pick an issue ready-for-afk, opens a branch, runs /tdd. The skill runs the classic loop red β†’ green β†’ refactor guided by the issue’s acceptance criteria.

πŸ”„ The loop by slice

  • RED Write a failing test. Acceptance criterion #1 becomes the first test. Run it β€” red.
  • GREEN Implement the minimum needed to pass. Nothing more. Run it β€” green.
  • REFACTOR Clean up the code without changing behavior. Tests stay green. The next criterion becomes the next RED.

πŸ’‘ Practical tip

If the /tdd try to skip RED ("I'll just implement it and test afterward"), stop. RED first, always. Without the test failing first, you don’t know if it’s worth anything.

CONCEPT 1
Branch per issue
CONCEPT 2
RED β†’ GREEN β†’ REFACTOR
CONCEPT 3
Acceptance criteria = tests
CONCEPT 4
No RED, no skip
7

πŸ‘€ Step 6 β€” Review and merge

Green branch, time for the PR. Use /verify (run the app for real and see it working) or code-review (static diff review). Addressed comments, merge.

βœ“ Checklist before merging

  • βœ“Tests pass in CI
  • βœ“All issue acceptance criteria passing
  • βœ“/verify showed real behavior
  • βœ“code-review with no high-severity findings
  • βœ“PR description mentions β€œCloses #N”

βœ— Don't merge if

  • βœ—"Local tests pass but CI is slow, ship it anyway"
  • βœ—Acceptance criterion #3 was left for another PR
  • βœ—Diff includes files unrelated to the issue
  • βœ—Behavior changed without being updated CONTEXT.md
  • βœ—PR without an issue link (β€œCloses”)

πŸ“Š /verify vs code-review

  • /verify: runs the app, performs the actual action, and proves it works end to end. Use when the slice changes visible behavior.
  • code-review: static diff analysis, looks for subtle bugs and edge cases. Always use it β€” cheap and fast.
  • Both: for critical features. Low cost, high signal.
CONCEPT 1
/verify proves it works
CONCEPT 2
code-review catches subtle bugs
CONCEPT 3
"Closes #N" closes automatically
CONCEPT 4
Merge changes the status to done
8

πŸ—ΊοΈ Overview β€” the complete cycle

Putting it all together: the cycle feeds itself β€” the next grilling already starts with a CONTEXT.md more mature, with new ADRs and vocabulary refined by the previous feature.

πŸ”€ Workflow diagram

  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  /setup-matt-pocock-skills  (uma vez por repo)        β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  /grill-with-docs           CONTEXT.md + ADRs        β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  /to-prd                    issue com PRD             β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  /to-issues                 N vertical slices         β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  /triage                    role por issue            β”‚
  β”‚     needs-triage β†’ ready-for-afk / ready-for-human       β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  /tdd                       red β†’ green β†’ refactor    β”‚
  β”‚     (uma branch por issue)                               β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  /verify + code-review     PR review                 β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β–Ό
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  merge                      issue β†’ done              β”‚
  β”‚  CONTEXT.md atualizado pelo prΓ³ximo /grill              β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                           └───── volta pro /grill-with-docs ─────┐
                                  (prΓ³xima feature)               β”‚
                                                                  β–Ό
                                                          (ciclo se repete)

♻️ The cycle feeds itself

Each iteration leaves the CONTEXT.md denser, the ADRs more complete, and the domain vocabulary more precise. Grilling #10 is faster and deeper than grilling #1 β€” because the agent already understands your domain. This is the real combination of Matt Pocock's skills.

CONCEPT 1
8 steps, 1 cycle
CONCEPT 2
CONTEXT.md as a living artifact
CONCEPT 3
Each iteration leaves the repo better
CONCEPT 4
Composite, non-linear

πŸŽ“ Course conclusion

You’ve completed Track 1. Let’s review the 4 problems that opened the courseβ€”and how each skill handles one piece.

1.
"The agent forgets everything between sessions" β†’ CONTEXT.md + /grill-with-docs provide versioned, refinable memory.
2.
"Ambiguous specifications turn into incorrect code" β†’ Grilling before the PRD catches ambiguity at the source; /to-prd synthesizes with clear scope.
3.
"Large tasks never get finished" β†’ /to-issues in vertical slices makes each piece independently mergeable.
4.
"You can't trust what the agent delivers" β†’ /tdd + /verify + code-review form the three pillars of trust: tests that prove, execution that demonstrates, and review that questions.

πŸš€ Next steps

  • β†’ Practice on a real project. Choose one of your repos, run /setup-matt-pocock-skills, and use the workflow on a small feature (1–2 slices). Don’t try to apply everything at once on a large project.
  • β†’ Iterate on CONTEXT.md. Reread after each merged feature. Add what you learned. It’s your greatest asset.
  • β†’ Share with the team. The workflow only works if more people use itβ€”everyone reading the same CONTEXT.md, everyone following the same roles in /triage.

πŸ”— Useful links