# Domain Modeling

> 梳理领域模型 — 来自 superpowers 体系。本 skill 是桥接层,完整纪律见 <SUPERPOWERS_SKILL_ROOT>/domain-modeling/。

- **Type:** Skill
- **Install:** `agentstack add skill-blueprintos-analysis-to-delivery-domain-modeling`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [BlueprintOS](https://agentstack.voostack.com/s/blueprintos)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [BlueprintOS](https://github.com/BlueprintOS)
- **Source:** https://github.com/BlueprintOS/analysis-to-delivery/tree/main/skills/orchestration/development/domain-modeling

## Install

```sh
agentstack add skill-blueprintos-analysis-to-delivery-domain-modeling
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Domain-Modeling(桥接到 superpowers)

## Contract

- Inputs: design spec, terminology, entities, business rules
- Outputs: domain model diagram and entity list
- Gates: user agrees canonical terms and relationships
- Required disciplines: `stage-gate`
- Next: `/writing-plans`

> **本仓库不维护此 skill 的内容**。完整纪律请读:
> `/domain-modeling/SKILL.md`

## 何时调

- brainstorming / design-an-interface 之后
- 需要定义实体、值对象、聚合根

## 衔接点

- **产出**:领域模型图 + 实体清单
- **下一步**:`/writing-plans`
- **门控**:`disciplines/stage-gate` 第 2 层

## 降级方案(superpowers 未装时)

如果 `/domain-modeling/` 不存在,按以下 4 步产出领域模型:

### 1. 列实体

从 brainstorming 设计稿提取名词,过滤出**实体**(有生命周期、有 ID)与**值对象**(无 ID、不可变):

| 类型 | 例子 | 判别 |
|---|---|---|
| 实体 | ASN / LPN / 波次 | 有 `*_ID`,状态会变 |
| 值对象 | 收货地址 / 计量单位 | 无 ID,只描述属性 |
| 聚合根 | ASN(含 LPN 列表) | 一致性边界 |

### 2. 画 ASCII 关系图

参考 `disciplines/ascii-flowchart` 用 ASCII 画实体关系图,严禁 Mermaid:

```
[ASN] -- 1..N --> [ASN_DTL] -- 1..N --> [LPN]
   |                                       |
   +-- 1..1 --> [收货地址(值对象)]
```

### 3. 字段对齐验证

每个实体字段必须与知识库核对(`disciplines/no-field-guessing`):

- 已有表 → 直接用现有字段(走 `field-alignment-check.py`)
- 新增字段 → 标记 `EXTEND` 且写扩展理由

### 4. 输出 + 签字

写到 `docs/superpowers/specs/-domain.md`,末尾 `## Sign-off` 等用户白名单签字(4 句之一)。

### 最小纪律摘要

- **名词 ≠ 实体**:不是所有名词都是实体,看 ID 与状态
- **ASCII 不用 Mermaid**:与全局 `ascii-flowchart` 纪律冲突
- **字段不靠记忆**:严禁自创字段名(`no-field-guessing` + `no-self-invent`)
- **聚合根边界 = 事务边界**:不能跨聚合根强一致

### 安装提示

```bash
npx skills@latest add obra/superpowers-domain-modeling
```

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [BlueprintOS](https://github.com/BlueprintOS)
- **Source:** [BlueprintOS/analysis-to-delivery](https://github.com/BlueprintOS/analysis-to-delivery)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-blueprintos-analysis-to-delivery-domain-modeling
- Seller: https://agentstack.voostack.com/s/blueprintos
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
