gsdd-cli 0.18.1 → 0.18.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/README.md CHANGED
@@ -104,7 +104,7 @@ In a terminal, `gsdd init` now opens a guided install wizard:
104
104
 
105
105
  Portable `.agents/skills/gsdd-*` skills are always generated. The wizard controls extra native adapters and optional governance, not the portable baseline.
106
106
  When those generated surfaces exist locally, `gsdd health` checks them against current render output instead of asking you to trust manual review.
107
- Workflow-embedded helper commands use `node .planning/bin/gsdd.mjs ...`, so execution-time lifecycle helpers do not depend on a global `gsdd` binary after init.
107
+ `init` generates a local `.planning/bin/gsdd*` helper surface. Workflow-embedded helper commands still use `node .planning/bin/gsdd.mjs ...` as the portable contract, so execution-time lifecycle helpers do not depend on a global `gsdd` binary after init.
108
108
 
109
109
  ### Launch Proof Status
110
110
 
@@ -1,6 +1,6 @@
1
- import { existsSync, mkdirSync, readFileSync, writeFileSync, cpSync } from 'fs';
2
- import { join, isAbsolute } from 'path';
3
- import { renderPlanningCliLauncher, renderSkillContent } from './rendering.mjs';
1
+ import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync, cpSync } from 'fs';
2
+ import { dirname, join, isAbsolute } from 'path';
3
+ import { buildPlanningCliHelperEntries, renderSkillContent } from './rendering.mjs';
4
4
  import { buildManifest, readManifest, writeManifest } from './manifest.mjs';
5
5
  import { parseFlagValue, parseToolsFlag, parseAutoFlag } from './cli-utils.mjs';
6
6
  import { buildDefaultConfig, COST_PROFILES, RIGOR_PROFILES } from './models.mjs';
@@ -109,8 +109,8 @@ export function createCmdInit(ctx) {
109
109
  generateOpenStandardSkills(ctx.cwd, ctx.workflows);
110
110
  console.log(' - generated open-standard skills (.agents/skills/gsdd-*)');
111
111
 
112
- generatePlanningCliLauncher(ctx);
113
- console.log(' - generated local workflow helper (.planning/bin/gsdd.mjs)');
112
+ generatePlanningCliHelpers(ctx);
113
+ console.log(' - generated local workflow helpers (.planning/bin/gsdd*)');
114
114
 
115
115
  for (const adapter of resolveAdapters(ctx.adapters, interactiveSession.adapterTargets)) {
116
116
  adapter.generate();
@@ -159,10 +159,10 @@ export function createCmdUpdate(ctx) {
159
159
 
160
160
  if (existsSync(ctx.planningDir)) {
161
161
  if (isDry) {
162
- console.log(' - would update local workflow helper (.planning/bin/gsdd.mjs)');
162
+ console.log(' - would update local workflow helpers (.planning/bin/gsdd*)');
163
163
  } else {
164
- generatePlanningCliLauncher(ctx);
165
- console.log(' - updated local workflow helper (.planning/bin/gsdd.mjs)');
164
+ generatePlanningCliHelpers(ctx);
165
+ console.log(' - updated local workflow helpers (.planning/bin/gsdd*)');
166
166
  }
167
167
  updated = true;
168
168
  }
@@ -207,16 +207,18 @@ function generateOpenStandardSkills(cwd, workflows) {
207
207
  }
208
208
  }
209
209
 
210
- function generatePlanningCliLauncher(ctx) {
211
- const dir = join(ctx.planningDir, 'bin');
212
- mkdirSync(dir, { recursive: true });
213
- writeFileSync(
214
- join(dir, 'gsdd.mjs'),
215
- renderPlanningCliLauncher({
216
- packageName: ctx.packageName,
217
- packageVersion: ctx.packageVersion,
218
- })
219
- );
210
+ function generatePlanningCliHelpers(ctx) {
211
+ for (const entry of buildPlanningCliHelperEntries({
212
+ packageName: ctx.packageName,
213
+ packageVersion: ctx.packageVersion,
214
+ })) {
215
+ const absolutePath = join(ctx.planningDir, entry.relativePath);
216
+ mkdirSync(dirname(absolutePath), { recursive: true });
217
+ writeFileSync(absolutePath, entry.content);
218
+ if (!absolutePath.endsWith('.cmd')) {
219
+ chmodSync(absolutePath, 0o755);
220
+ }
221
+ }
220
222
  }
221
223
 
222
224
  function buildUpdateManifest({ planningDir, frameworkVersion, updateTemplates }) {
@@ -199,7 +199,7 @@ Platforms (for --tools):
199
199
 
200
200
  Notes:
201
201
  - init always generates open-standard skills at .agents/skills/gsdd-* (portable workflow entrypoints)
202
- - init also generates .planning/bin/gsdd.mjs so workflow-embedded helper commands do not depend on a global gsdd binary
202
+ - init also generates a local .planning/bin/gsdd* helper surface so workflow-embedded helper commands do not depend on a global gsdd binary
203
203
  - Workspine is the public product name; the retained package, command, workflow, and workspace contracts stay gsdd-cli, gsdd, gsdd-*, and .planning/
204
204
  - running plain \`gsdd init\` in a terminal opens the guided runtime-selection wizard
205
205
  - the wizard lets you pick runtimes first, then separately decide whether repo-wide AGENTS.md governance is worth installing
@@ -62,6 +62,29 @@ function forwardResult(result, fallbackMessage) {
62
62
  }
63
63
  }
64
64
 
65
+ function runPackagedCli() {
66
+ if (process.platform === 'win32') {
67
+ const powershellScript = [
68
+ '$argList = @($env:GSDD_LAUNCH_ARGS | ConvertFrom-Json)',
69
+ \`& npm exec --yes "--package=\${packageSpec}" -- gsdd @argList\`,
70
+ 'exit $LASTEXITCODE',
71
+ ].join('; ');
72
+
73
+ return spawnSync('powershell.exe', ['-NoProfile', '-Command', powershellScript], {
74
+ stdio: 'inherit',
75
+ env: {
76
+ ...env,
77
+ GSDD_LAUNCH_ARGS: JSON.stringify(args),
78
+ },
79
+ });
80
+ }
81
+
82
+ return spawnSync('npm', ['exec', '--yes', \`--package=\${packageSpec}\`, '--', 'gsdd', ...args], {
83
+ stdio: 'inherit',
84
+ env,
85
+ });
86
+ }
87
+
65
88
  if (env.GSDD_CLI_PATH) {
66
89
  const localResult = spawnSync(process.execPath, [env.GSDD_CLI_PATH, ...args], {
67
90
  stdio: 'inherit',
@@ -69,16 +92,44 @@ if (env.GSDD_CLI_PATH) {
69
92
  });
70
93
  forwardResult(localResult, 'Failed to run the local GSDD CLI path from GSDD_CLI_PATH.');
71
94
  } else {
72
- const npxCommand = process.platform === 'win32' ? 'npx.cmd' : 'npx';
73
- const npxResult = spawnSync(npxCommand, ['--yes', packageSpec, ...args], {
74
- stdio: 'inherit',
75
- env,
76
- });
77
- forwardResult(npxResult, \`Failed to run \${packageSpec} via npx.\`);
95
+ const packagedResult = runPackagedCli();
96
+ forwardResult(packagedResult, \`Failed to run \${packageSpec} via npm exec.\`);
97
+ }
98
+ `;
99
+ }
100
+
101
+ function renderPlanningCliShellShim() {
102
+ return `#!/usr/bin/env sh
103
+
104
+ SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
105
+ exec node "$SCRIPT_DIR/gsdd.mjs" "$@"
106
+ `;
78
107
  }
108
+
109
+ function renderPlanningCliCmdShim() {
110
+ return `@echo off
111
+ setlocal
112
+ node "%~dp0gsdd.mjs" %*
79
113
  `;
80
114
  }
81
115
 
116
+ function buildPlanningCliHelperEntries({ packageName = 'gsdd-cli', packageVersion }) {
117
+ return [
118
+ {
119
+ relativePath: 'bin/gsdd.mjs',
120
+ content: renderPlanningCliLauncher({ packageName, packageVersion }),
121
+ },
122
+ {
123
+ relativePath: 'bin/gsdd',
124
+ content: renderPlanningCliShellShim(),
125
+ },
126
+ {
127
+ relativePath: 'bin/gsdd.cmd',
128
+ content: renderPlanningCliCmdShim(),
129
+ },
130
+ ];
131
+ }
132
+
82
133
  function buildPortableSkillEntries(workflows) {
83
134
  return workflows.map((workflow) => ({
84
135
  relativePath: `.agents/skills/${workflow.name}/SKILL.md`,
@@ -140,10 +191,11 @@ function upsertBoundedBlock(existing, blockContent) {
140
191
  return `${bounded}\n\n${existing}`.replace(/\n{3,}/g, '\n\n');
141
192
  }
142
193
 
143
- export {
144
- buildPortableSkillEntries,
145
- getDelegateContent,
146
- getWorkflowContent,
194
+ export {
195
+ buildPlanningCliHelperEntries,
196
+ buildPortableSkillEntries,
197
+ getDelegateContent,
198
+ getWorkflowContent,
147
199
  renderAgentsBoundedBlock,
148
200
  renderAgentsFileContent,
149
201
  renderOpenCodeCommandContent,
@@ -2,9 +2,9 @@ import { existsSync, readFileSync } from 'fs';
2
2
  import { dirname, join } from 'path';
3
3
  import { fileURLToPath } from 'url';
4
4
  import {
5
+ buildPlanningCliHelperEntries,
5
6
  buildPortableSkillEntries,
6
7
  getDelegateContent,
7
- renderPlanningCliLauncher,
8
8
  renderOpenCodeCommandContent,
9
9
  renderSkillContent,
10
10
  } from './rendering.mjs';
@@ -151,15 +151,13 @@ function buildCodexEntries({ cwd }) {
151
151
  }
152
152
 
153
153
  function buildWorkspaceHelperEntries() {
154
- return [
155
- {
156
- relativePath: '.planning/bin/gsdd.mjs',
157
- expectedContent: renderPlanningCliLauncher({
158
- packageName: PACKAGE_JSON.name,
159
- packageVersion: PACKAGE_JSON.version,
160
- }),
161
- },
162
- ];
154
+ return buildPlanningCliHelperEntries({
155
+ packageName: PACKAGE_JSON.name,
156
+ packageVersion: PACKAGE_JSON.version,
157
+ }).map((entry) => ({
158
+ relativePath: `.planning/${entry.relativePath}`,
159
+ expectedContent: entry.content,
160
+ }));
163
161
  }
164
162
 
165
163
  export function collectExpectedRuntimeSurfaceGroups({ cwd = process.cwd(), workflows }) {
@@ -2584,18 +2584,18 @@ Sub-gap (b) was closed by D28's `<persistence>` mandate and guarded by G30. Sub-
2584
2584
 
2585
2585
  ## D58 - Local Workflow Helper Launcher
2586
2586
 
2587
- **Decision (2026-04-22):** Workflow-embedded CLI helper commands must run through a generated local launcher at `.planning/bin/gsdd.mjs` instead of assuming a bare `gsdd` binary is available on the consumer repo's PATH.
2587
+ **Decision (2026-04-22):** Workflow-embedded CLI helper commands must run through a generated local helper surface under `.planning/bin/`, with `.planning/bin/gsdd.mjs` as the canonical launcher, instead of assuming a bare `gsdd` binary is available on the consumer repo's PATH.
2588
2588
 
2589
2589
  **Context:**
2590
2590
  - Public onboarding already leads with `npx gsdd-cli init`, which works even when the package is not globally installed.
2591
2591
  - The authored workflow surfaces had drifted into a different assumption: embedded helper commands such as `lifecycle-preflight`, `file-op`, and `phase-status` were written as bare `gsdd ...` invocations.
2592
2592
  - That split contract caused consumer friction in the exact place the deterministic helper seam was supposed to help: a workflow could initialize successfully, then fail later because the repo did not have a global `gsdd` on PATH.
2593
- - The launcher must stay out of `.agents/` ownership so it does not pollute unrelated `.agents` folders or leak into generated governance.
2593
+ - The helper surface must stay out of `.agents/` ownership so it does not pollute unrelated `.agents` folders or leak into generated governance.
2594
2594
 
2595
2595
  **Decision:**
2596
- - Generate `.planning/bin/gsdd.mjs` on `gsdd init` for every initialized workspace.
2597
- - Regenerate that launcher on `gsdd update` whenever `.planning/` exists.
2598
- - Keep the launcher machine-independent by resolving back to the published `gsdd-cli` package version used for generation rather than embedding framework checkout paths.
2596
+ - Generate `.planning/bin/gsdd.mjs` plus thin repo-local shell shims (`.planning/bin/gsdd`, `.planning/bin/gsdd.cmd`) on `gsdd init` for every initialized workspace.
2597
+ - Regenerate that helper surface on `gsdd update` whenever `.planning/` exists.
2598
+ - Keep the launcher machine-independent by resolving back to the published `gsdd-cli` package version used for generation rather than embedding framework checkout paths, and invoke the packaged `gsdd` bin explicitly through `npm exec --package=... -- gsdd ...` instead of the fragile bare `npx <package>` form.
2599
2599
  - Route workflow-embedded helper commands through `node .planning/bin/gsdd.mjs ...` for the deterministic helper seam:
2600
2600
  - `lifecycle-preflight`
2601
2601
  - `file-op`
@@ -2624,7 +2624,7 @@ Sub-gap (b) was closed by D28's `<persistence>` mandate and guarded by G30. Sub-
2624
2624
  **Consequences:**
2625
2625
  - Consumer repos no longer need a global `gsdd` binary for workflow-embedded helper mechanics after init.
2626
2626
  - Helper-command freshness is now owned under `.planning/` without widening `.agents` install detection.
2627
- - Generated governance remains compact and routing-focused because launcher instructions stay out of `AGENTS.md`.
2627
+ - Generated governance remains compact and routing-focused because helper-surface instructions stay out of `AGENTS.md`.
2628
2628
 
2629
2629
  ## Maintenance
2630
2630
 
@@ -445,8 +445,8 @@
445
445
  - `get-shit-done/workflows/new-project.md`, `get-shit-done/workflows/quick.md`
446
446
 
447
447
  ## D58 — Local Workflow Helper Launcher
448
- - `bin/lib/rendering.mjs` (`renderPlanningCliLauncher` for a machine-independent local helper launcher)
449
- - `bin/lib/init-flow.mjs` (`gsdd init` / `gsdd update` generation of `.planning/bin/gsdd.mjs`)
448
+ - `bin/lib/rendering.mjs` (`renderPlanningCliLauncher` and `.planning/bin/gsdd*` shim rendering for a machine-independent local helper surface)
449
+ - `bin/lib/init-flow.mjs` (`gsdd init` / `gsdd update` generation of `.planning/bin/gsdd*`)
450
450
  - `bin/lib/runtime-freshness.mjs`, `bin/lib/manifest.mjs`, `bin/lib/health.mjs`, `bin/lib/health-truth.mjs`
451
451
  - `distilled/workflows/execute.md`, `distilled/workflows/verify.md`, `distilled/workflows/resume.md`, `distilled/workflows/progress.md`
452
452
  - `tests/gsdd.init.test.cjs`, `tests/gsdd.health.test.cjs`, `tests/gsdd.manifest.test.cjs`, `tests/gsdd.scenarios.test.cjs`
@@ -195,7 +195,7 @@ The 7 check dimensions: requirement coverage, task completeness, dependency corr
195
195
  | `gsdd models clear --runtime <rt> --agent <id>` | Remove runtime override |
196
196
  | `gsdd help` | Show all commands |
197
197
 
198
- Workflow-embedded helper commands use `node .planning/bin/gsdd.mjs ...`, so lifecycle preflight, file-op, and phase-status mechanics do not depend on a global `gsdd` binary after init.
198
+ `init` generates a local `.planning/bin/gsdd*` helper surface. Workflow-embedded helper commands still use `node .planning/bin/gsdd.mjs ...` as the portable contract, so lifecycle preflight, file-op, and phase-status mechanics do not depend on a global `gsdd` binary after init.
199
199
 
200
200
  ### Platform flags for `--tools`
201
201
 
@@ -405,7 +405,9 @@ Switch to budget profile: `gsdd models profile budget`. Disable research and pla
405
405
  ROADMAP.md # Phased delivery plan with inline status
406
406
  config.json # Project configuration
407
407
  bin/
408
- gsdd.mjs # Local workflow-helper launcher for embedded CLI mechanics
408
+ gsdd # POSIX shim for the local helper surface
409
+ gsdd.cmd # Windows shim for the local helper surface
410
+ gsdd.mjs # Canonical local workflow-helper launcher
409
411
  generation-manifest.json # SHA-256 hashes for template versioning
410
412
  .continue-here.md # Session checkpoint (created by pause, consumed by resume)
411
413
  research/ # Domain research outputs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsdd-cli",
3
- "version": "0.18.1",
3
+ "version": "0.18.3",
4
4
  "description": "Workspine — a repo-native delivery spine for long-horizon AI-assisted work, with directly validated support for Claude Code, Codex CLI, and OpenCode, published as gsdd-cli.",
5
5
  "type": "module",
6
6
  "bin": {