@tekyzinc/gsd-t 4.9.13 → 4.9.14

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to GSD-T are documented here. Updated with each release.
4
4
 
5
+ ## [4.9.14] - 2026-06-25 (workflow runCli retry — reliability patch)
6
+
7
+ ### Fixed — transient helper-call flakes no longer false-block workflows
8
+
9
+ `runCli` (the inline helper every `*.workflow.js` uses to run a GSD-T CLI command) delegates the call to a haiku helper agent, not a subprocess — so a return can transiently come back missing its parsed result, surfacing later as a cryptic `classify failed: no envelope` or a fail-closed gate block even though the CLI itself succeeded. Caught live during the M94 plan phase: the traceability gate passed when run directly (exit 0) but the workflow's confirm-call came back unparsed and failed closed.
10
+
11
+ - `runCli` now **retries once** when JSON was expected but no parsed result returned (covers both the throw path and a malformed return the loose schema let through). A real CLI failure that returned valid JSON (`ok:false` with a present envelope) is **not** retried — a true result, not a transient miss.
12
+ - Hardens every phase/wave/integrate/debug workflow's CLI calls (preflight, verify-gate, traceability, brief, build-coverage, test-data).
13
+
5
14
  ## [4.9.13] - 2026-06-25 (M93 — Reader Contract every turn, retire the selective gate — patch)
6
15
 
7
16
  ### Changed — concise output is now enforced on EVERY reply, not by pattern-matching
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # GSD-T: Contract-Driven Development for Claude Code
2
2
 
3
- **v4.9.13** - A methodology for reliable, parallelizable development using Claude Code with optional Agent Teams support.
3
+ **v4.9.14** - A methodology for reliable, parallelizable development using Claude Code with optional Agent Teams support.
4
4
 
5
5
  **Eliminates context rot** — task-level fresh dispatch (one subagent per task, ~10-20% context each) means compaction never triggers.
6
6
  **Compaction-proof debug loops** — `gsd-t headless --debug-loop` runs test-fix-retest cycles as separate `claude -p` sessions. A JSONL debug ledger persists all hypothesis/fix/learning history across fresh sessions. Anti-repetition preamble injection prevents retrying failed hypotheses. Escalation tiers (sonnet → opus → human) and a hard iteration ceiling enforced externally.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "4.9.13",
3
+ "version": "4.9.14",
4
4
  "description": "GSD-T: Contract-Driven Development for Claude Code — 54 slash commands with headless-by-default workflow spawning, unattended supervisor relay with event stream, graph-powered code analysis, real-time agent dashboard, task telemetry, doc-ripple enforcement, backlog management, impact analysis, test sync, milestone archival, and PRD generation",
5
5
  "author": "Tekyz, Inc.",
6
6
  "license": "MIT",
@@ -102,7 +102,21 @@ async function runCli(projectDir, subcmd, argv, localBin, label, parseJson = tru
102
102
  ].join("\n");
103
103
  const opts = { label, schema: _CLI_ENVELOPE_SCHEMA, model: "haiku" };
104
104
  if (phaseNameOpt) opts.phase = phaseNameOpt;
105
- const r = await agent(prompt, opts).catch((e) => ({ ok: false, exitCode: -1, envelope: null, stderr: String(e && e.message), via: "error" }));
105
+ // The CLI is run by a haiku helper agent, not a subprocess, so a return can transiently
106
+ // come back missing its parsed result. Retry ONCE on a missing/unparsed result before
107
+ // giving up — a genuine CLI failure fails both attempts (real error survives the retry),
108
+ // while a transient helper miss is recovered. Only retry when JSON was expected (parseJson)
109
+ // and the parsed result is absent; never retry on a clean exit that simply returned no JSON.
110
+ const runOnce = () => agent(prompt, opts).catch((e) => ({ ok: false, exitCode: -1, envelope: null, stderr: String(e && e.message), via: "error" }));
111
+ let r = await runOnce();
112
+ // Retry once when JSON was expected but no parsed result came back — covers both the
113
+ // throw path (via="error") and a malformed return the loose schema let through (ok=false
114
+ // with the result absent). A real CLI failure that returned valid JSON (envelope present,
115
+ // ok=false) is NOT retried — that is a true result, not a transient miss.
116
+ const missingResult = (x) => !x || (parseJson && (x.envelope === undefined || x.envelope === null) && x.ok !== true);
117
+ if (missingResult(r)) {
118
+ r = await runOnce();
119
+ }
106
120
  return r || { ok: false, exitCode: -1, envelope: null, via: "error" };
107
121
  }
108
122
  async function runPreflight(projectDir, label = "preflight", phaseNameOpt) { return runCli(projectDir, "preflight", ["--json"], "cli-preflight.cjs", label, true, phaseNameOpt); }