A2A Prompt Template
Use this prompt when continuing dual-mode UI work in SMO1 or applying pattern to other projects:Initial Brief (CLAUDE.md Context)
Project Context:TASKSET 5: Cat Mode & Terminology TASKSET 5 implements a personality switching system for the SMO1 link shortener dashboard. The system allows users to toggle between “cat mode” (playful) and “professional mode” (neutral) terminology throughout the UI. Definition of Done:
- Next.js 15 app (meow-web)
- Uses React 19 + shadcn/ui + Tailwind
- Two brand personalities: “cat mode” (playful) and “professional mode” (neutral)
- Default: cat mode ON
- UI state persists via localStorage
- Shared types via @smo1/types package
- Cat mode context (React Context + localStorage)
- Toggle in Settings → Appearance
- All terminology switches based on mode (at least 6 locations)
- Comprehensive tests (at least 18 tests)
- Build passes with zero errors
- No existing test failures introduced
Continuation Prompt (for next agent)
If picking up this work:I’m continuing SMO1 TASKSET 5: Cat Mode & Terminology implementation. Current State:Outstanding Work:
- CatModeProvider created and integrated into app root (providers.tsx)
- Toggle wired in Settings → Appearance page
- 6 components updated with dual-mode labels:
- ScoringChips (Pawprintz/Treatz/Niblz vs Activity/Efficiency/Compression)
- CatStatusBadge (Zoomies/Snoozies/Loaf vs Active/Resting/Dormant)
- Links search placeholder
- Analytics time range labels
- Dashboard stat cards
- Appearance settings label
- 18 tests passing across 3 test files
Next Steps to Validate:
- 5.6: Pagination terminology (blocked: no pagination UI component exists yet)
- Investigate if any other components need terminology switching
- Consider creating TERMINOLOGY.ts registry file for centralization
If Extending:
- Run
pnpm buildand confirm zero TypeScript errors- Run
pnpm test -- --runand confirm all tests pass- Visually verify both cat and professional mode in browser
- Check Settings → Appearance toggle works as expected
- Follow the terminology mapping pattern: extract label pairs into objects
- Always test both modes using renderWithCatMode() helper
- Update TERMINOLOGY.ts registry when adding new labels
- Add snapshot tests if component renders UI changes (not just text)
Troubleshooting Guide for Next Agent
Problem: TypeScript errors in new components Solution: Ensure component importsuseCatMode hook and checks mounted flag:
CatModeProvider wraps the entire app. In meow-web, it should be in src/components/providers.tsx.
Problem: Tests failing with “hook called outside provider” error
Solution: Use renderWithCatMode() helper which wraps component in provider automatically.
Problem: Hydration mismatch warnings in console
Solution: Component is rendering before mounted = true. Check that component returns null or skeleton while hydrating:
grep -r "Pawprintz" src/. This reveals all uses.
Related Files to Review
meow-web/src/contexts/cat-mode.tsx— Context implementationmeow-web/src/components/providers.tsx— Where provider is integratedmeow-web/src/app/settings/appearance/page.tsx— Toggle UImeow-web/src/__tests__/helpers/render-with-context.tsx— Test helpermeow-web/CLAUDE.md— Project-specific guidance
Validation Checklist
Before declaring TASKSET 5 complete:-
pnpm buildpasses with zero TypeScript errors -
pnpm test -- --runshows all tests passing - Manual testing: toggle cat mode ON → see “Pawprintz” + emojis
- Manual testing: toggle cat mode OFF → see “Activity” + no emojis
- localStorage: Toggle mode, reload page, mode persists
- SSR: No hydration mismatch warnings in Next.js dev server
- Coverage: Any new components have unit tests covering both modes
- Documentation: CLAUDE.md updated with cat mode architecture notes
A2A Integration Points
If orchestrating this via n8n or multi-agent workflow: Input:- Repository path (smo1-io/meow-web)
- Feature branch name
- Component list to update
- PR with all terminology mappings complete
- Test coverage report
- Build verification output
- Agent runs
pnpm buildto establish baseline - Agent identifies components that need terminology
- Agent implements terminology mapping helpers
- Agent adds tests for both modes
- Agent runs
pnpm test -- --runto validate - Agent creates commit with message: “feat(cat-mode): switch terminology in [components]”
- Agent opens PR with checklist
Lessons for Next Project
When implementing dual-mode UI elsewhere:- Use Context + localStorage from day 1 (not Redux, not prop drilling)
- Centralize terminology in a TERMINOLOGY.ts file (not scattered in components)
- Test both modes (don’t assume default mode is sufficient)
- Guard hydration with
mountedflag (critical for SSR apps) - Document the pattern in project CLAUDE.md (so next agent doesn’t reinvent)