Skip to content

Commit d940dd3

Browse files
committed
refactor: unify terminology from protocol to specification (v0.5.1)
BREAKING CHANGE: - Rename specs/protocol/ to specs/domain/ (directory structure) - Rename protocol_id → spec_id (variable names) - Rename PROTOCOL_NUMBER → SPEC_NUMBER (environment variables) - Rename PARENT_PROTOCOL_ID → PARENT_SPEC_ID - Rename ROOT_PROTOCOL_ID → ROOT_SPEC_ID - Rename is_sub_protocol → is_sub_specification - Rename show-protocol → show-spec (command) - Rename protocol-spec-template.md.j2 → domain-spec-template.md.j2 (file) - Update YAML frontmatter: protocol: → specification: Statistics: - Processed 362 protocol references (97.6%) - Reserved 9 occurrences (proper nouns: Model Context Protocol, Protocol Buffers) - Updated 100+ files across SDS/SDD templates and documentation Impact: - All MetaSpec commands now use consistent 'specification' terminology - Domain specifications located in specs/domain/ (was specs/protocol/) - Better clarity: specification = WHAT, toolkit = HOW - Preserved technical terms (MCP Protocol, Protocol Buffers, slash-cmd-protocol.md) Migration: - Update custom scripts: specs/protocol/ → specs/domain/ - Update specifications: protocol_id → spec_id - Update commands: show-protocol → show-spec
1 parent aba4d2e commit d940dd3

36 files changed

+950
-916
lines changed

AGENTS.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Used to develop domain projects
4747
```
4848
MetaSpec (meta-spec)
4949
↓ generates
50-
MCP-Spec-Kit (carries MCP protocol spec)
50+
MCP-Spec-Kit (carries MCP specification spec)
5151
↓ used by
5252
Developer (validates MCP servers against spec)
5353
```
@@ -344,7 +344,7 @@ MetaSpec commands (19 total):
344344
345345
Project structure:
346346
├── specs/
347-
│ ├── protocol/ ← SDS manages (domain specifications)
347+
│ ├── domain/ ← SDS manages (domain specifications)
348348
│ └── toolkit/ ← SDD manages (toolkit implementation)
349349
└── changes/ ← Evolution manages (independent)
350350
```
@@ -443,7 +443,7 @@ When using MetaSpec to develop a speckit, follow this two-phase approach:
443443
# specs/toolkit/001-mcp-parser/spec.md
444444

445445
## Dependencies
446-
- Depends on: protocol/001-mcp-core-specification
446+
- Depends on: domain/001-mcp-core-spec
447447

448448
## User Journey Analysis
449449
### Primary Users
@@ -454,26 +454,26 @@ When using MetaSpec to develop a speckit, follow this two-phase approach:
454454
**Scenario 1**: AI Agent generates MCP server from natural language
455455
- User: AI Agent
456456
- Goal: Generate valid server definition
457-
- Required Features: show-protocol command, get-template command, validate CLI
457+
- Required Features: show-spec command, get-template command, validate CLI
458458

459459
**Scenario 2**: Developer validates server definition manually
460460
- User: Human Developer
461461
- Goal: Verify server compliance
462462
- Required Features: init, validate, docs
463463

464464
### Derived Features (P0)
465-
- Protocol reference system: AI needs rules before generating (Scenarios: 1)
465+
- Specification reference system: AI needs rules before generating (Scenarios: 1)
466466
- Template system: Users need starting points (Scenarios: 1, 2)
467467
- Validation CLI: Critical for both AI and developers (All scenarios)
468468

469469
### Command Design Rationale
470-
- show-protocol: AI needs rules before generating → Scenario 1
470+
- show-spec: AI needs rules before generating → Scenario 1
471471
- validate: Critical for both AI and developers → All scenarios
472472
- init: Developer quick setup → Scenario 2
473473

474474
## Components
475475
1. Parser: Parse MCP server definitions
476-
2. Validator: Verify compliance with protocol spec
476+
2. Validator: Verify compliance with specification
477477
3. CLI: mcp-spec-kit init|validate|generate
478478

479479
## Templates & Examples
@@ -485,9 +485,9 @@ templates/
485485
├── spec-kit/ # From library/sdd/spec-kit
486486
│ ├── commands/
487487
│ └── templates/
488-
└── mcp/ # Custom (from protocol/001-mcp-protocol)
488+
└── mcp/ # Custom (from domain/001-mcp-spec)
489489
├── commands/
490-
│ ├── show-protocol.md
490+
│ ├── show-spec.md
491491
│ ├── get-template.md
492492
│ └── validate-server.md
493493
└── templates/
@@ -522,7 +522,7 @@ examples/
522522
# Phase 2: Toolkit Specification (SDD)
523523
/metaspec.sdd.constitution # Define toolkit principles
524524
/metaspec.sdd.specify # Create specs/toolkit/001-parser/spec.md
525-
# Must reference: protocol/001-{domain}-specification
525+
# Must reference: domain/001-{domain}-spec
526526
/metaspec.sdd.plan # Plan toolkit architecture
527527
/metaspec.sdd.tasks # Break down implementation
528528
/metaspec.sdd.implement # Build src/ code based on toolkit spec
@@ -637,11 +637,11 @@ When you run a validation command and output already exists, you should ask the
637637

638638
### Iteration Workflow Example
639639

640-
**Scenario**: User improves protocol based on checklist feedback
640+
**Scenario**: User improves specification based on checklist feedback
641641

642642
```bash
643643
# Step 1: Initial validation
644-
User: "Run checklist to validate protocol quality"
644+
User: "Run checklist to validate specification quality"
645645
AI: /metaspec.sds.checklist
646646

647647
Output:

CHANGELOG.md

Lines changed: 74 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
---
1111

12+
## [0.5.1] - 2025-11-11
13+
14+
### 🔄 Refactoring
15+
16+
**Terminology Unification: Protocol → Specification**
17+
18+
Complete codebase-wide terminology standardization for better clarity and consistency.
19+
20+
**BREAKING CHANGES**:
21+
- **Directory**: `specs/protocol/` renamed to `specs/domain/`
22+
- **Variables**: `protocol_id``spec_id`, `PROTOCOL_NUMBER``SPEC_NUMBER`, etc.
23+
- **Commands**: `show-protocol``show-spec`
24+
- **Files**: `protocol-spec-template.md.j2``domain-spec-template.md.j2`
25+
- **YAML**: `protocol:``specification:` (frontmatter field)
26+
27+
**Statistics**:
28+
- ✅ Processed: **362 occurrences** (97.6%)
29+
- ✅ Reserved: **9 occurrences** (proper nouns: Model Context Protocol, Protocol Buffers, MCP Protocol)
30+
- ✅ Files affected: 100+
31+
- ✅ Templates updated: SDS (8), SDD (3), Base templates
32+
33+
**Impact**:
34+
- All MetaSpec commands and templates now use consistent "specification" terminology
35+
- Domain specifications located in `specs/domain/` (previously `specs/protocol/`)
36+
- All variable names, commands, and documentation updated accordingly
37+
- Preserved technical terms where "protocol" is part of a proper noun
38+
39+
**Migration Guide**:
40+
- Update any custom scripts referencing `specs/protocol/` to `specs/domain/`
41+
- Replace `protocol_id` with `spec_id` in custom specifications
42+
- Update command references from `show-protocol` to `show-spec`
43+
44+
---
45+
1246
## [0.5.0] - 2025-11-09
1347

1448
### ✨ Features
@@ -60,9 +94,9 @@ Added 3 new commands for complex specification definition:
6094

6195
**Clarity and Consistency Improvements**
6296

63-
- **Removed redundancy**: Eliminated duplicate "Protocol relationships" section in AGENTS.md
97+
- **Removed redundancy**: Eliminated duplicate "Specification relationships" section in AGENTS.md
6498
- **Fixed anchor links**: Updated 3 broken references from "Two-Feature Architecture" to "SDS + SDD Separation"
65-
- **Added numbering strategy**: Explained protocol numbering logic (001, 002-009, 010-099, 100-999)
99+
- **Added numbering strategy**: Explained specification numbering logic (001, 002-009, 010-099, 100-999)
66100
- **Updated command counts**: Synchronized across all files (README.md, CHANGELOG.md, architecture.md, templates)
67101
- **Clarified design decision**: Emphasized flat physical structure with tree logical structure
68102

@@ -80,11 +114,11 @@ Added 3 new commands for complex specification definition:
80114
**Why Flat Physical + Tree Logical?**
81115

82116
1. **Simple paths**: `specs/domain/013-credit-card-payment/` (not deeply nested)
83-
2. **FEATURE independence**: Each protocol is a standalone FEATURE with its own lifecycle
84-
3. **Flexible numbering**: Sub-protocols can use any available numbers (skip ranges)
85-
4. **Git branch friendly**: Branch name = directory name = protocol_id
117+
2. **FEATURE independence**: Each specification is a standalone FEATURE with its own lifecycle
118+
3. **Flexible numbering**: Sub-specifications can use any available numbers (skip ranges)
119+
4. **Git branch friendly**: Branch name = directory name = spec_id
86120
5. **Easy reorganization**: Change relationships via frontmatter, no file moves
87-
6. **Unlimited depth**: Any protocol can be a parent with its own sub-protocols
121+
6. **Unlimited depth**: Any specification can be a parent with its own sub-specifications
88122

89123
---
90124

@@ -233,7 +267,7 @@ For existing speckits generated with 0.x.x:
233267
- ✅ Added comprehensive frontmatter fields table with examples
234268
- ✅ Added argument access patterns documentation
235269
- ✅ Maintained MetaSpec's unique Spec-Driven positioning
236-
- ✅ Preserved dual-source architecture (Protocol-Derived + Library-Selected)
270+
- ✅ Preserved dual-source architecture (Specification-Derived + Library-Selected)
237271

238272
**Before**:
239273
```yaml
@@ -287,7 +321,7 @@ model: claude-3-5-sonnet-20241022
287321
- ✅ Tables now show: MetaSpec (specify, clarify, plan) and Generic (design, build, test)
288322

289323
**Impact**:
290-
-**Framework neutral**: No external protocol dependencies
324+
-**Framework neutral**: No external specification dependencies
291325
-**Dogfooding emphasized**: Uses MetaSpec's own commands as examples
292326
-**Clearer positioning**: General meta-framework, not MCP-specific tool
293327

@@ -425,17 +459,17 @@ MetaSpec now guides developers to design toolkits from user needs, not just tech
425459
- 20% Human Developers
426460

427461
### Key Scenarios
428-
1. AI generates MCP server → needs: show-protocol, get-template
462+
1. AI generates MCP server → needs: show-spec, get-template
429463
2. Developer validates manually → needs: init, validate, docs
430464
3. AI debugs errors → needs: validate, explain-error
431465

432466
### Derived Features (P0)
433-
- Protocol reference system (Scenarios 1, 3)
467+
- Specification reference system (Scenarios 1, 3)
434468
- Template system (Scenarios 1, 2)
435469
- Validation CLI (All scenarios)
436470

437471
### Command Design Rationale
438-
- `show-protocol`: AI needs rules before generating (Scenario 1)
472+
- `show-spec`: AI needs rules before generating (Scenario 1)
439473
- `validate`: Critical for both AI and developers (All scenarios)
440474
- `init`: Developer quick setup (Scenario 2)
441475
```
@@ -464,9 +498,9 @@ MetaSpec now guides developers to design toolkits from user needs, not just tech
464498
├── {library-spec-2}/ # Another specification system
465499
│ ├── commands/
466500
│ └── templates/
467-
└── {custom}/ # Custom (from protocol)
468-
├── commands/ # Protocol-specific Slash Commands
469-
└── templates/ # Protocol entity templates
501+
└── {custom}/ # Custom (from domain specification)
502+
├── commands/ # Specification-specific Slash Commands
503+
└── templates/ # Specification entity templates
470504
```
471505

472506
2. **Key Benefits**:
@@ -484,14 +518,14 @@ MetaSpec now guides developers to design toolkits from user needs, not just tech
484518
├── spec-kit/ # From library/sdd/spec-kit
485519
│ ├── commands/
486520
│ └── templates/
487-
└── mcp/ # Custom (from protocol/001-mcp-protocol)
521+
└── mcp/ # Custom (from domain/001-mcp-spec)
488522
├── commands/
489523
└── templates/
490524
```
491525

492526
4. **Implementation Guide**:
493527
- **Library Specifications**: Copy from MetaSpec library → `templates/{library-name}/`
494-
- **Custom Specification**: Derive from protocol`templates/{domain}/`
528+
- **Custom Specification**: Derive from domain specification`templates/{domain}/`
495529
- **Examples**: Separate top-level `examples/` directory (not under `templates/`)
496530

497531
**Why This Matters**:
@@ -506,7 +540,7 @@ MetaSpec now guides developers to design toolkits from user needs, not just tech
506540
- [ ] Library specifications mapped to `templates/{library-name}/`
507541
- [ ] Custom specification in `templates/{domain}/`
508542
- [ ] P0 Slash Commands created (from Step 2.5 STEP 4)
509-
- [ ] Entity templates match protocol entities
543+
- [ ] Entity templates match specification entities
510544
- [ ] Examples in top-level `examples/` directory
511545
- [ ] At least 1-2 complete examples
512546

@@ -618,7 +652,7 @@ MetaSpec now guides developers to design toolkits from user needs, not just tech
618652
1. **Templates Directory Structure**: Organized by specification system source
619653
2. **Template Mapping**: Library specs → directory names
620654
3. **P0 Slash Commands**: Must-implement commands from scenarios
621-
4. **Entity Templates**: Protocol entities → template files
655+
4. **Entity Templates**: Specification entities → template files
622656
5. **Examples Directory**: Separate structure with basic/advanced/use-cases
623657
6. **Implementation Checklist**: Verification checklist
624658

@@ -637,7 +671,7 @@ templates/
637671
├── spec-kit/ # From library/sdd/spec-kit
638672
│ ├── commands/
639673
│ └── templates/
640-
└── mcp/ # Custom (from protocol)
674+
└── mcp/ # Custom (from domain specification)
641675
├── commands/
642676
└── templates/
643677
@@ -709,8 +743,8 @@ examples/
709743
- Examples organization (basic/advanced)
710744

711745
3. **Updated Key Principle**:
712-
- Before: "Toolkit specs explicitly depend on protocol specs and define HOW to implement"
713-
- After: "Toolkit specs explicitly depend on protocol specs, **derive features from user scenarios**, and define HOW to implement"
746+
- Before: "Toolkit specs explicitly depend on specifications and define HOW to implement"
747+
- After: "Toolkit specs explicitly depend on specifications, **derive features from user scenarios**, and define HOW to implement"
714748

715749
**Benefits**:
716750
- ✅ AI Agents now understand how to use User Journey Analysis
@@ -766,7 +800,7 @@ examples/
766800
- Type B (Action Sequence): Each action becomes a command (like MetaSpec's specify → clarify → plan)
767801
- Judgment rule: verb/action → command, noun/state → navigation
768802

769-
3. **Embedded Protocol Knowledge**
803+
3. **Embedded Specification Knowledge**
770804
- Slash Commands now embed: entity definitions, validation rules, examples
771805
- AI can produce compliant output without external reference
772806
- Self-validation checklists included
@@ -787,7 +821,7 @@ examples/
787821
**Key Additions**:
788822

789823
1. **CLI vs Slash Commands Distinction**
790-
- Slash Commands = Protocol-Driven (workflow actions)
824+
- Slash Commands = Specification-Driven (workflow actions)
791825
- CLI Commands = Purpose-Driven (toolkit functions)
792826
- Clear separation of concerns
793827

@@ -799,12 +833,12 @@ examples/
799833
3. **4-Step CLI Derivation Process**
800834
- STEP 1: Define Toolkit Type (Generator? Validator? Query Tool?)
801835
- STEP 2: Derive CLI Commands from Type (type → commands mapping)
802-
- STEP 3: Protocol-Influenced CLI Parameters (protocol affects parameters, not commands)
836+
- STEP 3: Specification-Influenced CLI Parameters (specification affects parameters, not commands)
803837
- STEP 4: Define CLI Implementation (detailed specs for each command)
804838

805839
4. **Real-World Validation**
806840
- Analyzed 4 projects: Spec-Kit (shell scripts), OpenSpec (validator+query), MetaSpec (generator+community), Specify (generator+checker)
807-
- Confirmed: CLI commands come from toolkit purpose, not protocol workflow
841+
- Confirmed: CLI commands come from toolkit purpose, not specification workflow
808842
- Examples included for each toolkit type
809843

810844
**Impact**: AI now has clear methodology to derive appropriate CLI commands based on toolkit purpose, avoiding both over-engineering and missing essential functionality.
@@ -824,11 +858,11 @@ examples/
824858
**What Changed**:
825859

826860
1. **Slash Commands - STEP 2 (Complete Rewrite)**
827-
- ❌ Removed: Hardcoded mapping table (Protocol Content → Fixed Command Names)
828-
- ✅ Added: Command naming process (3 steps: Read protocol → Extract verbs/nouns → Form domain names)
861+
- ❌ Removed: Hardcoded mapping table (Specification Content → Fixed Command Names)
862+
- ✅ Added: Command naming process (3 steps: Read specification → Extract verbs/nouns → Form domain names)
829863
- ✅ Added: Real project patterns (Spec-Kit, OpenSpec, MetaSpec naming examples)
830864
- ✅ Added: "Command Purpose Categories" (guidance, NOT fixed names)
831-
- ✅ Example: MCP protocol`define-server`, `configure-tools` (NOT get-template)
865+
- ✅ Example: MCP specification`define-server`, `configure-tools` (NOT get-template)
832866

833867
2. **CLI Commands - STEP 2 (Complete Rewrite)**
834868
- ❌ Removed: Hardcoded command table (Toolkit Type → Fixed CLI Commands)
@@ -838,14 +872,14 @@ examples/
838872
- ✅ Example: MCP-Speckit → `show`, `docs`, `list` (NOT get-spec, get-template)
839873

840874
3. **Updated All Examples**
841-
- STEP 3: Protocol parameters (removed get-template, get-spec examples)
875+
- STEP 3: Specification parameters (removed get-template, get-spec examples)
842876
- Classification Example: Now uses domain-specific names
843877
- CLI Implementation Checklist: Removed hardcoded commands, added naming guidance
844878

845879
**Key Principle Now Enforced**:
846880
```
847881
❌ DON'T: Use generic/hardcoded names (get-spec, get-template, validate)
848-
✅ DO: Extract domain-specific names from protocol terminology
882+
✅ DO: Extract domain-specific names from specification terminology
849883
```
850884

851885
**Real Project Alignment**:
@@ -862,24 +896,24 @@ examples/
862896

863897
#### Combined Impact - Complete Command Architecture
864898

865-
**Slash Commands** (Protocol-Driven) + **CLI Commands** (Purpose-Driven) = Complete toolkit architecture
899+
**Slash Commands** (Specification-Driven) + **CLI Commands** (Purpose-Driven) = Complete toolkit architecture
866900

867901
**Before** ❌:
868902
- Generic templates (init, validate, generate)
869903
- No methodology for command derivation
870904
- Confusion between CLI and Slash Commands
871905

872906
**After** ✅:
873-
- Protocol-derived Slash Commands (from workflow, entities, validation rules)
907+
- Specification-derived Slash Commands (from workflow, entities, validation rules)
874908
- Purpose-derived CLI Commands (from toolkit type)
875909
- Clear separation and derivation methodology
876910

877911
**Example - MCP-Speckit**:
878912
```
879-
Slash Commands (from MCP protocol):
880-
/mcpspeckit.define-requirements ← From protocol workflow
881-
/mcpspeckit.create-design ← From protocol entities
882-
/mcpspeckit.generate-code ← From protocol operations
913+
Slash Commands (from MCP specification):
914+
/mcpspeckit.define-requirements ← From specification workflow
915+
/mcpspeckit.create-design ← From specification entities
916+
/mcpspeckit.generate-code ← From specification operations
883917
884918
CLI Commands (from toolkit purpose):
885919
mcpspeckit validate <file> ← Toolkit = Validator
@@ -905,9 +939,9 @@ CLI Commands (from toolkit purpose):
905939

906940
### ✨ New Features - Phase 1: Complete Iteration-Aware Design
907941
- **All Validation/Analysis Commands** now support iterative refinement:
908-
- `/metaspec.sds.checklist` - Protocol quality validation with iteration tracking
909-
- `/metaspec.sds.analyze` - Protocol consistency analysis with progress comparison
910-
- `/metaspec.sds.clarify` - Protocol ambiguity resolution with resolved item tracking
942+
- `/metaspec.sds.checklist` - Specification quality validation with iteration tracking
943+
- `/metaspec.sds.analyze` - Specification consistency analysis with progress comparison
944+
- `/metaspec.sds.clarify` - Specification ambiguity resolution with resolved item tracking
911945
- `/metaspec.sdd.checklist` - Toolkit quality validation with iteration tracking
912946
- `/metaspec.sdd.analyze` - Toolkit consistency analysis with progress comparison
913947
- `/metaspec.sdd.clarify` - Toolkit ambiguity resolution with resolved item tracking
@@ -976,7 +1010,7 @@ CLI Commands (from toolkit purpose):
9761010
- Template files now properly included in distribution
9771011

9781012
### 🎯 Improvements
979-
- **SDS/SDD Symmetry**: Better alignment between protocol and toolkit workflows
1013+
- **SDS/SDD Symmetry**: Better alignment between specification and toolkit workflows
9801014
- **Quality Assurance**: Comprehensive quality validation for both SDS and SDD layers
9811015

9821016
## [0.1.2] - 2025-11-04

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ uv run mypy src/metaspec # Type check
438438

439439
**v0.5.0** - Alpha Release 🎉
440440

441-
Core features complete: YAML validation, multi-domain generation, CLI tools, AI agent support, built-in MetaSpec commands (19 commands: 8 SDS + 8 SDD + 3 Evolution), recursive tree structure for protocols, unified spec interface.
441+
Core features complete: YAML validation, multi-domain generation, CLI tools, AI agent support, built-in MetaSpec commands (19 commands: 8 SDS + 8 SDD + 3 Evolution), recursive tree structure for specifications, unified spec interface.
442442

443443
---
444444

0 commit comments

Comments
 (0)