gspec 1.1.1 → 1.3.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 (45) hide show
  1. package/README.md +66 -8
  2. package/commands/gspec.epic.md +31 -19
  3. package/commands/gspec.feature.md +29 -17
  4. package/commands/gspec.implement.md +51 -118
  5. package/commands/gspec.practices.md +2 -3
  6. package/commands/gspec.research.md +276 -0
  7. package/commands/gspec.stack.md +29 -6
  8. package/commands/gspec.style.md +13 -46
  9. package/dist/antigravity/gspec-architect/SKILL.md +1 -1
  10. package/dist/antigravity/gspec-dor/SKILL.md +2 -2
  11. package/dist/antigravity/gspec-epic/SKILL.md +32 -20
  12. package/dist/antigravity/gspec-feature/SKILL.md +30 -18
  13. package/dist/antigravity/gspec-implement/SKILL.md +54 -121
  14. package/dist/antigravity/gspec-migrate/SKILL.md +5 -5
  15. package/dist/antigravity/gspec-practices/SKILL.md +3 -4
  16. package/dist/antigravity/gspec-profile/SKILL.md +1 -1
  17. package/dist/antigravity/gspec-record/SKILL.md +2 -2
  18. package/dist/antigravity/gspec-research/SKILL.md +280 -0
  19. package/dist/antigravity/gspec-stack/SKILL.md +30 -7
  20. package/dist/antigravity/gspec-style/SKILL.md +14 -47
  21. package/dist/claude/gspec-architect/SKILL.md +1 -1
  22. package/dist/claude/gspec-dor/SKILL.md +2 -2
  23. package/dist/claude/gspec-epic/SKILL.md +32 -20
  24. package/dist/claude/gspec-feature/SKILL.md +30 -18
  25. package/dist/claude/gspec-implement/SKILL.md +54 -121
  26. package/dist/claude/gspec-migrate/SKILL.md +5 -5
  27. package/dist/claude/gspec-practices/SKILL.md +3 -4
  28. package/dist/claude/gspec-profile/SKILL.md +1 -1
  29. package/dist/claude/gspec-record/SKILL.md +2 -2
  30. package/dist/claude/gspec-research/SKILL.md +281 -0
  31. package/dist/claude/gspec-stack/SKILL.md +30 -7
  32. package/dist/claude/gspec-style/SKILL.md +14 -47
  33. package/dist/cursor/gspec-architect.mdc +1 -1
  34. package/dist/cursor/gspec-dor.mdc +2 -2
  35. package/dist/cursor/gspec-epic.mdc +32 -20
  36. package/dist/cursor/gspec-feature.mdc +30 -18
  37. package/dist/cursor/gspec-implement.mdc +54 -121
  38. package/dist/cursor/gspec-migrate.mdc +5 -5
  39. package/dist/cursor/gspec-practices.mdc +3 -4
  40. package/dist/cursor/gspec-profile.mdc +1 -1
  41. package/dist/cursor/gspec-record.mdc +2 -2
  42. package/dist/cursor/gspec-research.mdc +279 -0
  43. package/dist/cursor/gspec-stack.mdc +30 -7
  44. package/dist/cursor/gspec-style.mdc +14 -47
  45. package/package.json +1 -1
package/README.md CHANGED
@@ -23,9 +23,52 @@ These documents become the shared context for all subsequent AI interactions. Wh
23
23
 
24
24
  ### The Workflow
25
25
 
26
+ The only commands you *need* are the four fundamentals and `implement`. Everything else exists to help when your project calls for it.
27
+
28
+ The fundamentals give your AI tool enough context to build well — it knows what the product is, how it should look, what technologies to use, and what engineering standards to follow. From there, `implement` can take a plain-language description and start building. The remaining commands — `research`, `feature`, `epic`, `architect`, `dor`, and `record` — add structure and rigor when the scope or complexity warrants it.
29
+
30
+ ```mermaid
31
+ flowchart LR
32
+ Define["1. Define
33
+ profile · style
34
+ stack · practices"]
35
+
36
+ Research["2. Research
37
+ competitive analysis"]
38
+
39
+ Specify["3. Specify
40
+ feature · epic"]
41
+
42
+ Architect["4. Architect
43
+ technical blueprint"]
44
+
45
+ Build["5. Build
46
+ implement"]
47
+
48
+ Iterate["6. Iterate
49
+ dor · record"]
50
+
51
+ Define --> Research
52
+ Define --> Specify
53
+ Define --> Build
54
+ Research --> Specify
55
+ Research --> Build
56
+ Specify --> Architect
57
+ Specify --> Build
58
+ Architect --> Build
59
+ Build --> Iterate
60
+ Iterate --> Build
61
+
62
+ style Define fill:#4a9eff,color:#fff,stroke:none
63
+ style Research fill:#a855f7,color:#fff,stroke:none
64
+ style Specify fill:#f59e0b,color:#fff,stroke:none
65
+ style Architect fill:#f59e0b,color:#fff,stroke:none
66
+ style Build fill:#22c55e,color:#fff,stroke:none
67
+ style Iterate fill:#64748b,color:#fff,stroke:none
26
68
  ```
27
- Define → Specify → Architect → Build → Iterate
28
- ```
69
+
70
+ > **Blue** = required foundation. **Purple/Yellow** = optional depth. **Green** = implementation. **Gray** = maintenance.
71
+ > Every path starts with Define and passes through Build. The steps in between depend on your project's complexity.
29
72
 
30
73
  **1. Define the Fundamentals** — Establish the foundation that drives every decision.
31
74
 
@@ -36,32 +79,46 @@ Define → Specify → Architect → Build → Iterate
36
79
  | `gspec.stack` | Software Architect | Technology stack, frameworks, infrastructure, architecture |
37
80
  | `gspec.practices` | Engineering Lead | Development standards, code quality, testing, workflows |
38
81
 
39
- **2. Specify What to Build** — Define features and requirements.
82
+ **2. Research the Market** *(optional)* Understand the competitive landscape before building.
83
+
84
+ | Command | Role | What it produces |
85
+ |---|---|---|
86
+ | `gspec.research` | Product Strategist | Competitive analysis with feature matrix, gap identification, and strategic recommendations |
87
+
88
+ Use `research` when you want to understand what competitors offer, identify table-stakes features you might be missing, and find differentiation opportunities. It reads competitors from your product profile, produces a persistent `gspec/research.md` file, and can optionally generate feature PRDs from the findings. The `implement` command automatically uses this file when it exists.
89
+
90
+ **3. Specify What to Build** *(optional)* — Define features and requirements.
40
91
 
41
92
  | Command | Role | What it produces |
42
93
  |---|---|---|
43
94
  | `gspec.feature` | Product Manager | PRD for a single feature with prioritized capabilities |
44
95
  | `gspec.epic` | Product Manager | Breaks a large epic into multiple feature PRDs with dependency mapping |
45
96
 
46
- **3. Architect** Translate specs into a concrete technical blueprint.
97
+ Use `feature` when you want a detailed PRD with prioritized capabilities and acceptance criteria before building. Use `epic` when a body of work is large enough to need decomposition into multiple features with dependency mapping. For smaller tasks or rapid prototyping, you can skip straight to `implement` with a plain-language description.
98
+
99
+ **4. Architect** *(optional)* — Translate specs into a concrete technical blueprint.
47
100
 
48
101
  | Command | Role | What it produces |
49
102
  |---|---|---|
50
103
  | `gspec.architect` | Senior Architect | Technical architecture document with data models, API design, project structure, auth flows, and Mermaid diagrams |
51
104
 
52
- **4. Build**Implement with full context.
105
+ Use `architect` when your feature involves significant technical complexity new data models, service boundaries, auth flows, or integration points that benefit from upfront design. For straightforward features, `implement` can make sound architectural decisions on its own using your `stack` and `practices` specs.
106
+
107
+ **5. Build** — Implement with full context.
53
108
 
54
109
  | Command | Role | What it does |
55
110
  |---|---|---|
56
- | `gspec.implement` | Senior Engineer | Reads all specs, identifies gaps, researches competitors, plans and builds |
111
+ | `gspec.implement` | Senior Engineer | Reads all specs (including research), identifies gaps, plans and builds |
57
112
 
58
- **5. Iterate** — Keep specs and code in sync as the project evolves.
113
+ **6. Iterate** *(optional)* — Keep specs and code in sync as the project evolves.
59
114
 
60
115
  | Command | Role | What it does |
61
116
  |---|---|---|
62
117
  | `gspec.dor` | Engineer + Doc Lead | Makes code changes and updates specs to match |
63
118
  | `gspec.record` | Doc Lead | Updates specs to reflect decisions or changes — no code modifications |
64
119
 
120
+ Use `dor` and `record` when you want your specification documents to stay accurate as the project evolves. If you're moving fast and specs are secondary, you can skip them — but as a project matures, keeping specs in sync prevents the context drift that degrades AI output over time.
121
+
65
122
  **Maintenance** — Keep specs up to date with the latest gspec format.
66
123
 
67
124
  | Command | Role | What it does |
@@ -108,6 +165,7 @@ project-root/
108
165
  ├── stack.md # Technology stack and architecture
109
166
  ├── practices.md # Development standards
110
167
  ├── architecture.md # Technical architecture blueprint
168
+ ├── research.md # Competitive analysis and feature gaps
111
169
  ├── epics/
112
170
  │ └── onboarding-flow.md
113
171
  └── features/
@@ -128,7 +186,7 @@ These are standard Markdown files. They live in your repo, are version-controlle
128
186
 
129
187
  **Incremental implementation.** Feature PRDs use checkboxes to track which capabilities have been built. The `implement` command reads these to know what's done and what's remaining, so it can be run multiple times as your project grows.
130
188
 
131
- **Competitive research.** The `implement` command can optionally research competitors named in your product profile, identifying table-stakes features you might be missing and opportunities for differentiation.
189
+ **Competitive research.** The `research` command analyzes competitors named in your product profile, identifying table-stakes features you might be missing and opportunities for differentiation. Its output is saved to `gspec/research.md` and automatically used by `implement` when present.
132
190
 
133
191
  **Platform-agnostic.** A single set of source commands builds for Claude Code, Cursor, and Antigravity. The build system handles platform-specific formatting so the commands stay consistent across tools.
134
192
 
@@ -31,9 +31,9 @@ Take the provided epic description (a large body of work) and break it down into
31
31
 
32
32
  ## Guidelines
33
33
 
34
- - **Read existing gspec documents first** to ground the epic and its features in established product context
34
+ - **Read existing feature PRDs and epics** in `gspec/features/` and `gspec/epics/` to understand already-specified work and avoid overlap
35
35
  - Identify distinct features that make up the epic
36
- - Ask clarifying questions when essential information is missing rather than guessing
36
+ - **Ask all clarifying questions in the chat before writing specs** never embed unresolved questions in the generated documents
37
37
  - When asking questions, offer 2-3 specific suggestions to guide the discussion
38
38
  - Ensure features can be built incrementally and independently when possible
39
39
  - Consider dependencies between features
@@ -43,21 +43,27 @@ Take the provided epic description (a large body of work) and break it down into
43
43
 
44
44
  ---
45
45
 
46
- ## Context Discovery
46
+ ## Portability
47
47
 
48
- Before generating epic and feature documents, check for and read any existing gspec documents in the project root's `gspec/` folder. These provide established product context that should inform the breakdown:
48
+ Epic summaries and the feature PRDs they produce are designed to be **portable across projects**. A feature spec written for one project should be reusable in a different project with a different profile, design system, tech stack, and development practices. Project-specific context is resolved at implementation time by `gspec-implement`, which reads all gspec documents (profile, style, stack, practices) alongside the feature PRDs.
49
49
 
50
- 1. **`gspec/profile.md`** — Product identity, target audience, value proposition, market context, and competitive landscape. Use this to align the epic with the product's mission, ensure features target the right users, and understand what's table-stakes vs. differentiating.
51
- 2. **`gspec/style.md`**Visual design language, component patterns, and UX principles. Use this to inform UX requirements in individual feature PRDs and ensure consistency with the established design system.
52
- 3. **`gspec/stack.md`**Technology choices and architecture. Use this to understand technical constraints that may affect feature scoping, sequencing, and dependency mapping.
53
- 4. **`gspec/practices.md`**Development standards and conventions. Use this to understand delivery constraints, quality expectations, and testing requirements that may influence phasing.
50
+ **To maintain portability, DO NOT read or incorporate context from:**
51
+ - `gspec/profile.md`Do not reference project-specific personas, competitive landscape, or positioning
52
+ - `gspec/style.md`Do not reference a specific design system or component library
53
+ - `gspec/stack.md`Do not reference specific technologies (already covered by Technology Agnosticism)
54
+ - `gspec/practices.md` — Do not reference project-specific development standards
54
55
 
55
- If these files don't exist, proceed without them they are optional context, not blockers. When they do exist, incorporate their context naturally:
56
- - Reference the product's target users and personas from the profile rather than defining them from scratch
57
- - Align epic and feature success metrics with metrics already established in the profile
58
- - Ensure feature boundaries and UX requirements respect the established design system
59
- - Let the competitive landscape inform priority levels and MVE scope
60
- - Use technical stack constraints to inform realistic dependency mapping and sequencing
56
+ **DO read existing feature PRDs and epics** in `gspec/features/` and `gspec/epics/` to:
57
+ - Avoid duplicating or contradicting already-specified features
58
+ - Identify cross-feature and cross-epic dependencies
59
+ - Ensure consistent scope boundaries and terminology
60
+
61
+ **Write in generic, portable terms:**
62
+ - Use relative role descriptions ("primary users", "administrators", "content creators") not project-specific persona names
63
+ - Justify priorities based on intrinsic user value and technical dependencies, not competitive landscape
64
+ - Describe desired UX behavior generically ("clear error feedback", "responsive layout") without referencing a specific design system
65
+ - Define success metrics in terms of each feature's own outcomes, not project-level KPIs
66
+ - Sequence features based on logical dependencies, not project-specific stack constraints
61
67
 
62
68
  ## Output Rules
63
69
 
@@ -71,13 +77,15 @@ If these files don't exist, proceed without them — they are optional context,
71
77
  ---
72
78
  ```
73
79
  The frontmatter must be the very first content in the file, before the main heading.
74
- - **Before generating the documents**, ask clarifying questions if:
80
+ - **Before generating the documents, you MUST resolve ambiguities through conversation.** Ask clarifying questions in the chat if:
75
81
  - The target users are unclear
76
82
  - The scope or boundaries of the epic are ambiguous
77
83
  - The breakdown into features is not obvious
78
84
  - Success criteria cannot be determined from the description
79
85
  - Priority or sequencing is unclear
86
+ - Any assumption would materially change the shape of the specs
80
87
  - **When asking questions**, offer 2-3 specific suggestions to guide the discussion
88
+ - **Do NOT embed unresolved questions in the generated specs.** All questions about scope, users, priorities, capabilities, feature boundaries, and sequencing must be resolved through conversation before writing the documents. The specs should reflect decisions, not open debates.
81
89
  - Create an epic summary document at `gspec/epics/[epic-name].md` that:
82
90
  - Lists all features in the epic
83
91
  - Shows dependencies between features
@@ -111,7 +119,7 @@ If these files don't exist, proceed without them — they are optional context,
111
119
  - ❌ S3, GCS, Azure Blob Storage
112
120
  - ❌ Kafka, RabbitMQ, SQS
113
121
 
114
- This separation allows the same epic and feature specs to be implemented using different technology stacks by swapping the Stack file.
122
+ This separation — combined with the portability principles above — allows the same epic and feature specs to be reused across projects with different technology stacks, design systems, and product contexts.
115
123
 
116
124
  ## Epic Summary Document Structure
117
125
 
@@ -159,7 +167,7 @@ For each feature, create a separate file in `gspec/features/[feature-name].md` w
159
167
  - **Parent Epic** (link to epic summary)
160
168
 
161
169
  ### 2. Users & Use Cases
162
- - Primary users
170
+ - Primary users (use generic role descriptions like "end users", "administrators", "content managers" — not project-specific persona names)
163
171
  - Key use cases (3-4 scenarios showing how users benefit)
164
172
 
165
173
  ### 3. Scope
@@ -187,16 +195,20 @@ For each feature, create a separate file in `gspec/features/[feature-name].md` w
187
195
 
188
196
  ### 6. Assumptions & Risks
189
197
  - Assumptions (what we're taking as true)
190
- - Open questions (non-blocking unknowns to resolve during implementation)
198
+ - Open questions **only** unknowns that genuinely cannot be answered until implementation or real-world usage begins (e.g., performance thresholds pending benchmarking, exact rate limits pending load testing). Questions about scope, users, priorities, or feature design must be asked and resolved in the chat before the specs are written. If there are no open questions, omit this sub-section.
191
199
  - Key risks and mitigations (brief bullet points — focus on risks that could affect implementation scope or approach)
192
200
 
193
201
  ### 7. Success Metrics
194
202
  - 2-4 measurable outcomes that define whether this feature is working
195
203
 
204
+ ### 8. Implementation Context
205
+ - Include the following standard note verbatim:
206
+ > This feature PRD is portable and project-agnostic. During implementation, consult the project's `gspec/profile.md` (target users, positioning), `gspec/style.md` (design system), `gspec/stack.md` (technology choices), and `gspec/practices.md` (development standards) to resolve project-specific context.
207
+
196
208
  ## Workflow
197
209
 
198
210
  1. **Analyze the epic description** and identify logical feature boundaries
199
- 2. **Ask clarifying questions** if the epic scope, users, or goals are unclear
211
+ 2. **Ask clarifying questions in the chat** and wait for answers before proceeding — do not generate specs with embedded questions
200
212
  3. **Break down into features** that:
201
213
  - Can be built and shipped incrementally
202
214
  - Deliver independent user value (when possible)
@@ -23,8 +23,8 @@ Your task is to take the provided feature description (which may be vague or det
23
23
  - ✅ Build order recommendations based on technical dependencies
24
24
 
25
25
  You should:
26
- - **Read existing gspec documents first** to ground the PRD in established product context
27
- - Ask clarifying questions when essential information is missing rather than guessing
26
+ - **Read existing feature PRDs** in `gspec/features/` to understand already-specified features and avoid overlap
27
+ - **Ask all clarifying questions in the chat before writing the spec** — never embed unresolved questions in the generated document
28
28
  - When asking questions, offer 2-3 specific suggestions to guide the discussion
29
29
  - Focus on user value, scope, and outcomes
30
30
  - Write for automated implementation with human validation
@@ -32,20 +32,26 @@ You should:
32
32
 
33
33
  ---
34
34
 
35
- ## Context Discovery
35
+ ## Portability
36
36
 
37
- Before generating the PRD, check for and read any existing gspec documents in the project root's `gspec/` folder. These provide established product context that should inform the feature definition:
37
+ Feature PRDs are designed to be **portable across projects**. A feature spec written for one project should be reusable in a different project with a different profile, design system, tech stack, and development practices. Project-specific context is resolved at implementation time by `gspec-implement`, which reads all gspec documents (profile, style, stack, practices) alongside the feature PRDs.
38
38
 
39
- 1. **`gspec/profile.md`** — Product identity, target audience, value proposition, market context, and competitive landscape. Use this to align the feature with the product's mission, target users, and positioning.
40
- 2. **`gspec/style.md`**Visual design language, component patterns, and UX principles. Use this to inform any UX-related guidance or capability descriptions in the PRD.
41
- 3. **`gspec/stack.md`**Technology choices and architecture. Use this to understand technical constraints that may affect feature scope or feasibility.
42
- 4. **`gspec/practices.md`**Development standards and conventions. Use this to understand delivery constraints or quality expectations.
39
+ **To maintain portability, DO NOT read or incorporate context from:**
40
+ - `gspec/profile.md`Do not reference project-specific personas, competitive landscape, or positioning
41
+ - `gspec/style.md`Do not reference a specific design system or component library
42
+ - `gspec/stack.md`Do not reference specific technologies (already covered by Technology Agnosticism)
43
+ - `gspec/practices.md` — Do not reference project-specific development standards
43
44
 
44
- If these files don't exist, proceed without them — they are optional context, not blockers. When they do exist, incorporate their context naturally:
45
- - Reference the product's target users from the profile rather than defining them from scratch
46
- - Align success metrics with metrics already established in the profile
47
- - Ensure capabilities respect the product's stated non-goals and positioning
48
- - Let the competitive landscape inform what's table-stakes vs. differentiating
45
+ **DO read existing feature PRDs** in `gspec/features/` to:
46
+ - Avoid duplicating or contradicting already-specified features
47
+ - Identify cross-feature dependencies
48
+ - Ensure consistent scope boundaries
49
+
50
+ **Write in generic, portable terms:**
51
+ - Use relative role descriptions ("primary users", "administrators", "content creators") not project-specific persona names
52
+ - Justify priorities based on the feature's intrinsic user value, not competitive landscape
53
+ - Describe desired UX behavior generically ("clear error feedback", "responsive layout") without referencing a specific design system
54
+ - Define success metrics in terms of the feature's own outcomes, not project-level KPIs
49
55
 
50
56
  ---
51
57
 
@@ -61,12 +67,14 @@ If these files don't exist, proceed without them — they are optional context,
61
67
  ---
62
68
  ```
63
69
  The frontmatter must be the very first content in the file, before the main heading.
64
- - **Before generating the document**, ask clarifying questions if:
70
+ - **Before generating the document, you MUST resolve ambiguities through conversation.** Ask clarifying questions in the chat if:
65
71
  - The target users are unclear
66
72
  - The scope or boundaries of the feature are ambiguous
67
73
  - Success criteria cannot be determined from the description
68
74
  - Priority or urgency is unspecified
75
+ - Any assumption would materially change the shape of the spec
69
76
  - **When asking questions**, offer 2-3 specific suggestions to guide the discussion
77
+ - **Do NOT embed unresolved questions in the generated spec.** All questions about scope, users, priorities, capabilities, and feature boundaries must be resolved through conversation before writing the document. The spec should reflect decisions, not open debates.
70
78
  - Avoid deep system architecture or low-level implementation
71
79
  - Avoid detailed workflows or step-by-step descriptions of how the feature functions
72
80
  - No code blocks except where examples add clarity
@@ -95,7 +103,7 @@ If these files don't exist, proceed without them — they are optional context,
95
103
  - ❌ S3, GCS, Azure Blob Storage
96
104
  - ❌ Kafka, RabbitMQ, SQS
97
105
 
98
- This separation allows the same feature spec to be implemented using different technology stacks by swapping the Stack file.
106
+ This separation — combined with the portability principles above — allows the same feature spec to be reused across projects with different technology stacks, design systems, and product contexts.
99
107
 
100
108
  ---
101
109
 
@@ -109,7 +117,7 @@ This separation allows the same feature spec to be implemented using different t
109
117
  - Problem being solved and why it matters now
110
118
 
111
119
  ### 2. Users & Use Cases
112
- - Primary users
120
+ - Primary users (use generic role descriptions like "end users", "administrators", "content managers" — not project-specific persona names)
113
121
  - Key use cases (3-4 scenarios showing how users benefit)
114
122
 
115
123
  ### 3. Scope
@@ -137,12 +145,16 @@ This separation allows the same feature spec to be implemented using different t
137
145
 
138
146
  ### 6. Assumptions & Risks
139
147
  - Assumptions (what we're taking as true)
140
- - Open questions (non-blocking unknowns to resolve during implementation)
148
+ - Open questions **only** unknowns that genuinely cannot be answered until implementation or real-world usage begins (e.g., performance thresholds pending benchmarking, exact rate limits pending load testing). Questions about scope, users, priorities, or feature design must be asked and resolved in the chat before the spec is written. If there are no open questions, omit this sub-section.
141
149
  - Key risks and mitigations (brief bullet points — focus on risks that could affect implementation scope or approach)
142
150
 
143
151
  ### 7. Success Metrics
144
152
  - 2-4 measurable outcomes that define whether this feature is working
145
153
 
154
+ ### 8. Implementation Context
155
+ - Include the following standard note verbatim:
156
+ > This feature PRD is portable and project-agnostic. During implementation, consult the project's `gspec/profile.md` (target users, positioning), `gspec/style.md` (design system), `gspec/stack.md` (technology choices), and `gspec/practices.md` (development standards) to resolve project-specific context.
157
+
146
158
  ---
147
159
 
148
160
  ## Tone & Style