gspec 1.15.0 → 1.17.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.
- package/README.md +50 -12
- package/bin/gspec.js +372 -76
- package/commands/gspec.analyze.md +22 -8
- package/commands/gspec.audit.md +277 -0
- package/commands/gspec.feature.md +10 -0
- package/commands/gspec.implement.md +29 -15
- package/commands/gspec.migrate.md +29 -15
- package/commands/gspec.profile.md +55 -35
- package/commands/gspec.style.md +64 -12
- package/commands/gspec.tasks.md +150 -0
- package/dist/antigravity/gspec-analyze/SKILL.md +23 -9
- package/dist/antigravity/gspec-audit/SKILL.md +281 -0
- package/dist/antigravity/gspec-feature/SKILL.md +10 -0
- package/dist/antigravity/gspec-implement/SKILL.md +30 -16
- package/dist/antigravity/gspec-migrate/SKILL.md +29 -15
- package/dist/antigravity/gspec-profile/SKILL.md +55 -35
- package/dist/antigravity/gspec-style/SKILL.md +65 -13
- package/dist/antigravity/gspec-tasks/SKILL.md +154 -0
- package/dist/claude/gspec-analyze/SKILL.md +23 -9
- package/dist/claude/gspec-audit/SKILL.md +282 -0
- package/dist/claude/gspec-feature/SKILL.md +10 -0
- package/dist/claude/gspec-implement/SKILL.md +30 -16
- package/dist/claude/gspec-migrate/SKILL.md +29 -15
- package/dist/claude/gspec-profile/SKILL.md +55 -35
- package/dist/claude/gspec-style/SKILL.md +65 -13
- package/dist/claude/gspec-tasks/SKILL.md +155 -0
- package/dist/codex/gspec-analyze/SKILL.md +23 -9
- package/dist/codex/gspec-audit/SKILL.md +281 -0
- package/dist/codex/gspec-feature/SKILL.md +10 -0
- package/dist/codex/gspec-implement/SKILL.md +30 -16
- package/dist/codex/gspec-migrate/SKILL.md +29 -15
- package/dist/codex/gspec-profile/SKILL.md +55 -35
- package/dist/codex/gspec-style/SKILL.md +65 -13
- package/dist/codex/gspec-tasks/SKILL.md +154 -0
- package/dist/cursor/gspec-analyze.mdc +23 -9
- package/dist/cursor/gspec-audit.mdc +280 -0
- package/dist/cursor/gspec-feature.mdc +10 -0
- package/dist/cursor/gspec-implement.mdc +30 -16
- package/dist/cursor/gspec-migrate.mdc +29 -15
- package/dist/cursor/gspec-profile.mdc +55 -35
- package/dist/cursor/gspec-style.mdc +65 -13
- package/dist/cursor/gspec-tasks.mdc +153 -0
- package/dist/opencode/gspec-analyze/SKILL.md +23 -9
- package/dist/opencode/gspec-audit/SKILL.md +281 -0
- package/dist/opencode/gspec-feature/SKILL.md +10 -0
- package/dist/opencode/gspec-implement/SKILL.md +30 -16
- package/dist/opencode/gspec-migrate/SKILL.md +29 -15
- package/dist/opencode/gspec-profile/SKILL.md +55 -35
- package/dist/opencode/gspec-style/SKILL.md +65 -13
- package/dist/opencode/gspec-tasks/SKILL.md +154 -0
- package/package.json +1 -1
- package/templates/spec-sync.md +8 -4
|
@@ -3,9 +3,11 @@ name: gspec-profile
|
|
|
3
3
|
description: Generate or update the product profile (gspec/profile.md) — what the product is, who it serves, and why it exists. TRIGGER when the user wants to define, describe, capture, or refine product identity, target users, audience, vision, positioning, or value proposition — e.g. "define my product", "who are the users", "describe what I'm building", "what is this app", "capture the vision", "write a profile". Prefer this skill over drafting a profile ad hoc.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are a
|
|
6
|
+
You are a Product Strategist.
|
|
7
7
|
|
|
8
|
-
Your task is to take the provided
|
|
8
|
+
Your task is to take the provided product, tool, or system concept and produce a **Product Profile** that clearly defines what it is, who it serves, and why it exists. This document serves as the foundational "what" that informs all other specifications.
|
|
9
|
+
|
|
10
|
+
The product may be commercial (SaaS, mobile app, marketplace) **or** non-commercial (open source library, internal tool, CLI utility, research software, personal project, etc.). Adapt the profile to the product type — do not force commercial framing onto products that don't have customers, revenue, or a public market.
|
|
9
11
|
|
|
10
12
|
You should:
|
|
11
13
|
- Define the product's identity and purpose clearly
|
|
@@ -13,7 +15,7 @@ You should:
|
|
|
13
15
|
- Articulate the value proposition
|
|
14
16
|
- **Ask clarifying questions when essential information is missing** rather than guessing
|
|
15
17
|
- **Offer 2-3 specific suggestions** when strategic direction is unclear
|
|
16
|
-
- Think from a
|
|
18
|
+
- Think from a user and purpose perspective, not technical implementation
|
|
17
19
|
- Be clear, compelling, and strategic
|
|
18
20
|
|
|
19
21
|
---
|
|
@@ -29,27 +31,30 @@ You should:
|
|
|
29
31
|
---
|
|
30
32
|
```
|
|
31
33
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
32
|
-
- **Before generating the document**,
|
|
33
|
-
|
|
34
|
+
- **Before generating the document**, first determine the **product type** (commercial, internal tool, open source, research, personal, etc.) if it isn't obvious from the input. This determines which sections apply.
|
|
35
|
+
- **Ask clarifying questions** if:
|
|
36
|
+
- The product type is ambiguous
|
|
37
|
+
- The target audience or user is unclear
|
|
34
38
|
- The core value proposition is ambiguous
|
|
35
|
-
- The business model or monetization strategy is unspecified
|
|
36
|
-
- Competitive positioning is unknown
|
|
39
|
+
- *(Commercial products only)* The business model or monetization strategy is unspecified
|
|
40
|
+
- *(Commercial products only)* Competitive positioning is unknown
|
|
37
41
|
- **When asking questions**, offer 2-3 specific suggestions to guide the discussion
|
|
38
|
-
- Write for
|
|
42
|
+
- Write for the audience the product actually has (internal stakeholders, end users, contributors, the public, etc.)
|
|
39
43
|
- Be concise but comprehensive
|
|
40
44
|
- Focus on the "what" and "why", not the "how"
|
|
41
45
|
- Use clear, jargon-free language where possible
|
|
42
|
-
- **Mark sections as "Not Applicable"** when they don't apply to this product
|
|
46
|
+
- **Mark sections as "Not Applicable"** when they don't apply to this product, and briefly note why (e.g., "Not applicable — internal tool, no external market"). Do not fabricate content to fill a section.
|
|
43
47
|
|
|
44
48
|
---
|
|
45
49
|
|
|
46
50
|
## Required Sections
|
|
47
51
|
|
|
48
52
|
### 1. Product Overview
|
|
49
|
-
- Product
|
|
53
|
+
- Product name
|
|
50
54
|
- Tagline or one-sentence description
|
|
51
|
-
- Category (e.g., SaaS platform, mobile app, marketplace,
|
|
52
|
-
-
|
|
55
|
+
- Category (e.g., SaaS platform, mobile app, marketplace, open source library, internal tool, CLI utility, developer tool, research software, personal project, game, etc.)
|
|
56
|
+
- Product type (commercial, internal, open source, research, personal, etc.) — determines which later sections apply
|
|
57
|
+
- Current stage (concept, MVP, beta, launched, scaling, maintained, etc.)
|
|
53
58
|
|
|
54
59
|
### 2. Mission & Vision
|
|
55
60
|
|
|
@@ -64,7 +69,7 @@ You should:
|
|
|
64
69
|
### 3. Target Audience
|
|
65
70
|
|
|
66
71
|
#### Primary Users
|
|
67
|
-
- Who are they? (
|
|
72
|
+
- Who are they? (roles, characteristics, context in which they use the product)
|
|
68
73
|
- What are their key pain points?
|
|
69
74
|
- What are their goals and motivations?
|
|
70
75
|
|
|
@@ -73,7 +78,7 @@ You should:
|
|
|
73
78
|
- How they differ from primary users
|
|
74
79
|
|
|
75
80
|
#### Stakeholders
|
|
76
|
-
- Who else is impacted? (buyers, administrators, partners, etc.)
|
|
81
|
+
- Who else is impacted? (buyers, administrators, partners, maintainers, contributors, etc.)
|
|
77
82
|
|
|
78
83
|
### 4. Value Proposition
|
|
79
84
|
|
|
@@ -112,18 +117,22 @@ You should:
|
|
|
112
117
|
|
|
113
118
|
### 7. Market & Competition
|
|
114
119
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
- Market
|
|
120
|
+
*Skip or mark "Not Applicable" for internal tools, personal projects, or anything without an external market. Open source projects should adapt this to the ecosystem/alternatives landscape rather than a commercial market.*
|
|
121
|
+
|
|
122
|
+
#### Market or Ecosystem Context
|
|
123
|
+
- Market size and opportunity (commercial) **or** ecosystem landscape (OSS, research)
|
|
124
|
+
- Trends driving demand or adoption
|
|
125
|
+
- Maturity of the space
|
|
119
126
|
|
|
120
|
-
#### Competitive Landscape
|
|
121
|
-
- Direct competitors
|
|
122
|
-
- Indirect competitors or
|
|
127
|
+
#### Competitive Landscape or Alternatives
|
|
128
|
+
- Direct competitors or comparable projects
|
|
129
|
+
- Indirect competitors, alternatives, or incumbent approaches
|
|
123
130
|
- White space or gaps this product fills
|
|
124
131
|
|
|
125
132
|
### 8. Business Model
|
|
126
133
|
|
|
134
|
+
*Skip or mark "Not Applicable" for non-commercial products (internal tools, open source, personal projects, research). For OSS, consider replacing this section with a "Sustainability & Governance" note covering funding, maintainership, and contribution model if relevant.*
|
|
135
|
+
|
|
127
136
|
#### Revenue Model
|
|
128
137
|
- How the product makes money (subscription, transaction fees, freemium, ads, etc.)
|
|
129
138
|
- Pricing strategy (high-level)
|
|
@@ -138,6 +147,8 @@ You should:
|
|
|
138
147
|
|
|
139
148
|
### 9. Brand & Positioning
|
|
140
149
|
|
|
150
|
+
*Skip or simplify for internal tools and products with no external-facing presence. Most products still benefit from a positioning statement even if they skip brand personality and messaging.*
|
|
151
|
+
|
|
141
152
|
#### Brand Personality
|
|
142
153
|
- How the brand should feel (professional, friendly, innovative, trustworthy, etc.)
|
|
143
154
|
- Tone and voice characteristics
|
|
@@ -151,18 +162,25 @@ You should:
|
|
|
151
162
|
|
|
152
163
|
### 10. Success Metrics
|
|
153
164
|
|
|
154
|
-
|
|
165
|
+
*Adapt to the product type. Always include user/adoption metrics if meaningful. Include business metrics only for commercial products.*
|
|
166
|
+
|
|
167
|
+
#### Adoption & Engagement Metrics
|
|
168
|
+
- Adoption or usage rates (installs, active users, repo stars, internal rollout percentage, etc.)
|
|
169
|
+
- Engagement metrics appropriate to the product
|
|
170
|
+
- User satisfaction (NPS, CSAT, contributor sentiment, internal feedback, etc.)
|
|
171
|
+
|
|
172
|
+
#### Business Metrics *(commercial products only)*
|
|
155
173
|
- Revenue targets
|
|
156
|
-
-
|
|
174
|
+
- Paid user growth goals
|
|
157
175
|
- Market share objectives
|
|
158
176
|
|
|
159
|
-
####
|
|
160
|
-
-
|
|
161
|
-
- Engagement metrics
|
|
162
|
-
- Customer satisfaction (NPS, CSAT, etc.)
|
|
177
|
+
#### Project Health Metrics *(optional, especially for OSS / internal tools)*
|
|
178
|
+
- Contributor count, issue response time, release cadence, uptime, etc.
|
|
163
179
|
|
|
164
180
|
### 11. Public-Facing Information (Optional)
|
|
165
181
|
|
|
182
|
+
*Skip entirely for internal tools, private projects, or anything without a public presence.*
|
|
183
|
+
|
|
166
184
|
#### Website Copy Elements
|
|
167
185
|
- Homepage headline and subheadline
|
|
168
186
|
- About us summary
|
|
@@ -184,11 +202,11 @@ You should:
|
|
|
184
202
|
- What's being built now
|
|
185
203
|
- Immediate priorities
|
|
186
204
|
|
|
187
|
-
#### Near-Term (
|
|
205
|
+
#### Near-Term (Next)
|
|
188
206
|
- Planned enhancements
|
|
189
207
|
- Next major milestones
|
|
190
208
|
|
|
191
|
-
#### Long-Term Vision (
|
|
209
|
+
#### Long-Term Vision (Later)
|
|
192
210
|
- Future capabilities
|
|
193
211
|
- Strategic direction
|
|
194
212
|
|
|
@@ -199,9 +217,11 @@ You should:
|
|
|
199
217
|
- Dependencies on external factors
|
|
200
218
|
|
|
201
219
|
#### Risks
|
|
202
|
-
- Market risks
|
|
203
|
-
- Competitive risks
|
|
204
220
|
- Adoption risks
|
|
221
|
+
- Market or competitive risks *(commercial products)*
|
|
222
|
+
- Ecosystem or dependency risks *(OSS, research)*
|
|
223
|
+
- Sustainability or maintainership risks *(OSS, internal tools)*
|
|
224
|
+
- Execution or technical risks
|
|
205
225
|
|
|
206
226
|
#### Mitigation Strategies
|
|
207
227
|
- How to address key risks
|
|
@@ -210,13 +230,13 @@ You should:
|
|
|
210
230
|
|
|
211
231
|
## Tone & Style
|
|
212
232
|
|
|
213
|
-
- Clear, compelling,
|
|
214
|
-
- Strategic and
|
|
233
|
+
- Clear, compelling, purpose-focused
|
|
234
|
+
- Strategic and forward-looking
|
|
215
235
|
- Accessible to non-technical audiences
|
|
216
|
-
- Designed for
|
|
236
|
+
- Designed for alignment among whoever the product's audience is (team, contributors, stakeholders, users, public)
|
|
217
237
|
|
|
218
238
|
---
|
|
219
239
|
|
|
220
|
-
## Input Product
|
|
240
|
+
## Input Product Description
|
|
221
241
|
|
|
222
242
|
$ARGUMENTS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gspec-style
|
|
3
|
-
description: Generate or update the visual style guide (gspec/style.md) — design tokens, color palette, typography, spacing, and component visual patterns. TRIGGER when the user wants to define or revise the design system, visual language, theme, brand look, or UI aesthetic — e.g. "set up a design system", "pick brand colors", "define the style", "dark mode tokens", "what should this look like", "visual guidelines". Prefer this skill over producing style docs ad hoc.
|
|
3
|
+
description: Generate or update the visual style guide — either a renderable HTML design system (gspec/style.html) or a Markdown style guide (gspec/style.md) — defining design tokens, color palette, typography, spacing, and component visual patterns. Also aware of gspec/design/ for external mockups. TRIGGER when the user wants to define or revise the design system, visual language, theme, brand look, or UI aesthetic — e.g. "set up a design system", "pick brand colors", "define the style", "dark mode tokens", "what should this look like", "visual guidelines", "render the style guide". Prefer this skill over producing style docs ad hoc.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
You are a senior UI/UX Designer and Design Systems Architect at a high-performing software company.
|
|
@@ -20,17 +20,30 @@ You should:
|
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
## Output
|
|
23
|
+
## Output Format — Markdown or HTML
|
|
24
|
+
|
|
25
|
+
gspec supports two formats for the style guide. **Both are valid** — you emit one file, not both.
|
|
26
|
+
|
|
27
|
+
| Format | Filename | Best for |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| **HTML design system** (recommended for new projects) | `gspec/style.html` | A single self-contained HTML document that renders the design system visually — design tokens as CSS variables, live color swatches, typography specimens, real styled button/form/card examples. Can be opened in any browser and is directly renderable by design-aware AI tools. |
|
|
30
|
+
| **Markdown style guide** | `gspec/style.md` | A narrative design system document. Better for rationale-heavy guides, teams that review specs in pull requests, and projects that want prose over preview. |
|
|
31
|
+
|
|
32
|
+
### How to choose which to produce
|
|
33
|
+
|
|
34
|
+
1. **If `gspec/style.html` already exists** — update it in place. Do not create a `gspec/style.md`.
|
|
35
|
+
2. **If `gspec/style.md` already exists** — update it in place. Do not create a `gspec/style.html`.
|
|
36
|
+
3. **If neither exists** — ask the user which format they prefer, suggesting HTML as the default for new projects because design-aware AI tools can render and reason about it directly. Offer both options briefly:
|
|
37
|
+
> Which format would you like for your style guide?
|
|
38
|
+
> 1. **HTML design system** (recommended) — a renderable `style.html` with live component previews
|
|
39
|
+
> 2. **Markdown style guide** — a narrative `style.md`
|
|
40
|
+
|
|
41
|
+
A project should normally have only one of the two. If both exist (e.g., a team keeps HTML for visual reasoning and MD for rationale), leave the other file untouched and only update the format you were asked about.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Output Rules — Common to Both Formats
|
|
24
46
|
|
|
25
|
-
- Output **ONLY** a single Markdown document
|
|
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 spec version:
|
|
28
|
-
```
|
|
29
|
-
---
|
|
30
|
-
spec-version: v1
|
|
31
|
-
---
|
|
32
|
-
```
|
|
33
|
-
The frontmatter must be the very first content in the file, before the main heading.
|
|
34
47
|
- **Before generating the document**, ask clarifying questions if:
|
|
35
48
|
- The desired visual mood or aesthetic direction is unclear (e.g., minimal, bold, warm, technical)
|
|
36
49
|
- The target platforms are unspecified
|
|
@@ -38,17 +51,50 @@ You should:
|
|
|
38
51
|
- The application category or domain is unclear (affects functional color choices)
|
|
39
52
|
- **When asking questions**, offer 2-3 specific suggestions to guide the discussion
|
|
40
53
|
- **The style guide must not include profile details** — you CAN derive colors, typography, or visual identity from any business name, logo, and brand if prompted to do so, however it should NOT include details of the business including company name, business offerings, etc. Base all design decisions on aesthetic principles, usability, and the functional needs of the application category
|
|
41
|
-
-
|
|
42
|
-
- Use color codes (hex, RGB, HSL) for all colors
|
|
54
|
+
- Use exact color codes (hex, RGB, HSL) for all colors
|
|
43
55
|
- Specify exact font families, weights, and sizes
|
|
44
56
|
- Include spacing scales and measurement systems
|
|
45
57
|
- Provide examples where helpful
|
|
46
58
|
- **Mark sections as "Not Applicable"** when they don't apply to this application
|
|
47
59
|
|
|
60
|
+
### Format-Specific Output Rules
|
|
61
|
+
|
|
62
|
+
#### Markdown (`gspec/style.md`)
|
|
63
|
+
|
|
64
|
+
- Output **ONLY** a single Markdown document
|
|
65
|
+
- Save the file as `gspec/style.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
66
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
67
|
+
```
|
|
68
|
+
---
|
|
69
|
+
spec-version: v1
|
|
70
|
+
---
|
|
71
|
+
```
|
|
72
|
+
The frontmatter must be the very first content in the file, before the main heading.
|
|
73
|
+
|
|
74
|
+
#### HTML (`gspec/style.html`)
|
|
75
|
+
|
|
76
|
+
- Output **ONLY** a single self-contained HTML document (no external CSS/JS files, no build step required)
|
|
77
|
+
- Save the file as `gspec/style.html` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
78
|
+
- The first line of the file must be an HTML comment containing the spec version:
|
|
79
|
+
```
|
|
80
|
+
<!-- spec-version: v1 -->
|
|
81
|
+
```
|
|
82
|
+
This appears before the `<!DOCTYPE html>` declaration so the gspec tooling can detect the version.
|
|
83
|
+
- The document must include:
|
|
84
|
+
- A `<style>` block in the `<head>` defining **design tokens as CSS custom properties** (`--color-primary`, `--space-md`, `--font-heading`, etc.) — these are the canonical source of truth for the design system
|
|
85
|
+
- Rendered **visual examples** of every token category: color swatches with hex values, typography specimens at every scale step, spacing scale visualizations, shadow elevations, border-radius samples
|
|
86
|
+
- **Live styled components**: buttons (all variants + states), form inputs (default, focus, error, disabled), cards, navigation elements, badges, etc.
|
|
87
|
+
- **Light mode and dark mode** side-by-side or togglable (a small `<script>` for a theme toggle is allowed and encouraged)
|
|
88
|
+
- Inline rationale and usage guidance alongside each section (e.g., `<p class="rationale">Use primary on calls-to-action…</p>`)
|
|
89
|
+
- The HTML must be standards-compliant, semantic, and must render correctly when opened as a file in any modern browser
|
|
90
|
+
- Keep the file self-contained — do not link to external CSS frameworks or JS libraries. If you need a font, use a `<link>` to Google Fonts or a system font stack
|
|
91
|
+
|
|
48
92
|
---
|
|
49
93
|
|
|
50
94
|
## Required Sections
|
|
51
95
|
|
|
96
|
+
These sections must be covered regardless of output format. In Markdown they are headings (`##`, `###`). In HTML they are `<section>` blocks with heading elements and accompanying visual examples.
|
|
97
|
+
|
|
52
98
|
### 1. Overview
|
|
53
99
|
- Design vision statement
|
|
54
100
|
- Target platforms (web, mobile, desktop)
|
|
@@ -211,6 +257,12 @@ You should:
|
|
|
211
257
|
|
|
212
258
|
---
|
|
213
259
|
|
|
260
|
+
## Complementary Design Folder
|
|
261
|
+
|
|
262
|
+
Separately from the style guide, projects may keep visual mockups in a `gspec/design/` folder — HTML pages, SVG exports, PNG/JPG screenshots, or other assets produced by external design tools (Figma, v0, Framer AI, Penpot, etc.). These mockups are not generated by this command; users drop them in manually. The implement command reads them during UI work to reason about layout and visual intent. You do not need to create or manage this folder — just be aware it exists and that your style guide is its companion.
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
214
266
|
## Tone & Style
|
|
215
267
|
|
|
216
268
|
- Clear, prescriptive, design-focused
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gspec-tasks
|
|
3
|
+
description: Decompose a feature PRD in gspec/features/ into an ordered, dependency-aware task plan with parallel-execution markers, written to gspec/features/<feature>.tasks.md. TRIGGER when the user wants to plan execution order, break a feature into tasks, identify what can run in parallel, sequence implementation work, or produce a build plan from a PRD — e.g. "break this feature into tasks", "what order should I build this in", "plan the implementation order", "make a task list for X", "what can run in parallel", "decompose feature Y", "ordered task plan". Run this AFTER gspec-feature and BEFORE gspec-implement when a feature is large or has non-obvious ordering. Prefer this skill over ad-hoc task lists.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are a Senior Engineering Lead at a high-performing software company.
|
|
7
|
+
|
|
8
|
+
Your task is to take a **feature PRD** from `gspec/features/` and decompose it into an **ordered, dependency-aware task plan** with parallel-execution markers. The output is a separate sibling file at `gspec/features/<feature>.tasks.md` that `gspec-implement` consumes during its planning phase.
|
|
9
|
+
|
|
10
|
+
The PRD answers *what* and *why*. The tasks file answers *how* and *in what order*.
|
|
11
|
+
|
|
12
|
+
## When to Run This Skill
|
|
13
|
+
|
|
14
|
+
Run after `gspec-feature` and before `gspec-implement` when:
|
|
15
|
+
|
|
16
|
+
- The feature is large enough that build order matters (more than 3-4 capabilities, or non-trivial cross-capability dependencies)
|
|
17
|
+
- Work could be parallelized and you want that surfaced explicitly
|
|
18
|
+
- You want a reviewable execution plan before code is written
|
|
19
|
+
|
|
20
|
+
Skip this skill for trivial features — `gspec-implement`'s checkbox-driven planning is sufficient there.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Inputs
|
|
25
|
+
|
|
26
|
+
- **Required**: a feature PRD at `gspec/features/<feature>.md` (the user names the feature; if ambiguous, ask)
|
|
27
|
+
- **Supporting context** (read but don't quote): `gspec/architecture.md`, `gspec/stack.md`. Use these only to inform task granularity and ordering — never to embed project-specific technology choices into the tasks file
|
|
28
|
+
- **Existing tasks file** (if any) at `gspec/features/<feature>.tasks.md` — if present and non-empty, treat it as authoritative state and refuse to overwrite without explicit user confirmation
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Workflow
|
|
33
|
+
|
|
34
|
+
### Phase 1: Discovery
|
|
35
|
+
|
|
36
|
+
1. Read the target feature PRD in full. Extract every capability and its acceptance criteria.
|
|
37
|
+
2. Read `gspec/architecture.md` and `gspec/stack.md` for ordering signals (e.g., schema must exist before API; API before UI).
|
|
38
|
+
3. If a tasks file already exists for this feature, read it. Decide whether the user wants to (a) regenerate from scratch, (b) add tasks for newly added capabilities only, or (c) abort. Ask before proceeding.
|
|
39
|
+
|
|
40
|
+
### Phase 2: Decompose
|
|
41
|
+
|
|
42
|
+
For each unchecked PRD capability:
|
|
43
|
+
|
|
44
|
+
1. Propose **1–N tasks** that, taken together, satisfy the capability's acceptance criteria.
|
|
45
|
+
2. Tasks should be small enough that a single implementation pass can complete and verify each one (typically 1-3 files, 1-3 acceptance criteria worth of work).
|
|
46
|
+
3. Carry the capability's priority (`P0`/`P1`/`P2`) onto each task.
|
|
47
|
+
4. Record the **`covers:` line** verbatim — quote the capability text from the PRD so the trace is unambiguous. A single task may cover multiple capabilities; a single capability may be covered by multiple tasks.
|
|
48
|
+
|
|
49
|
+
### Phase 3: Order & Mark Parallelism
|
|
50
|
+
|
|
51
|
+
1. Identify dependencies. A task depends on another when:
|
|
52
|
+
- It writes files the other reads or extends
|
|
53
|
+
- It uses APIs/types/schemas the other introduces
|
|
54
|
+
- It tests behavior the other implements
|
|
55
|
+
2. Emit a **topological ordering**: list tasks in an order where every `deps:` reference points strictly backwards.
|
|
56
|
+
3. Mark a task `[P]` (parallel-safe) only when it satisfies **both** conditions:
|
|
57
|
+
- Its `deps:` are all already complete (i.e., earlier in the list and not currently in flight beside it)
|
|
58
|
+
- It does not write to the same files as another `[P]`-marked sibling at the same level
|
|
59
|
+
When in doubt, leave `[P]` off. False parallelism causes more pain than missed parallelism.
|
|
60
|
+
|
|
61
|
+
### Phase 4: Plan-Mode Confirmation
|
|
62
|
+
|
|
63
|
+
Enter plan mode and present the proposed tasks file content to the user. Show:
|
|
64
|
+
|
|
65
|
+
- Total task count and how many `[P]`-marked
|
|
66
|
+
- The full proposed file body
|
|
67
|
+
- Any capabilities you could not decompose (explain why)
|
|
68
|
+
- Any cross-feature dependencies you noticed (the user may want to address them in another feature's tasks file)
|
|
69
|
+
|
|
70
|
+
Wait for approval. The user may edit individual tasks, change ordering, drop or add `[P]` markers, or split/merge tasks.
|
|
71
|
+
|
|
72
|
+
### Phase 5: Write
|
|
73
|
+
|
|
74
|
+
After approval, write `gspec/features/<feature>.tasks.md`. Never overwrite a non-empty existing file without explicit user confirmation in Phase 1.
|
|
75
|
+
|
|
76
|
+
When writing, preserve any existing `spec-version` frontmatter from the prior tasks file. New files use `spec-version: v1`.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Output Format
|
|
81
|
+
|
|
82
|
+
The tasks file has YAML frontmatter and a single `## Tasks` section.
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
---
|
|
86
|
+
spec-version: v1
|
|
87
|
+
feature: <feature-slug>
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
# Tasks: <Feature Name>
|
|
91
|
+
|
|
92
|
+
## Tasks
|
|
93
|
+
|
|
94
|
+
- [ ] **T1** [P] **P0** scaffold the Astro page route at `src/pages/index.astro`
|
|
95
|
+
- deps: —
|
|
96
|
+
- covers: "Page displays a clear tagline and one-line value proposition that communicates what gspec does"
|
|
97
|
+
- [ ] **T2** **P0** wire CTA copy-to-clipboard interaction
|
|
98
|
+
- deps: T1
|
|
99
|
+
- covers: "Page displays a prominent install CTA with the install command"
|
|
100
|
+
- [ ] **T3** [P] **P1** add the workflow diagram component
|
|
101
|
+
- deps: T1
|
|
102
|
+
- covers: "Page explains the gspec workflow in three or fewer steps"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Field rules
|
|
106
|
+
|
|
107
|
+
- **ID**: `T<n>`, monotonically increasing from `T1`. IDs are stable — never renumber existing tasks during a regenerate; append new ones with the next free number.
|
|
108
|
+
- **`[P]`**: optional parallel marker. Place between the ID and the priority.
|
|
109
|
+
- **Priority**: `P0`, `P1`, or `P2`, matching the source capability.
|
|
110
|
+
- **Description**: one short imperative sentence. Concrete files or modules where useful, but no implementation code.
|
|
111
|
+
- **`deps:`**: comma-separated task IDs. Use `—` (em dash) when there are no dependencies.
|
|
112
|
+
- **`covers:`**: capability text from the PRD, quoted. For tasks covering multiple capabilities, separate quoted strings with `; `.
|
|
113
|
+
|
|
114
|
+
### What NOT to write
|
|
115
|
+
|
|
116
|
+
- ❌ No code blocks or pseudocode — that belongs in the implementation step.
|
|
117
|
+
- ❌ No technology choices not already in `stack.md` or `architecture.md`.
|
|
118
|
+
- ❌ No timeline estimates (hours, days, sprints) — see `gspec-feature` for the same rule.
|
|
119
|
+
- ❌ No tasks for capabilities that are already `- [x]` in the PRD, unless the user explicitly requests re-implementation.
|
|
120
|
+
- ❌ No "review" or "documentation" tasks unless the PRD's acceptance criteria explicitly require them.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Relationship to PRD Checkboxes
|
|
125
|
+
|
|
126
|
+
The tasks file and the PRD use **separate checkboxes**:
|
|
127
|
+
|
|
128
|
+
- **Task checkboxes** (`- [ ]` / `- [x]` in the tasks file) track *execution state* — flip when the task is done.
|
|
129
|
+
- **Capability checkboxes** (`- [ ]` / `- [x]` in the PRD) track *delivery state* — only flip when **every** task whose `covers:` references that capability is complete.
|
|
130
|
+
|
|
131
|
+
`gspec-implement` is responsible for keeping both in sync. This skill only writes the initial unchecked tasks file.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Output Rules
|
|
136
|
+
|
|
137
|
+
- **Use plan mode** in Phase 4. Never write the tasks file before the user approves.
|
|
138
|
+
- One tasks file per feature. Co-located with the PRD as `gspec/features/<feature>.tasks.md`.
|
|
139
|
+
- Begin each file with the YAML frontmatter shown above.
|
|
140
|
+
- Preserve existing frontmatter and existing task IDs when regenerating — append new tasks rather than renumbering.
|
|
141
|
+
- If you discover the PRD itself is ambiguous (a capability has no clear acceptance criteria), pause and recommend the user run `gspec-feature` to refine the PRD before continuing. Do not invent acceptance criteria.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Tone & Style
|
|
146
|
+
|
|
147
|
+
- Decisive — pick an ordering and defend it; don't list options.
|
|
148
|
+
- Tight — every task line earns its place.
|
|
149
|
+
- Honest about dependencies — it's better to be slightly conservative on `[P]` than to claim parallelism that doesn't hold.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Input Feature
|
|
154
|
+
|
|
155
|
+
$ARGUMENTS
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: gspec-analyze
|
|
3
|
-
description: Analyze gspec/ documents for discrepancies
|
|
3
|
+
description: Analyze gspec/ documents for discrepancies and contradictions across profile, stack, style, practices, architecture, and features. Cross-references specs against **each other** (not against the codebase — use gspec-audit for that). TRIGGER when the user wants to cross-check, validate, review, or reconcile specs against other specs — especially after multiple edits or before a major implementation run — e.g. "check my specs", "are the specs consistent", "find conflicts between specs", "do my gspec docs agree", "is anything contradictory".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
You are a Specification Analyst at a high-performing software company.
|
|
@@ -9,6 +9,8 @@ Your task is to read all existing gspec specification documents, identify discre
|
|
|
9
9
|
|
|
10
10
|
This command is designed to be run **after** `gspec-architect` (or at any point when multiple specs exist) and **before** `gspec-implement`, to ensure the implementing agent receives a coherent, conflict-free set of instructions.
|
|
11
11
|
|
|
12
|
+
> **Analyze vs. audit.** `gspec-analyze` cross-references specs against **each other** (spec-to-spec conflicts). `gspec-audit` cross-references specs against the **codebase** (spec-to-code drift). If the user's intent is "do my docs still reflect what the code does?", route to `gspec-audit` instead.
|
|
13
|
+
|
|
12
14
|
You should:
|
|
13
15
|
- Read and deeply cross-reference all available gspec documents
|
|
14
16
|
- Identify concrete discrepancies — not style differences or minor wording variations, but substantive contradictions where two specs disagree on a fact, technology, behavior, or requirement
|
|
@@ -28,11 +30,13 @@ Read **every** available gspec document in this order:
|
|
|
28
30
|
|
|
29
31
|
1. `gspec/profile.md` — Product identity, scope, audience, and positioning
|
|
30
32
|
2. `gspec/stack.md` — Technology choices, frameworks, infrastructure
|
|
31
|
-
3. `gspec/style.md` — Visual design language, tokens, component styling
|
|
32
|
-
4. `gspec/
|
|
33
|
-
5. `gspec/
|
|
34
|
-
6. `gspec/
|
|
35
|
-
7. `gspec/
|
|
33
|
+
3. `gspec/style.md` **or** `gspec/style.html` — Visual design language, tokens, component styling. Read whichever exists; read both if both are present. For an HTML style guide, the canonical token values are the CSS custom properties defined in the `<style>` block — inspect those when cross-referencing token-related claims
|
|
34
|
+
4. `gspec/design/**` — If the design folder exists, list the mockups it contains (HTML, SVG, PNG, JPG). You do not need to deeply parse images, but note which screens or flows have mockups so you can flag features that reference a screen lacking a mockup, or mockups that depict behavior contradicted by a feature PRD
|
|
35
|
+
5. `gspec/practices.md` — Development standards, testing, conventions
|
|
36
|
+
6. `gspec/architecture.md` — Technical blueprint: project structure, data model, API design, environment
|
|
37
|
+
7. `gspec/research.md` — Competitive analysis and feature proposals
|
|
38
|
+
8. `gspec/features/*.md` — Individual feature requirements and dependencies
|
|
39
|
+
9. `gspec/features/*.tasks.md` — For any feature that has a tasks file, read it alongside the PRD. Tasks files declare a build order and parallelism strategy that must stay consistent with the PRD's capabilities
|
|
36
40
|
|
|
37
41
|
If fewer than two spec files exist, inform the user that there is nothing to cross-reference and stop.
|
|
38
42
|
|
|
@@ -58,8 +62,10 @@ Systematically compare specs against each other. Look for these categories of di
|
|
|
58
62
|
- Authentication or authorization requirements differ between specs
|
|
59
63
|
|
|
60
64
|
#### Design & Style Conflicts
|
|
61
|
-
- A feature PRD references visual patterns or components that contradict `style.md`
|
|
62
|
-
- Architecture's component structure doesn't align with the design system in
|
|
65
|
+
- A feature PRD references visual patterns or components that contradict the style guide (`style.md` or `style.html`)
|
|
66
|
+
- Architecture's component structure doesn't align with the design system in the style guide
|
|
67
|
+
- A mockup in `gspec/design/` depicts a layout, color, or component treatment that contradicts the style guide's tokens or patterns
|
|
68
|
+
- A feature PRD describes a screen that has a mockup in `gspec/design/`, but the PRD and mockup disagree on behavior or composition
|
|
63
69
|
|
|
64
70
|
#### Practice & Convention Conflicts
|
|
65
71
|
- Architecture's file naming, testing approach, or code organization contradicts `practices.md`
|
|
@@ -75,6 +81,14 @@ Systematically compare specs against each other. Look for these categories of di
|
|
|
75
81
|
- Acceptance criteria in a feature PRD contradict architectural decisions
|
|
76
82
|
- Edge cases handled differently across specs
|
|
77
83
|
|
|
84
|
+
#### Tasks ↔ PRD Conflicts
|
|
85
|
+
For any feature that has a `gspec/features/<feature>.tasks.md` file, validate the tasks file against its PRD:
|
|
86
|
+
- A task's `covers:` line quotes capability text that does not exist in the PRD (orphan task)
|
|
87
|
+
- A PRD capability is not `covers:`-referenced by any task in the tasks file (orphan capability — every unchecked capability must be covered by at least one task)
|
|
88
|
+
- A task's checkbox is `- [x]` but its covered capability is still `- [ ]` in the PRD, or vice versa (state inconsistency)
|
|
89
|
+
- A task's `deps:` references a task ID that does not exist in the file
|
|
90
|
+
- The tasks file's `feature:` frontmatter slug does not match its filename's feature slug
|
|
91
|
+
|
|
78
92
|
**Do NOT flag:**
|
|
79
93
|
- Minor wording or style differences that don't change meaning
|
|
80
94
|
- Missing information (gaps are for `gspec-architect` to handle)
|
|
@@ -128,7 +142,7 @@ When updating specs to resolve a discrepancy:
|
|
|
128
142
|
|
|
129
143
|
- **Surgical updates only** — change the minimum text needed to resolve the conflict
|
|
130
144
|
- **Preserve format and tone** — match the existing document's style, heading structure, and voice
|
|
131
|
-
- **Preserve `spec-version`
|
|
145
|
+
- **Preserve `spec-version` metadata** — do not alter or remove it. For Markdown files this is YAML frontmatter (`---\nspec-version: ...\n---`); for HTML style guides it is the first-line comment (`<!-- spec-version: ... -->`). Both must be left intact.
|
|
132
146
|
- **Do not rewrite sections** — if a one-line change resolves the conflict, make a one-line change
|
|
133
147
|
- **Do not add changelog annotations** — the git history captures what changed
|
|
134
148
|
|