Skip to content

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 ​

TemplateUse when
slice-goal.mdStarting/resuming a slice, including unattended R1 closure
add-screen.mdAdding a new feature screen
add-mutation.mdAdding a new mutation hook
add-query.mdAdding a new query hook
refactor-shared.mdEditing shared code in @twomore/ui or @twomore/app
perf-investigation.mdInvestigating a performance issue

How to use ​

  1. Find the template that matches your task type
  2. Read it fully (including its verification steps)
  3. Copy its scaffold into your task plan
  4. Fill in the bracketed <placeholders> with concrete values
  5. Run the pre-implementation checks listed in the template
  6. Implement
  7. Run the post-implementation verification listed
  8. 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 @freshness JSDoc baked in
  • yarn new:mutation CreateRsvp → mutation hook with branded mutationKey
  • yarn new:screen --feature sessions --name EditPickup → feature screen using DetailShell + Tamagui-only styling
  • yarn 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.

Markdown remains the source of truth. Run yarn docs:check before handoff.