@tekyzinc/gsd-t 2.24.6 → 2.24.8

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,16 @@
2
2
 
3
3
  All notable changes to GSD-T are documented here. Updated with each release.
4
4
 
5
+ ## [2.24.8] - 2026-02-18
6
+
7
+ ### Fixed
8
+ - **CLAUDE.md update no longer overwrites user content**: Installer now uses marker-based merging (`<!-- GSD-T:START -->` / `<!-- GSD-T:END -->`). Updates only replace the GSD-T section between markers, preserving all user customizations. Existing installs without markers are auto-migrated. Backup still created for reference
9
+
10
+ ## [2.24.7] - 2026-02-18
11
+
12
+ ### Changed
13
+ - **Next Command Hint redesigned**: Replaced plain `Next →` text with GSD-style "Next Up" visual block — divider lines, `▶ Next Up` header, phase name with description, command in backticks, and alternatives section. Format designed to trigger Claude Code's prompt suggestion engine, making the next command appear as ghost text in the user's input field
14
+
5
15
  ## [2.24.6] - 2026-02-18
6
16
 
7
17
  ### Added
package/bin/gsd-t.js CHANGED
@@ -483,47 +483,80 @@ function installCommands(isUpdate) {
483
483
  return { gsdtCommands, utilityCommands };
484
484
  }
485
485
 
486
+ const GSDT_START = "<!-- GSD-T:START";
487
+ const GSDT_END = "<!-- GSD-T:END";
488
+
486
489
  function installGlobalClaudeMd(isUpdate) {
487
490
  heading("Global CLAUDE.md");
488
491
  const globalSrc = path.join(PKG_TEMPLATES, "CLAUDE-global.md");
489
492
 
490
493
  if (!fs.existsSync(GLOBAL_CLAUDE_MD)) {
491
- copyFile(globalSrc, GLOBAL_CLAUDE_MD, "CLAUDE.md installed → ~/.claude/CLAUDE.md");
494
+ copyFile(globalSrc, GLOBAL_CLAUDE_MD, "CLAUDE.md installed");
495
+ return;
496
+ }
497
+
498
+ if (isSymlink(GLOBAL_CLAUDE_MD)) {
499
+ warn("Skipping CLAUDE.md — target is a symlink");
492
500
  return;
493
501
  }
494
502
 
495
503
  const existing = fs.readFileSync(GLOBAL_CLAUDE_MD, "utf8");
496
- if (existing.includes("GSD-T: Contract-Driven Development")) {
497
- updateExistingGlobalClaudeMd(globalSrc, existing, isUpdate);
504
+ const template = fs.readFileSync(globalSrc, "utf8");
505
+
506
+ if (existing.includes(GSDT_START)) {
507
+ mergeGsdtSection(existing, template, isUpdate);
508
+ } else if (existing.includes("GSD-T: Contract-Driven Development")) {
509
+ migrateToMarkers(existing, template);
498
510
  } else {
499
- appendGsdtToClaudeMd(globalSrc);
511
+ appendGsdtToClaudeMd(template);
500
512
  }
501
513
  }
502
514
 
503
- function updateExistingGlobalClaudeMd(globalSrc, existing, isUpdate) {
515
+ function mergeGsdtSection(existing, template, isUpdate) {
504
516
  if (!isUpdate) {
505
- info("CLAUDE.md already contains GSD-T config — skipping");
506
- info("Run 'gsd-t update' to overwrite with latest version");
517
+ info("CLAUDE.md already contains GSD-T config");
507
518
  return;
508
519
  }
509
- const template = fs.readFileSync(globalSrc, "utf8");
510
- if (normalizeEol(existing) === normalizeEol(template)) {
511
- copyFile(globalSrc, GLOBAL_CLAUDE_MD, "CLAUDE.md updated (no customizations detected)");
520
+ const startIdx = existing.indexOf(GSDT_START);
521
+ const endMarkerIdx = existing.indexOf(GSDT_END);
522
+ if (startIdx === -1 || endMarkerIdx === -1) {
523
+ warn("GSD-T markers incomplete — appending fresh copy");
524
+ appendGsdtToClaudeMd(template);
512
525
  return;
513
526
  }
527
+ const endLineEnd = existing.indexOf("\n", endMarkerIdx);
528
+ const endIdx = endLineEnd === -1 ? existing.length : endLineEnd + 1;
529
+ const before = existing.substring(0, startIdx);
530
+ const after = existing.substring(endIdx);
531
+ const merged = before + template.trimEnd() + "\n" + after;
532
+ if (normalizeEol(merged) === normalizeEol(existing)) {
533
+ info("CLAUDE.md GSD-T section already up to date");
534
+ return;
535
+ }
536
+ const backupPath = GLOBAL_CLAUDE_MD + ".backup-" + Date.now();
537
+ fs.copyFileSync(GLOBAL_CLAUDE_MD, backupPath);
538
+ fs.writeFileSync(GLOBAL_CLAUDE_MD, merged);
539
+ success("CLAUDE.md GSD-T section updated (custom content preserved)");
540
+ }
541
+
542
+ function migrateToMarkers(existing, template) {
514
543
  const backupPath = GLOBAL_CLAUDE_MD + ".backup-" + Date.now();
515
- if (!isSymlink(backupPath)) fs.copyFileSync(GLOBAL_CLAUDE_MD, backupPath);
516
- else warn("Skipping backup target is a symlink");
517
- copyFile(globalSrc, GLOBAL_CLAUDE_MD, "CLAUDE.md updated");
518
- warn(`Previous version backed up to ${path.basename(backupPath)}`);
519
- info("Review the backup if you had custom additions to merge back in.");
520
- }
521
-
522
- function appendGsdtToClaudeMd(globalSrc) {
523
- if (isSymlink(GLOBAL_CLAUDE_MD)) { warn("Skipping CLAUDE.md append — target is a symlink"); return; }
524
- const gsdtContent = fs.readFileSync(globalSrc, "utf8");
525
- const separator = "\n\n# ─── GSD-T Section (added by installer) ───\n\n";
526
- fs.appendFileSync(GLOBAL_CLAUDE_MD, separator + gsdtContent);
544
+ fs.copyFileSync(GLOBAL_CLAUDE_MD, backupPath);
545
+ const sepIdx = existing.indexOf("# ─── GSD-T Section");
546
+ if (sepIdx !== -1) {
547
+ const before = existing.substring(0, sepIdx);
548
+ const merged = before + template.trimEnd() + "\n";
549
+ fs.writeFileSync(GLOBAL_CLAUDE_MD, merged);
550
+ } else {
551
+ fs.writeFileSync(GLOBAL_CLAUDE_MD, template);
552
+ }
553
+ success("CLAUDE.md migrated to marker-based format");
554
+ info("Backup saved: " + path.basename(backupPath));
555
+ }
556
+
557
+ function appendGsdtToClaudeMd(template) {
558
+ const separator = "\n\n";
559
+ fs.appendFileSync(GLOBAL_CLAUDE_MD, separator + template.trimEnd() + "\n");
527
560
  success("GSD-T config appended to existing CLAUDE.md");
528
561
  info("Your existing content was preserved.");
529
562
  }
@@ -1317,7 +1350,8 @@ module.exports = {
1317
1350
  checkDoctorClaudeMd,
1318
1351
  checkDoctorSettings,
1319
1352
  checkDoctorEncoding,
1320
- updateExistingGlobalClaudeMd,
1353
+ mergeGsdtSection,
1354
+ migrateToMarkers,
1321
1355
  appendGsdtToClaudeMd,
1322
1356
  readSettingsJson,
1323
1357
  readUpdateCache,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "2.24.6",
3
+ "version": "2.24.8",
4
4
  "description": "GSD-T: Contract-Driven Development for Claude Code — 43 slash commands with backlog management, impact analysis, test sync, and milestone archival",
5
5
  "author": "Tekyz, Inc.",
6
6
  "license": "MIT",
@@ -1,3 +1,4 @@
1
+ <!-- GSD-T:START — Do not remove this marker. Content between START/END is managed by gsd-t update. -->
1
2
  # Prime Directives
2
3
 
3
4
  1. SIMPLICITY ABOVE ALL. Every change should be minimal and impact as little code as possible. No massive refactors.
@@ -361,33 +362,51 @@ If in doubt, skip research and proceed — research if execution reveals gaps.
361
362
 
362
363
  ### Next Command Hint
363
364
 
364
- When a GSD-T command completes (and does NOT auto-advance to the next phase), display a hint showing the recommended next command. Format:
365
+ When a GSD-T command completes (and does NOT auto-advance to the next phase), display a "Next Up" block at the very end of your response. This format is designed to trigger Claude Code's prompt suggestion engine — making the next command appear as ghost text in the user's input field.
366
+
367
+ **MANDATORY format** — use this exact structure:
368
+
369
+ ```
370
+ ───────────────────────────────────────────────────────────────
371
+
372
+ ## ▶ Next Up
373
+
374
+ **{Phase Name}** — {one-line description of what happens next}
375
+
376
+ `/user:gsd-t-{command}`
377
+
378
+ ───────────────────────────────────────────────────────────────
379
+ ```
380
+
381
+ If there are alternative commands that also make sense, add them:
365
382
 
366
383
  ```
367
- Next → /user:gsd-t-{command}
384
+ **Also available:**
385
+ - `/user:gsd-t-{alt-1}` — {description}
386
+ - `/user:gsd-t-{alt-2}` — {description}
368
387
  ```
369
388
 
370
389
  Successor mapping:
371
- | Completed | Next |
372
- |-----------|------|
373
- | `project` | `gsd-t-milestone` |
374
- | `feature` | `gsd-t-milestone` |
375
- | `milestone` | `gsd-t-partition` |
376
- | `partition` | `gsd-t-plan` (or `gsd-t-discuss` if complex) |
377
- | `discuss` | `gsd-t-plan` |
378
- | `plan` | `gsd-t-execute` (or `gsd-t-impact` if risky) |
379
- | `impact` | `gsd-t-execute` |
380
- | `execute` | `gsd-t-test-sync` |
381
- | `test-sync` | `gsd-t-verify` (or `gsd-t-integrate` if multi-domain) |
382
- | `integrate` | `gsd-t-verify` |
383
- | `verify` | `gsd-t-complete-milestone` |
384
- | `complete-milestone` | `gsd-t-status` |
385
- | `scan` | `gsd-t-promote-debt` or `gsd-t-milestone` |
386
- | `init` | `gsd-t-scan` or `gsd-t-milestone` |
387
- | `init-scan-setup` | `gsd-t-milestone` |
388
- | `gap-analysis` | `gsd-t-milestone` or `gsd-t-feature` |
389
- | `populate` | `gsd-t-status` |
390
- | `setup` | `gsd-t-status` |
390
+ | Completed | Next | Also available |
391
+ |-----------|------|----------------|
392
+ | `project` | `milestone` | |
393
+ | `feature` | `milestone` | |
394
+ | `milestone` | `partition` | |
395
+ | `partition` | `plan` | `discuss` (if complex) |
396
+ | `discuss` | `plan` | |
397
+ | `plan` | `execute` | `impact` (if risky) |
398
+ | `impact` | `execute` | |
399
+ | `execute` | `test-sync` | |
400
+ | `test-sync` | `verify` | `integrate` (if multi-domain) |
401
+ | `integrate` | `verify` | |
402
+ | `verify` | `complete-milestone` | |
403
+ | `complete-milestone` | `status` | |
404
+ | `scan` | `promote-debt` | `milestone` |
405
+ | `init` | `scan` | `milestone` |
406
+ | `init-scan-setup` | `milestone` | |
407
+ | `gap-analysis` | `milestone` | `feature` |
408
+ | `populate` | `status` | |
409
+ | `setup` | `status` | |
391
410
 
392
411
  Commands with no successor (standalone): `quick`, `debug`, `brainstorm`, `status`, `help`, `resume`, `prompt`, `log`, backlog commands.
393
412
 
@@ -438,3 +457,4 @@ When resuming work (new session or after /clear):
438
457
  6. Continue from current task — don't restart the phase
439
458
 
440
459
  **CRITICAL: Do NOT research how the system works. The docs tell you. Read them.**
460
+ <!-- GSD-T:END — Do not remove this marker. -->