Skip to content

Commit 335334f

Browse files
committed
fix: sync .metaspec/README.md for documentation consistency (v0.6.8)
CRITICAL BUG FIX: Documentation inconsistency after metaspec sync Problem: - metaspec sync only updated .metaspec/commands/ - Did NOT sync .metaspec/README.md - After sync: commands use new naming (metaspec.evolution.*.md) - But README referenced old naming (/metaspec.proposal, etc.) - Result: Documentation contradicted actual files Impact: - Severity: CRITICAL - Misleading documentation - Affected: All speckits using metaspec sync from v0.6.2+ - User confusion: Follow README but commands don't exist Fix: - Added Step 7.6 to sync.py: Update .metaspec/README.md - Extract speckit name from pyproject.toml - Render template with current version - Updated README.md.j2 template: All Evolution references use new naming Before (v0.6.7): - metaspec sync → Updates commands but not README - README shows: /metaspec.proposal - User runs /metaspec.proposal → File not found! After (v0.6.8): - metaspec sync → Updates both commands AND README - README shows: /metaspec.evolution.proposal - Documentation and files consistent! All 156 tests passing. Credit: Bug discovered by user reviewing documentation consistency.
1 parent 3f896ce commit 335334f

File tree

5 files changed

+92
-9
lines changed

5 files changed

+92
-9
lines changed

CHANGELOG.md

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

1010
---
1111

12+
## [0.6.8] - 2025-11-15
13+
14+
### 🐛 Bug Fixes - Critical
15+
16+
**Fixed Documentation Inconsistency in `metaspec sync`**
17+
18+
Fixed a critical bug where `metaspec sync` updated command files but not `.metaspec/README.md`, causing documentation to reference old command names.
19+
20+
**Problem**:
21+
- `metaspec sync` only synchronized `.metaspec/commands/` directory
22+
- Did NOT sync `.metaspec/README.md`
23+
- After sync: commands use new naming (`metaspec.evolution.*.md`)
24+
- But README still referenced old naming (`/metaspec.proposal`, etc.)
25+
- **Result**: Documentation contradicted actual files
26+
27+
**Impact**: 🔴 Critical
28+
- Severity: High - Documentation misleads users
29+
- Affected: All speckits using `metaspec sync` from v0.6.2+
30+
- Confusion: Users follow README but commands don't exist
31+
32+
**Fix**:
33+
- Added `.metaspec/README.md` to sync process (Step 7.6)
34+
- Extracts speckit name from `pyproject.toml`
35+
- Renders template with current version
36+
- Updates Evolution command references in template:
37+
- `/metaspec.proposal``/metaspec.evolution.proposal`
38+
- `/metaspec.apply``/metaspec.evolution.apply`
39+
- `/metaspec.archive``/metaspec.evolution.archive`
40+
41+
**Before (v0.6.7)**:
42+
```
43+
metaspec sync
44+
→ Updates .metaspec/commands/metaspec.evolution.*.md
45+
→ .metaspec/README.md still shows: /metaspec.proposal
46+
→ User runs /metaspec.proposal → File not found!
47+
```
48+
49+
**After (v0.6.8)**:
50+
```
51+
metaspec sync
52+
→ Updates .metaspec/commands/metaspec.evolution.*.md
53+
→ Updates .metaspec/README.md → /metaspec.evolution.proposal
54+
→ Documentation and files consistent!
55+
```
56+
57+
**Implementation**:
58+
- Modified `src/metaspec/cli/sync.py`:
59+
- Added Step 7.6: Sync `.metaspec/README.md`
60+
- Renders template with speckit name and version
61+
- Increments updated files count
62+
- Updated template `src/metaspec/templates/base/.metaspec/README.md.j2`:
63+
- All Evolution command references now use unified naming
64+
- Examples updated to show correct commands
65+
66+
**All 156 tests passing.**
67+
68+
**Credit**: Bug discovered by user reviewing documentation consistency.
69+
70+
---
71+
1272
## [0.6.7] - 2025-11-15
1373

1474
### ✨ Improvements

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

1010
__all__ = ["__version__"]
1111

src/metaspec/cli/sync.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,29 @@ def sync_command(
170170
console.print(f" 🧹 Removing old naming (v0.5.x): {old_file_name}")
171171
old_file.unlink()
172172

173+
# Step 7.6: Update .metaspec/README.md (critical for consistency)
174+
readme_source = template_dir.parent / "base" / ".metaspec" / "README.md.j2"
175+
readme_dest = metaspec_dir / "README.md"
176+
if readme_source.exists():
177+
console.print(f" 📝 Updating {readme_dest.name}...")
178+
content = readme_source.read_text()
179+
# Render with speckit name from pyproject.toml
180+
try:
181+
with open("pyproject.toml", "rb") as f:
182+
import tomllib
183+
data = tomllib.load(f)
184+
speckit_name = data.get("project", {}).get("name", "this speckit")
185+
content = content.replace("{{ name }}", speckit_name)
186+
content = content.replace("{{ metaspec_version }}", current_version)
187+
except Exception:
188+
# Fallback if pyproject.toml can't be read
189+
content = content.replace("{{ name }}", "this speckit")
190+
content = content.replace("{{ metaspec_version }}", current_version)
191+
192+
readme_dest.write_text(content)
193+
updated_files.append(readme_dest.name)
194+
console.print(f" ✅ Updated {readme_dest.name}")
195+
173196
# Step 8: Update version in pyproject.toml
174197
_update_generated_version(current_version)
175198

src/metaspec/templates/base/.metaspec/README.md.j2

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ Develop toolkit implementation:
5454

5555
Manage specification changes:
5656

57-
- `/metaspec.proposal` - Propose changes (use `--type sds|sdd`)
58-
- `/metaspec.apply` - Apply approved changes
59-
- `/metaspec.archive` - Archive completed changes
57+
- `/metaspec.evolution.proposal` - Propose changes (use `--type sds|sdd`)
58+
- `/metaspec.evolution.apply` - Apply approved changes
59+
- `/metaspec.evolution.archive` - Archive completed changes
6060

6161
**Output**: `changes/` directory
6262

@@ -142,16 +142,16 @@ Manage specification changes:
142142

143143
```bash
144144
# Propose specification change
145-
/metaspec.proposal "Add GraphQL support" --type sds
145+
/metaspec.evolution.proposal "Add GraphQL support" --type sds
146146

147147
# Propose toolkit change
148-
/metaspec.proposal "Add streaming support" --type sdd
148+
/metaspec.evolution.proposal "Add streaming support" --type sdd
149149

150150
# Apply approved changes
151-
/metaspec.apply <proposal-id>
151+
/metaspec.evolution.apply <proposal-id>
152152

153153
# Archive completed changes
154-
/metaspec.archive <proposal-id>
154+
/metaspec.evolution.archive <proposal-id>
155155
```
156156

157157
---

0 commit comments

Comments
 (0)