Loading...
Loading...
Progressive Domain Crystallization (PDC) — a skill for building and maintaining a living domain knowledge base for any custom business application. Use this skill whenever the user is developing a business application and wants the AI to accumulate understanding of internal terminology, entities, relationships, and business rules over time — especially when that knowledge is not fully defined upfront and grows across sessions. Trigger on any of: "remember how our system works", "learn our domain", "track business entities", "build domain knowledge", "understand our terminology", "grow AI context over time", "domain model", "business rules documentation", or whenever a user says the AI doesn't understand their business-specific language or data model. Also use at the start of any session where a DOMAIN.md file exists in the project — always read it before doing any work.
npx skill4agent add customware-ai/skills domain-contextDOMAIN.mddocs/domain/DOMAIN.mdassets/templates/DOMAIN.md[UNKNOWN: <term>][RELATIONSHIP UNCLEAR: <entity-a> → <entity-b>][RULE INFERRED: <description>]## 📋 Proposed Domain Updates## 📋 Proposed Domain Updates
> Review these and copy any confirmed items into your DOMAIN.md
### New Entities Discovered
- **[EntityName]**: [Definition as understood from this session]
- Attributes: [list]
- Related to: [other entities]
### Terminology Clarified
- `[term]` → [plain definition]
### Relationships Identified
- [Entity A] → [verb] → [Entity B]: [description]
### Business Rules Observed
- [Rule description]
### Open Questions
- [ ] [Question about something ambiguous or unresolved]
### Suggested DOMAIN.md Sections to Add/Update
- [ ] [specific section or entry to update]| Tier | What It Contains | When It's Loaded | Typical Size |
|---|---|---|---|
| Tier 1 — Core | Project overview, terminology glossary, entity names (one-liners only), business rules table, user roles table | Always, at session start | 80–120 lines |
| Tier 2 — Working Context | Full entity descriptions (lifecycle, notes, edge cases), full flow step-by-steps, relationship map, integration points | On demand, when the session touches that entity or flow | 30–80 lines per file |
| Tier 3 — Archive | Changelog, resolved open questions, data migration notes, vendor-specific details | On explicit request, or when reviewing project history | Variable |
## Project Overview## Domain Boundaries## Terminology Glossary## Entity Registry## State Models## Business Rules## User Roles## Stakeholder Map## Open Questions## Detail Files1. Read root DOMAIN.md (Tier 1 — always)
↓
2. Understand the current task
↓
3. Determine which entities/flows are relevant
↓
4. Load only those Tier 2 files
↓
5. Work — loading additional Tier 2 files if the task expands
↓
6. Propose updates — specifying which file each update belongs todocs/domain/flows/pm-renewal.mddocs/domain/entities/pm-renewal.mddocs/domain/flows/lead-distribution.mddocs/domain/entities/customer.md## 📋 Proposed Domain Updates
### Update: `DOMAIN.md` (Tier 1 — core)
- Add to Business Rules: BR-013 — [rule description]
### Update: `docs/domain/entities/pm-renewal.md` (Tier 2)
- Add attribute: `priceAdjustmentPercent` — annual price increase applied on renewal
### New File: `docs/domain/flows/engineering-review.md` (Tier 2)
- [Full flow description to create]
### Update: `docs/domain/archive/changelog.md` (Tier 3)
- [Session summary entry]MAJOR.MINOR> **Version:** 1.5
> **Last updated:** 2026-04-06 (Session 30)
> **Changes:** +Commission Report entity, +BR-013–015, updated Quote-to-Close flowassets/templates/DOMAIN.md| Section | Tier | Purpose |
|---|---|---|
| 1 | What the app does, who uses it, primary goals |
| 1 | What's in scope, what's supporting, what's excluded |
| 1 | Internal jargon mapped to plain definitions |
| 1 (names) / 2 (details) | Business objects with attributes and descriptions |
| 1 | Valid statuses, types, and state transitions for entities |
| 2 | How entities connect to each other |
| 2 | Named business processes with step-by-step info flow |
| 1 | Constraints, validations, edge cases |
| 2 | External systems, APIs, data sources |
| 1 | Who uses the system and what they can do |
| 1 | Named people, their relationship to the system, concerns, involvement timing |
| 1 | Unresolved ambiguities — reviewed and cleared over time |
| 3 | What was learned and when |
your-project/
├── DOMAIN.md ← Tier 1: Core index (always loaded)
├── docs/
│ └── domain/
│ ├── entities/ ← Tier 2: One file per major entity
│ │ ├── quote.md
│ │ ├── customer.md
│ │ ├── product.md
│ │ └── ...
│ ├── flows/ ← Tier 2: One file per business process
│ │ ├── quote-to-close.md
│ │ ├── pm-renewal.md
│ │ └── ...
│ ├── relationships.md ← Tier 2: Full relationship map
│ ├── integrations.md ← Tier 2: External system details
│ └── archive/ ← Tier 3: Historical records
│ ├── changelog.md
│ └── resolved-questions.md
└── ... (rest of your project)## Detail Files## Detail Files
| File | Contents |
|------|----------|
| `docs/domain/entities/quote.md` | Quote entity — lifecycle, attributes, status workflow |
| `docs/domain/entities/customer.md` | Customer/Account entity — parent-child, territory assignment |
| `docs/domain/flows/quote-to-close.md` | Full quote lifecycle from opportunity to installation |
| `docs/domain/flows/pm-renewal.md` | PM contract renewal process |
| `docs/domain/relationships.md` | Complete entity relationship map |
| `docs/domain/integrations.md` | Salesforce, Watertight, Procore, vendor portals |
| `docs/domain/archive/changelog.md` | Session-by-session learning history |references/seed-questions.mdREAD DOMAIN.md (+ relevant Tier 2 files if split)
↓
DO WORK (flag unknowns inline)
↓
PROPOSE UPDATES (specify target file if split)
↓
HUMAN REVIEWS & APPROVES
↓
HUMAN UPDATES DOMAIN.md (or detail files)
↓
(next session reads updated files)Sessions 1–3: Single DOMAIN.md, ~60–80 lines (Tier 1 only)
Sessions 4–10: Single DOMAIN.md, ~100–200 lines (Tier 1 + 2 mixed)
Sessions 10+: Split into index + detail files (Tier 1 / 2 / 3 separated)
Mature project: Full three-tier structure with archive"The domain file is at [N] lines now — it covers [N] entities and [N] flows in detail. Want me to split it into a core index file with separate detail files? Each session would load just the parts relevant to what we're working on, and nothing is lost."
docs/domain/entities/[name].mddocs/domain/flows/[name].mddocs/domain/archive/changelog.md## Detail Filesassets/templates/DOMAIN.mdreferences/seed-questions.mdreferences/entity-template.mdreferences/anti-patterns.md