Skip to content

Commit b5a734f

Browse files
committed
refactor: Streamline redundant examples and explanations
## Content Optimization Reduced file from 1835 to 1762 lines (73 lines, 4% reduction) ### Changes Made 1. STEP 2 (Slash Commands) - Simplified Example Before: 35 lines of detailed MCP derivation example After: 10 lines quick reference Saved: ~25 lines 2. STEP 3 (Classification) - Condensed Example Before: 60 lines of detailed MCP classification After: 18 lines summary with key points Saved: ~45 lines 3. STEP 5 - Removed Redundant Explanation Before: Re-explained command types (duplicate of STEP 3) After: Reference to STEP 3 definitions Saved: ~3 lines ### Strategy - First occurrence: Full explanation (Component 3) - Subsequent occurrences: Quick reference or cross-reference - Maintains completeness while reducing repetition ### Why This Matters Before: MCP example repeated 5-6 times in detail - Reader fatigue from repetition - Longer document to navigate After: Strategic use of examples - Key information preserved - Cross-references guide readers - More concise and readable Files changed: - src/metaspec/templates/meta/sdd/commands/specify.md.j2 - CHANGELOG.md
1 parent ccce6e3 commit b5a734f

File tree

2 files changed

+29
-92
lines changed

2 files changed

+29
-92
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3636
- Clarified: Source 2 reuses proven commands (select + adapt + integrate)
3737
- Context: Source 1 = derive from scratch (7 steps), Source 2 = reuse (3 steps)
3838

39+
6. **Streamlined Redundant Examples** (Content Optimization)
40+
- Reduced MCP example repetition (30 mentions → focused usage)
41+
- STEP 2: Full MCP example → Quick reference (saved ~25 lines)
42+
- STEP 3: Full classification example → Summary (saved ~45 lines)
43+
- STEP 5: Command type re-explanation → Reference to STEP 3 (saved ~3 lines)
44+
- Total reduction: 1835 → 1762 lines (73 lines, 4% reduction)
45+
3946
**Why This Matters**:
4047
- Eliminates reader confusion about CLI command duplication
4148
- Clear hierarchical structure for better navigation
4249
- Explicit cross-references show relationships between sections
4350
- Justifies design decisions (why Source 2 is intentionally simpler)
51+
- Reduces redundancy: More concise, easier to read
52+
- Maintains completeness: Key information preserved, details referenced
4453

4554
**Files Changed**:
4655
- src/metaspec/templates/meta/sdd/commands/specify.md.j2 (structure improvements)

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

Lines changed: 20 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -805,42 +805,15 @@ Option C: Composed (Recommended)
805805

806806
---
807807

808-
**Example Derivation - MCP Protocol**:
808+
**Example**: See Component 3 for MCP-Speckit naming examples.
809809

810+
**Quick Reference**:
810811
```markdown
811-
## Protocol Analysis (specs/protocol/001-mcp/spec.md)
812-
813-
### Workflow Phases (from protocol):
814-
1. "Define MCP Server"
815-
2. "Configure Tools and Resources"
816-
3. "Implement Tool Handlers"
817-
4. "Test Server"
818-
5. "Deploy to Production"
819-
820-
### Derived Command Names (domain-specific):
821-
822-
**From workflow phases** (Type B - Action sequence):
823-
✅ define-server ← "Define MCP Server"
824-
✅ configure-tools ← "Configure Tools"
825-
✅ add-resource ← "Add Resource"
826-
✅ implement-handler ← "Implement Handler"
827-
✅ test-server ← "Test Server"
828-
829-
**From entity types** (if needed):
830-
✅ init-server ← Work with Server entity
831-
✅ add-tool ← Work with Tool entity
832-
833-
**From validation rules** (if needed):
834-
✅ validate-server ← Validate against MCP schema
835-
✅ check-config ← Check configuration
836-
837-
**NOT using**:
838-
❌ get-template ← Too generic
839-
❌ get-spec ← Doesn't reflect MCP domain
840-
❌ validate ← What are we validating?
841-
```
812+
Protocol workflow: "Define Server" → Command: `define-server`
813+
Protocol entity: "Server" → Command: `init-server`
814+
Protocol validation: "Validate Config" → Command: `validate-server`
842815

843-
**Result**: 5-8 domain-specific commands that match MCP terminology
816+
Key principle: Extract verb+noun from protocol terminology
844817
```
845818

846819
---
@@ -893,67 +866,26 @@ For each derived command, ask:
893866
metaspec init → Separate CLI for generation
894867
```
895868

896-
**Classification Example - MCP Protocol**:
869+
**Classification Result**:
897870

898871
```markdown
899-
## Command Classification
900-
901-
### Pure-Execution (Most Common)
902-
AI produces content directly, no support needed:
903-
904-
- ❌ CLI, ❌ Script
905-
- ✅ Slash: /mcpspeckit.define-requirements.md
906-
- Embeds: MCP protocol requirements entity
907-
- AI produces: requirements.json
908-
- Validation: User can run `mcpspeckit validate` later
909-
910-
- ✅ Slash: /mcpspeckit.clarify-requirements.md
911-
- Embeds: Requirements refinement guidance
912-
- AI produces: Updated requirements.json
913-
914-
- ✅ Slash: /mcpspeckit.create-design.md
915-
- Embeds: MCP protocol design entity
916-
- AI produces: design.json
917-
918-
- ✅ Slash: /mcpspeckit.generate-code.md
919-
- Embeds: Code generation rules
920-
- AI produces: Source code files
872+
For each derived command, classify as:
921873

922-
### Script-Assisted (Spec-Kit Pattern)
923-
AI produces content, helper script sets up structure:
924-
925-
- ❌ CLI, ✅ Script
926-
- ✅ Slash: /mcpspeckit.init-project.md
927-
- Calls: scripts/setup-project.sh
928-
- Script creates: Directory structure, config files
929-
- AI fills: Project-specific content
930-
931-
### CLI-Referenced (OpenSpec Pattern)
932-
AI produces, independent CLI validates:
933-
934-
- ✅ CLI: mcpspeckit validate <file>
935-
- Validates JSON against MCP schema
936-
- Used independently by user
874+
- **Pure-Execution**: AI produces content → Slash only
875+
- Example: define-server, create-design (most common)
937876

938-
- ✅ CLI: mcpspeckit show [section]
939-
- Displays protocol documentation
940-
- AI can reference in Slash Command
877+
- **Script-Assisted**: Need structure setup → Script + Slash
878+
- Example: init-project (if creating directories)
941879

942-
- ✅ CLI: mcpspeckit docs <topic>
943-
- Access MCP documentation
944-
- AI uses as reference
880+
- **CLI-Referenced**: Need independent validation → CLI + Slash
881+
- Example: validate command (See Component 3 for CLI design)
945882

946-
- ✅ Slash: /mcpspeckit.validate.md (optional)
947-
- Purpose: Remind AI to suggest validation
948-
- Content: "After producing X, suggest: mcpspeckit validate X"
883+
**Typical Counts**:
884+
- Slash Commands: 4-8
885+
- Helper Scripts: 1-2 (if Script-Assisted)
886+
- CLI Commands: 3-5 (if CLI-Referenced, defined in Component 3)
949887
```
950888

951-
**Command Counts**:
952-
- **Slash Commands**: 4-8 (Pure-Execution + Script-Assisted + optional guides)
953-
- **Helper Scripts**: 1-2 (if using Script-Assisted pattern)
954-
- **CLI Commands**: 3-5 (validate, show, docs, list - independent tools)
955-
- **Total**: Slash ≥ CLI (normal pattern)
956-
957889
---
958890

959891
#### STEP 4: Implement Support Tools (CLI + Scripts)
@@ -1042,13 +974,9 @@ Based on your toolkit functions (from Component 3 STEP 1), implement:
1042974

1043975
#### STEP 5: Create Spec-Driven Slash Commands (All Types)
1044976

1045-
**CRITICAL**: Create Slash Commands based on command type (Pure-Execution, Script-Assisted, CLI-Referenced).
1046-
1047-
**Slash Command Purpose by Type**:
977+
**Based on classification in STEP 3**, create appropriate Slash Command templates for each type.
1048978

1049-
- **Pure-Execution**: Embed protocol → Guide AI to produce content (most common)
1050-
- **Script-Assisted**: Call helper script → AI fills content (Spec-Kit pattern)
1051-
- **CLI-Referenced**: Guide AI production → Suggest CLI validation (OpenSpec pattern)
979+
**Reference**: See STEP 3 for command type definitions (Pure-Execution, Script-Assisted, CLI-Referenced).
1052980

1053981
---
1054982

0 commit comments

Comments
 (0)