Skip to content

Commit 4c2faeb

Browse files
committed
feat: Add Workflow Validation Quality Gates (v0.7.1)
Phase 2: Automated Workflow Validation Added: - Category 8 'Workflow Design' to Checklist (CHK027-CHK036) - Dimension L 'Workflow Completeness' to Analyze (15% weight) - Focused mode support: /metaspec.sds.analyze workflow Quality Impact: - Checklist: 8 categories, 36 items (was 26) - Analyze: 12 dimensions (was 11) - Specifications without workflows now fail quality gates This completes the three-layer workflow enforcement: 1. v0.7.0: Constitution principle 2. v0.7.1: Automated validation 3. Result: Prevents 'high-score but no workflow' problem Refs: marketing-spec-kit feedback, v0.7.0 follow-up
1 parent f1ddce4 commit 4c2faeb

File tree

5 files changed

+188
-3
lines changed

5 files changed

+188
-3
lines changed

CHANGELOG.md

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

1010
---
1111

12+
## [0.7.1] - 2025-11-15
13+
14+
### ✨ Quality Gates Enhancement - Workflow Validation
15+
16+
**Implemented Phase 2 of Workflow-Driven Design Philosophy**
17+
18+
v0.7.0 introduced Workflow Completeness principle. v0.7.1 adds automated validation to enforce it.
19+
20+
### Added
21+
22+
#### Checklist (SDS) - Category 8: Workflow Design Quality
23+
- **Added 10 new checklist items** (CHK027-CHK036) for workflow validation
24+
- Validates workflow specification completeness per Constitution Part II Principle 7
25+
- Checks:
26+
- "Workflow Specification" section exists
27+
- At least 2 distinct workflow phases defined
28+
- Operations mapped to workflow phases
29+
- Entry/exit criteria specified
30+
- Phase transitions and dependencies documented
31+
- Decision points and branching logic explained
32+
- End-to-end workflow example provided
33+
- All operations referenced in at least one phase
34+
35+
**Location**: `/metaspec.sds.checklist` command template
36+
37+
**Purpose**: Catch workflow gaps during specification review phase
38+
39+
#### Analyze (SDS) - Dimension L: Workflow Completeness
40+
- **Added 12th analysis dimension** (L) with 15% weight
41+
- Severity rules:
42+
- **CRITICAL**: No "Workflow Specification" section (Constitution violation)
43+
- **HIGH**: <2 phases OR operations not mapped to phases
44+
- **MEDIUM**: Missing entry/exit criteria or examples
45+
- **LOW**: Workflow exists but could be clearer
46+
- Score calculation: `(Checks Passed / 9) * 15%`
47+
- Focused mode support: `/metaspec.sds.analyze workflow`
48+
49+
**Location**: `/metaspec.sds.analyze` command template
50+
51+
**Why it matters**: Prevents "high-score but no workflow" problem discovered in marketing-spec-kit
52+
53+
### Changed
54+
55+
- **Full Analysis Mode**: Now checks 12 dimensions (A-L) instead of 11
56+
- **Focused Mode**: Added `workflow`, `workflows`, `user-journey` keywords
57+
- **Checklist Categories**: 8 categories (was 7)
58+
- **Total Checklist Items**: 36 items (was 26)
59+
60+
### Quality Impact
61+
62+
**Before v0.7.1**:
63+
```
64+
Specification passes all checks → ✅ 100%
65+
But missing workflow definition → ❌ Users confused
66+
```
67+
68+
**After v0.7.1**:
69+
```
70+
Specification without workflow → ❌ CRITICAL in analyze
71+
→ ❌ 10 failed in checklist
72+
→ 📉 Score < 70%
73+
→ Forces workflow definition before high scores
74+
```
75+
76+
### Backward Compatibility
77+
78+
✅ Fully compatible with v0.7.0
79+
- Existing specifications with workflows: no impact
80+
- Existing specifications without workflows: will now fail new checks (as intended)
81+
- All other dimensions unchanged
82+
83+
### Migration Guide
84+
85+
**For existing projects**:
86+
1. Run `/metaspec.sds.analyze workflow` to check current status
87+
2. If missing workflow section, add via `/metaspec.sds.specify`
88+
3. Re-run `/metaspec.sds.checklist` (update mode) to verify
89+
4. Re-run `/metaspec.sds.analyze` for full score
90+
91+
**For new projects**: Workflow validation automatic with v0.7.1 templates
92+
93+
### Rationale
94+
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.
96+
97+
**Three-layer enforcement**:
98+
1. **v0.7.0**: Constitution requires workflows (principle)
99+
2. **v0.7.1**: Checklist validates workflows (quality gate)
100+
3. **v0.7.1**: Analyze scores workflows (quantitative measure)
101+
102+
### References
103+
104+
- **Feedback Source**: `/Users/guyue/marketing-spec-kit/docs/internal/metaspec-feedback.md`
105+
- **Related Version**: v0.7.0 (introduced Workflow Completeness principle)
106+
- **Philosophy**: Enforcement through automated quality gates
107+
108+
---
109+
12110
## [0.7.0] - 2025-11-15
13111

14112
### ⭐ Major Feature - Workflow-Driven Design Philosophy

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

1010
__all__ = ["__version__"]
1111

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

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,12 @@ Parse user intent to select appropriate analysis mode:
7373
- "ambiguity", "vague" → Ambiguity Detection (I)
7474
- "terminology", "naming" → Terminology Consistency (J)
7575
- "artifacts", "cross-artifacts" → Cross-Artifact Consistency (K)
76+
- "workflow", "workflows", "user-journey" → Workflow Completeness (L) ⭐ NEW (v0.7.0+)
7677
- Use when: Fixing specific issues, targeted improvement
7778

7879
**Full Mode** 📊 (5-10 min, comprehensive):
7980
- Purpose: Complete specification quality analysis
80-
- Checks: All 11 dimensions (A-K)
81+
- Checks: All 12 dimensions (A-L) ⭐ Updated (v0.7.0+)
8182
- Use when: Major releases, complete review, initial analysis
8283

8384
**Mode selection example**:
@@ -519,6 +520,56 @@ OR
519520
✅ All checklist items have valid spec references
520521
```
521522
523+
#### L. Workflow Completeness ⭐ NEW (v0.7.0+)
524+
525+
**Check specification workflow definition** (per Constitution Part II Principle 7):
526+
527+
**Check spec.md for Workflow Specification section**:
528+
- ✅ "Workflow Specification" section exists
529+
- ✅ At least 2 distinct workflow phases defined
530+
- ✅ Each phase has clear purpose statement
531+
- ✅ Entry and exit criteria specified for each phase
532+
- ✅ Operations mapped to specific workflow phases
533+
- ✅ Phase transitions and dependencies documented
534+
- ✅ Decision points and branching logic explained
535+
- ✅ End-to-end workflow example provided
536+
- ✅ All operations referenced in at least one workflow phase
537+
538+
**Check workflow quality**:
539+
- ✅ Workflow demonstrates integrated user journey (not just operation list)
540+
- ✅ Phase sequence is logical and complete
541+
- ✅ No "orphan" operations without workflow context
542+
- ✅ Workflow examples match specification operations
543+
544+
**Severity Rules**:
545+
- **CRITICAL**: No "Workflow Specification" section (Constitution §II.7 violation)
546+
- **HIGH**: Workflow section exists but <2 phases OR operations not mapped
547+
- **MEDIUM**: Workflow exists but missing entry/exit criteria or examples
548+
- **LOW**: Workflow complete but could be clearer (e.g., better decision point docs)
549+
550+
**Report**:
551+
```
552+
❌ CRITICAL: Missing "Workflow Specification" section [Constitution §II.7]
553+
Recommendation: Add workflow section defining user journey phases
554+
❌ HIGH: Only 1 workflow phase defined, need at least 2 [Spec §Workflow]
555+
Recommendation: Break workflow into distinct phases (e.g., Planning → Execution → Analysis)
556+
❌ HIGH: 3 operations not referenced in any workflow phase [Spec §Workflow]
557+
Operations: /marketing.project, /marketing.product, /marketing.channel
558+
Recommendation: Map all operations to workflow phases
559+
❌ MEDIUM: Workflow Phase 2 missing exit criteria [Spec §Workflow]
560+
Recommendation: Define when Phase 2 is complete
561+
✅ All workflow phases have clear purposes
562+
✅ End-to-end workflow example provided
563+
```
564+
565+
**Score Calculation** (15% weight):
566+
```
567+
Workflow Score = (Checks Passed / Total Checks) * 15%
568+
Example: 6/9 checks passed = (6/9) * 15% = 10%
569+
```
570+
571+
**Why it matters**: Operations without workflow context are "tool boxes", not "workflow systems". Users need guidance on sequencing and relationships (per marketing-spec-kit feedback).
572+
522573
### 6. Severity Assignment (Full/Focused Mode only)
523574
524575
**CRITICAL**: Constitution violation, missing operation schema, undefined entities

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,23 @@ Test for specification issues:
219219
- Are missing definitions noted? [Gap]
220220
- Are unresolved questions marked (TODO, TBD)? [Ambiguity]
221221

222+
#### **Workflow Design Quality** ⭐ NEW (v0.7.0+)
223+
Test if specification defines complete user workflows:
224+
- Does specification include "Workflow Specification" section? [Completeness, Constitution §II.7]
225+
- Are at least 2 distinct workflow phases defined? [Completeness]
226+
- Is each workflow phase mapped to specific operations? [Completeness]
227+
- Are entry and exit criteria specified for each phase? [Clarity]
228+
- Are phase transitions and dependencies documented? [Completeness]
229+
- Are decision points and branching logic explained? [Clarity]
230+
- Is an end-to-end workflow example provided? [Coverage]
231+
- Are all operations referenced in at least one workflow phase? [Consistency]
232+
- Is workflow purpose clearly stated (why this sequence)? [Clarity]
233+
- Do workflow examples demonstrate typical user journeys? [Coverage]
234+
235+
**Purpose**: Ensures specifications define integrated workflows, not just isolated operations.
236+
237+
**Rationale**: Operations without workflow guidance are hard to use. Users need clear paths from start to finish. This aligns with MetaSpec's own workflow design (SDS/SDD).
238+
222239
### 5. Checklist Item Structure
223240

224241
**Pattern**:
@@ -310,6 +327,25 @@ Test for specification issues:
310327
- [ ] CHK026 - Are domain standards followed (RFCs, conventions)? [Consistency, Constitution]
311328
```
312329

330+
#### Workflow Design (10 core items) ⭐ NEW (v0.7.0+)
331+
332+
```markdown
333+
- [ ] CHK027 - Does specification include a "Workflow Specification" section? [Completeness, Constitution §II.7]
334+
- [ ] CHK028 - Are at least 2 distinct workflow phases defined? [Completeness, Spec §Workflow]
335+
- [ ] CHK029 - Is each workflow phase mapped to specific operations? [Completeness, Spec §Workflow]
336+
- [ ] CHK030 - Are entry criteria specified for each workflow phase? [Clarity, Spec §Workflow]
337+
- [ ] CHK031 - Are exit criteria specified for each workflow phase? [Clarity, Spec §Workflow]
338+
- [ ] CHK032 - Are phase transitions and dependencies documented? [Completeness, Spec §Workflow]
339+
- [ ] CHK033 - Are decision points and branching logic explained? [Clarity, Spec §Workflow]
340+
- [ ] CHK034 - Is an end-to-end workflow example provided? [Coverage, Spec §Workflow]
341+
- [ ] CHK035 - Are all operations referenced in at least one workflow phase? [Consistency, Spec §Workflow]
342+
- [ ] CHK036 - Do workflow examples demonstrate typical user journeys? [Coverage, Spec §Examples]
343+
```
344+
345+
**Purpose**: Validates workflow completeness per Constitution Part II Principle 7.
346+
347+
**Why it matters**: Operations without workflow context are hard to use. Users need guidance on sequencing and relationships.
348+
313349
### 7. Anti-Examples: What NOT To Do
314350

315351
**❌ WRONG - Testing implementation**:

0 commit comments

Comments
 (0)