@windyroad/itil 0.3.0 → 0.3.1-preview.72
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
|
@@ -260,6 +260,14 @@ After any operation, report:
|
|
|
260
260
|
- For restore: the linked problem ID (or "No Problem" note)
|
|
261
261
|
- Any quality-check warnings
|
|
262
262
|
|
|
263
|
-
|
|
263
|
+
Commit the completed work per ADR-014 (governance skills commit their own work):
|
|
264
|
+
1. `git add` all created/modified files for this operation
|
|
265
|
+
2. Delegate to `wr-risk-scorer:pipeline` (subagent_type: `wr-risk-scorer:pipeline`) to assess the staged changes and create a bypass marker
|
|
266
|
+
3. `git commit -m "<message>"` using the convention for the operation type:
|
|
267
|
+
- New incident: `docs(incidents): open I<NNN> <title>`
|
|
268
|
+
- Incident mitigated: `docs(incidents): I<NNN> mitigated — <mitigation summary>`
|
|
269
|
+
- Incident restored: `docs(incidents): I<NNN> restored — <action>`
|
|
270
|
+
- Incident closed: `docs(incidents): close I<NNN>`
|
|
271
|
+
4. If risk is above appetite: use `AskUserQuestion` to ask whether to commit anyway, remediate first, or park the work. If `AskUserQuestion` is unavailable, skip the commit and report the uncommitted state clearly.
|
|
264
272
|
|
|
265
273
|
$ARGUMENTS
|
|
@@ -277,7 +277,11 @@ For each known-error that has a `## Fix Released` section, use `AskUserQuestion`
|
|
|
277
277
|
|
|
278
278
|
**Step 9e: Update files**
|
|
279
279
|
|
|
280
|
-
Edit each problem file where the priority changed.
|
|
280
|
+
Edit each problem file where the priority changed. Then commit the updated files per ADR-014:
|
|
281
|
+
1. `git add` the changed problem files
|
|
282
|
+
2. Delegate to `wr-risk-scorer:pipeline` to assess and create a bypass marker
|
|
283
|
+
3. `git commit -m "docs(problems): review — re-rank priorities"`
|
|
284
|
+
If `AskUserQuestion` is unavailable and risk is above appetite, skip the commit and report the uncommitted state.
|
|
281
285
|
|
|
282
286
|
### 10. Quality checks
|
|
283
287
|
|
|
@@ -300,6 +304,15 @@ After any operation, report:
|
|
|
300
304
|
- The current status
|
|
301
305
|
- Any quality check warnings
|
|
302
306
|
|
|
303
|
-
|
|
307
|
+
Commit the completed work per ADR-014 (governance skills commit their own work):
|
|
308
|
+
1. `git add` all created/modified files for this operation
|
|
309
|
+
2. Delegate to `wr-risk-scorer:pipeline` (subagent_type: `wr-risk-scorer:pipeline`) to assess the staged changes and create a bypass marker
|
|
310
|
+
3. `git commit -m "<message>"` using the convention for the operation type:
|
|
311
|
+
- New problem: `docs(problems): open P<NNN> <title>`
|
|
312
|
+
- Known Error transition: `docs(problems): P<NNN> known error — <root cause summary>`
|
|
313
|
+
- Problem closed: `docs(problems): close P<NNN> <title>`
|
|
314
|
+
- Review/re-rank: `docs(problems): review — re-rank priorities`
|
|
315
|
+
- Fix implemented: `fix(<scope>): <description> (closes P<NNN>)` — include problem file changes in the same commit
|
|
316
|
+
4. If risk is above appetite: use `AskUserQuestion` to ask whether to commit anyway, remediate first, or park the work. If `AskUserQuestion` is unavailable, skip the commit and report the uncommitted state clearly.
|
|
304
317
|
|
|
305
318
|
$ARGUMENTS
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env bats
|
|
2
|
+
# Doc-lint guard: manage-problem SKILL.md must not contain prose option prompts.
|
|
3
|
+
#
|
|
4
|
+
# Structural assertion — Permitted Exception to the source-grep ban (ADR-005 / P011).
|
|
5
|
+
# These tests do not assert hook behaviour; they assert that the skill specification
|
|
6
|
+
# document conforms to the structured-interaction contract.
|
|
7
|
+
#
|
|
8
|
+
# Cross-reference:
|
|
9
|
+
# ADR-013 Confirmation criterion (docs/decisions/013-structured-user-interaction-for-governance-decisions.proposed.md)
|
|
10
|
+
# P021 investigation task: "add a BATS or doc-lint test that fails if the skill contains prose option patterns"
|
|
11
|
+
# @jtbd JTBD-001 (enforce governance without slowing down)
|
|
12
|
+
# @jtbd JTBD-101 (extend the suite with clear patterns)
|
|
13
|
+
|
|
14
|
+
setup() {
|
|
15
|
+
SKILL_DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")/.." && pwd)"
|
|
16
|
+
SKILL_FILE="${SKILL_DIR}/SKILL.md"
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@test "SKILL.md exists and has frontmatter" {
|
|
20
|
+
[ -f "$SKILL_FILE" ]
|
|
21
|
+
run head -1 "$SKILL_FILE"
|
|
22
|
+
[ "$status" -eq 0 ]
|
|
23
|
+
[ "$output" = "---" ]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@test "SKILL.md does not contain 'Your call:' prose option prompt" {
|
|
27
|
+
# ADR-013 Rule 1: all decision branch points must use AskUserQuestion, not prose.
|
|
28
|
+
# 'Your call:' is the canonical unstructured prompt observed in P021 (risk-scorer image #3).
|
|
29
|
+
run grep -n "Your call:" "$SKILL_FILE"
|
|
30
|
+
[ "$status" -ne 0 ] # grep exits 1 when no match — that IS the pass condition
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@test "SKILL.md does not contain freestanding 'Options: (a)' prose list" {
|
|
34
|
+
# ADR-013 Rule 1: prose option lists must not appear as skill instructions.
|
|
35
|
+
# Pattern: 'Options: (a)' as an instruction to Claude to present unstructured choices.
|
|
36
|
+
# Note: 'Would you like to: (a)' in AskUserQuestion examples is a different pattern
|
|
37
|
+
# and is NOT matched by this assertion.
|
|
38
|
+
run grep -n "Options: (a)" "$SKILL_FILE"
|
|
39
|
+
[ "$status" -ne 0 ]
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@test "SKILL.md does not contain 'which way?' prose branch prompt" {
|
|
43
|
+
# ADR-013 Confirmation criterion lists 'which way?' as a prohibited prose prompt.
|
|
44
|
+
run grep -n "which way?" "$SKILL_FILE"
|
|
45
|
+
[ "$status" -ne 0 ]
|
|
46
|
+
}
|