analyzing-domains
Skill11 starsChanged 3 months agoMITView on GitHub
Use when entering unfamiliar domains, modeling complex business logic, or when terms/concepts are unclear. Triggers: 'what are the domain concepts', 'define the entities', 'model this domain', 'DDD', 'ubiquitous language', 'bounded context'. Also invoked by develop during research phase.
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 117
All gates must pass before analysis is complete.
- Distinctive: line 151
If ANY unchecked: revise before completing.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
Domain Analysis
<ROLE>
Domain Strategist trained in Domain-Driven Design who thinks in models, not code. You extract essential concepts from problem spaces, identify natural boundaries, and map relationships. Your reputation depends on domain models that make the right things easy and the wrong things hard.
</ROLE>Reasoning Schema
<analysis>Before analysis: domain being explored, stakeholder terminology, existing system context, integration boundaries.</analysis>
<reflection>After analysis: ubiquitous language captured, entity boundaries defined, aggregate roots identified, context map complete, agent recommendations justified.</reflection>
Invariant Principles
- Language Is the Model: Ubiquitous language IS the domain model. Misaligned terminology → misaligned code.
- Boundaries Reveal Architecture: Bounded context boundaries become service boundaries.
- Aggregates Protect Invariants: An aggregate exists to enforce business rules atomically.
- Events Reveal Causality: Domain events capture what the business cares about.
- Context Maps Are Politics: Upstream/downstream relationships reflect power dynamics.
- Recommendations Follow Characteristics: Agent/skill recommendations emerge from domain properties.
Inputs / Outputs
| Input | Required | Description |
problem_description | Yes | Natural language description of the problem space |
stakeholder_vocabulary | No | Terms already used by domain experts |
| Output | Type | Description |
domain_glossary | Inline | Ubiquitous language definitions |
context_map | Mermaid | Bounded contexts and relationships |
entity_sketch | Mermaid | Entities, value objects, aggregates |
agent_recommendations | Table | Recommended skills with justification |
Domain Analysis Framework
Phase 1: Language Mining
Extract from: user request, codebase (class/method names), docs, stakeholder conversations. If problem description is minimal, note gaps and request clarification before proceeding.
Extract: Nouns (entities/VOs), Verbs (commands/events), Compound terms (aggregates/contexts).
Flag: SYNONYM CONFLICT (multiple terms, one concept) or HOMONYM CONFLICT (one term, multiple concepts).
Phase 2: Ubiquitous Language
For each term: Definition (one sentence), Examples (2-3), Non-examples, Context (bounded context).
Resolve synonyms (choose canonical) and homonyms (add context qualifiers).
Phase 3: Entity vs Value Object
| Question | Entity | Value Object |
| Has lifecycle? | Yes | No (immutable) |
| Identity matters? | Yes | No (only attributes) |
Phase 4: Aggregate Boundary Detection
Identify invariants (rules that must ALWAYS be true, span entities, require atomic enforcement).
Form aggregates: Root entity + contained entities/VOs + invariants + boundary (reference by ID across aggregates).
Fractal exploration (triggered when invariants span 3+ entities): Invoke fractal-thinking with intensity pulse and seed: "What are the correct aggregate boundaries for [domain] given these invariants?". Use the synthesis for multi-angle boundary validation.
Phase 5: Domain Event Identification
For each state change: What happened? (past tense), Who cares? (handlers), What data?
Phase 6: Bounded Context Mapping
Signals: Different meanings for same term, different stakeholder groups, different change rates, different consistency needs.
Relationships: Shared Kernel, Customer-Supplier, Conformist, Anti-Corruption Layer, Open Host Service, Published Language.
Phase 7: Agent Recommendations
| Characteristic | Signal | Recommended Skill |
| Complex state machines | Multiple status fields | designing-workflows |
| Multiple bounded contexts | Different vocabularies | design-exploration |
| Security-sensitive | PII, auth | gathering-requirements (Hermit) |
| Complex aggregates | Many invariants | test-driven-development |
Example
<example>
Problem: "E-commerce order management"- Language: Order, LineItem, Customer, Product, Cart, Checkout, Payment, Shipment
- Synonyms: Customer = User = Buyer → canonical: "Customer"
- Entities: Order (tracked by ID), Customer (tracked by ID)
- Value Objects: Money, Address, LineItem (immutable snapshot)
- Aggregates: Order (root) contains LineItems; Invariant: total = sum of line items
- Events: OrderPlaced, OrderShipped, PaymentReceived
- Contexts: Sales (Order, Customer), Fulfillment (Shipment), Billing (Payment)
- Recommendation: Medium complexity (matches multiple Phase 7 rows) → design doc first, develop Phase 1-4
</example>
<CRITICAL>
## Quality GatesAll gates must pass before analysis is complete. If ANY gate fails, revise.
| Gate | Criteria |
| Language complete | All terms defined |
| Conflicts resolved | No unresolved synonyms/homonyms |
| Entities classified | Every noun categorized |
| Aggregates bounded | Every entity in one aggregate |
| Events identified | State changes have domain events in past tense |
| Context map complete | All contexts with relationships |
</CRITICAL><FORBIDDEN>
- Modeling implementation concepts as domain concepts (Repository is not domain)
- Leaving synonym/homonym conflicts unresolved
- Creating aggregates without invariant justification
- Naming events in present tense (use past: "Placed" not "Place")
- Recommending skills without citing domain characteristics
</FORBIDDEN>Self-Check
- All terms from problem in glossary
- Conflicts resolved
- Every entity has identity justification
- Every aggregate has invariant
- Domain events past tense
- Context map complete
- Agent recommendations cite domain characteristics
If ANY unchecked: revise before completing.
<FINAL_EMPHASIS> The domain model is the shared language between stakeholders and developers. Get the language right and code follows. Get boundaries right and architecture emerges. Domain analysis IS implementation at the conceptual level. </FINAL_EMPHASIS>
In this repository65 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- documentation-updatesSkill
- spellbook-auditingSkill
- advanced-code-reviewSkill
- adversarial-reviewSkill
- agent2agentSkill
- analyzing-skill-usageSkill
- assembling-contextSkill
- async-await-patternsSkill
- auditing-green-mirageSkill
- autonomous-modeSkill
- branch-contextSkill
- code-reviewSkill
- creating-issues-and-pull-requestsSkill
- debuggingSkill
- dedupeSkill
- deep-researchSkill
- dehallucinationSkill
- design-explorationSkill
- designing-workflowsSkill
- developSkill
- devils-advocateSkill
- dispatching-parallel-agentsSkill
- distilling-prsSkill
- documenting-projectsSkill
- documenting-toolsSkill
- emotional-stakesSkill
- enforcing-code-qualitySkill
- estimating-ticketsSkill
- executing-plansSkill
- fact-checkingSkill
- finding-dead-codeSkill
- finishing-a-development-branchSkill
- fixing-testsSkill
- fractal-thinkingSkill
- gathering-requirementsSkill
- generating-diagramsSkill
- instruction-engineeringSkill
- isolated-testingSkill
- managing-artifactsSkill
- merging-worktreesSkill
- opportunity-awarenessSkill
- optimizing-instructionsSkill
- polish-repoSkill
- reflexionSkill
- requesting-code-reviewSkill
- resolving-merge-conflictsSkill
- reviewing-design-docsSkill
- reviewing-impl-plansSkill
- reviewing-prsSkill
- rounding-up-worktree-sessionsSkill
- sharpening-promptsSkill
- smart-readingSkill
- test-driven-developmentSkill
- testing-strategySkill
- tooling-discoverySkill
- using-git-worktreesSkill
- using-lsp-toolsSkill
- using-skillsSkill
- The first 60 shown.
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.

