@tekyzinc/gsd-t 2.20.7 → 2.21.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/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to GSD-T are documented here. Updated with each release.
4
4
 
5
+ ## [2.21.0] - 2026-02-17
6
+
7
+ ### Added
8
+ - **gsd-t-triage-and-merge**: New command to auto-review unmerged GitHub branches, score impact (auto-merge / review / skip), merge safe branches, and optionally version bump + publish. Publish gate respects autonomy level — auto in Level 3, prompted in Level 1-2. Sensitive file detection for commands, CLI, templates, and scripts
9
+
5
10
  ## [2.20.7] - 2026-02-17
6
11
 
7
12
  ### Added
package/README.md CHANGED
@@ -18,7 +18,7 @@ A methodology for reliable, parallelizable development using Claude Code with op
18
18
  npx @tekyzinc/gsd-t install
19
19
  ```
20
20
 
21
- This installs 38 GSD-T commands + 3 utility commands to `~/.claude/commands/` and the global CLAUDE.md to `~/.claude/CLAUDE.md`. Works on Windows, Mac, and Linux.
21
+ This installs 39 GSD-T commands + 3 utility commands to `~/.claude/commands/` and the global CLAUDE.md to `~/.claude/CLAUDE.md`. Works on Windows, Mac, and Linux.
22
22
 
23
23
  ### Start Using It
24
24
 
@@ -145,6 +145,7 @@ This will replace changed command files, back up your CLAUDE.md if customized, a
145
145
  | `/user:gsd-t-log` | Sync progress Decision Log with recent git activity | Manual |
146
146
  | `/user:gsd-t-version-update` | Update GSD-T to latest version | Manual |
147
147
  | `/user:gsd-t-version-update-all` | Update GSD-T + all registered projects | Manual |
148
+ | `/user:gsd-t-triage-and-merge` | Auto-review, merge, and publish GitHub branches | Manual |
148
149
 
149
150
  ### Backlog Management
150
151
 
@@ -281,8 +282,8 @@ get-stuff-done-teams/
281
282
  ├── LICENSE
282
283
  ├── bin/
283
284
  │ └── gsd-t.js # CLI installer
284
- ├── commands/ # 41 slash commands
285
- │ ├── gsd-t-*.md # 38 GSD-T workflow commands
285
+ ├── commands/ # 42 slash commands
286
+ │ ├── gsd-t-*.md # 39 GSD-T workflow commands
286
287
  │ ├── branch.md # Git branch helper
287
288
  │ ├── checkin.md # Auto-version + commit/push helper
288
289
  │ └── Claude-md.md # Reload CLAUDE.md directives
@@ -55,6 +55,7 @@ UTILITIES Manual
55
55
  log Sync progress Decision Log with recent git activity
56
56
  version-update Update GSD-T package to latest version
57
57
  version-update-all Update GSD-T package + all registered projects
58
+ triage-and-merge Auto-review, merge, and publish GitHub branches
58
59
 
59
60
  BACKLOG Manual
60
61
  ───────────────────────────────────────────────────────────────────────────────
@@ -303,6 +304,13 @@ Use these when user asks for help on a specific command:
303
304
  - **Use when**: Progress.md Decision Log is behind — catches up by scanning git commits since the last logged entry
304
305
  - **Features**: Incremental updates, first-time full reconstruction from git history, groups same-day changes
305
306
 
307
+ ### triage-and-merge
308
+ - **Summary**: Auto-review unmerged GitHub branches, merge safe ones, and optionally publish
309
+ - **Auto-invoked**: No
310
+ - **Files**: Reads `CLAUDE.md`, `.gsd-t/progress.md`, `package.json`; updates `package.json`, `.gsd-t/progress.md`, `CHANGELOG.md`
311
+ - **Use when**: Collaborators have pushed branches and you want to batch-review, merge, and publish without manual per-branch ceremony
312
+ - **Features**: 3-tier impact scoring (auto-merge / review / skip), publish gate (auto in Level 3, prompted otherwise), conflict detection, sensitive file detection
313
+
306
314
  ### backlog-add
307
315
  - **Summary**: Capture a new backlog item with auto-categorization
308
316
  - **Auto-invoked**: No
@@ -0,0 +1,167 @@
1
+ # GSD-T: Triage and Merge — Auto-Review, Merge, and Publish GitHub Branches
2
+
3
+ You are triaging unmerged GitHub branches for safety, then auto-merging, committing, and publishing those that pass all safety checks.
4
+
5
+ ## Step 1: Publish Gate
6
+
7
+ Check the project's autonomy level in `CLAUDE.md`:
8
+
9
+ - **Level 3 (Full Auto / "yolo")**: Auto-publish is ON. Skip the prompt and proceed.
10
+ - **Level 1 or 2**: Ask the user before starting:
11
+ ```
12
+ Auto-publish after merge? This will version bump, npm publish, and deploy.
13
+ (yes/no)
14
+ ```
15
+ If **no**: triage and merge only — skip version bump, npm publish, and deploy (Steps 7-8).
16
+ If **yes**: full pipeline including publish.
17
+
18
+ Store the decision for use in Step 7.
19
+
20
+ ## Step 2: Load Context
21
+
22
+ Read:
23
+ 1. `CLAUDE.md` — project conventions, pre-commit gate, autonomy level
24
+ 2. `.gsd-t/progress.md` — current version and state
25
+ 3. `package.json` — current version number
26
+
27
+ ## Step 3: Fetch and Identify Branches
28
+
29
+ ```bash
30
+ git fetch --all
31
+ git branch -r --no-merged main
32
+ ```
33
+
34
+ If no unmerged branches exist, report "No unmerged branches found" and stop.
35
+
36
+ ## Step 4: Triage Each Branch
37
+
38
+ For each unmerged branch, collect:
39
+
40
+ 1. **Commit log**: `git log main..origin/{branch} --oneline`
41
+ 2. **Files changed**: `git diff main...origin/{branch} --stat`
42
+ 3. **Full diff**: `git diff main...origin/{branch}` (for impact scoring)
43
+ 4. **Conflict check**: `git merge --no-commit --no-ff origin/{branch}` then `git merge --abort`
44
+
45
+ ### Impact Scoring
46
+
47
+ Score each branch on a 3-tier scale:
48
+
49
+ | Tier | Criteria | Action |
50
+ |------|----------|--------|
51
+ | **Auto-merge** | Docs-only, contracts-only, templates with no behavior change, < 100 lines changed, no merge conflicts, no command file behavior changes | Merge automatically |
52
+ | **Review** | Command file changes, CLI behavior changes, new files in `commands/`, template behavior changes, > 100 lines, wave/phase sequence changes | Show summary, ask user to confirm |
53
+ | **Skip** | Merge conflicts, version-sensitive changes (package.json version), breaking changes to existing interfaces | Report why, do not merge |
54
+
55
+ ### Sensitive File Patterns (trigger Review tier)
56
+
57
+ - `commands/*.md` — command behavior
58
+ - `bin/gsd-t.js` — CLI installer
59
+ - `templates/CLAUDE-global.md` — global config template
60
+ - `scripts/*.js` — hook scripts
61
+ - `package.json` — version/dependencies
62
+
63
+ ### Safe File Patterns (stay in Auto-merge tier)
64
+
65
+ - `.gsd-t/contracts/*.md` — contract definitions
66
+ - `.gsd-t/techdebt.md` — debt tracking
67
+ - `docs/*.md` — documentation
68
+ - `examples/**` — example files
69
+ - `*.md` in root (except README.md with structural changes)
70
+
71
+ ## Step 5: Report Triage Results
72
+
73
+ Display a summary table:
74
+
75
+ ```
76
+ ╔══════════════════════════════════════════════════════════════════════════════╗
77
+ ║ Branch Triage Results ║
78
+ ╠══════════════════════════════════════════════════════════════════════════════╣
79
+
80
+ AUTO-MERGE
81
+ ──────────
82
+ ✓ {branch-name} — {commit count} commits, {lines} lines, {description}
83
+
84
+ NEEDS REVIEW
85
+ ────────────
86
+ ? {branch-name} — {commit count} commits, {lines} lines, {reason for review}
87
+
88
+ SKIPPED
89
+ ───────
90
+ ✗ {branch-name} — {reason} (conflicts / breaking changes)
91
+
92
+ ╚══════════════════════════════════════════════════════════════════════════════╝
93
+ ```
94
+
95
+ ## Step 6: Merge Safe Branches
96
+
97
+ For each Auto-merge branch:
98
+ 1. `git merge origin/{branch} --no-edit`
99
+ 2. Verify merge succeeded
100
+ 3. Log the merge
101
+
102
+ For each Review branch:
103
+ 1. Show the diff summary and reason it needs review
104
+ 2. Ask: "Merge {branch}? (yes/no)"
105
+ 3. If yes, merge it
106
+
107
+ If ALL branches were skipped (none merged), report why and stop.
108
+
109
+ ## Step 7: Version Bump and Publish
110
+
111
+ **If publish gate is OFF** (user declined in Step 1): Skip this step entirely. Report merged branches and stop.
112
+
113
+ After all merges complete:
114
+
115
+ 1. **Determine version bump**:
116
+ - If any merged branch adds new commands → bump minor
117
+ - If merged branches are docs/contracts/fixes only → bump patch
118
+ - If any merged branch has breaking changes → bump minor (breaking = major, but those should be in Review tier)
119
+
120
+ 2. **Update files**:
121
+ - `package.json` — bump version
122
+ - `.gsd-t/progress.md` — update version + add Decision Log entry summarizing all merged branches
123
+ - `CHANGELOG.md` — add release entry listing what each branch contributed
124
+
125
+ 3. **Pre-Commit Gate**: Run the project-specific pre-commit checklist:
126
+ - If any merged branch changed command files → update GSD-T-README.md, README.md, CLAUDE-global template, gsd-t-help
127
+ - If any merged branch changed CLI → verify install/update/status/doctor work
128
+ - If any merged branch changed templates → verify gsd-t-init output
129
+
130
+ 4. **Commit**: `git add` changed files and commit:
131
+ ```
132
+ chore: version bump to v{version} for merged branch(es)
133
+ ```
134
+
135
+ 5. **Push**: `git push`
136
+
137
+ 6. **Publish**: `npm publish --access public`
138
+
139
+ 7. **Deploy**: Install globally and propagate:
140
+ ```bash
141
+ npm install -g @tekyzinc/gsd-t@{version}
142
+ gsd-t update-all
143
+ ```
144
+
145
+ ## Step 8: Report
146
+
147
+ Display final summary:
148
+
149
+ ```
150
+ Triage complete:
151
+ Merged: {N} branches
152
+ Skipped: {N} branches
153
+ Published: v{new-version} (or "Skipped — publish gate off")
154
+ ```
155
+
156
+ ## Document Ripple
157
+
158
+ After completing triage-and-merge, check if any of these need updating based on what was merged:
159
+
160
+ 1. **`.gsd-t/progress.md`** — Decision Log entry (always)
161
+ 2. **`CHANGELOG.md`** — Release notes (always, if publishing)
162
+ 3. **`README.md`** — If merged branches changed commands or structure
163
+ 4. **`docs/GSD-T-README.md`** — If merged branches changed commands or workflow
164
+ 5. **`templates/CLAUDE-global.md`** — If merged branches added commands
165
+ 6. **`commands/gsd-t-help.md`** — If merged branches added commands
166
+
167
+ $ARGUMENTS
@@ -114,6 +114,7 @@ GSD-T reads all state files and tells you exactly where you left off.
114
114
  | `/user:gsd-t-log` | Sync progress Decision Log with recent git activity | Manual |
115
115
  | `/user:gsd-t-version-update` | Update GSD-T to latest version | Manual |
116
116
  | `/user:gsd-t-version-update-all` | Update GSD-T + all registered projects | Manual |
117
+ | `/user:gsd-t-triage-and-merge` | Auto-review, merge, and publish GitHub branches | Manual |
117
118
 
118
119
  ---
119
120
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "2.20.7",
4
- "description": "GSD-T: Contract-Driven Development for Claude Code — 41 slash commands with backlog management, impact analysis, test sync, and milestone archival",
3
+ "version": "2.21.0",
4
+ "description": "GSD-T: Contract-Driven Development for Claude Code — 42 slash commands with backlog management, impact analysis, test sync, and milestone archival",
5
5
  "author": "Tekyz, Inc.",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -58,6 +58,7 @@ PROJECT or FEATURE or SCAN
58
58
  | `/user:gsd-t-resume` | Restore context, continue |
59
59
  | `/user:gsd-t-version-update` | Update GSD-T to latest version |
60
60
  | `/user:gsd-t-version-update-all` | Update GSD-T + all registered projects |
61
+ | `/user:gsd-t-triage-and-merge` | Auto-review, merge, and publish GitHub branches |
61
62
  | `/user:gsd-t-backlog-add` | Capture item, auto-categorize, append to backlog |
62
63
  | `/user:gsd-t-backlog-list` | Filtered, ordered view of backlog items |
63
64
  | `/user:gsd-t-backlog-move` | Reorder items by position (priority) |