LLM Instructions
This section contains all the instructions for AI coding assistants (LLMs) working with the Tonk codebase. The instructions are organized into shared common patterns and template-specific variations.
Organization
Shared Instructions
Common patterns and guidelines used across multiple templates:
- Keepsync - Data synchronization patterns
- React/Browser - Browser-based keepsync usage
- Worker/Node.js - Node.js-based keepsync usage
- Examples - Code examples for both environments
- Components - Component creation guidelines
- Stores - State management patterns
- Views - View creation guidelines
- Server - Server endpoint patterns
- Instructions - General instruction patterns
Template-Specific Instructions
Variations and specifics for different template types:
- React - React application templates
- Worker - Background worker templates
- Workspace - Full workspace templates
Usage
These instructions serve as the single source of truth for LLM guidance. They are automatically distributed to the appropriate template locations using the distribute-from-docs.js
utility.
Maintenance
When updating LLM instructions:
- Edit the appropriate file in this
docs/src/llms/
directory - Run
node utils/distribute-from-docs.js
to distribute changes - Changes will be automatically synced to all template locations
This ensures consistency across all AI coding tools (Claude, Cursor, Windsurf) and template types.