gswd 0.2.0 → 1.0.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 CHANGED
@@ -1,15 +1,26 @@
1
- # GSWD — Get Shit Well Done
1
+ ```
2
+ ██████╗ ███████╗██╗ ██╗██████╗
3
+ ██╔════╝ ██╔════╝██║ ██║██╔══██╗
4
+ ██║ ███╗███████╗██║ █╗ ██║██║ ██║
5
+ ██║ ██║╚════██║██║███╗██║██║ ██║
6
+ ╚██████╔╝███████║╚███╔███╔╝██████╔╝
7
+ ╚═════╝ ╚══════╝ ╚══╝╚══╝ ╚═════╝
8
+ ```
2
9
 
3
- **Front-end system for imagining and specifying before [GSD](https://www.npmjs.com/package/get-shit-done-cc) builds.**
10
+ **Clarity is the bottleneck, not compute. GSWD produces bulletproof specs so you can one-shot the build.**
4
11
 
5
- GSWD adds the missing infrastructure for **imagining and specifying** so a founder can reliably reach an execution-grade spec and then hand off to GSD with zero guessing.
12
+ [![npm version](https://img.shields.io/npm/v/gswd)](https://www.npmjs.com/package/gswd)
13
+ [![License: MIT](https://img.shields.io/npm/l/gswd)](https://opensource.org/licenses/MIT)
14
+ ![Tests](https://img.shields.io/badge/tests-518%20passing-brightgreen)
15
+
16
+ GSWD is the thinking stage before [GSD](https://www.npmjs.com/package/get-shit-done-cc) builds. The bottleneck in building with AI isn't the AI — it's feeding it a spec that's complete, traceable, and unambiguous. GSWD forces that rigor upfront so you can hand off a GSD contract and build the first time, without guessing.
6
17
 
7
18
  ## Pipeline
8
19
 
9
20
  ```
10
- IMAGINE SPECIFY AUDIT COMPILE
11
- ↓ ↓ ↓
12
- Direction Spec+IDs Coverage GSD Contract
21
+ IMAGINE -> SPECIFY -> AUDIT -> COMPILE
22
+ | | | |
23
+ Direction Spec+IDs Coverage GSD Contract
13
24
  ```
14
25
 
15
26
  1. **IMAGINE** — turn a fuzzy idea into a validated product direction
@@ -23,51 +34,108 @@ Direction Spec+IDs Coverage GSD Contract
23
34
  npx gswd-install
24
35
  ```
25
36
 
26
- This copies `/gswd:*` slash commands to `~/.claude/commands/gswd/` for use in Claude Code.
37
+ Copies `/gswd:*` slash commands to `~/.claude/commands/gswd/` for use in Claude Code.
38
+
39
+ ## Quick Start
40
+
41
+ ```
42
+ /gswd:start
43
+ ```
44
+
45
+ That's it. Describe your idea conversationally — GSWD walks you through the full pipeline.
46
+
47
+ **Have an idea file already?**
48
+
49
+ ```
50
+ /gswd:start @idea.md
51
+ ```
52
+
53
+ ## What It Looks Like
54
+
55
+ ```
56
+ $ /gswd:start
57
+
58
+ Describe your product idea (or press Enter to type it out):
59
+ > A task management app for remote teams with async standups
60
+ > and no meeting culture overhead.
61
+
62
+ Got it. Let me confirm before we begin:
63
+
64
+ Product: Async standup and task coordination tool for remote teams
65
+ Angle: No meeting overhead — async-first by design
66
+
67
+ Does this capture your idea? [yes]
68
+
69
+ ┌─────────────────────────────────────────────┐
70
+ │ IMAGINE — Validating direction │
71
+ │ Running research agents... │
72
+ └─────────────────────────────────────────────┘
73
+
74
+ Researching market landscape...
75
+ Analyzing ICP and GTM angles...
76
+ Freezing key decisions...
77
+
78
+ ✓ DECISIONS.md
79
+ ✓ IMAGINE.md ICP.md GTM.md COMPETITION.md
80
+
81
+ ┌─────────────────────────────────────────────┐
82
+ │ SPECIFY — Building execution-grade spec │
83
+ └─────────────────────────────────────────────┘
84
+
85
+ ✓ SPEC.md JOURNEYS.md ARCHITECTURE.md
86
+ ✓ INTEGRATIONS.md NFR.md
87
+
88
+ ┌─────────────────────────────────────────────┐
89
+ │ AUDIT — Checking spec coverage │
90
+ └─────────────────────────────────────────────┘
91
+
92
+ Checking journeys... PASS
93
+ Checking requirements... PASS
94
+ Checking architecture linkage... PASS
95
+
96
+ ✓ AUDIT.md — PASS
97
+
98
+ ┌─────────────────────────────────────────────┐
99
+ │ COMPILE — Generating GSD contract │
100
+ └─────────────────────────────────────────────┘
101
+
102
+ ✓ PROJECT.md REQUIREMENTS.md ROADMAP.md STATE.md
103
+
104
+ Done! Run /gsd:plan-phase 01 to start building.
105
+ ```
27
106
 
28
107
  ## Commands
29
108
 
109
+ ### Primary Commands
110
+
30
111
  | Command | Description |
31
112
  |---------|-------------|
32
- | `/gswd:init` | Initialize GSWD planning state and config |
33
- | `/gswd:bootstrap [@idea.md]` | Run full pipeline: imagine → specify → audit → compile |
34
- | `/gswd:imagine [@idea.md]` | Validate direction and freeze key decisions |
35
- | `/gswd:specify` | Build execution-grade spec with traceable IDs |
36
- | `/gswd:audit-spec` | Audit spec for coverage — produces PASS/FAIL |
37
- | `/gswd:compile` | Compile spec into GSD contract docs |
113
+ | `/gswd:start` | Full pipeline: intake -> imagine -> specify -> audit -> compile |
38
114
  | `/gswd:status` | Show pipeline status and stage progress |
39
115
  | `/gswd:settings` | Configure GSWD workflow settings |
40
116
  | `/gswd:help` | Show command reference |
41
117
 
42
- ## Quick Start
118
+ ### Advanced Commands
43
119
 
44
- ```bash
45
- # Install commands
46
- npx gswd-install
120
+ Run stages individually if you need finer control:
47
121
 
48
- # In Claude Code:
49
- /gswd:init
50
- /gswd:bootstrap @idea.md
51
- ```
52
-
53
- Or run stages manually:
54
-
55
- ```bash
56
- /gswd:imagine @idea.md
57
- /gswd:specify
58
- /gswd:audit-spec
59
- /gswd:compile
60
- ```
122
+ | Command | Description |
123
+ |---------|-------------|
124
+ | `/gswd:imagine [@idea.md]` | Validate direction and freeze key decisions |
125
+ | `/gswd:specify` | Build execution-grade spec with traceable IDs |
126
+ | `/gswd:audit-spec` | Audit spec for coverage — produces PASS/FAIL |
127
+ | `/gswd:compile` | Compile spec into GSD contract docs |
61
128
 
62
129
  ## Common Flags
63
130
 
64
131
  | Flag | Available On | Description |
65
132
  |------|-------------|-------------|
66
- | `--auto` | bootstrap, imagine, specify | Auto mode — minimal interruptions |
67
- | `--resume` | bootstrap, imagine, specify, audit-spec | Resume from last checkpoint |
68
- | `--skip-research` | bootstrap, imagine | Disable research agents |
133
+ | `--auto` | `/gswd:start`, imagine, specify | Auto mode — minimal interruptions |
134
+ | `--resume` | `/gswd:start`, imagine, specify, audit-spec | Resume from last checkpoint |
135
+ | `--skip-research` | `/gswd:start`, imagine | Disable research agents |
69
136
  | `--auto-fix` | audit-spec | Auto-fix gaps found during audit |
70
137
  | `--phase-style=thin\|thick` | compile | Phase sizing for GSD roadmap |
138
+ | `--policy=<name>` | `/gswd:start` | Auto policy: strict, balanced, aggressive |
71
139
 
72
140
  ## Output Artifacts
73
141
 
@@ -96,17 +164,17 @@ Or run stages manually:
96
164
 
97
165
  Once compile is done, hand off to GSD:
98
166
 
99
- ```bash
167
+ ```
100
168
  /gsd:plan-phase 01
101
169
  ```
102
170
 
171
+ GSD picks up the compiled contract and builds phase by phase.
172
+
103
173
  ## CLI Usage
104
174
 
105
- GSWD also ships a CLI tool:
175
+ GSWD also ships a CLI for scripting and non-interactive workflows:
106
176
 
107
177
  ```bash
108
- gswd init
109
- gswd bootstrap @idea.md --auto
110
178
  gswd imagine @idea.md
111
179
  gswd specify
112
180
  gswd audit
package/bin/install.js CHANGED
@@ -88,8 +88,7 @@ console.log(` ${green}✓${reset} Installed ${copied} commands to ${destDir.rep
88
88
 
89
89
  // Show available commands
90
90
  console.log(` ${yellow}Available commands:${reset}\n`);
91
- console.log(` ${cyan}/gswd:init${reset} Initialize planning state`);
92
- console.log(` ${cyan}/gswd:bootstrap${reset} Run full pipeline (imagine → specify → audit → compile)`);
91
+ console.log(` ${cyan}/gswd:start${reset} Start here — idea to GSD contract`);
93
92
  console.log(` ${cyan}/gswd:imagine${reset} Validate direction and freeze decisions`);
94
93
  console.log(` ${cyan}/gswd:specify${reset} Build execution-grade spec`);
95
94
  console.log(` ${cyan}/gswd:audit-spec${reset} Audit spec coverage — PASS/FAIL`);
@@ -98,4 +97,20 @@ console.log(` ${cyan}/gswd:status${reset} Show pipeline status`);
98
97
  console.log(` ${cyan}/gswd:settings${reset} Configure GSWD settings`);
99
98
  console.log(` ${cyan}/gswd:help${reset} Show command reference`);
100
99
  console.log('');
101
- console.log(` ${green}Done!${reset} Launch Claude Code and run ${cyan}/gswd:help${reset} to get started.\n`);
100
+ console.log(` ${green}Done!${reset} Launch Claude Code and run ${cyan}/gswd:start${reset} to get started.\n`);
101
+
102
+ // Non-blocking update check — silently ignored on network failure
103
+ const https = require('https');
104
+ https.get(`https://registry.npmjs.org/${pkg.name}/latest`, (res) => {
105
+ let data = '';
106
+ res.on('data', chunk => data += chunk);
107
+ res.on('end', () => {
108
+ try {
109
+ const latest = JSON.parse(data).version;
110
+ if (latest && latest !== pkg.version) {
111
+ console.log(`\n ${yellow}Update available:${reset} ${pkg.version} \u2192 ${latest}`);
112
+ console.log(` Run ${cyan}npx gswd-install${reset} to update.\n`);
113
+ }
114
+ } catch (_) {}
115
+ });
116
+ }).on('error', () => {});
@@ -24,34 +24,37 @@ Output the following command reference exactly:
24
24
  ## Quick Start
25
25
 
26
26
  ```
27
- /gswd:init # Initialize planning state
28
- /gswd:bootstrap @idea.md # Run full pipeline (recommended)
27
+ /gswd:start # Start here — describe your idea interactively
29
28
  ```
30
29
 
31
30
  ## Commands
32
31
 
33
32
  | Command | Description |
34
33
  |---------|-------------|
35
- | `/gswd:init` | Initialize GSWD planning state and config |
36
- | `/gswd:bootstrap [@idea.md]` | Run full pipeline: imagine specify audit → compile |
34
+ | `/gswd:start` | Full pipeline: intake -> imagine -> specify -> audit -> compile |
35
+ | `/gswd:status` | Show pipeline status and stage progress |
36
+ | `/gswd:settings` | Configure GSWD workflow settings |
37
+ | `/gswd:help` | Show this reference |
38
+
39
+ ## Advanced Commands
40
+
41
+ | Command | Description |
42
+ |---------|-------------|
37
43
  | `/gswd:imagine [@idea.md]` | Validate direction and freeze key decisions |
38
44
  | `/gswd:specify` | Build execution-grade spec with traceable IDs |
39
45
  | `/gswd:audit-spec` | Audit spec for coverage — produces PASS/FAIL |
40
46
  | `/gswd:compile` | Compile spec into GSD contract docs |
41
- | `/gswd:status` | Show pipeline status and stage progress |
42
- | `/gswd:settings` | Configure GSWD workflow settings |
43
- | `/gswd:help` | Show this reference |
44
47
 
45
48
  ## Common Flags
46
49
 
47
50
  | Flag | Available On | Description |
48
51
  |------|-------------|-------------|
49
- | `--auto` | bootstrap, imagine, specify | Auto mode — minimal interruptions |
50
- | `--resume` | bootstrap, imagine, specify, audit-spec | Resume from last checkpoint |
51
- | `--skip-research` | bootstrap, imagine | Disable research agents |
52
+ | `--auto` | `/gswd:start`, imagine, specify | Auto mode — minimal interruptions |
53
+ | `--resume` | `/gswd:start`, imagine, specify, audit-spec | Resume from last checkpoint |
54
+ | `--skip-research` | `/gswd:start`, imagine | Disable research agents |
52
55
  | `--auto-fix` | audit-spec | Auto-fix gaps found during audit |
53
56
  | `--phase-style=thin\|thick` | compile | Phase sizing for GSD roadmap |
54
- | `--policy=<name>` | bootstrap | Auto policy: strict, balanced, aggressive |
57
+ | `--policy=<name>` | `/gswd:start` | Auto policy: strict, balanced, aggressive |
55
58
 
56
59
  ## Pipeline Flow
57
60
 
@@ -0,0 +1,123 @@
1
+ ---
2
+ name: gswd:start
3
+ description: Imagine, specify, audit, and compile — from idea to GSD contract
4
+ argument-hint: "[@idea.md]"
5
+ allowed-tools:
6
+ - Bash
7
+ - Read
8
+ - Write
9
+ - AskUserQuestion
10
+ - Task
11
+ ---
12
+
13
+ <objective>
14
+ One command to go from a product idea to a GSD-ready contract.
15
+
16
+ **Pipeline stages (run sequentially):**
17
+ 1. Imagine — validate direction and freeze decisions
18
+ 2. Specify — build execution-grade spec with traceable IDs
19
+ 3. Audit — enforce full coverage (PASS/FAIL)
20
+ 4. Compile — deterministically generate GSD contract docs
21
+
22
+ **Outputs:**
23
+ - Full GSWD bundle (IMAGINE.md, DECISIONS.md, SPEC.md, JOURNEYS.md, etc.)
24
+ - Compiled GSD contract: PROJECT.md, REQUIREMENTS.md, ROADMAP.md, STATE.md
25
+
26
+ **Power-user flags (all optional):**
27
+ - `--auto` — apply auto policy for decision-making (minimal interruptions). Requires @idea.md to skip interactive intake.
28
+ - `--policy=<name>` — select named policy: `strict`, `balanced`, `aggressive`
29
+ - `--resume` — continue from last checkpoint in `.planning/gswd/STATE.json`
30
+ - `--skip-research` — disable research agents
31
+
32
+ **Hard gates:**
33
+ - Cannot finish if audit is FAIL
34
+ - In auto mode, cannot finish if policy requires manual approvals and they are not present
35
+ </objective>
36
+
37
+ <process>
38
+
39
+ ## Step 1 — Initialize (silently)
40
+
41
+ Run init via Bash:
42
+
43
+ ```bash
44
+ node ./bin/gswd-tools.cjs init
45
+ ```
46
+
47
+ Check if `.planning/gswd/STATE.json` existed before this call. If STATE.json did not already exist (i.e., this is the first run), show one line: "Initialized GSWD for <project-name>" where project-name is derived from the current directory basename (e.g., `basename $PWD`). If STATE.json already existed, say nothing — initialization is silent.
48
+
49
+ The init call is idempotent and safe to run regardless of existing state.
50
+
51
+ ## Step 2 — Check for existing state
52
+
53
+ Read `.planning/gswd/STATE.json` using the Read tool. Branch on the `stage` field:
54
+
55
+ - If `stage` is not `done` and not `init` (work is in progress): ask the user "Resume from [stage]? [yes / start fresh]"
56
+ - If yes: add `--resume` to the bootstrap call arguments assembled in Step 4
57
+ - If start fresh: proceed without `--resume`
58
+ - If `stage` is `done` (pipeline already completed): ask the user "You already have a completed spec. Start fresh or resume?"
59
+ - If resume: add `--resume` to the bootstrap arguments
60
+ - If fresh: proceed without `--resume`
61
+ - If `stage` is `init` or STATE.json was just created by Step 1: proceed directly to Step 3 (no resume prompt)
62
+
63
+ ## Step 3 — Collect idea
64
+
65
+ **Path A — Idea file provided in $ARGUMENTS**
66
+
67
+ Detect Path A if $ARGUMENTS contains any word starting with `@` OR a path ending in `.md`.
68
+
69
+ 1. Read the idea file content using the Read tool
70
+ 2. Summarize the idea in 2-3 sentences
71
+ 3. Ask: "Did I get that right? [yes / edit]"
72
+ 4. If the user chooses edit: let them revise, then re-summarize and re-confirm
73
+ 5. Once confirmed, proceed to Step 4
74
+
75
+ **Path B — No file provided in $ARGUMENTS**
76
+
77
+ 1. Ask the user (via conversation, not AskUserQuestion tool): "Describe your product idea — include what it does, who it's for, and what makes now the right time to build it."
78
+ - The intake prompt should feel like one natural question, not a form. The hints guide but don't constrain.
79
+ - For partial or vague descriptions: use judgment — either ask a brief follow-up or proceed with what's given.
80
+ 2. After the user responds, summarize their response in 2-3 sentences
81
+ 3. Ask: "Did I get that right? [yes / edit]"
82
+ 4. If the user chooses edit: let them revise, then re-summarize and re-confirm
83
+ 5. Once confirmed, write the confirmed summary to `.planning/gswd/intake.md` using the Write tool so it can be passed to the bootstrap CLI:
84
+
85
+ ```
86
+ # Idea
87
+
88
+ <confirmed summary here>
89
+ ```
90
+
91
+ 6. Proceed to Step 4
92
+
93
+ Note: "Did I get that right?" is the key moment — it is the last manual touchpoint before automated stages run.
94
+
95
+ ## Step 4 — Run the bootstrap pipeline
96
+
97
+ Assemble the CLI command:
98
+
99
+ - Base: `node ./bin/gswd-tools.cjs bootstrap`
100
+ - If Path A: append the original `$ARGUMENTS` (contains the file path and any flags as-is)
101
+ - If Path B: append `@.planning/gswd/intake.md` as the idea file argument, then append any flags from `$ARGUMENTS` that are NOT file paths (e.g., `--skip-research`, `--policy=balanced`)
102
+ - If `--auto` is in `$ARGUMENTS` but no file was provided (Path B): note that `--auto` applies to pipeline stages after intake; proceed with interactive intake first, then pass `--auto` to the bootstrap call along with the intake.md path
103
+ - If `--resume` was added in Step 2: include it in the arguments
104
+
105
+ Run the assembled command via Bash:
106
+
107
+ ```bash
108
+ node ./bin/gswd-tools.cjs bootstrap <assembled arguments>
109
+ ```
110
+
111
+ ## Step 5 — Show pipeline progress
112
+
113
+ Display stage banners, checkpoint boxes, and output as the CLI emits them.
114
+
115
+ ## Step 6 — On completion
116
+
117
+ Show the Next Up block with generated artifacts and suggest running `/gsd:plan-phase 01`.
118
+
119
+ ## Step 7 — On failure
120
+
121
+ If any stage fails (especially audit), display the failure reason and suggest remediation before retrying.
122
+
123
+ </process>
@@ -25,5 +25,5 @@ This is a read-only command that never modifies state.
25
25
 
26
26
  2. Display the CLI output directly to the user.
27
27
 
28
- 3. If `.planning/gswd/STATE.json` does not exist, suggest running `/gswd:init` first.
28
+ 3. If `.planning/gswd/STATE.json` does not exist, suggest running `/gswd:start` first.
29
29
  </process>
package/lib/bootstrap.ts CHANGED
@@ -17,6 +17,7 @@ import * as fs from 'node:fs';
17
17
  import * as path from 'node:path';
18
18
 
19
19
  import { initState, readState, writeState, writeCheckpoint } from './state.js';
20
+ import type { StageStatus } from './state.js';
20
21
  import { getGswdConfig } from './config.js';
21
22
  import type { GswdConfig } from './config.js';
22
23
  import { renderBanner, renderCheckpoint, renderNextUp } from './render.js';
@@ -287,7 +288,7 @@ export function validateStageArtifacts(
287
288
  */
288
289
  export function shouldSkipStage(
289
290
  stage: BootstrapStage,
290
- state: { stage_status: Record<string, string> },
291
+ state: { stage_status: StageStatus | Record<string, string> },
291
292
  planningDir: string,
292
293
  resume: boolean
293
294
  ): boolean {
package/lib/imagine.ts CHANGED
@@ -301,13 +301,11 @@ export async function runImagine(options: ImagineOptions): Promise<ImagineResult
301
301
  };
302
302
  }
303
303
  // Allocate ID ranges for imagine agents before spawning (FNDN-05)
304
- if (spawnFn) {
305
- try {
306
- allocateIdRange(statePath, 'J', 'journey-mapper', 50);
307
- allocateIdRange(statePath, 'FR', 'market-researcher', 50);
308
- } catch {
309
- // Non-fatal — ID allocation failure should not block imagine
310
- }
304
+ try {
305
+ allocateIdRange(statePath, 'J', 'journey-mapper', 50);
306
+ allocateIdRange(statePath, 'FR', 'market-researcher', 50);
307
+ } catch {
308
+ // Non-fatal — ID allocation failure should not block imagine
311
309
  }
312
310
  agentResults = await orchestrateAgents(
313
311
  IMAGINE_AGENTS,
package/lib/state.ts CHANGED
@@ -207,7 +207,7 @@ export function updateStageStatus(
207
207
  if (!state) {
208
208
  throw new Error(`Cannot read STATE.json at ${statePath}`);
209
209
  }
210
- (state.stage_status as Record<string, string>)[stage] = status;
210
+ (state.stage_status as unknown as Record<string, string>)[stage] = status;
211
211
  writeState(statePath, state);
212
212
  }
213
213
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gswd",
3
- "version": "0.2.0",
3
+ "version": "1.0.0",
4
4
  "type": "commonjs",
5
5
  "description": "Get Shit Well Done — CLI meta-prompting and spec-generation system",
6
6
  "bin": {
@@ -18,7 +18,8 @@
18
18
  "scripts": {
19
19
  "test": "node --import tsx --test tests/*.test.ts",
20
20
  "test:cjs": "node --test tests/*.test.cjs",
21
- "build": "tsc"
21
+ "build": "tsc",
22
+ "prepublishOnly": "npm test && npm run build"
22
23
  },
23
24
  "devDependencies": {
24
25
  "typescript": "^5.7.0",
@@ -1,58 +0,0 @@
1
- ---
2
- name: gswd:bootstrap
3
- description: Run full GSWD pipeline — imagine, specify, audit, compile
4
- argument-hint: "[--auto] [--resume] [--skip-research] [--policy=<name>] [@idea.md]"
5
- allowed-tools:
6
- - Bash
7
- - Read
8
- - Write
9
- - AskUserQuestion
10
- - Task
11
- ---
12
- <objective>
13
- One command to generate a GSD-ready contract from a product idea.
14
-
15
- **Runs sequentially:**
16
- 1. Imagine — validate direction and freeze decisions
17
- 2. Specify — build execution-grade spec with traceable IDs
18
- 3. Audit — enforce full coverage (PASS/FAIL)
19
- 4. Compile — deterministically generate GSD contract docs
20
-
21
- **Outputs:**
22
- - Full GSWD bundle (IMAGINE.md, DECISIONS.md, SPEC.md, JOURNEYS.md, etc.)
23
- - Compiled GSD contract: PROJECT.md, REQUIREMENTS.md, ROADMAP.md, STATE.md
24
-
25
- **Flags:**
26
- - `--auto` — apply auto policy for decision-making (minimal interruptions)
27
- - `--policy=<name>` — select named policy: `strict`, `balanced`, `aggressive`
28
- - `--resume` — continue from last checkpoint in `.planning/gswd/STATE.json`
29
- - `--skip-research` — disable research agents
30
-
31
- **Hard gates:**
32
- - Cannot finish if audit is FAIL
33
- - In auto mode, cannot finish if policy requires manual approvals and they are not present
34
-
35
- **After this command:** Review `.planning/` artifacts, then run `/gsd:plan-phase 01`.
36
- </objective>
37
-
38
- <process>
39
- 1. Ensure GSWD is initialized. If `.planning/gswd/STATE.json` does not exist, run init first:
40
- ```bash
41
- node ./bin/gswd-tools.cjs init
42
- ```
43
-
44
- 2. Run the bootstrap pipeline:
45
- ```bash
46
- node ./bin/gswd-tools.cjs bootstrap $ARGUMENTS
47
- ```
48
-
49
- 3. The CLI orchestrates imagine → specify → audit → compile with checkpoint tracking.
50
-
51
- 4. If `--resume` is passed and a checkpoint exists, the pipeline resumes from the last completed stage.
52
-
53
- 5. Display stage banners, checkpoint boxes, and progress as the CLI emits them.
54
-
55
- 6. On completion, show the Next Up block with generated artifacts and suggest `/gsd:plan-phase 01`.
56
-
57
- 7. If any stage fails (especially audit), display the failure reason and suggest remediation before retrying.
58
- </process>
@@ -1,40 +0,0 @@
1
- ---
2
- name: gswd:init
3
- description: Initialize GSWD planning state and config
4
- argument-hint: "[--project-slug <slug>]"
5
- allowed-tools:
6
- - Bash
7
- - Read
8
- - Write
9
- ---
10
- <objective>
11
- Initialize GSWD planning state and config for the current project.
12
-
13
- **Creates if missing:**
14
- - `.planning/gswd/STATE.json` — stage tracking and checkpoint state
15
- - `.planning/gswd/NOTES.md` — scratch notes for GSWD workflows
16
- - Adds/merges `.planning/config.json` under top-level `gswd` key
17
-
18
- **Never:**
19
- - Deletes existing planning docs
20
- - Overwrites user config keys outside `gswd`
21
-
22
- **After this command:** Run `/gswd:bootstrap @idea.md` or `/gswd:imagine @idea.md`.
23
- </objective>
24
-
25
- <process>
26
- 1. Run the init command via the CLI:
27
- ```bash
28
- node "$(dirname "$(which gswd-tools)")/gswd-tools.cjs" init $ARGUMENTS
29
- ```
30
- If `gswd-tools` is not on PATH, use the project-local binary:
31
- ```bash
32
- node ./bin/gswd-tools.cjs init $ARGUMENTS
33
- ```
34
-
35
- 2. Display the CLI output directly to the user.
36
-
37
- 3. Show Next Up guidance:
38
- - If an idea file exists: suggest `/gswd:bootstrap @idea.md`
39
- - Otherwise: suggest creating an idea file first, then `/gswd:bootstrap @idea.md`
40
- </process>