gspec 1.0.1 → 1.1.0

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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +100 -47
  3. package/bin/gspec.js +106 -16
  4. package/commands/gspec.architect.md +333 -0
  5. package/commands/gspec.dor.md +34 -14
  6. package/commands/gspec.epic.md +91 -43
  7. package/commands/gspec.feature.md +82 -27
  8. package/commands/gspec.implement.md +69 -23
  9. package/commands/gspec.migrate.md +115 -0
  10. package/commands/gspec.practices.md +7 -0
  11. package/commands/gspec.profile.md +7 -0
  12. package/commands/gspec.record.md +22 -13
  13. package/commands/gspec.stack.md +7 -0
  14. package/commands/gspec.style.md +38 -3
  15. package/dist/antigravity/gspec-architect/SKILL.md +337 -0
  16. package/dist/antigravity/gspec-dor/SKILL.md +34 -14
  17. package/dist/antigravity/gspec-epic/SKILL.md +91 -43
  18. package/dist/antigravity/gspec-feature/SKILL.md +82 -27
  19. package/dist/antigravity/gspec-implement/SKILL.md +69 -23
  20. package/dist/antigravity/gspec-migrate/SKILL.md +119 -0
  21. package/dist/antigravity/gspec-practices/SKILL.md +7 -0
  22. package/dist/antigravity/gspec-profile/SKILL.md +7 -0
  23. package/dist/antigravity/gspec-record/SKILL.md +22 -13
  24. package/dist/antigravity/gspec-stack/SKILL.md +7 -0
  25. package/dist/antigravity/gspec-style/SKILL.md +38 -3
  26. package/dist/claude/gspec-architect/SKILL.md +338 -0
  27. package/dist/claude/gspec-dor/SKILL.md +34 -14
  28. package/dist/claude/gspec-epic/SKILL.md +91 -43
  29. package/dist/claude/gspec-feature/SKILL.md +82 -27
  30. package/dist/claude/gspec-implement/SKILL.md +69 -23
  31. package/dist/claude/gspec-migrate/SKILL.md +120 -0
  32. package/dist/claude/gspec-practices/SKILL.md +7 -0
  33. package/dist/claude/gspec-profile/SKILL.md +7 -0
  34. package/dist/claude/gspec-record/SKILL.md +22 -13
  35. package/dist/claude/gspec-stack/SKILL.md +7 -0
  36. package/dist/claude/gspec-style/SKILL.md +38 -3
  37. package/dist/cursor/gspec-architect.mdc +336 -0
  38. package/dist/cursor/gspec-dor.mdc +34 -14
  39. package/dist/cursor/gspec-epic.mdc +91 -43
  40. package/dist/cursor/gspec-feature.mdc +82 -27
  41. package/dist/cursor/gspec-implement.mdc +69 -23
  42. package/dist/cursor/gspec-migrate.mdc +118 -0
  43. package/dist/cursor/gspec-practices.mdc +7 -0
  44. package/dist/cursor/gspec-profile.mdc +7 -0
  45. package/dist/cursor/gspec-record.mdc +22 -13
  46. package/dist/cursor/gspec-stack.mdc +7 -0
  47. package/dist/cursor/gspec-style.mdc +38 -3
  48. package/package.json +6 -3
@@ -6,12 +6,32 @@ You are a senior Product Manager at a high-performing software company.
6
6
 
7
7
  Your task is to take the provided feature description (which may be vague or detailed) and produce a **Product Requirements Document (PRD)** that clearly defines *what* is being built and *why*, without deep technical or architectural implementation details.
8
8
 
9
+ ## Important: Agent-Oriented Documentation
10
+
11
+ **These PRDs are designed for automated agent consumption** (via `gspec-implement`), with humans validating the content for accuracy and completeness. Write documents that are:
12
+
13
+ - **Implementation-ready blueprints**, not project plans
14
+ - Focused on **what** to build and **why**, not **when** or **how long**
15
+ - Clear on technical and functional requirements an agent needs to execute
16
+
17
+ **AVOID project management details:**
18
+ - ❌ Sprint planning, week numbers, or timeline estimates
19
+ - ❌ Team assignments or resource allocation
20
+ - ❌ Velocity or story point estimates
21
+ - ❌ Delivery schedules or milestone dates
22
+
23
+ **DO include implementation guidance:**
24
+ - ✅ Clear functional requirements and acceptance criteria
25
+ - ✅ Dependencies between capabilities
26
+ - ✅ Priority levels (P0, P1, P2) for scope decisions
27
+ - ✅ Build order recommendations based on technical dependencies
28
+
9
29
  You should:
10
30
  - **Read existing gspec documents first** to ground the PRD in established product context
11
31
  - Ask clarifying questions when essential information is missing rather than guessing
12
32
  - When asking questions, offer 2-3 specific suggestions to guide the discussion
13
33
  - Focus on user value, scope, and outcomes
14
- - Write for product, design, and engineering audiences
34
+ - Write for automated implementation with human validation
15
35
  - Be concise, structured, and decisive
16
36
 
17
37
  ---
@@ -38,6 +58,13 @@ If these files don't exist, proceed without them — they are optional context,
38
58
  - Output **ONLY** a single Markdown document
39
59
  - Save the file to the `gspec/features/` folder in the root of the project, create it if it doesn't exist
40
60
  - Name the file based on the feature (e.g., `user-authentication.md`, `dashboard-analytics.md`)
61
+ - Begin the file with YAML frontmatter containing the gspec version:
62
+ ```
63
+ ---
64
+ gspec-version: 1.1.0
65
+ ---
66
+ ```
67
+ The frontmatter must be the very first content in the file, before the main heading.
41
68
  - **Before generating the document**, ask clarifying questions if:
42
69
  - The target users are unclear
43
70
  - The scope or boundaries of the feature are ambiguous
@@ -49,48 +76,76 @@ If these files don't exist, proceed without them — they are optional context,
49
76
  - No code blocks except where examples add clarity
50
77
  - Make tradeoffs and scope explicit
51
78
 
79
+ ### Technology Agnosticism
80
+
81
+ **IMPORTANT**: PRDs must remain technology-agnostic to enable implementation with different technology stacks. The `gspec/stack.md` file is the single source of truth for technology choices.
82
+
83
+ **DO use generic architectural terms:**
84
+ - ✅ "database", "data store", "persistent storage"
85
+ - ✅ "authentication service", "IAM", "identity provider"
86
+ - ✅ "API", "backend service", "server"
87
+ - ✅ "frontend", "client application", "user interface"
88
+ - ✅ "message queue", "event system", "pub/sub"
89
+ - ✅ "object storage", "file storage"
90
+ - ✅ "cache", "caching layer"
91
+ - ✅ "search index", "full-text search"
92
+
93
+ **DO NOT reference specific technologies:**
94
+ - ❌ React, Vue, Angular, Svelte
95
+ - ❌ PostgreSQL, MySQL, MongoDB, DynamoDB
96
+ - ❌ AWS Lambda, Google Cloud Functions, Azure Functions
97
+ - ❌ Redis, Memcached
98
+ - ❌ Elasticsearch, Algolia, Solr
99
+ - ❌ S3, GCS, Azure Blob Storage
100
+ - ❌ Kafka, RabbitMQ, SQS
101
+
102
+ This separation allows the same feature spec to be implemented using different technology stacks by swapping the Stack file.
103
+
52
104
  ---
53
105
 
54
106
  ## Required Sections
55
107
 
108
+ **IMPORTANT**: Only include the sections listed below. Do NOT add additional sections such as "Technology Notes", "Implementation Details", "Technical Architecture", or any other custom sections. Stick strictly to this structure.
109
+
56
110
  ### 1. Overview
57
111
  - Feature name
58
- - Summary
59
- - Objective
60
-
61
- ### 2. Problem & Context
62
- - User problem
63
- - Why this matters now
64
- - Current pain points
65
-
66
- ### 3. Goals & Non-Goals
67
- - In-scope goals
68
- - Explicitly out-of-scope items
112
+ - Summary (1-2 sentences)
113
+ - Problem being solved and why it matters now
69
114
 
70
- ### 4. Users & Use Cases
115
+ ### 2. Users & Use Cases
71
116
  - Primary users
72
- - Key use cases
117
+ - Key use cases (3-4 scenarios showing how users benefit)
73
118
 
74
- ### 5. Assumptions & Open Questions
75
- - Assumptions
76
- - Open questions (non-blocking)
119
+ ### 3. Scope
120
+ - In-scope goals
121
+ - Out-of-scope items (things this feature explicitly won't do)
122
+ - Deferred ideas (things we may do later, but not now)
77
123
 
78
- ### 6. Capabilities
124
+ ### 4. Capabilities
79
125
  - What the feature provides to users
80
126
  - **Priority level** for each capability (P0 = must-have, P1 = should-have, P2 = nice-to-have)
81
127
  - Focus on *what* users can do, not *how* they do it
82
128
  - **Use unchecked markdown checkboxes** for each capability to enable implementation tracking (e.g., `- [ ] **P0**: User can sign in with email and password`). The `gspec-implement` command will check these off (`- [x]`) as capabilities are implemented, allowing incremental runs.
129
+ - **Each capability MUST include brief acceptance criteria** — 2-4 testable conditions that define "done" for that capability. These tell the implementing agent exactly when a capability is complete and give test writers concrete assertions. Format as a sub-list under each capability:
130
+ ```
131
+ - [ ] **P0**: User can sign in with email and password
132
+ - Valid credentials → user is redirected to dashboard and session is created
133
+ - Invalid credentials → error message is shown, no session is created
134
+ - Empty fields → inline validation prevents submission
135
+ ```
136
+
137
+ ### 5. Dependencies
138
+ - Dependencies on other features (link to their PRDs if they exist)
139
+ - External dependencies (third-party services, APIs, data sources)
140
+ - If none, state "None"
141
+
142
+ ### 6. Assumptions & Risks
143
+ - Assumptions (what we're taking as true)
144
+ - Open questions (non-blocking unknowns to resolve during implementation)
145
+ - Key risks and mitigations (brief bullet points — focus on risks that could affect implementation scope or approach)
83
146
 
84
147
  ### 7. Success Metrics
85
- - How success is measured
86
- - Leading vs lagging indicators
87
-
88
- ### 8. Risks & Mitigations
89
- - Product or delivery risks
90
- - Mitigation strategies
91
-
92
- ### 9. Future Considerations
93
- - Explicitly deferred ideas
148
+ - 2-4 measurable outcomes that define whether this feature is working
94
149
 
95
150
  ---
96
151
 
@@ -32,9 +32,10 @@ Before writing any code, read all available gspec documents in this order:
32
32
  1. `gspec/profile.md` — Understand what the product is and who it's for
33
33
  2. `gspec/epics/*.md` — Understand the big picture and feature dependencies
34
34
  3. `gspec/features/*.md` — Understand individual feature requirements
35
- 4. `gspec/stack.md` — Understand the technology choices and architecture
35
+ 4. `gspec/stack.md` — Understand the technology choices
36
36
  5. `gspec/style.md` — Understand the visual design language
37
37
  6. `gspec/practices.md` — Understand development standards and conventions
38
+ 7. `gspec/architecture.md` — Understand the technical architecture: project structure, data model, API design, component architecture, and environment setup. **This is the primary reference for how to scaffold and structure the codebase.** If this file is missing, note the gap and suggest the user run `gspec-architect` first — but do not block on it.
38
39
 
39
40
  If any of these files are missing, note what's missing and proceed with what's available.
40
41
 
@@ -165,8 +166,8 @@ After reading the specs (and completing competitor research if the user opted in
165
166
  3. **Identify gaps** in the specified features — areas where the specs don't fully specify behavior:
166
167
  - Missing edge cases or error handling scenarios
167
168
  - Unspecified user flows or interactions
168
- - Ambiguous acceptance criteria
169
- - Undefined data models or API contracts
169
+ - Ambiguous or missing acceptance criteria on capabilities
170
+ - Undefined data models or API contracts (check `gspec/architecture.md`'s "Data Model" and "API Design" sections — if defined, use them as the basis for your data layer and API routes; if missing or incomplete, flag the gap)
170
171
  - Integration points that aren't fully described
171
172
  - Missing or unclear state management patterns
172
173
  - *If competitor research was conducted:* Patterns that differ from established competitor conventions without clear rationale — users may have ingrained expectations from competitor products
@@ -211,15 +212,14 @@ After the user approves proposed features (whether from gap analysis, competitor
211
212
  For each approved feature that doesn't already have a PRD in `gspec/features/`:
212
213
 
213
214
  1. **Generate a feature PRD** following the same structure used by the `gspec-feature` command:
214
- - Overview (name, summary, objective)
215
- - Problem & Context
216
- - Goals & Non-Goals
215
+ - Overview (name, summary, problem being solved and why it matters now)
217
216
  - Users & Use Cases
218
- - Assumptions & Open Questions
219
- - Capabilities (with P0/P1/P2 priority levels, using **unchecked checkboxes** `- [ ]` for each capability)
217
+ - Scope (in-scope goals, out-of-scope items, deferred ideas)
218
+ - Capabilities (with P0/P1/P2 priority levels, using **unchecked checkboxes** `- [ ]` for each capability, each with 2-4 **acceptance criteria** as a sub-list)
219
+ - Dependencies (on other features or external services)
220
+ - Assumptions & Risks (assumptions, open questions, key risks and mitigations)
220
221
  - Success Metrics
221
- - Risks & Mitigations
222
- - Future Considerations
222
+ - Begin the file with YAML frontmatter: `---\ngspec-version: 1.1.0\n---`
223
223
  2. **Name the file** descriptively based on the feature (e.g., `gspec/features/onboarding-wizard.md`, `gspec/features/export-csv.md`)
224
224
  3. **Ground the PRD in existing gspec context** — reference the product profile's target users, align success metrics with established metrics, and respect stated non-goals
225
225
  4. **Keep the PRD product-focused** — describe *what* and *why*, not *how*. Implementation details belong in the code, not the PRD.
@@ -227,26 +227,71 @@ For each approved feature that doesn't already have a PRD in `gspec/features/`:
227
227
 
228
228
  This step is not optional. Every feature the agent implements should be traceable to either a pre-existing PRD or one generated during this phase. Skipping this step leads to undocumented features that future sessions cannot reason about.
229
229
 
230
+ ### Phase 3c: Implementation Plan — Define the Build Order
231
+
232
+ After all approved features are codified as PRDs, **enter plan mode** and create a concrete, phased implementation plan. This is distinct from Phase 3's gap analysis — this is the tactical build plan.
233
+
234
+ 1. **Survey the full scope** — Review all feature PRDs (both pre-existing and newly codified in Phase 3b) and identify every unchecked capability that is in scope for this run
235
+ 2. **Organize into implementation phases** — Group related capabilities into logical phases that can be built and verified independently. Each phase should:
236
+ - Have a clear name and objective (e.g., "Phase 1: Core Data Models & API", "Phase 2: Authentication Flow")
237
+ - List the specific capabilities (with feature PRD references) it will implement
238
+ - Identify files to create or modify
239
+ - Note dependencies on prior phases
240
+ - Include an estimated scope (small/medium/large)
241
+ 3. **Define test expectations per phase** — For each phase, specify what tests will be run to verify correctness before moving on (unit tests, integration tests, build verification, etc.)
242
+ 4. **Present the plan** — Show the user the full phased plan with clear phase boundaries and ask for approval
243
+
244
+ **Wait for user approval before proceeding to Phase 4.** The user may reorder phases, adjust scope, or split/merge phases.
245
+
230
246
  ### Phase 4: Implementation — Build It
231
247
 
232
- Once the plan is approved, implement the code:
248
+ Once the implementation plan is approved, execute it **phase by phase**.
249
+
250
+ #### Phase 0 (if needed): Project Scaffolding
251
+
252
+ Before implementing any feature logic, ensure the project foundation exists. **Skip this step entirely if the project is already initialized** (i.e., a `package.json`, `pyproject.toml`, `go.mod`, or equivalent exists and dependencies are installed).
253
+
254
+ For greenfield projects:
255
+
256
+ 1. **Initialize the project** using the setup commands from `gspec/architecture.md`'s "Project Setup" section (e.g., `npx create-next-app`, `npm init`, etc.). Fall back to `gspec/stack.md` if no architecture document exists.
257
+ 2. **Install core dependencies** listed in the architecture or stack document, organized by category (framework, database, testing, styling, etc.)
258
+ 3. **Create the directory structure** matching the layout defined in `gspec/architecture.md`'s "Project Structure" section — this is the canonical reference for where all files go
259
+ 4. **Set up configuration files** as listed in `gspec/architecture.md`'s "Environment & Configuration" section — create `.env.example`, framework configs, linting/formatting configs, etc.
260
+ 5. **Apply design tokens** — if `gspec/style.md` includes a CSS custom properties block (Design Tokens section), create the global stylesheet or theme configuration file with those exact values
261
+ 6. **Create the data layer** — if `gspec/architecture.md` defines a "Data Model" section, use it to set up initial database schemas/models, migration files, and type definitions
262
+ 7. **Verify the scaffold builds and runs** — run the dev server or build command to confirm the empty project compiles without errors before adding feature code
263
+
264
+ Present a brief scaffold summary to the user before proceeding to feature implementation.
265
+
266
+ #### For each phase in the approved plan:
267
+
268
+ 1. **Announce the phase** — State which phase you're starting, what it covers, and what capabilities will be implemented
269
+ 2. **Implement the phase:**
270
+ a. **Follow the stack** — Use the exact technologies, frameworks, and patterns defined in `gspec/stack.md`
271
+ b. **Follow the practices** — Adhere to coding standards, testing requirements, and conventions from `gspec/practices.md`
272
+ c. **Follow the style** — Apply the design system, tokens, and component patterns from `gspec/style.md`
273
+ 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
274
+ e. *If competitor research was conducted:* **Leverage competitor insights** — When making UX or interaction design decisions not fully specified in the style guide, consider established patterns from competitor research. Don't blindly copy, but don't ignore proven conventions either.
275
+ 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 `gspec-version` YAML frontmatter. If a file lacks frontmatter, add `---\ngspec-version: 1.1.0\n---` at the top.
276
+ 4. **Update epic status** — When all capabilities in a feature PRD are checked, update the corresponding feature's checkbox in the epic summary file (if one exists) from `- [ ]` to `- [x]`.
277
+ 5. **Run tests** — Execute the tests defined for this phase (and any existing tests to catch regressions). Fix any failures before proceeding.
278
+ 6. **Surface new gaps** — If implementation reveals new ambiguities, pause and consult the user rather than making silent assumptions
279
+ 7. **Pause and report** — After completing the phase and confirming tests pass, present a phase completion summary to the user:
280
+
281
+ > **Phase 2 Complete: Authentication Flow**
282
+ > - Capabilities implemented: 3/3 (login, signup, password reset)
283
+ > - Tests: 12 passed, 0 failed
284
+ > - PRDs updated: `gspec/features/authentication.md`
285
+ > - Next up: Phase 3 — Dashboard & Navigation
233
286
 
234
- 1. **Follow the stack** Use the exact technologies, frameworks, and patterns defined in `gspec/stack.md`
235
- 2. **Follow the practices** — Adhere to coding standards, testing requirements, and conventions from `gspec/practices.md`
236
- 3. **Follow the style** — Apply the design system, tokens, and component patterns from `gspec/style.md`
237
- 4. **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
238
- 5. **Implement incrementally** — Complete one logical unit at a time, verify it works, then move on
239
- 6. **Surface new gaps as they arise** — If implementation reveals new ambiguities, pause and consult the user rather than making silent assumptions
240
- 7. *If competitor research was conducted:* **Leverage competitor insights during implementation** — When making UX or interaction design decisions not fully specified in the style guide, consider established patterns from competitor research. Don't blindly copy, but don't ignore proven conventions either.
241
- 8. **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.
242
- 9. **Update epic status** — When all capabilities in a feature PRD are checked, update the corresponding feature's checkbox in the epic summary file (if one exists) from `- [ ]` to `- [x]`.
287
+ **Wait for user confirmation before starting the next phase.** This gives the user an opportunity to review the work, request adjustments, or reprioritize remaining phases.
243
288
 
244
289
  ### Phase 5: Verification — Confirm Completeness
245
290
 
246
291
  After implementation:
247
292
 
248
293
  1. **Walk through each functional requirement** from the feature PRD (if available) or the approved implementation plan and confirm it's satisfied
249
- 2. **Review against acceptance criteria** — Does the implementation meet every stated criterion or approved goal?
294
+ 2. **Review against acceptance criteria** — For each capability in the feature PRDs, check that every acceptance criterion listed under it is satisfied. These sub-listed conditions are the definition of "done" for each capability. If any criterion is not met, the capability should not be marked `[x]`.
250
295
  3. **Check the Definition of Done** from `gspec/practices.md`
251
296
  4. *If competitor research was conducted:* **Verify competitive positioning** — Does the implemented feature meet table-stakes expectations? Does it deliver on the product's stated differentiation?
252
297
  5. **Note any deferred items** — Requirements that were intentionally postponed or descoped during implementation
@@ -326,11 +371,12 @@ The user's prompt takes priority for scoping. Use it to determine focus, and ref
326
371
 
327
372
  ## Output Rules
328
373
 
329
- - **Always start in plan mode** for gap analysis and implementation planning
374
+ - **Use plan mode twice** — once in Phase 3 for gap analysis and feature proposals, and again in Phase 3c for the concrete implementation plan. Both require user approval before proceeding.
375
+ - **Pause between implementation phases** — After completing each phase in Phase 4, run tests and wait for user confirmation before starting the next phase
330
376
  - Reference specific gspec documents and section numbers when discussing requirements
331
377
  - When proposing gap-fills, clearly distinguish between "the spec says X" and "I'm proposing Y"
332
378
  - *If competitor research was conducted:* When referencing findings, clearly attribute them — "Competitor X does Y" not "the industry does Y"
333
- - Create files following the project structure conventions from `gspec/stack.md` and `gspec/practices.md`
379
+ - Create files following the project structure defined in `gspec/architecture.md` (or `gspec/stack.md` and `gspec/practices.md` if no architecture document exists)
334
380
  - Write code that is production-quality, not prototypical — unless the user requests otherwise
335
381
  - Include tests as defined by `gspec/practices.md` testing standards
336
382
 
@@ -0,0 +1,118 @@
1
+ ---
2
+ description: Migrate existing gspec files to the current format when upgrading to a new gspec version
3
+ ---
4
+
5
+ You are a Technical Documentation Migration Specialist.
6
+
7
+ Your task is to update existing gspec specification documents to match the current gspec format (version 1.1.0). You preserve all substantive content while ensuring documents follow the latest structural conventions.
8
+
9
+ ---
10
+
11
+ ## Workflow
12
+
13
+ ### Phase 1: Inventory — Scan All gspec Files
14
+
15
+ Scan the `gspec/` directory for all Markdown files:
16
+ - `gspec/*.md` (profile, stack, style, practices, architecture)
17
+ - `gspec/features/*.md` (individual feature PRDs)
18
+ - `gspec/epics/*.md` (epic summaries)
19
+
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
22
+ - If no frontmatter exists, the file predates version tracking
23
+ - If `gspec-version` matches `1.1.0`, the file is current — skip it
24
+
25
+ Present an inventory to the user:
26
+
27
+ > **gspec File Inventory:**
28
+ > - `gspec/profile.md` — no version (needs migration)
29
+ > - `gspec/stack.md` — version 1.0.3 (needs migration)
30
+ > - `gspec/style.md` — version 1.1.0 (current, skipping)
31
+ > - `gspec/features/user-auth.md` — no version (needs migration)
32
+
33
+ Ask the user to confirm which files to migrate, or confirm all.
34
+
35
+ ### Phase 2: Reference — Read Current Format Definitions
36
+
37
+ For each file that needs migration, determine its document type and read the corresponding gspec command skill to understand the current expected format:
38
+
39
+ | gspec File | Document Type | Format Reference |
40
+ |---|---|---|
41
+ | `gspec/profile.md` | Product Profile | Read the `gspec-profile` skill definition |
42
+ | `gspec/stack.md` | Technology Stack | Read the `gspec-stack` skill definition |
43
+ | `gspec/style.md` | Visual Style Guide | Read the `gspec-style` skill definition |
44
+ | `gspec/practices.md` | Development Practices | Read the `gspec-practices` skill definition |
45
+ | `gspec/architecture.md` | Technical Architecture | Read the `gspec-architect` skill definition |
46
+ | `gspec/features/*.md` | Feature PRD | Read the `gspec-feature` skill definition |
47
+ | `gspec/epics/*.md` | Epic Summary | Read the `gspec-epic` skill definition |
48
+
49
+ The skill definitions are located in your installed skills directory. Read them to understand the current "Required Sections" structure for each document type.
50
+
51
+ ### Phase 3: Migrate — Update Each File
52
+
53
+ For each file to migrate:
54
+
55
+ 1. **Read the current file content** — Understand what information it contains
56
+ 2. **Read the format reference** — Understand the expected structure from the corresponding skill definition
57
+ 3. **Compare structures** — Identify:
58
+ - Sections that exist in both (may need renaming, reordering, or reformatting)
59
+ - Sections that are new in the current format (add with content from existing file where applicable, or mark as "To be defined")
60
+ - Sections that were removed in the current format (move content to the appropriate new section, or remove if truly obsolete)
61
+ - Formatting changes (e.g., checkbox format for capabilities, acceptance criteria requirements)
62
+ 4. **Preserve all substantive content** — Never discard information during migration. If a section was removed from the format, find the right place for its content or keep it in a "Legacy Content" section at the bottom.
63
+ 5. **Add or update the frontmatter** — Ensure the file starts with:
64
+ ```
65
+ ---
66
+ gspec-version: 1.1.0
67
+ ---
68
+ ```
69
+ 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
+
71
+ ### Phase 4: Verify — Confirm Migration
72
+
73
+ After migrating all files:
74
+
75
+ 1. **Verify every migrated file** has the correct frontmatter
76
+ 2. **Verify no content was lost** — Briefly summarize what was preserved and any content that was relocated
77
+ 3. **Present a completion summary**:
78
+
79
+ > **Migration Complete:**
80
+ > - 4 files migrated to version 1.1.0
81
+ > - 2 files were already current (skipped)
82
+ > - Content preserved in all files
83
+ > - Sections reorganized: [list any structural changes]
84
+
85
+ ---
86
+
87
+ ## Migration Rules
88
+
89
+ **Content preservation is paramount.** The user's information must never be discarded. If the format changes eliminated a section, find the right home for that content in the new structure.
90
+
91
+ **Maintain document voice.** Each gspec document was written with a specific tone and style. Restructure and reformat, but do not rewrite prose unless the meaning would be lost.
92
+
93
+ **Handle feature PRD capabilities carefully.** If migrating feature PRDs:
94
+ - Preserve checkbox states (`[x]` and `[ ]`) exactly as they are
95
+ - If capabilities lack checkboxes (old format), add unchecked checkboxes
96
+ - If capabilities lack acceptance criteria (current format requires them), add placeholder criteria: "Acceptance criteria to be defined"
97
+ - Preserve priority levels (P0, P1, P2)
98
+
99
+ **Handle missing sections gracefully.** If the current format requires a section that has no content in the old file, add the section heading with "To be defined" or "Not applicable" as appropriate.
100
+
101
+ **Frontmatter handling:**
102
+ - If the file has no frontmatter, add it at the very top
103
+ - If the file has frontmatter without `gspec-version`, add the field
104
+ - If the file has an outdated `gspec-version`, update it
105
+ - Preserve any other frontmatter fields that may exist
106
+
107
+ ---
108
+
109
+ ## Tone & Style
110
+
111
+ - Precise and careful — migration is a delicate operation
112
+ - Transparent — show every change before making it
113
+ - Conservative — when in doubt, preserve rather than discard
114
+
115
+ ---
116
+
117
+ ## Input
118
+
@@ -21,6 +21,13 @@ 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 gspec version:
25
+ ```
26
+ ---
27
+ gspec-version: 1.1.0
28
+ ---
29
+ ```
30
+ The frontmatter must be the very first content in the file, before the main heading.
24
31
  - **Before generating the document**, ask clarifying questions if:
25
32
  - Team size or experience level is unclear
26
33
  - Development timeline constraints are unspecified
@@ -21,6 +21,13 @@ 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 gspec version:
25
+ ```
26
+ ---
27
+ gspec-version: 1.1.0
28
+ ---
29
+ ```
30
+ The frontmatter must be the very first content in the file, before the main heading.
24
31
  - **Before generating the document**, ask clarifying questions if:
25
32
  - The target audience is unclear
26
33
  - The core value proposition is ambiguous
@@ -29,9 +29,10 @@ Before proposing any updates, read all available gspec documents in this order:
29
29
  1. `gspec/profile.md` — Product identity and scope
30
30
  2. `gspec/epics/*.md` — Epic structure and feature dependencies
31
31
  3. `gspec/features/*.md` — Individual feature requirements
32
- 4. `gspec/stack.md` — Technology choices and architecture
33
- 5. `gspec/style.md` — Visual design system
34
- 6. `gspec/practices.md` — Development standards and conventions
32
+ 4. `gspec/stack.md` — Technology choices
33
+ 5. `gspec/architecture.md` — Technical architecture: project structure, data model, API design, component architecture, environment setup
34
+ 6. `gspec/style.md` — Visual design system
35
+ 7. `gspec/practices.md` — Development standards and conventions
35
36
 
36
37
  If any files are missing, note what is missing and proceed with what is available. You only update specs that exist. Do not create new spec files (profile, stack, style, practices) unless the user explicitly asks. You may create a new feature PRD only when what needs recording constitutes an entirely new feature.
37
38
 
@@ -65,11 +66,16 @@ Systematically evaluate which gspec documents need updating. Apply this decision
65
66
  |---|---|---|
66
67
  | New user-facing capability | `gspec/features/<relevant>.md` | Add capability to existing PRD, or create new PRD if entirely new feature |
67
68
  | Modified capability behavior | `gspec/features/<relevant>.md` | Update the affected capability description |
68
- | Removed or deprecated capability | `gspec/features/<relevant>.md` | Move to Non-Goals or Future Considerations, note deprecation |
69
+ | Removed or deprecated capability | `gspec/features/<relevant>.md` | Move to Scope section (out-of-scope or deferred), note deprecation |
69
70
  | New technology or dependency added | `gspec/stack.md` | Add to appropriate section with rationale |
70
71
  | Technology or dependency removed | `gspec/stack.md` | Remove and note why |
71
72
  | Technology version changed | `gspec/stack.md` | Update version |
72
- | Visual design change (colors, typography, spacing, components) | `gspec/style.md` | Update affected tokens, components, or patterns |
73
+ | New data entity or changed data model | `gspec/architecture.md` | Update Data Model section with new/changed entities |
74
+ | New API endpoint or changed route | `gspec/architecture.md` | Update API Design section with new/changed routes |
75
+ | Project structure change (new directory, reorganization) | `gspec/architecture.md` | Update Project Structure section |
76
+ | Environment variable added or changed | `gspec/architecture.md` | Update Environment & Configuration section |
77
+ | Visual design change — generic (colors, typography, spacing, base component patterns) | `gspec/style.md` | Update affected tokens or base component patterns. Only include changes that are reusable and not tied to a specific feature or domain |
78
+ | Visual design change — feature-specific (a component unique to a feature, domain-specific visual treatment) | `gspec/features/<relevant>.md` | Document the visual details in the feature PRD's capabilities or a dedicated "Visual Design" subsection |
73
79
  | Development practice change (testing, code org, conventions) | `gspec/practices.md` | Update affected practice |
74
80
  | Product scope or direction change | `gspec/profile.md` | Update affected sections (Product Description, Use Cases, Roadmap, etc.) |
75
81
  | Feature dependency change | `gspec/epics/<relevant>.md` | Update dependency map and phasing |
@@ -114,16 +120,15 @@ After approval, write the spec updates:
114
120
  2. **Preserve format** — Match the existing document's style, heading structure, and tone exactly
115
121
  3. **Add change context where valuable** — Where appropriate, add a brief parenthetical note indicating the change (e.g., "*(Updated: switched from REST to GraphQL)*"). Do not over-annotate — use judgment about when a note adds value vs. noise.
116
122
  4. **For new feature PRDs** — If the change introduces an entirely new feature that warrants its own PRD, follow the same structure used by the `gspec-feature` command:
117
- - Overview (name, summary, objective)
118
- - Problem & Context
119
- - Goals & Non-Goals
123
+ - Overview (name, summary, problem being solved and why it matters now)
120
124
  - Users & Use Cases
121
- - Assumptions & Open Questions
122
- - Capabilities (with P0/P1/P2 priority levels)
125
+ - Scope (in-scope goals, out-of-scope items, deferred ideas)
126
+ - Capabilities (with P0/P1/P2 priority levels, each with 2-4 **acceptance criteria** as a sub-list)
127
+ - Dependencies (on other features or external services)
128
+ - Assumptions & Risks (assumptions, open questions, key risks and mitigations — note in assumptions that this feature was recorded during iterative development)
123
129
  - Success Metrics
124
- - Risks & Mitigations
125
- - Future Considerations
126
- - Note in the Assumptions section that this feature was recorded during iterative development
130
+ - Begin the file with YAML frontmatter: `---\ngspec-version: 1.1.0\n---`
131
+ - **Also update `gspec/architecture.md`** if the new feature introduces data entities, API endpoints, or new components — add them to the appropriate architecture sections
127
132
 
128
133
  ### Phase 6: Verify — Confirm Consistency
129
134
 
@@ -147,8 +152,12 @@ After writing spec updates:
147
152
 
148
153
  **Traceability without clutter.** A brief note about why something changed is valuable for future readers. A changelog at the bottom of every file is not. Use judgment.
149
154
 
155
+ **Keep `style.md` generic and reusable.** The style guide defines the design system — colors, typography, spacing, base component patterns, and tokens that could apply to any product. Do not add feature-specific or domain-specific content to `style.md` (e.g., "recipe card layout", "playlist item styling"). Feature-specific visual details belong in the relevant feature PRD. If you are unsure whether a visual change is generic or feature-specific, ask the user.
156
+
150
157
  **When to create vs. update.** If a change adds a small capability that fits naturally within an existing feature PRD, update that PRD. If a change introduces a wholly new product area that does not belong in any existing PRD, create a new feature PRD. When in doubt, ask the user.
151
158
 
159
+ **Version frontmatter.** When updating existing gspec files, preserve the `gspec-version` YAML frontmatter at the top of the file. If a file lacks frontmatter, add `---\ngspec-version: 1.1.0\n---` as the very first content before the main heading.
160
+
152
161
  **No code changes.** This command never creates, modifies, or deletes code files. If the user needs code changes alongside spec updates, suggest using `gspec-dor` instead.
153
162
 
154
163
  ---
@@ -21,6 +21,13 @@ 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 gspec version:
25
+ ```
26
+ ---
27
+ gspec-version: 1.1.0
28
+ ---
29
+ ```
30
+ The frontmatter must be the very first content in the file, before the main heading.
24
31
  - **Before generating the document**, ask clarifying questions if:
25
32
  - The project type is unclear (web app, mobile, API, CLI, etc.)
26
33
  - Scale requirements are not specified
@@ -21,6 +21,13 @@ You should:
21
21
 
22
22
  - Output **ONLY** a single Markdown document
23
23
  - Save the file as `gspec/style.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 gspec version:
25
+ ```
26
+ ---
27
+ gspec-version: 1.1.0
28
+ ---
29
+ ```
30
+ The frontmatter must be the very first content in the file, before the main heading.
24
31
  - **Before generating the document**, ask clarifying questions if:
25
32
  - The brand personality or visual direction is unclear
26
33
  - Existing brand assets or guidelines are not mentioned (logos, colors, fonts)
@@ -200,9 +207,37 @@ You should:
200
207
  ### 12. Design Tokens
201
208
 
202
209
  #### Token Structure
203
- - Naming conventions
204
- - Token categories
205
- - Example token definitions (CSS variables, JSON, etc.)
210
+ - Naming conventions (e.g., `--color-primary-500`, `--spacing-md`, `--font-size-lg`)
211
+ - Token categories (color, typography, spacing, shadow, border-radius, animation)
212
+
213
+ #### Token Definitions
214
+ - **Output a complete, machine-parseable token map** as a CSS custom properties code block that the implementing agent can copy directly into the codebase. This is the single source of truth for all design values — every color, spacing value, font size, shadow, and radius defined in earlier sections must appear here as a named token.
215
+ - Example format:
216
+ ```css
217
+ :root {
218
+ /* Colors — Primary */
219
+ --color-primary-50: #eff6ff;
220
+ --color-primary-500: #3b82f6;
221
+ --color-primary-900: #1e3a5f;
222
+ /* Colors — Semantic */
223
+ --color-success: #22c55e;
224
+ --color-error: #ef4444;
225
+ /* Typography */
226
+ --font-family-heading: 'Inter', sans-serif;
227
+ --font-size-h1: 2.25rem;
228
+ --font-weight-bold: 700;
229
+ /* Spacing */
230
+ --spacing-xs: 0.25rem;
231
+ --spacing-sm: 0.5rem;
232
+ --spacing-md: 1rem;
233
+ /* Shadows */
234
+ --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
235
+ /* Border Radius */
236
+ --radius-md: 0.375rem;
237
+ }
238
+ ```
239
+ - If the project uses a utility-first CSS framework (check `gspec/stack.md` if it exists), also provide the framework-specific configuration (e.g., Tailwind `theme.extend` values) that maps to these tokens
240
+ - For dark mode, provide the overridden token values under a separate selector or media query
206
241
 
207
242
  ### 13. Usage Examples
208
243
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gspec",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Install gspec specification commands for Claude Code, Cursor, and other AI tools",
5
5
  "main": "bin/gspec.js",
6
6
  "type": "module",
@@ -19,8 +19,11 @@
19
19
  "build:antigravity": "node scripts/build.js antigravity",
20
20
  "prepublishOnly": "npm run build"
21
21
  },
22
- "author": "",
23
- "license": "ISC",
22
+ "author": "Baller Software",
23
+ "repository": {
24
+ "url": "https://github.com/gballer77/gspec"
25
+ },
26
+ "license": "MIT",
24
27
  "dependencies": {
25
28
  "chalk": "^5.6.2",
26
29
  "commander": "^11.1.0"