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
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
You are a
|
|
1
|
+
You are a Product Strategist.
|
|
2
2
|
|
|
3
|
-
Your task is to take the provided
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
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.
|
|
4
6
|
|
|
5
7
|
You should:
|
|
6
8
|
- Define the product's identity and purpose clearly
|
|
@@ -8,7 +10,7 @@ You should:
|
|
|
8
10
|
- Articulate the value proposition
|
|
9
11
|
- **Ask clarifying questions when essential information is missing** rather than guessing
|
|
10
12
|
- **Offer 2-3 specific suggestions** when strategic direction is unclear
|
|
11
|
-
- Think from a
|
|
13
|
+
- Think from a user and purpose perspective, not technical implementation
|
|
12
14
|
- Be clear, compelling, and strategic
|
|
13
15
|
|
|
14
16
|
---
|
|
@@ -24,27 +26,30 @@ You should:
|
|
|
24
26
|
---
|
|
25
27
|
```
|
|
26
28
|
The frontmatter must be the very first content in the file, before the main heading.
|
|
27
|
-
- **Before generating the document**,
|
|
28
|
-
|
|
29
|
+
- **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.
|
|
30
|
+
- **Ask clarifying questions** if:
|
|
31
|
+
- The product type is ambiguous
|
|
32
|
+
- The target audience or user is unclear
|
|
29
33
|
- The core value proposition is ambiguous
|
|
30
|
-
- The business model or monetization strategy is unspecified
|
|
31
|
-
- Competitive positioning is unknown
|
|
34
|
+
- *(Commercial products only)* The business model or monetization strategy is unspecified
|
|
35
|
+
- *(Commercial products only)* Competitive positioning is unknown
|
|
32
36
|
- **When asking questions**, offer 2-3 specific suggestions to guide the discussion
|
|
33
|
-
- Write for
|
|
37
|
+
- Write for the audience the product actually has (internal stakeholders, end users, contributors, the public, etc.)
|
|
34
38
|
- Be concise but comprehensive
|
|
35
39
|
- Focus on the "what" and "why", not the "how"
|
|
36
40
|
- Use clear, jargon-free language where possible
|
|
37
|
-
- **Mark sections as "Not Applicable"** when they don't apply to this product
|
|
41
|
+
- **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.
|
|
38
42
|
|
|
39
43
|
---
|
|
40
44
|
|
|
41
45
|
## Required Sections
|
|
42
46
|
|
|
43
47
|
### 1. Product Overview
|
|
44
|
-
- Product
|
|
48
|
+
- Product name
|
|
45
49
|
- Tagline or one-sentence description
|
|
46
|
-
- Category (e.g., SaaS platform, mobile app, marketplace,
|
|
47
|
-
-
|
|
50
|
+
- Category (e.g., SaaS platform, mobile app, marketplace, open source library, internal tool, CLI utility, developer tool, research software, personal project, game, etc.)
|
|
51
|
+
- Product type (commercial, internal, open source, research, personal, etc.) — determines which later sections apply
|
|
52
|
+
- Current stage (concept, MVP, beta, launched, scaling, maintained, etc.)
|
|
48
53
|
|
|
49
54
|
### 2. Mission & Vision
|
|
50
55
|
|
|
@@ -59,7 +64,7 @@ You should:
|
|
|
59
64
|
### 3. Target Audience
|
|
60
65
|
|
|
61
66
|
#### Primary Users
|
|
62
|
-
- Who are they? (
|
|
67
|
+
- Who are they? (roles, characteristics, context in which they use the product)
|
|
63
68
|
- What are their key pain points?
|
|
64
69
|
- What are their goals and motivations?
|
|
65
70
|
|
|
@@ -68,7 +73,7 @@ You should:
|
|
|
68
73
|
- How they differ from primary users
|
|
69
74
|
|
|
70
75
|
#### Stakeholders
|
|
71
|
-
- Who else is impacted? (buyers, administrators, partners, etc.)
|
|
76
|
+
- Who else is impacted? (buyers, administrators, partners, maintainers, contributors, etc.)
|
|
72
77
|
|
|
73
78
|
### 4. Value Proposition
|
|
74
79
|
|
|
@@ -107,18 +112,22 @@ You should:
|
|
|
107
112
|
|
|
108
113
|
### 7. Market & Competition
|
|
109
114
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
- Market
|
|
115
|
+
*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.*
|
|
116
|
+
|
|
117
|
+
#### Market or Ecosystem Context
|
|
118
|
+
- Market size and opportunity (commercial) **or** ecosystem landscape (OSS, research)
|
|
119
|
+
- Trends driving demand or adoption
|
|
120
|
+
- Maturity of the space
|
|
114
121
|
|
|
115
|
-
#### Competitive Landscape
|
|
116
|
-
- Direct competitors
|
|
117
|
-
- Indirect competitors or
|
|
122
|
+
#### Competitive Landscape or Alternatives
|
|
123
|
+
- Direct competitors or comparable projects
|
|
124
|
+
- Indirect competitors, alternatives, or incumbent approaches
|
|
118
125
|
- White space or gaps this product fills
|
|
119
126
|
|
|
120
127
|
### 8. Business Model
|
|
121
128
|
|
|
129
|
+
*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.*
|
|
130
|
+
|
|
122
131
|
#### Revenue Model
|
|
123
132
|
- How the product makes money (subscription, transaction fees, freemium, ads, etc.)
|
|
124
133
|
- Pricing strategy (high-level)
|
|
@@ -133,6 +142,8 @@ You should:
|
|
|
133
142
|
|
|
134
143
|
### 9. Brand & Positioning
|
|
135
144
|
|
|
145
|
+
*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.*
|
|
146
|
+
|
|
136
147
|
#### Brand Personality
|
|
137
148
|
- How the brand should feel (professional, friendly, innovative, trustworthy, etc.)
|
|
138
149
|
- Tone and voice characteristics
|
|
@@ -146,18 +157,25 @@ You should:
|
|
|
146
157
|
|
|
147
158
|
### 10. Success Metrics
|
|
148
159
|
|
|
149
|
-
|
|
160
|
+
*Adapt to the product type. Always include user/adoption metrics if meaningful. Include business metrics only for commercial products.*
|
|
161
|
+
|
|
162
|
+
#### Adoption & Engagement Metrics
|
|
163
|
+
- Adoption or usage rates (installs, active users, repo stars, internal rollout percentage, etc.)
|
|
164
|
+
- Engagement metrics appropriate to the product
|
|
165
|
+
- User satisfaction (NPS, CSAT, contributor sentiment, internal feedback, etc.)
|
|
166
|
+
|
|
167
|
+
#### Business Metrics *(commercial products only)*
|
|
150
168
|
- Revenue targets
|
|
151
|
-
-
|
|
169
|
+
- Paid user growth goals
|
|
152
170
|
- Market share objectives
|
|
153
171
|
|
|
154
|
-
####
|
|
155
|
-
-
|
|
156
|
-
- Engagement metrics
|
|
157
|
-
- Customer satisfaction (NPS, CSAT, etc.)
|
|
172
|
+
#### Project Health Metrics *(optional, especially for OSS / internal tools)*
|
|
173
|
+
- Contributor count, issue response time, release cadence, uptime, etc.
|
|
158
174
|
|
|
159
175
|
### 11. Public-Facing Information (Optional)
|
|
160
176
|
|
|
177
|
+
*Skip entirely for internal tools, private projects, or anything without a public presence.*
|
|
178
|
+
|
|
161
179
|
#### Website Copy Elements
|
|
162
180
|
- Homepage headline and subheadline
|
|
163
181
|
- About us summary
|
|
@@ -179,11 +197,11 @@ You should:
|
|
|
179
197
|
- What's being built now
|
|
180
198
|
- Immediate priorities
|
|
181
199
|
|
|
182
|
-
#### Near-Term (
|
|
200
|
+
#### Near-Term (Next)
|
|
183
201
|
- Planned enhancements
|
|
184
202
|
- Next major milestones
|
|
185
203
|
|
|
186
|
-
#### Long-Term Vision (
|
|
204
|
+
#### Long-Term Vision (Later)
|
|
187
205
|
- Future capabilities
|
|
188
206
|
- Strategic direction
|
|
189
207
|
|
|
@@ -194,9 +212,11 @@ You should:
|
|
|
194
212
|
- Dependencies on external factors
|
|
195
213
|
|
|
196
214
|
#### Risks
|
|
197
|
-
- Market risks
|
|
198
|
-
- Competitive risks
|
|
199
215
|
- Adoption risks
|
|
216
|
+
- Market or competitive risks *(commercial products)*
|
|
217
|
+
- Ecosystem or dependency risks *(OSS, research)*
|
|
218
|
+
- Sustainability or maintainership risks *(OSS, internal tools)*
|
|
219
|
+
- Execution or technical risks
|
|
200
220
|
|
|
201
221
|
#### Mitigation Strategies
|
|
202
222
|
- How to address key risks
|
|
@@ -205,13 +225,13 @@ You should:
|
|
|
205
225
|
|
|
206
226
|
## Tone & Style
|
|
207
227
|
|
|
208
|
-
- Clear, compelling,
|
|
209
|
-
- Strategic and
|
|
228
|
+
- Clear, compelling, purpose-focused
|
|
229
|
+
- Strategic and forward-looking
|
|
210
230
|
- Accessible to non-technical audiences
|
|
211
|
-
- Designed for
|
|
231
|
+
- Designed for alignment among whoever the product's audience is (team, contributors, stakeholders, users, public)
|
|
212
232
|
|
|
213
233
|
---
|
|
214
234
|
|
|
215
|
-
## Input Product
|
|
235
|
+
## Input Product Description
|
|
216
236
|
|
|
217
237
|
<<<PRODUCT_DESCRIPTION>>>
|
package/commands/gspec.style.md
CHANGED
|
@@ -15,17 +15,30 @@ You should:
|
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
## Output
|
|
18
|
+
## Output Format — Markdown or HTML
|
|
19
|
+
|
|
20
|
+
gspec supports two formats for the style guide. **Both are valid** — you emit one file, not both.
|
|
21
|
+
|
|
22
|
+
| Format | Filename | Best for |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| **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. |
|
|
25
|
+
| **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. |
|
|
26
|
+
|
|
27
|
+
### How to choose which to produce
|
|
28
|
+
|
|
29
|
+
1. **If `gspec/style.html` already exists** — update it in place. Do not create a `gspec/style.md`.
|
|
30
|
+
2. **If `gspec/style.md` already exists** — update it in place. Do not create a `gspec/style.html`.
|
|
31
|
+
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:
|
|
32
|
+
> Which format would you like for your style guide?
|
|
33
|
+
> 1. **HTML design system** (recommended) — a renderable `style.html` with live component previews
|
|
34
|
+
> 2. **Markdown style guide** — a narrative `style.md`
|
|
35
|
+
|
|
36
|
+
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.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Output Rules — Common to Both Formats
|
|
19
41
|
|
|
20
|
-
- Output **ONLY** a single Markdown document
|
|
21
|
-
- Save the file as `gspec/style.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
22
|
-
- Begin the file with YAML frontmatter containing the spec version:
|
|
23
|
-
```
|
|
24
|
-
---
|
|
25
|
-
spec-version: <<<SPEC_VERSION>>>
|
|
26
|
-
---
|
|
27
|
-
```
|
|
28
|
-
The frontmatter must be the very first content in the file, before the main heading.
|
|
29
42
|
- **Before generating the document**, ask clarifying questions if:
|
|
30
43
|
- The desired visual mood or aesthetic direction is unclear (e.g., minimal, bold, warm, technical)
|
|
31
44
|
- The target platforms are unspecified
|
|
@@ -33,17 +46,50 @@ You should:
|
|
|
33
46
|
- The application category or domain is unclear (affects functional color choices)
|
|
34
47
|
- **When asking questions**, offer 2-3 specific suggestions to guide the discussion
|
|
35
48
|
- **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
|
|
36
|
-
-
|
|
37
|
-
- Use color codes (hex, RGB, HSL) for all colors
|
|
49
|
+
- Use exact color codes (hex, RGB, HSL) for all colors
|
|
38
50
|
- Specify exact font families, weights, and sizes
|
|
39
51
|
- Include spacing scales and measurement systems
|
|
40
52
|
- Provide examples where helpful
|
|
41
53
|
- **Mark sections as "Not Applicable"** when they don't apply to this application
|
|
42
54
|
|
|
55
|
+
### Format-Specific Output Rules
|
|
56
|
+
|
|
57
|
+
#### Markdown (`gspec/style.md`)
|
|
58
|
+
|
|
59
|
+
- Output **ONLY** a single Markdown document
|
|
60
|
+
- Save the file as `gspec/style.md` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
61
|
+
- Begin the file with YAML frontmatter containing the spec version:
|
|
62
|
+
```
|
|
63
|
+
---
|
|
64
|
+
spec-version: <<<SPEC_VERSION>>>
|
|
65
|
+
---
|
|
66
|
+
```
|
|
67
|
+
The frontmatter must be the very first content in the file, before the main heading.
|
|
68
|
+
|
|
69
|
+
#### HTML (`gspec/style.html`)
|
|
70
|
+
|
|
71
|
+
- Output **ONLY** a single self-contained HTML document (no external CSS/JS files, no build step required)
|
|
72
|
+
- Save the file as `gspec/style.html` in the root of the project, create the `gspec` folder if it doesn't exist
|
|
73
|
+
- The first line of the file must be an HTML comment containing the spec version:
|
|
74
|
+
```
|
|
75
|
+
<!-- spec-version: <<<SPEC_VERSION>>> -->
|
|
76
|
+
```
|
|
77
|
+
This appears before the `<!DOCTYPE html>` declaration so the gspec tooling can detect the version.
|
|
78
|
+
- The document must include:
|
|
79
|
+
- 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
|
|
80
|
+
- 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
|
|
81
|
+
- **Live styled components**: buttons (all variants + states), form inputs (default, focus, error, disabled), cards, navigation elements, badges, etc.
|
|
82
|
+
- **Light mode and dark mode** side-by-side or togglable (a small `<script>` for a theme toggle is allowed and encouraged)
|
|
83
|
+
- Inline rationale and usage guidance alongside each section (e.g., `<p class="rationale">Use primary on calls-to-action…</p>`)
|
|
84
|
+
- The HTML must be standards-compliant, semantic, and must render correctly when opened as a file in any modern browser
|
|
85
|
+
- 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
|
|
86
|
+
|
|
43
87
|
---
|
|
44
88
|
|
|
45
89
|
## Required Sections
|
|
46
90
|
|
|
91
|
+
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.
|
|
92
|
+
|
|
47
93
|
### 1. Overview
|
|
48
94
|
- Design vision statement
|
|
49
95
|
- Target platforms (web, mobile, desktop)
|
|
@@ -206,6 +252,12 @@ You should:
|
|
|
206
252
|
|
|
207
253
|
---
|
|
208
254
|
|
|
255
|
+
## Complementary Design Folder
|
|
256
|
+
|
|
257
|
+
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.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
209
261
|
## Tone & Style
|
|
210
262
|
|
|
211
263
|
- Clear, prescriptive, design-focused
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
You are a Senior Engineering Lead at a high-performing software company.
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
The PRD answers *what* and *why*. The tasks file answers *how* and *in what order*.
|
|
6
|
+
|
|
7
|
+
## When to Run This Skill
|
|
8
|
+
|
|
9
|
+
Run after `gspec-feature` and before `gspec-implement` when:
|
|
10
|
+
|
|
11
|
+
- The feature is large enough that build order matters (more than 3-4 capabilities, or non-trivial cross-capability dependencies)
|
|
12
|
+
- Work could be parallelized and you want that surfaced explicitly
|
|
13
|
+
- You want a reviewable execution plan before code is written
|
|
14
|
+
|
|
15
|
+
Skip this skill for trivial features — `gspec-implement`'s checkbox-driven planning is sufficient there.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Inputs
|
|
20
|
+
|
|
21
|
+
- **Required**: a feature PRD at `gspec/features/<feature>.md` (the user names the feature; if ambiguous, ask)
|
|
22
|
+
- **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
|
|
23
|
+
- **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
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Workflow
|
|
28
|
+
|
|
29
|
+
### Phase 1: Discovery
|
|
30
|
+
|
|
31
|
+
1. Read the target feature PRD in full. Extract every capability and its acceptance criteria.
|
|
32
|
+
2. Read `gspec/architecture.md` and `gspec/stack.md` for ordering signals (e.g., schema must exist before API; API before UI).
|
|
33
|
+
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.
|
|
34
|
+
|
|
35
|
+
### Phase 2: Decompose
|
|
36
|
+
|
|
37
|
+
For each unchecked PRD capability:
|
|
38
|
+
|
|
39
|
+
1. Propose **1–N tasks** that, taken together, satisfy the capability's acceptance criteria.
|
|
40
|
+
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).
|
|
41
|
+
3. Carry the capability's priority (`P0`/`P1`/`P2`) onto each task.
|
|
42
|
+
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.
|
|
43
|
+
|
|
44
|
+
### Phase 3: Order & Mark Parallelism
|
|
45
|
+
|
|
46
|
+
1. Identify dependencies. A task depends on another when:
|
|
47
|
+
- It writes files the other reads or extends
|
|
48
|
+
- It uses APIs/types/schemas the other introduces
|
|
49
|
+
- It tests behavior the other implements
|
|
50
|
+
2. Emit a **topological ordering**: list tasks in an order where every `deps:` reference points strictly backwards.
|
|
51
|
+
3. Mark a task `[P]` (parallel-safe) only when it satisfies **both** conditions:
|
|
52
|
+
- Its `deps:` are all already complete (i.e., earlier in the list and not currently in flight beside it)
|
|
53
|
+
- It does not write to the same files as another `[P]`-marked sibling at the same level
|
|
54
|
+
When in doubt, leave `[P]` off. False parallelism causes more pain than missed parallelism.
|
|
55
|
+
|
|
56
|
+
### Phase 4: Plan-Mode Confirmation
|
|
57
|
+
|
|
58
|
+
Enter plan mode and present the proposed tasks file content to the user. Show:
|
|
59
|
+
|
|
60
|
+
- Total task count and how many `[P]`-marked
|
|
61
|
+
- The full proposed file body
|
|
62
|
+
- Any capabilities you could not decompose (explain why)
|
|
63
|
+
- Any cross-feature dependencies you noticed (the user may want to address them in another feature's tasks file)
|
|
64
|
+
|
|
65
|
+
Wait for approval. The user may edit individual tasks, change ordering, drop or add `[P]` markers, or split/merge tasks.
|
|
66
|
+
|
|
67
|
+
### Phase 5: Write
|
|
68
|
+
|
|
69
|
+
After approval, write `gspec/features/<feature>.tasks.md`. Never overwrite a non-empty existing file without explicit user confirmation in Phase 1.
|
|
70
|
+
|
|
71
|
+
When writing, preserve any existing `spec-version` frontmatter from the prior tasks file. New files use `spec-version: <<<SPEC_VERSION>>>`.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Output Format
|
|
76
|
+
|
|
77
|
+
The tasks file has YAML frontmatter and a single `## Tasks` section.
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
---
|
|
81
|
+
spec-version: <<<SPEC_VERSION>>>
|
|
82
|
+
feature: <feature-slug>
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
# Tasks: <Feature Name>
|
|
86
|
+
|
|
87
|
+
## Tasks
|
|
88
|
+
|
|
89
|
+
- [ ] **T1** [P] **P0** scaffold the Astro page route at `src/pages/index.astro`
|
|
90
|
+
- deps: —
|
|
91
|
+
- covers: "Page displays a clear tagline and one-line value proposition that communicates what gspec does"
|
|
92
|
+
- [ ] **T2** **P0** wire CTA copy-to-clipboard interaction
|
|
93
|
+
- deps: T1
|
|
94
|
+
- covers: "Page displays a prominent install CTA with the install command"
|
|
95
|
+
- [ ] **T3** [P] **P1** add the workflow diagram component
|
|
96
|
+
- deps: T1
|
|
97
|
+
- covers: "Page explains the gspec workflow in three or fewer steps"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Field rules
|
|
101
|
+
|
|
102
|
+
- **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.
|
|
103
|
+
- **`[P]`**: optional parallel marker. Place between the ID and the priority.
|
|
104
|
+
- **Priority**: `P0`, `P1`, or `P2`, matching the source capability.
|
|
105
|
+
- **Description**: one short imperative sentence. Concrete files or modules where useful, but no implementation code.
|
|
106
|
+
- **`deps:`**: comma-separated task IDs. Use `—` (em dash) when there are no dependencies.
|
|
107
|
+
- **`covers:`**: capability text from the PRD, quoted. For tasks covering multiple capabilities, separate quoted strings with `; `.
|
|
108
|
+
|
|
109
|
+
### What NOT to write
|
|
110
|
+
|
|
111
|
+
- ❌ No code blocks or pseudocode — that belongs in the implementation step.
|
|
112
|
+
- ❌ No technology choices not already in `stack.md` or `architecture.md`.
|
|
113
|
+
- ❌ No timeline estimates (hours, days, sprints) — see `gspec-feature` for the same rule.
|
|
114
|
+
- ❌ No tasks for capabilities that are already `- [x]` in the PRD, unless the user explicitly requests re-implementation.
|
|
115
|
+
- ❌ No "review" or "documentation" tasks unless the PRD's acceptance criteria explicitly require them.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Relationship to PRD Checkboxes
|
|
120
|
+
|
|
121
|
+
The tasks file and the PRD use **separate checkboxes**:
|
|
122
|
+
|
|
123
|
+
- **Task checkboxes** (`- [ ]` / `- [x]` in the tasks file) track *execution state* — flip when the task is done.
|
|
124
|
+
- **Capability checkboxes** (`- [ ]` / `- [x]` in the PRD) track *delivery state* — only flip when **every** task whose `covers:` references that capability is complete.
|
|
125
|
+
|
|
126
|
+
`gspec-implement` is responsible for keeping both in sync. This skill only writes the initial unchecked tasks file.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Output Rules
|
|
131
|
+
|
|
132
|
+
- **Use plan mode** in Phase 4. Never write the tasks file before the user approves.
|
|
133
|
+
- One tasks file per feature. Co-located with the PRD as `gspec/features/<feature>.tasks.md`.
|
|
134
|
+
- Begin each file with the YAML frontmatter shown above.
|
|
135
|
+
- Preserve existing frontmatter and existing task IDs when regenerating — append new tasks rather than renumbering.
|
|
136
|
+
- 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.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Tone & Style
|
|
141
|
+
|
|
142
|
+
- Decisive — pick an ordering and defend it; don't list options.
|
|
143
|
+
- Tight — every task line earns its place.
|
|
144
|
+
- Honest about dependencies — it's better to be slightly conservative on `[P]` than to claim parallelism that doesn't hold.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Input Feature
|
|
149
|
+
|
|
150
|
+
<<<FEATURE_NAME>>>
|
|
@@ -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
|
|