architecture
Skill0 starsChanged 4 months agoApache-2.0View on GitHub
The Swift Institute's organization and layering — the three realized layers, dependency direction, Standards authority structure, Foundation-freedom, and package and namespace naming. Applies in any Swift Institute repository, always, and governs where any package, target, type, or dependency is placed.
82 other projects use a version of this.
Adopted by
Most recently taken up by
- MagicJosh/rastheir own version, first seen Oct 6, 2026
- wellwelwel/lagunetheir own version, first seen Oct 4, 2026
- patrickjaja/claude-desktop-extratheir own version, first seen Oct 4, 2026
- fabiandistler/agentstheir own version, first seen Sep 30, 2026
- afonsoft/skillstheir own version, first seen Sep 30, 2026
- rafaelh/skillstheir own version, first seen Sep 30, 2026
Used with
Projects with it also use deployment-procedures, behavioral-modes and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
xfstudioSkilldeployment-procedures
Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.
Also in 5 projects that use this
xfstudioSkillbehavioral-modes
AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.
Also in 4 projects that use this
tiendatworkSkill2d-games
2D game development principles. Sprites, tilemaps, physics, camera.
Also in 3 projects that use this
tiendatworkSkill3d-games
3D game development principles. Rendering, shaders, physics, cameras.
Also in 3 projects that use this
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
CES-LtdSkillpr-automation
PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".
Also in 3 projects that use this
- +1 more from xfstudio
- +5 more from tiendatwork
Other versions82 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 82
- iOfficeAI/AionUi★ 33ksame name
- anthropics/knowledge-work-plugins★ 26ksame name
- ktnyt/cclsp★ 675same name
- patrickjaja/claude-desktop-extra★ 657same name
- FerroxLabs/wayland★ 608same name
- owainlewis/blueprint★ 410same name
- microsoft/powerplatform-build-tools★ 308same name
- techygarg/lattice★ 197same name
- sd0xdev/sd0x-harness★ 191same name
- wellwelwel/lagune★ 172same name
72 more not listed
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 repository9 other files it gives its agents.
- ci-cdSkill
- compositionSkill
- decompositionSkill
- documentationSkill
- githubSkill
- instituteSkill
- reviewSkill
- swiftSkill
- testingSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 74 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
All three are Apache 2.0. Components (L4) and Applications (L5) are reserved names, not residences — a swift-components/* or …
- Very specific: line 52
No package's main target at any layer imports the Foundation module family — Foundation, FoundationEssentials, FoundationNetworking, …
“Common” is measured: kept by at least 6 in 10 of the 74 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
Architecture
The ecosystem is one composed Institute. Every capability has exactly one semantic owner; every other package composes that owner.
The three realized layers
L3 Foundations swift-{concept} What can be composed safely?
L2 Standards swift-{spec-id} / -standard What is specified externally?
L1 Primitives swift-{concept}-primitives What must exist?All three are Apache 2.0. Components (L4) and Applications (L5) are reserved names, not
residences — a swift-components/* or swift-applications/* directory records an intention,
never precedent or ownership evidence. L3 is the top realized layer; extractions land in
Foundations unless a layer is deliberately being stood up.
Placement test: can you point to an external man page, spec chapter, or SDK document defining this type's surface? Yes → L2. No → L1 if it is an atomic prerequisite, L3 if it composes.
Dependency direction
Dependencies point downward and the graph stays acyclic.
A same-layer edge is admissible only when the edge is an essential semantic prerequisite, the same-layer graph stays acyclic, and the edge does not push higher-layer policy into the dependency. Convenience and incidental reuse are not admissible — the question is whether the dependency could be understood without the dependent, not whether the edge is handy. Within L1 the stricter tier DAG applies: strictly lower tier only, no lateral edges, and tiers are computed from the graph rather than hand-maintained.
Institute packages must not depend on github.com/coenttb/*. Local coenttb/* paths are not
prohibited; repository scope decides whether they may be changed.
- Tests bind to the layer rule too: they share
Package.swift, and SwiftPM cannot scope a dependency to tests only. Move offending tests to a sibling package at the right layer; if one must stay, mark the dependency with an explicit disable naming the constraint. - Layer follows essence, never dependencies. When edges violate a package's layer, refactor the edges — never re-home the package to the layer its dependencies imply. A capability a lower-layer package needs but which is homed above it moves down; the consumer never lifts.
- Count
Package.swiftfiles, not directories, when reporting package counts, and report realized versus reserved separately.
Foundation-freedom
No package's main target at any layer imports the Foundation module family — Foundation,
FoundationEssentials, FoundationNetworking, FoundationXML — or uses Foundation types.
Primitives must additionally be deployable on Swift Embedded: no reflection, no Objective-C
interop, no runtime features absent in embedded contexts.
L1 primitives packages carry no macro targets, for the same reason: a macro target pulls in
swift-syntax and a host compiler plugin, neither of which is deployable on Swift Embedded. A
capability that needs a macro belongs at a higher layer, with the macro target owned there. The
mechanical check — no .macro target in an L1 Package.swift — is Institute-owned
(swift-institute/institute-application#90).
The single exception is a target whose name ends in Foundation Integration. It may import
Foundation, it must be a leaf product, and no core target may depend on it directly or
transitively. The exception covers the target class, never a per-file waiver — a core file that
wants Foundation moves that surface into the integration target.
L1 string and scalar escape hatches are withheld on purpose. Bridging an L1 typed value to
Swift.String by hand at L3 is the intended cost, not a gap.
A linter rule owns the import form, and it is the reason not to hand-roll the check: it has
named cases for the shapes a regex loses, including @_exported import FoundationNetworking.
What it cannot see is use of a Foundation type reached transitively, so a clean run is
evidence about imports and nothing more.
Standards is an organization of organizations
Each authority has its own GitHub org: swift-ietf (swift-rfc-{number}), swift-iso
(swift-iso-{number}), swift-w3c, swift-whatwg, swift-ieee, swift-iec, swift-ecma,
swift-incits, and the vendor orgs swift-arm-ltd, swift-intel, swift-riscv, swift-microsoft.
swift-standards itself holds the convergence packages, swift-{concept}-standard, which absorb
spec revisions so consumers importing the stable module never change. Convergence packages are
policy-free — opinion lives in Foundations.
- A package's location comes from its entry in the Institute inventory
(
Institute.json). Never infer it from the package name, and never determine it by scanning the tree. - One specification can carry two authorities' designations — IEEE 1003.1 is ISO/IEC 9945. Packages under different authority orgs are then not duplicates; they partition the spec by surface. Check that before flagging duplication.
Naming
Package names and top-level namespaces use the noun form; gerunds are forbidden there. Pick the
shortest natural noun (Render, Order, Format), preferring natural over short — parse is
a verb, so the namespace is Parser. A stateful stream-processing machine takes the agent noun
(Parser, Iterator, Cursor); a stateless relation takes the plain or deverbal noun
(Hash, Comparison).
The gerund survives as a typealias onto the canonical capability protocol, declared at the
namespace's enclosing scope so conformance sites read as English: public typealias Rendering =
Render. + a backtick-escaped Protocol. It targets that protocol only, never a sub-protocol,
and is omitted when no gerund exists. Memory.Pool / Memory.Pool.Protocol / Memory.Pooling
is the shape in full.
- A protocol nested in a generic type is a compiler error — hoist it to module scope as
__<Namespace>Protocoland bind the namespace typealias to it. - The namespace typealias binding is available only when the namespace is a non-generic type,
or a generic nominal type. It is NOT available when the namespace's public spelling is a
[DS-028] generic front-door typealias: member-type lookup does not look through an unbound
generic typealias on any toolchain (swift-institute/Issues#81), and the family noun cannot carry
both a generic and an arity-0 declaration (
invalid redeclaration, verified). A family fronted byX<E>therefore has noXnamespace to nest into; its capability protocol stays a top-level, non-underscored protocol, asIterable,Buildable, andInitiablealready do. A generic front-door alias may appear as a member-lookup base only in its bound form. - The shape applies only when a concrete value type backs the namespace. A pure capability or marker protocol with no backing value type stays top-level; an empty namespace shell invents structure that is not there.
- A package may keep an external package's gerund name only for named source compatibility with a specific external package (Apple's swift-testing); the internal namespace still follows the noun rule.
- A rename collapsing a gerund-outer/noun-inner pair into
Order.Orderbreaks silently: insideextension Order, bareOrderresolves to the inner tag, so formerOrdering.Order.xcall sites now resolve against it. Before any mechanical rename, grep the whole ecosystem forimport <OldModule>— transitive-only import sites appear in no manifest — and forextension *.<OldNamespace>/enum <OldNamespace>collision sites.
Type names, member names, and file names are the swift skill's; this section stops at the
package and its top-level namespace.
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.

