gspec 1.11.0 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -34
- package/bin/gspec.js +765 -159
- package/commands/gspec.analyze.md +1 -1
- package/commands/gspec.architect.md +2 -2
- package/commands/gspec.feature.md +2 -2
- package/commands/gspec.implement.md +1 -1
- package/commands/gspec.migrate.md +13 -10
- package/commands/gspec.practices.md +2 -2
- package/commands/gspec.profile.md +2 -2
- package/commands/gspec.research.md +4 -4
- package/commands/gspec.stack.md +2 -2
- package/commands/gspec.style.md +2 -2
- package/dist/antigravity/gspec-analyze/SKILL.md +1 -1
- package/dist/antigravity/gspec-architect/SKILL.md +2 -2
- package/dist/antigravity/gspec-feature/SKILL.md +2 -2
- package/dist/antigravity/gspec-implement/SKILL.md +1 -1
- package/dist/antigravity/gspec-migrate/SKILL.md +13 -10
- package/dist/antigravity/gspec-practices/SKILL.md +2 -2
- package/dist/antigravity/gspec-profile/SKILL.md +2 -2
- package/dist/antigravity/gspec-research/SKILL.md +4 -4
- package/dist/antigravity/gspec-stack/SKILL.md +2 -2
- package/dist/antigravity/gspec-style/SKILL.md +2 -2
- package/dist/claude/gspec-analyze/SKILL.md +1 -1
- package/dist/claude/gspec-architect/SKILL.md +2 -2
- package/dist/claude/gspec-feature/SKILL.md +2 -2
- package/dist/claude/gspec-implement/SKILL.md +1 -1
- package/dist/claude/gspec-migrate/SKILL.md +13 -10
- package/dist/claude/gspec-practices/SKILL.md +2 -2
- package/dist/claude/gspec-profile/SKILL.md +2 -2
- package/dist/claude/gspec-research/SKILL.md +4 -4
- package/dist/claude/gspec-stack/SKILL.md +2 -2
- package/dist/claude/gspec-style/SKILL.md +2 -2
- package/dist/codex/gspec-analyze/SKILL.md +1 -1
- package/dist/codex/gspec-architect/SKILL.md +2 -2
- package/dist/codex/gspec-feature/SKILL.md +2 -2
- package/dist/codex/gspec-implement/SKILL.md +1 -1
- package/dist/codex/gspec-migrate/SKILL.md +13 -10
- package/dist/codex/gspec-practices/SKILL.md +2 -2
- package/dist/codex/gspec-profile/SKILL.md +2 -2
- package/dist/codex/gspec-research/SKILL.md +4 -4
- package/dist/codex/gspec-stack/SKILL.md +2 -2
- package/dist/codex/gspec-style/SKILL.md +2 -2
- package/dist/cursor/gspec-analyze.mdc +1 -1
- package/dist/cursor/gspec-architect.mdc +2 -2
- package/dist/cursor/gspec-feature.mdc +2 -2
- package/dist/cursor/gspec-implement.mdc +1 -1
- package/dist/cursor/gspec-migrate.mdc +13 -10
- package/dist/cursor/gspec-practices.mdc +2 -2
- package/dist/cursor/gspec-profile.mdc +2 -2
- package/dist/cursor/gspec-research.mdc +4 -4
- package/dist/cursor/gspec-stack.mdc +2 -2
- package/dist/cursor/gspec-style.mdc +2 -2
- package/dist/opencode/gspec-analyze/SKILL.md +1 -1
- package/dist/opencode/gspec-architect/SKILL.md +2 -2
- package/dist/opencode/gspec-feature/SKILL.md +2 -2
- package/dist/opencode/gspec-implement/SKILL.md +1 -1
- package/dist/opencode/gspec-migrate/SKILL.md +13 -10
- package/dist/opencode/gspec-practices/SKILL.md +2 -2
- package/dist/opencode/gspec-profile/SKILL.md +2 -2
- package/dist/opencode/gspec-research/SKILL.md +4 -4
- package/dist/opencode/gspec-stack/SKILL.md +2 -2
- package/dist/opencode/gspec-style/SKILL.md +2 -2
- package/package.json +1 -2
- package/templates/spec-sync.md +1 -1
- package/starters/features/about-page.md +0 -98
- package/starters/features/contact-form.md +0 -147
- package/starters/features/contact-page.md +0 -103
- package/starters/features/home-page.md +0 -103
- package/starters/features/responsive-navbar.md +0 -113
- package/starters/features/services-page.md +0 -103
- package/starters/features/site-footer.md +0 -121
- package/starters/features/theme-switcher.md +0 -124
- package/starters/practices/tdd-pipeline-first.md +0 -192
- package/starters/stacks/astro-tailwind-github-pages.md +0 -283
- package/starters/stacks/nextjs-supabase-vercel.md +0 -319
- package/starters/stacks/nextjs-vercel-typescript.md +0 -264
- package/starters/styles/clean-professional.md +0 -316
- package/starters/styles/dark-minimal-developer.md +0 -442
|
@@ -128,7 +128,7 @@ When updating specs to resolve a discrepancy:
|
|
|
128
128
|
|
|
129
129
|
- **Surgical updates only** — change the minimum text needed to resolve the conflict
|
|
130
130
|
- **Preserve format and tone** — match the existing document's style, heading structure, and voice
|
|
131
|
-
- **Preserve `
|
|
131
|
+
- **Preserve `spec-version` frontmatter** — do not alter or remove it
|
|
132
132
|
- **Do not rewrite sections** — if a one-line change resolves the conflict, make a one-line change
|
|
133
133
|
- **Do not add changelog annotations** — the git history captures what changed
|
|
134
134
|
|
|
@@ -42,10 +42,10 @@ All of these provide essential context. If any are missing, note the gap and mak
|
|
|
42
42
|
|
|
43
43
|
- Output **ONLY** a single Markdown document
|
|
44
44
|
- Save the file as `gspec/architecture.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
45
|
-
- Begin the file with YAML frontmatter containing the
|
|
45
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
46
46
|
```
|
|
47
47
|
---
|
|
48
|
-
|
|
48
|
+
spec-version: v1
|
|
49
49
|
---
|
|
50
50
|
```
|
|
51
51
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -82,10 +82,10 @@ Feature PRDs are designed to be **portable across projects**. A feature spec wri
|
|
|
82
82
|
- Output one or more Markdown documents — **one per feature**
|
|
83
83
|
- Save each file to the `gspec/features/` folder in the root of the project, create it if it doesn't exist
|
|
84
84
|
- Name each file based on the feature (e.g., `user-authentication.md`, `dashboard-analytics.md`)
|
|
85
|
-
- Begin each file with YAML frontmatter containing the
|
|
85
|
+
- Begin each file with YAML frontmatter containing the spec version:
|
|
86
86
|
```
|
|
87
87
|
---
|
|
88
|
-
|
|
88
|
+
spec-version: v1
|
|
89
89
|
---
|
|
90
90
|
```
|
|
91
91
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -110,7 +110,7 @@ Present a brief scaffold summary to the user before proceeding to feature implem
|
|
|
110
110
|
b. **Follow the practices** — Adhere to coding standards, testing philosophy, pipeline structure, and conventions from `gspec/practices.md`
|
|
111
111
|
c. **Follow the style** — Apply the design system, tokens, and icon library from `gspec/style.md`. The style is the single authority for icon library choices. Component libraries (e.g., shadcn/ui) are defined in `gspec/stack.md`.
|
|
112
112
|
d. **Satisfy the requirements** — Trace each piece of code back to a functional requirement in the feature PRD (if available) or to the user's stated goals and the approved implementation plan
|
|
113
|
-
3. **Mark capabilities as implemented** — After successfully implementing each capability, immediately update the feature PRD by changing its checkbox from `- [ ]` to `- [x]`. Do this incrementally as each capability is completed, not in a batch at the end. If a capability line did not have a checkbox prefix, add one as `- [x]`. This ensures that if the session is interrupted, progress is not lost. When updating gspec files, preserve existing `
|
|
113
|
+
3. **Mark capabilities as implemented** — After successfully implementing each capability, immediately update the feature PRD by changing its checkbox from `- [ ]` to `- [x]`. Do this incrementally as each capability is completed, not in a batch at the end. If a capability line did not have a checkbox prefix, add one as `- [x]`. This ensures that if the session is interrupted, progress is not lost. When updating gspec files, preserve existing `spec-version` YAML frontmatter. If a file lacks frontmatter, add `---\nspec-version: v1\n---` at the top.
|
|
114
114
|
4. **Run tests** — Execute the tests defined for this phase (and any existing tests to catch regressions). Fix any failures before proceeding.
|
|
115
115
|
6. **Surface new gaps** — If implementation reveals new ambiguities, pause and consult the user rather than making silent assumptions
|
|
116
116
|
7. **Pause and report** — After completing the phase and confirming tests pass, present a phase completion summary to the user:
|
|
@@ -5,7 +5,7 @@ description: Migrate existing gspec files to the current format when upgrading t
|
|
|
5
5
|
|
|
6
6
|
You are a Technical Documentation Migration Specialist.
|
|
7
7
|
|
|
8
|
-
Your task is to update existing gspec specification documents to match the current
|
|
8
|
+
Your task is to update existing gspec specification documents to match the current spec format (spec-version v1). You preserve all substantive content while ensuring documents follow the latest structural conventions.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -19,16 +19,17 @@ Scan the `gspec/` directory for all Markdown files:
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
For each file, check the YAML frontmatter at the top of the file:
|
|
22
|
-
- If the file starts with `---` followed by YAML content and another `---`, read the `gspec-version` field
|
|
22
|
+
- If the file starts with `---` followed by YAML content and another `---`, read the `spec-version` field (also check for the legacy `gspec-version` field)
|
|
23
23
|
- If no frontmatter exists, the file predates version tracking
|
|
24
|
-
- If `
|
|
24
|
+
- If `spec-version` matches `v1`, the file is current — skip it
|
|
25
|
+
- If the file has `gspec-version` (old field name) instead of `spec-version`, it needs migration regardless of value
|
|
25
26
|
|
|
26
27
|
Present an inventory to the user:
|
|
27
28
|
|
|
28
29
|
> **gspec File Inventory:**
|
|
29
30
|
> - `gspec/profile.md` — no version (needs migration)
|
|
30
|
-
> - `gspec/stack.md` — version 1.0.3 (needs migration)
|
|
31
|
-
> - `gspec/style.md` — version
|
|
31
|
+
> - `gspec/stack.md` — gspec-version 1.0.3 (needs migration — old field name)
|
|
32
|
+
> - `gspec/style.md` — spec-version v1 (current, skipping)
|
|
32
33
|
> - `gspec/features/user-auth.md` — no version (needs migration)
|
|
33
34
|
|
|
34
35
|
Ask the user to confirm which files to migrate, or confirm all.
|
|
@@ -63,21 +64,22 @@ For each file to migrate:
|
|
|
63
64
|
5. **Add or update the frontmatter** — Ensure the file starts with:
|
|
64
65
|
```
|
|
65
66
|
---
|
|
66
|
-
|
|
67
|
+
spec-version: v1
|
|
67
68
|
---
|
|
68
69
|
```
|
|
70
|
+
If the file has the old `gspec-version` field, rename it to `spec-version` and set the value to `v1`.
|
|
69
71
|
6. **Present the proposed changes** to the user before writing. Show what sections are being reorganized, what is being added, and confirm no content is being lost.
|
|
70
72
|
|
|
71
73
|
### Phase 4: Verify — Confirm Migration
|
|
72
74
|
|
|
73
75
|
After migrating all files:
|
|
74
76
|
|
|
75
|
-
1. **Verify every migrated file** has the correct frontmatter
|
|
77
|
+
1. **Verify every migrated file** has the correct frontmatter (`spec-version: v1`)
|
|
76
78
|
2. **Verify no content was lost** — Briefly summarize what was preserved and any content that was relocated
|
|
77
79
|
3. **Present a completion summary**:
|
|
78
80
|
|
|
79
81
|
> **Migration Complete:**
|
|
80
|
-
> - 4 files migrated to version
|
|
82
|
+
> - 4 files migrated to spec-version v1
|
|
81
83
|
> - 2 files were already current (skipped)
|
|
82
84
|
> - Content preserved in all files
|
|
83
85
|
> - Sections reorganized: [list any structural changes]
|
|
@@ -100,8 +102,9 @@ After migrating all files:
|
|
|
100
102
|
|
|
101
103
|
**Frontmatter handling:**
|
|
102
104
|
- If the file has no frontmatter, add it at the very top
|
|
103
|
-
- If the file has
|
|
104
|
-
- If the file has
|
|
105
|
+
- If the file has the old `gspec-version` field, rename it to `spec-version`
|
|
106
|
+
- If the file has frontmatter without `spec-version`, add the field
|
|
107
|
+
- If the file has an outdated `spec-version`, update it
|
|
105
108
|
- Preserve any other frontmatter fields that may exist
|
|
106
109
|
|
|
107
110
|
---
|
|
@@ -22,10 +22,10 @@ You should:
|
|
|
22
22
|
|
|
23
23
|
- Output **ONLY** a single Markdown document
|
|
24
24
|
- Save the file as `gspec/practices.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
25
|
-
- Begin the file with YAML frontmatter containing the
|
|
25
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
26
26
|
```
|
|
27
27
|
---
|
|
28
|
-
|
|
28
|
+
spec-version: v1
|
|
29
29
|
---
|
|
30
30
|
```
|
|
31
31
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -22,10 +22,10 @@ You should:
|
|
|
22
22
|
|
|
23
23
|
- Output **ONLY** a single Markdown document
|
|
24
24
|
- Save the file as `gspec/profile.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
25
|
-
- Begin the file with YAML frontmatter containing the
|
|
25
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
26
26
|
```
|
|
27
27
|
---
|
|
28
|
-
|
|
28
|
+
spec-version: v1
|
|
29
29
|
---
|
|
30
30
|
```
|
|
31
31
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -162,7 +162,7 @@ After writing `gspec/research.md`, ask the user:
|
|
|
162
162
|
- Assumptions & Risks (assumptions, open questions, key risks and mitigations)
|
|
163
163
|
- Success Metrics
|
|
164
164
|
- Implementation Context (standard portability note)
|
|
165
|
-
- Begin the file with YAML frontmatter: `---\
|
|
165
|
+
- Begin the file with YAML frontmatter: `---\nspec-version: v1\n---`
|
|
166
166
|
2. **Name the file** descriptively based on the feature (e.g., `gspec/features/csv-export.md`, `gspec/features/onboarding-wizard.md`)
|
|
167
167
|
3. **Keep the PRD portable** — use generic role descriptions (not project-specific persona names), define success metrics in terms of the feature's own outcomes (not project-level KPIs), and describe UX behavior generically (not tied to a specific design system). The PRD should be reusable across projects.
|
|
168
168
|
4. **Keep the PRD product-focused** — describe *what* and *why*, not *how*. Implementation details belong in the code, not the PRD.
|
|
@@ -178,10 +178,10 @@ After writing `gspec/research.md`, ask the user:
|
|
|
178
178
|
|
|
179
179
|
- Save the primary output as `gspec/research.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
180
180
|
- If the user accepts feature generation (Phase 7), also save feature PRDs to `gspec/features/`
|
|
181
|
-
- Begin `gspec/research.md` with YAML frontmatter containing the
|
|
181
|
+
- Begin `gspec/research.md` with YAML frontmatter containing the spec version:
|
|
182
182
|
```
|
|
183
183
|
---
|
|
184
|
-
|
|
184
|
+
spec-version: v1
|
|
185
185
|
---
|
|
186
186
|
```
|
|
187
187
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -198,7 +198,7 @@ The `gspec/research.md` file must follow this structure:
|
|
|
198
198
|
|
|
199
199
|
```markdown
|
|
200
200
|
---
|
|
201
|
-
|
|
201
|
+
spec-version: v1
|
|
202
202
|
---
|
|
203
203
|
|
|
204
204
|
# Competitive Research
|
|
@@ -22,10 +22,10 @@ You should:
|
|
|
22
22
|
|
|
23
23
|
- Output **ONLY** a single Markdown document
|
|
24
24
|
- Save the file as `gspec/stack.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
25
|
-
- Begin the file with YAML frontmatter containing the
|
|
25
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
26
26
|
```
|
|
27
27
|
---
|
|
28
|
-
|
|
28
|
+
spec-version: v1
|
|
29
29
|
---
|
|
30
30
|
```
|
|
31
31
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -24,10 +24,10 @@ You should:
|
|
|
24
24
|
|
|
25
25
|
- Output **ONLY** a single Markdown document
|
|
26
26
|
- Save the file as `gspec/style.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
27
|
-
- Begin the file with YAML frontmatter containing the
|
|
27
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
28
28
|
```
|
|
29
29
|
---
|
|
30
|
-
|
|
30
|
+
spec-version: v1
|
|
31
31
|
---
|
|
32
32
|
```
|
|
33
33
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -127,7 +127,7 @@ When updating specs to resolve a discrepancy:
|
|
|
127
127
|
|
|
128
128
|
- **Surgical updates only** — change the minimum text needed to resolve the conflict
|
|
129
129
|
- **Preserve format and tone** — match the existing document's style, heading structure, and voice
|
|
130
|
-
- **Preserve `
|
|
130
|
+
- **Preserve `spec-version` frontmatter** — do not alter or remove it
|
|
131
131
|
- **Do not rewrite sections** — if a one-line change resolves the conflict, make a one-line change
|
|
132
132
|
- **Do not add changelog annotations** — the git history captures what changed
|
|
133
133
|
|
|
@@ -41,10 +41,10 @@ All of these provide essential context. If any are missing, note the gap and mak
|
|
|
41
41
|
|
|
42
42
|
- Output **ONLY** a single Markdown document
|
|
43
43
|
- Save the file as `gspec/architecture.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
44
|
-
- Begin the file with YAML frontmatter containing the
|
|
44
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
45
45
|
```
|
|
46
46
|
---
|
|
47
|
-
|
|
47
|
+
spec-version: v1
|
|
48
48
|
---
|
|
49
49
|
```
|
|
50
50
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -81,10 +81,10 @@ Feature PRDs are designed to be **portable across projects**. A feature spec wri
|
|
|
81
81
|
- Output one or more Markdown documents — **one per feature**
|
|
82
82
|
- Save each file to the `gspec/features/` folder in the root of the project, create it if it doesn't exist
|
|
83
83
|
- Name each file based on the feature (e.g., `user-authentication.md`, `dashboard-analytics.md`)
|
|
84
|
-
- Begin each file with YAML frontmatter containing the
|
|
84
|
+
- Begin each file with YAML frontmatter containing the spec version:
|
|
85
85
|
```
|
|
86
86
|
---
|
|
87
|
-
|
|
87
|
+
spec-version: v1
|
|
88
88
|
---
|
|
89
89
|
```
|
|
90
90
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -109,7 +109,7 @@ Present a brief scaffold summary to the user before proceeding to feature implem
|
|
|
109
109
|
b. **Follow the practices** — Adhere to coding standards, testing philosophy, pipeline structure, and conventions from `gspec/practices.md`
|
|
110
110
|
c. **Follow the style** — Apply the design system, tokens, and icon library from `gspec/style.md`. The style is the single authority for icon library choices. Component libraries (e.g., shadcn/ui) are defined in `gspec/stack.md`.
|
|
111
111
|
d. **Satisfy the requirements** — Trace each piece of code back to a functional requirement in the feature PRD (if available) or to the user's stated goals and the approved implementation plan
|
|
112
|
-
3. **Mark capabilities as implemented** — After successfully implementing each capability, immediately update the feature PRD by changing its checkbox from `- [ ]` to `- [x]`. Do this incrementally as each capability is completed, not in a batch at the end. If a capability line did not have a checkbox prefix, add one as `- [x]`. This ensures that if the session is interrupted, progress is not lost. When updating gspec files, preserve existing `
|
|
112
|
+
3. **Mark capabilities as implemented** — After successfully implementing each capability, immediately update the feature PRD by changing its checkbox from `- [ ]` to `- [x]`. Do this incrementally as each capability is completed, not in a batch at the end. If a capability line did not have a checkbox prefix, add one as `- [x]`. This ensures that if the session is interrupted, progress is not lost. When updating gspec files, preserve existing `spec-version` YAML frontmatter. If a file lacks frontmatter, add `---\nspec-version: v1\n---` at the top.
|
|
113
113
|
4. **Run tests** — Execute the tests defined for this phase (and any existing tests to catch regressions). Fix any failures before proceeding.
|
|
114
114
|
6. **Surface new gaps** — If implementation reveals new ambiguities, pause and consult the user rather than making silent assumptions
|
|
115
115
|
7. **Pause and report** — After completing the phase and confirming tests pass, present a phase completion summary to the user:
|
|
@@ -4,7 +4,7 @@ description: Migrate existing gspec files to the current format when upgrading t
|
|
|
4
4
|
|
|
5
5
|
You are a Technical Documentation Migration Specialist.
|
|
6
6
|
|
|
7
|
-
Your task is to update existing gspec specification documents to match the current
|
|
7
|
+
Your task is to update existing gspec specification documents to match the current spec format (spec-version v1). You preserve all substantive content while ensuring documents follow the latest structural conventions.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
@@ -18,16 +18,17 @@ Scan the `gspec/` directory for all Markdown files:
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
For each file, check the YAML frontmatter at the top of the file:
|
|
21
|
-
- If the file starts with `---` followed by YAML content and another `---`, read the `gspec-version` field
|
|
21
|
+
- If the file starts with `---` followed by YAML content and another `---`, read the `spec-version` field (also check for the legacy `gspec-version` field)
|
|
22
22
|
- If no frontmatter exists, the file predates version tracking
|
|
23
|
-
- If `
|
|
23
|
+
- If `spec-version` matches `v1`, the file is current — skip it
|
|
24
|
+
- If the file has `gspec-version` (old field name) instead of `spec-version`, it needs migration regardless of value
|
|
24
25
|
|
|
25
26
|
Present an inventory to the user:
|
|
26
27
|
|
|
27
28
|
> **gspec File Inventory:**
|
|
28
29
|
> - `gspec/profile.md` — no version (needs migration)
|
|
29
|
-
> - `gspec/stack.md` — version 1.0.3 (needs migration)
|
|
30
|
-
> - `gspec/style.md` — version
|
|
30
|
+
> - `gspec/stack.md` — gspec-version 1.0.3 (needs migration — old field name)
|
|
31
|
+
> - `gspec/style.md` — spec-version v1 (current, skipping)
|
|
31
32
|
> - `gspec/features/user-auth.md` — no version (needs migration)
|
|
32
33
|
|
|
33
34
|
Ask the user to confirm which files to migrate, or confirm all.
|
|
@@ -62,21 +63,22 @@ For each file to migrate:
|
|
|
62
63
|
5. **Add or update the frontmatter** — Ensure the file starts with:
|
|
63
64
|
```
|
|
64
65
|
---
|
|
65
|
-
|
|
66
|
+
spec-version: v1
|
|
66
67
|
---
|
|
67
68
|
```
|
|
69
|
+
If the file has the old `gspec-version` field, rename it to `spec-version` and set the value to `v1`.
|
|
68
70
|
6. **Present the proposed changes** to the user before writing. Show what sections are being reorganized, what is being added, and confirm no content is being lost.
|
|
69
71
|
|
|
70
72
|
### Phase 4: Verify — Confirm Migration
|
|
71
73
|
|
|
72
74
|
After migrating all files:
|
|
73
75
|
|
|
74
|
-
1. **Verify every migrated file** has the correct frontmatter
|
|
76
|
+
1. **Verify every migrated file** has the correct frontmatter (`spec-version: v1`)
|
|
75
77
|
2. **Verify no content was lost** — Briefly summarize what was preserved and any content that was relocated
|
|
76
78
|
3. **Present a completion summary**:
|
|
77
79
|
|
|
78
80
|
> **Migration Complete:**
|
|
79
|
-
> - 4 files migrated to version
|
|
81
|
+
> - 4 files migrated to spec-version v1
|
|
80
82
|
> - 2 files were already current (skipped)
|
|
81
83
|
> - Content preserved in all files
|
|
82
84
|
> - Sections reorganized: [list any structural changes]
|
|
@@ -99,8 +101,9 @@ After migrating all files:
|
|
|
99
101
|
|
|
100
102
|
**Frontmatter handling:**
|
|
101
103
|
- If the file has no frontmatter, add it at the very top
|
|
102
|
-
- If the file has
|
|
103
|
-
- If the file has
|
|
104
|
+
- If the file has the old `gspec-version` field, rename it to `spec-version`
|
|
105
|
+
- If the file has frontmatter without `spec-version`, add the field
|
|
106
|
+
- If the file has an outdated `spec-version`, update it
|
|
104
107
|
- Preserve any other frontmatter fields that may exist
|
|
105
108
|
|
|
106
109
|
---
|
|
@@ -21,10 +21,10 @@ You should:
|
|
|
21
21
|
|
|
22
22
|
- Output **ONLY** a single Markdown document
|
|
23
23
|
- Save the file as `gspec/practices.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
24
|
-
- Begin the file with YAML frontmatter containing the
|
|
24
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
25
25
|
```
|
|
26
26
|
---
|
|
27
|
-
|
|
27
|
+
spec-version: v1
|
|
28
28
|
---
|
|
29
29
|
```
|
|
30
30
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -21,10 +21,10 @@ You should:
|
|
|
21
21
|
|
|
22
22
|
- Output **ONLY** a single Markdown document
|
|
23
23
|
- Save the file as `gspec/profile.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
24
|
-
- Begin the file with YAML frontmatter containing the
|
|
24
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
25
25
|
```
|
|
26
26
|
---
|
|
27
|
-
|
|
27
|
+
spec-version: v1
|
|
28
28
|
---
|
|
29
29
|
```
|
|
30
30
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -161,7 +161,7 @@ After writing `gspec/research.md`, ask the user:
|
|
|
161
161
|
- Assumptions & Risks (assumptions, open questions, key risks and mitigations)
|
|
162
162
|
- Success Metrics
|
|
163
163
|
- Implementation Context (standard portability note)
|
|
164
|
-
- Begin the file with YAML frontmatter: `---\
|
|
164
|
+
- Begin the file with YAML frontmatter: `---\nspec-version: v1\n---`
|
|
165
165
|
2. **Name the file** descriptively based on the feature (e.g., `gspec/features/csv-export.md`, `gspec/features/onboarding-wizard.md`)
|
|
166
166
|
3. **Keep the PRD portable** — use generic role descriptions (not project-specific persona names), define success metrics in terms of the feature's own outcomes (not project-level KPIs), and describe UX behavior generically (not tied to a specific design system). The PRD should be reusable across projects.
|
|
167
167
|
4. **Keep the PRD product-focused** — describe *what* and *why*, not *how*. Implementation details belong in the code, not the PRD.
|
|
@@ -177,10 +177,10 @@ After writing `gspec/research.md`, ask the user:
|
|
|
177
177
|
|
|
178
178
|
- Save the primary output as `gspec/research.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
179
179
|
- If the user accepts feature generation (Phase 7), also save feature PRDs to `gspec/features/`
|
|
180
|
-
- Begin `gspec/research.md` with YAML frontmatter containing the
|
|
180
|
+
- Begin `gspec/research.md` with YAML frontmatter containing the spec version:
|
|
181
181
|
```
|
|
182
182
|
---
|
|
183
|
-
|
|
183
|
+
spec-version: v1
|
|
184
184
|
---
|
|
185
185
|
```
|
|
186
186
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -197,7 +197,7 @@ The `gspec/research.md` file must follow this structure:
|
|
|
197
197
|
|
|
198
198
|
```markdown
|
|
199
199
|
---
|
|
200
|
-
|
|
200
|
+
spec-version: v1
|
|
201
201
|
---
|
|
202
202
|
|
|
203
203
|
# Competitive Research
|
|
@@ -21,10 +21,10 @@ You should:
|
|
|
21
21
|
|
|
22
22
|
- Output **ONLY** a single Markdown document
|
|
23
23
|
- Save the file as `gspec/stack.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
24
|
-
- Begin the file with YAML frontmatter containing the
|
|
24
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
25
25
|
```
|
|
26
26
|
---
|
|
27
|
-
|
|
27
|
+
spec-version: v1
|
|
28
28
|
---
|
|
29
29
|
```
|
|
30
30
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -23,10 +23,10 @@ You should:
|
|
|
23
23
|
|
|
24
24
|
- Output **ONLY** a single Markdown document
|
|
25
25
|
- Save the file as `gspec/style.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
26
|
-
- Begin the file with YAML frontmatter containing the
|
|
26
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
27
27
|
```
|
|
28
28
|
---
|
|
29
|
-
|
|
29
|
+
spec-version: v1
|
|
30
30
|
---
|
|
31
31
|
```
|
|
32
32
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -128,7 +128,7 @@ When updating specs to resolve a discrepancy:
|
|
|
128
128
|
|
|
129
129
|
- **Surgical updates only** — change the minimum text needed to resolve the conflict
|
|
130
130
|
- **Preserve format and tone** — match the existing document's style, heading structure, and voice
|
|
131
|
-
- **Preserve `
|
|
131
|
+
- **Preserve `spec-version` frontmatter** — do not alter or remove it
|
|
132
132
|
- **Do not rewrite sections** — if a one-line change resolves the conflict, make a one-line change
|
|
133
133
|
- **Do not add changelog annotations** — the git history captures what changed
|
|
134
134
|
|
|
@@ -42,10 +42,10 @@ All of these provide essential context. If any are missing, note the gap and mak
|
|
|
42
42
|
|
|
43
43
|
- Output **ONLY** a single Markdown document
|
|
44
44
|
- Save the file as `gspec/architecture.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
45
|
-
- Begin the file with YAML frontmatter containing the
|
|
45
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
46
46
|
```
|
|
47
47
|
---
|
|
48
|
-
|
|
48
|
+
spec-version: v1
|
|
49
49
|
---
|
|
50
50
|
```
|
|
51
51
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -82,10 +82,10 @@ Feature PRDs are designed to be **portable across projects**. A feature spec wri
|
|
|
82
82
|
- Output one or more Markdown documents — **one per feature**
|
|
83
83
|
- Save each file to the `gspec/features/` folder in the root of the project, create it if it doesn't exist
|
|
84
84
|
- Name each file based on the feature (e.g., `user-authentication.md`, `dashboard-analytics.md`)
|
|
85
|
-
- Begin each file with YAML frontmatter containing the
|
|
85
|
+
- Begin each file with YAML frontmatter containing the spec version:
|
|
86
86
|
```
|
|
87
87
|
---
|
|
88
|
-
|
|
88
|
+
spec-version: v1
|
|
89
89
|
---
|
|
90
90
|
```
|
|
91
91
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -110,7 +110,7 @@ Present a brief scaffold summary to the user before proceeding to feature implem
|
|
|
110
110
|
b. **Follow the practices** — Adhere to coding standards, testing philosophy, pipeline structure, and conventions from `gspec/practices.md`
|
|
111
111
|
c. **Follow the style** — Apply the design system, tokens, and icon library from `gspec/style.md`. The style is the single authority for icon library choices. Component libraries (e.g., shadcn/ui) are defined in `gspec/stack.md`.
|
|
112
112
|
d. **Satisfy the requirements** — Trace each piece of code back to a functional requirement in the feature PRD (if available) or to the user's stated goals and the approved implementation plan
|
|
113
|
-
3. **Mark capabilities as implemented** — After successfully implementing each capability, immediately update the feature PRD by changing its checkbox from `- [ ]` to `- [x]`. Do this incrementally as each capability is completed, not in a batch at the end. If a capability line did not have a checkbox prefix, add one as `- [x]`. This ensures that if the session is interrupted, progress is not lost. When updating gspec files, preserve existing `
|
|
113
|
+
3. **Mark capabilities as implemented** — After successfully implementing each capability, immediately update the feature PRD by changing its checkbox from `- [ ]` to `- [x]`. Do this incrementally as each capability is completed, not in a batch at the end. If a capability line did not have a checkbox prefix, add one as `- [x]`. This ensures that if the session is interrupted, progress is not lost. When updating gspec files, preserve existing `spec-version` YAML frontmatter. If a file lacks frontmatter, add `---\nspec-version: v1\n---` at the top.
|
|
114
114
|
4. **Run tests** — Execute the tests defined for this phase (and any existing tests to catch regressions). Fix any failures before proceeding.
|
|
115
115
|
6. **Surface new gaps** — If implementation reveals new ambiguities, pause and consult the user rather than making silent assumptions
|
|
116
116
|
7. **Pause and report** — After completing the phase and confirming tests pass, present a phase completion summary to the user:
|
|
@@ -5,7 +5,7 @@ description: Migrate existing gspec files to the current format when upgrading t
|
|
|
5
5
|
|
|
6
6
|
You are a Technical Documentation Migration Specialist.
|
|
7
7
|
|
|
8
|
-
Your task is to update existing gspec specification documents to match the current
|
|
8
|
+
Your task is to update existing gspec specification documents to match the current spec format (spec-version v1). You preserve all substantive content while ensuring documents follow the latest structural conventions.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -19,16 +19,17 @@ Scan the `gspec/` directory for all Markdown files:
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
For each file, check the YAML frontmatter at the top of the file:
|
|
22
|
-
- If the file starts with `---` followed by YAML content and another `---`, read the `gspec-version` field
|
|
22
|
+
- If the file starts with `---` followed by YAML content and another `---`, read the `spec-version` field (also check for the legacy `gspec-version` field)
|
|
23
23
|
- If no frontmatter exists, the file predates version tracking
|
|
24
|
-
- If `
|
|
24
|
+
- If `spec-version` matches `v1`, the file is current — skip it
|
|
25
|
+
- If the file has `gspec-version` (old field name) instead of `spec-version`, it needs migration regardless of value
|
|
25
26
|
|
|
26
27
|
Present an inventory to the user:
|
|
27
28
|
|
|
28
29
|
> **gspec File Inventory:**
|
|
29
30
|
> - `gspec/profile.md` — no version (needs migration)
|
|
30
|
-
> - `gspec/stack.md` — version 1.0.3 (needs migration)
|
|
31
|
-
> - `gspec/style.md` — version
|
|
31
|
+
> - `gspec/stack.md` — gspec-version 1.0.3 (needs migration — old field name)
|
|
32
|
+
> - `gspec/style.md` — spec-version v1 (current, skipping)
|
|
32
33
|
> - `gspec/features/user-auth.md` — no version (needs migration)
|
|
33
34
|
|
|
34
35
|
Ask the user to confirm which files to migrate, or confirm all.
|
|
@@ -63,21 +64,22 @@ For each file to migrate:
|
|
|
63
64
|
5. **Add or update the frontmatter** — Ensure the file starts with:
|
|
64
65
|
```
|
|
65
66
|
---
|
|
66
|
-
|
|
67
|
+
spec-version: v1
|
|
67
68
|
---
|
|
68
69
|
```
|
|
70
|
+
If the file has the old `gspec-version` field, rename it to `spec-version` and set the value to `v1`.
|
|
69
71
|
6. **Present the proposed changes** to the user before writing. Show what sections are being reorganized, what is being added, and confirm no content is being lost.
|
|
70
72
|
|
|
71
73
|
### Phase 4: Verify — Confirm Migration
|
|
72
74
|
|
|
73
75
|
After migrating all files:
|
|
74
76
|
|
|
75
|
-
1. **Verify every migrated file** has the correct frontmatter
|
|
77
|
+
1. **Verify every migrated file** has the correct frontmatter (`spec-version: v1`)
|
|
76
78
|
2. **Verify no content was lost** — Briefly summarize what was preserved and any content that was relocated
|
|
77
79
|
3. **Present a completion summary**:
|
|
78
80
|
|
|
79
81
|
> **Migration Complete:**
|
|
80
|
-
> - 4 files migrated to version
|
|
82
|
+
> - 4 files migrated to spec-version v1
|
|
81
83
|
> - 2 files were already current (skipped)
|
|
82
84
|
> - Content preserved in all files
|
|
83
85
|
> - Sections reorganized: [list any structural changes]
|
|
@@ -100,8 +102,9 @@ After migrating all files:
|
|
|
100
102
|
|
|
101
103
|
**Frontmatter handling:**
|
|
102
104
|
- If the file has no frontmatter, add it at the very top
|
|
103
|
-
- If the file has
|
|
104
|
-
- If the file has
|
|
105
|
+
- If the file has the old `gspec-version` field, rename it to `spec-version`
|
|
106
|
+
- If the file has frontmatter without `spec-version`, add the field
|
|
107
|
+
- If the file has an outdated `spec-version`, update it
|
|
105
108
|
- Preserve any other frontmatter fields that may exist
|
|
106
109
|
|
|
107
110
|
---
|
|
@@ -22,10 +22,10 @@ You should:
|
|
|
22
22
|
|
|
23
23
|
- Output **ONLY** a single Markdown document
|
|
24
24
|
- Save the file as `gspec/practices.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
25
|
-
- Begin the file with YAML frontmatter containing the
|
|
25
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
26
26
|
```
|
|
27
27
|
---
|
|
28
|
-
|
|
28
|
+
spec-version: v1
|
|
29
29
|
---
|
|
30
30
|
```
|
|
31
31
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -22,10 +22,10 @@ You should:
|
|
|
22
22
|
|
|
23
23
|
- Output **ONLY** a single Markdown document
|
|
24
24
|
- Save the file as `gspec/profile.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
25
|
-
- Begin the file with YAML frontmatter containing the
|
|
25
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
26
26
|
```
|
|
27
27
|
---
|
|
28
|
-
|
|
28
|
+
spec-version: v1
|
|
29
29
|
---
|
|
30
30
|
```
|
|
31
31
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -162,7 +162,7 @@ After writing `gspec/research.md`, ask the user:
|
|
|
162
162
|
- Assumptions & Risks (assumptions, open questions, key risks and mitigations)
|
|
163
163
|
- Success Metrics
|
|
164
164
|
- Implementation Context (standard portability note)
|
|
165
|
-
- Begin the file with YAML frontmatter: `---\
|
|
165
|
+
- Begin the file with YAML frontmatter: `---\nspec-version: v1\n---`
|
|
166
166
|
2. **Name the file** descriptively based on the feature (e.g., `gspec/features/csv-export.md`, `gspec/features/onboarding-wizard.md`)
|
|
167
167
|
3. **Keep the PRD portable** — use generic role descriptions (not project-specific persona names), define success metrics in terms of the feature's own outcomes (not project-level KPIs), and describe UX behavior generically (not tied to a specific design system). The PRD should be reusable across projects.
|
|
168
168
|
4. **Keep the PRD product-focused** — describe *what* and *why*, not *how*. Implementation details belong in the code, not the PRD.
|
|
@@ -178,10 +178,10 @@ After writing `gspec/research.md`, ask the user:
|
|
|
178
178
|
|
|
179
179
|
- Save the primary output as `gspec/research.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
180
180
|
- If the user accepts feature generation (Phase 7), also save feature PRDs to `gspec/features/`
|
|
181
|
-
- Begin `gspec/research.md` with YAML frontmatter containing the
|
|
181
|
+
- Begin `gspec/research.md` with YAML frontmatter containing the spec version:
|
|
182
182
|
```
|
|
183
183
|
---
|
|
184
|
-
|
|
184
|
+
spec-version: v1
|
|
185
185
|
---
|
|
186
186
|
```
|
|
187
187
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -198,7 +198,7 @@ The `gspec/research.md` file must follow this structure:
|
|
|
198
198
|
|
|
199
199
|
```markdown
|
|
200
200
|
---
|
|
201
|
-
|
|
201
|
+
spec-version: v1
|
|
202
202
|
---
|
|
203
203
|
|
|
204
204
|
# Competitive Research
|
|
@@ -22,10 +22,10 @@ You should:
|
|
|
22
22
|
|
|
23
23
|
- Output **ONLY** a single Markdown document
|
|
24
24
|
- Save the file as `gspec/stack.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
25
|
-
- Begin the file with YAML frontmatter containing the
|
|
25
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
26
26
|
```
|
|
27
27
|
---
|
|
28
|
-
|
|
28
|
+
spec-version: v1
|
|
29
29
|
---
|
|
30
30
|
```
|
|
31
31
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
@@ -24,10 +24,10 @@ You should:
|
|
|
24
24
|
|
|
25
25
|
- Output **ONLY** a single Markdown document
|
|
26
26
|
- Save the file as `gspec/style.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
27
|
-
- Begin the file with YAML frontmatter containing the
|
|
27
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
28
28
|
```
|
|
29
29
|
---
|
|
30
|
-
|
|
30
|
+
spec-version: v1
|
|
31
31
|
---
|
|
32
32
|
```
|
|
33
33
|
The frontmatter must be the very first content in the file, before the main heading.
|