and compile new “source-of-truth” rules.
- All new rules must live in
./agent-rules/as Markdown files
with the same front-matter structure shown here. - After a rule is added or changed, the agent must run
./translate_rules.tsto regenerate provider-specific rule files automatically. - Agents must never write or edit provider-specific rule files directly (e.g. “Cursor” rules); they are generated exclusively by the translation script.
- Create every new rule as a Markdown file inside
./agent-rules/. - Name the file in kebab-case, summarising its intent
(e.g.rate-limit-handling.md).
Each rule must begin with YAML front-matter exactly like this:
---
description: |
One-sentence summary of the rule’s purpose.
alwaysApply: false # or true, if the rule should always run
cursor:
retrieval-strategy: always
---You can control which providers process each rule by adding these optional fields:
---
description: |
One-sentence summary of the rule's purpose.
alwaysApply: false
# Only generate this rule for specific providers (comma-separated)
_includeOnlyForProviders: cursor,cline
# OR exclude this rule from specific providers (comma-separated)
_excludeForProviders: claude
cursor:
retrieval-strategy: always
---Provider filtering rules:
_includeOnlyForProviders: If specified, only the listed providers will process this rule_excludeForProviders: The listed providers will skip processing this rule- If both are specified,
_includeOnlyForProviderstakes precedence - These fields are automatically removed from generated output files
- Provider names should match the built-in provider IDs:
cursor,cline,claude,copilot
After saving or modifying a rule inside this ./agent-rules folder:
npm run translate_rulesThe script converts all Markdown rules in ./agent-rules/ into the
provider-specific formats expected by each agent type.
- Do not author, edit, or commit rule files that live inside provider
folders (e.g.
./.cursor/rules/,./.clinerules/). - Treat those files as generated artifacts; regenerate them via the translation script whenever the source-of-truth rule changes.
# Create the source-of-truth rule
touch ./agent-rules/context-window.md
# (Add front-matter and content as described)
npm run translate_rules # Regenerates provider files# Directly editing a Cursor-specific rule
vim ./cursor-rules/context-window.rule
# → Forbidden: this file will be overwritten by the translation scriptFollowing this meta-rule keeps every provider in sync and preserves a single, human-readable source of truth for all agent behaviour.
- Routes go in
/site/app/routes - All prototype‑specific code (components, hooks, logic, utilities) lives in
/site/app/prototypes/[prototype-slug]
// File: /site/app/routes/my-prototype.tsx
import { MyComponent } from "/site/app/prototypes/[prototype-slug]/MyComponent";
export default function MyPrototypeRoute() {
return <MyComponent />;
}
}// File: /site/app/prototypes/[prototype-slug]/MyComponent.tsx
export function MyComponent() {
return <div>My prototype component</div>;
}// File: /site/app/routes/my-prototype.tsx
// DON'T put component logic directly in the route file
export default function MyPrototypeRoute() {
function MyComponent() {
return <div>My prototype component</div>;
}
return <MyComponent />;
}// File: /site/app/components/MyPrototypeComponent.tsx
// DON'T place prototype‑specific components in the shared components directory
export function MyPrototypeComponent() {
return <div>My prototype component</div>;
}