project-architecture
Skill1 starsChanged 27 days agoMITView on GitHub
Decide where code lives and keep imports pointing the right way in the active folder architecture (classic, feature-based, Feature-Sliced Design, clean/hexagonal or atomic). Use when creating files, resolving `npm run arch:check` violations, choosing between layers, or switching architectures.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- BidingCC/BuildingAItheir own version, first seen Oct 8, 2026
- marwan562/agents-skillstheir own version, first seen Sep 19, 2026
- sebas8824/sdd-harnesstheir own version, first seen Aug 24, 2026
- Jithnkn/project-architecturetheir own version, first seen Aug 20, 2026
- extra-org/extratheir own version, first seen Jun 8, 2026
- fqmyysjjd/agent-feedtheir own version, first seen May 9, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- BidingCC/BuildingAI★ 1.9ksame name
- extra-org/extra★ 119same name
- Jithnkn/project-architecture★ 8same name
- marwan562/agents-skills★ 8same name
- fqmyysjjd/agent-feed★ 4same name
- sebas8824/sdd-harness★ 1same name
- thetruong1099/android-mvi-base-code★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/rtv-architecture.mdcCursor rule
- .cursor/rules/rtv-code-style.mdcCursor rule
- .cursor/rules/rtv-design-system.mdcCursor rule
- .cursor/rules/rtv-git-workflow.mdcCursor rule
- .cursor/rules/rtv-testing.mdcCursor rule
- accessibility-auditSkill
- ci-cd-dockerSkill
- clean-code-reviewSkill
- dependency-upgradeSkill
- deployment-insightsSkill
- react-componentSkill
- scaffold-featureSkill
- tailwind-design-systemSkill
- testing-vitestSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 53
Read the message: it names the importing layer, the imported layer and the allowed list.
- Very specific: line 57
Legitimate exception?: Add "from>to" to rules.allow in rtv.config.json with a comment in the PR explaining why.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Project architecture
The project's shape is declared in rtv.config.json (architecture, aliases, templates). The always-on rule .agent/rules/architecture.md is generated from it and lists the layers, their purposes, the aliases and the import rules. Read it first; then use this skill to make decisions.
1. Find out where things live
npm run arch -- current # layers, aliases, import rules of the active architecture
npm run arch -- list # the catalogue
cat rtv.config.json # architecture id, aliases, applied templates, rule exceptionsRole aliases exist in every architecture, so you can always reason in roles:
| I am adding… | Role / alias | Notes |
| A route-level screen | @pages | Default export, one h1, smoke test in __tests__/pages/ |
| Reusable UI without business meaning | @components | Named export, props-driven, no data access |
| Stateful logic or data access | @hooks | useX; the only place components get data from |
| API clients, storage, side effects | @services | Plain TS, no React |
| Pure helpers | @utils | No side effects |
| Shared types | @types | type/interface only |
| Constants, navigation, config | @const | |
| Images, fonts, svg | @assets | |
| Business capability (feature/fsd) | @features/<slice> | Public API through index.ts |
| Business entity (fsd) / domain model (clean) | @entities/<slice> / @domain | |
| Use cases and ports (clean) | @application | Depends only on @domain |
| Port implementations (clean) | @infrastructure | HTTP, storage, SDKs |
| Wiring, providers, router | @app (feature/fsd/clean) or src/App.tsx | The composition root may import anything |
2. Respect the dependency direction
Each layer declares what it may import; npm run arch:check scans every module under src/ and fails on violations. General shape:
- classic / atomic: pages → components → hooks → services → utils/const/types. Components never import services. Atomic adds atoms → molecules → organisms → templates inside
components/. - feature: app → pages → features → shared. Features import other features only via their public API (
@features/billing, never@features/billing/components/x). - fsd: app → pages → widgets → features → entities → shared. Slices on the same layer never import each other.
- clean: presentation / infrastructure → application → domain;
sharedis the kernel; only the composition root (src/app,main.tsx) imports infrastructure.
Inside a page or slice, import siblings with ./ or with the slice alias (@pages/Dashboard/data). Parent-relative imports (../) are an ESLint error everywhere in src/.
3. Fix a violation
Read the message: it names the importing layer, the imported layer and the allowed list.
- Wrong place? Move the module to the layer that matches its role (git mv, then fix imports).
- Upward dependency? Invert it: pass data via props, lift the call into a hook/page, or define a port (interface) in the lower layer and implement it higher up.
- Legitimate exception? Add
"from>to"torules.allowinrtv.config.jsonwith a comment in the PR explaining why. Keep the list short. - One-off: append
// rtv-ignoreto the import line (last resort; say why in a comment).
4. Switch architecture
npm run arch -- apply <id> --dry-run to preview, then without --dry-run. Role folders move (via git mv), aliases are rewritten in rtv.config.json and tsconfig.app.json, READMEs and this project's architecture rule regenerate. Afterwards: npm run typecheck (finds relative imports that crossed folders), npm run arch:check, then categorise code the new architecture expects (e.g. split into slices).
5. Extending the catalogue
Architectures are data in scripts/lib/architectures.mjs (roles, extra aliases, layers with mayImport, folders, principles). Add or adjust an entry, run npm run agent:sync and npm run test:run (the catalogue has integrity tests), and update docs/architecture.md is regenerated automatically.
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.

