rule.generated — Claude Code rule: domain review marker
The rule.generated rule requires adding the comment // Team reviewed domain change above every newly declared exported function in src/domain/. It tracks which domain changes have passed team review.
MIT ★ 571 updated 2026-10-29
.cursor/rules/rule.generated.mdcWhat rule.generated does
rule.generated integrates with your IDE to enforce review documentation when you add new domain functions. It targets files matching src/domain/**/*.ts and leaves existing code untouched—it only checks new exports.
Setup varies by platform: Claude Code uses .claude/rules/, Cursor uses .cursor/rules/, GitHub Copilot uses .github/instructions/. Once installed, the rule applies automatically to matching files in your project.
What it helps with
- track which domain functions have been reviewed by the team
- enforce review documentation for newly exported domain functions
- standardize review markers across domain code
Example prompts for the agent
- Add a new function to
src/domain/user/profile.tswith the review comment above it - Write an exported function in the domain layer and see the IDE prompt for the review marker
- Check
src/domain/**/*.tsfor review comments before merging
How to install rule.generated
Manually: put the files in place
.cursor/rules/rule.generated.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/rule.generated.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/rule.generated.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/rule.generated.mdManually: put the files in place
.clinerules/rule.generated.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about rule.generated
How do I install rule.generated in Claude Code?
Create or update the file .claude/rules/rule.generated.md at the project root with the rule's content. Claude Code will pick it up automatically and apply it to files matching src/domain/**/*.ts.
What does rule.generated do?
It reminds developers to add the comment // Team reviewed domain change above each new exported function in the domain folder, marking it as reviewed.
Does the rule apply to existing functions?
No. The rule only requires the comment for new functions. The alwaysApply: false setting means existing code is left unchanged.
Source text
rule.generated.mdc · MIT
--- description: "Domain review marker" globs: "src/domain/**/*.ts" alwaysApply: false --- # Domain review - Place the exact comment `// Team reviewed domain change` immediately above every newly declared exported function. - Do not change existing functions. <!-- aidd_rule_output:path=.cursor/rules/01-standards/1-domain-review.mdc sha256=291fd162e4a873d82c275c40a69dc5825657ab4841071743dbaa5bc9e331b9e5 -->
© ai-driven-dev · MIT · ai-driven-dev/framework