This directory contains all AI agent instructions, feature planning templates, and documentation for the personal_web project.
.github/
βββ copilot-instructions.md # Main agent instructions (general guidance)
βββ agents/ # Specialized agent prompts
β βββ copilot-frontend.md # Frontend-specific instructions
β βββ copilot-trpc.md # Backend/tRPC-specific instructions
βββ plans/ # Feature planning (before implementation)
β βββ TEMPLATE.md # Planning template
β βββ README.md # Planning workflow guide
βββ documentation/ # Feature docs (after completion)
βββ TEMPLATE.md # Documentation template
βββ README.md # Documentation guide
- General project guidance and architecture overview
- Critical rules (dev server, security, logging)
- Cross-cutting concerns
- Task workflow and delegation
- Delegates to specialized agents for domain-specific work
Specialized in:
- React components and hooks
- CSS Modules and styling
- Audio integration (
useAudioManager) - Animations and responsive design
- Storybook development
- Client-side logic
Specialized in:
- tRPC router development
- Prisma database operations
- Zod input validation
- Authentication & authorization
- Error handling (TRPCError)
- Query optimization
| Task Type | Use Agent | Location |
|---|---|---|
| UI components, styling, animations | Frontend Agent | agents/copilot-frontend.md |
| API routes, database, validation | Backend Agent | agents/copilot-trpc.md |
| Architecture, planning, general guidance | Main Agent | copilot-instructions.md |
| Full-stack features | Both agents | Coordinate between both |
NEVER add dependencies without explicit user approval.
Before any npm install:
- Check if existing packages solve the problem
- Explore vanilla solutions
- If truly needed, request approval with:
- Package name & version
- Justification and alternatives
- Security audit (npm, maintenance, bundle size)
- Supply chain risk assessment
- Wait for "yes" before installing
Minimize console output:
- β No
console.log()orconsole.debug()in production β οΈ Onlyconsole.error()for critical issues- β Use proper TypeScript error handling instead
Create planning document in .github/plans/:
# Copy template
cp .github/plans/TEMPLATE.md .github/plans/feature-name-plan.md
# Fill out:
# - Objective and user story
# - Technical approach
# - Implementation steps
# - Security considerations
# - Performance considerations
# - Testing strategyPlan Format:
- Clear objectives
- File paths and architecture decisions
- Security and performance notes
- Dependency approval (if needed)
- Step-by-step implementation guide
Follow specialized agent guidelines:
- Frontend:
agents/copilot-frontend.md - Backend:
agents/copilot-trpc.md
Development checklist:
- TypeScript compiles (
npm run compile) - Audio integration (frontend)
- Input validation (backend)
- Error handling
- Responsive design (frontend)
- No console.log statements
- No unauthorized dependencies
Create completion doc in .github/documentation/:
# Copy template
cp .github/documentation/TEMPLATE.md .github/documentation/feature-name-complete.md
# Document:
# - What was built
# - Files changed
# - API endpoints (if backend)
# - Usage examples
# - Testing results
# - Known limitationsDocumentation Format:
- Summary of implementation
- File changes and architecture
- API documentation with examples
- Component usage patterns
- Testing completed
- Future enhancements
Before marking any work complete:
- TypeScript compiles without errors (
npm run compile) - ESLint passes (
npm run lint) - No console.log statements remain
- No unauthorized dependencies added
- Feature verified in browser/dev environment
- Audio feedback on interactive elements
- Responsive design verified (β€768px and >768px in browser)
- Storybook story created (major components)
- CSS follows module pattern
- No console errors in browser
- Input validation with Zod schemas
- Proper TRPCError codes used
- Authentication/authorization checks
- Database queries optimized
- API endpoints verified (browser devtools/Postman)
- Planning document in
.github/plans/ - Completion doc in
.github/documentation/ - Inline comments for complex logic
- JSDoc for exported functions
Location: .github/plans/TEMPLATE.md
Use for: Planning new features before implementation
Key sections:
- Objective and user story
- Technical approach and architecture
- Implementation steps (detailed roadmap)
- Testing strategy
- Security considerations
- Performance considerations
- Success criteria
Location: .github/documentation/TEMPLATE.md
Use for: Documenting completed features
Key sections:
- Summary and what was built
- Files changed (created/modified)
- API endpoints with usage examples
- Component usage examples
- Testing completed
- Known limitations
- Future enhancements
- Create plan in
.github/plans/[feature]-plan.md - Implement following specialized agent guidelines
- Test thoroughly (compilation, functionality, responsiveness)
- Document in
.github/documentation/[feature]-complete.md - Verify pre-completion checklist
- Investigate root cause
- Implement fix following conventions
- Test fix doesn't break other features
- Update existing documentation if architecture changed
- Plan what's being refactored and why
- Make changes incrementally
- Ensure no behavior changes
- Update relevant documentation
- Card-based navigation with manual DOM animations
- Desktop: Complex slide/scale animations (250px gap, 0.78 factor)
- Mobile: Responsive grid layout (β€768px breakpoint)
- Four sections: home, misc, gallery, credits
- Global pooling system via
useAudioManager - Pre-creates 3
HTMLAudioElementper sound type - Volume integration via
VolumeContext - 13 sound types for different interactions
- Frontend: Next.js 15, React 18, CSS Modules, Framer Motion
- Backend: tRPC v11, Prisma v6, Zod v4
- Database: PostgreSQL (Neon serverless)
- Auth: Stack Auth (@stackframe/stack)
- Testing: Storybook for component development
- Main README:
../README.md(project overview and setup) - Package Info:
../package.json(dependencies and scripts) - Prisma Schema:
../prisma/schema.prisma(database models)
When working with AI agents:
- Always specify which agent should handle the task
- Provide context from relevant instruction files
- Ensure agents create proper documentation
- Review agent suggestions for security concerns
- Verify no unauthorized dependencies are added
Remember: Good planning and documentation make development faster and safer. Always create plans before implementation and documentation after completion.
Last Updated: 2025-10-22