Agent prompt templates
Curated prompt scaffolds for common agent tasks on TwoMore. Each template:
- States the task in agent-friendly language
- Names exact files in scope and out of scope
- Lists pre-implementation checks (grep, blast-radius)
- Lists post-implementation verification commands
- References AGENTS.md hard constraints
Use these instead of writing prompts from scratch — they encode lessons from drift incidents.
Templates
| Template | Use when |
|---|---|
slice-goal.md | Starting/resuming a slice, including unattended R1 closure |
add-screen.md | Adding a new feature screen |
add-mutation.md | Adding a new mutation hook |
add-query.md | Adding a new query hook |
refactor-shared.md | Editing shared code in @twomore/ui or @twomore/app |
perf-investigation.md | Investigating a performance issue |
How to use
- Find the template that matches your task type
- Read it fully (including its verification steps)
- Copy its scaffold into your task plan
- Fill in the bracketed
<placeholders>with concrete values - Run the pre-implementation checks listed in the template
- Implement
- Run the post-implementation verification listed
- Report results matching the template's "what to report" section
If your task does not fit a feature-specific template, start with slice-goal.md. If the slice prompt still cannot name one primary artifact, allowed scope, blocked scope, acceptance proof, and stop rules, ask for a split before implementation.
Code generators (P5)
For the four most common file kinds, prefer the Hygen generator over hand-writing scaffolding. The output is guaranteed to pass yarn lint:strict and yarn typecheck:
yarn new:hook ClubRecentMembers→ query hook with@freshnessJSDoc baked inyarn new:mutation CreateRsvp→ mutation hook with brandedmutationKeyyarn new:screen --feature sessions --name EditPickup→ feature screen usingDetailShell+ Tamagui-only stylingyarn new:store AdminOnboarding→ Zustand persist store with the four-part contract
After generating, fill in the TODO(<kebab>) markers with the actual implementation. The structural compliance is already there — your job is the body.
Full generator docs: _templates/README.md.