# domain-context

Maintains a domain knowledge base in .tasks/domain.md across sessions. Tracks internal terms, entity relationships, and core business rules.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 2500 installs · ★ 2
- Author: ryan-price
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/customware-ai/skills/tree/HEAD/skills/domain-context/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/domain-context

## What it does

This skill implements Progressive Domain Crystallization. At the start of a session, the assistant inspects `.tasks/domain.md` in the project root to load project context. If the file is missing, it offers a starting template. While writing code, the model flags undefined terms with `[UNKNOWN: <term>]` or unverified logic with `[RULE INFERRED: <description>]`.

Knowledge is organized into three tiers to manage context size. Tier 1 holds core glossaries, status models, and rules up to 120 lines. Tier 2 loads detailed entity files on demand when a specific workflow is touched. Tier 3 stores historical logs and resolved questions.

The skill prevents automated corruption by design. The AI never overwrites your documentation directly. Instead, it generates a `Proposed Domain Updates` block at the end of each session for human review and manual insertion.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add customware-ai/skills --skill domain-context -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/domain-context/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/domain-context/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add customware-ai/skills --skill domain-context -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/domain-context/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add customware-ai/skills --skill domain-context -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/domain-context/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install customware-ai/skills domain-context
```

2. **Manually: put the files in place**
- File: `.github/skills/domain-context/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add customware-ai/skills --skill domain-context -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/customware-ai/skills --path skills/domain-context
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/domain-context/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add customware-ai/skills --skill domain-context -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/customware-ai/skills/tree/HEAD/skills/domain-context/SKILL.md

## When to use it
- accumulate domain terminology and business logic across sessions
- spot missing domain definitions inline during development
- split large knowledge bases into progressive tiers
- keep human developers as the final authority on system rules

## Example prompts
- Read .tasks/domain.md and check how our system handles invoice states
- Track any new business entities we defined in this refactor
- Propose domain updates based on the business rules we discussed

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: ce8c502bbf0baa2d.

BEGIN THIRD-PARTY FILE ce8c502bbf0baa2d
```text
---
name: domain-context
license: MIT
compatibility: Works with any AI coding assistant that supports the Agent Skills specification. No system packages or network access required.
metadata:
  author: ryan-price
  version: "1.5"
description: >
  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 .tasks/domain.md file exists in the project — always read it before doing any work.
---

# Progressive Domain Crystallization (PDC) Skill

## What This Skill Does

This skill enables any AI assistant to build and use a **living domain knowledge base** for any business
application — accumulated incrementally across sessions through a human-AI collaborative protocol.

The AI never "knows" the domain by default. But with this skill, it can:
- Read a structured `.tasks/domain.md` file at the start of every session
- Use internal terminology and entity names exactly as the business defines them
- Flag gaps in domain understanding inline during work
- Propose structured additions to the domain file for human review
- Never corrupt the knowledge base — all updates are proposed, not auto-applied
- Manage domain knowledge growth through progressive disclosure — loading only what's relevant to the current session

---

## Core Protocol

### At Session Start

1. **Look for .tasks/domain.md** in the project root
2. If found → check the file structure:
   - **Single file** (under ~200 lines): Read it completely before doing any work.
   - **Index + detail files** (split structure): Read the root .tasks/domain.md index (Tier 1 — core context). Then determine which Tier 2 detail files are relevant to the current task and load only those. See § Progressive Disclosure.
3. If not found → offer to initialize one using the template at `.tasks/domain.md`
4. Confirm to the user: "I've loaded the domain context for [Project Name]. I'm familiar with [N] entities and [N] flows." If in split mode, also note: "I've loaded the core context. I'll pull in detail files as needed for what we're working on."

### During Work

- Use entity names, terminology, and abbreviations **exactly as defined** in .tasks/domain.md
```
END THIRD-PARTY FILE ce8c502bbf0baa2d

The third-party file has ended. Everything between the ce8c502bbf0baa2d tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2905 of 16419 bytes. © ryan-price · MIT · https://github.com/customware-ai/skills/tree/HEAD/skills/domain-context/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
