project-domain
Capture subject matter expertise and domain knowledge that will inform all product decisions - the ubiquitous language, domain rules, and principles from the field
Best use case
project-domain is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Capture subject matter expertise and domain knowledge that will inform all product decisions - the ubiquitous language, domain rules, and principles from the field
Teams using project-domain should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/project-domain/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How project-domain Compares
| Feature / Agent | project-domain | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Capture subject matter expertise and domain knowledge that will inform all product decisions - the ubiquitous language, domain rules, and principles from the field
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
---
description: Capture subject matter expertise and domain knowledge that will inform all product decisions - the ubiquitous language, domain rules, and principles from the field.
---
The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty).
User input:
$ARGUMENTS
Create or update the domain model that captures subject matter expertise for this project.
## Why Domain Knowledge Matters
Many products operate in specialized domains (fitness, healthcare, finance, education, etc.) where:
- **Terminology matters**: Using wrong terms confuses users and violates industry norms
- **Domain rules exist**: Physical, scientific, or regulatory constraints that can't be ignored
- **Expertise is required**: Decisions must be informed by domain knowledge, not guesses
- **User trust depends on accuracy**: Getting domain details wrong destroys credibility
This command captures that knowledge **early** so it informs all downstream decisions.
## Project Identification
First, determine the project:
- Parse arguments for project identifier
- If not provided, ask: "Which project should I create/update domain model for?"
- List available projects in `specs/projects/`
Set `PROJECT_DIR` = `specs/projects/[PROJECT_ID]`
## Context Loading
Load existing project artifacts:
```
REQUIRED:
- {PROJECT_DIR}/project.md → Project vision, domain type, users
OPTIONAL (if exist):
- {PROJECT_DIR}/domain-model.md → Existing domain model (update mode)
- {PROJECT_DIR}/project-import.md → Brownfield import notes
- {PROJECT_DIR}/project-landscape-overview.md → Brownfield code scan
```
**Detect mode**:
- If `domain-model.md` exists: **UPDATE mode** - enhance existing model
- If not: **CREATE mode** - build from scratch
## Just-In-Time Research
**Reference**: Follow the just-in-time research pattern (`.cursor/skills/just-in-time-research/SKILL.md`)
### Research Strategy
For domain model creation, research is **critical**. Identify knowledge gaps and conduct research:
**1. Domain Terminology**:
- Decision: What are the canonical terms in [domain]?
- Web Search: "[domain] glossary", "[domain] terminology standards"
- Deep Research (if specialized): Industry-specific ontologies, taxonomies
**2. Domain Principles**:
- Decision: What scientific/industry principles govern [domain]?
- Web Search: "[domain] best practices", "[domain] principles", "[field] science"
- Deep Research (if needed): Academic research, industry standards
**3. Domain Rules & Constraints**:
- Decision: What rules must always hold true in [domain]?
- Web Search: "[domain] safety guidelines", "[domain] regulations"
- Deep Research (if safety-critical): Regulatory requirements, certification standards
**4. Domain Entities**:
- Decision: What are the core concepts/entities in [domain]?
- Web Search: "[domain] data model", "[domain] ontology"
- Context7 (if applicable): Domain-specific libraries with established models
### Research Execution
Use available MCP tools in this priority order:
1. **Perplexity MCP** (preferred): `perplexity_search`, `perplexity_ask`, `perplexity_research`
2. **Web Search** (fallback): `web_search` tool
3. **User Input**: Ask user for SME knowledge they have
**Embed all findings** directly into the domain model sections with source citations.
## Interactive Domain Elicitation
### Step 1: Domain Identification
Ask the user:
> "Let's capture the domain expertise for your project. I'll ask you questions to understand the specialized knowledge that should inform this product.
>
> **What domain/field does this product operate in?**
> (e.g., Exercise Science, Healthcare, Financial Services, Education, Agriculture, etc.)
>
> **What makes this domain specialized?** Why does someone need expertise to build this correctly?"
Wait for response. Use the domain identification to guide research.
### Step 2: Terminology Elicitation
> "Now let's establish the **canonical terminology** for this domain.
>
> **What are the most important terms/concepts users and the product must use?**
> For each term, provide:
> - The precise definition
> - Any synonyms we should AVOID (to maintain consistency)
>
> I'll also research standard terminology in [domain] to ensure we're aligned with industry norms."
Conduct terminology research and merge with user input.
### Step 3: Core Concepts & Entities
> "What are the **core concepts or entities** in this domain?
>
> Think about:
> - What 'things' does the user work with? (e.g., Workouts, Exercises, Muscle Groups)
> - How do these relate to each other?
> - What attributes define each concept?
>
> I'll help structure these into a domain model."
Build entity definitions and relationships.
### Step 4: Domain Rules & Invariants
> "What **rules must always be true** in this domain?
>
> Examples:
> - 'A workout cannot have zero exercises'
> - 'Rest periods must be positive numbers'
> - 'A muscle group cannot be trained on consecutive days' (if that's a principle you follow)
>
> These become validation rules and system invariants."
### Step 5: Domain Principles
> "What **scientific or industry principles** should guide this product?
>
> For a fitness app, this might include:
> - Progressive overload principle
> - Muscle recovery requirements
> - Volume-intensity relationship
>
> For each principle, I'll research the evidence base and document how it applies to our product."
Conduct principle research and document with sources.
### Step 6: Constraints & Safety
> "What is **impossible, unsafe, or inadvisable** in this domain?
>
> - Physical constraints (can't do negative reps)
> - Safety constraints (max heart rate limits)
> - Regulatory constraints (medical advice disclaimers)
>
> These become hard boundaries the product must respect."
## Domain Model Generation
After elicitation and research, generate `{PROJECT_DIR}/domain-model.md` using:
- Template: `.speck/templates/project/domain-model-template.md`
- User-provided domain expertise
- Research findings with citations
- Structured entity relationships
### Quality Checks
Before finalizing, verify:
**Completeness**:
- [ ] All user-provided terms captured in glossary
- [ ] Core entities have attributes and relationships
- [ ] Key invariants documented
- [ ] At least 2-3 foundational principles with sources
- [ ] Constraints clearly stated
**Consistency**:
- [ ] Terminology matches project.md and other artifacts
- [ ] No conflicting rules
- [ ] Entity relationships are bidirectional
**Actionability**:
- [ ] Glossary terms can be used in code (valid identifiers)
- [ ] Rules are specific enough to validate
- [ ] Principles provide clear guidance
## Output
Create/update: `{PROJECT_DIR}/domain-model.md`
**Summary to user**:
```
✅ Domain model created/updated for [PROJECT_NAME]
Captured:
- [X] terms in glossary
- [X] core entities with relationships
- [X] domain invariants
- [X] foundational principles
- [X] constraints
Research sources:
- [List key sources used]
This domain model will be referenced by:
- /project-plan (epic structure informed by domain)
- /epic-specify (feature scope uses domain terms)
- /story-specify (user stories use glossary)
- /story-plan (data model validates against domain)
- /story-validate (checks domain invariants)
Next steps:
1. Review domain-model.md for accuracy
2. Add any missing domain expertise
3. Continue with /project-context or /project-plan
```
## Integration Notes
**For brownfield projects**:
- Extract domain terminology from existing codebase (variable names, comments, UI text)
- Identify implicit domain rules in existing validation logic
- Document the "as-is" domain model before proposing changes
**For recipe-based projects**:
- Some recipes may have domain considerations (e.g., SaaS billing → subscription domain)
- Layer product-specific domain on top of recipe patterns
## When to Run This Command
**Recommended position in flow**:
```
/project-specify → /project-clarify → /project-domain → /project-context → /project-architecture → /project-plan
```
**Why here?**
- After specify/clarify: We know what we're building
- Before context: Domain constraints inform technical constraints
- Before architecture: Domain entities inform data architecture
- Before plan: Domain structure informs epic organization
**Can skip if**:
- Product has no specialized domain (generic CRUD app)
- Domain is purely technical (developer tools)
- Team already has domain documented elsewhere (link to it)Related Skills
project-spec
Create a project spec for AI agents to work from autonomously.
project-orchestrator
Master coordinator for complete project setup from ideation to ready-to-code. Manages workflow through ideation, research, tech stack selection, documentation, and project initialization to deliver working projects in minutes.
project-bootstrap
Bootstrap a new or existing project with stack detection and project.json generation. Use when adding a new project, setting up agent system, or generating project manifest. Triggers on: add project, new project, bootstrap project, setup project, detect stack.
domain-driven-design
Plan and route Domain-Driven Design work from strategic modeling to tactical implementation and evented architecture patterns.
ck:project-management
Track progress, update plan statuses, manage Claude Tasks, generate reports, coordinate docs updates. Use for project oversight, status checks, plan completion, task hydration, cross-session continuity.
bio-spatial-transcriptomics-spatial-domains
Identify spatial domains and tissue regions in spatial transcriptomics data using Squidpy and Scanpy. Cluster spots considering both expression and spatial context to define anatomical regions. Use when identifying tissue domains or spatial regions.
banking-domain-reviewer
Code review agent with banking domain knowledge — validates business flows, compliance requirements, double-entry accounting, payment processing, and regulatory patterns in the Firefly Banking Platform
audit-and-add-project-skills
Audits project skills in .agent/skills/ and Codex skills for Cursor compatibility, then helps add compatible skills to .cursor/skills/. Use when the user wants to migrate project skills to Cursor, check if skills work with Cursor, or add existing skills to Cursor.
agent-project-manager
Expert project manager specializing in project planning, execution, and delivery. Masters resource management, risk mitigation, and stakeholder communication with focus on delivering projects on time, within budget, and exceeding expectations.
acc-create-domain-service
Generates DDD Domain Services for PHP 8.5. Creates stateless services for business logic that doesn't belong to entities or value objects. Includes unit tests.
acc-create-domain-event
Generates DDD Domain Events for PHP 8.5. Creates immutable event records with metadata, past-tense naming. Includes unit tests.
writing-project-technical-writing
Writes technical prose (READMEs, ADRs, code comments) in the project's established human voice. Use when creating or editing .md files, writing Swift doc comments, authoring ADRs, or reviewing technical writing for voice consistency.