Files
thrillwiki_django_no_react/.clinerules/frontend-integration-prompts.md

2.4 KiB

Brief overview

Guidelines for creating comprehensive frontend integration prompts after any backend changes that affect the frontend API. These rules ensure frontend developers have all necessary information to implement changes without requiring code samples or extensive back-and-forth communication.

Mandatory prompt creation

  • MUST create a frontend integration prompt after every backend change that affects API endpoints, parameters, or data structures
  • Prompt files should be saved in the docs/ directory with descriptive names ending in "-llm-prompt.md"
  • Never assume frontend developers have access to backend code or can infer implementation details

Prompt content requirements

  • Include complete API endpoint information with all parameters and their types
  • Document all mandatory API rules (trailing slashes, HTTP methods, authentication requirements)
  • Provide comprehensive parameter lists organized by logical categories
  • Explain data relationships and hierarchies that affect frontend implementation
  • Include error handling requirements and expected response formats

Information organization

  • Start with project context and high-level objectives
  • Group related parameters and concepts into logical sections
  • Use clear headings and bullet points for easy scanning
  • Avoid code samples but include detailed technical specifications
  • Document both required and optional parameters with clear descriptions

Frontend-specific considerations

  • Include TypeScript integration requirements and type safety guidelines
  • Document state management patterns and URL synchronization needs
  • Provide user experience recommendations for complex filtering interfaces
  • Explain performance optimization strategies relevant to the changes
  • Include testing considerations and validation requirements

Backend compatibility notes

  • Always confirm which features are fully supported vs planned
  • Document any database schema changes that affect API behavior
  • Explain data source patterns (real database queries vs static lists)
  • Include information about caching, pagination, and response metadata

Documentation maintenance

  • Update existing frontend documentation files when creating new prompts
  • Ensure consistency between lib-api.ts, types-api.ts, and frontend.md files
  • Reference related documentation files and their current status
  • Include version information or timestamps when relevant for tracking changes