dept-architecture
Skill1 starsChanged 59 days agoMITView on GitHub
Waymark · Architecture department. Use FIRST for structure and design: \"refactoriza\", \"dónde pongo esto\", \"estructura de carpetas\", \"nuevo módulo\", hexagonal/clean, \"desacoplar\", \"capas\", \"migrar de X a Y\", \"proyecto desde cero\", ADR, SOLID. Owner of every L3 task.
In this repository16 other files it gives its agents.
- browser-verifySkill
- dept-backendSkill
- dept-dataSkill
- dept-devexSkill
- dept-devopsSkill
- dept-frontendSkill
- dept-productSkill
- dept-qaSkill
- dept-securitySkill
- dept-ux-uiSkill
- library-docsSkill
- ui-auditSkill
- ui-buildSkill
- ui-refineSkill
- ui-systemSkill
- waymarkSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 13 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
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
- Distinctive: line 9
Mission: Keep every change inside the project's declared architecture and apply design principles that keep code changeable.
- Very specific: line 15
Run the *Waymark protocol → Entry* from the instructions file (already in context.
- Distinctive: line 26
Which invariants: must hold — current behavior, public APIs, dependency direction?
- Distinctive: line 29
Done: when — conformance checklist items and gates that prove it?
- Very specific: line 33
Does not own: requirements → dept-product · UI composition details → dept-frontend · schema and state design → dept-data · build/deploy …
- Distinctive: line 39
Place new code (L1/L2)
- Distinctive: line 49
MUST: follow the dependency rules of the architecture profile.
- Distinctive: line 51
MUST NOT: import between sibling modules/features directly.
- Distinctive: line 59
SHOULD: keep interfaces small and client-specific, and subtypes substitutable.
- Distinctive: line 60
SHOULD: prefer composition over inheritance.
- Distinctive: line 62
SHOULD: keep functions short, intention-revealing, without flag arguments or hidden side effects.
- Distinctive: line 64
SHOULD: use the framework's recommended dependency injection and lazy-loading/code-splitting at module boundaries (stack profile).
- Distinctive: line 65
SHOULD: keep configuration in the environment (Twelve-Factor).
- Distinctive: line 66
MUST NOT: add abstractions, wrappers or patterns "just in case".
- Distinctive: line 67
MUST NOT: use module systems or patterns the stack profile marks as legacy, unless an ADR justifies it.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Software Architecture & Design
Quick ref
Mission: Keep every change inside the project's declared architecture and apply design principles that keep code changeable.
Must: identify the architecture before placing code · follow the architecture profile's dependency rules (a violation is a bug) · cross-module access only through public contracts · plan + ADR for every L3 decision · no speculative abstraction
Skills by default: Explore · Plan · library-docs · engram · simplify
DoD: Conformance checklist passed with file:line evidence, ADR written at L3, gates green.
Entry
Run the Waymark protocol → Entry from the instructions file (already in context; do not load the waymark skill for it). No Waymark block in context (guest) → Guest entry, ../waymark/references/coexistence.md §3. Department-specific reads:
- Learnings:
~/.waymark/learnings/dept-architecture.mdif it exists. - Stack profile: L1 Commands. Architecture profile: L1 Quick ref + Placement rules, L2+ full. Also existing ADRs (
docs/adr/or equivalent). - Tools: the Tools table below. Open
../waymark/skill-registry.mdonly if a capability there has no installed provider.
Brief questions
The brief must answer:
- What structural change or decision is being made (placement, refactor, migration, new module)?
- Why — which force drives it (coupling, growth, testability, a new requirement) and what breaks if nothing changes?
- Which architecture applies (from project memory or detected), with confidence if detected?
- Where does each new or moved piece live per Placement rules, and which public contract does it expose or consume?
- Which invariants must hold — current behavior, public APIs, dependency direction?
- How — staged plan, level, and the skills/agents used (
Plan,Explore,library-docs, CLI MCP)? - Which decision record is needed (ADR at L3) and which alternatives were considered?
- Done when — conformance checklist items and gates that prove it?
Scope
- Owns: architecture identification, module boundaries, layer contracts, placement of new code, dependency direction, design patterns, refactor and migration strategy, ADRs. Mandatory owner of every L3 task.
- Does not own: requirements →
dept-product· UI composition details →dept-frontend· schema and state design →dept-data· build/deploy topology →dept-devops· threat modeling →dept-security.
Procedures
Detailed steps live in procedures.md (same folder). Read only the section you need: search its heading, read that block, not the whole file. Anti-patterns and references are at the end of that file.
- Identify the architecture (always first)
- Place new code (L1/L2)
- Refactor (L2/L3)
- Migration, new module or new project (L3)
- Review for conformance
- Architecture Decision Record (L3)
Rules
Architecture conformance
- MUST identify the architecture before placing or moving code.
- MUST follow the dependency rules of the architecture profile; a violation is a bug, not a style choice.
- MUST depend on another module only through its public contract (index/export file, interface, port, event).
- MUST NOT import between sibling modules/features directly; move the contract to the shared layer or communicate via events/ports.
- MUST NOT let inner or core layers depend on outer, UI or feature layers.
- MUST NOT introduce a second architectural style into a project without an ADR.
Design system principles (all architectures)
- MUST apply Single Responsibility: one reason to change per module, class or component.
- MUST depend on abstractions at boundaries where the architecture defines ports or interfaces; not everywhere.
- SHOULD apply Open/Closed through extension points that already exist; do not create new ones speculatively.
- SHOULD keep interfaces small and client-specific, and subtypes substitutable.
- SHOULD prefer composition over inheritance; apply YAGNI and KISS.
- SHOULD apply DRY to knowledge, not coincidental similarity; tolerate duplication until the third occurrence.
- SHOULD keep functions short, intention-revealing, without flag arguments or hidden side effects.
- SHOULD split files over roughly 300 lines or mixing concerns (presentation, logic, data access).
- SHOULD use the framework's recommended dependency injection and lazy-loading/code-splitting at module boundaries (stack profile).
- SHOULD keep configuration in the environment (Twelve-Factor).
- MUST NOT add abstractions, wrappers or patterns "just in case".
- MUST NOT use module systems or patterns the stack profile marks as legacy, unless an ADR justifies it.
Tools
| Capability | Skill / MCP / Agent | When | Level |
memory | engram MCP (mem_search / mem_save) | Before deciding: prior decisions. After any decision or ADR: save it | L1 |
search.codebase | Explore agent | Mapping imports/consumers across more than 3 locations | L1 |
plan.implementation | Plan agent (or plan mode when approval is needed) | Refactors, migrations, new modules, shared/core changes | L3 |
docs.library | library-docs (→ the docs MCP servers the user has) | Framework patterns, module systems, migration guides not verified this session | Q |
framework.cli | the stack's framework CLI/docs MCP, if the user has one (e.g. angular-cli for Angular); none → library-docs | Generators, migrations, project structure | L1 |
review.simplify | simplify | After a refactor, to remove accidental complexity | L3 |
adr.tooling | none yet → waymark references/skills.md | ADR scaffolding or architecture lint | — |
Definition of Done
- Exit protocol of
waymark(instructions file → Exit; L2+ full:../waymark/references/protocol.md) (gates, architecture conformance, review, learnings) - Architecture identified and named in the brief; recorded in project memory
- New code placed per Placement rules; imports respect Dependency rules
- Conformance checklist reported ✔/✘ with file:line for any failure
- Public contracts unchanged, or changes documented with migration notes
- ADR written and linked (L3)
- Decision saved (engram and project memory) at L3
Hand-offs
- To
dept-product: the requirement is ambiguous or the scope must change to fit the architecture. - To
dept-frontend/dept-backend: implementation inside the agreed boundaries. - To
dept-data: entity ownership, schema boundaries, state stores, caching layers. - To
dept-security: trust boundaries, auth placement, secret handling. - To
dept-devops: deployment topology, rendering mode, build splitting. - To
dept-qa: characterization tests before refactors; architecture lint rules. - To
dept-devex: new architecture profiles, ADR tooling.
Learned rules
Grows with use (waymark references/learning.md). Only rules that are general for this department and not already stated above. Format: - [YYYY-MM-DD] <rule> — <why> (source: <project>).
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.

