@windyroad/itil 0.35.12-preview.405 → 0.35.13-preview.412

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.
@@ -484,5 +484,5 @@
484
484
  }
485
485
  },
486
486
  "name": "wr-itil",
487
- "version": "0.35.12"
487
+ "version": "0.35.13"
488
488
  }
@@ -114,6 +114,21 @@ detect_changeset_required() {
114
114
  .changeset/*.md)
115
115
  has_changeset=1
116
116
  ;;
117
+ docs/changesets-holding/README.md)
118
+ # README in the holding dir is meta-doc, not a real changeset
119
+ # (mirrors the .changeset/README.md exclusion above).
120
+ ;;
121
+ docs/changesets-holding/*.md)
122
+ # P177: a held-window changeset entry IS a changeset — authored
123
+ # and audit-trailed, just intentionally held outside `.changeset/`
124
+ # per ADR-042 Rule 7 (held-window blessing). Recognising it here
125
+ # gives the gate a held-window-awareness branch so held-window-
126
+ # bound work commits no longer need a separate move-to-holding
127
+ # chore commit. Release/drain semantics are unchanged — the
128
+ # Release workflow reads `.changeset/` only; a held entry is never
129
+ # drained without a graduation `git mv` back into `.changeset/`.
130
+ has_changeset=1
131
+ ;;
117
132
  packages/*)
118
133
  rest="${path#packages/}"
119
134
  slug="${rest%%/*}"
@@ -229,6 +229,60 @@ run_bash_hook() {
229
229
  [[ "$output" == *"\"permissionDecision\": \"deny\""* ]]
230
230
  }
231
231
 
232
+ # --- P177: held-window directory recognition (ADR-042 Rule 7) ---
233
+ #
234
+ # P141's gate purpose is "every publishable iter has a changeset to drain".
235
+ # A `docs/changesets-holding/<name>.md` entry IS a changeset — authored and
236
+ # audit-trailed, just intentionally held outside `.changeset/` per ADR-042
237
+ # Rule 7 (held-window blessing). Before P177 the gate ignored the holding
238
+ # directory (held entries fell through the `*)` catch-all), forcing held-
239
+ # window-bound work through a 2-commit workaround (work commit + a separate
240
+ # `chore(changeset): move ... to holding`). The gate now recognises a staged
241
+ # held entry as satisfying the discipline, mirroring the `.changeset/*.md`
242
+ # branch (and its README.md meta-doc exclusion). Release/drain semantics are
243
+ # unchanged — the Release workflow reads `.changeset/` only; a held entry is
244
+ # recognised at the commit-gate layer, never drained without a graduation
245
+ # `git mv` back into `.changeset/`.
246
+
247
+ @test "P177 allow: staged packages/<plugin>/ source WITH a staged docs/changesets-holding/ entry allows the commit" {
248
+ echo "skill body" > packages/itil/skills/foo/SKILL.md
249
+ mkdir -p docs/changesets-holding
250
+ printf -- '---\n"@windyroad/itil": patch\n---\nheld fix\n' > docs/changesets-holding/wr-itil-p177.md
251
+ git add packages/itil/skills/foo/SKILL.md docs/changesets-holding/wr-itil-p177.md
252
+ run run_bash_hook "git commit -m 'feat'"
253
+ [ "$status" -eq 0 ]
254
+ [[ "$output" != *"\"permissionDecision\": \"deny\""* ]]
255
+ }
256
+
257
+ @test "P177 allow path with held-window entry emits 0 bytes (ADR-045 Pattern 1 silent-on-pass)" {
258
+ echo "skill body" > packages/itil/skills/foo/SKILL.md
259
+ mkdir -p docs/changesets-holding
260
+ printf -- '---\n"@windyroad/itil": patch\n---\nheld fix\n' > docs/changesets-holding/wr-itil-p177.md
261
+ git add packages/itil/skills/foo/SKILL.md docs/changesets-holding/wr-itil-p177.md
262
+ run run_bash_hook "git commit -m 'feat'"
263
+ [ "$status" -eq 0 ]
264
+ [ "${#output}" -eq 0 ]
265
+ }
266
+
267
+ @test "P177 deny: staged docs/changesets-holding/README.md alone does NOT count as a valid held changeset" {
268
+ echo "skill body" > packages/itil/skills/foo/SKILL.md
269
+ mkdir -p docs/changesets-holding
270
+ echo "# Changesets Holding Area" > docs/changesets-holding/README.md
271
+ git add packages/itil/skills/foo/SKILL.md docs/changesets-holding/README.md
272
+ run run_bash_hook "git commit -m 'feat'"
273
+ [ "$status" -eq 0 ]
274
+ [[ "$output" == *"\"permissionDecision\": \"deny\""* ]]
275
+ }
276
+
277
+ @test "P177 deny: staged source with NEITHER .changeset/*.md NOR a holding entry still denies (regression guard)" {
278
+ echo "skill body" > packages/itil/skills/foo/SKILL.md
279
+ git add packages/itil/skills/foo/SKILL.md
280
+ run run_bash_hook "git commit -m 'feat'"
281
+ [ "$status" -eq 0 ]
282
+ [[ "$output" == *"\"permissionDecision\": \"deny\""* ]]
283
+ [[ "$output" == *"P141"* ]]
284
+ }
285
+
232
286
  # --- Mixed staged sets ---
233
287
 
234
288
  @test "deny: staged source + test in same commit still requires changeset (mixed set)" {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/itil",
3
- "version": "0.35.12-preview.405",
3
+ "version": "0.35.13-preview.412",
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"