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.
- package/README.md +7 -7
- package/bin/emitters.js +104 -0
- package/bin/gspec.js +2 -2
- package/commands/gspec.analyze.md +81 -10
- package/commands/gspec.audit.md +4 -4
- package/commands/gspec.feature.md +2 -2
- package/commands/gspec.implement.md +26 -12
- package/commands/gspec.migrate.md +7 -0
- package/commands/{gspec.tasks.md → gspec.plan.md} +19 -17
- package/dist/antigravity/gspec-analyze/SKILL.md +82 -11
- package/dist/antigravity/gspec-audit/SKILL.md +4 -4
- package/dist/antigravity/gspec-feature/SKILL.md +2 -2
- package/dist/antigravity/gspec-implement/SKILL.md +26 -12
- package/dist/antigravity/gspec-migrate/SKILL.md +7 -0
- package/dist/{opencode/gspec-tasks → antigravity/gspec-plan}/SKILL.md +21 -19
- package/dist/claude/gspec-analyze/SKILL.md +82 -11
- package/dist/claude/gspec-audit/SKILL.md +4 -4
- package/dist/claude/gspec-feature/SKILL.md +2 -2
- package/dist/claude/gspec-implement/SKILL.md +26 -12
- package/dist/claude/gspec-migrate/SKILL.md +7 -0
- package/dist/claude/{gspec-tasks → gspec-plan}/SKILL.md +21 -19
- package/dist/codex/gspec-analyze/SKILL.md +82 -11
- package/dist/codex/gspec-audit/SKILL.md +4 -4
- package/dist/codex/gspec-feature/SKILL.md +2 -2
- package/dist/codex/gspec-implement/SKILL.md +26 -12
- package/dist/codex/gspec-migrate/SKILL.md +7 -0
- package/dist/{antigravity/gspec-tasks → codex/gspec-plan}/SKILL.md +21 -19
- package/dist/cursor/gspec-analyze.mdc +82 -11
- package/dist/cursor/gspec-audit.mdc +4 -4
- package/dist/cursor/gspec-feature.mdc +2 -2
- package/dist/cursor/gspec-implement.mdc +26 -12
- package/dist/cursor/gspec-migrate.mdc +7 -0
- package/dist/cursor/{gspec-tasks.mdc → gspec-plan.mdc} +20 -18
- package/dist/opencode/gspec-analyze/SKILL.md +82 -11
- package/dist/opencode/gspec-audit/SKILL.md +4 -4
- package/dist/opencode/gspec-feature/SKILL.md +2 -2
- package/dist/opencode/gspec-implement/SKILL.md +26 -12
- package/dist/opencode/gspec-migrate/SKILL.md +7 -0
- package/dist/{codex/gspec-tasks → opencode/gspec-plan}/SKILL.md +21 -19
- package/package.json +1 -1
- package/templates/spec-sync.md +6 -2
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ These documents become the shared context for all subsequent AI interactions. Wh
|
|
|
25
25
|
|
|
26
26
|
The only commands you *need* are the four fundamentals and `/gspec-implement`. Everything else exists to help when your project calls for it.
|
|
27
27
|
|
|
28
|
-
The fundamentals give your AI tool enough context to build well — it knows what the product is, how it should look, what technologies to use, and what engineering standards to follow. From there, `/gspec-implement` can take a plain-language description and start building. The remaining commands — `/gspec-research`, `/gspec-feature`, `/gspec-architect`, `/gspec-
|
|
28
|
+
The fundamentals give your AI tool enough context to build well — it knows what the product is, how it should look, what technologies to use, and what engineering standards to follow. From there, `/gspec-implement` can take a plain-language description and start building. The remaining commands — `/gspec-research`, `/gspec-feature`, `/gspec-architect`, `/gspec-plan`, `/gspec-analyze`, and `/gspec-audit` — add structure and rigor when the scope or complexity warrants it.
|
|
29
29
|
|
|
30
30
|
```mermaid
|
|
31
31
|
flowchart LR
|
|
@@ -43,7 +43,7 @@ flowchart LR
|
|
|
43
43
|
technical blueprint"]
|
|
44
44
|
|
|
45
45
|
Plan["5. Plan
|
|
46
|
-
ordered
|
|
46
|
+
ordered plan"]
|
|
47
47
|
|
|
48
48
|
Analyze["6. Analyze & Audit
|
|
49
49
|
reconcile specs
|
|
@@ -116,18 +116,18 @@ Use `/gspec-architect` when your feature involves significant technical complexi
|
|
|
116
116
|
|
|
117
117
|
| Command | Role | What it produces |
|
|
118
118
|
|---|---|---|
|
|
119
|
-
| `/gspec-
|
|
119
|
+
| `/gspec-plan` | Engineering Lead | A sibling `gspec/features/<feature>.plan.md` file with stable task IDs, explicit `deps:` lines, and `[P]` markers for parallel-safe work |
|
|
120
120
|
|
|
121
|
-
Use `/gspec-
|
|
121
|
+
Use `/gspec-plan` after `/gspec-feature` (and after `/gspec-architect` when it exists) for any feature large enough that build order matters or that has work which could legitimately run in parallel. The output is what `/gspec-implement` consumes — when every in-scope feature has a plan file, `/gspec-implement` skips its own plan-mode step and executes the plan file directly (the plan was already approved during `/gspec-plan`). Trivial features can skip this step and go straight to `/gspec-implement`, which falls back to PRD-checkbox-driven planning with its own plan-mode approval.
|
|
122
122
|
|
|
123
123
|
**6. Analyze & Audit** *(optional)* — Reconcile discrepancies before building, and keep specs honest as the codebase evolves.
|
|
124
124
|
|
|
125
125
|
| Command | Role | What it does |
|
|
126
126
|
|---|---|---|
|
|
127
|
-
| `/gspec-analyze` | Specification Analyst | Cross-references
|
|
127
|
+
| `/gspec-analyze` | Specification Analyst | Cross-references specs against **each other**, identifies contradictions, and walks you through reconciling each one. Optionally takes a feature slug to scope to one PRD and add an ambiguity sweep against the document itself |
|
|
128
128
|
| `/gspec-audit` | Specification Auditor | Cross-references specs against the **actual codebase**, finds drift (stack mismatches, stale data models, design tokens that don't match the stylesheet, capability checkboxes that lie), and walks you through updating specs to match reality |
|
|
129
129
|
|
|
130
|
-
Use `/gspec-analyze` after `/gspec-architect` (or any time multiple specs exist) to catch spec-to-spec conflicts before `/gspec-implement` sees them
|
|
130
|
+
Use `/gspec-analyze` after `/gspec-architect` (or any time multiple specs exist) to catch spec-to-spec conflicts before `/gspec-implement` sees them — for example, if the stack says PostgreSQL but the architecture references MongoDB. Pass a feature slug (`/gspec-analyze user-authentication`) to scope the run to one PRD and surface ambiguity inside it — missing acceptance criteria, vague verbs, undefined nouns, implicit state assumptions, missing edge cases, and unmeasurable success metrics. Especially useful on aged or imported PRDs that may have accumulated unstated assumptions.
|
|
131
131
|
|
|
132
132
|
Use `/gspec-audit` periodically — before a major release, after a long sprint, or any time you suspect docs have drifted from code. Audit reads package manifests, configs, source files, and test output, then asks you per-finding whether to update the spec to match the code, keep the spec and fix the code separately, or defer. Each finding is presented one at a time with the spec quote and the code evidence side by side. Audit never modifies code.
|
|
133
133
|
|
|
@@ -135,7 +135,7 @@ Use `/gspec-audit` periodically — before a major release, after a long sprint,
|
|
|
135
135
|
|
|
136
136
|
| Command | Role | What it does |
|
|
137
137
|
|---|---|---|
|
|
138
|
-
| `/gspec-implement` | Senior Engineer | Reads all specs (including any `*.
|
|
138
|
+
| `/gspec-implement` | Senior Engineer | Reads all specs (including any `*.plan.md` files), plans the build order, and implements |
|
|
139
139
|
|
|
140
140
|
**Spec Sync** — gspec includes always-on spec sync that automatically keeps your specification documents in sync as the code evolves. This is installed alongside the skills and requires no manual intervention — when code changes affect spec-documented behavior, the sync rules prompt your AI tool to update the relevant gspec files.
|
|
141
141
|
|
package/bin/emitters.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { mkdir, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
|
|
4
|
+
// Placeholder pattern used in generic command files
|
|
5
|
+
export const PLACEHOLDER_RE = /<<<\w+>>>/g;
|
|
6
|
+
|
|
7
|
+
export function buildFrontmatter(fields) {
|
|
8
|
+
const lines = ['---'];
|
|
9
|
+
for (const [key, value] of Object.entries(fields)) {
|
|
10
|
+
lines.push(`${key}: ${value}`);
|
|
11
|
+
}
|
|
12
|
+
lines.push('---');
|
|
13
|
+
return lines.join('\n');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Platform target definitions: how to emit a skill file for each AI tool.
|
|
17
|
+
// Used by both `scripts/build.js` (writing to dist/) and `bin/gspec.js`
|
|
18
|
+
// (writing user-installed extensions directly to a project's install dir).
|
|
19
|
+
export const TARGETS = {
|
|
20
|
+
claude: {
|
|
21
|
+
label: 'Claude Code',
|
|
22
|
+
distSubdir: 'claude',
|
|
23
|
+
installDir: '.claude/skills',
|
|
24
|
+
layout: 'directory',
|
|
25
|
+
// .claude/skills/<name>/SKILL.md
|
|
26
|
+
async emit(outDir, content, meta) {
|
|
27
|
+
const frontmatter = buildFrontmatter({
|
|
28
|
+
name: meta.name,
|
|
29
|
+
description: meta.description,
|
|
30
|
+
});
|
|
31
|
+
const body = content.replace(PLACEHOLDER_RE, '$ARGUMENTS');
|
|
32
|
+
const skillDir = join(outDir, meta.name);
|
|
33
|
+
await mkdir(skillDir, { recursive: true });
|
|
34
|
+
await writeFile(join(skillDir, 'SKILL.md'), frontmatter + '\n\n' + body, 'utf-8');
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
cursor: {
|
|
38
|
+
label: 'Cursor',
|
|
39
|
+
distSubdir: 'cursor',
|
|
40
|
+
installDir: '.cursor/commands',
|
|
41
|
+
layout: 'flat',
|
|
42
|
+
// .cursor/commands/<name>.mdc (flat file)
|
|
43
|
+
async emit(outDir, content, meta) {
|
|
44
|
+
const frontmatter = buildFrontmatter({
|
|
45
|
+
description: meta.description,
|
|
46
|
+
});
|
|
47
|
+
// Cursor has no $ARGUMENTS convention; strip the placeholder lines
|
|
48
|
+
const body = content.replace(/^.*<<<\w+>>>.*$\n?/gm, '');
|
|
49
|
+
await mkdir(outDir, { recursive: true });
|
|
50
|
+
await writeFile(join(outDir, `${meta.name}.mdc`), frontmatter + '\n\n' + body, 'utf-8');
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
antigravity: {
|
|
54
|
+
label: 'Antigravity',
|
|
55
|
+
distSubdir: 'antigravity',
|
|
56
|
+
installDir: '.agent/skills',
|
|
57
|
+
layout: 'directory',
|
|
58
|
+
// .agent/skills/<name>/SKILL.md
|
|
59
|
+
async emit(outDir, content, meta) {
|
|
60
|
+
const frontmatter = buildFrontmatter({
|
|
61
|
+
name: meta.name,
|
|
62
|
+
description: meta.description,
|
|
63
|
+
});
|
|
64
|
+
const body = content.replace(/^.*<<<\w+>>>.*$\n?/gm, '');
|
|
65
|
+
const skillDir = join(outDir, meta.name);
|
|
66
|
+
await mkdir(skillDir, { recursive: true });
|
|
67
|
+
await writeFile(join(skillDir, 'SKILL.md'), frontmatter + '\n\n' + body, 'utf-8');
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
codex: {
|
|
71
|
+
label: 'Codex',
|
|
72
|
+
distSubdir: 'codex',
|
|
73
|
+
installDir: '.agents/skills',
|
|
74
|
+
layout: 'directory',
|
|
75
|
+
// .agents/skills/<name>/SKILL.md
|
|
76
|
+
async emit(outDir, content, meta) {
|
|
77
|
+
const frontmatter = buildFrontmatter({
|
|
78
|
+
name: meta.name,
|
|
79
|
+
description: meta.description,
|
|
80
|
+
});
|
|
81
|
+
const body = content.replace(/^.*<<<\w+>>>.*$\n?/gm, '');
|
|
82
|
+
const skillDir = join(outDir, meta.name);
|
|
83
|
+
await mkdir(skillDir, { recursive: true });
|
|
84
|
+
await writeFile(join(skillDir, 'SKILL.md'), frontmatter + '\n\n' + body, 'utf-8');
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
opencode: {
|
|
88
|
+
label: 'Open Code',
|
|
89
|
+
distSubdir: 'opencode',
|
|
90
|
+
installDir: '.opencode/skills',
|
|
91
|
+
layout: 'directory',
|
|
92
|
+
// .opencode/skills/<name>/SKILL.md
|
|
93
|
+
async emit(outDir, content, meta) {
|
|
94
|
+
const frontmatter = buildFrontmatter({
|
|
95
|
+
name: meta.name,
|
|
96
|
+
description: meta.description,
|
|
97
|
+
});
|
|
98
|
+
const body = content.replace(/^.*<<<\w+>>>.*$\n?/gm, '');
|
|
99
|
+
const skillDir = join(outDir, meta.name);
|
|
100
|
+
await mkdir(skillDir, { recursive: true });
|
|
101
|
+
await writeFile(join(skillDir, 'SKILL.md'), frontmatter + '\n\n' + body, 'utf-8');
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
};
|
package/bin/gspec.js
CHANGED
|
@@ -7,7 +7,7 @@ import { homedir } from 'node:os';
|
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
8
|
import { createInterface } from 'node:readline';
|
|
9
9
|
import chalk from 'chalk';
|
|
10
|
-
import { TARGETS as EMITTER_TARGETS } from '
|
|
10
|
+
import { TARGETS as EMITTER_TARGETS } from './emitters.js';
|
|
11
11
|
|
|
12
12
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
13
13
|
const DIST_DIR = join(__dirname, '..', 'dist');
|
|
@@ -40,7 +40,7 @@ const TARGETS = Object.fromEntries(
|
|
|
40
40
|
|
|
41
41
|
// Names emitted by core gspec; user extensions cannot collide with these.
|
|
42
42
|
const BUILTIN_SKILL_NAMES = new Set([
|
|
43
|
-
'gspec-profile', 'gspec-feature', 'gspec-
|
|
43
|
+
'gspec-profile', 'gspec-feature', 'gspec-plan', 'gspec-style',
|
|
44
44
|
'gspec-stack', 'gspec-practices', 'gspec-architect', 'gspec-analyze',
|
|
45
45
|
'gspec-audit', 'gspec-research', 'gspec-implement', 'gspec-migrate',
|
|
46
46
|
]);
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
You are a Specification Analyst at a high-performing software company.
|
|
2
2
|
|
|
3
|
-
Your task is to read
|
|
3
|
+
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.
|
|
4
4
|
|
|
5
5
|
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.
|
|
6
6
|
|
|
7
7
|
> **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.
|
|
8
8
|
|
|
9
|
+
## Scope
|
|
10
|
+
|
|
11
|
+
This skill has two modes:
|
|
12
|
+
|
|
13
|
+
- **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.
|
|
14
|
+
- **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.
|
|
15
|
+
|
|
16
|
+
To resolve the argument:
|
|
17
|
+
|
|
18
|
+
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.
|
|
19
|
+
2. If the resolved slug matches a file at `gspec/features/<slug>.md`, switch to scoped mode and remember the slug.
|
|
20
|
+
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.
|
|
21
|
+
4. If the input is empty, run in all-specs mode.
|
|
22
|
+
|
|
9
23
|
You should:
|
|
10
24
|
- Read and deeply cross-reference all available gspec documents
|
|
11
25
|
- Identify concrete discrepancies — not style differences or minor wording variations, but substantive contradictions where two specs disagree on a fact, technology, behavior, or requirement
|
|
@@ -19,9 +33,11 @@ You should:
|
|
|
19
33
|
|
|
20
34
|
## Workflow
|
|
21
35
|
|
|
22
|
-
### Phase 1: Read
|
|
36
|
+
### Phase 1: Read the Specs in Scope
|
|
37
|
+
|
|
38
|
+
Branch on the mode resolved above:
|
|
23
39
|
|
|
24
|
-
Read **every** available gspec document in this order:
|
|
40
|
+
**All-specs mode** — Read **every** available gspec document in this order:
|
|
25
41
|
|
|
26
42
|
1. `gspec/profile.md` — Product identity, scope, audience, and positioning
|
|
27
43
|
2. `gspec/stack.md` — Technology choices, frameworks, infrastructure
|
|
@@ -31,10 +47,19 @@ Read **every** available gspec document in this order:
|
|
|
31
47
|
6. `gspec/architecture.md` — Technical blueprint: project structure, data model, API design, environment
|
|
32
48
|
7. `gspec/research.md` — Competitive analysis and feature proposals
|
|
33
49
|
8. `gspec/features/*.md` — Individual feature requirements and dependencies
|
|
34
|
-
9. `gspec/features/*.
|
|
50
|
+
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
|
|
35
51
|
|
|
36
52
|
If fewer than two spec files exist, inform the user that there is nothing to cross-reference and stop.
|
|
37
53
|
|
|
54
|
+
**Scoped mode** — Read just enough to evaluate the named feature in context:
|
|
55
|
+
|
|
56
|
+
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.
|
|
57
|
+
2. `gspec/features/<slug>.md` — the named feature's PRD. This is the document being scrutinized.
|
|
58
|
+
3. `gspec/features/<slug>.plan.md` — the named feature's plan file, if present.
|
|
59
|
+
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).
|
|
60
|
+
|
|
61
|
+
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.
|
|
62
|
+
|
|
38
63
|
---
|
|
39
64
|
|
|
40
65
|
### Phase 2: Cross-Reference and Identify Discrepancies
|
|
@@ -76,17 +101,40 @@ Systematically compare specs against each other. Look for these categories of di
|
|
|
76
101
|
- Acceptance criteria in a feature PRD contradict architectural decisions
|
|
77
102
|
- Edge cases handled differently across specs
|
|
78
103
|
|
|
79
|
-
####
|
|
80
|
-
For any feature that has a `gspec/features/<feature>.
|
|
104
|
+
#### Plan ↔ PRD Conflicts
|
|
105
|
+
For any feature that has a `gspec/features/<feature>.plan.md` file, validate the plan file against its PRD:
|
|
81
106
|
- A task's `covers:` line quotes capability text that does not exist in the PRD (orphan task)
|
|
82
|
-
- A PRD capability is not `covers:`-referenced by any task in the
|
|
107
|
+
- 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)
|
|
83
108
|
- A task's checkbox is `- [x]` but its covered capability is still `- [ ]` in the PRD, or vice versa (state inconsistency)
|
|
84
109
|
- A task's `deps:` references a task ID that does not exist in the file
|
|
85
|
-
- The
|
|
110
|
+
- The plan file's `feature:` frontmatter slug does not match its filename's feature slug
|
|
111
|
+
|
|
112
|
+
#### Ambiguity & Underspecification *(scoped mode only)*
|
|
113
|
+
|
|
114
|
+
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).
|
|
115
|
+
|
|
116
|
+
Look for, inside the target PRD:
|
|
117
|
+
|
|
118
|
+
- **Capabilities missing acceptance criteria** — every capability checkbox should have 2-4 testable conditions sub-listed under it. Bare capabilities are gaps.
|
|
119
|
+
- **Vague verbs without subject/object resolution** — "manage", "handle", "process", "support", "deal with" used without specifying *what* and *under which conditions*.
|
|
120
|
+
- **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.
|
|
121
|
+
- **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.
|
|
122
|
+
- **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).
|
|
123
|
+
- **Priority gaps** — capabilities without `P0`/`P1`/`P2` markers, or a set where everything is `P0` (which means nothing is prioritized).
|
|
124
|
+
- **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.
|
|
125
|
+
- **Success metrics that aren't measurable** — "users will love it", "performance will be good" — flag for sharpening into something an implementer can verify.
|
|
126
|
+
|
|
127
|
+
**Do NOT flag in this category:**
|
|
128
|
+
- Things explicitly listed under "Out of Scope" or "Deferred" — those are intentional gaps, not ambiguity.
|
|
129
|
+
- 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.**
|
|
130
|
+
- Style or tone preferences ("the copy could be punchier") — not the analyst's call.
|
|
131
|
+
- 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.
|
|
86
132
|
|
|
87
|
-
|
|
133
|
+
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.
|
|
134
|
+
|
|
135
|
+
**Do NOT flag (across all categories):**
|
|
88
136
|
- Minor wording or style differences that don't change meaning
|
|
89
|
-
- Missing information (gaps are for `gspec-architect` to handle)
|
|
137
|
+
- Missing information across other specs (gaps in foundation specs are for `gspec-architect` to handle)
|
|
90
138
|
- Differences in level of detail (one spec being more detailed than another is expected)
|
|
91
139
|
|
|
92
140
|
---
|
|
@@ -129,6 +177,29 @@ Which would you like?
|
|
|
129
177
|
|
|
130
178
|
After the user decides, immediately update the affected spec file(s) to reflect the resolution. Then present the next discrepancy.
|
|
131
179
|
|
|
180
|
+
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:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
### Ambiguity [N]: [Brief title]
|
|
184
|
+
|
|
185
|
+
**Category:** Ambiguity & Underspecification
|
|
186
|
+
|
|
187
|
+
**Where:** [File, section, capability or line — be specific]
|
|
188
|
+
|
|
189
|
+
**What's unclear:** [exact quote or precise paraphrase of the vague text]
|
|
190
|
+
|
|
191
|
+
**Why this matters:** [1 sentence on what the implementer would have to guess]
|
|
192
|
+
|
|
193
|
+
**Question:** [the specific thing the user needs to decide]
|
|
194
|
+
|
|
195
|
+
**Options:**
|
|
196
|
+
1. **Resolve inline** — Update [File, section] with [suggested concrete answer or 2-3 alternatives if you have them]
|
|
197
|
+
2. **Mark as a Deferred Decision** — Add to the PRD's "Deferred Decisions" subsection so future analyze runs skip it
|
|
198
|
+
3. **Defer** — Skip this finding for now without recording it
|
|
199
|
+
|
|
200
|
+
Which would you like?
|
|
201
|
+
```
|
|
202
|
+
|
|
132
203
|
---
|
|
133
204
|
|
|
134
205
|
### Phase 4: Apply Resolutions
|
package/commands/gspec.audit.md
CHANGED
|
@@ -35,7 +35,7 @@ Read **every** available gspec document in this order:
|
|
|
35
35
|
6. `gspec/architecture.md` — Technical blueprint: project structure, data model, API design, environment
|
|
36
36
|
7. `gspec/research.md` — Competitive analysis and feature proposals (informational only — not audited against code)
|
|
37
37
|
8. `gspec/features/*.md` — Individual feature requirements, priorities, and capability checkboxes
|
|
38
|
-
9. `gspec/features/*.
|
|
38
|
+
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
|
|
39
39
|
|
|
40
40
|
If the `gspec/` directory is empty, inform the user that there are no specs to audit and stop.
|
|
41
41
|
|
|
@@ -106,10 +106,10 @@ Systematically compare specs against the evidence from Phase 2. Look for these c
|
|
|
106
106
|
- A feature PRD's acceptance criteria describe behavior that the code explicitly handles differently
|
|
107
107
|
- 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)
|
|
108
108
|
|
|
109
|
-
####
|
|
110
|
-
- A task is marked `- [x]` in the
|
|
109
|
+
#### Plan Drift (only when a plan file exists for the feature)
|
|
110
|
+
- A task is marked `- [x]` in the plan file but the code does not implement what the task describes
|
|
111
111
|
- A task is marked `- [ ]` but the code clearly implements it (the checkbox should be updated)
|
|
112
|
-
- A task's `covers:` references capability text the PRD no longer contains (the PRD was edited but the
|
|
112
|
+
- 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`)
|
|
113
113
|
- 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
|
|
114
114
|
|
|
115
115
|
#### Orphan Capability (code implements a feature that has no PRD)
|
|
@@ -190,9 +190,9 @@ When generating multiple features from a large request:
|
|
|
190
190
|
|
|
191
191
|
After saving each PRD, end your response with a brief next-step pointer:
|
|
192
192
|
|
|
193
|
-
> *For larger features, run `/gspec-
|
|
193
|
+
> *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`.*
|
|
194
194
|
|
|
195
|
-
This is a one-line nudge, not a prompt — do not generate the
|
|
195
|
+
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.
|
|
196
196
|
|
|
197
197
|
---
|
|
198
198
|
|
|
@@ -21,7 +21,7 @@ Before writing any code, read all available gspec documents in this order:
|
|
|
21
21
|
1. `gspec/profile.md` — Understand what the product is and who it's for
|
|
22
22
|
2. `gspec/features/*.md` — Understand individual feature requirements and dependencies
|
|
23
23
|
> **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.
|
|
24
|
-
3. `gspec/features/*.
|
|
24
|
+
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.
|
|
25
25
|
4. `gspec/stack.md` — Understand the technology choices
|
|
26
26
|
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)
|
|
27
27
|
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
|
|
@@ -42,7 +42,7 @@ This command is designed to be **run multiple times** as features are added or e
|
|
|
42
42
|
- **`- [ ]`** (unchecked) = capability not yet implemented — include in this run's scope
|
|
43
43
|
- **No checkbox prefix** = treat as not yet implemented (backwards compatible with older PRDs)
|
|
44
44
|
|
|
45
|
-
**When a feature has a
|
|
45
|
+
**When a feature has a plan file** (`gspec/features/<feature>.plan.md`), also assess task-level state:
|
|
46
46
|
|
|
47
47
|
- A task with `- [x]` is complete; skip unless user requests re-implementation
|
|
48
48
|
- A task with `- [ ]` is pending and goes into this run's scope
|
|
@@ -50,24 +50,38 @@ This command is designed to be **run multiple times** as features are added or e
|
|
|
50
50
|
|
|
51
51
|
For each feature PRD, build an implementation status summary:
|
|
52
52
|
|
|
53
|
-
> **Feature: User Authentication** — 4/7 capabilities implemented (all P0 done, 3 P1/P2 remaining);
|
|
54
|
-
> **Feature: Dashboard** — 0/5 capabilities implemented (new feature, no
|
|
53
|
+
> **Feature: User Authentication** — 4/7 capabilities implemented (all P0 done, 3 P1/P2 remaining); plan file shows 8/14 tasks done
|
|
54
|
+
> **Feature: Dashboard** — 0/5 capabilities implemented (new feature, no plan file)
|
|
55
55
|
|
|
56
56
|
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.
|
|
57
57
|
|
|
58
58
|
### Phase 2: Plan — Define the Build Order
|
|
59
59
|
|
|
60
|
+
#### Skip plan mode when every in-scope feature has a plan file
|
|
61
|
+
|
|
62
|
+
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.
|
|
63
|
+
|
|
64
|
+
When the skip condition is met:
|
|
65
|
+
|
|
66
|
+
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.
|
|
67
|
+
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.
|
|
68
|
+
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.
|
|
69
|
+
|
|
70
|
+
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.
|
|
71
|
+
|
|
72
|
+
#### Full plan mode (when one or more in-scope features lack a plan file)
|
|
73
|
+
|
|
60
74
|
**Enter plan mode** and create a concrete, phased implementation plan.
|
|
61
75
|
|
|
62
|
-
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
|
|
76
|
+
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.
|
|
63
77
|
2. **Organize into implementation phases** — Group related work into logical phases that can be built and verified independently. Each phase should:
|
|
64
78
|
- Have a clear name and objective (e.g., "Phase 1: Core Data Models & API", "Phase 2: Authentication Flow")
|
|
65
|
-
- List the specific capabilities (with feature PRD references) it will implement, **and the specific tasks (by ID, e.g. T1, T2, T7) when a
|
|
79
|
+
- 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**
|
|
66
80
|
- Identify files to create or modify
|
|
67
81
|
- Note dependencies on prior phases
|
|
68
82
|
- Include an estimated scope (small/medium/large)
|
|
69
|
-
- **When
|
|
70
|
-
3. **Account for every unchecked unit of work** — The plan must explicitly place every unchecked capability (or every unchecked task, when a
|
|
83
|
+
- **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
|
|
84
|
+
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.
|
|
71
85
|
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.)
|
|
72
86
|
5. **Present the plan** — Show the user the full phased plan with clear phase boundaries and ask for approval
|
|
73
87
|
|
|
@@ -117,8 +131,8 @@ Present a brief scaffold summary to the user before proceeding to feature implem
|
|
|
117
131
|
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.
|
|
118
132
|
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
|
|
119
133
|
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.
|
|
120
|
-
- **Tasks (when a
|
|
121
|
-
- **Capabilities**: flip a PRD capability checkbox from `- [ ]` to `- [x]` only after every task whose `covers:` references it is checked. If no
|
|
134
|
+
- **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]`.
|
|
135
|
+
- **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]`.
|
|
122
136
|
- When updating gspec files, preserve existing `spec-version` YAML frontmatter. If a file lacks frontmatter, add `---\nspec-version: <<<SPEC_VERSION>>>\n---` at the top.
|
|
123
137
|
4. **Run tests** — Execute the tests defined for this phase (and any existing tests to catch regressions). Fix any failures before proceeding.
|
|
124
138
|
6. **Surface new gaps** — If implementation reveals new ambiguities, pause and consult the user rather than making silent assumptions
|
|
@@ -140,7 +154,7 @@ After implementation:
|
|
|
140
154
|
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]`.
|
|
141
155
|
3. **Check the Definition of Done** from `gspec/practices.md`
|
|
142
156
|
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.
|
|
143
|
-
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
|
|
157
|
+
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:
|
|
144
158
|
|
|
145
159
|
> **Implementation Summary:**
|
|
146
160
|
> - Feature X: 7/7 capabilities implemented (complete)
|
|
@@ -195,7 +209,7 @@ The user's prompt takes priority for scoping. Use it to determine focus, and ref
|
|
|
195
209
|
|
|
196
210
|
## Output Rules
|
|
197
211
|
|
|
198
|
-
- **Use plan mode** in Phase 2 to present the implementation plan. Wait for user approval
|
|
212
|
+
- **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.
|
|
199
213
|
- **Pause between implementation phases** — After completing each phase in Phase 3, run tests and wait for user confirmation before starting the next phase
|
|
200
214
|
- Reference specific gspec documents and section numbers when discussing requirements
|
|
201
215
|
- Create files following the project structure defined in `gspec/architecture.md` (or `gspec/stack.md` and `gspec/practices.md` if no architecture document exists)
|
|
@@ -12,6 +12,7 @@ Scan the `gspec/` directory for all spec files:
|
|
|
12
12
|
- `gspec/*.md` (profile, stack, style, practices, architecture)
|
|
13
13
|
- `gspec/style.html` (HTML design system, if present — the style guide may be in either Markdown or HTML)
|
|
14
14
|
- `gspec/features/*.md` (individual feature PRDs)
|
|
15
|
+
- `gspec/features/*.plan.md` (plan files; legacy `*.tasks.md` files are also scanned and renamed — see Migration Rules below)
|
|
15
16
|
|
|
16
17
|
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.
|
|
17
18
|
|
|
@@ -102,6 +103,12 @@ After migrating all files:
|
|
|
102
103
|
- If capabilities lack acceptance criteria (current format requires them), add placeholder criteria: "Acceptance criteria to be defined"
|
|
103
104
|
- Preserve priority levels (P0, P1, P2)
|
|
104
105
|
|
|
106
|
+
**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:
|
|
107
|
+
- 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)
|
|
108
|
+
- 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
|
|
109
|
+
- Preserve task IDs verbatim — `T1`, `T2`, etc. remain stable; do not renumber
|
|
110
|
+
- Confirm the rename plan with the user before applying, in the same approval flow as other migrations
|
|
111
|
+
|
|
105
112
|
**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.
|
|
106
113
|
|
|
107
114
|
**Frontmatter handling (Markdown files):**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
You are a Senior Engineering Lead at a high-performing software company.
|
|
2
2
|
|
|
3
|
-
Your task is to take a **feature PRD** from `gspec/features/` and decompose it into an **ordered, dependency-aware
|
|
3
|
+
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.
|
|
4
4
|
|
|
5
|
-
The PRD answers *what* and *why*. The
|
|
5
|
+
The PRD answers *what* and *why*. The plan file answers *how* and *in what order*.
|
|
6
6
|
|
|
7
7
|
## When to Run This Skill
|
|
8
8
|
|
|
@@ -19,8 +19,8 @@ Skip this skill for trivial features — `gspec-implement`'s checkbox-driven pla
|
|
|
19
19
|
## Inputs
|
|
20
20
|
|
|
21
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
|
|
23
|
-
- **Existing
|
|
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 plan file
|
|
23
|
+
- **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
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@ Skip this skill for trivial features — `gspec-implement`'s checkbox-driven pla
|
|
|
30
30
|
|
|
31
31
|
1. Read the target feature PRD in full. Extract every capability and its acceptance criteria.
|
|
32
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
|
|
33
|
+
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.
|
|
34
34
|
|
|
35
35
|
### Phase 2: Decompose
|
|
36
36
|
|
|
@@ -55,26 +55,28 @@ For each unchecked PRD capability:
|
|
|
55
55
|
|
|
56
56
|
### Phase 4: Plan-Mode Confirmation
|
|
57
57
|
|
|
58
|
-
Enter plan mode and present the proposed
|
|
58
|
+
Enter plan mode and present the proposed plan file content to the user. Show:
|
|
59
59
|
|
|
60
60
|
- Total task count and how many `[P]`-marked
|
|
61
61
|
- The full proposed file body
|
|
62
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
|
|
63
|
+
- Any cross-feature dependencies you noticed (the user may want to address them in another feature's plan file)
|
|
64
64
|
|
|
65
65
|
Wait for approval. The user may edit individual tasks, change ordering, drop or add `[P]` markers, or split/merge tasks.
|
|
66
66
|
|
|
67
|
+
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.
|
|
68
|
+
|
|
67
69
|
### Phase 5: Write
|
|
68
70
|
|
|
69
|
-
After approval, write `gspec/features/<feature>.
|
|
71
|
+
After approval, write `gspec/features/<feature>.plan.md`. Never overwrite a non-empty existing file without explicit user confirmation in Phase 1.
|
|
70
72
|
|
|
71
|
-
When writing, preserve any existing `spec-version` frontmatter from the prior
|
|
73
|
+
When writing, preserve any existing `spec-version` frontmatter from the prior plan file. New files use `spec-version: <<<SPEC_VERSION>>>`.
|
|
72
74
|
|
|
73
75
|
---
|
|
74
76
|
|
|
75
77
|
## Output Format
|
|
76
78
|
|
|
77
|
-
The
|
|
79
|
+
The plan file has YAML frontmatter and a single `## Plan` section.
|
|
78
80
|
|
|
79
81
|
```markdown
|
|
80
82
|
---
|
|
@@ -82,9 +84,9 @@ spec-version: <<<SPEC_VERSION>>>
|
|
|
82
84
|
feature: <feature-slug>
|
|
83
85
|
---
|
|
84
86
|
|
|
85
|
-
#
|
|
87
|
+
# Plan: <Feature Name>
|
|
86
88
|
|
|
87
|
-
##
|
|
89
|
+
## Plan
|
|
88
90
|
|
|
89
91
|
- [ ] **T1** [P] **P0** scaffold the Astro page route at `src/pages/index.astro`
|
|
90
92
|
- deps: —
|
|
@@ -118,19 +120,19 @@ feature: <feature-slug>
|
|
|
118
120
|
|
|
119
121
|
## Relationship to PRD Checkboxes
|
|
120
122
|
|
|
121
|
-
The
|
|
123
|
+
The plan file and the PRD use **separate checkboxes**:
|
|
122
124
|
|
|
123
|
-
- **Task checkboxes** (`- [ ]` / `- [x]` in the
|
|
125
|
+
- **Task checkboxes** (`- [ ]` / `- [x]` in the plan file) track *execution state* — flip when the task is done.
|
|
124
126
|
- **Capability checkboxes** (`- [ ]` / `- [x]` in the PRD) track *delivery state* — only flip when **every** task whose `covers:` references that capability is complete.
|
|
125
127
|
|
|
126
|
-
`gspec-implement` is responsible for keeping both in sync. This skill only writes the initial unchecked
|
|
128
|
+
`gspec-implement` is responsible for keeping both in sync. This skill only writes the initial unchecked plan file.
|
|
127
129
|
|
|
128
130
|
---
|
|
129
131
|
|
|
130
132
|
## Output Rules
|
|
131
133
|
|
|
132
|
-
- **Use plan mode** in Phase 4. Never write the
|
|
133
|
-
- One
|
|
134
|
+
- **Use plan mode** in Phase 4. Never write the plan file before the user approves.
|
|
135
|
+
- One plan file per feature. Co-located with the PRD as `gspec/features/<feature>.plan.md`.
|
|
134
136
|
- Begin each file with the YAML frontmatter shown above.
|
|
135
137
|
- Preserve existing frontmatter and existing task IDs when regenerating — append new tasks rather than renumbering.
|
|
136
138
|
- 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.
|