Skip to content

Commit 1ac54f4

Browse files
committed
fix: SDD specify generates workflow commands instead of entity commands (v0.7.2)
Critical fix for toolkit command generation logic: Fix 1: Add 'Determine Toolkit Type' section - Distinguish Type A (Data-Access) vs Type B (Workflow-Guidance) - Default to Type B for speckits - Add checkpoint before STEP 1 Fix 2: Modify 'Entities & Structures' prompt - Change from 'work with entities' to 'specification structures' - Add explicit warning against entity commands - Provide anti-pattern examples Fix 3: Strengthen 'Workflows & Phases' guidance - Mark as CRITICAL FOR TYPE B - Use spec-kit pattern as base example (real project) - Add 'Adaptation Principle' for customization - Provide domain-specific adaptation examples Fix 4: Add 'Anti-Patterns to Avoid' section - List 3 common mistakes with examples - Add 'Golden Rule for Type B Toolkits' - Show spec-kit → domain adaptations - Emphasize 'customize freely' principle Impact: - Before: Generated entity commands (/domain.project) - After: Generates workflow commands (adapt spec-kit pattern) - Guides proper customization while providing proven base Aligns with spec-kit and MetaSpec's own design pattern.
1 parent 4c2faeb commit 1ac54f4

File tree

4 files changed

+341
-23
lines changed

4 files changed

+341
-23
lines changed

CHANGELOG.md

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

1010
---
1111

12+
## [0.7.2] - 2025-11-16
13+
14+
### 🔧 Critical Bug Fix - SDD Specify Command Generation Logic
15+
16+
**Fixes MetaSpec generating entity commands instead of workflow commands for speckits**
17+
18+
This release addresses a fundamental design flaw in `/metaspec.sdd.specify` that caused it to generate entity operation commands (e.g., `/marketing.project`, `/marketing.campaign`) instead of workflow commands (e.g., `/marketingspec.discover`, `/marketingspec.strategy`) when creating new speckits.
19+
20+
### Context
21+
22+
**Issue discovered**: When using MetaSpec to generate a new speckit, the toolkit spec could incorrectly define entity operation commands (e.g., 22 entity commands), contradicting the design pattern used by both spec-kit and MetaSpec itself (which only use workflow commands).
23+
24+
**Root cause**: The SDD specify template contained misleading prompts that suggested generating commands from domain entities, rather than from workflow phases.
25+
26+
### Changed
27+
28+
#### `/metaspec.sdd.specify` Command Template
29+
30+
**Fix 1: Added "Determine Toolkit Type" Section** (NEW)
31+
- Introduces explicit distinction between:
32+
- **Type A: Data-Access Toolkit** (Rare) - API clients with entity operations
33+
- **Type B: Workflow-Guidance Toolkit** (Speckit Standard) - Speckits with workflow commands
34+
- Includes checkpoint to confirm Type B selection before proceeding
35+
- Provides clear examples of both patterns
36+
- Default: Type B (Workflow-Guidance) for speckits
37+
38+
**Fix 2: Modified "Entities & Structures" Prompt**
39+
- Changed from: "Need commands to work with entities" ❌
40+
- Changed to: "Entities are specification structures, not data objects" ✅
41+
- Added explicit warning: "Do NOT generate entity operation commands"
42+
- Provides anti-pattern example:
43+
```
44+
❌ Wrong: Domain has Project, Campaign → Generate /marketing.project
45+
✅ Right: Workflow has Discover, Strategy → Generate /marketingspec.discover
46+
```
47+
48+
**Fix 3: Strengthened "Workflows & Phases" Guidance**
49+
- Marked as "⭐ CRITICAL FOR TYPE B"
50+
- Added detailed workflow-to-command derivation examples using MetaSpec's own pattern
51+
- Added domain-specific speckit example showing correct workflow command derivation
52+
- Emphasized: "Derive workflow commands from phases, not entity commands from entities"
53+
54+
**Fix 4: Added "Anti-Patterns to Avoid" Section** (NEW)
55+
- Lists 3 common mistakes:
56+
1. Entity-Based Commands (for Type B toolkits)
57+
2. Forgetting MetaSpec's Own Pattern
58+
3. Missing Workflow Analysis
59+
- Includes before/after examples for each anti-pattern
60+
61+
### Impact
62+
63+
**Before this fix**:
64+
```
65+
/metaspec.sdd.specify
66+
67+
AI sees: "Domain has 9 entities"
68+
69+
AI generates: 22 entity operation commands ❌
70+
71+
Result: /marketing.project, /marketing.campaign, etc.
72+
```
73+
74+
**After this fix**:
75+
```
76+
/metaspec.sdd.specify
77+
78+
AI confirms: Type B - Workflow-Guidance ✅
79+
80+
AI analyzes: Workflow phases (not entities)
81+
82+
AI generates: 10 workflow commands ✅
83+
84+
Result: /marketingspec.discover, /marketingspec.strategy, etc.
85+
```
86+
87+
### Migration Guide
88+
89+
**For existing speckits generated with older MetaSpec**:
90+
91+
If your toolkit spec contains entity operation commands instead of workflow commands:
92+
93+
1. **Check your current commands**:
94+
```bash
95+
cat specs/toolkit/001-*/spec.md | grep "Component 4"
96+
```
97+
98+
2. **If you see entity commands** (e.g., `/domain.entity`):
99+
- ❌ This is the old, incorrect pattern
100+
101+
3. **Regenerate toolkit spec**:
102+
```bash
103+
# Backup current spec
104+
mv specs/toolkit/001-*/ specs/toolkit/001-*.backup/
105+
106+
# Regenerate with fixed command
107+
/metaspec.sdd.specify
108+
109+
# Verify you now have workflow commands
110+
cat specs/toolkit/001-*/spec.md | grep "Component 4"
111+
```
112+
113+
4. **Expected result**: Workflow commands (e.g., `/domainspec.discover`)
114+
115+
**No action needed if**:
116+
- Your toolkit already uses workflow commands
117+
- Your toolkit was hand-crafted (not auto-generated)
118+
119+
### References
120+
121+
- **Fix Proposal**: `docs/internal/sdd-specify-fix-proposal.md`
122+
- **Pattern Source**: MetaSpec's own command structure (dogfooding)
123+
- **Precedent**: spec-kit uses only workflow commands
124+
125+
### Why This Matters
126+
127+
This fix ensures MetaSpec's SDD workflow correctly generates workflow-guidance toolkits (Type B) by default, aligning with its own design pattern and the broader speckit ecosystem. Without this fix, generated speckits would contradict the core philosophy of spec-driven development.
128+
129+
---
130+
12131
## [0.7.1] - 2025-11-15
13132

14133
### ✨ Quality Gates Enhancement - Workflow Validation
@@ -48,7 +167,7 @@ v0.7.0 introduced Workflow Completeness principle. v0.7.1 adds automated validat
48167

49168
**Location**: `/metaspec.sds.analyze` command template
50169

51-
**Why it matters**: Prevents "high-score but no workflow" problem discovered in marketing-spec-kit
170+
**Why it matters**: Prevents "high-score but no workflow" problem discovered in real-world usage
52171

53172
### Changed
54173

@@ -92,7 +211,7 @@ Specification without workflow → ❌ CRITICAL in analyze
92211

93212
### Rationale
94213

95-
**Feedback-driven improvement**: marketing-spec-kit passed all quality checks (98/100) but lacked workflow definition. v0.7.1 ensures this can't happen again.
214+
**Feedback-driven improvement**: A real-world speckit passed all quality checks (98/100) but lacked workflow definition. v0.7.1 ensures this can't happen again.
96215

97216
**Three-layer enforcement**:
98217
1. **v0.7.0**: Constitution requires workflows (principle)
@@ -101,7 +220,6 @@ Specification without workflow → ❌ CRITICAL in analyze
101220

102221
### References
103222

104-
- **Feedback Source**: `/Users/guyue/marketing-spec-kit/docs/internal/metaspec-feedback.md`
105223
- **Related Version**: v0.7.0 (introduced Workflow Completeness principle)
106224
- **Philosophy**: Enforcement through automated quality gates
107225

@@ -210,7 +328,7 @@ SDS Workflow:
210328

211329
### 💡 Rationale
212330

213-
**Feedback Source**: Real-world development of `marketing-spec-kit`
331+
**Feedback Source**: Real-world speckit development
214332
- Followed complete SDS + SDD workflow
215333
- All quality checks passed (50/50, 98/100)
216334
- Final result: 13 isolated commands without clear workflow
@@ -236,7 +354,6 @@ SDS Workflow:
236354

237355
### 📚 References
238356

239-
- **Feedback Document**: `/Users/guyue/marketing-spec-kit/docs/internal/metaspec-feedback.md`
240357
- **Related Issue**: Design gap identified through real-world usage
241358
- **Philosophy**: Workflow Systems vs Tool Boxes
242359

@@ -361,7 +478,7 @@ Fixed Issue title only showing `[Register]` prefix without speckit name.
361478
**Fix**:
362479
- Added `title` URL parameter back with speckit name
363480
- Title format: `[Register] {speckit-name}`
364-
- Example: `[Register] marketing-spec-kit`
481+
- Example: `[Register] my-speckit`
365482

366483
**Before (v0.6.5)**:
367484
```
@@ -421,7 +538,7 @@ https://github.com/.../issues/new?template=register-speckit.yml&repository=...
421538
```
422539

423540
**References**:
424-
- Bug Report: marketing-spec-kit registration failure
541+
- Issue: Speckit registration failure discovered in testing
425542
- Broken Example: awesome-spec-kits#6 (empty body)
426543
- Working Template: `.github/ISSUE_TEMPLATE/register-speckit.yml`
427544

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "meta-spec"
3-
version = "0.7.1"
3+
version = "0.7.2"
44
description = "Meta-specification framework for generating Spec-Driven X (SD-X) toolkits for AI agents"
55
readme = "README.md"
66
requires-python = ">=3.11"

src/metaspec/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from YAML definitions.
66
"""
77

8-
__version__ = "0.7.1"
8+
__version__ = "0.7.2"
99

1010
__all__ = ["__version__"]
1111

0 commit comments

Comments
 (0)