/**
* Project Architecture Guidelines
*
* This file defines the core architectural rules and patterns
* for AI assistance in this project.
*/
export const ARCHITECTURE_RULES = {
components: {
type: 'functional-only',
framework: 'custom-jsx',
typescript: true,
pattern: `
import { jsx } from "@/lib/template";
import { Component } from "../Component";
export const ExampleComponent = Component({
effect?: () => {
// Optional: Side effects (subscriptions, etc)
eventBus.subscribe("eventName", (payload: EventPayload) => {
// Handle event
});
},
render: (props) => {
return <div>{/* content */}</div>;
}
});
`
},
eventHandling: {
pattern: 'declarative',
implementation: {
trigger: 'data-trigger',
event: 'data-event',
effect: 'data-effect',
topic: 'data-topic'
},
example: `
<button
data-trigger="click"
data-event="eventName"
data-effect="effectName"
data-topic="topicName"
>
Action
</button>
`
},
aiGuidelines: {
changeManagement: [
'Make minimal, targeted changes',
'Prefer small, precise updates over large refactors',
'Break large changes into smaller steps'
],
decisionMaking: [
'Remember you are agentic, and you can search the code base for information. ALWAYS search the code deeply before making assumptions.',
'Never make assumptions about implementation',
'Ask clarifying questions when context is missing',
'Base decisions on concrete evidence only',
'State limitations explicitly when unsure'
],
codeQuality: [
'Maintain consistent TypeScript types',
'Follow existing patterns',
'Document non-obvious logic',
'Consider performance implications'
],
contextRequirements: [
'Request file structure when needed',
'Verify dependencies before suggesting solutions',
'Understand event bus architecture'
],
errorHandling: [
'Consider all error cases',
'Implement appropriate type checking',
'Provide meaningful error messages',
'Handle edge cases appropriately'
]
}
};
css
html
javascript
rust
typescript
First Time Repository
TypeScript
Languages:
CSS: 139.6KB
HTML: 0.3KB
JavaScript: 0.3KB
Rust: 0.7KB
TypeScript: 665.7KB
Created: 11/23/2024
Updated: 1/4/2025