AI-Software-Engineering-Workflow-Template / rules
Cursor rule0 starsChanged 6 months agoMITView on GitHub
Architecture and module boundary rules
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,243 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/ai-coding-rules.mdcCursor rule
- .cursor/rules/project-rules.mdcCursor rule
- implementation-reportSkill
- launch-checkSkill
- mvp-scope-checkSkill
- plan-from-issueSkill
- review-artifactSkill
- scale-automation-reviewSkill
- validate-ideaSkill
- implementation-reportSkill
- launch-checkSkill
- mvp-scope-checkSkill
- plan-from-issueSkill
- review-artifactSkill
- scale-automation-reviewSkill
- validate-ideaSkill
The file
We split this architecture-rules.mdc into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
When modifying code, follow this decision process:
- Distinctive: line 35
Check if the file to modify belongs to that module.
- Distinctive: line 36
If the file belongs to another module → STOP, report, request confirmation.
- Distinctive: line 37
If you need cross-module access → only call the next layer's public interface.
- Distinctive: line 38
If unsure which module a file belongs to → STOP and ask.
- Distinctive: line 47
Update to the architecture document and decision log
≈ “Common” is an estimate: at least 1 in 5 of the 6,809 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: Architecture and module boundary rules globs: alwaysApply: true --- # Architecture Rules ## Layer Architecture ``` UI Layer → Logic Layer → Data Layer → Platform Adaptation Layer ``` - Upper layers may call lower layers through their public interfaces. - Lower layers MUST NOT call upper layers. - Cross-layer calls are PROHIBITED (e.g., UI directly calling Data layer). ## Module Boundaries Refer to `docs/05_module_boundaries.md` for the definitive module boundary definitions. ### Key Rules - Each module has a clear responsibility and file scope. - "What a module does NOT do" is as important as "what it does". - File ownership must be defined at the directory level. - AI must check file ownership before modifying any file. ## Boundary Check Process When modifying code, follow this decision process: 1. Determine which module the current task belongs to. 2. Check if the file to modify belongs to that module. 3. If the file belongs to another module → STOP, report, request confirmation. 4. If you need cross-module access → only call the next layer's public interface. 5. If unsure which module a file belongs to → STOP and ask. ## Architecture Constraints Architecture constraints defined in `docs/04_architecture.md` under "Key Constraints" and "Rules That Must Not Be Broken" MUST NOT be violated. Any change that would violate these constraints requires: 1. Documentation of the proposed violation 2. Human approval 3. Update to the architecture document and decision log
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

