@windyroad/itil 0.58.0-preview.940 → 0.58.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # P378/RFC-030 Piece 2: itil-commit-trailer-transition-advisory.sh — the shared
4
4
  # RFC+story commit-trailer auto-transition DETECTOR. Advises (ADR-014: does not
5
- # perform) proposed/accepted RFC → in-progress and draft story → in-progress on
5
+ # perform) proposed/accepted RFC → in-progress and ACCEPTED story → in-progress on
6
6
  # the first non-capture commit carrying the Refs trailer. Behavioural.
7
7
 
8
8
  setup() {
@@ -46,8 +46,9 @@ commit() { git commit -q --allow-empty -m "$1"; }
46
46
  [ -z "$output" ]
47
47
  }
48
48
 
49
- @test "advises draft story → in-progress on a non-capture Refs commit" {
50
- echo "---" > docs/stories/draft/STORY-201-y.md; git add -A; commit "$(printf 'feat(itil): capture STORY-201 y\n\nRefs: STORY-201')"
49
+ @test "advises accepted story → in-progress on a non-capture Refs commit (ADR-096: draft is blocked, accepted is advised)" {
50
+ mkdir -p docs/stories/accepted
51
+ echo "---" > docs/stories/accepted/STORY-201-y.md; git add -A; commit "$(printf 'feat(itil): capture STORY-201 y\n\nRefs: STORY-201')"
51
52
  commit "$(printf 'feat(itil): implement\n\nRefs: STORY-201')"
52
53
  run run_hook
53
54
  [ "$status" -eq 0 ]
@@ -55,6 +56,15 @@ commit() { git commit -q --allow-empty -m "$1"; }
55
56
  [[ "$output" == *"manage-story"* ]]
56
57
  }
57
58
 
59
+ @test "silent for a DRAFT story on a non-capture Refs commit (ADR-096: draft is gate-blocked, not advised to advance)" {
60
+ mkdir -p docs/stories/draft
61
+ echo "---" > docs/stories/draft/STORY-202-z.md; git add -A; commit "$(printf 'feat(itil): capture STORY-202 z\n\nRefs: STORY-202')"
62
+ commit "$(printf 'feat(itil): implement\n\nRefs: STORY-202')"
63
+ run run_hook
64
+ [ "$status" -eq 0 ]
65
+ [[ "$output" != *"STORY-202"* ]]
66
+ }
67
+
58
68
  @test "bypass env var suppresses the advisory" {
59
69
  echo "---" > docs/rfcs/RFC-201-x.proposed.md; git add -A; commit "$(printf 'feat: s\n\nRefs: RFC-201')"
60
70
  run env BYPASS_TRANSITION_ADVISORY=1 bash -c 'printf "{\"tool_name\":\"Bash\",\"tool_input\":{\"command\":\"git commit -m x\"}}" | bash "$0"' "$HOOK"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/itil",
3
- "version": "0.58.0-preview.940",
3
+ "version": "0.58.0",
4
4
  "description": "ITIL-aligned IT service management for Claude Code (problem, and future incident/change skills)",
5
5
  "bin": {
6
6
  "windyroad-itil": "./bin/install.mjs"
@@ -116,8 +116,11 @@ setup() {
116
116
  # Surface 4: Auto-transition triggers
117
117
  # ---------------------------------------------------------------------------
118
118
 
119
- @test "manage-story: SKILL.md names draft → in-progress auto-transition on first non-capture commit" {
120
- run grep -iE 'draft.*in-progress.*first.*non-capture|first commit.*non-capture|first.*after.*capture' "$SKILL_FILE"
119
+ @test "manage-story: SKILL.md names accepted → in-progress on the first implementing commit (ADR-096: draft blocked, not auto-advanced)" {
120
+ run grep -iE 'accepted → in-progress' "$SKILL_FILE"
121
+ [ "$status" -eq 0 ]
122
+ # ADR-096: the old draft → in-progress auto-transition is removed.
123
+ run grep -iE 'NO .draft → in-progress. transition|never implementable' "$SKILL_FILE"
121
124
  [ "$status" -eq 0 ]
122
125
  }
123
126