skills/analyzing-domains/SKILL.md
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.
npx skillsauth add axiomantic/spellbook analyzing-domainsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
<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>
| 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 |
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).
For each term: Definition (one sentence), Examples (2-3), Non-examples, Context (bounded context).
Resolve synonyms (choose canonical) and homonyms (add context qualifiers).
| Question | Entity | Value Object | |----------|--------|--------------| | Has lifecycle? | Yes | No (immutable) | | Identity matters? | Yes | No (only attributes) |
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.
For each state change: What happened? (past tense), Who cares? (handlers), What data?
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.
| Characteristic | Signal | Recommended Skill | |----------------|--------|-------------------| | Complex state machines | Multiple status fields | designing-workflows | | Multiple bounded contexts | Different vocabularies | brainstorming | | Security-sensitive | PII, auth | gathering-requirements (Hermit) | | Complex aggregates | Many invariants | test-driven-development |
All 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>
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>
testing
Use when creating new skills, editing existing skills, or verifying skills work before deployment. Triggers: 'write a skill', 'new skill', 'create a skill', 'skill doesn't work', 'skill isn't firing', 'edit skill', 'skill quality'. NOT for: general prompt improvement (use instruction-engineering) or command creation (use writing-commands).
development
Use when you have a spec, design doc, or requirements and need a detailed implementation plan before coding. Triggers: 'write a plan', 'create implementation plan', 'plan this out', 'break this down into steps', 'convert design to tasks', 'implementation order'. Also invoked by develop during planning. NOT for: reviewing existing plans (use reviewing-impl-plans).
testing
Use when creating new commands, editing existing commands, or reviewing command quality. Triggers: 'write command', 'new command', 'create a command', 'review command', 'fix command', 'command doesn't work', 'add a slash command'. NOT for: skill creation (use writing-skills).
development
Use when about to claim discovery during debugging. Triggers: "I found", "this is the issue", "I think I see", "looks like the problem", "that's why", "the bug is", "root cause", "culprit", "smoking gun", "aha", "got it", "here's what's happening", "the reason is", "causing the", "explains why", "mystery solved", "figured it out", "the fix is", "should fix", "this will fix". Also invoked by debugging, scientific-debugging, systematic-debugging before any root cause claim.