Skip to content

Commit 96e5eca

Browse files
committed
BREAKING CHANGE: rename specs/protocol/ to specs/domain/
Rename directory from 'protocol' to 'domain' for better semantic clarity: - 'domain' is more general and includes protocols, formats, models, rules - Aligns with Domain-Driven Design principles - Better symmetry: specs/domain/ (WHAT) vs specs/toolkit/ (HOW) Impact: - All 122 references across 19 files updated - Affects all existing speckits using MetaSpec - Migration: Rename specs/protocol/ → specs/domain/ in existing projects Files changed: - Core docs: AGENTS.md, CHANGELOG.md - Templates: all SDS/SDD command templates - Docs: iteration-layers.md, evolution-guide.md, internal docs
1 parent c174e4a commit 96e5eca

File tree

21 files changed

+126
-126
lines changed

21 files changed

+126
-126
lines changed

AGENTS.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ For defining domain specifications:
124124
- `/metaspec.sds.checklist` - Generate quality checklist for specification
125125
- `/metaspec.sds.analyze` - Check specification consistency
126126

127-
**Location**: Works with `specs/protocol/` directory (stores domain specifications)
127+
**Location**: Works with `specs/domain/` directory (stores domain specifications)
128128

129129
#### 🌳 Recursive Tree Structure (NEW)
130130

@@ -134,7 +134,7 @@ For defining domain specifications:
134134

135135
**Physical Structure** (flat directory layout):
136136
```bash
137-
specs/protocol/
137+
specs/domain/
138138
├── 001-order-specification/ # All at same level
139139
├── 002-order-creation/
140140
├── 003-payment-processing/
@@ -155,7 +155,7 @@ specs/protocol/
155155
```
156156

157157
**Why flat physical structure?**
158-
- ✅ Simple paths: `specs/protocol/013-credit-card-payment/`
158+
- ✅ Simple paths: `specs/domain/013-credit-card-payment/`
159159
- ✅ FEATURE independence: Each specification is a standalone FEATURE
160160
- ✅ Flexible numbering: 003's children can be 013-015 (skip 004-012)
161161
- ✅ Git branch friendly: Branch name = directory name
@@ -168,7 +168,7 @@ specs/protocol/
168168
- **Unified commands**: Same commands work at all levels
169169

170170
**How relationships are maintained**:
171-
- **Physical**: All specifications are sibling directories under `specs/protocol/`
171+
- **Physical**: All specifications are sibling directories under `specs/domain/`
172172
- **Logical**: Parent-child relationships declared in YAML frontmatter
173173
```yaml
174174
---
@@ -190,7 +190,7 @@ specs/protocol/
190190
/metaspec.sds.implement → Creates 002-008
191191

192192
# At level 2 (003 is also complex)
193-
cd specs/protocol/003-payment-processing/
193+
cd specs/domain/003-payment-processing/
194194
/metaspec.sds.plan → Decides to split again
195195
/metaspec.sds.implement → Creates 013-015
196196
```
@@ -239,7 +239,7 @@ MetaSpec generates **working toolkits** through a three-stage process:
239239
```
240240
/metaspec.sds.specify
241241
242-
specs/protocol/001-{domain}-specification/spec.md
242+
specs/domain/001-{domain}-specification/spec.md
243243
- Entity definitions
244244
- Validation rules
245245
- Operations
@@ -338,7 +338,7 @@ For controlled specification evolution (both SDS and SDD):
338338

339339
```
340340
MetaSpec commands (19 total):
341-
- SDS (8 commands) → Define domain specifications (specs/protocol/)
341+
- SDS (8 commands) → Define domain specifications (specs/domain/)
342342
- SDD (8 commands) → Develop toolkits (specs/toolkit/)
343343
- Evolution (3 shared) → Manage changes (changes/)
344344
@@ -386,7 +386,7 @@ When using MetaSpec to develop a speckit, follow this two-phase approach:
386386

387387
**Purpose**: Define the domain specification, rules, and standards
388388

389-
**Location**: `specs/protocol/001-{domain}-specification/`
389+
**Location**: `specs/domain/001-{domain}-specification/`
390390

391391
**What to include**:
392392
- Domain entities and schemas
@@ -396,7 +396,7 @@ When using MetaSpec to develop a speckit, follow this two-phase approach:
396396

397397
**Example**:
398398
```markdown
399-
# specs/protocol/001-mcp-core-specification/spec.md
399+
# specs/domain/001-mcp-core-specification/spec.md
400400

401401
## MCP Specification
402402

@@ -511,7 +511,7 @@ examples/
511511
```bash
512512
# Phase 1: Domain Specification (SDS)
513513
/metaspec.sds.constitution # Define specification design principles
514-
/metaspec.sds.specify # Create specs/protocol/001-{domain}-specification/spec.md
514+
/metaspec.sds.specify # Create specs/domain/001-{domain}-specification/spec.md
515515
/metaspec.sds.clarify # Resolve specification ambiguities
516516
/metaspec.sds.plan # Plan specification architecture (if complex)
517517
/metaspec.sds.tasks # Break down specification work
@@ -584,7 +584,7 @@ cd my-speckit
584584

585585
**Example 2: Iterating on specification**
586586
```bash
587-
# Make changes to specs/protocol/001-*/spec.md
587+
# Make changes to specs/domain/001-*/spec.md
588588
/metaspec.sds.clarify # Resolve ambiguities
589589
/metaspec.sds.checklist # Validate specification quality
590590
/metaspec.sds.analyze # Check consistency
@@ -654,7 +654,7 @@ Output:
654654
Score: 33% (1/3 passing)
655655

656656
# Step 2: User fixes issues
657-
User edits specs/protocol/001-mcp/spec.md
657+
User edits specs/domain/001-mcp/spec.md
658658
- Adds field types
659659
- Adds validation rules
660660

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717

1818
SDS now supports hierarchical domain specifications with unlimited depth:
1919

20-
- **Physical Structure**: Flat directory layout under `specs/protocol/`
20+
- **Physical Structure**: Flat directory layout under `specs/domain/`
2121
- All specifications are sibling directories (e.g., `001-root/`, `002-child/`, `013-grandchild/`)
2222
- Simple paths, FEATURE independence, Git branch friendly
2323

@@ -79,7 +79,7 @@ Added 3 new commands for complex specification definition:
7979

8080
**Why Flat Physical + Tree Logical?**
8181

82-
1. **Simple paths**: `specs/protocol/013-credit-card-payment/` (not deeply nested)
82+
1. **Simple paths**: `specs/domain/013-credit-card-payment/` (not deeply nested)
8383
2. **FEATURE independence**: Each protocol is a standalone FEATURE with its own lifecycle
8484
3. **Flexible numbering**: Sub-protocols can use any available numbers (skip ranges)
8585
4. **Git branch friendly**: Branch name = directory name = protocol_id

docs/evolution-guide.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Need to change specification?
4646
# Toolkit is v1.0.0 and published to community
4747
# User wants to add a new field
4848

49-
❌ WRONG: Direct edit specs/protocol/XXX/spec.md
49+
❌ WRONG: Direct edit specs/domain/XXX/spec.md
5050
✅ RIGHT: /metaspec.proposal "Add new field"
5151
```
5252

@@ -99,7 +99,7 @@ Need to change specification?
9999
# Toolkit is in draft (v0.1.0)
100100
# User wants to fix typos, add examples, improve descriptions
101101

102-
✅ RIGHT: Direct edit specs/protocol/XXX/spec.md
102+
✅ RIGHT: Direct edit specs/domain/XXX/spec.md
103103
✅ THEN: /metaspec.sds.checklist (update mode) to verify
104104
```
105105

@@ -125,14 +125,14 @@ Need to change specification?
125125

126126
```bash
127127
1. User writes initial protocol spec
128-
$ vim specs/protocol/001-mcp-protocol/spec.md
128+
$ vim specs/domain/001-mcp-protocol/spec.md
129129

130130
2. User validates quality
131131
$ /metaspec.sds.checklist
132132
→ Result: ❌ CHK003 - Missing field types
133133

134134
3. User fixes directly (minor improvement)
135-
$ vim specs/protocol/001-mcp-protocol/spec.md
135+
$ vim specs/domain/001-mcp-protocol/spec.md
136136
# Add missing type definitions
137137

138138
4. User re-validates
@@ -259,7 +259,7 @@ $ /metaspec.proposal "Fix typo in description" --type sds
259259
# Overhead: proposal.md, tasks.md, impact.md, approval process
260260
261261
✅ RIGHT:
262-
$ vim specs/protocol/001-xxx/spec.md # Fix typo
262+
$ vim specs/domain/001-xxx/spec.md # Fix typo
263263
$ /metaspec.sds.checklist # Validate
264264
```
265265
@@ -273,7 +273,7 @@ $ /metaspec.sds.checklist # Validate
273273
# Toolkit is v1.0.0 and published
274274
275275
❌ WRONG:
276-
$ vim specs/protocol/001-xxx/spec.md # Add new field
276+
$ vim specs/domain/001-xxx/spec.md # Add new field
277277
$ git commit -m "Add new field"
278278
279279
✅ RIGHT:
@@ -369,7 +369,7 @@ $ /metaspec.recommend-workflow "I want to add a new field"
369369
✅ Alternative: Evolution (if complex or near release)
370370
371371
🔄 Suggested workflow:
372-
1. Edit specs/protocol/001-xxx/spec.md
372+
1. Edit specs/domain/001-xxx/spec.md
373373
2. Run /metaspec.sds.checklist (update mode)
374374
3. Verify: CHK###: ❌ → ✅
375375
```

docs/internal/iteration-roadmap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ A command does NOT need iteration if:
129129
**Workflow**:
130130
```bash
131131
$ /metaspec.sds.specify "Define MCP protocol"
132-
→ Creates specs/protocol/001-mcp-protocol/spec.md
132+
→ Creates specs/domain/001-mcp-protocol/spec.md
133133
$ vim spec.md # User edits directly
134134
$ /metaspec.sds.checklist # Validate (with iteration)
135135
```
@@ -334,7 +334,7 @@ For each command needing iteration support, follow this pattern:
334334
**CRITICAL**: Before generating, check if output already exists:
335335

336336
```bash
337-
ls specs/protocol/XXX-name/[output-directory]/
337+
ls specs/domain/XXX-name/[output-directory]/
338338
```
339339

340340
**If exists**, ask user:

docs/iteration-layers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
# Toolkit: v0.2.0 (draft)
124124
# Change: Add usage example
125125

126-
1. vim specs/protocol/001-mcp/spec.md
126+
1. vim specs/domain/001-mcp/spec.md
127127
# Add example section
128128

129129
2. /metaspec.sds.checklist
@@ -236,7 +236,7 @@ Done! ✅
236236

237237
```yaml
238238
✅ Checklist reads:
239-
- specs/protocol/XXX/spec.md
239+
- specs/domain/XXX/spec.md
240240

241241
✅ Checklist writes:
242242
- checklists/comprehensive-quality.md

src/metaspec/templates/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Development methodologies organized by lifecycle:
139139
- `analyze.md.j2` - Check specification consistency
140140

141141
**Generated to**: `.metaspec/commands/metaspec.sds.*`
142-
**Works with**: `specs/protocol/` directory
142+
**Works with**: `specs/domain/` directory
143143

144144
##### `meta/sdd/commands/` - Spec-Driven Development (8 commands)
145145

src/metaspec/templates/base/.metaspec/README.md.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Define domain protocol specifications:
3030
- `/metaspec.sds.checklist` - Generate quality checklist for protocol
3131
- `/metaspec.sds.analyze` - Check protocol consistency
3232

33-
**Output**: `specs/protocol/` directory
33+
**Output**: `specs/domain/` directory
3434

3535
### Layer 2: SDD (Spec-Driven Development) - 8 Commands
3636

@@ -75,7 +75,7 @@ Manage specification changes:
7575
/metaspec.sds.analyze
7676
```
7777

78-
**Output**: `specs/protocol/001-{domain}-protocol/spec.md`
78+
**Output**: `specs/domain/001-{domain}-protocol/spec.md`
7979

8080
### Phase 2: Design Toolkit (SDD)
8181

src/metaspec/templates/meta/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ meta/
5454

5555
1. **SDS (Spec-Driven Specification)** - Define domain specifications
5656
- Goal: Define WHAT (what the specification is)
57-
- Output: `specs/protocol/` directory
57+
- Output: `specs/domain/` directory
5858
- Examples: Define MCP specification, OpenAPI specification
5959
- **Status**: Primary, core asset
6060

@@ -127,12 +127,12 @@ Generated command prefix: `/metaspec.sds.*`
127127
| Command | Purpose | Output |
128128
|------|------|------|
129129
| `constitution` | Define specification design principles | memory/constitution.md |
130-
| `specify` | Define specification entities and rules | specs/protocol/00X-name/spec.md |
130+
| `specify` | Define specification entities and rules | specs/domain/00X-name/spec.md |
131131
| `clarify` | Resolve specification ambiguities | Update spec.md |
132-
| `plan` | Plan specification architecture and sub-specifications | specs/protocol/00X-name/plan.md |
133-
| `tasks` | Break down specification work | specs/protocol/00X-name/tasks.md |
132+
| `plan` | Plan specification architecture and sub-specifications | specs/domain/00X-name/plan.md |
133+
| `tasks` | Break down specification work | specs/domain/00X-name/tasks.md |
134134
| `implement` | Write specification documents | Create/update spec files |
135-
| `checklist` | Generate quality checklist for specification | specs/protocol/00X-name/checklists/ |
135+
| `checklist` | Generate quality checklist for specification | specs/domain/00X-name/checklists/ |
136136
| `analyze` | Check specification consistency | Analysis report |
137137

138138
**Use Cases**:
@@ -214,7 +214,7 @@ generated-speckit/
214214
#### protocol/ - Protocol Specifications (SDS Output)
215215

216216
```
217-
specs/protocol/
217+
specs/domain/
218218
├── 001-mcp-core-protocol/
219219
│ ├── spec.md # Protocol entity definitions
220220
│ │ # - Server interface
@@ -348,12 +348,12 @@ Project root
348348
│ - Can change toolkit/
349349
│ - Version tracking, approval process
350350
351-
├─ change ─────────────> specs/protocol/
351+
├─ change ─────────────> specs/domain/
352352
└─ change ─────────────> specs/toolkit/
353353
```
354354

355355
**Key Principles**:
356-
1. **specs/protocol/** - Independent protocol specifications, can be published and referenced separately
356+
1. **specs/domain/** - Independent protocol specifications, can be published and referenced separately
357357
2. **specs/toolkit/** - Explicitly depends on protocol/, implements specific tools
358358
3. **changes/** - Manages evolution of both, maintains change history (at project root)
359359

@@ -385,7 +385,7 @@ target: protocol/001-mcp-core # Change target (relative to specs/)
385385

386386
# Create domain specification
387387
/metaspec.sds.specify "MCP Server Specification"
388-
# Output: specs/protocol/001-mcp-server-specification/spec.md
388+
# Output: specs/domain/001-mcp-server-specification/spec.md
389389

390390
# Clarify details
391391
/metaspec.sds.clarify
@@ -394,7 +394,7 @@ target: protocol/001-mcp-core # Change target (relative to specs/)
394394
/metaspec.sds.analyze
395395
```
396396

397-
**Output**: `specs/protocol/001-xxx/spec.md` - Pure protocol definition
397+
**Output**: `specs/domain/001-xxx/spec.md` - Pure protocol definition
398398

399399
#### Phase 2: Toolkit Specification (SDD)
400400

@@ -493,7 +493,7 @@ Because Evolution is a **shared** mechanism for SDS and SDD:
493493
# Phase 1: Define MCP specification (SDS)
494494
/metaspec.sds.constitution # Define specification design principles
495495
/metaspec.sds.specify "MCP Specification Core"
496-
# → specs/protocol/001-mcp-specification-core/spec.md
496+
# → specs/domain/001-mcp-specification-core/spec.md
497497

498498
# Phase 2: Develop MCP Parser (SDD)
499499
/metaspec.sdd.specify "MCP Request Parser"
@@ -520,7 +520,7 @@ Because Evolution is a **shared** mechanism for SDS and SDD:
520520
- **meta/** - For **speckit developers** (meta layer)
521521
* Used to develop speckit itself
522522
* Audience: Developers developing speckits generated by MetaSpec
523-
* Output: specs/protocol/, specs/toolkit/
523+
* Output: specs/domain/, specs/toolkit/
524524

525525
- **library/generic/** - For **speckit users** (application layer)
526526
* Used to develop projects using speckit

src/metaspec/templates/meta/evolution/commands/archive.md.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Archive a completed and applied change proposal, moving it to history and finali
3232
### 2. Merge spec deltas into main specs
3333

3434
**Update target spec** (based on proposal type):
35-
- For `--type sds`: Update `specs/protocol/XXX-name/spec.md`
35+
- For `--type sds`: Update `specs/domain/XXX-name/spec.md`
3636
- For `--type sdd`: Update `specs/toolkit/XXX-name/spec.md`
3737

3838
**Merge process**:

src/metaspec/templates/meta/sdd/commands/analyze.md.j2

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,25 @@ ls specs/toolkit/XXX-name/analysis/
5656

5757
**For Feature 1 (Protocol Spec)**:
5858
- **Required**:
59-
- `specs/protocol/001-{domain}-protocol/spec.md` (protocol definition)
59+
- `specs/domain/001-{domain}-protocol/spec.md` (protocol definition)
6060
- `/memory/constitution.md` (domain principles)
6161
- **Optional**:
62-
- `specs/protocol/001-{domain}-protocol/checklists/`
62+
- `specs/domain/001-{domain}-protocol/checklists/`
6363
- **Skip**: plan.md, tasks.md (not needed for protocol specs)
6464

6565
**For Feature 2 (Toolkit Spec)**:
6666
- **Required**:
6767
- `specs/toolkit/001-toolkit/spec.md` (toolkit definition)
6868
- `specs/toolkit/001-toolkit/plan.md` (architecture)
6969
- `specs/toolkit/001-toolkit/tasks.md` (task breakdown)
70-
- `specs/protocol/001-{domain}-protocol/spec.md` (dependency!)
70+
- `specs/domain/001-{domain}-protocol/spec.md` (dependency!)
7171
- `/memory/constitution.md` (design principles)
7272
- **Optional**:
7373
- `specs/toolkit/001-toolkit/architecture.md`
7474
- `specs/toolkit/001-toolkit/research.md`
7575

7676
**If Feature 1 missing for Feature 2**:
77-
⚠️ **CRITICAL**: "Feature 2 depends on Feature 1 but `specs/protocol/001-*` not found!"
77+
⚠️ **CRITICAL**: "Feature 2 depends on Feature 1 but `specs/domain/001-*` not found!"
7878

7979
### 3. Build semantic models
8080

@@ -108,7 +108,7 @@ ls specs/toolkit/XXX-name/analysis/
108108
**For Feature 2 (Toolkit Spec)** - Check dependency on Feature 1:
109109

110110
**Check**:
111-
1. ✅ Feature 1 exists: `specs/protocol/001-{domain}-protocol/spec.md`
111+
1. ✅ Feature 1 exists: `specs/domain/001-{domain}-protocol/spec.md`
112112
2. ✅ Feature 2 declares dependency:
113113
- Has a "Dependencies" section
114114
- References "001-{domain}-protocol-spec"
@@ -133,7 +133,7 @@ ls specs/toolkit/XXX-name/analysis/
133133
❌ HIGH: Feature 2 Validator doesn't reference Feature 1 validation rules
134134
→ ACTION RECOMMENDED: Update Validator section to reference protocol rules
135135

136-
✅ Feature 1 exists: specs/protocol/001-mcp-protocol-spec/spec.md
136+
✅ Feature 1 exists: specs/domain/001-mcp-protocol-spec/spec.md
137137
✅ Feature 2 declares dependency: "Depends on: 001-mcp-protocol-spec"
138138
✅ Validator references Feature 1: "Validates against MCP protocol rules"
139139
```

0 commit comments

Comments
 (0)