boundaries
Skill2 starsChanged 5 months agoApache-2.0View on GitHub
Respect the PHAX four-layer architecture (cli → app → domain ← ports ← infra) when adding or moving code.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- cpuboundeng/SexSkillstheir own version, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- cpuboundeng/SexSkills★ 4same 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 repository16 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- cli-view-layerSkill
- effect-servicesSkill
- find-docsSkill
- infrastructure-adaptersSkill
- model-routingSkill
- observabilitySkill
- phax-cliSkill
- phax-decide-planSkill
- phax-decide-reviewSkill
- phax-decide-specSkill
- phax-planningSkill
- phax-reviewSkill
- phax-specSkill
- state-machinesSkill
- validation-boundariesSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
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 46
If the import skips layers (e.g., cli → infra), introduce or use the appropriate port and let Effect's dependency injection wire it.
- Very specific: line 48
If app/ is importing a concrete adapter, replace with a port interface and inject the adapter at the composition root (cli/main.ts).
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill 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
Architectural boundaries
The four-layer rule
cli/ → app/ → domain/ ports/
↑
infra/Each layer may only import from layers to its right (or below):
| Layer | May import from |
cli/ | app/, domain/, ports/ |
app/ | domain/, ports/ |
domain/ | nothing inside src/ (only effect, std libs) |
infra/ | ports/, domain/, platform adapters |
cli/ must not import infra/ directly. CLI commands call use cases in app/
and receive results through the output port; they never construct or call
infrastructure adapters themselves.
app/ must not import infra/ directly. App use cases receive ports as Effect Services (dependency injection). They never instantiate adapters.
domain/ must not import cli/, app/, or infra/. The domain is the only layer that is pure and safe to test without any adapter.
Why
Violating these boundaries couples layers that change for different reasons. A CLI flag change should never require touching domain logic. An infrastructure adapter swap (e.g., different git backend) should never require touching application logic.
How to fix a boundary violation
- Identify which layer the importing file belongs to.
- Identify which layer the imported file belongs to.
- If the import skips layers (e.g., cli → infra), introduce or use the appropriate port and let Effect's dependency injection wire it.
- If
app/is importing a concrete adapter, replace with a port interface and inject the adapter at the composition root (cli/main.ts).
Audit rule
PHAX_BOUNDARY_001 — cli → infra import detected.
PHAX_BOUNDARY_002 — domain → cli/app/infra import detected.
PHAX_BOUNDARY_003 — app → concrete infra import detected.
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.

