⚠️ Spelling: It's saurun: (with U), not "sauron"
React Implementer Subagent Prompt Template
Overview
A fill-in prompt template for dispatching React implementer subagents. Ensures every subagent gets complete context, follows TDD, self-reviews, and reports consistently.
Core principle: The subagent should never need to read the plan file or guess context — everything it needs is in the prompt.
When to Use
- Dispatching a subagent for a React frontend implementation task from a plan
- Breaking an implementation plan into parallelizable units of work
- Any React frontend task requiring TDD, self-review, and structured reporting
When NOT to Use
- Backend-only tasks (use
saurun:dotnet-implementer-prompt)
- One-off questions or investigations (just ask directly)
- Tasks with no implementation (e.g., pure documentation, plan writing)
Common Mistakes
- Not pasting full task text — writing "see task 3 in plan" instead of pasting the actual spec. The subagent cannot read plan files.
- Vague context — saying "you know the project" instead of specifying component names, store shape, and existing patterns.
- Forgetting working directory — subagent starts in wrong directory, wastes cycles figuring out project structure.
- Saying "mock the store" — violates
react-tdd mock boundary rule. Subagent must use real Zustand stores with MSW for API boundaries.
- Not specifying expected test failures — if you know what the RED step should look like, tell the subagent so it can verify.
- Omitting dependencies between tasks — not mentioning that Task 2 depends on types introduced in Task 1.
Template
The following shows the prompt structure to pass to the Task tool when dispatching a subagent:
Task tool (saurun:frontend-implementer):
description: "Implement Task N: [task name]"
prompt: |
You are implementing Task N: [task name]
## Task Description
[FULL TEXT of task from plan - paste it here, don't make subagent read file]
## Context
[Scene-setting: where this fits, dependencies, architectural context]
## Before You Begin
If you have questions about:
- The requirements or acceptance criteria
- The approach or implementation strategy
- Dependencies or assumptions
- Anything unclear in the task description
**Ask them now.** Raise any concerns before starting work.
## Your Job
Once you're clear on requirements:
1. Implement exactly what the task specifies
2. **REQUIRED SUB-SKILL:** Follow saurun:react-tdd strictly. No exceptions.
3. **REQUIRED SUB-SKILL:** Follow saurun:react-tailwind-v4-components for all styling.
4. Verify implementation works: `npx vitest run`
5. Commit after each green test cycle
6. Self-review (see below)
7. Report back
Work from: [directory]
**Stack:** React 19 + Vite + TypeScript + Tailwind v4 + Zustand + Vitest + RTL + MSW
**While you work:** If you encounter something unexpected or unclear, **ask questions**.
It's always OK to pause and clarify. Don't guess or make assumptions.
## TDD Workflow
**REQUIRED SUB-SKILL:** Follow saurun:react-tdd for the full Red-Green-Refactor cycle. No shortcuts, no skipping steps.
## Before Reporting Back: Self-Review
Review your work with fresh eyes. Ask yourself:
**Completeness:**
- Did I fully implement everything in the spec?
- Did I miss any requirements?
- Are there edge cases I didn't handle?
**Quality:**
- Is this my best work?
- Are names clear and accurate?
- Is the code clean and maintainable?
**Discipline:**
- Did I avoid overbuilding (YAGNI)?
- Did I only build what was requested?
- Did I follow existing patterns in the codebase?
**Testing:**
- Did I follow TDD? (test first, watch fail, minimal code, watch pass, refactor)
- Would each test catch a real bug? If not, delete it.
- Did I use real Zustand stores (not mocked)?
- Did I use MSW for API boundaries?
- **REFERENCE:** See saurun:react-tdd for complete test quality criteria.
**Tailwind v4:**
- Did I use parentheses for CSS variables: `bg-(--var)` not `bg-[--var]`?
- Did I use v4 utility names: `shadow-sm` not `shadow`, `rounded-sm` not `rounded`?
- Did I use `cn()` from project utils (typically `lib/utils.ts` in shadcn/ui projects) for class merging?
If you find issues during self-review, fix them now before reporting.
## Report Format
When done, report:
- What you implemented
- What you tested and test results
- Files changed
- Self-review findings (if any)
- Any issues or concerns
1---2name: react-implementer-prompt3description: Use when dispatching a React frontend subagent from an implementation plan with React 19, Vitest/RTL/MSW, Zustand, and Tailwind v44---5
6> ⚠️ **Spelling:** It's `saurun:` (with U), not "sauron"
7
8# React Implementer Subagent Prompt Template
9
10## Overview
11
12A fill-in prompt template for dispatching React implementer subagents. Ensures every subagent gets complete context, follows TDD, self-reviews, and reports consistently.
13
14**Core principle:** The subagent should never need to read the plan file or guess context — everything it needs is in the prompt.
15
16## When to Use
17
18- Dispatching a subagent for a React frontend implementation task from a plan
19- Breaking an implementation plan into parallelizable units of work
20- Any React frontend task requiring TDD, self-review, and structured reporting
21
22## When NOT to Use
23
24- Backend-only tasks (use `saurun:dotnet-implementer-prompt`)
25- One-off questions or investigations (just ask directly)
26- Tasks with no implementation (e.g., pure documentation, plan writing)
27
28## Common Mistakes
29
30- **Not pasting full task text** — writing "see task 3 in plan" instead of pasting the actual spec. The subagent cannot read plan files.
31- **Vague context** — saying "you know the project" instead of specifying component names, store shape, and existing patterns.
32- **Forgetting working directory** — subagent starts in wrong directory, wastes cycles figuring out project structure.
33- **Saying "mock the store"** — violates `react-tdd` mock boundary rule. Subagent must use real Zustand stores with MSW for API boundaries.
34- **Not specifying expected test failures** — if you know what the RED step should look like, tell the subagent so it can verify.
35- **Omitting dependencies between tasks** — not mentioning that Task 2 depends on types introduced in Task 1.
36
37## Template
38
39The following shows the prompt structure to pass to the Task tool when dispatching a subagent:
40
41```
42Task tool (saurun:frontend-implementer):
43 description: "Implement Task N: [task name]"
44 prompt: |
45 You are implementing Task N: [task name]
46
47 ## Task Description
48
49 [FULL TEXT of task from plan - paste it here, don't make subagent read file]
50
51 ## Context
52
53 [Scene-setting: where this fits, dependencies, architectural context]
54
55 ## Before You Begin
56
57 If you have questions about:
58 - The requirements or acceptance criteria
59 - The approach or implementation strategy
60 - Dependencies or assumptions
61 - Anything unclear in the task description
62
63 **Ask them now.** Raise any concerns before starting work.
64
65 ## Your Job
66
67 Once you're clear on requirements:
68 1. Implement exactly what the task specifies
69 2. **REQUIRED SUB-SKILL:** Follow saurun:react-tdd strictly. No exceptions.
70 3. **REQUIRED SUB-SKILL:** Follow saurun:react-tailwind-v4-components for all styling.
71 4. Verify implementation works: `npx vitest run`
72 5. Commit after each green test cycle
73 6. Self-review (see below)
74 7. Report back
75
76 Work from: [directory]
77
78 **Stack:** React 19 + Vite + TypeScript + Tailwind v4 + Zustand + Vitest + RTL + MSW
79
80 **While you work:** If you encounter something unexpected or unclear, **ask questions**.
81 It's always OK to pause and clarify. Don't guess or make assumptions.
82
83 ## TDD Workflow
84
85 **REQUIRED SUB-SKILL:** Follow saurun:react-tdd for the full Red-Green-Refactor cycle. No shortcuts, no skipping steps.
86
87 ## Before Reporting Back: Self-Review
88
89 Review your work with fresh eyes. Ask yourself:
90
91 **Completeness:**
92 - Did I fully implement everything in the spec?
93 - Did I miss any requirements?
94 - Are there edge cases I didn't handle?
95
96 **Quality:**
97 - Is this my best work?
98 - Are names clear and accurate?
99 - Is the code clean and maintainable?
100
101 **Discipline:**
102 - Did I avoid overbuilding (YAGNI)?
103 - Did I only build what was requested?
104 - Did I follow existing patterns in the codebase?
105
106 **Testing:**
107 - Did I follow TDD? (test first, watch fail, minimal code, watch pass, refactor)
108 - Would each test catch a real bug? If not, delete it.
109 - Did I use real Zustand stores (not mocked)?
110 - Did I use MSW for API boundaries?
111 - **REFERENCE:** See saurun:react-tdd for complete test quality criteria.
112
113 **Tailwind v4:**
114 - Did I use parentheses for CSS variables: `bg-(--var)` not `bg-[--var]`?
115 - Did I use v4 utility names: `shadow-sm` not `shadow`, `rounded-sm` not `rounded`?
116 - Did I use `cn()` from project utils (typically `lib/utils.ts` in shadcn/ui projects) for class merging?
117
118 If you find issues during self-review, fix them now before reporting.
119
120 ## Report Format
121
122 When done, report:
123 - What you implemented
124 - What you tested and test results
125 - Files changed
126 - Self-review findings (if any)
127 - Any issues or concerns
128```