Skip to content

Commit f1ddce4

Browse files
committed
feat: Introduce Workflow-Driven Design Philosophy (v0.7.0)
Major Feature: Added Workflow Completeness Principle - Added Part II Principle 7 'Workflow Completeness' to Constitution template - Added 'Workflow Specification' section to domain spec template - Updated AGENTS.md with workflow-driven design philosophy - Version bump: 0.6.8 → 0.7.0 This addresses a fundamental design gap where speckits could pass quality checks but lack clear user workflows. Now all domain specifications must define complete user workflows with phases, operation mapping, and sequencing. Philosophy: Build 'Workflow Systems', not 'Tool Boxes' Refs: marketing-spec-kit feedback, real-world usage analysis
1 parent 335334f commit f1ddce4

File tree

6 files changed

+361
-5
lines changed

6 files changed

+361
-5
lines changed

AGENTS.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ memory/constitution.md
100100
│ - Implementation Neutrality
101101
│ - Extensibility Design
102102
│ - Domain Fidelity
103+
│ - Workflow Completeness ⭐ NEW
103104
104105
└── Part III: Toolkit Implementation Principles (管理: /metaspec.sdd.constitution)
105106
- Entity-First Design
@@ -115,6 +116,122 @@ memory/constitution.md
115116
2. **AI-First Design** (Part I): Generated systems must be AI-friendly
116117
3. **Progressive Enhancement** (Part I): Start with MVP, add features incrementally
117118
4. **Domain Specificity** (Part I): Respect domain constraints
119+
5. **Workflow Completeness** (Part II): ⭐ **NEW** - Define complete user workflows, not just isolated operations
120+
121+
---
122+
123+
## 🚀 Workflow-Driven Design Philosophy
124+
125+
**CRITICAL NEW PRINCIPLE** (v0.7.0+): MetaSpec now requires **workflow-first design** for all domain specifications.
126+
127+
### Why Workflow Matters
128+
129+
**Don't build**: "Tool箱" (collection of isolated operations)
130+
**Do build**: "Workflow Systems" (integrated end-to-end user journeys)
131+
132+
### The Problem We Solved
133+
134+
**Before v0.7.0**: Developers could create speckits that passed all quality checks but lacked clear user workflows. Users received "13 commands" without knowing which to use first, or how they relate.
135+
136+
**After v0.7.0**: All domain specifications MUST define:
137+
1. **Workflow Phases** - Distinct stages in the user journey
138+
2. **Phase Purposes** - Why each phase exists
139+
3. **Operation Mapping** - Which operations belong to which phase
140+
4. **Sequencing** - Entry/exit criteria, dependencies, ordering
141+
5. **End-to-End Examples** - Complete workflow demonstrations
142+
143+
### MetaSpec as Example
144+
145+
MetaSpec itself demonstrates perfect workflow design:
146+
147+
```
148+
SDS Workflow:
149+
Phase 1: Constitution → /metaspec.sds.constitution
150+
Phase 2: Specification → /metaspec.sds.specify
151+
Phase 3: Quality Gates → /metaspec.sds.clarify, /metaspec.sds.checklist
152+
Phase 4: Implementation → /metaspec.sds.plan, /metaspec.sds.tasks, /metaspec.sds.implement
153+
Phase 5: Validation → /metaspec.sds.analyze
154+
155+
SDD Workflow:
156+
Phase 1: Constitution → /metaspec.sdd.constitution
157+
Phase 2: Specification → /metaspec.sdd.specify, /metaspec.sdd.clarify
158+
Phase 3: Architecture → /metaspec.sdd.plan, /metaspec.sdd.checklist
159+
Phase 4: Implementation → /metaspec.sdd.tasks, /metaspec.sdd.analyze, /metaspec.sdd.implement
160+
```
161+
162+
**Your mission**: Ensure all speckits you help create follow this same pattern.
163+
164+
### Required Workflow Elements
165+
166+
When defining domain specifications, ALWAYS include:
167+
168+
1. **Phase Definitions**
169+
```yaml
170+
Phase 1: [Name]
171+
Purpose: [Why this phase exists]
172+
Entry: [When user enters]
173+
Operations: [Which operations]
174+
Outputs: [What is produced]
175+
Exit: [When complete]
176+
```
177+
178+
2. **Operation-to-Phase Mapping**
179+
- Every operation MUST belong to at least one workflow phase
180+
- No "orphan" operations without clear usage context
181+
182+
3. **Workflow Examples**
183+
- Show complete end-to-end usage
184+
- Demonstrate phase transitions
185+
- Include success indicators
186+
187+
4. **Decision Points**
188+
- Document when users choose between paths
189+
- Explain branching logic
190+
- Provide decision criteria
191+
192+
### Enforcement
193+
194+
The new **Part II Principle 7: Workflow Completeness** ensures:
195+
- `/metaspec.sds.constitution` includes workflow requirements
196+
- `/metaspec.sds.specify` generates Workflow Specification sections
197+
- `/metaspec.sds.checklist` (future) validates workflow completeness
198+
- `/metaspec.sds.analyze` (future) scores workflow quality
199+
200+
### Examples
201+
202+
**Good Workflow-Driven Design**:
203+
```
204+
Marketing Operations Workflow:
205+
Phase 1: Strategic Planning
206+
- Operations: /marketing.plan.create, /marketing.plan.validate
207+
- Output: Approved marketing plan
208+
209+
Phase 2: Campaign Design
210+
- Operations: /marketing.campaign.design, /marketing.campaign.get
211+
- Output: Campaign specifications
212+
213+
Phase 3: Content Creation
214+
- Operations: /marketing.generate.post, /marketing.generate.article
215+
- Output: Ready-to-publish content
216+
```
217+
218+
**Bad (Pre-v0.7.0) Design**:
219+
```
220+
Marketing Operations:
221+
- /marketing.project (what's this for?)
222+
- /marketing.campaign (when to use?)
223+
- /marketing.generate.post (how does this relate to campaign?)
224+
❌ Users confused about sequence and relationships
225+
```
226+
227+
### Your Checklist
228+
229+
When helping users create speckits, verify:
230+
- [ ] Domain specification includes "Workflow Specification" section
231+
- [ ] All operations are mapped to workflow phases
232+
- [ ] Each phase has clear purpose, entry/exit criteria
233+
- [ ] End-to-end workflow examples provided
234+
- [ ] Constitution Part II includes Workflow Completeness principle
118235
119236
---
120237

CHANGELOG.md

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

1010
---
1111

12+
## [0.7.0] - 2025-11-15
13+
14+
### ⭐ Major Feature - Workflow-Driven Design Philosophy
15+
16+
**Introduced Workflow Completeness Principle for Domain Specifications**
17+
18+
MetaSpec now enforces **workflow-first design** for all domain specifications, addressing a fundamental design gap where speckits could pass all quality checks but lack clear user workflows.
19+
20+
**Problem We Solved**:
21+
- Before v0.7.0: Developers created speckits with isolated operations ("tool箱")
22+
- Users received collections of commands without knowing usage order or relationships
23+
- High quality scores but poor usability - no end-to-end guidance
24+
- Example: "13 commands" but unclear which to use first, how they connect
25+
26+
**Solution**:
27+
- Added **Part II Principle 7: Workflow Completeness** to Constitution
28+
- All domain specifications MUST now define complete user workflows
29+
- Workflows include phases, operation mapping, sequencing, and examples
30+
- MetaSpec itself demonstrates this principle with SDS/SDD workflows
31+
32+
### ✨ Added
33+
34+
#### Constitution Template Updates
35+
- **Added Part II Principle 7**: "Workflow Completeness"
36+
- Requires complete user workflows from start to finish
37+
- Distinct phases/stages with clear purposes
38+
- Operation ordering and dependencies
39+
- Decision points and branching logic
40+
- End-to-end workflow examples
41+
- Operations mapped to workflow phases
42+
- Example workflow structure in constitution template
43+
- Domain-specific workflow examples (Marketing, MCP, API Testing)
44+
45+
#### Domain Specification Template
46+
- **Added "Workflow Specification" section** to `domain-spec-template.md.j2`
47+
- `user_workflows` in frontmatter YAML
48+
- Workflow phases with purpose, entry/exit criteria
49+
- Operation-to-phase mapping
50+
- Workflow example usage
51+
- Design rationale emphasizing integrated workflows
52+
- Positioned after "Use Cases", before "Core Entities"
53+
54+
#### Documentation Updates
55+
- **AGENTS.md**: New "Workflow-Driven Design Philosophy" section
56+
- Explains why workflow matters (systems vs toolboxes)
57+
- Shows MetaSpec's own workflows as examples
58+
- Required workflow elements checklist
59+
- Good vs bad design examples
60+
- Enforcement mechanisms
61+
- **Constitution Structure**: Updated to show Workflow Completeness as 7th principle
62+
63+
### 🎯 Philosophy
64+
65+
**Core Principle**:
66+
```
67+
❌ Don't build: "Tool箱" (isolated operations)
68+
✅ Do build: "Workflow Systems" (integrated user journeys)
69+
```
70+
71+
**MetaSpec as Example**:
72+
```
73+
SDS Workflow:
74+
Phase 1: Constitution → /metaspec.sds.constitution
75+
Phase 2: Specification → /metaspec.sds.specify
76+
Phase 3: Quality Gates → /metaspec.sds.clarify, /metaspec.sds.checklist
77+
Phase 4: Implementation → /metaspec.sds.plan, /metaspec.sds.tasks, /metaspec.sds.implement
78+
Phase 5: Validation → /metaspec.sds.analyze
79+
```
80+
81+
**Required Elements**:
82+
1. **Workflow Phases** - Distinct stages in user journey
83+
2. **Phase Purposes** - Why each phase exists
84+
3. **Operation Mapping** - Which operations belong to which phase
85+
4. **Sequencing** - Entry/exit criteria, dependencies, ordering
86+
5. **End-to-End Examples** - Complete workflow demonstrations
87+
88+
### 🔄 Impact on Existing Projects
89+
90+
**Backward Compatibility**: ✅ Fully compatible
91+
- Existing speckits continue to work
92+
- No breaking changes to APIs or commands
93+
- Templates add new sections but don't remove existing content
94+
95+
**Migration Path**:
96+
- New projects automatically get workflow-focused templates
97+
- Existing projects can add workflow sections via `/metaspec.sds.specify`
98+
- Constitution updates guide workflow definition
99+
- Future: `/metaspec.sds.checklist` and `/metaspec.sds.analyze` will validate workflow completeness
100+
101+
### 📊 Quality Enforcement
102+
103+
**Current (v0.7.0)**:
104+
- ✅ Constitution template includes Workflow Completeness principle
105+
- ✅ Domain spec template includes Workflow Specification section
106+
- ✅ AGENTS.md documents workflow requirements
107+
108+
**Future (v0.7.x)**:
109+
- 🔜 `/metaspec.sds.checklist` validates workflow completeness
110+
- 🔜 `/metaspec.sds.analyze` scores workflow quality (Dimension 7: 15% weight)
111+
- 🔜 Low scores (<70%) if workflow missing or incomplete
112+
113+
### 💡 Rationale
114+
115+
**Feedback Source**: Real-world development of `marketing-spec-kit`
116+
- Followed complete SDS + SDD workflow
117+
- All quality checks passed (50/50, 98/100)
118+
- Final result: 13 isolated commands without clear workflow
119+
- Discovery: MetaSpec showed perfect workflows but didn't require them
120+
121+
**Design Philosophy Alignment**:
122+
- MetaSpec demonstrates workflow-first design
123+
- New principle ensures generated speckits follow same pattern
124+
- "Practice what you preach" - consistency across framework
125+
126+
**User Experience**:
127+
- Users need guidance on operation sequencing
128+
- Isolated operations less valuable than integrated workflows
129+
- Workflow definition enables better AI assistance and automation
130+
131+
### 🎉 Benefits
132+
133+
1. **Clearer User Guidance**: Users know which operations to use when
134+
2. **Better AI Support**: AI agents understand operation context and sequencing
135+
3. **Improved Usability**: Speckits are systems, not just tool collections
136+
4. **Design Consistency**: All speckits follow MetaSpec's workflow pattern
137+
5. **Quality Assurance**: Future validation catches workflow gaps early
138+
139+
### 📚 References
140+
141+
- **Feedback Document**: `/Users/guyue/marketing-spec-kit/docs/internal/metaspec-feedback.md`
142+
- **Related Issue**: Design gap identified through real-world usage
143+
- **Philosophy**: Workflow Systems vs Tool Boxes
144+
145+
---
146+
12147
## [0.6.8] - 2025-11-15
13148

14149
### 🐛 Bug Fixes - Critical

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.6.8"
3+
version = "0.7.0"
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.6.8"
8+
__version__ = "0.7.0"
99

1010
__all__ = ["__version__"]
1111

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

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,23 @@ Based on user input and domain understanding, update these **standard specificat
8989

9090
**Rationale**: Domain-faithful specifications are easier to adopt and understand.
9191

92+
#### **VII. Workflow Completeness**
93+
- All specifications define complete user workflows from start to finish
94+
- Distinct phases/stages of the user journey are clearly identified
95+
- Operation ordering and dependencies are documented
96+
- Decision points and branching logic are specified
97+
- End-to-end workflow examples are provided
98+
- Operations are mapped to specific workflow phases
99+
100+
**Rationale**: Users need guidance on how to use operations in sequence. Isolated operations are less valuable than integrated workflows. Workflow definition enables better AI assistance and automation.
101+
102+
**Example workflow structure**:
103+
```
104+
Phase 1: Planning → operations: create_plan, validate_plan
105+
Phase 2: Execution → operations: execute_task, monitor_progress
106+
Phase 3: Analysis → operations: generate_report, optimize
107+
```
108+
92109
### 4. Prepare domain-specific examples
93110

94111
For each principle in Part II, provide domain-specific examples:
@@ -99,11 +116,12 @@ For each principle in Part II, provide domain-specific examples:
99116
- **Implementation Neutrality**: How to avoid technology coupling?
100117
- **Extensibility Design**: How to support evolution?
101118
- **Domain Fidelity**: What standards to follow? Terminology?
119+
- **Workflow Completeness**: What workflow phases? Operation ordering? User journey?
102120

103121
**Examples by domain**:
104-
- Marketing: Campaign (name, type, channels, budget, dates), CPM/CTR/ROAS validation
105-
- MCP: Tool (name, description, inputSchema), JSON Schema validation
106-
- API Testing: APITest (endpoint, method, assertions), HTTP status validation
122+
- Marketing: Campaign (name, type, channels, budget, dates), CPM/CTR/ROAS validation, Workflow: Planning → Campaign Design → Content Creation → Execution → Analysis
123+
- MCP: Tool (name, description, inputSchema), JSON Schema validation, Workflow: Server Init → Tool Discovery → Tool Execution → Result Processing
124+
- API Testing: APITest (endpoint, method, assertions), HTTP status validation, Workflow: Test Design → Setup → Execution → Validation → Reporting
107125

108126
### 5. Update Part II section
109127

@@ -138,6 +156,24 @@ Update only the `## Part II: Specification Design Principles` section with domai
138156

139157
[Domain standards and conventions to follow]
140158

159+
### 7. Workflow Completeness
160+
161+
[Complete user workflows from start to finish]
162+
163+
**Required workflow elements**:
164+
- Phase definitions with clear purposes
165+
- Operation ordering and dependencies
166+
- Entry and exit criteria for each phase
167+
- Decision points and branching logic
168+
- End-to-end workflow examples
169+
170+
**Example workflow**:
171+
```
172+
Phase 1: [Phase Name] → operations: [op1, op2]
173+
Phase 2: [Phase Name] → operations: [op3, op4]
174+
Phase 3: [Phase Name] → operations: [op5, op6]
175+
```
176+
141177
<!-- Managed by /metaspec.sds.constitution -->
142178
```
143179

0 commit comments

Comments
 (0)