shadow-domain
Skill1 starsChanged yesterdayMITView on GitHub
Domain-Driven Design & Business Invariant Modeling. Use when modeling complex state machines, approval/cancellation policies, bounded contexts, aggregate consistency boundaries, domain events, or anti-corruption layers. Do NOT use for simple CRUD screens (keep lightweight), stakeholder PRD interviews (shadow-discovery), physical DB tuning (shadow-db), or system topology/C4 (shadow-architect).
In this repository51 other files it gives its agents.
- antislop-codeSkill
- antislop-copywritingSkill
- antislop-humanSkill
- antislop-layoutmobileSkill
- antislopSkill
- antislop-uiSkill
- context7Skill
- handoffSkill
- shadow-accessibilitySkill
- shadow-apiSkill
- shadow-architectSkill
- shadow-authSkill
- shadow-bootstrapSkill
- shadow-browserSkill
- shadow-cacheSkill
- shadow-compatSkill
- shadow-concurrencySkill
- shadow-dataSkill
- shadow-dbSkill
- shadow-debugSkill
- shadow-designSkill
- shadow-discoverySkill
- shadow-docSkill
- shadow-eaSkill
- shadow-evalSkill
- shadow-finopsSkill
- shadow-gitSkill
- shadow-grcSkill
- shadow-handoverSkill
- shadow-integrateSkill
- shadow-maintainSkill
- shadow-mobileSkill
- shadow-modernizeSkill
- shadow-monarchSkill
- shadow-observeSkill
- shadow-opsSkill
- shadow-perfSkill
- shadow-planSkill
- shadow-pmoSkill
- shadow-presalesSkill
- shadow-privacySkill
- shadow-qualitySkill
- shadow-realtimeSkill
- shadow-refactorSkill
- shadow-releaseSkill
- shadow-resilienceSkill
- shadow-searchSkill
- shadow-secSkill
- shadow-supplychainSkill
- shadow-testSkill
- shadow-uatSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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 12
Anti-Overengineering Rule: Never introduce heavy DDD ceremony (aggregates, event sourcing, value-object wrappers) for simple CRUD tables …
- Distinctive: line 13
Ambiguity Escalation Rule: If two domain policies conflict (e.g., whether an already-settled invoice can be cancelled), STOP and escalate …
- Very specific: line 16
Read methodologies/DDD-BOUNDED-CONTEXTS-AND-AGGREGATES.md and playbooks/INVARIANT-CATALOG-AND-STATE-SPEC.md:
- Distinctive: line 20
Delineate Bounded Contexts & Anti-Corruption Layers (ACL): Keep core domain logic isolated from legacy external ERP/vendor schemas.
≈ “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
/shadow-domain — Domain-Driven Design & Business Invariant Modeling
- Owner: Bounded contexts, ubiquitous language, aggregate consistency boundaries, state transitions, and executable invariants.
- Boundaries: Stakeholder PRD elicitation (
shadow-discovery), physical SQL indexing (shadow-db), system topology/containers (shadow-architect).
1. Preconditions, DDD Applicability Limits & Escalation
- Anti-Overengineering Rule: Never introduce heavy DDD ceremony (aggregates, event sourcing, value-object wrappers) for simple CRUD tables without stateful invariants.
- Ambiguity Escalation Rule: If two domain policies conflict (e.g., whether an already-settled invoice can be cancelled), STOP and escalate the conflict instead of inventing an unstated policy.
2. 6-Step Domain Modeling Playbook
Read methodologies/DDD-BOUNDED-CONTEXTS-AND-AGGREGATES.md and playbooks/INVARIANT-CATALOG-AND-STATE-SPEC.md:
- Gather Real Business Scenarios: Walk through happy, concurrent, and cancellation/reversal edge scenarios.
- Build Ubiquitous Glossary & Conflict Register: Resolve overlapping terms (
OrdervsInvoicevsShipment) across teams. - Define State Diagrams & Invariants: List illegal transitions (
COMPLETED -> CANCELLED), concurrency rules (optimistic lock on aggregate root), and cross-tenant isolation. - Delineate Bounded Contexts & Anti-Corruption Layers (ACL): Keep core domain logic isolated from legacy external ERP/vendor schemas.
- Distinguish Domain Events vs Integration Events: Internal aggregate facts vs versioned cross-context public contracts.
- Express Executable Acceptance Tests: Enforce identical invariants across API validation, domain entity, and persistence layers.
3. Examples & Deterministic Verifier
- Happy Path: Approval workflow validates
PENDING -> APPROVEDwith maker != checker invariant and optimisticversioncheck. - Ambiguous / Must-Reject: Ambiguous cancellation rule resolved by guessing silently instead of escalating, or applying full DDD aggregates to a 3-column lookup table -> BLOCKED by
domain_invariant_verifier.py.
python "shadow-domain/scripts/domain_invariant_verifier.py" --self-test
python "shadow-domain/scripts/domain_invariant_verifier.py" --verify-model path/to/domain_model.jsonDoes 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.

