gspec 1.17.0 → 1.18.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 (41) hide show
  1. package/README.md +7 -7
  2. package/bin/emitters.js +104 -0
  3. package/bin/gspec.js +2 -2
  4. package/commands/gspec.analyze.md +81 -10
  5. package/commands/gspec.audit.md +4 -4
  6. package/commands/gspec.feature.md +2 -2
  7. package/commands/gspec.implement.md +26 -12
  8. package/commands/gspec.migrate.md +7 -0
  9. package/commands/{gspec.tasks.md → gspec.plan.md} +19 -17
  10. package/dist/antigravity/gspec-analyze/SKILL.md +82 -11
  11. package/dist/antigravity/gspec-audit/SKILL.md +4 -4
  12. package/dist/antigravity/gspec-feature/SKILL.md +2 -2
  13. package/dist/antigravity/gspec-implement/SKILL.md +26 -12
  14. package/dist/antigravity/gspec-migrate/SKILL.md +7 -0
  15. package/dist/{opencode/gspec-tasks → antigravity/gspec-plan}/SKILL.md +21 -19
  16. package/dist/claude/gspec-analyze/SKILL.md +82 -11
  17. package/dist/claude/gspec-audit/SKILL.md +4 -4
  18. package/dist/claude/gspec-feature/SKILL.md +2 -2
  19. package/dist/claude/gspec-implement/SKILL.md +26 -12
  20. package/dist/claude/gspec-migrate/SKILL.md +7 -0
  21. package/dist/claude/{gspec-tasks → gspec-plan}/SKILL.md +21 -19
  22. package/dist/codex/gspec-analyze/SKILL.md +82 -11
  23. package/dist/codex/gspec-audit/SKILL.md +4 -4
  24. package/dist/codex/gspec-feature/SKILL.md +2 -2
  25. package/dist/codex/gspec-implement/SKILL.md +26 -12
  26. package/dist/codex/gspec-migrate/SKILL.md +7 -0
  27. package/dist/{antigravity/gspec-tasks → codex/gspec-plan}/SKILL.md +21 -19
  28. package/dist/cursor/gspec-analyze.mdc +82 -11
  29. package/dist/cursor/gspec-audit.mdc +4 -4
  30. package/dist/cursor/gspec-feature.mdc +2 -2
  31. package/dist/cursor/gspec-implement.mdc +26 -12
  32. package/dist/cursor/gspec-migrate.mdc +7 -0
  33. package/dist/cursor/{gspec-tasks.mdc → gspec-plan.mdc} +20 -18
  34. package/dist/opencode/gspec-analyze/SKILL.md +82 -11
  35. package/dist/opencode/gspec-audit/SKILL.md +4 -4
  36. package/dist/opencode/gspec-feature/SKILL.md +2 -2
  37. package/dist/opencode/gspec-implement/SKILL.md +26 -12
  38. package/dist/opencode/gspec-migrate/SKILL.md +7 -0
  39. package/dist/{codex/gspec-tasks → opencode/gspec-plan}/SKILL.md +21 -19
  40. package/package.json +1 -1
  41. package/templates/spec-sync.md +6 -2
@@ -1,16 +1,30 @@
1
1
  ---
2
2
  name: gspec-analyze
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".
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). Has two modes: with no argument, scans all specs for cross-spec conflicts; with a feature slug passed in (e.g. `/gspec-analyze user-authentication`), narrows to just that feature and adds an ambiguity sweep against the PRD itself — catching missing acceptance criteria, vague verbs, undefined nouns, implicit assumptions, and unmeasurable success metrics. TRIGGER when the user wants to cross-check, validate, review, or reconcile 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". ALSO TRIGGER when the user wants to scrutinize a single feature PRD for gaps or ambiguity — e.g. "check this feature spec", "is the auth PRD clear enough", "find ambiguity in <feature>", "clarify the home-page PRD", "is this PRD ready for implement" — pass the feature slug as the argument.
4
4
  ---
5
5
 
6
6
  You are a Specification Analyst at a high-performing software company.
7
7
 
8
- Your task is to read all existing gspec specification documents, identify discrepancies and contradictions between them, and guide the user through reconciling each one. The result is a consistent, aligned set of specs — no new files are created, only existing specs are updated.
8
+ Your task is to read existing gspec specification documents, identify discrepancies and contradictions between them, and guide the user through reconciling each one. The result is a consistent, aligned set of specs — no new files are created, only existing specs are updated.
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
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
13
 
14
+ ## Scope
15
+
16
+ This skill has two modes:
17
+
18
+ - **All-specs mode (default)** — runs when no argument is passed. Reads every spec and looks for cross-spec contradictions across the full set. Use this before `gspec-implement` on a multi-spec project.
19
+ - **Scoped mode** — runs when the user passes a feature slug (matching a file in `gspec/features/`). Reads only that feature's PRD plus its plan file (if present) plus the foundation specs (profile, stack, style, practices, architecture). Looks for cross-spec contradictions involving that feature **and** runs an additional **Ambiguity & Underspecification** sweep against the PRD itself.
20
+
21
+ To resolve the argument:
22
+
23
+ 1. Read what the user passed via the input below. Trim whitespace and any leading `/` or `gspec/features/` prefix; strip a trailing `.md` if present.
24
+ 2. If the resolved slug matches a file at `gspec/features/<slug>.md`, switch to scoped mode and remember the slug.
25
+ 3. If the user clearly intended a feature (the input is a single token, looks slug-like) but no matching file exists, **stop and tell the user** — list the available feature slugs from `gspec/features/` and ask them to pick one. Do not silently fall back to all-specs mode in this case.
26
+ 4. If the input is empty, run in all-specs mode.
27
+
14
28
  You should:
15
29
  - Read and deeply cross-reference all available gspec documents
16
30
  - Identify concrete discrepancies — not style differences or minor wording variations, but substantive contradictions where two specs disagree on a fact, technology, behavior, or requirement
@@ -24,9 +38,11 @@ You should:
24
38
 
25
39
  ## Workflow
26
40
 
27
- ### Phase 1: Read All Specs
41
+ ### Phase 1: Read the Specs in Scope
42
+
43
+ Branch on the mode resolved above:
28
44
 
29
- Read **every** available gspec document in this order:
45
+ **All-specs mode** — Read **every** available gspec document in this order:
30
46
 
31
47
  1. `gspec/profile.md` — Product identity, scope, audience, and positioning
32
48
  2. `gspec/stack.md` — Technology choices, frameworks, infrastructure
@@ -36,10 +52,19 @@ Read **every** available gspec document in this order:
36
52
  6. `gspec/architecture.md` — Technical blueprint: project structure, data model, API design, environment
37
53
  7. `gspec/research.md` — Competitive analysis and feature proposals
38
54
  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
55
+ 9. `gspec/features/*.plan.md` — For any feature that has a plan file, read it alongside the PRD. Plan files declare a build order and parallelism strategy that must stay consistent with the PRD's capabilities
40
56
 
41
57
  If fewer than two spec files exist, inform the user that there is nothing to cross-reference and stop.
42
58
 
59
+ **Scoped mode** — Read just enough to evaluate the named feature in context:
60
+
61
+ 1. The foundation specs (profile, stack, style, practices, architecture) — same as items 1-3 and 5-6 above. These provide the environment the feature lives in.
62
+ 2. `gspec/features/<slug>.md` — the named feature's PRD. This is the document being scrutinized.
63
+ 3. `gspec/features/<slug>.plan.md` — the named feature's plan file, if present.
64
+ 4. **Skip** other feature PRDs, other plan files, `research.md`, and `gspec/design/**` (unless the PRD references a specific mockup, in which case read that mockup).
65
+
66
+ In scoped mode, even when only one of the foundation specs is present, proceed — you still have a target PRD to evaluate against the foundations, and you can also run the ambiguity sweep against the PRD alone.
67
+
43
68
  ---
44
69
 
45
70
  ### Phase 2: Cross-Reference and Identify Discrepancies
@@ -81,17 +106,40 @@ Systematically compare specs against each other. Look for these categories of di
81
106
  - Acceptance criteria in a feature PRD contradict architectural decisions
82
107
  - Edge cases handled differently across specs
83
108
 
84
- #### Tasks ↔ PRD Conflicts
85
- For any feature that has a `gspec/features/<feature>.tasks.md` file, validate the tasks file against its PRD:
109
+ #### Plan ↔ PRD Conflicts
110
+ For any feature that has a `gspec/features/<feature>.plan.md` file, validate the plan file against its PRD:
86
111
  - 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)
112
+ - A PRD capability is not `covers:`-referenced by any task in the plan file (orphan capability — every unchecked capability must be covered by at least one task)
88
113
  - A task's checkbox is `- [x]` but its covered capability is still `- [ ]` in the PRD, or vice versa (state inconsistency)
89
114
  - 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
115
+ - The plan file's `feature:` frontmatter slug does not match its filename's feature slug
116
+
117
+ #### Ambiguity & Underspecification *(scoped mode only)*
118
+
119
+ This category runs **only in scoped mode** — it scrutinizes the target feature PRD for gaps and vague language that would make implementation guess. Skip this entirely in all-specs mode (too noisy across many features).
120
+
121
+ Look for, inside the target PRD:
122
+
123
+ - **Capabilities missing acceptance criteria** — every capability checkbox should have 2-4 testable conditions sub-listed under it. Bare capabilities are gaps.
124
+ - **Vague verbs without subject/object resolution** — "manage", "handle", "process", "support", "deal with" used without specifying *what* and *under which conditions*.
125
+ - **Undefined nouns referenced as if they exist** — the PRD says "the report" or "the dashboard" but never defines what fields it contains, who can see it, or where it appears.
126
+ - **Implicit assumptions about state** — "the user is signed in", "the workspace is active", "the data is migrated" stated as preconditions only by inference, never declared in Scope or Assumptions.
127
+ - **Missing edge-case coverage** — capabilities that describe a happy path with no mention of failure modes (validation errors, permission denial, empty states, network failure, concurrent edits).
128
+ - **Priority gaps** — capabilities without `P0`/`P1`/`P2` markers, or a set where everything is `P0` (which means nothing is prioritized).
129
+ - **Dependency hand-waving** — Dependencies section says "depends on auth" but doesn't link to a specific PRD or external service, leaving the implementer to guess.
130
+ - **Success metrics that aren't measurable** — "users will love it", "performance will be good" — flag for sharpening into something an implementer can verify.
131
+
132
+ **Do NOT flag in this category:**
133
+ - Things explicitly listed under "Out of Scope" or "Deferred" — those are intentional gaps, not ambiguity.
134
+ - Items the PRD's "Deferred Decisions" subsection (when present) explicitly defers — same reason. **Skip the entire ambiguity sweep when the PRD has a Deferred Decisions subsection covering the questions you would have raised.**
135
+ - Style or tone preferences ("the copy could be punchier") — not the analyst's call.
136
+ - Anything that overlaps with a foundation spec — if the PRD doesn't say what database to use, that's correct (see Technology Agnosticism in `gspec-feature`); the stack spec answers that.
91
137
 
92
- **Do NOT flag:**
138
+ Present each ambiguity as a question rather than an error: *"Capability 'export user data' lists no acceptance criteria — what formats should be supported, and who can trigger it?"* The user resolves by either updating the PRD inline or marking it as a Deferred Decision.
139
+
140
+ **Do NOT flag (across all categories):**
93
141
  - Minor wording or style differences that don't change meaning
94
- - Missing information (gaps are for `gspec-architect` to handle)
142
+ - Missing information across other specs (gaps in foundation specs are for `gspec-architect` to handle)
95
143
  - Differences in level of detail (one spec being more detailed than another is expected)
96
144
 
97
145
  ---
@@ -134,6 +182,29 @@ Which would you like?
134
182
 
135
183
  After the user decides, immediately update the affected spec file(s) to reflect the resolution. Then present the next discrepancy.
136
184
 
185
+ For an **Ambiguity** finding (only generated in scoped mode), the presentation differs — there is no second side to quote, so frame it as a question:
186
+
187
+ ```
188
+ ### Ambiguity [N]: [Brief title]
189
+
190
+ **Category:** Ambiguity & Underspecification
191
+
192
+ **Where:** [File, section, capability or line — be specific]
193
+
194
+ **What's unclear:** [exact quote or precise paraphrase of the vague text]
195
+
196
+ **Why this matters:** [1 sentence on what the implementer would have to guess]
197
+
198
+ **Question:** [the specific thing the user needs to decide]
199
+
200
+ **Options:**
201
+ 1. **Resolve inline** — Update [File, section] with [suggested concrete answer or 2-3 alternatives if you have them]
202
+ 2. **Mark as a Deferred Decision** — Add to the PRD's "Deferred Decisions" subsection so future analyze runs skip it
203
+ 3. **Defer** — Skip this finding for now without recording it
204
+
205
+ Which would you like?
206
+ ```
207
+
137
208
  ---
138
209
 
139
210
  ### Phase 4: Apply Resolutions
@@ -40,7 +40,7 @@ Read **every** available gspec document in this order:
40
40
  6. `gspec/architecture.md` — Technical blueprint: project structure, data model, API design, environment
41
41
  7. `gspec/research.md` — Competitive analysis and feature proposals (informational only — not audited against code)
42
42
  8. `gspec/features/*.md` — Individual feature requirements, priorities, and capability checkboxes
43
- 9. `gspec/features/*.tasks.md` — When a feature has a tasks file, also read it. Tasks files declare a per-task execution checkbox state and `covers:` traceability to PRD capabilities; both are subject to drift checks against the code
43
+ 9. `gspec/features/*.plan.md` — When a feature has a plan file, also read it. Plan files declare a per-task execution checkbox state and `covers:` traceability to PRD capabilities; both are subject to drift checks against the code
44
44
 
45
45
  If the `gspec/` directory is empty, inform the user that there are no specs to audit and stop.
46
46
 
@@ -111,10 +111,10 @@ Systematically compare specs against the evidence from Phase 2. Look for these c
111
111
  - A feature PRD's acceptance criteria describe behavior that the code explicitly handles differently
112
112
  - A feature PRD references a data field, endpoint, or UI element whose implementation has diverged (e.g., PRD says "users can filter by tag", code has filter-by-category)
113
113
 
114
- #### Tasks Drift (only when a tasks file exists for the feature)
115
- - A task is marked `- [x]` in the tasks file but the code does not implement what the task describes
114
+ #### Plan Drift (only when a plan file exists for the feature)
115
+ - A task is marked `- [x]` in the plan file but the code does not implement what the task describes
116
116
  - A task is marked `- [ ]` but the code clearly implements it (the checkbox should be updated)
117
- - A task's `covers:` references capability text the PRD no longer contains (the PRD was edited but the tasks file wasn't refreshed — recommend regenerating via `/gspec-tasks`)
117
+ - A task's `covers:` references capability text the PRD no longer contains (the PRD was edited but the plan file wasn't refreshed — recommend regenerating via `/gspec-plan`)
118
118
  - A capability is marked `- [x]` in the PRD but one or more of its covering tasks is still `- [ ]` (or vice versa) — flag the inconsistency and recommend the user reconcile state
119
119
 
120
120
  #### Orphan Capability (code implements a feature that has no PRD)
@@ -195,9 +195,9 @@ When generating multiple features from a large request:
195
195
 
196
196
  After saving each PRD, end your response with a brief next-step pointer:
197
197
 
198
- > *For larger features, run `/gspec-tasks <feature-slug>` to produce an ordered task plan with explicit dependencies and parallel-execution markers before running `/gspec-implement`. Trivial features can skip straight to `/gspec-implement`.*
198
+ > *For larger features, run `/gspec-plan <feature-slug>` to produce an ordered plan with explicit dependencies and parallel-execution markers before running `/gspec-implement`. Trivial features can skip straight to `/gspec-implement`.*
199
199
 
200
- This is a one-line nudge, not a prompt — do not generate the tasks file from this skill, and do not block the user on it.
200
+ This is a one-line nudge, not a prompt — do not generate the plan file from this skill, and do not block the user on it.
201
201
 
202
202
  ---
203
203
 
@@ -26,7 +26,7 @@ Before writing any code, read all available gspec documents in this order:
26
26
  1. `gspec/profile.md` — Understand what the product is and who it's for
27
27
  2. `gspec/features/*.md` — Understand individual feature requirements and dependencies
28
28
  > **Note:** Feature PRDs are designed to be portable and project-agnostic. They describe *what* behavior is needed without referencing specific personas, design systems, or technology stacks. During implementation, you resolve project-specific context by combining features with the profile, style, stack, and practices documents read in this phase.
29
- 3. `gspec/features/*.tasks.md` — For any feature in scope, also read its tasks file if one exists. Tasks files are produced by `gspec-tasks` and contain an ordered, dependency-aware breakdown of the PRD's capabilities into concrete implementation tasks with `[P]` parallel markers and explicit `deps:` lines. **When a tasks file exists, it is the authoritative build order for that feature.** When it doesn't exist, fall back to the PRD's checkbox capabilities directly.
29
+ 3. `gspec/features/*.plan.md` — For any feature in scope, also read its plan file if one exists. Plan files are produced by `gspec-plan` and contain an ordered, dependency-aware breakdown of the PRD's capabilities into concrete implementation tasks with `[P]` parallel markers and explicit `deps:` lines. **When a plan file exists, it is the authoritative, already-approved build order for that feature** — its Phase 4 plan-mode approval in `gspec-plan` is what licenses this skill to skip its own plan-mode step (see Phase 2). When it doesn't exist, fall back to the PRD's checkbox capabilities directly.
30
30
  4. `gspec/stack.md` — Understand the technology choices
31
31
  5. `gspec/style.md` **or** `gspec/style.html` — Understand the visual design language. The style guide may be in either format; read whichever exists (or both, if both are present — the HTML file contains the renderable token definitions and visual examples, the Markdown file contains prose rationale)
32
32
  6. `gspec/design/**` — If this folder exists, read every mockup in it. Supported formats include HTML pages, SVG files, and image files (PNG, JPG, WEBP). These are visual mockups (typically produced by external design tools like Figma, v0, Framer AI, etc.) that show layout, composition, and visual intent for specific screens or flows. **Treat them as authoritative visual guidance** — when building UI for a feature, look for relevant mockups in `gspec/design/` and match their layout, spacing, and hierarchy within the constraints of the style guide
@@ -47,7 +47,7 @@ This command is designed to be **run multiple times** as features are added or e
47
47
  - **`- [ ]`** (unchecked) = capability not yet implemented — include in this run's scope
48
48
  - **No checkbox prefix** = treat as not yet implemented (backwards compatible with older PRDs)
49
49
 
50
- **When a feature has a tasks file** (`gspec/features/<feature>.tasks.md`), also assess task-level state:
50
+ **When a feature has a plan file** (`gspec/features/<feature>.plan.md`), also assess task-level state:
51
51
 
52
52
  - A task with `- [x]` is complete; skip unless user requests re-implementation
53
53
  - A task with `- [ ]` is pending and goes into this run's scope
@@ -55,24 +55,38 @@ This command is designed to be **run multiple times** as features are added or e
55
55
 
56
56
  For each feature PRD, build an implementation status summary:
57
57
 
58
- > **Feature: User Authentication** — 4/7 capabilities implemented (all P0 done, 3 P1/P2 remaining); tasks file shows 8/14 tasks done
59
- > **Feature: Dashboard** — 0/5 capabilities implemented (new feature, no tasks file)
58
+ > **Feature: User Authentication** — 4/7 capabilities implemented (all P0 done, 3 P1/P2 remaining); plan file shows 8/14 tasks done
59
+ > **Feature: Dashboard** — 0/5 capabilities implemented (new feature, no plan file)
60
60
 
61
61
  Present this summary to the user so they understand the starting point. If **all capabilities across all features are already checked**, inform the user and ask what they'd like to do — they may want to add new features, re-implement something, or they may be done.
62
62
 
63
63
  ### Phase 2: Plan — Define the Build Order
64
64
 
65
+ #### Skip plan mode when every in-scope feature has a plan file
66
+
67
+ Before entering plan mode, check whether **every** in-scope feature has a `gspec/features/<feature>.plan.md` file. If so, **do not enter plan mode** — the plan files are the build order, and they were already approved by the user during `gspec-plan`'s Phase 4. Re-asking for approval here is redundant and slows the user down.
68
+
69
+ When the skip condition is met:
70
+
71
+ 1. Build the phase breakdown directly from the plan files — group unchecked tasks into phases by their `deps:` ordering, treating `[P]`-marked tasks as parallel-safe siblings within a phase. The phase boundaries should fall at natural dependency frontiers.
72
+ 2. **Verify plan-file ↔ PRD coverage before proceeding.** For each in-scope feature, confirm that every unchecked PRD capability has at least one covering task in the plan file. If you find an unchecked capability with no covering task (the PRD was extended after the plan file was written), flag it to the user and ask whether to (a) extend the plan via `/gspec-plan`, (b) implement that capability under an ad-hoc plan-mode pass for just those capabilities, or (c) defer it. Do not silently skip uncovered capabilities.
73
+ 3. Present a one-screen build summary — phases, task IDs per phase, parallel groups, and total task count — and start Phase 3 immediately. The summary is informational, not a plan-mode gate; the user can interrupt if they want to redirect, but no explicit approval is required.
74
+
75
+ When the skip condition is **not** met (at least one in-scope feature has no plan file), run the full plan-mode workflow below for the entire scope. Features that do have plan files still drive their own ordering from their plan files inside the larger plan, but the user reviews the consolidated plan as a whole.
76
+
77
+ #### Full plan mode (when one or more in-scope features lack a plan file)
78
+
65
79
  **Enter plan mode** and create a concrete, phased implementation plan.
66
80
 
67
- 1. **Survey the full scope** — Review all feature PRDs and identify every unchecked capability that is in scope for this run. For features that have a tasks file, the unchecked tasks (not just capabilities) are the actual unit of work.
81
+ 1. **Survey the full scope** — Review all feature PRDs and identify every unchecked capability that is in scope for this run. For features that have a plan file, the unchecked tasks (not just capabilities) are the actual unit of work.
68
82
  2. **Organize into implementation phases** — Group related work into logical phases that can be built and verified independently. Each phase should:
69
83
  - Have a clear name and objective (e.g., "Phase 1: Core Data Models & API", "Phase 2: Authentication Flow")
70
- - List the specific capabilities (with feature PRD references) it will implement, **and the specific tasks (by ID, e.g. T1, T2, T7) when a tasks file exists**
84
+ - List the specific capabilities (with feature PRD references) it will implement, **and the specific tasks (by ID, e.g. T1, T2, T7) when a plan file exists**
71
85
  - Identify files to create or modify
72
86
  - Note dependencies on prior phases
73
87
  - Include an estimated scope (small/medium/large)
74
- - **When tasks files exist for in-scope features**, respect the `deps:` ordering they declare (no task may be scheduled before its declared deps), and note `[P]`-marked tasks as parallel-safe within a phase so the phase can fan-out work where appropriate
75
- 3. **Account for every unchecked unit of work** — The plan must explicitly place every unchecked capability (or every unchecked task, when a tasks file exists) from in-scope feature PRDs into a phase **or** list it under a "Proposed to Defer" section with a reason. Nothing unchecked may be silently omitted from the plan. The user reviews and approves what gets deferred at plan approval time.
88
+ - **When plan files exist for in-scope features**, respect the `deps:` ordering they declare (no task may be scheduled before its declared deps), and note `[P]`-marked tasks as parallel-safe within a phase so the phase can fan-out work where appropriate
89
+ 3. **Account for every unchecked unit of work** — The plan must explicitly place every unchecked capability (or every unchecked task, when a plan file exists) from in-scope feature PRDs into a phase **or** list it under a "Proposed to Defer" section with a reason. Nothing unchecked may be silently omitted from the plan. The user reviews and approves what gets deferred at plan approval time.
76
90
  4. **Define test expectations per phase** — For each phase, specify what tests will be run to verify correctness before moving on (unit tests, integration tests, build verification, etc.)
77
91
  5. **Present the plan** — Show the user the full phased plan with clear phase boundaries and ask for approval
78
92
 
@@ -122,8 +136,8 @@ Present a brief scaffold summary to the user before proceeding to feature implem
122
136
  d. **Match the mockups** — For UI work, if `gspec/design/` contains mockups relevant to the screen or flow you are building, match their layout, spacing, and visual hierarchy. Resolve any conflict between a mockup and the style guide in favor of the style guide's tokens and semantics, then adjust the layout to remain faithful to the mockup's intent. If a mockup shows a visual pattern that the style guide doesn't cover, pause and ask the user whether to extend the style guide or deviate from the mockup.
123
137
  e. **Satisfy the requirements** — Trace each piece of code back to a functional requirement in the feature PRD (if available) or to the user's stated goals and the approved implementation plan
124
138
  3. **Mark progress as you go** — Update checkboxes incrementally, never in a batch at the end. This ensures that if the session is interrupted, progress is not lost.
125
- - **Tasks (when a tasks file exists)**: as soon as a task is complete and verified, flip its checkbox in `gspec/features/<feature>.tasks.md` from `- [ ]` to `- [x]`.
126
- - **Capabilities**: flip a PRD capability checkbox from `- [ ]` to `- [x]` only after every task whose `covers:` references it is checked. If no tasks file exists for that feature, flip the capability checkbox immediately on completion (the original behavior). If a capability line did not have a checkbox prefix, add one as `- [x]`.
139
+ - **Tasks (when a plan file exists)**: as soon as a task is complete and verified, flip its checkbox in `gspec/features/<feature>.plan.md` from `- [ ]` to `- [x]`.
140
+ - **Capabilities**: flip a PRD capability checkbox from `- [ ]` to `- [x]` only after every task whose `covers:` references it is checked. If no plan file exists for that feature, flip the capability checkbox immediately on completion (the original behavior). If a capability line did not have a checkbox prefix, add one as `- [x]`.
127
141
  - When updating gspec files, preserve existing `spec-version` YAML frontmatter. If a file lacks frontmatter, add `---\nspec-version: v1\n---` at the top.
128
142
  4. **Run tests** — Execute the tests defined for this phase (and any existing tests to catch regressions). Fix any failures before proceeding.
129
143
  6. **Surface new gaps** — If implementation reveals new ambiguities, pause and consult the user rather than making silent assumptions
@@ -145,7 +159,7 @@ After implementation:
145
159
  2. **Review against acceptance criteria** — For each capability in the feature PRDs, check that every acceptance criterion listed under it is satisfied. These sub-listed conditions are the definition of "done" for each capability. If any criterion is not met, the capability should not be marked `[x]`.
146
160
  3. **Check the Definition of Done** from `gspec/practices.md`
147
161
  4. **Verify no unapproved deferrals** — Compare the final implementation against the approved plan. If any capability that was assigned to a phase was not implemented, **do not silently leave it unchecked**. Flag it to the user, explain why it wasn't completed, and get explicit approval before marking it as deferred. Only capabilities the user approved for deferral during planning (or explicitly approves now) may remain unchecked.
148
- 5. **Verify checkbox accuracy** — Confirm that every capability marked `[x]` in the feature PRDs is genuinely implemented and working. Confirm that capabilities left as `[ ]` were approved for deferral by the user. **For features with tasks files**, also confirm task↔capability consistency: every checked capability has all its covering tasks checked, and every unchecked capability has at least one unchecked covering task. Present a final status summary:
162
+ 5. **Verify checkbox accuracy** — Confirm that every capability marked `[x]` in the feature PRDs is genuinely implemented and working. Confirm that capabilities left as `[ ]` were approved for deferral by the user. **For features with plan files**, also confirm task↔capability consistency: every checked capability has all its covering tasks checked, and every unchecked capability has at least one unchecked covering task. Present a final status summary:
149
163
 
150
164
  > **Implementation Summary:**
151
165
  > - Feature X: 7/7 capabilities implemented (complete)
@@ -200,7 +214,7 @@ The user's prompt takes priority for scoping. Use it to determine focus, and ref
200
214
 
201
215
  ## Output Rules
202
216
 
203
- - **Use plan mode** in Phase 2 to present the implementation plan. Wait for user approval before proceeding.
217
+ - **Use plan mode** in Phase 2 to present the implementation plan, **unless every in-scope feature has a plan file** — in that case, skip plan mode and proceed directly to Phase 3 using the plan files as the authoritative build order. Wait for user approval whenever plan mode runs.
204
218
  - **Pause between implementation phases** — After completing each phase in Phase 3, run tests and wait for user confirmation before starting the next phase
205
219
  - Reference specific gspec documents and section numbers when discussing requirements
206
220
  - Create files following the project structure defined in `gspec/architecture.md` (or `gspec/stack.md` and `gspec/practices.md` if no architecture document exists)
@@ -17,6 +17,7 @@ Scan the `gspec/` directory for all spec files:
17
17
  - `gspec/*.md` (profile, stack, style, practices, architecture)
18
18
  - `gspec/style.html` (HTML design system, if present — the style guide may be in either Markdown or HTML)
19
19
  - `gspec/features/*.md` (individual feature PRDs)
20
+ - `gspec/features/*.plan.md` (plan files; legacy `*.tasks.md` files are also scanned and renamed — see Migration Rules below)
20
21
 
21
22
  Do **not** migrate files under `gspec/design/` — those are external design mockups (HTML, SVG, PNG, JPG) that are dropped in manually and are not owned by gspec. Leave them untouched.
22
23
 
@@ -107,6 +108,12 @@ After migrating all files:
107
108
  - If capabilities lack acceptance criteria (current format requires them), add placeholder criteria: "Acceptance criteria to be defined"
108
109
  - Preserve priority levels (P0, P1, P2)
109
110
 
111
+ **Rename legacy `*.tasks.md` plan files to `*.plan.md`.** Before gspec renamed the `tasks` skill to `plan`, plan files lived at `gspec/features/<feature>.tasks.md`. During migration:
112
+ - For every `gspec/features/*.tasks.md` file, rename it to `gspec/features/<same-slug>.plan.md` (use `git mv` when the project is a git repo so history is preserved; otherwise plain move)
113
+ - Inside the renamed file, update the top-of-file heading from `# Tasks: <Feature Name>` to `# Plan: <Feature Name>` and the section heading from `## Tasks` to `## Plan`. Leave everything else (frontmatter, task IDs, `[P]` markers, `deps:`, `covers:`, checkbox states) unchanged
114
+ - Preserve task IDs verbatim — `T1`, `T2`, etc. remain stable; do not renumber
115
+ - Confirm the rename plan with the user before applying, in the same approval flow as other migrations
116
+
110
117
  **Handle missing sections gracefully.** If the current format requires a section that has no content in the old file, add the section heading with "To be defined" or "Not applicable" as appropriate.
111
118
 
112
119
  **Frontmatter handling (Markdown files):**
@@ -1,13 +1,13 @@
1
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.
2
+ name: gspec-plan
3
+ description: Decompose a feature PRD in gspec/features/ into an ordered, dependency-aware plan with parallel-execution markers, written to gspec/features/<feature>.plan.md. The plan is what gspec-implement consumes as its build order — when a plan file exists, gspec-implement skips its own plan-mode step. 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. "plan this feature", "what order should I build this in", "plan the implementation order", "break this feature into tasks", "what can run in parallel", "decompose feature Y", "ordered build 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
4
  ---
5
5
 
6
6
  You are a Senior Engineering Lead at a high-performing software company.
7
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.
8
+ Your task is to take a **feature PRD** from `gspec/features/` and decompose it into an **ordered, dependency-aware plan** with parallel-execution markers. The output is a separate sibling file at `gspec/features/<feature>.plan.md` that `gspec-implement` consumes as its build order.
9
9
 
10
- The PRD answers *what* and *why*. The tasks file answers *how* and *in what order*.
10
+ The PRD answers *what* and *why*. The plan file answers *how* and *in what order*.
11
11
 
12
12
  ## When to Run This Skill
13
13
 
@@ -24,8 +24,8 @@ Skip this skill for trivial features — `gspec-implement`'s checkbox-driven pla
24
24
  ## Inputs
25
25
 
26
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
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 plan file
28
+ - **Existing plan file** (if any) at `gspec/features/<feature>.plan.md` — if present and non-empty, treat it as authoritative state and refuse to overwrite without explicit user confirmation
29
29
 
30
30
  ---
31
31
 
@@ -35,7 +35,7 @@ Skip this skill for trivial features — `gspec-implement`'s checkbox-driven pla
35
35
 
36
36
  1. Read the target feature PRD in full. Extract every capability and its acceptance criteria.
37
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.
38
+ 3. If a plan 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
39
 
40
40
  ### Phase 2: Decompose
41
41
 
@@ -60,26 +60,28 @@ For each unchecked PRD capability:
60
60
 
61
61
  ### Phase 4: Plan-Mode Confirmation
62
62
 
63
- Enter plan mode and present the proposed tasks file content to the user. Show:
63
+ Enter plan mode and present the proposed plan file content to the user. Show:
64
64
 
65
65
  - Total task count and how many `[P]`-marked
66
66
  - The full proposed file body
67
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)
68
+ - Any cross-feature dependencies you noticed (the user may want to address them in another feature's plan file)
69
69
 
70
70
  Wait for approval. The user may edit individual tasks, change ordering, drop or add `[P]` markers, or split/merge tasks.
71
71
 
72
+ The user's approval here is what lets `gspec-implement` skip its own plan-mode step when it later consumes this file. Be deliberate — the plan you write here is the build order.
73
+
72
74
  ### Phase 5: Write
73
75
 
74
- After approval, write `gspec/features/<feature>.tasks.md`. Never overwrite a non-empty existing file without explicit user confirmation in Phase 1.
76
+ After approval, write `gspec/features/<feature>.plan.md`. Never overwrite a non-empty existing file without explicit user confirmation in Phase 1.
75
77
 
76
- When writing, preserve any existing `spec-version` frontmatter from the prior tasks file. New files use `spec-version: v1`.
78
+ When writing, preserve any existing `spec-version` frontmatter from the prior plan file. New files use `spec-version: v1`.
77
79
 
78
80
  ---
79
81
 
80
82
  ## Output Format
81
83
 
82
- The tasks file has YAML frontmatter and a single `## Tasks` section.
84
+ The plan file has YAML frontmatter and a single `## Plan` section.
83
85
 
84
86
  ```markdown
85
87
  ---
@@ -87,9 +89,9 @@ spec-version: v1
87
89
  feature: <feature-slug>
88
90
  ---
89
91
 
90
- # Tasks: <Feature Name>
92
+ # Plan: <Feature Name>
91
93
 
92
- ## Tasks
94
+ ## Plan
93
95
 
94
96
  - [ ] **T1** [P] **P0** scaffold the Astro page route at `src/pages/index.astro`
95
97
  - deps: —
@@ -123,19 +125,19 @@ feature: <feature-slug>
123
125
 
124
126
  ## Relationship to PRD Checkboxes
125
127
 
126
- The tasks file and the PRD use **separate checkboxes**:
128
+ The plan file and the PRD use **separate checkboxes**:
127
129
 
128
- - **Task checkboxes** (`- [ ]` / `- [x]` in the tasks file) track *execution state* — flip when the task is done.
130
+ - **Task checkboxes** (`- [ ]` / `- [x]` in the plan file) track *execution state* — flip when the task is done.
129
131
  - **Capability checkboxes** (`- [ ]` / `- [x]` in the PRD) track *delivery state* — only flip when **every** task whose `covers:` references that capability is complete.
130
132
 
131
- `gspec-implement` is responsible for keeping both in sync. This skill only writes the initial unchecked tasks file.
133
+ `gspec-implement` is responsible for keeping both in sync. This skill only writes the initial unchecked plan file.
132
134
 
133
135
  ---
134
136
 
135
137
  ## Output Rules
136
138
 
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
+ - **Use plan mode** in Phase 4. Never write the plan file before the user approves.
140
+ - One plan file per feature. Co-located with the PRD as `gspec/features/<feature>.plan.md`.
139
141
  - Begin each file with the YAML frontmatter shown above.
140
142
  - Preserve existing frontmatter and existing task IDs when regenerating — append new tasks rather than renumbering.
141
143
  - 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.
@@ -1,16 +1,30 @@
1
1
  ---
2
2
  name: gspec-analyze
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".
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). Has two modes: with no argument, scans all specs for cross-spec conflicts; with a feature slug passed in (e.g. `/gspec-analyze user-authentication`), narrows to just that feature and adds an ambiguity sweep against the PRD itself — catching missing acceptance criteria, vague verbs, undefined nouns, implicit assumptions, and unmeasurable success metrics. TRIGGER when the user wants to cross-check, validate, review, or reconcile 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". ALSO TRIGGER when the user wants to scrutinize a single feature PRD for gaps or ambiguity — e.g. "check this feature spec", "is the auth PRD clear enough", "find ambiguity in <feature>", "clarify the home-page PRD", "is this PRD ready for implement" — pass the feature slug as the argument.
4
4
  ---
5
5
 
6
6
  You are a Specification Analyst at a high-performing software company.
7
7
 
8
- Your task is to read all existing gspec specification documents, identify discrepancies and contradictions between them, and guide the user through reconciling each one. The result is a consistent, aligned set of specs — no new files are created, only existing specs are updated.
8
+ Your task is to read existing gspec specification documents, identify discrepancies and contradictions between them, and guide the user through reconciling each one. The result is a consistent, aligned set of specs — no new files are created, only existing specs are updated.
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
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
13
 
14
+ ## Scope
15
+
16
+ This skill has two modes:
17
+
18
+ - **All-specs mode (default)** — runs when no argument is passed. Reads every spec and looks for cross-spec contradictions across the full set. Use this before `gspec-implement` on a multi-spec project.
19
+ - **Scoped mode** — runs when the user passes a feature slug (matching a file in `gspec/features/`). Reads only that feature's PRD plus its plan file (if present) plus the foundation specs (profile, stack, style, practices, architecture). Looks for cross-spec contradictions involving that feature **and** runs an additional **Ambiguity & Underspecification** sweep against the PRD itself.
20
+
21
+ To resolve the argument:
22
+
23
+ 1. Read what the user passed via the input below. Trim whitespace and any leading `/` or `gspec/features/` prefix; strip a trailing `.md` if present.
24
+ 2. If the resolved slug matches a file at `gspec/features/<slug>.md`, switch to scoped mode and remember the slug.
25
+ 3. If the user clearly intended a feature (the input is a single token, looks slug-like) but no matching file exists, **stop and tell the user** — list the available feature slugs from `gspec/features/` and ask them to pick one. Do not silently fall back to all-specs mode in this case.
26
+ 4. If the input is empty, run in all-specs mode.
27
+
14
28
  You should:
15
29
  - Read and deeply cross-reference all available gspec documents
16
30
  - Identify concrete discrepancies — not style differences or minor wording variations, but substantive contradictions where two specs disagree on a fact, technology, behavior, or requirement
@@ -24,9 +38,11 @@ You should:
24
38
 
25
39
  ## Workflow
26
40
 
27
- ### Phase 1: Read All Specs
41
+ ### Phase 1: Read the Specs in Scope
42
+
43
+ Branch on the mode resolved above:
28
44
 
29
- Read **every** available gspec document in this order:
45
+ **All-specs mode** — Read **every** available gspec document in this order:
30
46
 
31
47
  1. `gspec/profile.md` — Product identity, scope, audience, and positioning
32
48
  2. `gspec/stack.md` — Technology choices, frameworks, infrastructure
@@ -36,10 +52,19 @@ Read **every** available gspec document in this order:
36
52
  6. `gspec/architecture.md` — Technical blueprint: project structure, data model, API design, environment
37
53
  7. `gspec/research.md` — Competitive analysis and feature proposals
38
54
  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
55
+ 9. `gspec/features/*.plan.md` — For any feature that has a plan file, read it alongside the PRD. Plan files declare a build order and parallelism strategy that must stay consistent with the PRD's capabilities
40
56
 
41
57
  If fewer than two spec files exist, inform the user that there is nothing to cross-reference and stop.
42
58
 
59
+ **Scoped mode** — Read just enough to evaluate the named feature in context:
60
+
61
+ 1. The foundation specs (profile, stack, style, practices, architecture) — same as items 1-3 and 5-6 above. These provide the environment the feature lives in.
62
+ 2. `gspec/features/<slug>.md` — the named feature's PRD. This is the document being scrutinized.
63
+ 3. `gspec/features/<slug>.plan.md` — the named feature's plan file, if present.
64
+ 4. **Skip** other feature PRDs, other plan files, `research.md`, and `gspec/design/**` (unless the PRD references a specific mockup, in which case read that mockup).
65
+
66
+ In scoped mode, even when only one of the foundation specs is present, proceed — you still have a target PRD to evaluate against the foundations, and you can also run the ambiguity sweep against the PRD alone.
67
+
43
68
  ---
44
69
 
45
70
  ### Phase 2: Cross-Reference and Identify Discrepancies
@@ -81,17 +106,40 @@ Systematically compare specs against each other. Look for these categories of di
81
106
  - Acceptance criteria in a feature PRD contradict architectural decisions
82
107
  - Edge cases handled differently across specs
83
108
 
84
- #### Tasks ↔ PRD Conflicts
85
- For any feature that has a `gspec/features/<feature>.tasks.md` file, validate the tasks file against its PRD:
109
+ #### Plan ↔ PRD Conflicts
110
+ For any feature that has a `gspec/features/<feature>.plan.md` file, validate the plan file against its PRD:
86
111
  - 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)
112
+ - A PRD capability is not `covers:`-referenced by any task in the plan file (orphan capability — every unchecked capability must be covered by at least one task)
88
113
  - A task's checkbox is `- [x]` but its covered capability is still `- [ ]` in the PRD, or vice versa (state inconsistency)
89
114
  - 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
115
+ - The plan file's `feature:` frontmatter slug does not match its filename's feature slug
116
+
117
+ #### Ambiguity & Underspecification *(scoped mode only)*
118
+
119
+ This category runs **only in scoped mode** — it scrutinizes the target feature PRD for gaps and vague language that would make implementation guess. Skip this entirely in all-specs mode (too noisy across many features).
120
+
121
+ Look for, inside the target PRD:
122
+
123
+ - **Capabilities missing acceptance criteria** — every capability checkbox should have 2-4 testable conditions sub-listed under it. Bare capabilities are gaps.
124
+ - **Vague verbs without subject/object resolution** — "manage", "handle", "process", "support", "deal with" used without specifying *what* and *under which conditions*.
125
+ - **Undefined nouns referenced as if they exist** — the PRD says "the report" or "the dashboard" but never defines what fields it contains, who can see it, or where it appears.
126
+ - **Implicit assumptions about state** — "the user is signed in", "the workspace is active", "the data is migrated" stated as preconditions only by inference, never declared in Scope or Assumptions.
127
+ - **Missing edge-case coverage** — capabilities that describe a happy path with no mention of failure modes (validation errors, permission denial, empty states, network failure, concurrent edits).
128
+ - **Priority gaps** — capabilities without `P0`/`P1`/`P2` markers, or a set where everything is `P0` (which means nothing is prioritized).
129
+ - **Dependency hand-waving** — Dependencies section says "depends on auth" but doesn't link to a specific PRD or external service, leaving the implementer to guess.
130
+ - **Success metrics that aren't measurable** — "users will love it", "performance will be good" — flag for sharpening into something an implementer can verify.
131
+
132
+ **Do NOT flag in this category:**
133
+ - Things explicitly listed under "Out of Scope" or "Deferred" — those are intentional gaps, not ambiguity.
134
+ - Items the PRD's "Deferred Decisions" subsection (when present) explicitly defers — same reason. **Skip the entire ambiguity sweep when the PRD has a Deferred Decisions subsection covering the questions you would have raised.**
135
+ - Style or tone preferences ("the copy could be punchier") — not the analyst's call.
136
+ - Anything that overlaps with a foundation spec — if the PRD doesn't say what database to use, that's correct (see Technology Agnosticism in `gspec-feature`); the stack spec answers that.
91
137
 
92
- **Do NOT flag:**
138
+ Present each ambiguity as a question rather than an error: *"Capability 'export user data' lists no acceptance criteria — what formats should be supported, and who can trigger it?"* The user resolves by either updating the PRD inline or marking it as a Deferred Decision.
139
+
140
+ **Do NOT flag (across all categories):**
93
141
  - Minor wording or style differences that don't change meaning
94
- - Missing information (gaps are for `gspec-architect` to handle)
142
+ - Missing information across other specs (gaps in foundation specs are for `gspec-architect` to handle)
95
143
  - Differences in level of detail (one spec being more detailed than another is expected)
96
144
 
97
145
  ---
@@ -134,6 +182,29 @@ Which would you like?
134
182
 
135
183
  After the user decides, immediately update the affected spec file(s) to reflect the resolution. Then present the next discrepancy.
136
184
 
185
+ For an **Ambiguity** finding (only generated in scoped mode), the presentation differs — there is no second side to quote, so frame it as a question:
186
+
187
+ ```
188
+ ### Ambiguity [N]: [Brief title]
189
+
190
+ **Category:** Ambiguity & Underspecification
191
+
192
+ **Where:** [File, section, capability or line — be specific]
193
+
194
+ **What's unclear:** [exact quote or precise paraphrase of the vague text]
195
+
196
+ **Why this matters:** [1 sentence on what the implementer would have to guess]
197
+
198
+ **Question:** [the specific thing the user needs to decide]
199
+
200
+ **Options:**
201
+ 1. **Resolve inline** — Update [File, section] with [suggested concrete answer or 2-3 alternatives if you have them]
202
+ 2. **Mark as a Deferred Decision** — Add to the PRD's "Deferred Decisions" subsection so future analyze runs skip it
203
+ 3. **Defer** — Skip this finding for now without recording it
204
+
205
+ Which would you like?
206
+ ```
207
+
137
208
  ---
138
209
 
139
210
  ### Phase 4: Apply Resolutions
@@ -40,7 +40,7 @@ Read **every** available gspec document in this order:
40
40
  6. `gspec/architecture.md` — Technical blueprint: project structure, data model, API design, environment
41
41
  7. `gspec/research.md` — Competitive analysis and feature proposals (informational only — not audited against code)
42
42
  8. `gspec/features/*.md` — Individual feature requirements, priorities, and capability checkboxes
43
- 9. `gspec/features/*.tasks.md` — When a feature has a tasks file, also read it. Tasks files declare a per-task execution checkbox state and `covers:` traceability to PRD capabilities; both are subject to drift checks against the code
43
+ 9. `gspec/features/*.plan.md` — When a feature has a plan file, also read it. Plan files declare a per-task execution checkbox state and `covers:` traceability to PRD capabilities; both are subject to drift checks against the code
44
44
 
45
45
  If the `gspec/` directory is empty, inform the user that there are no specs to audit and stop.
46
46
 
@@ -111,10 +111,10 @@ Systematically compare specs against the evidence from Phase 2. Look for these c
111
111
  - A feature PRD's acceptance criteria describe behavior that the code explicitly handles differently
112
112
  - A feature PRD references a data field, endpoint, or UI element whose implementation has diverged (e.g., PRD says "users can filter by tag", code has filter-by-category)
113
113
 
114
- #### Tasks Drift (only when a tasks file exists for the feature)
115
- - A task is marked `- [x]` in the tasks file but the code does not implement what the task describes
114
+ #### Plan Drift (only when a plan file exists for the feature)
115
+ - A task is marked `- [x]` in the plan file but the code does not implement what the task describes
116
116
  - A task is marked `- [ ]` but the code clearly implements it (the checkbox should be updated)
117
- - A task's `covers:` references capability text the PRD no longer contains (the PRD was edited but the tasks file wasn't refreshed — recommend regenerating via `/gspec-tasks`)
117
+ - A task's `covers:` references capability text the PRD no longer contains (the PRD was edited but the plan file wasn't refreshed — recommend regenerating via `/gspec-plan`)
118
118
  - A capability is marked `- [x]` in the PRD but one or more of its covering tasks is still `- [ ]` (or vice versa) — flag the inconsistency and recommend the user reconcile state
119
119
 
120
120
  #### Orphan Capability (code implements a feature that has no PRD)
@@ -195,9 +195,9 @@ When generating multiple features from a large request:
195
195
 
196
196
  After saving each PRD, end your response with a brief next-step pointer:
197
197
 
198
- > *For larger features, run `/gspec-tasks <feature-slug>` to produce an ordered task plan with explicit dependencies and parallel-execution markers before running `/gspec-implement`. Trivial features can skip straight to `/gspec-implement`.*
198
+ > *For larger features, run `/gspec-plan <feature-slug>` to produce an ordered plan with explicit dependencies and parallel-execution markers before running `/gspec-implement`. Trivial features can skip straight to `/gspec-implement`.*
199
199
 
200
- This is a one-line nudge, not a prompt — do not generate the tasks file from this skill, and do not block the user on it.
200
+ This is a one-line nudge, not a prompt — do not generate the plan file from this skill, and do not block the user on it.
201
201
 
202
202
  ---
203
203