Skip to content

Commit ced7c2c

Browse files
committed
Unify terminology: protocol → specification
- Update AGENTS.md: Use 'specification' instead of 'protocol' consistently - Update all SDS command templates: specify, plan, tasks, implement - Update SDD specify template: Unify dependency descriptions - Update generator.py: Revise comments - Note: specs/protocol/ directory name kept for historical reasons, but documentation refers to 'domain specifications'
1 parent 95b5b46 commit ced7c2c

File tree

7 files changed

+178
-178
lines changed

7 files changed

+178
-178
lines changed

AGENTS.md

Lines changed: 97 additions & 97 deletions
Large diffs are not rendered by default.

src/metaspec/generator.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -274,21 +274,21 @@ def _select_templates(self, meta_spec: MetaSpecDefinition) -> dict[str, str]:
274274
# 3. MetaSpec commands and templates for speckit development → .metaspec/
275275
# These provide AI-assisted workflow for developing the speckit itself
276276
# Three-layer architecture:
277-
# - SDS (Spec-Driven Specification): 8 commands for protocol definition
277+
# - SDS (Spec-Driven Specification): 8 commands for specification definition
278278
# - SDD (Spec-Driven Development): 8 commands for toolkit development
279279
# - Evolution: 3 shared commands for specification evolution
280280

281-
# SDS commands (8): Protocol specification definition
281+
# SDS commands (8): Domain specification definition
282282
# File naming: metaspec.sds.{command}.md to use /metaspec.sds.{command} prefix
283283
sds_commands = [
284-
"constitution", # Define protocol principles
285-
"specify", # Define protocol entities and operations
286-
"clarify", # Resolve protocol ambiguities
287-
"plan", # Plan protocol architecture and sub-specifications
288-
"tasks", # Break down protocol specification work
289-
"implement", # Write protocol specification documents
290-
"checklist", # Generate quality checklist for protocol
291-
"analyze", # Check protocol consistency
284+
"constitution", # Define specification design principles
285+
"specify", # Define specification entities and operations
286+
"clarify", # Resolve specification ambiguities
287+
"plan", # Plan specification architecture and sub-specifications
288+
"tasks", # Break down specification work
289+
"implement", # Write specification documents
290+
"checklist", # Generate quality checklist for specification
291+
"analyze", # Check specification consistency
292292
]
293293

294294
for cmd in sds_commands:

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ ls specs/protocol/ | grep -E '^[0-9]{3}-'
4040
If no protocol specs exist, **STOP** and show this error:
4141

4242
```
43-
❌ ERROR: Cannot create toolkit without protocol specification
43+
❌ ERROR: Cannot create toolkit without domain specification
4444

45-
MetaSpec is a Spec-Driven framework. Every toolkit MUST depend on a protocol.
45+
MetaSpec is a Spec-Driven framework. Every toolkit MUST depend on a specification.
4646

47-
The protocol defines WHAT (domain specification).
47+
The specification defines WHAT (domain specification).
4848
The toolkit defines HOW (implementation).
4949

5050
Please run this command first:
51-
/metaspec.sds.specify "Define {domain} protocol"
51+
/metaspec.sds.specify "Define {domain} specification"
5252

5353
Then return to create toolkit with:
5454
/metaspec.sdd.specify "Create {toolkit} for {domain}"
@@ -169,28 +169,28 @@ Generate **Toolkit Implementation Specification** with these sections:
169169

170170
#### **Dependencies Section** (REQUIRED - CRITICAL)
171171

172-
**First and foremost**, declare dependencies on protocol specifications:
172+
**First and foremost**, declare dependencies on domain specifications:
173173

174174
```markdown
175175
## Dependencies
176176

177-
**Protocol Specifications**:
178-
- **protocol/001-{domain}-protocol** - {Brief description of what protocol defines}
177+
**Domain Specifications**:
178+
- **protocol/001-{domain}-specification** - {Brief description of what specification defines}
179179

180180
### Dependency Rationale
181181

182-
{Explain how this toolkit depends on the protocol:}
183-
- Which protocol entities are parsed/validated?
184-
- Which protocol rules are enforced?
185-
- How does the toolkit implement protocol operations?
182+
{Explain how this toolkit depends on the specification:}
183+
- Which specification entities are parsed/validated?
184+
- Which specification rules are enforced?
185+
- How does the toolkit implement specification operations?
186186

187187
**Important**:
188-
- This toolkit MUST reference at least one protocol specification
189-
- Changes to protocol specs may require updates to this toolkit
190-
- Without protocol dependency, this violates the Spec-Driven principle
188+
- This toolkit MUST reference at least one domain specification
189+
- Changes to specification may require updates to this toolkit
190+
- Without specification dependency, this violates the Spec-Driven principle
191191
```
192192

193-
**CRITICAL**: This Dependencies section is mandatory. Toolkit without protocol is not a valid speckit.
193+
**CRITICAL**: This Dependencies section is mandatory. Toolkit without specification is not a valid speckit.
194194

195195
#### **Toolkit Overview**
196196
```markdown

src/metaspec/templates/meta/sds/commands/implement.md.j2

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Execute protocol specification writing by processing and completing all tasks from tasks.md
2+
description: Execute specification writing by processing and completing all tasks from tasks.md
33
---
44

55
## User Input
@@ -35,9 +35,9 @@ You **MUST** consider the user input before proceeding (if not empty).
3535
Get current protocol from Git branch or SPECIFY_FEATURE:
3636
```bash
3737
# From Git branch
38-
current_protocol=$(git branch --show-current)
38+
current_spec=$(git branch --show-current)
3939
# Or from environment variable
40-
current_protocol=$SPECIFY_FEATURE
40+
current_spec=$SPECIFY_FEATURE
4141

4242
# Example: "003-payment-processing"
4343
```
@@ -54,14 +54,14 @@ type: parent
5454
---
5555
```
5656

57-
**Store context for sub-protocol creation**:
57+
**Store context for sub-specification creation**:
5858
- `current_id`: "003-payment-processing"
5959
- `parent_id`: "001-order-protocol" or null
6060
- `root_id`: "001-order-protocol"
6161

62-
**This context will be passed to specify** when creating sub-protocols:
62+
**This context will be passed to specify** when creating sub-specifications:
6363
- Sub-protocols will have: parent={current_id}, root={root_id}
64-
- Example: If current=003, sub-protocol 013 will have parent=003, root=001
64+
- Example: If current=003, sub-specification 013 will have parent=003, root=001
6565

6666
**Step 2c: Read Planning Documents**
6767

@@ -230,7 +230,7 @@ Phase 4: Cross-Reference Validation
230230
- specify will create 013-credit-card-payment/ with correct frontmatter
231231
- specify generates spec.md with parent chain
232232

233-
d. **Verify sub-protocol created**:
233+
d. **Verify sub-specification created**:
234234
```yaml
235235
# Generated in specs/protocol/013-credit-card-payment/spec.md
236236
---
@@ -295,7 +295,7 @@ Phase 4: Cross-Reference Validation
295295

296296
### Dependency Rationale
297297

298-
{Explain what this sub-protocol depends on from core protocol:}
298+
{Explain what this sub-specification depends on from core protocol:}
299299
- Entities used: [List core entities referenced]
300300
- Operations extended: [List operations]
301301
- Validation rules inherited: [List rules]
@@ -306,11 +306,11 @@ Phase 4: Cross-Reference Validation
306306

307307
**Name**: {Sub-Protocol Name}
308308
**Domain**: {Specific concern within main protocol}
309-
**Purpose**: {What problem this sub-protocol solves}
309+
**Purpose**: {What problem this sub-specification solves}
310310

311311
**Problem Statement**: {Detailed problem description}
312312

313-
**Solution**: {How this sub-protocol addresses the problem}
313+
**Solution**: {How this sub-specification addresses the problem}
314314

315315
**Scope**:
316316
- ✅ Included: {What's in scope}
@@ -320,7 +320,7 @@ Phase 4: Cross-Reference Validation
320320

321321
## Glossary
322322

323-
{Terms specific to this sub-protocol}
323+
{Terms specific to this sub-specification}
324324

325325
- **{Term 1}**: {Definition}
326326
- Example: {Example usage}
@@ -354,7 +354,7 @@ Phase 4: Cross-Reference Validation
354354

355355
## Core Entities
356356

357-
{Entities specific to this sub-protocol}
357+
{Entities specific to this sub-specification}
358358

359359
### Entity: {EntityName}
360360

@@ -392,7 +392,7 @@ entity_name:
392392

393393
## Workflow
394394

395-
{If this sub-protocol involves state transitions or lifecycle}
395+
{If this sub-specification involves state transitions or lifecycle}
396396

397397
### State Machine: {Entity Name}
398398

@@ -417,7 +417,7 @@ entity_name:
417417

418418
## Protocol Operations
419419

420-
{Operations specific to this sub-protocol}
420+
{Operations specific to this sub-specification}
421421

422422
### Operation: {operation_name}
423423

@@ -536,8 +536,8 @@ error_response:
536536
### Entity References
537537

538538
**From Core Protocol**:
539-
- {Core Entity 1}: {How used in this sub-protocol}
540-
- {Core Entity 2}: {How used in this sub-protocol}
539+
- {Core Entity 1}: {How used in this sub-specification}
540+
- {Core Entity 2}: {How used in this sub-specification}
541541

542542
### Operation Extensions
543543

@@ -569,7 +569,7 @@ error_response:
569569

570570
## Version History
571571

572-
- **v1.0.0** ({date}): Initial sub-protocol specification
572+
- **v1.0.0** ({date}): Initial sub-specification specification
573573
- Defined {N} entities
574574
- Specified {N} operations
575575
- Established {N} validation rules

src/metaspec/templates/meta/sds/commands/plan.md.j2

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Plan protocol specification structure by analyzing complexity and organizing sub-specifications
2+
description: Plan specification structure by analyzing complexity and organizing sub-specifications
33
---
44

55
## User Input
@@ -12,56 +12,56 @@ You **MUST** consider the user input before proceeding (if not empty).
1212

1313
## Outline
1414

15-
**Goal**: Analyze protocol complexity and plan the specification structure, including identifying necessary sub-specifications and their dependencies.
15+
**Goal**: Analyze specification complexity and plan the specification structure, including identifying necessary sub-specifications and their dependencies.
1616

17-
**Important**: This command runs AFTER `/metaspec.sds.specify` when initial protocol concept is defined. It determines whether the protocol needs to be split into multiple sub-specifications.
17+
**Important**: This command runs AFTER `/metaspec.sds.specify` when initial specification concept is defined. It determines whether the specification needs to be split into multiple sub-specifications.
1818

1919
### Execution Flow
2020

21-
#### 1. Load Protocol Context
21+
#### 1. Load Specification Context
2222

23-
**Step 1a: Determine Current Protocol**
23+
**Step 1a: Determine Current Specification**
2424

25-
Get current protocol from Git branch or SPECIFY_FEATURE:
25+
Get current specification from Git branch or SPECIFY_FEATURE:
2626
```bash
2727
# From Git branch
28-
current_protocol=$(git branch --show-current)
28+
current_spec=$(git branch --show-current)
2929
# Or from environment variable
30-
current_protocol=$SPECIFY_FEATURE
30+
current_spec=$SPECIFY_FEATURE
3131

3232
# Example: "003-payment-processing"
3333
```
3434

3535
**Step 1b: Read Protocol Specification**
3636

37-
Read the spec.md for current protocol:
37+
Read the spec.md for current specification:
3838
```bash
3939
# Read the spec.md
40-
cat specs/protocol/${current_protocol}/spec.md
40+
cat specs/protocol/${current_spec}/spec.md
4141
```
4242

4343
**Step 1c: Extract Metadata** (from YAML frontmatter)
4444

4545
Parse frontmatter to understand context:
4646
```yaml
4747
---
48-
protocol_id: 003-payment-processing
48+
spec_id: 003-payment-processing
4949
parent: 001-order-protocol
5050
root: 001-order-protocol
5151
type: parent # or leaf or root
5252
---
5353
```
5454

5555
**Store context**:
56-
- `current_id`: protocol_id (e.g., "003-payment-processing")
56+
- `current_id`: spec_id (e.g., "003-payment-processing")
5757
- `parent_id`: parent (e.g., "001-order-protocol" or null)
5858
- `root_id`: root (e.g., "001-order-protocol")
5959
- `current_type`: type (e.g., "parent", "leaf", "root")
6060

6161
**This tells us**:
62-
- Where this protocol is in the hierarchy
63-
- Can inform numbering for sub-protocols
64-
- Understand if this is already a sub-protocol (can have sub-sub-protocols)
62+
- Where this specification is in the hierarchy
63+
- Can inform numbering for sub-specifications
64+
- Understand if this is already a sub-specification (can have sub-sub-specifications)
6565

6666
**Step 1d: Extract Specification Content**
6767

@@ -128,7 +128,7 @@ Note: Adjusted to align with 1500-line threshold mentioned in Decision Matrix
128128

129129
**Output format (both cases)**:
130130
```
131-
Protocol Analysis: {protocol_id}
131+
Protocol Analysis: {spec_id}
132132

133133
📊 Complexity Assessment:
134134
- Lines: {line_count}
@@ -149,7 +149,7 @@ Protocol Analysis: {protocol_id}
149149
Reason: Specification is manageable (complexity: {score:.2f})
150150

151151
This protocol does not need to be split into sub-specifications.
152-
It is a **leaf protocol** - a complete, self-contained specification.
152+
It is a **leaf specification** - a complete, self-contained specification.
153153

154154
Next Steps:
155155
✅ Specification is ready
@@ -610,7 +610,7 @@ graph TD
610610
- Is modular documentation valuable?
611611
612612
4. **Consider evolution**
613-
- Will parts of the protocol evolve at different rates?
613+
- Will parts of the specification evolve at different rates?
614614
- Do some sections need stricter stability guarantees?
615615
- Is independent versioning valuable?
616616

src/metaspec/templates/meta/sds/commands/specify.md.j2

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Define domain protocol specification (SDS - Spec-Driven Specification)
2+
description: Define domain specification (SDS - Spec-Driven Specification)
33
---
44

55
## User Input
@@ -12,15 +12,15 @@ You **MUST** consider the user input before proceeding (if not empty).
1212

1313
## Outline
1414

15-
The text the user typed after `/metaspec.sds.specify` is the **protocol specification description**.
15+
The text the user typed after `/metaspec.sds.specify` is the **domain specification description**.
1616

17-
**PURPOSE: Protocol Specification (SDS)** 🎯
17+
**PURPOSE: Domain Specification (SDS)** 🎯
1818

19-
This command is for defining **domain protocols, rules, and standards**:
20-
- Focus: WHAT the protocol is
19+
This command is for defining **domain specifications, rules, and standards**:
20+
- Focus: WHAT the domain specification is
2121
- Output: `specs/protocol/001-{name}/spec.md`
2222
- Independent of any implementation
23-
- Pure protocol definition
23+
- Pure domain specification
2424

2525
**NOT for toolkit implementation** - Use `/metaspec.sdd.specify` for that.
2626

@@ -220,7 +220,7 @@ Describe real-world scenarios where this protocol applies:
220220

221221
#### **Core Entities**
222222

223-
Define protocol entities (NOT toolkit entities):
223+
Define specification entities (NOT toolkit entities):
224224

225225
**Template**:
226226
```markdown
@@ -390,7 +390,7 @@ Comprehensive list of all protocol constraints:
390390

391391
#### **Error Handling**
392392

393-
Define protocol-level error handling:
393+
Define specification-level error handling:
394394

395395
```markdown
396396
## Error Handling

0 commit comments

Comments
 (0)