@tekyzinc/gsd-t 5.13.10 → 5.14.10

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,53 @@
2
2
 
3
3
  All notable changes to GSD-T are documented here. Updated with each release.
4
4
 
5
+ ## [5.14.10] - 2026-08-25
6
+
7
+ ### Added — gap analysis can now produce a red-teamed client deliverable
8
+
9
+ `/gsd-t-gap-analysis` gains a second mode, distilled from the HILO AI
10
+ Scheduling run. That workflow existed only in one session's history: it was
11
+ recovered from the live transcript and from the estimating sheet itself, read
12
+ through the service-account path `/gsd-t-estimate` already uses.
13
+
14
+ The real artifact was measured rather than guessed: 33 feature rows carrying
15
+ 595 checkable claims — 33 purpose sentences, 241 requirement bullets, 108 gap
16
+ bullets, 32 status notes, 76 references, 104 debt mappings — with the estimate
17
+ columns still empty.
18
+
19
+ **Upgraded in place, not retired.** Without `--sheet`, the command produces the
20
+ markdown report exactly as before, so the two tests and two workflows that call
21
+ it keep working unchanged. With `--sheet <url>`, it runs the full procedure:
22
+ strip everything that would not add code or stored data, roll the survivors up
23
+ into features whose individual requirements are bullets inside one row,
24
+ describe each in instruction voice, judge it against the code, red team the
25
+ result, and write columns A-D and M-P.
26
+
27
+ Four decisions came from the evidence rather than from preference:
28
+
29
+ - **The strip step blocks for human confirmation.** It removes most of the
30
+ input, and it needed live correction during the proven run — "run in shadow
31
+ beside real schedules" is operational policy, not something anyone builds. A
32
+ wrongly-dropped requirement is invisible in every later artifact.
33
+ - **The checkers are a red team, not reviewers.** They are told the sheet
34
+ contains false claims and asked to produce them. A friendly seven-row sample
35
+ had already approved a column later found 70% defective — 45 of 64 sentences.
36
+ - **Coverage splits by what one check costs.** Every claim is checked where
37
+ checking means reading a sentence or following a link; claims that require
38
+ proving code is absent are checked in a batch of 20, widening to every claim
39
+ when three or more of the batch are wrong.
40
+ - **All checkers returning clean is a failed check**, not a clean sheet. The
41
+ proven run had one clean column out of six.
42
+
43
+ A correction is treated as an unverified claim: fresh checkers attack the fixed
44
+ cells, and two non-converging cycles halt rather than looping. The money
45
+ columns are never written — `/gsd-t-estimate` owns those, and the sheet's own
46
+ formulas compute days and dollars from them.
47
+
48
+ - `commands/gsd-t-gap-analysis.md`: Steps 4a-6c, gated on `--sheet`.
49
+ - `.gsd-t/pseudocode/PseudoCode-GapAnalysis.md`: behaviour map, style gate
50
+ clean.
51
+
5
52
  ## [5.13.10] - 2026-08-22
6
53
 
7
54
  ### Added — trim and case are enforced at the boundary, FAIL-CLOSED
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # GSD-T: Contract-Driven Development for Claude Code
2
2
 
3
- **v5.13.10** - A methodology for reliable, parallelizable development using Claude Code with optional Agent Teams support.
3
+ **v5.14.10** - 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.
@@ -2,6 +2,19 @@
2
2
 
3
3
  You are performing a gap analysis between a provided specification and the existing codebase. The user pastes requirements or a spec, and you systematically identify what's done, what's partial, what's wrong, and what's missing.
4
4
 
5
+ ## Two modes — chosen by whether a sheet URL was given
6
+
7
+ | Invocation | Mode | Output |
8
+ |---|---|---|
9
+ | `/gsd-t-gap-analysis <spec>` | **Report** (default) | `.gsd-t/gap-analysis.md` — Steps 0.5-9 below, unchanged |
10
+ | `/gsd-t-gap-analysis <spec> --sheet <url>` | **Client deliverable** | The estimating sheet's columns A-D and M-P, red-teamed — Steps 4a-6c |
11
+
12
+ **Report mode is the default and is unchanged.** Every existing caller — `/gsd-t-scan`'s next-step offer, `gsd-t-phase.workflow.js` routing — invokes it without `--sheet` and behaves exactly as before.
13
+
14
+ **Client-deliverable mode** is the procedure proven on the HILO AI Scheduling sheet: 141 raw requirements reduced to 33 feature rows carrying 595 checkable claims, judged against the code, then attacked by a red team that found a 70% defect rate in a column a friendly sample had already approved. It writes only the *what and whether* columns; `/gsd-t-estimate` sizes and prices them afterward. Behaviour map: `.gsd-t/pseudocode/PseudoCode-GapAnalysis.md`.
15
+
16
+ In client-deliverable mode, run Steps 0.5-3 as written (they load context and parse the spec), then branch to Step 4a instead of Step 4.
17
+
5
18
  ## Step 0.5: Scan Freshness Auto-Refresh
6
19
 
7
20
  ```bash
@@ -181,6 +194,117 @@ If agent teams are not available or there are fewer than 3 requirements, run seq
181
194
  - Read source files, test files, config, schema, contracts, and docs
182
195
  - Classify each requirement with evidence
183
196
 
197
+ ---
198
+
199
+ # Client-deliverable mode (Steps 4a-6c) — only when `--sheet <url>` was given
200
+
201
+ Report mode skips this whole block and continues at Step 6.
202
+
203
+ ## Step 4a: Strip everything that isn't buildable — HUMAN-CONFIRMED
204
+
205
+ **This step removes most of the input, and getting it wrong poisons every step after it.**
206
+
207
+ Sort every parsed requirement by one question: **would building it add or change code, or something stored?**
208
+
209
+ - **Yes → keep.** A setting the system reads, a rule it applies, a screen, an endpoint, a table.
210
+ - **No → drop.** Rollout policy, planning steps, trial design, training plans, decisions about how to run the project.
211
+
212
+ Worked examples from the proven run:
213
+
214
+ | Item | Verdict | Why |
215
+ |---|---|---|
216
+ | "Run in shadow beside real schedules" | **DROP** | An operational policy. Nobody writes code for it. |
217
+ | "Resolve each student's required events-per-week" | **KEEP** | A computation the system performs. |
218
+ | "Agree the scheduling priorities with stakeholders" | **DROP** | A planning step. Its *output* may become a rule; the step itself is not one. |
219
+ | "Store per-location override for duty limits" | **KEEP** | Stored data plus the code that reads it. |
220
+
221
+ A planning step whose *result* is a rule: drop the step, keep the rule if the rule is stated somewhere. If it isn't, the rule doesn't exist yet — say so under open questions rather than inventing it.
222
+
223
+ **Keep the dropped list with a one-line reason each**, and show the user the count kept vs dropped plus the full dropped list. **Wait for confirmation before continuing** — this is the one blocking pause in the flow, because a wrongly-dropped requirement is invisible in every later artifact.
224
+
225
+ ## Step 4b: Roll up to features
226
+
227
+ Group the survivors into features a person would name (`Availability, Operating Hours and Blackouts`, not `SCH-046`).
228
+
229
+ - One feature = one row. Its individual requirements become **bullets inside that row's cell**, never rows of their own.
230
+ - Target shape, measured on the proven sheet: **33 rows carrying 241 bullets** — roughly 3-10 bullets per row.
231
+ - Assign each row a **domain** (column A) and the **user types** it serves (column B).
232
+
233
+ ## Step 4c: Describe each feature
234
+
235
+ - **Column C** — the feature name in bold, then ONE sentence of purpose beneath it.
236
+ - **Column D** — the requirements as bullets, written as **instructions**: "Work out each student's required events-per-week." **Never** as statements of current fact: "Resolves each student's required events-per-week."
237
+
238
+ Present tense reads as a description of working code. On a row that turns out to be unbuilt, the row contradicts itself — this exact defect appeared in the proven run and had to be rewritten across all 32 rows.
239
+
240
+ Plain words in column D. No jargon a client would have to decode.
241
+
242
+ ## Step 5a: Judge each feature against the code
243
+
244
+ Query the code graph for each feature's surface (`gsd-t graph`), read what it names, and decide:
245
+
246
+ - **Implemented** — every bullet is built.
247
+ - **Not Implemented** — none of it is.
248
+ - **Partial** — some is. **MUST be followed by `Not implemented:` and the specific bullets that are missing.** A bare "Partial" is not an answer anyone can act on.
249
+
250
+ Write the verdict to **column M**, and to **column N** what works today versus what does not.
251
+
252
+ ## Step 5b: References and impacting debt
253
+
254
+ - **Column O** — where each claim came from: `Requirements doc (6 reqs) · Asana task · PR #4386`. Short clickable names, each token its own link. Never a wall of file paths.
255
+ - **Column P** — open Extreme/Critical findings from `.gsd-t/techdebt.md` that would hit this feature. **Judge by the code each finding cites, not by keyword match.**
256
+
257
+ ## Step 6a: RED TEAM the sheet — NOT a review
258
+
259
+ Spawn adversarial checkers via the `Agent` tool, **blocking, no `name`** (see the blocking-subagent guard in `gsd-t-quick.md`). Each gets a fresh context and this framing:
260
+
261
+ > **This sheet contains false claims. Your job is to find them.** Report what is wrong and where. If you searched exhaustively and found nothing, say so plainly — a clean verdict must be earned.
262
+
263
+ Verdict per checker: `FAIL` (defects listed) or `GRUDGING-PASS` (searched, found none).
264
+
265
+ **Coverage is split by what one check costs:**
266
+
267
+ | Column | Claims (proven sheet) | Coverage | Why |
268
+ |---|---|---|---|
269
+ | C — purpose sentences | 33 | **Every one** | Reading a sentence is free. A 7-row sample here missed a 70% defect rate. |
270
+ | D — requirement bullets | 241 | **Every one** | Text against source text; no code read needed. |
271
+ | N — status notes | 32 | **Every one** | Cheap. |
272
+ | O — references | 76 | **Every one** | A link resolves or it doesn't. |
273
+ | Dropped list (Step 4a) | all | **Every one** | A wrongly-dropped requirement is invisible downstream — nothing else can catch it. |
274
+ | M — gap bullets | 108 | **Batch of 20** | Each asserts code is absent; disproving it costs a search. |
275
+ | P — debt mappings | 104 | **Batch of 20** | Each needs the finding read AND the feature's code read. |
276
+
277
+ **Widening rule:** if **3 or more** of a batch of 20 are wrong, that column goes to every-claim. The batch proved the column is unreliable; sampling further only hides the rest.
278
+
279
+ **One checker does nothing but hunt cross-column contradictions** — a row whose column C asserts a capability in present tense while column M lists that same capability as the row's defining gap. No single-column checker can see this; it is the defect class that reached the client sheet in the proven run.
280
+
281
+ **All checkers returning clean is a FAILED check, not a clean sheet.** The proven run had one clean column out of six. An all-clean result means the framing was too gentle: re-run with sharper prompts. Do NOT report a clean sheet on the first all-pass.
282
+
283
+ ## Step 6b: Fix, then RE-RED-TEAM the fixes
284
+
285
+ 1. Correct the cells the red team named.
286
+ 2. Hand the corrected cells to a **fresh** red team — a correction is an unverified claim, exactly like the original.
287
+ 3. Clean → done. Still failing → correct once more, check once more.
288
+ 4. **Still failing after the second cycle → HALT.** Report to the user what will not settle. Two rounds that cannot converge signals a wrong premise, not a third round.
289
+
290
+ ## Step 6c: Write the sheet — leave the money alone
291
+
292
+ Write columns **A-D and M-P** using the service-account path documented in `commands/gsd-t-estimate.md` Step 5 (permanent SA `gsd-t-sheets-writer@ai-estimator-415612.iam.gserviceaccount.com`, self-signed JWT, Sheets v4 REST). A `403` on the read-probe means the sheet isn't shared — prompt the user to share it as Editor and re-probe.
293
+
294
+ **NEVER write columns E-L** (Phase, Web Portal, Backend/API, Days, MFactor Days, Total Days, LOW $, HIGH $). Those are `/gsd-t-estimate`'s to fill, and the sheet's own formulas compute the money from them.
295
+
296
+ Then end with:
297
+
298
+ ```
299
+ ## ▶ Next Up
300
+
301
+ **Estimate** — size the gaps and price them
302
+
303
+ `/gsd-t-estimate --sheet {url}`
304
+ ```
305
+
306
+ ---
307
+
184
308
  ## Step 6: Generate Gap Analysis Document
185
309
 
186
310
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "5.13.10",
3
+ "version": "5.14.10",
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",