gspec 1.0.1 → 1.0.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Baller Software
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,6 +1,62 @@
1
- # gspec Commands
1
+ # gspec
2
2
 
3
- This directory contains slash commands for generating project specification documents. Each command produces a standalone Markdown document in the `gspec/` folder.
3
+ **Structured product specifications for AI-assisted development.**
4
+
5
+ AI coding tools are powerful, but they build better software when they understand *what* you're building and *why*. gspec gives your AI tools that context — a set of living specification documents that define your product, guide implementation, and stay in sync as your project evolves.
6
+
7
+ Without structured context, AI tools guess. They make assumptions about your audience, your tech stack, your design language, and your quality standards. gspec eliminates that guesswork by creating a shared specification layer that any AI coding tool can read and follow.
8
+
9
+ ## The Problem
10
+
11
+ Two things go wrong when building with AI:
12
+
13
+ 1. **AI tools lack product context.** They don't know your target audience, your design system, your architectural decisions, or your engineering standards. Every prompt starts from zero.
14
+ 2. **Specs drift from reality.** Even when you write great specs upfront, they fall out of sync as the project evolves — leading to inconsistency, rework, and compounding confusion.
15
+
16
+ gspec solves both problems. It provides a structured specification workflow that gives AI tools rich context, and keeps that context accurate as your codebase changes.
17
+
18
+ ## How It Works
19
+
20
+ gspec installs as a set of slash commands (skills) in your AI coding tool. Each command plays a specific role — business strategist, product manager, architect, designer, engineer — and produces a structured Markdown document in your project's `gspec/` directory.
21
+
22
+ These documents become the shared context for all subsequent AI interactions. When you implement features, your AI reads the specs. When the code changes, the specs update to match.
23
+
24
+ ### The Workflow
25
+
26
+ ```
27
+ Define → Specify → Build → Iterate
28
+ ```
29
+
30
+ **1. Define the Fundamentals** — Establish the foundation that drives every decision.
31
+
32
+ | Command | Role | What it produces |
33
+ |---|---|---|
34
+ | `gspec.profile` | Business Strategist | Product identity, audience, value proposition, positioning |
35
+ | `gspec.style` | UI/UX Designer | Visual design language, design tokens, component patterns |
36
+ | `gspec.stack` | Software Architect | Technology stack, frameworks, infrastructure, architecture |
37
+ | `gspec.practices` | Engineering Lead | Development standards, code quality, testing, workflows |
38
+
39
+ **2. Specify What to Build** — Define features and requirements.
40
+
41
+ | Command | Role | What it produces |
42
+ |---|---|---|
43
+ | `gspec.feature` | Product Manager | PRD for a single feature with prioritized capabilities |
44
+ | `gspec.epic` | Product Manager | Breaks a large epic into multiple feature PRDs with dependency mapping |
45
+
46
+ **3. Build** — Implement with full context.
47
+
48
+ | Command | Role | What it does |
49
+ |---|---|---|
50
+ | `gspec.implement` | Senior Engineer | Reads all specs, identifies gaps, researches competitors, plans and builds |
51
+
52
+ **4. Iterate** — Keep specs and code in sync as the project evolves.
53
+
54
+ | Command | Role | What it does |
55
+ |---|---|---|
56
+ | `gspec.dor` | Engineer + Doc Lead | Makes code changes and updates specs to match |
57
+ | `gspec.record` | Doc Lead | Updates specs to reflect decisions or changes — no code modifications |
58
+
59
+ Each command is self-contained and will ask clarifying questions when essential information is missing.
4
60
 
5
61
  ## Installation
6
62
 
@@ -18,68 +74,65 @@ The CLI will ask which platform you're installing for:
18
74
  | Cursor | `.cursor/commands/` |
19
75
  | Antigravity | `.agent/skills/` |
20
76
 
21
- You can also skip the prompt by passing a target directly:
77
+ You can skip the prompt by passing a target directly:
22
78
 
23
79
  ```bash
80
+ npx gspec --target claude
24
81
  npx gspec --target cursor
82
+ npx gspec --target antigravity
25
83
  ```
26
84
 
27
- ## Commands
85
+ That's it. The commands are immediately available in your AI tool.
28
86
 
29
- | Command | Role | Output | Description |
30
- |---|---|---|---|
31
- | `gspec.profile` | Business Strategist | `gspec/profile.md` | Product identity, audience, value proposition, and positioning |
32
- | `gspec.feature` | Product Manager | `gspec/features/<name>.md` | Product Requirements Document (PRD) for a specific feature |
33
- | `gspec.epic` | Product Manager | `gspec/epics/<name>.md` + `gspec/features/*.md` | Breaks down a large epic into multiple focused feature PRDs with dependency mapping and phasing |
34
- | `gspec.style` | UI/UX Designer | `gspec/style.md` | Visual style guide, design tokens, and component patterns |
35
- | `gspec.stack` | Software Architect | `gspec/stack.md` | Technology stack, frameworks, infrastructure, and tooling |
36
- | `gspec.practices` | Engineering Lead | `gspec/practices.md` | Development practices, code quality standards, and workflows |
37
- | `gspec.implement` | Senior Engineer / Tech Lead | Code files | Reads gspec docs, identifies gaps, plans and builds the software |
38
- | `gspec.dor` | Engineer + Doc Lead | Code files + `gspec/*.md` | Makes code changes and updates gspec specs to keep documentation in sync |
39
- | `gspec.record` | Doc Lead | `gspec/*.md` | Updates gspec specs to reflect changes, decisions, or context — no code changes |
87
+ ## Output Structure
40
88
 
41
- ## Workflow
89
+ All specifications live in a `gspec/` directory at your project root:
42
90
 
43
- ### 1. Fundamentals
91
+ ```
92
+ project-root/
93
+ └── gspec/
94
+ ├── profile.md # Product identity and positioning
95
+ ├── style.md # Visual design language
96
+ ├── stack.md # Technology stack and architecture
97
+ ├── practices.md # Development standards
98
+ ├── epics/
99
+ │ └── onboarding-flow.md
100
+ └── features/
101
+ ├── user-authentication.md
102
+ ├── dashboard-analytics.md
103
+ └── ...
104
+ ```
44
105
 
45
- Define the foundation that drives how your entire application is built.
106
+ These are standard Markdown files. They live in your repo, are version-controlled with your code, and are readable by both humans and AI tools.
46
107
 
47
- - **`gspec.profile`** Define *what* the product is, who it's for, and why it exists
48
- - **`gspec.style`** — Define the visual design language and design system
49
- - **`gspec.stack`** — Define the technology choices and architecture
50
- - **`gspec.practices`** — Define the development standards and engineering practices
108
+ ## Key Design Decisions
51
109
 
52
- ### 2. Pre-Build
110
+ **Spec-first development.** Every implementation decision traces back to a specification. AI tools don't guess — they follow documented decisions about your product, stack, design, and standards.
53
111
 
54
- Define *what* to build.
112
+ **Living documents.** Specifications aren't write-once artifacts. The `dor` and `record` commands keep them in sync as your project evolves, so they remain a reliable source of truth.
55
113
 
56
- - **`gspec.epic`** Break down a large body of work into multiple feature PRDs with dependencies and phasing
57
- - **`gspec.feature`** — Define individual features and requirements (run once per feature)
114
+ **Role-based commands.** Each command adopts a specific professional perspective product manager, architect, designer, engineer. This ensures specifications are comprehensive and consider multiple viewpoints.
58
115
 
59
- ### 3. Build
116
+ **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.
60
117
 
61
- - **`gspec.implement`** Implement the software using all generated gspec documents
118
+ **Competitive research.** The `implement` command can optionally research competitors named in your product profile, identifying table-stakes features you might be missing and opportunities for differentiation.
62
119
 
63
- ### 4. Iterate
120
+ **Platform-agnostic.** A single set of source commands builds for Claude Code, Cursor, and Antigravity. The build system handles platform-specific formatting so the commands stay consistent across tools.
64
121
 
65
- - **`gspec.dor`** — Make code changes and update gspec specs to keep documentation in sync
66
- - **`gspec.record`** — Record decisions, changes, or context to gspec specs without touching code
122
+ ## Supported Platforms
67
123
 
68
- > Each command is self-contained and will ask clarifying questions when essential information is missing.
124
+ | Platform | Version | Status |
125
+ |---|---|---|
126
+ | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | Skills format | Supported |
127
+ | [Cursor](https://www.cursor.com/) | Commands format | Supported |
128
+ | [Antigravity](https://www.antigravity.dev/) | Skills format | Supported |
69
129
 
70
- ## Output Structure
130
+ ## Project Status
71
131
 
72
- ```
73
- project-root/
74
- └── gspec/
75
- ├── profile.md
76
- ├── style.md
77
- ├── stack.md
78
- ├── practices.md
79
- ├── epics/
80
- │ └── onboarding-flow.md
81
- └── features/
82
- ├── user-authentication.md
83
- ├── dashboard-analytics.md
84
- └── ...
85
- ```
132
+ gspec is early-stage and actively evolving. The core workflow is stable, but commands and output formats may change as AI tool capabilities expand and user feedback comes in.
133
+
134
+ If you run into issues or have ideas, please [open an issue](https://github.com/gballer77/gspec/issues).
135
+
136
+ ## License
137
+
138
+ [MIT](LICENSE)
package/bin/gspec.js CHANGED
@@ -9,19 +9,21 @@ import chalk from 'chalk';
9
9
 
10
10
  const __dirname = dirname(fileURLToPath(import.meta.url));
11
11
  const DIST_DIR = join(__dirname, '..', 'dist');
12
+ const pkg = JSON.parse(await readFile(join(__dirname, '..', 'package.json'), 'utf-8'));
12
13
 
13
14
  const BANNER = `
14
- ${chalk.cyan('╔══════════════════════════════════════════╗')}
15
- ${chalk.cyan('║')} ${chalk.cyan('║')}
16
- ${chalk.cyan('║')} ${chalk.bold.white(' ██████ ███████ ██████ ███████ ██████')} ${chalk.cyan('║')}
17
- ${chalk.cyan('║')} ${chalk.bold.white('██ ██ ██ ██ ██ ██ ')} ${chalk.cyan('║')}
18
- ${chalk.cyan('║')} ${chalk.bold.white('██ ███ ███████ ██████ █████ ██ ')} ${chalk.cyan('║')}
19
- ${chalk.cyan('║')} ${chalk.bold.white('██ ██ ██ ██ ██ ██ ')} ${chalk.cyan('║')}
20
- ${chalk.cyan('║')} ${chalk.bold.white(' ██████ ███████ ██ ███████ ██████')} ${chalk.cyan('║')}
21
- ${chalk.cyan('║')} ${chalk.cyan('║')}
22
- ${chalk.cyan('║')} ${chalk.dim('AI-powered project specification tools')} ${chalk.cyan('║')}
23
- ${chalk.cyan('║')} ${chalk.cyan('║')}
24
- ${chalk.cyan('╚══════════════════════════════════════════╝')}
15
+ ${chalk.cyan('╔══════════════════════════════════════════════╗')}
16
+ ${chalk.cyan('║')} ${chalk.cyan('║')}
17
+ ${chalk.cyan('║')} ${chalk.bold.white(' ██████ ███████ ██████ ███████ ██████')} ${chalk.cyan('║')}
18
+ ${chalk.cyan('║')} ${chalk.bold.white('██ ██ ██ ██ ██ ██ ')} ${chalk.cyan('║')}
19
+ ${chalk.cyan('║')} ${chalk.bold.white('██ ███ ███████ ██████ █████ ██ ')} ${chalk.cyan('║')}
20
+ ${chalk.cyan('║')} ${chalk.bold.white('██ ██ ██ ██ ██ ██ ')} ${chalk.cyan('║')}
21
+ ${chalk.cyan('║')} ${chalk.bold.white(' ██████ ███████ ██ ███████ ██████')} ${chalk.cyan('║')}
22
+ ${chalk.cyan('║')} ${chalk.cyan('║')}
23
+ ${chalk.cyan('║')} ${chalk.dim('AI-powered project specification tools')} ${chalk.cyan('║')}
24
+ ${chalk.cyan('║')} ${chalk.cyan('║')}
25
+ ${chalk.cyan('╚══════════════════════════════════════════════╝')}
26
+ ${chalk.white('═════════════════════════════baller.software═══')}
25
27
  `;
26
28
 
27
29
  const TARGETS = {
@@ -96,8 +98,9 @@ async function findExistingFiles(target, cwd) {
96
98
 
97
99
  try {
98
100
  await stat(destBase);
99
- } catch {
100
- return existing;
101
+ } catch (e) {
102
+ if (e.code === 'ENOENT') return existing;
103
+ throw e;
101
104
  }
102
105
 
103
106
  if (target.layout === 'flat') {
@@ -106,7 +109,9 @@ async function findExistingFiles(target, cwd) {
106
109
  try {
107
110
  await stat(join(destBase, file));
108
111
  existing.push(file);
109
- } catch { /* doesn't exist */ }
112
+ } catch (e) {
113
+ if (e.code !== 'ENOENT') throw e;
114
+ }
110
115
  }
111
116
  } else {
112
117
  const srcEntries = await readdir(target.sourceDir);
@@ -116,7 +121,9 @@ async function findExistingFiles(target, cwd) {
116
121
  try {
117
122
  await stat(join(destBase, entry, 'SKILL.md'));
118
123
  existing.push(`${entry}/SKILL.md`);
119
- } catch { /* doesn't exist */ }
124
+ } catch (e) {
125
+ if (e.code !== 'ENOENT') throw e;
126
+ }
120
127
  }
121
128
  }
122
129
 
@@ -207,7 +214,7 @@ async function install(targetName, cwd) {
207
214
  program
208
215
  .name('gspec')
209
216
  .description('Install gspec specification commands')
210
- .version('1.0.0')
217
+ .version(pkg.version)
211
218
  .option('-t, --target <target>', 'target platform (claude, cursor, antigravity)')
212
219
  .action(async (opts) => {
213
220
  console.log(BANNER);
@@ -58,6 +58,17 @@ Execute the code changes:
58
58
  5. **Surface new issues as they arise** — If implementation reveals new ambiguities, pause and consult the user rather than making silent assumptions
59
59
  6. **Track spec implications as you work** — As you implement, mentally note which gspec documents will need updating based on what you are changing
60
60
 
61
+ ### Phase 3.5: Validate — Ensure Tests Pass
62
+
63
+ Before updating any specs, verify the code changes are sound:
64
+
65
+ 1. **Check for existing tests** — Look for a test suite, test runner configuration, or test scripts in `package.json`, `Makefile`, or equivalent
66
+ 2. **If tests exist, run them** — Execute the project's test suite and confirm all tests pass
67
+ 3. **If tests fail** — Fix the failing tests before proceeding. Do not move to spec updates with a broken test suite
68
+ 4. **If no tests exist** — Note this and proceed. Do not create a test suite unless the user requests one or `gspec/practices.md` requires it
69
+
70
+ This gate ensures specs are only updated to reflect working, validated code — never broken implementations.
71
+
61
72
  ### Phase 4: Assess — Determine Spec Impact
62
73
 
63
74
  After code changes are complete, systematically evaluate which gspec documents need updating. Apply this decision matrix:
@@ -70,7 +81,8 @@ After code changes are complete, systematically evaluate which gspec documents n
70
81
  | New technology or dependency added | `gspec/stack.md` | Add to appropriate section with rationale |
71
82
  | Technology or dependency removed | `gspec/stack.md` | Remove and note why |
72
83
  | Technology version changed | `gspec/stack.md` | Update version |
73
- | Visual design change (colors, typography, spacing, components) | `gspec/style.md` | Update affected tokens, components, or patterns |
84
+ | Visual design change — generic (colors, typography, spacing, base component patterns) | `gspec/style.md` | Update affected tokens or base component patterns. Only include changes that are reusable and not tied to a specific feature or domain |
85
+ | Visual design change — feature-specific (a component unique to a feature, domain-specific visual treatment) | `gspec/features/<relevant>.md` | Document the visual details in the feature PRD's capabilities or a dedicated "Visual Design" subsection |
74
86
  | Development practice change (testing, code org, conventions) | `gspec/practices.md` | Update affected practice |
75
87
  | Product scope or direction change | `gspec/profile.md` | Update affected sections (Product Description, Use Cases, Roadmap, etc.) |
76
88
  | Feature dependency change | `gspec/epics/<relevant>.md` | Update dependency map and phasing |
@@ -150,6 +162,8 @@ After writing spec updates:
150
162
 
151
163
  **Traceability without clutter.** A brief note about why something changed is valuable for future readers. A changelog at the bottom of every file is not. Use judgment. For small, obvious changes, no annotation may be needed. For significant scope changes, a parenthetical note aids understanding.
152
164
 
165
+ **Keep `style.md` generic and reusable.** The style guide defines the design system — colors, typography, spacing, base component patterns, and tokens that could apply to any product. Do not add feature-specific or domain-specific content to `style.md` (e.g., "recipe card layout", "playlist item styling"). Feature-specific visual details belong in the relevant feature PRD. If you are unsure whether a visual change is generic or feature-specific, ask the user.
166
+
153
167
  **When to create vs. update.** If a change adds a small capability that fits naturally within an existing feature PRD, update that PRD. If a change introduces a wholly new product area that does not belong in any existing PRD, create a new feature PRD. When in doubt, ask the user.
154
168
 
155
169
  **Implementation checkboxes.** Feature PRDs use markdown checkboxes (`- [ ]` / `- [x]`) on capabilities to track implementation status for `gspec-implement`. When DOR adds new capabilities, use unchecked checkboxes (`- [ ]`). When modifying a capability that was already checked (`- [x]`) and the code change reflects the modification, keep it checked. When creating a new feature PRD, use unchecked checkboxes for all capabilities. Do not check off capabilities that DOR did not implement in the current session.
@@ -65,7 +65,8 @@ Systematically evaluate which gspec documents need updating. Apply this decision
65
65
  | New technology or dependency added | `gspec/stack.md` | Add to appropriate section with rationale |
66
66
  | Technology or dependency removed | `gspec/stack.md` | Remove and note why |
67
67
  | Technology version changed | `gspec/stack.md` | Update version |
68
- | Visual design change (colors, typography, spacing, components) | `gspec/style.md` | Update affected tokens, components, or patterns |
68
+ | Visual design change — generic (colors, typography, spacing, base component patterns) | `gspec/style.md` | Update affected tokens or base component patterns. Only include changes that are reusable and not tied to a specific feature or domain |
69
+ | Visual design change — feature-specific (a component unique to a feature, domain-specific visual treatment) | `gspec/features/<relevant>.md` | Document the visual details in the feature PRD's capabilities or a dedicated "Visual Design" subsection |
69
70
  | Development practice change (testing, code org, conventions) | `gspec/practices.md` | Update affected practice |
70
71
  | Product scope or direction change | `gspec/profile.md` | Update affected sections (Product Description, Use Cases, Roadmap, etc.) |
71
72
  | Feature dependency change | `gspec/epics/<relevant>.md` | Update dependency map and phasing |
@@ -143,6 +144,8 @@ After writing spec updates:
143
144
 
144
145
  **Traceability without clutter.** A brief note about why something changed is valuable for future readers. A changelog at the bottom of every file is not. Use judgment.
145
146
 
147
+ **Keep `style.md` generic and reusable.** The style guide defines the design system — colors, typography, spacing, base component patterns, and tokens that could apply to any product. Do not add feature-specific or domain-specific content to `style.md` (e.g., "recipe card layout", "playlist item styling"). Feature-specific visual details belong in the relevant feature PRD. If you are unsure whether a visual change is generic or feature-specific, ask the user.
148
+
146
149
  **When to create vs. update.** If a change adds a small capability that fits naturally within an existing feature PRD, update that PRD. If a change introduces a wholly new product area that does not belong in any existing PRD, create a new feature PRD. When in doubt, ask the user.
147
150
 
148
151
  **No code changes.** This command never creates, modifies, or deletes code files. If the user needs code changes alongside spec updates, suggest using `gspec-dor` instead.
@@ -63,6 +63,17 @@ Execute the code changes:
63
63
  5. **Surface new issues as they arise** — If implementation reveals new ambiguities, pause and consult the user rather than making silent assumptions
64
64
  6. **Track spec implications as you work** — As you implement, mentally note which gspec documents will need updating based on what you are changing
65
65
 
66
+ ### Phase 3.5: Validate — Ensure Tests Pass
67
+
68
+ Before updating any specs, verify the code changes are sound:
69
+
70
+ 1. **Check for existing tests** — Look for a test suite, test runner configuration, or test scripts in `package.json`, `Makefile`, or equivalent
71
+ 2. **If tests exist, run them** — Execute the project's test suite and confirm all tests pass
72
+ 3. **If tests fail** — Fix the failing tests before proceeding. Do not move to spec updates with a broken test suite
73
+ 4. **If no tests exist** — Note this and proceed. Do not create a test suite unless the user requests one or `gspec/practices.md` requires it
74
+
75
+ This gate ensures specs are only updated to reflect working, validated code — never broken implementations.
76
+
66
77
  ### Phase 4: Assess — Determine Spec Impact
67
78
 
68
79
  After code changes are complete, systematically evaluate which gspec documents need updating. Apply this decision matrix:
@@ -75,7 +86,8 @@ After code changes are complete, systematically evaluate which gspec documents n
75
86
  | New technology or dependency added | `gspec/stack.md` | Add to appropriate section with rationale |
76
87
  | Technology or dependency removed | `gspec/stack.md` | Remove and note why |
77
88
  | Technology version changed | `gspec/stack.md` | Update version |
78
- | Visual design change (colors, typography, spacing, components) | `gspec/style.md` | Update affected tokens, components, or patterns |
89
+ | Visual design change — generic (colors, typography, spacing, base component patterns) | `gspec/style.md` | Update affected tokens or base component patterns. Only include changes that are reusable and not tied to a specific feature or domain |
90
+ | Visual design change — feature-specific (a component unique to a feature, domain-specific visual treatment) | `gspec/features/<relevant>.md` | Document the visual details in the feature PRD's capabilities or a dedicated "Visual Design" subsection |
79
91
  | Development practice change (testing, code org, conventions) | `gspec/practices.md` | Update affected practice |
80
92
  | Product scope or direction change | `gspec/profile.md` | Update affected sections (Product Description, Use Cases, Roadmap, etc.) |
81
93
  | Feature dependency change | `gspec/epics/<relevant>.md` | Update dependency map and phasing |
@@ -155,6 +167,8 @@ After writing spec updates:
155
167
 
156
168
  **Traceability without clutter.** A brief note about why something changed is valuable for future readers. A changelog at the bottom of every file is not. Use judgment. For small, obvious changes, no annotation may be needed. For significant scope changes, a parenthetical note aids understanding.
157
169
 
170
+ **Keep `style.md` generic and reusable.** The style guide defines the design system — colors, typography, spacing, base component patterns, and tokens that could apply to any product. Do not add feature-specific or domain-specific content to `style.md` (e.g., "recipe card layout", "playlist item styling"). Feature-specific visual details belong in the relevant feature PRD. If you are unsure whether a visual change is generic or feature-specific, ask the user.
171
+
158
172
  **When to create vs. update.** If a change adds a small capability that fits naturally within an existing feature PRD, update that PRD. If a change introduces a wholly new product area that does not belong in any existing PRD, create a new feature PRD. When in doubt, ask the user.
159
173
 
160
174
  **Implementation checkboxes.** Feature PRDs use markdown checkboxes (`- [ ]` / `- [x]`) on capabilities to track implementation status for `gspec-implement`. When DOR adds new capabilities, use unchecked checkboxes (`- [ ]`). When modifying a capability that was already checked (`- [x]`) and the code change reflects the modification, keep it checked. When creating a new feature PRD, use unchecked checkboxes for all capabilities. Do not check off capabilities that DOR did not implement in the current session.
@@ -70,7 +70,8 @@ Systematically evaluate which gspec documents need updating. Apply this decision
70
70
  | New technology or dependency added | `gspec/stack.md` | Add to appropriate section with rationale |
71
71
  | Technology or dependency removed | `gspec/stack.md` | Remove and note why |
72
72
  | Technology version changed | `gspec/stack.md` | Update version |
73
- | Visual design change (colors, typography, spacing, components) | `gspec/style.md` | Update affected tokens, components, or patterns |
73
+ | Visual design change — generic (colors, typography, spacing, base component patterns) | `gspec/style.md` | Update affected tokens or base component patterns. Only include changes that are reusable and not tied to a specific feature or domain |
74
+ | Visual design change — feature-specific (a component unique to a feature, domain-specific visual treatment) | `gspec/features/<relevant>.md` | Document the visual details in the feature PRD's capabilities or a dedicated "Visual Design" subsection |
74
75
  | Development practice change (testing, code org, conventions) | `gspec/practices.md` | Update affected practice |
75
76
  | Product scope or direction change | `gspec/profile.md` | Update affected sections (Product Description, Use Cases, Roadmap, etc.) |
76
77
  | Feature dependency change | `gspec/epics/<relevant>.md` | Update dependency map and phasing |
@@ -148,6 +149,8 @@ After writing spec updates:
148
149
 
149
150
  **Traceability without clutter.** A brief note about why something changed is valuable for future readers. A changelog at the bottom of every file is not. Use judgment.
150
151
 
152
+ **Keep `style.md` generic and reusable.** The style guide defines the design system — colors, typography, spacing, base component patterns, and tokens that could apply to any product. Do not add feature-specific or domain-specific content to `style.md` (e.g., "recipe card layout", "playlist item styling"). Feature-specific visual details belong in the relevant feature PRD. If you are unsure whether a visual change is generic or feature-specific, ask the user.
153
+
151
154
  **When to create vs. update.** If a change adds a small capability that fits naturally within an existing feature PRD, update that PRD. If a change introduces a wholly new product area that does not belong in any existing PRD, create a new feature PRD. When in doubt, ask the user.
152
155
 
153
156
  **No code changes.** This command never creates, modifies, or deletes code files. If the user needs code changes alongside spec updates, suggest using `gspec-dor` instead.
@@ -63,6 +63,17 @@ Execute the code changes:
63
63
  5. **Surface new issues as they arise** — If implementation reveals new ambiguities, pause and consult the user rather than making silent assumptions
64
64
  6. **Track spec implications as you work** — As you implement, mentally note which gspec documents will need updating based on what you are changing
65
65
 
66
+ ### Phase 3.5: Validate — Ensure Tests Pass
67
+
68
+ Before updating any specs, verify the code changes are sound:
69
+
70
+ 1. **Check for existing tests** — Look for a test suite, test runner configuration, or test scripts in `package.json`, `Makefile`, or equivalent
71
+ 2. **If tests exist, run them** — Execute the project's test suite and confirm all tests pass
72
+ 3. **If tests fail** — Fix the failing tests before proceeding. Do not move to spec updates with a broken test suite
73
+ 4. **If no tests exist** — Note this and proceed. Do not create a test suite unless the user requests one or `gspec/practices.md` requires it
74
+
75
+ This gate ensures specs are only updated to reflect working, validated code — never broken implementations.
76
+
66
77
  ### Phase 4: Assess — Determine Spec Impact
67
78
 
68
79
  After code changes are complete, systematically evaluate which gspec documents need updating. Apply this decision matrix:
@@ -75,7 +86,8 @@ After code changes are complete, systematically evaluate which gspec documents n
75
86
  | New technology or dependency added | `gspec/stack.md` | Add to appropriate section with rationale |
76
87
  | Technology or dependency removed | `gspec/stack.md` | Remove and note why |
77
88
  | Technology version changed | `gspec/stack.md` | Update version |
78
- | Visual design change (colors, typography, spacing, components) | `gspec/style.md` | Update affected tokens, components, or patterns |
89
+ | Visual design change — generic (colors, typography, spacing, base component patterns) | `gspec/style.md` | Update affected tokens or base component patterns. Only include changes that are reusable and not tied to a specific feature or domain |
90
+ | Visual design change — feature-specific (a component unique to a feature, domain-specific visual treatment) | `gspec/features/<relevant>.md` | Document the visual details in the feature PRD's capabilities or a dedicated "Visual Design" subsection |
79
91
  | Development practice change (testing, code org, conventions) | `gspec/practices.md` | Update affected practice |
80
92
  | Product scope or direction change | `gspec/profile.md` | Update affected sections (Product Description, Use Cases, Roadmap, etc.) |
81
93
  | Feature dependency change | `gspec/epics/<relevant>.md` | Update dependency map and phasing |
@@ -155,6 +167,8 @@ After writing spec updates:
155
167
 
156
168
  **Traceability without clutter.** A brief note about why something changed is valuable for future readers. A changelog at the bottom of every file is not. Use judgment. For small, obvious changes, no annotation may be needed. For significant scope changes, a parenthetical note aids understanding.
157
169
 
170
+ **Keep `style.md` generic and reusable.** The style guide defines the design system — colors, typography, spacing, base component patterns, and tokens that could apply to any product. Do not add feature-specific or domain-specific content to `style.md` (e.g., "recipe card layout", "playlist item styling"). Feature-specific visual details belong in the relevant feature PRD. If you are unsure whether a visual change is generic or feature-specific, ask the user.
171
+
158
172
  **When to create vs. update.** If a change adds a small capability that fits naturally within an existing feature PRD, update that PRD. If a change introduces a wholly new product area that does not belong in any existing PRD, create a new feature PRD. When in doubt, ask the user.
159
173
 
160
174
  **Implementation checkboxes.** Feature PRDs use markdown checkboxes (`- [ ]` / `- [x]`) on capabilities to track implementation status for `gspec-implement`. When DOR adds new capabilities, use unchecked checkboxes (`- [ ]`). When modifying a capability that was already checked (`- [x]`) and the code change reflects the modification, keep it checked. When creating a new feature PRD, use unchecked checkboxes for all capabilities. Do not check off capabilities that DOR did not implement in the current session.
@@ -70,7 +70,8 @@ Systematically evaluate which gspec documents need updating. Apply this decision
70
70
  | New technology or dependency added | `gspec/stack.md` | Add to appropriate section with rationale |
71
71
  | Technology or dependency removed | `gspec/stack.md` | Remove and note why |
72
72
  | Technology version changed | `gspec/stack.md` | Update version |
73
- | Visual design change (colors, typography, spacing, components) | `gspec/style.md` | Update affected tokens, components, or patterns |
73
+ | Visual design change — generic (colors, typography, spacing, base component patterns) | `gspec/style.md` | Update affected tokens or base component patterns. Only include changes that are reusable and not tied to a specific feature or domain |
74
+ | Visual design change — feature-specific (a component unique to a feature, domain-specific visual treatment) | `gspec/features/<relevant>.md` | Document the visual details in the feature PRD's capabilities or a dedicated "Visual Design" subsection |
74
75
  | Development practice change (testing, code org, conventions) | `gspec/practices.md` | Update affected practice |
75
76
  | Product scope or direction change | `gspec/profile.md` | Update affected sections (Product Description, Use Cases, Roadmap, etc.) |
76
77
  | Feature dependency change | `gspec/epics/<relevant>.md` | Update dependency map and phasing |
@@ -148,6 +149,8 @@ After writing spec updates:
148
149
 
149
150
  **Traceability without clutter.** A brief note about why something changed is valuable for future readers. A changelog at the bottom of every file is not. Use judgment.
150
151
 
152
+ **Keep `style.md` generic and reusable.** The style guide defines the design system — colors, typography, spacing, base component patterns, and tokens that could apply to any product. Do not add feature-specific or domain-specific content to `style.md` (e.g., "recipe card layout", "playlist item styling"). Feature-specific visual details belong in the relevant feature PRD. If you are unsure whether a visual change is generic or feature-specific, ask the user.
153
+
151
154
  **When to create vs. update.** If a change adds a small capability that fits naturally within an existing feature PRD, update that PRD. If a change introduces a wholly new product area that does not belong in any existing PRD, create a new feature PRD. When in doubt, ask the user.
152
155
 
153
156
  **No code changes.** This command never creates, modifies, or deletes code files. If the user needs code changes alongside spec updates, suggest using `gspec-dor` instead.
@@ -62,6 +62,17 @@ Execute the code changes:
62
62
  5. **Surface new issues as they arise** — If implementation reveals new ambiguities, pause and consult the user rather than making silent assumptions
63
63
  6. **Track spec implications as you work** — As you implement, mentally note which gspec documents will need updating based on what you are changing
64
64
 
65
+ ### Phase 3.5: Validate — Ensure Tests Pass
66
+
67
+ Before updating any specs, verify the code changes are sound:
68
+
69
+ 1. **Check for existing tests** — Look for a test suite, test runner configuration, or test scripts in `package.json`, `Makefile`, or equivalent
70
+ 2. **If tests exist, run them** — Execute the project's test suite and confirm all tests pass
71
+ 3. **If tests fail** — Fix the failing tests before proceeding. Do not move to spec updates with a broken test suite
72
+ 4. **If no tests exist** — Note this and proceed. Do not create a test suite unless the user requests one or `gspec/practices.md` requires it
73
+
74
+ This gate ensures specs are only updated to reflect working, validated code — never broken implementations.
75
+
65
76
  ### Phase 4: Assess — Determine Spec Impact
66
77
 
67
78
  After code changes are complete, systematically evaluate which gspec documents need updating. Apply this decision matrix:
@@ -74,7 +85,8 @@ After code changes are complete, systematically evaluate which gspec documents n
74
85
  | New technology or dependency added | `gspec/stack.md` | Add to appropriate section with rationale |
75
86
  | Technology or dependency removed | `gspec/stack.md` | Remove and note why |
76
87
  | Technology version changed | `gspec/stack.md` | Update version |
77
- | Visual design change (colors, typography, spacing, components) | `gspec/style.md` | Update affected tokens, components, or patterns |
88
+ | Visual design change — generic (colors, typography, spacing, base component patterns) | `gspec/style.md` | Update affected tokens or base component patterns. Only include changes that are reusable and not tied to a specific feature or domain |
89
+ | Visual design change — feature-specific (a component unique to a feature, domain-specific visual treatment) | `gspec/features/<relevant>.md` | Document the visual details in the feature PRD's capabilities or a dedicated "Visual Design" subsection |
78
90
  | Development practice change (testing, code org, conventions) | `gspec/practices.md` | Update affected practice |
79
91
  | Product scope or direction change | `gspec/profile.md` | Update affected sections (Product Description, Use Cases, Roadmap, etc.) |
80
92
  | Feature dependency change | `gspec/epics/<relevant>.md` | Update dependency map and phasing |
@@ -154,6 +166,8 @@ After writing spec updates:
154
166
 
155
167
  **Traceability without clutter.** A brief note about why something changed is valuable for future readers. A changelog at the bottom of every file is not. Use judgment. For small, obvious changes, no annotation may be needed. For significant scope changes, a parenthetical note aids understanding.
156
168
 
169
+ **Keep `style.md` generic and reusable.** The style guide defines the design system — colors, typography, spacing, base component patterns, and tokens that could apply to any product. Do not add feature-specific or domain-specific content to `style.md` (e.g., "recipe card layout", "playlist item styling"). Feature-specific visual details belong in the relevant feature PRD. If you are unsure whether a visual change is generic or feature-specific, ask the user.
170
+
157
171
  **When to create vs. update.** If a change adds a small capability that fits naturally within an existing feature PRD, update that PRD. If a change introduces a wholly new product area that does not belong in any existing PRD, create a new feature PRD. When in doubt, ask the user.
158
172
 
159
173
  **Implementation checkboxes.** Feature PRDs use markdown checkboxes (`- [ ]` / `- [x]`) on capabilities to track implementation status for `gspec-implement`. When DOR adds new capabilities, use unchecked checkboxes (`- [ ]`). When modifying a capability that was already checked (`- [x]`) and the code change reflects the modification, keep it checked. When creating a new feature PRD, use unchecked checkboxes for all capabilities. Do not check off capabilities that DOR did not implement in the current session.
@@ -69,7 +69,8 @@ Systematically evaluate which gspec documents need updating. Apply this decision
69
69
  | New technology or dependency added | `gspec/stack.md` | Add to appropriate section with rationale |
70
70
  | Technology or dependency removed | `gspec/stack.md` | Remove and note why |
71
71
  | Technology version changed | `gspec/stack.md` | Update version |
72
- | Visual design change (colors, typography, spacing, components) | `gspec/style.md` | Update affected tokens, components, or patterns |
72
+ | Visual design change — generic (colors, typography, spacing, base component patterns) | `gspec/style.md` | Update affected tokens or base component patterns. Only include changes that are reusable and not tied to a specific feature or domain |
73
+ | Visual design change — feature-specific (a component unique to a feature, domain-specific visual treatment) | `gspec/features/<relevant>.md` | Document the visual details in the feature PRD's capabilities or a dedicated "Visual Design" subsection |
73
74
  | Development practice change (testing, code org, conventions) | `gspec/practices.md` | Update affected practice |
74
75
  | Product scope or direction change | `gspec/profile.md` | Update affected sections (Product Description, Use Cases, Roadmap, etc.) |
75
76
  | Feature dependency change | `gspec/epics/<relevant>.md` | Update dependency map and phasing |
@@ -147,6 +148,8 @@ After writing spec updates:
147
148
 
148
149
  **Traceability without clutter.** A brief note about why something changed is valuable for future readers. A changelog at the bottom of every file is not. Use judgment.
149
150
 
151
+ **Keep `style.md` generic and reusable.** The style guide defines the design system — colors, typography, spacing, base component patterns, and tokens that could apply to any product. Do not add feature-specific or domain-specific content to `style.md` (e.g., "recipe card layout", "playlist item styling"). Feature-specific visual details belong in the relevant feature PRD. If you are unsure whether a visual change is generic or feature-specific, ask the user.
152
+
150
153
  **When to create vs. update.** If a change adds a small capability that fits naturally within an existing feature PRD, update that PRD. If a change introduces a wholly new product area that does not belong in any existing PRD, create a new feature PRD. When in doubt, ask the user.
151
154
 
152
155
  **No code changes.** This command never creates, modifies, or deletes code files. If the user needs code changes alongside spec updates, suggest using `gspec-dor` instead.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gspec",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Install gspec specification commands for Claude Code, Cursor, and other AI tools",
5
5
  "main": "bin/gspec.js",
6
6
  "type": "module",
@@ -19,8 +19,11 @@
19
19
  "build:antigravity": "node scripts/build.js antigravity",
20
20
  "prepublishOnly": "npm run build"
21
21
  },
22
- "author": "",
23
- "license": "ISC",
22
+ "author": "Baller Software",
23
+ "repository": {
24
+ "url": "https://github.com/gballer77/gspec"
25
+ },
26
+ "license": "MIT",
24
27
  "dependencies": {
25
28
  "chalk": "^5.6.2",
26
29
  "commander": "^11.1.0"