@windyroad/itil 0.24.0-preview.267 → 0.24.0-preview.268

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/itil",
3
- "version": "0.24.0-preview.267",
3
+ "version": "0.24.0-preview.268",
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"
@@ -132,14 +132,26 @@ setup() {
132
132
  # Description -> Symptoms -> Workaround -> Affected plugin / component ->
133
133
  # Frequency -> Versions (was Environment pre-amendment) -> Evidence ->
134
134
  # Cross-reference. Assert section order in the primary default block.
135
+ #
136
+ # P140 fix-and-continue (Step 6.5 closed allow-list, P081-class stale-grep):
137
+ # iter 16's P128 amendment added a `## Versions` section to the structured
138
+ # default block (~line 293) but TWO other `## Versions` sections coexist —
139
+ # the "Drafted Upstream Report" block (~line 247) and the issue-shaped
140
+ # example block (~line 335). A bare `head -1` picks the earliest match
141
+ # (line 247) and breaks the order assertion `freq_line < versions_line`.
142
+ # Scope the `versions_line` lookup to between `freq_line` and `evidence_line`
143
+ # via awk range so we pick the structured-default block's Versions header.
144
+ # Architect note 2026-05-03: if a second section-name-collides-across-blocks
145
+ # test ever needs the same awk-range scoping, factor a
146
+ # `bats_helpers/section_in_block.bash` helper (P012 / ADR-052 amendment).
135
147
  desc_line=$(grep -n '^## Description$' "$SKILL_MD" | head -1 | cut -d: -f1)
136
148
  symptoms_line=$(grep -n '^## Symptoms$' "$SKILL_MD" | head -1 | cut -d: -f1)
137
149
  workaround_line=$(grep -n '^## Workaround$' "$SKILL_MD" | head -1 | cut -d: -f1)
138
150
  affected_line=$(grep -nE '^## Affected plugin' "$SKILL_MD" | head -1 | cut -d: -f1)
139
151
  freq_line=$(grep -n '^## Frequency$' "$SKILL_MD" | head -1 | cut -d: -f1)
140
- versions_line=$(grep -n '^## Versions$' "$SKILL_MD" | head -1 | cut -d: -f1)
141
152
  evidence_line=$(grep -n '^## Evidence$' "$SKILL_MD" | head -1 | cut -d: -f1)
142
153
  xref_line=$(grep -n '^## Cross-reference$' "$SKILL_MD" | head -1 | cut -d: -f1)
154
+ versions_line=$(awk -v lo="${freq_line:-${desc_line:-1}}" -v hi="${evidence_line:-9999}" 'NR>lo && NR<hi && /^## Versions$/{print NR; exit}' "$SKILL_MD")
143
155
 
144
156
  [ -n "$desc_line" ] || { echo "missing ## Description"; return 1; }
145
157
  [ -n "$symptoms_line" ] || { echo "missing ## Symptoms"; return 1; }