gspec 1.3.0 → 1.5.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 +29 -12
- package/bin/gspec.js +18 -3
- package/commands/gspec.analyze.md +166 -0
- package/commands/gspec.architect.md +27 -2
- package/commands/gspec.implement.md +23 -143
- package/commands/gspec.research.md +28 -6
- package/dist/antigravity/gspec-analyze/SKILL.md +170 -0
- package/dist/antigravity/gspec-architect/SKILL.md +28 -3
- package/dist/antigravity/gspec-dor/SKILL.md +2 -2
- package/dist/antigravity/gspec-epic/SKILL.md +1 -1
- package/dist/antigravity/gspec-feature/SKILL.md +1 -1
- package/dist/antigravity/gspec-implement/SKILL.md +24 -144
- package/dist/antigravity/gspec-migrate/SKILL.md +5 -5
- package/dist/antigravity/gspec-practices/SKILL.md +1 -1
- package/dist/antigravity/gspec-profile/SKILL.md +1 -1
- package/dist/antigravity/gspec-record/SKILL.md +2 -2
- package/dist/antigravity/gspec-research/SKILL.md +31 -9
- package/dist/antigravity/gspec-stack/SKILL.md +1 -1
- package/dist/antigravity/gspec-style/SKILL.md +1 -1
- package/dist/claude/gspec-analyze/SKILL.md +171 -0
- package/dist/claude/gspec-architect/SKILL.md +28 -3
- package/dist/claude/gspec-dor/SKILL.md +2 -2
- package/dist/claude/gspec-epic/SKILL.md +1 -1
- package/dist/claude/gspec-feature/SKILL.md +1 -1
- package/dist/claude/gspec-implement/SKILL.md +24 -144
- package/dist/claude/gspec-migrate/SKILL.md +5 -5
- package/dist/claude/gspec-practices/SKILL.md +1 -1
- package/dist/claude/gspec-profile/SKILL.md +1 -1
- package/dist/claude/gspec-record/SKILL.md +2 -2
- package/dist/claude/gspec-research/SKILL.md +31 -9
- package/dist/claude/gspec-stack/SKILL.md +1 -1
- package/dist/claude/gspec-style/SKILL.md +1 -1
- package/dist/codex/gspec-analyze/SKILL.md +170 -0
- package/dist/codex/gspec-architect/SKILL.md +362 -0
- package/dist/codex/gspec-dor/SKILL.md +224 -0
- package/dist/codex/gspec-epic/SKILL.md +232 -0
- package/dist/codex/gspec-feature/SKILL.md +174 -0
- package/dist/codex/gspec-implement/SKILL.md +205 -0
- package/dist/codex/gspec-migrate/SKILL.md +119 -0
- package/dist/codex/gspec-practices/SKILL.md +135 -0
- package/dist/codex/gspec-profile/SKILL.md +221 -0
- package/dist/codex/gspec-record/SKILL.md +172 -0
- package/dist/codex/gspec-research/SKILL.md +302 -0
- package/dist/codex/gspec-stack/SKILL.md +300 -0
- package/dist/codex/gspec-style/SKILL.md +229 -0
- package/dist/cursor/gspec-analyze.mdc +169 -0
- package/dist/cursor/gspec-architect.mdc +28 -3
- package/dist/cursor/gspec-dor.mdc +2 -2
- package/dist/cursor/gspec-epic.mdc +1 -1
- package/dist/cursor/gspec-feature.mdc +1 -1
- package/dist/cursor/gspec-implement.mdc +24 -144
- package/dist/cursor/gspec-migrate.mdc +5 -5
- package/dist/cursor/gspec-practices.mdc +1 -1
- package/dist/cursor/gspec-profile.mdc +1 -1
- package/dist/cursor/gspec-record.mdc +2 -2
- package/dist/cursor/gspec-research.mdc +31 -9
- package/dist/cursor/gspec-stack.mdc +1 -1
- package/dist/cursor/gspec-style.mdc +1 -1
- package/package.json +4 -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 `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, `implement` can take a plain-language description and start building. The remaining commands — `research`, `feature`, `epic`, `architect`, `dor`, and `record` — add structure and rigor when the scope or complexity warrants it.
|
|
28
|
+
The fundamentals give your AI tool enough context to build well — it knows what the product is, how it should look, what technologies to use, and what engineering standards to follow. From there, `implement` can take a plain-language description and start building. The remaining commands — `research`, `feature`, `epic`, `architect`, `analyze`, `dor`, and `record` — add structure and rigor when the scope or complexity warrants it.
|
|
29
29
|
|
|
30
30
|
```mermaid
|
|
31
31
|
flowchart LR
|
|
@@ -42,10 +42,13 @@ flowchart LR
|
|
|
42
42
|
Architect["4. Architect
|
|
43
43
|
technical blueprint"]
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Analyze["5. Analyze
|
|
46
|
+
reconcile specs"]
|
|
47
|
+
|
|
48
|
+
Build["6. Build
|
|
46
49
|
implement"]
|
|
47
50
|
|
|
48
|
-
Iterate["
|
|
51
|
+
Iterate["7. Iterate
|
|
49
52
|
dor · record"]
|
|
50
53
|
|
|
51
54
|
Define --> Research
|
|
@@ -55,7 +58,9 @@ flowchart LR
|
|
|
55
58
|
Research --> Build
|
|
56
59
|
Specify --> Architect
|
|
57
60
|
Specify --> Build
|
|
61
|
+
Architect --> Analyze
|
|
58
62
|
Architect --> Build
|
|
63
|
+
Analyze --> Build
|
|
59
64
|
Build --> Iterate
|
|
60
65
|
Iterate --> Build
|
|
61
66
|
|
|
@@ -63,6 +68,7 @@ flowchart LR
|
|
|
63
68
|
style Research fill:#a855f7,color:#fff,stroke:none
|
|
64
69
|
style Specify fill:#f59e0b,color:#fff,stroke:none
|
|
65
70
|
style Architect fill:#f59e0b,color:#fff,stroke:none
|
|
71
|
+
style Analyze fill:#f59e0b,color:#fff,stroke:none
|
|
66
72
|
style Build fill:#22c55e,color:#fff,stroke:none
|
|
67
73
|
style Iterate fill:#64748b,color:#fff,stroke:none
|
|
68
74
|
```
|
|
@@ -83,9 +89,9 @@ flowchart LR
|
|
|
83
89
|
|
|
84
90
|
| Command | Role | What it produces |
|
|
85
91
|
|---|---|---|
|
|
86
|
-
| `gspec.research` | Product Strategist | Competitive analysis
|
|
92
|
+
| `gspec.research` | Product Strategist | Competitive analysis, feature matrix, gap identification, and additional feature proposals |
|
|
87
93
|
|
|
88
|
-
Use `research` when you want to understand what competitors offer, identify table-stakes features you might be missing,
|
|
94
|
+
Use `research` when you want to understand what competitors offer, identify table-stakes features you might be missing, find differentiation opportunities, and **propose additional features** that serve your product's mission. It reads competitors from your product profile, produces a persistent `gspec/research.md` file, and can optionally generate feature PRDs from its findings and proposals. This is where new feature ideas are surfaced and vetted — not during implementation.
|
|
89
95
|
|
|
90
96
|
**3. Specify What to Build** *(optional)* — Define features and requirements.
|
|
91
97
|
|
|
@@ -100,17 +106,25 @@ Use `feature` when you want a detailed PRD with prioritized capabilities and acc
|
|
|
100
106
|
|
|
101
107
|
| Command | Role | What it produces |
|
|
102
108
|
|---|---|---|
|
|
103
|
-
| `gspec.architect` | Senior Architect | Technical architecture document with data models, API design, project structure, auth flows, and Mermaid diagrams |
|
|
109
|
+
| `gspec.architect` | Senior Architect | Technical architecture document with data models, API design, project structure, auth flows, technical gap analysis, and Mermaid diagrams |
|
|
110
|
+
|
|
111
|
+
Use `architect` when your feature involves significant technical complexity — new data models, service boundaries, auth flows, or integration points that benefit from upfront design. It also **identifies technical gaps and ambiguities** in your specs and proposes solutions, so that `implement` can focus on building rather than making architectural decisions. For straightforward features, `implement` can make sound architectural decisions on its own using your `stack` and `practices` specs.
|
|
112
|
+
|
|
113
|
+
**5. Analyze** *(optional)* — Reconcile discrepancies across specs before building.
|
|
114
|
+
|
|
115
|
+
| Command | Role | What it does |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| `gspec.analyze` | Specification Analyst | Cross-references all specs, identifies contradictions, and walks you through reconciling each one |
|
|
104
118
|
|
|
105
|
-
Use `architect`
|
|
119
|
+
Use `analyze` after `architect` (or any time multiple specs exist) to catch conflicts before `implement` sees them. For example, if the stack says PostgreSQL but the architecture references MongoDB, or a feature PRD defines a data model that contradicts the architecture, `analyze` will surface the discrepancy and let you choose the resolution. Each conflict is presented one at a time with options — no new files are created, only existing specs are updated.
|
|
106
120
|
|
|
107
|
-
**
|
|
121
|
+
**6. Build** — Implement with full context.
|
|
108
122
|
|
|
109
123
|
| Command | Role | What it does |
|
|
110
124
|
|---|---|---|
|
|
111
|
-
| `gspec.implement` | Senior Engineer | Reads all specs
|
|
125
|
+
| `gspec.implement` | Senior Engineer | Reads all specs, plans the build order, and implements |
|
|
112
126
|
|
|
113
|
-
**
|
|
127
|
+
**7. Iterate** *(optional)* — Keep specs and code in sync as the project evolves.
|
|
114
128
|
|
|
115
129
|
| Command | Role | What it does |
|
|
116
130
|
|---|---|---|
|
|
@@ -142,6 +156,7 @@ The CLI will ask which platform you're installing for:
|
|
|
142
156
|
| Claude Code | `.claude/skills/` |
|
|
143
157
|
| Cursor | `.cursor/commands/` |
|
|
144
158
|
| Antigravity | `.agent/skills/` |
|
|
159
|
+
| Codex | `.agents/skills/` |
|
|
145
160
|
|
|
146
161
|
You can skip the prompt by passing a target directly:
|
|
147
162
|
|
|
@@ -149,6 +164,7 @@ You can skip the prompt by passing a target directly:
|
|
|
149
164
|
npx gspec --target claude
|
|
150
165
|
npx gspec --target cursor
|
|
151
166
|
npx gspec --target antigravity
|
|
167
|
+
npx gspec --target codex
|
|
152
168
|
```
|
|
153
169
|
|
|
154
170
|
That's it. The commands are immediately available in your AI tool.
|
|
@@ -186,9 +202,9 @@ These are standard Markdown files. They live in your repo, are version-controlle
|
|
|
186
202
|
|
|
187
203
|
**Incremental implementation.** Feature PRDs use checkboxes to track which capabilities have been built. The `implement` command reads these to know what's done and what's remaining, so it can be run multiple times as your project grows.
|
|
188
204
|
|
|
189
|
-
**
|
|
205
|
+
**Research and architecture own discovery.** Feature proposals and technical gap analysis happen *before* implementation — in `research` and `architect` respectively. The `research` command surfaces new feature ideas through competitive analysis and product-driven reasoning. The `architect` command identifies technical gaps and resolves ambiguities. This separation keeps `implement` focused on building what the specs define, rather than proposing scope changes mid-build.
|
|
190
206
|
|
|
191
|
-
**Platform-agnostic.** A single set of source commands builds for Claude Code, Cursor, and
|
|
207
|
+
**Platform-agnostic.** A single set of source commands builds for Claude Code, Cursor, Antigravity, and Codex. The build system handles platform-specific formatting so the commands stay consistent across tools.
|
|
192
208
|
|
|
193
209
|
## Supported Platforms
|
|
194
210
|
|
|
@@ -197,6 +213,7 @@ These are standard Markdown files. They live in your repo, are version-controlle
|
|
|
197
213
|
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | Skills format | Supported |
|
|
198
214
|
| [Cursor](https://www.cursor.com/) | Commands format | Supported |
|
|
199
215
|
| [Antigravity](https://www.antigravity.dev/) | Skills format | Supported |
|
|
216
|
+
| [Codex](https://developers.openai.com/codex/cli/) | Skills format | Supported |
|
|
200
217
|
|
|
201
218
|
## Project Status
|
|
202
219
|
|
package/bin/gspec.js
CHANGED
|
@@ -45,12 +45,19 @@ const TARGETS = {
|
|
|
45
45
|
label: 'Antigravity',
|
|
46
46
|
layout: 'directory',
|
|
47
47
|
},
|
|
48
|
+
codex: {
|
|
49
|
+
sourceDir: join(DIST_DIR, 'codex'),
|
|
50
|
+
installDir: '.agents/skills',
|
|
51
|
+
label: 'Codex',
|
|
52
|
+
layout: 'directory',
|
|
53
|
+
},
|
|
48
54
|
};
|
|
49
55
|
|
|
50
56
|
const TARGET_CHOICES = [
|
|
51
57
|
{ key: '1', name: 'claude', label: 'Claude Code' },
|
|
52
58
|
{ key: '2', name: 'cursor', label: 'Cursor' },
|
|
53
59
|
{ key: '3', name: 'antigravity', label: 'Antigravity' },
|
|
60
|
+
{ key: '4', name: 'codex', label: 'Codex' },
|
|
54
61
|
];
|
|
55
62
|
|
|
56
63
|
function promptTarget() {
|
|
@@ -63,7 +70,7 @@ function promptTarget() {
|
|
|
63
70
|
console.log();
|
|
64
71
|
|
|
65
72
|
return new Promise((resolve) => {
|
|
66
|
-
rl.question(chalk.bold(' Select [1-
|
|
73
|
+
rl.question(chalk.bold(' Select [1-4]: '), (answer) => {
|
|
67
74
|
rl.close();
|
|
68
75
|
const trimmed = answer.trim().toLowerCase();
|
|
69
76
|
|
|
@@ -76,7 +83,7 @@ function promptTarget() {
|
|
|
76
83
|
if (byName) return resolve(byName.name);
|
|
77
84
|
|
|
78
85
|
console.error(chalk.red(`\nInvalid selection: "${answer.trim()}"`));
|
|
79
|
-
console.error(`Valid options: 1, 2, 3, claude, cursor, antigravity`);
|
|
86
|
+
console.error(`Valid options: 1, 2, 3, 4, claude, cursor, antigravity, codex`);
|
|
80
87
|
process.exit(1);
|
|
81
88
|
});
|
|
82
89
|
});
|
|
@@ -209,12 +216,20 @@ async function install(targetName, cwd) {
|
|
|
209
216
|
: await installDirectory(target, cwd);
|
|
210
217
|
|
|
211
218
|
console.log(chalk.bold(`\n${count} skills installed to ${target.installDir}/\n`));
|
|
219
|
+
|
|
220
|
+
// Create gspec/ directory and install README
|
|
221
|
+
const gspecDir = join(cwd, 'gspec');
|
|
222
|
+
await mkdir(gspecDir, { recursive: true });
|
|
223
|
+
const readmeContent = await readFile(join(__dirname, '..', 'README.md'), 'utf-8');
|
|
224
|
+
await writeFile(join(gspecDir, 'README.md'), readmeContent, 'utf-8');
|
|
225
|
+
console.log(chalk.bold(` Created gspec/ directory with README.md\n`));
|
|
212
226
|
}
|
|
213
227
|
|
|
214
228
|
const MIGRATE_COMMANDS = {
|
|
215
229
|
claude: '/gspec-migrate',
|
|
216
230
|
cursor: '/gspec-migrate',
|
|
217
231
|
antigravity: '/gspec-migrate',
|
|
232
|
+
codex: '/gspec-migrate',
|
|
218
233
|
};
|
|
219
234
|
|
|
220
235
|
function parseGspecVersion(content) {
|
|
@@ -297,7 +312,7 @@ program
|
|
|
297
312
|
.name('gspec')
|
|
298
313
|
.description('Install gspec specification commands')
|
|
299
314
|
.version(pkg.version)
|
|
300
|
-
.option('-t, --target <target>', 'target platform (claude, cursor, antigravity)')
|
|
315
|
+
.option('-t, --target <target>', 'target platform (claude, cursor, antigravity, codex)')
|
|
301
316
|
.action(async (opts) => {
|
|
302
317
|
console.log(BANNER);
|
|
303
318
|
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
You are a Specification Analyst at a high-performing software company.
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
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
|
+
|
|
7
|
+
You should:
|
|
8
|
+
- Read and deeply cross-reference all available gspec documents
|
|
9
|
+
- Identify concrete discrepancies — not style differences or minor wording variations, but substantive contradictions where two specs disagree on a fact, technology, behavior, or requirement
|
|
10
|
+
- Present each discrepancy to the user one at a time, clearly showing what each spec says and why they conflict
|
|
11
|
+
- Offer 2-3 resolution options with tradeoffs when applicable
|
|
12
|
+
- Wait for the user's decision before moving to the next discrepancy
|
|
13
|
+
- Update the affected spec files to reflect each resolution
|
|
14
|
+
- Never create new markdown files — only update existing ones
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
### Phase 1: Read All Specs
|
|
21
|
+
|
|
22
|
+
Read **every** available gspec document in this order:
|
|
23
|
+
|
|
24
|
+
1. `gspec/profile.md` — Product identity, scope, audience, and positioning
|
|
25
|
+
2. `gspec/stack.md` — Technology choices, frameworks, infrastructure
|
|
26
|
+
3. `gspec/style.md` — Visual design language, tokens, component patterns
|
|
27
|
+
4. `gspec/practices.md` — Development standards, testing, conventions
|
|
28
|
+
5. `gspec/architecture.md` — Technical blueprint: project structure, data model, API design, environment
|
|
29
|
+
6. `gspec/research.md` — Competitive analysis and feature proposals
|
|
30
|
+
7. `gspec/epics/*.md` — Epic structure and feature dependencies
|
|
31
|
+
8. `gspec/features/*.md` — Individual feature requirements
|
|
32
|
+
|
|
33
|
+
If fewer than two spec files exist, inform the user that there is nothing to cross-reference and stop.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
### Phase 2: Cross-Reference and Identify Discrepancies
|
|
38
|
+
|
|
39
|
+
Systematically compare specs against each other. Look for these categories of discrepancy:
|
|
40
|
+
|
|
41
|
+
#### Technology Conflicts
|
|
42
|
+
- A technology named in `stack.md` differs from what `architecture.md` specifies (e.g., stack says PostgreSQL but architecture references MongoDB)
|
|
43
|
+
- A feature PRD references a library or framework not present in the stack
|
|
44
|
+
- Architecture specifies patterns or conventions that contradict the stack's framework choices
|
|
45
|
+
|
|
46
|
+
#### Data Model Conflicts
|
|
47
|
+
- A feature PRD describes data fields or entities that conflict with the data model in `architecture.md`
|
|
48
|
+
- Two feature PRDs define the same entity differently
|
|
49
|
+
- Architecture references entities not mentioned in any feature PRD, or vice versa
|
|
50
|
+
|
|
51
|
+
#### API & Endpoint Conflicts
|
|
52
|
+
- A feature PRD describes an API behavior that conflicts with the API design in `architecture.md`
|
|
53
|
+
- Architecture defines endpoints that don't map to any feature capability
|
|
54
|
+
- Authentication or authorization requirements differ between specs
|
|
55
|
+
|
|
56
|
+
#### Design & Style Conflicts
|
|
57
|
+
- A feature PRD references visual patterns or components that contradict `style.md`
|
|
58
|
+
- Architecture's component structure doesn't align with the design system in `style.md`
|
|
59
|
+
|
|
60
|
+
#### Practice & Convention Conflicts
|
|
61
|
+
- Architecture's file naming, testing approach, or code organization contradicts `practices.md`
|
|
62
|
+
- Feature PRDs reference development patterns that conflict with documented practices
|
|
63
|
+
|
|
64
|
+
#### Scope & Priority Conflicts
|
|
65
|
+
- A feature capability is marked P0 in one place but P1 or P2 in another
|
|
66
|
+
- Profile describes scope or positioning that conflicts with what features actually define
|
|
67
|
+
- Epic dependency ordering conflicts with feature priority levels
|
|
68
|
+
- Research recommendations conflict with decisions already made in other specs
|
|
69
|
+
|
|
70
|
+
#### Behavioral Conflicts
|
|
71
|
+
- Two specs describe the same user flow differently
|
|
72
|
+
- Acceptance criteria in a feature PRD contradict architectural decisions
|
|
73
|
+
- Edge cases handled differently across specs
|
|
74
|
+
|
|
75
|
+
**Do NOT flag:**
|
|
76
|
+
- Minor wording or style differences that don't change meaning
|
|
77
|
+
- Missing information (gaps are for `gspec-architect` to handle)
|
|
78
|
+
- Differences in level of detail (one spec being more detailed than another is expected)
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### Phase 3: Present Discrepancies for Reconciliation
|
|
83
|
+
|
|
84
|
+
If no discrepancies are found, tell the user their specs are consistent and stop.
|
|
85
|
+
|
|
86
|
+
If discrepancies are found:
|
|
87
|
+
|
|
88
|
+
1. **Summarize** the total number of discrepancies found, grouped by category
|
|
89
|
+
2. **Present each discrepancy one at a time**, in order of severity (most impactful first)
|
|
90
|
+
|
|
91
|
+
For each discrepancy, present:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
### Discrepancy [N]: [Brief title]
|
|
95
|
+
|
|
96
|
+
**Category:** [Technology / Data Model / API / Design / Practice / Scope / Behavioral]
|
|
97
|
+
|
|
98
|
+
**What conflicts:**
|
|
99
|
+
- **[File A] says:** [exact quote or precise summary]
|
|
100
|
+
- **[File B] says:** [exact quote or precise summary]
|
|
101
|
+
|
|
102
|
+
**Why this matters:** [1-2 sentences on what goes wrong if this isn't resolved — e.g., the implementing agent will receive contradictory instructions]
|
|
103
|
+
|
|
104
|
+
**Options:**
|
|
105
|
+
1. **[Option A]** — [Description]. Update [File X].
|
|
106
|
+
2. **[Option B]** — [Description]. Update [File Y].
|
|
107
|
+
3. **[Option C, if applicable]** — [Description]. Update [both files / different resolution].
|
|
108
|
+
|
|
109
|
+
Which would you like?
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Wait for the user's response before proceeding.** The user may:
|
|
113
|
+
- Choose an option by number
|
|
114
|
+
- Provide a different resolution
|
|
115
|
+
- Ask for more context
|
|
116
|
+
- Skip the discrepancy (mark it as deferred)
|
|
117
|
+
|
|
118
|
+
After the user decides, immediately update the affected spec file(s) to reflect the resolution. Then present the next discrepancy.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### Phase 4: Apply Resolutions
|
|
123
|
+
|
|
124
|
+
When updating specs to resolve a discrepancy:
|
|
125
|
+
|
|
126
|
+
- **Surgical updates only** — change the minimum text needed to resolve the conflict
|
|
127
|
+
- **Preserve format and tone** — match the existing document's style, heading structure, and voice
|
|
128
|
+
- **Preserve `gspec-version` frontmatter** — do not alter or remove it
|
|
129
|
+
- **Do not rewrite sections** — if a one-line change resolves the conflict, make a one-line change
|
|
130
|
+
- **Do not add changelog annotations** — the git history captures what changed
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
### Phase 5: Final Verification
|
|
135
|
+
|
|
136
|
+
After all discrepancies have been resolved (or deferred):
|
|
137
|
+
|
|
138
|
+
1. **Re-read the updated specs** to confirm the resolutions didn't introduce new conflicts
|
|
139
|
+
2. **Present a summary:**
|
|
140
|
+
- Number of discrepancies found
|
|
141
|
+
- Number resolved
|
|
142
|
+
- Number deferred (if any), with a note on what remains unresolved
|
|
143
|
+
- List of files that were updated
|
|
144
|
+
3. If new conflicts were introduced by the resolutions, flag them and guide the user through resolving those as well
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Rules
|
|
149
|
+
|
|
150
|
+
- **Never create new files.** This command only reads and updates existing gspec documents.
|
|
151
|
+
- **Never silently update specs.** Every change requires user approval via the discrepancy resolution flow.
|
|
152
|
+
- **One discrepancy at a time.** Do not batch resolutions — the user decides each one individually.
|
|
153
|
+
- **Be precise about what conflicts.** Quote or closely paraphrase the conflicting text. Do not be vague.
|
|
154
|
+
- **Prioritize by impact.** Present discrepancies that would cause the most confusion during implementation first.
|
|
155
|
+
- **Stay neutral.** Present options fairly. You may recommend a preferred option, but do not presume the user's choice.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Tone & Style
|
|
160
|
+
|
|
161
|
+
- Precise and analytical — you are cross-referencing documents, not rewriting them
|
|
162
|
+
- Neutral when presenting options — let the user decide, recommend but don't presume
|
|
163
|
+
- Efficient — get to the conflicts quickly, don't over-explain what each spec is for
|
|
164
|
+
- Respectful of existing specs — these are authoritative documents, you are finding where they disagree
|
|
165
|
+
|
|
166
|
+
<<<ANALYZE_CONTEXT>>>
|
|
@@ -2,11 +2,15 @@ You are a Senior Software Architect at a high-performing software company.
|
|
|
2
2
|
|
|
3
3
|
Your task is to take the established product specifications and produce a **Technical Architecture Document** that provides the concrete technical blueprint for implementation. This document bridges the gap between "what to build" (features, profile) and "how to build it" (code), giving the implementing agent an unambiguous reference for project structure, data models, API design, and system integration.
|
|
4
4
|
|
|
5
|
+
Beyond defining the architecture, you are also responsible for **identifying technical gaps and ambiguities** in the existing specs and **proposing implementation solutions**. This is the place in the gspec workflow where underspecified technical behavior is surfaced and resolved — so that `gspec-implement` can focus on building rather than making architectural decisions.
|
|
6
|
+
|
|
5
7
|
This command is meant to be run **after** the foundation specs (profile, stack, style, practices) and feature specs (features, epics) are defined, and **before** `gspec-implement`.
|
|
6
8
|
|
|
7
9
|
You should:
|
|
8
10
|
- Read all existing gspec documents first — this architecture must serve the product, stack, style, and features already defined
|
|
9
11
|
- Translate product requirements into concrete technical decisions
|
|
12
|
+
- **Identify technical gaps** in the specs — missing edge cases, unspecified behaviors, undefined data models, ambiguous integration points, unclear state management patterns
|
|
13
|
+
- **Propose solutions** for each gap — offer 2-3 concrete options when multiple approaches are viable, recommend a preferred approach with rationale
|
|
10
14
|
- Be specific and prescriptive — this document tells the implementing agent exactly where files go, what the data looks like, and how components connect
|
|
11
15
|
- Reference specific technologies from `gspec/stack.md` — unlike feature PRDs, this document is technology-aware
|
|
12
16
|
- Map every architectural element back to the feature(s) it serves
|
|
@@ -311,9 +315,30 @@ Introduced by: [User Authentication](../features/user-authentication.md)
|
|
|
311
315
|
- Database setup (create, migrate, seed)
|
|
312
316
|
- Local development startup command
|
|
313
317
|
|
|
314
|
-
### 9.
|
|
318
|
+
### 9. Technical Gap Analysis
|
|
319
|
+
|
|
320
|
+
This section captures gaps and ambiguities found in the existing specs during architecture design, along with the proposed or resolved solutions. This ensures `gspec-implement` has clear guidance and doesn't need to make architectural decisions during implementation.
|
|
321
|
+
|
|
322
|
+
#### Identified Gaps
|
|
323
|
+
For each gap found in the feature PRDs, profile, or other specs:
|
|
324
|
+
- **What's missing or ambiguous** — describe the gap clearly
|
|
325
|
+
- **Why it matters** — what breaks or is unclear without resolving this
|
|
326
|
+
- **Proposed solution** — your recommended approach (with 2-3 options when multiple approaches are viable)
|
|
327
|
+
- **Resolution** — whether the user approved the solution, chose an alternative, or deferred the decision
|
|
328
|
+
|
|
329
|
+
Examples of gaps to look for:
|
|
330
|
+
- Missing edge cases or error handling scenarios
|
|
331
|
+
- Unspecified user flows or interactions
|
|
332
|
+
- Ambiguous or missing acceptance criteria on capabilities
|
|
333
|
+
- Undefined data models or API contracts not covered elsewhere in this document
|
|
334
|
+
- Integration points that aren't fully described
|
|
335
|
+
- Missing or unclear state management patterns
|
|
336
|
+
- Patterns that differ from established conventions without clear rationale
|
|
337
|
+
|
|
338
|
+
#### Assumptions
|
|
315
339
|
- Technical decisions that were inferred rather than explicitly specified in existing specs
|
|
316
|
-
|
|
340
|
+
|
|
341
|
+
### 10. Open Decisions
|
|
317
342
|
- Areas where the architecture may need to evolve as features are implemented
|
|
318
343
|
- Questions that should be resolved before or during implementation
|
|
319
344
|
|