From abc9e8ca52032c4f9250415b2022358c3ae9a1d9 Mon Sep 17 00:00:00 2001 From: kmaclip Date: Fri, 27 Mar 2026 10:58:19 -0400 Subject: [PATCH] fix: add feature-signal detection to ship version bump heuristic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The version bump auto-decide logic uses only line count (< 50 = MICRO, 50+ = PATCH) to pick the bump level. MINOR is never auto-triggered — it only fires when the user is asked, but the ask never happens because PATCH catches everything above 50 lines. This caused real feature work (new pages, new engines, new modules) to ship as PATCH bumps across 23+ sessions. The fix adds feature-signal detection before the line-count check: - New route/page files (e.g. app/*/page.tsx, pages/*.ts) - New DB migration/schema files - New test files alongside new source files - Branch name starting with feat/ - 500+ lines changed (large scope) - New modules/packages added If ANY signal is detected, the skill ASK the user about MINOR instead of auto-picking PATCH. This preserves auto-decide for genuine patches while surfacing the MINOR question for real features. Closes #527 --- ship/SKILL.md | 5 +++-- ship/SKILL.md.tmpl | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ship/SKILL.md b/ship/SKILL.md index 7929a9fb5..5b3fd0525 100644 --- a/ship/SKILL.md +++ b/ship/SKILL.md @@ -1580,9 +1580,10 @@ High-confidence findings (agreed on by multiple sources) should be prioritized f 2. **Auto-decide the bump level based on the diff:** - Count lines changed (`git diff origin/...HEAD --stat | tail -1`) + - Check for feature signals: new route/page files (e.g. `app/*/page.tsx`, `pages/*.ts`), new DB migration/schema files, new test files alongside new source files, or branch name starting with `feat/` - **MICRO** (4th digit): < 50 lines changed, trivial tweaks, typos, config - - **PATCH** (3rd digit): 50+ lines changed, bug fixes, small-medium features - - **MINOR** (2nd digit): **ASK the user** — only for major features or significant architectural changes + - **PATCH** (3rd digit): 50+ lines changed, no feature signals detected + - **MINOR** (2nd digit): **ASK the user** if ANY feature signal is detected, OR 500+ lines changed, OR new modules/packages added - **MAJOR** (1st digit): **ASK the user** — only for milestones or breaking changes 3. Compute the new version: diff --git a/ship/SKILL.md.tmpl b/ship/SKILL.md.tmpl index 62842fc52..ea703d4ac 100644 --- a/ship/SKILL.md.tmpl +++ b/ship/SKILL.md.tmpl @@ -322,9 +322,10 @@ For each classified comment: 2. **Auto-decide the bump level based on the diff:** - Count lines changed (`git diff origin/...HEAD --stat | tail -1`) + - Check for feature signals: new route/page files (e.g. `app/*/page.tsx`, `pages/*.ts`), new DB migration/schema files, new test files alongside new source files, or branch name starting with `feat/` - **MICRO** (4th digit): < 50 lines changed, trivial tweaks, typos, config - - **PATCH** (3rd digit): 50+ lines changed, bug fixes, small-medium features - - **MINOR** (2nd digit): **ASK the user** — only for major features or significant architectural changes + - **PATCH** (3rd digit): 50+ lines changed, no feature signals detected + - **MINOR** (2nd digit): **ASK the user** if ANY feature signal is detected, OR 500+ lines changed, OR new modules/packages added - **MAJOR** (1st digit): **ASK the user** — only for milestones or breaking changes 3. Compute the new version: