@windyroad/itil 1.2.0 → 2.0.0-preview.1111
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/.agents/plugins/marketplace.json +12 -0
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +42 -0
- package/README.md +34 -25
- package/agents/hang-off-check.md +34 -34
- package/bin/install.mjs +71 -5
- package/bin/wr-itil-catchup-scan +4 -4
- package/bin/wr-itil-check-deferred-placeholder-staleness +4 -4
- package/bin/wr-itil-check-fail-soft-skip-discipline +4 -4
- package/bin/wr-itil-check-fix-rfc-trace +4 -4
- package/bin/wr-itil-check-locale-discipline +4 -4
- package/bin/wr-itil-check-outbound-responses-staleness +4 -4
- package/bin/wr-itil-check-problems-readme-budget +4 -4
- package/bin/wr-itil-check-rfc-has-stories +4 -4
- package/bin/wr-itil-check-rfc-stories-ratified +4 -4
- package/bin/wr-itil-check-ticket-jtbd-ratification +4 -4
- package/bin/wr-itil-check-upstream-cache-staleness +4 -4
- package/bin/wr-itil-check-upstream-responses +4 -4
- package/bin/wr-itil-classify-readme-drift +4 -4
- package/bin/wr-itil-derive-release-vehicle +4 -4
- package/bin/wr-itil-detect-unratified-stories-maps +4 -4
- package/bin/wr-itil-effort-tally +4 -4
- package/bin/wr-itil-enumerate-postrelease-kv-candidates +4 -4
- package/bin/wr-itil-evaluate-relevance +4 -4
- package/bin/wr-itil-mark-create-gate +4 -4
- package/bin/wr-itil-mark-story-oversight-confirmed +4 -4
- package/bin/wr-itil-migrate-problems-layout +4 -4
- package/bin/wr-itil-migrate-story-status-mirror +4 -4
- package/bin/wr-itil-next-rfc-id +4 -4
- package/bin/wr-itil-plugin-exercise-index +4 -4
- package/bin/wr-itil-plugin-maturity-populate +4 -4
- package/bin/wr-itil-plugin-maturity-render +4 -4
- package/bin/wr-itil-plugin-validate-ci-gate +4 -4
- package/bin/wr-itil-reconcile-readme +4 -4
- package/bin/wr-itil-reconcile-rfcs +4 -4
- package/bin/wr-itil-reconcile-stories +4 -4
- package/bin/wr-itil-reconcile-story-maps +4 -4
- package/bin/wr-itil-render-story-map +4 -4
- package/bin/wr-itil-resolve-governance-plugin-dirs +4 -4
- package/bin/wr-itil-skill-invocations +4 -4
- package/bin/wr-itil-story-map-edit +4 -4
- package/bin/wr-itil-story-map-query +4 -4
- package/bin/wr-itil-update-jtbd-references-section +4 -4
- package/bin/wr-itil-update-problem-references-section +4 -4
- package/bin/wr-itil-update-problem-rfcs-section +4 -4
- package/bin/wr-itil-update-rfc-commits-section +4 -4
- package/bin/wr-itil-update-rfc-references-section +4 -4
- package/bin/wr-itil-verify-iter-summary +4 -4
- package/hooks/itil-assistant-output-gate.sh +3 -3
- package/hooks/itil-assistant-output-review.sh +5 -5
- package/hooks/itil-bash-polling-antipattern-detect.sh +11 -11
- package/hooks/itil-changeset-discipline.sh +24 -24
- package/hooks/itil-claude-space-protection.sh +21 -14
- package/hooks/itil-codex-dispatch.sh +164 -0
- package/hooks/itil-commit-trailer-transition-advisory.sh +11 -11
- package/hooks/itil-correction-detect.sh +8 -8
- package/hooks/itil-deferral-cadence-gate.sh +23 -23
- package/hooks/itil-fictional-defer-detect.sh +16 -16
- package/hooks/itil-fix-title-lifecycle-advisory.sh +11 -11
- package/hooks/itil-mid-loop-ask-detect.sh +14 -14
- package/hooks/itil-no-implement-draft-gate.sh +18 -18
- package/hooks/itil-pending-questions-surface.sh +11 -11
- package/hooks/itil-readme-refresh-discipline.sh +27 -27
- package/hooks/itil-rfc-oversight-nudge.sh +7 -7
- package/hooks/itil-rfc-trailer-advisory.sh +28 -28
- package/hooks/itil-runtime-sid-marker.sh +11 -11
- package/hooks/itil-story-mirror-migration-nudge.sh +7 -7
- package/hooks/lib/block-list.sh +17 -17
- package/hooks/lib/changeset-detect.sh +27 -27
- package/hooks/lib/claude-space-gate.sh +23 -15
- package/hooks/lib/command-detect.sh +12 -12
- package/hooks/lib/create-gate.sh +9 -39
- package/hooks/lib/detectors.sh +12 -12
- package/hooks/lib/readme-refresh-detect.sh +51 -51
- package/hooks/lib/runtime-sid.sh +12 -12
- package/hooks/lib/session-id.sh +28 -28
- package/hooks/lib/session-marker.sh +1 -1
- package/hooks/lib/staging-detect.sh +13 -13
- package/hooks/manage-problem-enforce-create.sh +16 -27
- package/hooks/p057-staging-trap-detect.sh +18 -18
- package/hooks/pre-publish-intake-gate.sh +5 -5
- package/hooks/staleness-check.sh +6 -6
- package/hooks-codex/hooks.json +57 -0
- package/lib/check-deferred-placeholder-staleness.sh +10 -10
- package/lib/check-outbound-responses-staleness.sh +2 -2
- package/lib/check-upstream-cache-staleness.sh +2 -2
- package/lib/derive-first-dispatch.sh +19 -19
- package/lib/enumerate-postrelease-kv-candidates.sh +18 -18
- package/lib/migrate-problems-layout.sh +12 -12
- package/lib/story-oversight.sh +27 -27
- package/package.json +16 -3
- package/scripts/catchup-scan.sh +25 -25
- package/scripts/check-fail-soft-skip-discipline.sh +10 -10
- package/scripts/check-fix-rfc-trace.sh +8 -8
- package/scripts/check-locale-discipline.sh +13 -13
- package/scripts/check-problems-readme-budget.sh +12 -12
- package/scripts/check-rfc-has-stories.sh +7 -7
- package/scripts/check-rfc-rejected-alternatives.sh +11 -11
- package/scripts/check-rfc-stories-ratified.sh +9 -9
- package/scripts/check-ticket-jtbd-ratification.sh +10 -10
- package/scripts/check-upstream-responses.sh +22 -22
- package/scripts/classify-readme-drift.sh +13 -13
- package/scripts/codex-agent.mjs +104 -0
- package/scripts/derive-release-vehicle.sh +23 -23
- package/scripts/detect-unoversighted-rfcs.sh +3 -3
- package/scripts/detect-unratified-stories-maps.sh +5 -5
- package/scripts/effort-tally.sh +10 -10
- package/scripts/evaluate-relevance.sh +16 -16
- package/scripts/mark-create-gate.sh +4 -4
- package/scripts/mark-story-oversight-confirmed.sh +14 -14
- package/scripts/migrate-story-status-mirror.sh +6 -6
- package/scripts/next-rfc-id.sh +5 -5
- package/scripts/plugin-exercise-index.sh +26 -26
- package/scripts/plugin-maturity-populate.sh +38 -38
- package/scripts/plugin-maturity-render.sh +26 -26
- package/scripts/plugin-validate-ci-gate.sh +14 -14
- package/scripts/reconcile-readme.sh +23 -23
- package/scripts/reconcile-rfcs.sh +13 -13
- package/scripts/reconcile-stories.sh +12 -12
- package/scripts/reconcile-story-maps.sh +6 -6
- package/scripts/render-story-map.mjs +24 -24
- package/scripts/render-story-map.sh +3 -3
- package/scripts/resolve-governance-plugin-dirs.sh +10 -10
- package/scripts/run-check-deferred-placeholder-staleness.sh +3 -3
- package/scripts/run-check-outbound-responses-staleness.sh +3 -3
- package/scripts/run-check-upstream-cache-staleness.sh +3 -3
- package/scripts/run-enumerate-postrelease-kv-candidates.sh +3 -3
- package/scripts/run-migrate-problems-layout.sh +3 -3
- package/scripts/skill-invocations.sh +29 -29
- package/scripts/story-map-edit.mjs +6 -6
- package/scripts/story-map-edit.sh +3 -3
- package/scripts/story-map-query.mjs +8 -8
- package/scripts/story-map-query.sh +3 -3
- package/scripts/update-jtbd-references-section.sh +8 -8
- package/scripts/update-problem-references-section.sh +12 -12
- package/scripts/update-problem-rfcs-section.sh +9 -9
- package/scripts/update-rfc-commits-section.sh +7 -7
- package/scripts/update-rfc-references-section.sh +3 -3
- package/scripts/update-story-references-section.sh +5 -5
- package/scripts/verify-iter-summary.sh +3 -3
- package/skills/capture-problem/REFERENCE.md +33 -33
- package/skills/capture-problem/SKILL.md +108 -108
- package/skills/capture-problem/agents/openai.yaml +3 -0
- package/skills/capture-rfc/SKILL.md +21 -323
- package/skills/capture-rfc/agents/openai.yaml +3 -0
- package/skills/capture-story/SKILL.md +65 -65
- package/skills/capture-story/agents/openai.yaml +3 -0
- package/skills/capture-story-map/SKILL.md +31 -31
- package/skills/capture-story-map/agents/openai.yaml +3 -0
- package/skills/check-upstream-responses/SKILL.md +38 -38
- package/skills/check-upstream-responses/agents/openai.yaml +3 -0
- package/skills/close-incident/SKILL.md +25 -25
- package/skills/close-incident/agents/openai.yaml +3 -0
- package/skills/link-incident/SKILL.md +22 -22
- package/skills/link-incident/agents/openai.yaml +3 -0
- package/skills/list-incidents/SKILL.md +9 -9
- package/skills/list-incidents/agents/openai.yaml +3 -0
- package/skills/list-problems/SKILL.md +17 -17
- package/skills/list-problems/agents/openai.yaml +3 -0
- package/skills/list-stories/SKILL.md +23 -23
- package/skills/list-stories/agents/openai.yaml +3 -0
- package/skills/list-story-maps/SKILL.md +9 -9
- package/skills/list-story-maps/agents/openai.yaml +3 -0
- package/skills/manage-incident/SKILL.md +59 -59
- package/skills/manage-incident/agents/openai.yaml +3 -0
- package/skills/manage-problem/SKILL.md +222 -222
- package/skills/manage-problem/agents/openai.yaml +3 -0
- package/skills/manage-rfc/SKILL.md +62 -62
- package/skills/manage-rfc/agents/openai.yaml +3 -0
- package/skills/manage-story/SKILL.md +49 -49
- package/skills/manage-story/agents/openai.yaml +3 -0
- package/skills/manage-story-map/SKILL.md +30 -30
- package/skills/manage-story-map/agents/openai.yaml +3 -0
- package/skills/mitigate-incident/SKILL.md +40 -40
- package/skills/mitigate-incident/agents/openai.yaml +3 -0
- package/skills/reconcile-readme/SKILL.md +28 -28
- package/skills/reconcile-readme/agents/openai.yaml +3 -0
- package/skills/reconcile-stories/SKILL.md +17 -17
- package/skills/reconcile-stories/agents/openai.yaml +3 -0
- package/skills/reconcile-story-maps/SKILL.md +11 -11
- package/skills/reconcile-story-maps/agents/openai.yaml +3 -0
- package/skills/report-upstream/SKILL.md +73 -73
- package/skills/report-upstream/agents/openai.yaml +3 -0
- package/skills/restore-incident/SKILL.md +28 -28
- package/skills/restore-incident/agents/openai.yaml +3 -0
- package/skills/review-problems/SKILL.md +129 -129
- package/skills/review-problems/agents/openai.yaml +3 -0
- package/skills/scaffold-intake/SKILL.md +26 -26
- package/skills/scaffold-intake/agents/openai.yaml +3 -0
- package/skills/transition-problem/SKILL.md +85 -85
- package/skills/transition-problem/agents/openai.yaml +3 -0
- package/skills/transition-problems/SKILL.md +69 -69
- package/skills/transition-problems/agents/openai.yaml +3 -0
- package/skills/update-upstream/SKILL.md +97 -97
- package/skills/update-upstream/agents/openai.yaml +3 -0
- package/skills/work-problem/SKILL.md +42 -42
- package/skills/work-problem/agents/openai.yaml +3 -0
- package/skills/work-problems/SKILL.md +327 -327
- package/skills/work-problems/agents/openai.yaml +3 -0
- package/skills-codex/capture-problem/REFERENCE.md +139 -0
- package/skills-codex/capture-problem/SKILL.md +438 -0
- package/skills-codex/capture-problem/agents/openai.yaml +3 -0
- package/skills-codex/capture-rfc/SKILL.md +45 -0
- package/skills-codex/capture-rfc/agents/openai.yaml +3 -0
- package/skills-codex/capture-story/SKILL.md +407 -0
- package/skills-codex/capture-story/agents/openai.yaml +3 -0
- package/skills-codex/capture-story-map/SKILL.md +286 -0
- package/skills-codex/capture-story-map/agents/openai.yaml +3 -0
- package/skills-codex/check-upstream-responses/SKILL.md +160 -0
- package/skills-codex/check-upstream-responses/agents/openai.yaml +3 -0
- package/skills-codex/close-incident/SKILL.md +192 -0
- package/skills-codex/close-incident/agents/openai.yaml +3 -0
- package/skills-codex/link-incident/SKILL.md +173 -0
- package/skills-codex/link-incident/agents/openai.yaml +3 -0
- package/skills-codex/list-incidents/SKILL.md +92 -0
- package/skills-codex/list-incidents/agents/openai.yaml +3 -0
- package/skills-codex/list-problems/SKILL.md +126 -0
- package/skills-codex/list-problems/agents/openai.yaml +3 -0
- package/skills-codex/list-stories/SKILL.md +170 -0
- package/skills-codex/list-stories/agents/openai.yaml +3 -0
- package/skills-codex/list-story-maps/SKILL.md +104 -0
- package/skills-codex/list-story-maps/agents/openai.yaml +3 -0
- package/skills-codex/manage-incident/SKILL.md +378 -0
- package/skills-codex/manage-incident/agents/openai.yaml +3 -0
- package/skills-codex/manage-problem/SKILL.md +1180 -0
- package/skills-codex/manage-problem/agents/openai.yaml +3 -0
- package/skills-codex/manage-rfc/SKILL.md +314 -0
- package/skills-codex/manage-rfc/agents/openai.yaml +3 -0
- package/skills-codex/manage-story/SKILL.md +284 -0
- package/skills-codex/manage-story/agents/openai.yaml +3 -0
- package/skills-codex/manage-story-map/SKILL.md +198 -0
- package/skills-codex/manage-story-map/agents/openai.yaml +3 -0
- package/skills-codex/mitigate-incident/SKILL.md +239 -0
- package/skills-codex/mitigate-incident/agents/openai.yaml +3 -0
- package/skills-codex/reconcile-readme/SKILL.md +175 -0
- package/skills-codex/reconcile-readme/agents/openai.yaml +3 -0
- package/skills-codex/reconcile-stories/SKILL.md +124 -0
- package/skills-codex/reconcile-stories/agents/openai.yaml +3 -0
- package/skills-codex/reconcile-story-maps/SKILL.md +81 -0
- package/skills-codex/reconcile-story-maps/agents/openai.yaml +3 -0
- package/skills-codex/report-upstream/SKILL.md +716 -0
- package/skills-codex/report-upstream/agents/openai.yaml +3 -0
- package/skills-codex/restore-incident/SKILL.md +216 -0
- package/skills-codex/restore-incident/agents/openai.yaml +3 -0
- package/skills-codex/review-problems/SKILL.md +524 -0
- package/skills-codex/review-problems/agents/openai.yaml +3 -0
- package/skills-codex/scaffold-intake/SKILL.md +209 -0
- package/skills-codex/scaffold-intake/agents/openai.yaml +3 -0
- package/skills-codex/scaffold-intake/templates/CONTRIBUTING.md.tmpl +31 -0
- package/skills-codex/scaffold-intake/templates/SECURITY.md.tmpl +39 -0
- package/skills-codex/scaffold-intake/templates/SUPPORT.md.tmpl +32 -0
- package/skills-codex/scaffold-intake/templates/config.yml.tmpl +8 -0
- package/skills-codex/scaffold-intake/templates/problem-report.yml.tmpl +114 -0
- package/skills-codex/transition-problem/SKILL.md +371 -0
- package/skills-codex/transition-problem/agents/openai.yaml +3 -0
- package/skills-codex/transition-problems/SKILL.md +310 -0
- package/skills-codex/transition-problems/agents/openai.yaml +3 -0
- package/skills-codex/update-upstream/SKILL.md +583 -0
- package/skills-codex/update-upstream/agents/openai.yaml +3 -0
- package/skills-codex/work-problem/SKILL.md +160 -0
- package/skills-codex/work-problem/agents/openai.yaml +3 -0
- package/skills-codex/work-problems/SKILL.md +58 -0
- package/skills-codex/work-problems/agents/openai.yaml +3 -0
- package/templates/story-map.css +1 -1
- package/bin/wr-itil-mark-rfc-capture-gate +0 -51
- package/scripts/mark-rfc-capture-gate.sh +0 -32
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# shim files in packages/*/bin/wr-* directly; edit the template + run
|
|
5
5
|
# `npm run sync:shim-wrappers` to regenerate.
|
|
6
6
|
#
|
|
7
|
-
# Resolution (
|
|
7
|
+
# Resolution (highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule):
|
|
8
8
|
# 1. If the wrapper's parent dir is semver-shaped, treat as installed-
|
|
9
9
|
# cache execution and resolve to the highest-version sibling's
|
|
10
10
|
# scripts/ entry below.
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
# 3. If the cache parent contains zero semver-shaped siblings, exit
|
|
16
16
|
# 127 with a stderr message naming the cache parent (per SQ-080-2).
|
|
17
17
|
#
|
|
18
|
-
# @adr
|
|
19
|
-
# @adr
|
|
20
|
-
# @problem
|
|
18
|
+
# @adr highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule (highest-version-wins shim wrapper plugin scaffold)
|
|
19
|
+
# @adr plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule (plugin-bundled scripts resolve via bin/ on $PATH — amended)
|
|
20
|
+
# @problem install-updates-refreshes-the-global-plugin-cache-but-does-not-fix-path-ordering-stale-plugin-version-shims-stay-first-on-path-so-subsequent-shim-invocations-run-old-code-problem (mid-session staleness window)
|
|
21
21
|
|
|
22
22
|
set -euo pipefail
|
|
23
23
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# shim files in packages/*/bin/wr-* directly; edit the template + run
|
|
5
5
|
# `npm run sync:shim-wrappers` to regenerate.
|
|
6
6
|
#
|
|
7
|
-
# Resolution (
|
|
7
|
+
# Resolution (highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule):
|
|
8
8
|
# 1. If the wrapper's parent dir is semver-shaped, treat as installed-
|
|
9
9
|
# cache execution and resolve to the highest-version sibling's
|
|
10
10
|
# scripts/ entry below.
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
# 3. If the cache parent contains zero semver-shaped siblings, exit
|
|
16
16
|
# 127 with a stderr message naming the cache parent (per SQ-080-2).
|
|
17
17
|
#
|
|
18
|
-
# @adr
|
|
19
|
-
# @adr
|
|
20
|
-
# @problem
|
|
18
|
+
# @adr highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule (highest-version-wins shim wrapper plugin scaffold)
|
|
19
|
+
# @adr plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule (plugin-bundled scripts resolve via bin/ on $PATH — amended)
|
|
20
|
+
# @problem install-updates-refreshes-the-global-plugin-cache-but-does-not-fix-path-ordering-stale-plugin-version-shims-stay-first-on-path-so-subsequent-shim-invocations-run-old-code-problem (mid-session staleness window)
|
|
21
21
|
|
|
22
22
|
set -euo pipefail
|
|
23
23
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# shim files in packages/*/bin/wr-* directly; edit the template + run
|
|
5
5
|
# `npm run sync:shim-wrappers` to regenerate.
|
|
6
6
|
#
|
|
7
|
-
# Resolution (
|
|
7
|
+
# Resolution (highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule):
|
|
8
8
|
# 1. If the wrapper's parent dir is semver-shaped, treat as installed-
|
|
9
9
|
# cache execution and resolve to the highest-version sibling's
|
|
10
10
|
# scripts/ entry below.
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
# 3. If the cache parent contains zero semver-shaped siblings, exit
|
|
16
16
|
# 127 with a stderr message naming the cache parent (per SQ-080-2).
|
|
17
17
|
#
|
|
18
|
-
# @adr
|
|
19
|
-
# @adr
|
|
20
|
-
# @problem
|
|
18
|
+
# @adr highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule (highest-version-wins shim wrapper plugin scaffold)
|
|
19
|
+
# @adr plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule (plugin-bundled scripts resolve via bin/ on $PATH — amended)
|
|
20
|
+
# @problem install-updates-refreshes-the-global-plugin-cache-but-does-not-fix-path-ordering-stale-plugin-version-shims-stay-first-on-path-so-subsequent-shim-invocations-run-old-code-problem (mid-session staleness window)
|
|
21
21
|
|
|
22
22
|
set -euo pipefail
|
|
23
23
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# shim files in packages/*/bin/wr-* directly; edit the template + run
|
|
5
5
|
# `npm run sync:shim-wrappers` to regenerate.
|
|
6
6
|
#
|
|
7
|
-
# Resolution (
|
|
7
|
+
# Resolution (highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule):
|
|
8
8
|
# 1. If the wrapper's parent dir is semver-shaped, treat as installed-
|
|
9
9
|
# cache execution and resolve to the highest-version sibling's
|
|
10
10
|
# scripts/ entry below.
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
# 3. If the cache parent contains zero semver-shaped siblings, exit
|
|
16
16
|
# 127 with a stderr message naming the cache parent (per SQ-080-2).
|
|
17
17
|
#
|
|
18
|
-
# @adr
|
|
19
|
-
# @adr
|
|
20
|
-
# @problem
|
|
18
|
+
# @adr highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule (highest-version-wins shim wrapper plugin scaffold)
|
|
19
|
+
# @adr plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule (plugin-bundled scripts resolve via bin/ on $PATH — amended)
|
|
20
|
+
# @problem install-updates-refreshes-the-global-plugin-cache-but-does-not-fix-path-ordering-stale-plugin-version-shims-stay-first-on-path-so-subsequent-shim-invocations-run-old-code-problem (mid-session staleness window)
|
|
21
21
|
|
|
22
22
|
set -euo pipefail
|
|
23
23
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# shim files in packages/*/bin/wr-* directly; edit the template + run
|
|
5
5
|
# `npm run sync:shim-wrappers` to regenerate.
|
|
6
6
|
#
|
|
7
|
-
# Resolution (
|
|
7
|
+
# Resolution (highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule):
|
|
8
8
|
# 1. If the wrapper's parent dir is semver-shaped, treat as installed-
|
|
9
9
|
# cache execution and resolve to the highest-version sibling's
|
|
10
10
|
# scripts/ entry below.
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
# 3. If the cache parent contains zero semver-shaped siblings, exit
|
|
16
16
|
# 127 with a stderr message naming the cache parent (per SQ-080-2).
|
|
17
17
|
#
|
|
18
|
-
# @adr
|
|
19
|
-
# @adr
|
|
20
|
-
# @problem
|
|
18
|
+
# @adr highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule (highest-version-wins shim wrapper plugin scaffold)
|
|
19
|
+
# @adr plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule (plugin-bundled scripts resolve via bin/ on $PATH — amended)
|
|
20
|
+
# @problem install-updates-refreshes-the-global-plugin-cache-but-does-not-fix-path-ordering-stale-plugin-version-shims-stay-first-on-path-so-subsequent-shim-invocations-run-old-code-problem (mid-session staleness window)
|
|
21
21
|
|
|
22
22
|
set -euo pipefail
|
|
23
23
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# shim files in packages/*/bin/wr-* directly; edit the template + run
|
|
5
5
|
# `npm run sync:shim-wrappers` to regenerate.
|
|
6
6
|
#
|
|
7
|
-
# Resolution (
|
|
7
|
+
# Resolution (highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule):
|
|
8
8
|
# 1. If the wrapper's parent dir is semver-shaped, treat as installed-
|
|
9
9
|
# cache execution and resolve to the highest-version sibling's
|
|
10
10
|
# scripts/ entry below.
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
# 3. If the cache parent contains zero semver-shaped siblings, exit
|
|
16
16
|
# 127 with a stderr message naming the cache parent (per SQ-080-2).
|
|
17
17
|
#
|
|
18
|
-
# @adr
|
|
19
|
-
# @adr
|
|
20
|
-
# @problem
|
|
18
|
+
# @adr highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule (highest-version-wins shim wrapper plugin scaffold)
|
|
19
|
+
# @adr plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule (plugin-bundled scripts resolve via bin/ on $PATH — amended)
|
|
20
|
+
# @problem install-updates-refreshes-the-global-plugin-cache-but-does-not-fix-path-ordering-stale-plugin-version-shims-stay-first-on-path-so-subsequent-shim-invocations-run-old-code-problem (mid-session staleness window)
|
|
21
21
|
|
|
22
22
|
set -euo pipefail
|
|
23
23
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# shim files in packages/*/bin/wr-* directly; edit the template + run
|
|
5
5
|
# `npm run sync:shim-wrappers` to regenerate.
|
|
6
6
|
#
|
|
7
|
-
# Resolution (
|
|
7
|
+
# Resolution (highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule):
|
|
8
8
|
# 1. If the wrapper's parent dir is semver-shaped, treat as installed-
|
|
9
9
|
# cache execution and resolve to the highest-version sibling's
|
|
10
10
|
# scripts/ entry below.
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
# 3. If the cache parent contains zero semver-shaped siblings, exit
|
|
16
16
|
# 127 with a stderr message naming the cache parent (per SQ-080-2).
|
|
17
17
|
#
|
|
18
|
-
# @adr
|
|
19
|
-
# @adr
|
|
20
|
-
# @problem
|
|
18
|
+
# @adr highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule (highest-version-wins shim wrapper plugin scaffold)
|
|
19
|
+
# @adr plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule (plugin-bundled scripts resolve via bin/ on $PATH — amended)
|
|
20
|
+
# @problem install-updates-refreshes-the-global-plugin-cache-but-does-not-fix-path-ordering-stale-plugin-version-shims-stay-first-on-path-so-subsequent-shim-invocations-run-old-code-problem (mid-session staleness window)
|
|
21
21
|
|
|
22
22
|
set -euo pipefail
|
|
23
23
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# shim files in packages/*/bin/wr-* directly; edit the template + run
|
|
5
5
|
# `npm run sync:shim-wrappers` to regenerate.
|
|
6
6
|
#
|
|
7
|
-
# Resolution (
|
|
7
|
+
# Resolution (highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule):
|
|
8
8
|
# 1. If the wrapper's parent dir is semver-shaped, treat as installed-
|
|
9
9
|
# cache execution and resolve to the highest-version sibling's
|
|
10
10
|
# scripts/ entry below.
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
# 3. If the cache parent contains zero semver-shaped siblings, exit
|
|
16
16
|
# 127 with a stderr message naming the cache parent (per SQ-080-2).
|
|
17
17
|
#
|
|
18
|
-
# @adr
|
|
19
|
-
# @adr
|
|
20
|
-
# @problem
|
|
18
|
+
# @adr highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule (highest-version-wins shim wrapper plugin scaffold)
|
|
19
|
+
# @adr plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule (plugin-bundled scripts resolve via bin/ on $PATH — amended)
|
|
20
|
+
# @problem install-updates-refreshes-the-global-plugin-cache-but-does-not-fix-path-ordering-stale-plugin-version-shims-stay-first-on-path-so-subsequent-shim-invocations-run-old-code-problem (mid-session staleness window)
|
|
21
21
|
|
|
22
22
|
set -euo pipefail
|
|
23
23
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# shim files in packages/*/bin/wr-* directly; edit the template + run
|
|
5
5
|
# `npm run sync:shim-wrappers` to regenerate.
|
|
6
6
|
#
|
|
7
|
-
# Resolution (
|
|
7
|
+
# Resolution (highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule):
|
|
8
8
|
# 1. If the wrapper's parent dir is semver-shaped, treat as installed-
|
|
9
9
|
# cache execution and resolve to the highest-version sibling's
|
|
10
10
|
# scripts/ entry below.
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
# 3. If the cache parent contains zero semver-shaped siblings, exit
|
|
16
16
|
# 127 with a stderr message naming the cache parent (per SQ-080-2).
|
|
17
17
|
#
|
|
18
|
-
# @adr
|
|
19
|
-
# @adr
|
|
20
|
-
# @problem
|
|
18
|
+
# @adr highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule (highest-version-wins shim wrapper plugin scaffold)
|
|
19
|
+
# @adr plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule (plugin-bundled scripts resolve via bin/ on $PATH — amended)
|
|
20
|
+
# @problem install-updates-refreshes-the-global-plugin-cache-but-does-not-fix-path-ordering-stale-plugin-version-shims-stay-first-on-path-so-subsequent-shim-invocations-run-old-code-problem (mid-session staleness window)
|
|
21
21
|
|
|
22
22
|
set -euo pipefail
|
|
23
23
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
2
|
+
# problem-085-assistant-asks-for-input-when-the-next-step-is-obvious-and-uses-prose-asks-instead-of-askuserquestion-when-input-is-actually-needed-problem / structured-user-interaction-for-governance-skill-decisions-architecture-rule / progressive-disclosure-once-per-session-budget-for-userpromptsubmit-governance-prose-architecture-rule: itil UserPromptSubmit gate.
|
|
3
3
|
#
|
|
4
4
|
# When the incoming user prompt contains a direction-pinning signal
|
|
5
5
|
# (yes / go ahead / just do it / act now / proceed / ...), inject a
|
|
@@ -29,7 +29,7 @@ fi
|
|
|
29
29
|
|
|
30
30
|
if has_announced "itil-assistant-gate" "$SESSION_ID"; then
|
|
31
31
|
cat <<'HOOK_OUTPUT'
|
|
32
|
-
MANDATORY: direction pinned. Act on obvious next step; use AskUserQuestion tool for genuine ambiguity; NEVER prose-ask. See
|
|
32
|
+
MANDATORY: direction pinned. Act on obvious next step; use AskUserQuestion tool for genuine ambiguity; NEVER prose-ask. See structured-user-interaction-for-governance-skill-decisions-architecture-rule.
|
|
33
33
|
HOOK_OUTPUT
|
|
34
34
|
else
|
|
35
35
|
cat <<'HOOK_OUTPUT'
|
|
@@ -46,7 +46,7 @@ NON-OPTIONAL RULES:
|
|
|
46
46
|
2. If the decision is genuinely ambiguous (multiple-valid-paths, none
|
|
47
47
|
clearly better per direction/policy), use the AskUserQuestion tool.
|
|
48
48
|
Never prose-ask. Prose questions are unanswerable under AFK
|
|
49
|
-
notifications and violate
|
|
49
|
+
notifications and violate structured-user-interaction-for-governance-skill-decisions-architecture-rule Rule 1.
|
|
50
50
|
|
|
51
51
|
3. Canonical prose-ask phrasings to AVOID in your next response:
|
|
52
52
|
"Want me to", "Should I", "Would you like me to", "Shall we",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
2
|
+
# problem-085-assistant-asks-for-input-when-the-next-step-is-obvious-and-uses-prose-asks-instead-of-askuserquestion-when-input-is-actually-needed-problem / structured-user-interaction-for-governance-skill-decisions-architecture-rule: itil Stop hook.
|
|
3
3
|
#
|
|
4
4
|
# Reads the last assistant turn from transcript_path on stdin and scans
|
|
5
5
|
# for canonical prose-ask phrasings. If a prose-ask is detected (and
|
|
@@ -62,23 +62,23 @@ if [ -n "$MATCH" ]; then
|
|
|
62
62
|
"PROSE-ASK DETECTED in your last turn (pattern: \"" + $match + "\"). " +
|
|
63
63
|
"If the decision is obvious from direction / policy / session context, ACT — do not ask. " +
|
|
64
64
|
"If genuinely ambiguous, re-emit via the AskUserQuestion tool. " +
|
|
65
|
-
"Never prose-ask. See
|
|
65
|
+
"Never prose-ask. See structured-user-interaction-for-governance-skill-decisions-architecture-rule Rule 1 + feedback_act_on_obvious_decisions.md."
|
|
66
66
|
)
|
|
67
67
|
}'
|
|
68
68
|
exit 0
|
|
69
69
|
fi
|
|
70
70
|
|
|
71
|
-
#
|
|
71
|
+
# agent-frames-skill-mandatory-mechanical-steps-as-user-optional-problem: scan for mechanical-step-framed-as-user-optional. When a skill
|
|
72
72
|
# contract mandates a mechanical step, re-surfacing it as a user decision
|
|
73
73
|
# (or a budget-caution skip) reintroduces the friction the mechanical-stage
|
|
74
|
-
# carve-out (
|
|
74
|
+
# carve-out (agents-over-ask-in-interactive-sessions-conflating-mechanical-stages-with-user-interactive-stages-of-multi-stage-skill-contracts-inverse-problem / decision-delegation-contract-when-agents-act-on-the-framework-vs-ask-the-user-architecture-rule) was engineered to remove.
|
|
75
75
|
MECH_MATCH=$(echo "$ASSISTANT_TEXT" | detect_mechanical_optional 2>/dev/null) || true
|
|
76
76
|
if [ -n "$MECH_MATCH" ]; then
|
|
77
77
|
jq -n --arg match "$MECH_MATCH" '{
|
|
78
78
|
stopReason: (
|
|
79
79
|
"MECHANICAL-STEP-FRAMED-AS-OPTIONAL detected in your last turn (closer: \"" + $match + "\"). " +
|
|
80
80
|
"A skill contract that mandates a mechanical step has already resolved that decision — do not re-surface it as a user choice or skip it on budget-caution grounds. " +
|
|
81
|
-
"Run the step, then report it done. See
|
|
81
|
+
"Run the step, then report it done. See agents-over-ask-in-interactive-sessions-conflating-mechanical-stages-with-user-interactive-stages-of-multi-stage-skill-contracts-inverse-problem / decision-delegation-contract-when-agents-act-on-the-framework-vs-ask-the-user-architecture-rule mechanical-stage carve-out."
|
|
82
82
|
)
|
|
83
83
|
}'
|
|
84
84
|
exit 0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
2
|
+
# bash-until-loop-with-pgrep-f-bats-recursive-self-references-the-polling-loop-s-own-command-line-new-variant-of-stuck-before-emit-deadlock-skill-md-prompt-warning-insufficient-problem: PreToolUse:Bash hook — denies bash polling loops that
|
|
3
3
|
# self-reference via `pgrep -f` (parent class) or `pkill -0`
|
|
4
4
|
# (sibling) and deadlock in AFK iters when the polling loop's
|
|
5
5
|
# own command line matches the search pattern.
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
# - parse failure on stdin (mirrors create-gate.sh fail-open)
|
|
21
21
|
#
|
|
22
22
|
# References:
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
23
|
+
# plugin-testing-strategy-architecture-rule — plugin testing strategy (hook bats live under hooks/test/).
|
|
24
|
+
# structured-user-interaction-for-governance-skill-decisions-architecture-rule Rule 1 — deny redirects with mechanical recovery.
|
|
25
|
+
# progressive-disclosure-once-per-session-budget-for-userpromptsubmit-governance-prose-architecture-rule — progressive disclosure / deny-message terseness budget.
|
|
26
|
+
# hook-injection-budget-policy-for-pretooluse-and-posttooluse-hooks-architecture-rule — hook injection budget; deny-path band 200-700 bytes.
|
|
27
|
+
# behavioural-tests-default-for-skill-testing-architecture-rule — behavioural tests default (positive + negative cases).
|
|
28
|
+
# afk-iteration-subprocess-bash-until-loop-polls-bats-output-file-with-bats-console-regex-against-tap-format-output-deadlocks-indefinitely-manual-sigterm-required-json-metadata-lost-problem — parent class (bash until-loop polls bats output with
|
|
29
29
|
# bats-console-summary regex against TAP output).
|
|
30
|
-
#
|
|
30
|
+
# bash-until-loop-with-pgrep-f-bats-recursive-self-references-the-polling-loop-s-own-command-line-new-variant-of-stuck-before-emit-deadlock-skill-md-prompt-warning-insufficient-problem — this hook; self-referential pgrep -f variant.
|
|
31
31
|
# p057-staging-trap-detect.sh — sibling PreToolUse:Bash detect
|
|
32
32
|
# hook; mirror the deny-message shape.
|
|
33
33
|
|
|
@@ -76,9 +76,9 @@ fi
|
|
|
76
76
|
|
|
77
77
|
# Antipattern detected — emit deny with terse recovery.
|
|
78
78
|
# Voice-tone target ~245 bytes (sibling p057-staging-trap-detect.sh
|
|
79
|
-
# precedent). Cites
|
|
80
|
-
# inside
|
|
81
|
-
REASON="BLOCKED:
|
|
79
|
+
# precedent). Cites bash-until-loop-with-pgrep-f-bats-recursive-self-references-the-polling-loop-s-own-command-line-new-variant-of-stuck-before-emit-deadlock-skill-md-prompt-warning-insufficient-problem, names BOTH recovery alternatives, fits
|
|
80
|
+
# inside hook-injection-budget-policy-for-pretooluse-and-posttooluse-hooks-architecture-rule deny-path 200-700 byte band.
|
|
81
|
+
REASON="BLOCKED: bash-until-loop-with-pgrep-f-bats-recursive-self-references-the-polling-loop-s-own-command-line-new-variant-of-stuck-before-emit-deadlock-skill-md-prompt-warning-insufficient-problem self-referential polling antipattern. \\\`pgrep -f\\\` / \\\`pkill -0\\\` inside until/while loop matches the loop's own command line and deadlocks in AFK iters. Use \\\`wait \\\$bg_pid\\\` (shell-native) OR Bash-tool BashOutput polling (run_in_background=true) instead."
|
|
82
82
|
|
|
83
83
|
cat <<EOF
|
|
84
84
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
2
|
+
# afk-iter-packages-plugin-commits-without-changesets-orchestrator-main-turn-back-fill-is-fragile-recovery-hook-level-enforcement-preferable-problem: PreToolUse:Bash hook — denies `git commit` invocations whose
|
|
3
3
|
# staged set includes `packages/<plugin>/` source files but no
|
|
4
4
|
# `.changeset/*.md` is staged. Hook-level enforcement replaces the
|
|
5
5
|
# unreliable iter-prompt-time changeset reminder (40% miss rate
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
# Detection delegates to `lib/changeset-detect.sh::detect_changeset_required`.
|
|
9
9
|
# When the helper returns 1, this hook emits PreToolUse deny JSON
|
|
10
10
|
# with the offending plugin slug inline and the literal `bun run
|
|
11
|
-
# changeset` recovery command, satisfying
|
|
11
|
+
# changeset` recovery command, satisfying structured-user-interaction-for-governance-skill-decisions-architecture-rule Rule 1's "deny
|
|
12
12
|
# redirects to a recovery path" contract via the mechanical-recovery
|
|
13
13
|
# shape (no skill wrapper required — authoring a changeset is a
|
|
14
14
|
# single command).
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
# `lib/command-detect.sh::command_invokes_git_commit`, which strips
|
|
18
18
|
# common prefix shapes (leading whitespace, env-var assignments,
|
|
19
19
|
# `cd <path> &&`) and checks whether the residual leading token pair
|
|
20
|
-
# is literally `git commit`.
|
|
20
|
+
# is literally `git commit`. itil-changeset-discipline-sh-hook-substring-matches-git-commit-anywhere-in-bash-command-sibling-problem: replaced the prior substring match
|
|
21
21
|
# `*"git commit"*` that misfired on non-commit Bash whose argument
|
|
22
22
|
# vectors merely mentioned the phrase (grep / sed / cat-heredoc /
|
|
23
23
|
# echo / `git log --grep`).
|
|
24
24
|
#
|
|
25
|
-
# Allow paths (exit 0 silently per
|
|
25
|
+
# Allow paths (exit 0 silently per hook-injection-budget-policy-for-pretooluse-and-posttooluse-hooks-architecture-rule Pattern 1):
|
|
26
26
|
# - tool_name != "Bash" (only Bash invocations are gated)
|
|
27
27
|
# - command is not a `git commit` invocation by leading-executable
|
|
28
28
|
# semantics (helper returns 1)
|
|
@@ -32,27 +32,27 @@
|
|
|
32
32
|
# - parse failure on stdin (mirrors create-gate.sh fail-open)
|
|
33
33
|
#
|
|
34
34
|
# References:
|
|
35
|
-
#
|
|
36
|
-
#
|
|
35
|
+
# plugin-testing-strategy-architecture-rule — plugin testing strategy (hook bats live under hooks/test/).
|
|
36
|
+
# gate-marker-lifecycle-ttl-drift-not-stop-hook-reset-architecture-rule — gate marker lifecycle (this hook deliberately does NOT
|
|
37
37
|
# use markers; detection is per-invocation deterministic
|
|
38
|
-
# — same precedent as
|
|
39
|
-
#
|
|
40
|
-
#
|
|
38
|
+
# — same precedent as staging-trap-recurs-despite-documentation-hook-level-enforcement-candidate-problem `p057-staging-trap-detect.sh`).
|
|
39
|
+
# structured-user-interaction-for-governance-skill-decisions-architecture-rule Rule 1 — deny redirects with mechanical recovery.
|
|
40
|
+
# governance-skills-commit-their-own-completed-work-architecture-rule — governance skills commit their own work (the hook keeps
|
|
41
41
|
# iter commits self-contained — no orchestrator-main-turn
|
|
42
42
|
# back-fill needed).
|
|
43
|
-
#
|
|
43
|
+
# inter-iteration-release-cadence-for-afk-loops-architecture-rule — inter-iteration release cadence (the hook strengthens
|
|
44
44
|
# release-cadence integrity by ensuring every publishable
|
|
45
45
|
# iter has a changeset to drain).
|
|
46
|
-
#
|
|
47
|
-
#
|
|
46
|
+
# progressive-disclosure-once-per-session-budget-for-userpromptsubmit-governance-prose-architecture-rule — progressive disclosure / deny-message terseness budget.
|
|
47
|
+
# hook-injection-budget-policy-for-pretooluse-and-posttooluse-hooks-architecture-rule — hook injection budget (Pattern 1 silent-on-pass; deny
|
|
48
48
|
# band ≤300 bytes for this hook).
|
|
49
|
-
#
|
|
49
|
+
# problem-073-no-voice-and-tone-check-or-risk-assessment-on-changeset-bodies-which-populate-changelog-md-release-prs-github-releases-and-npm-release-notes-problem — sibling changeset author-time gate (Write/Edit on
|
|
50
50
|
# `.changeset/*.md`); composes-with as defence-in-depth.
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
51
|
+
# staging-trap-recurs-despite-documentation-hook-level-enforcement-candidate-problem — sibling staging-trap hook (same enforcement-layer shape).
|
|
52
|
+
# afk-iter-packages-plugin-commits-without-changesets-orchestrator-main-turn-back-fill-is-fragile-recovery-hook-level-enforcement-preferable-problem — this hook.
|
|
53
|
+
# hook-substring-matches-git-commit-anywhere-in-bash-command-not-just-actual-git-commit-invocations-problem — shared `command_invokes_git_commit` helper landed for
|
|
54
54
|
# `itil-readme-refresh-discipline.sh`; consumed here.
|
|
55
|
-
#
|
|
55
|
+
# itil-changeset-discipline-sh-hook-substring-matches-git-commit-anywhere-in-bash-command-sibling-problem — sibling-hook refactor: substring-match → helper here.
|
|
56
56
|
|
|
57
57
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
58
58
|
# shellcheck source=lib/changeset-detect.sh
|
|
@@ -89,7 +89,7 @@ except:
|
|
|
89
89
|
# `lib/command-detect.sh::command_invokes_git_commit`, which strips
|
|
90
90
|
# common prefix shapes (leading whitespace, env-var assignments,
|
|
91
91
|
# `cd <path> &&`) and checks whether the residual leading token pair
|
|
92
|
-
# is literally `git commit`.
|
|
92
|
+
# is literally `git commit`. itil-changeset-discipline-sh-hook-substring-matches-git-commit-anywhere-in-bash-command-sibling-problem: replaced the prior substring match
|
|
93
93
|
# `*"git commit"*` that misfired on non-commit Bash whose argument
|
|
94
94
|
# vectors merely mentioned the phrase (grep / sed / cat-heredoc /
|
|
95
95
|
# echo / `git log --grep`).
|
|
@@ -98,21 +98,21 @@ command_invokes_git_commit "$COMMAND" || exit 0
|
|
|
98
98
|
# Run detection. Helper echoes offending plugin slug on stdout when
|
|
99
99
|
# detected; returns 1 in that case. Returns 0 (allow) on no-trap,
|
|
100
100
|
# bypass env, or fail-open (non-git tree, parse error). The COMMAND is
|
|
101
|
-
# passed so Check 2b can change-scope to the commit's work-item ID (
|
|
101
|
+
# passed so Check 2b can change-scope to the commit's work-item ID (changeset-discipline-check-2b-is-plugin-scoped-not-change-scoped-plugin-source-commits-ship-undocumented-when-a-sibling-changeset-already-targets-the-plugin-problem):
|
|
102
102
|
# an in-scope changeset for an UNRELATED ticket no longer covers this commit.
|
|
103
103
|
TRAPPED_SLUG=$(detect_changeset_required "$COMMAND" 2>/dev/null) && exit 0
|
|
104
104
|
|
|
105
105
|
# Trap detected — emit deny with terse recovery.
|
|
106
|
-
# Voice-tone budget per
|
|
106
|
+
# Voice-tone budget per hook-injection-budget-policy-for-pretooluse-and-posttooluse-hooks-architecture-rule deny-band ≤300 bytes total. Names the
|
|
107
107
|
# plugin slug, the literal in-flight recovery command (`bun run
|
|
108
|
-
# changeset` — staging ANY changeset satisfies the gate), and the
|
|
109
|
-
# cite.
|
|
108
|
+
# changeset` — staging ANY changeset satisfies the gate), and the afk-iter-packages-plugin-commits-without-changesets-orchestrator-main-turn-back-fill-is-fragile-recovery-hook-level-enforcement-preferable-problem
|
|
109
|
+
# cite. bypass-gate-env-vars-do-not-propagate-from-bash-subshell-to-pretooluse-hook-context-problem: the deny no longer advertises BYPASS_CHANGESET_GATE=1 as an
|
|
110
110
|
# in-flight escape — that env var only takes effect when set in Claude
|
|
111
111
|
# Code's process env BEFORE the session started; a mid-session Bash
|
|
112
112
|
# export/inline assignment never reaches the hook process. The deny
|
|
113
113
|
# states the bypass is pre-session-only so maintainers stop wasting a
|
|
114
|
-
# turn trying it mid-session (the original
|
|
115
|
-
REASON="BLOCKED:
|
|
114
|
+
# turn trying it mid-session (the original bypass-gate-env-vars-do-not-propagate-from-bash-subshell-to-pretooluse-hook-context-problem cost).
|
|
115
|
+
REASON="BLOCKED: afk-iter-packages-plugin-commits-without-changesets-orchestrator-main-turn-back-fill-is-fragile-recovery-hook-level-enforcement-preferable-problem changeset discipline. packages/${TRAPPED_SLUG}/ source needs .changeset/*.md. Recovery: bun run changeset. Env bypass is pre-session only."
|
|
116
116
|
|
|
117
117
|
cat <<EOF
|
|
118
118
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
2
|
+
# agents-write-project-generated-artefacts-under-claude-user-controlled-config-space-gate-exclusions-are-read-tolerance-not-write-permission-problem: PreToolUse:Write|Edit enforcement hook for `.claude/` user-space.
|
|
3
3
|
#
|
|
4
4
|
# DENIES Write|Edit to project-scoped `.claude/` paths that are NOT in the
|
|
5
5
|
# user-space allow-list, unless the user has pre-authorized that specific
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# gate-exclusion list as "approved write zones" and write project-generated
|
|
12
12
|
# content (plans, audits, scratch state) under `.claude/`, polluting user
|
|
13
13
|
# space. Project-generated content belongs in `docs/` (plans, audits) or
|
|
14
|
-
# inline in problem-ticket bodies. See
|
|
14
|
+
# inline in problem-ticket bodies. See agents-write-project-generated-artefacts-under-claude-user-controlled-config-space-gate-exclusions-are-read-tolerance-not-write-permission-problem + project CLAUDE.md MANDATORY
|
|
15
15
|
# rule.
|
|
16
16
|
#
|
|
17
17
|
# Allow-list (per is_protected_claude_path in lib/claude-space-gate.sh):
|
|
@@ -25,25 +25,25 @@
|
|
|
25
25
|
# Bypass: user creates `.claude/.agent-write-approved-<sha256>` marker
|
|
26
26
|
# (sha256 of project-relative path). Marker is persistent (no TTL); user
|
|
27
27
|
# pre-authorizes once per path. Distinct from session-scoped review
|
|
28
|
-
# markers (
|
|
29
|
-
# `.claude/.install-updates-consent` (
|
|
28
|
+
# markers (gate-marker-lifecycle-ttl-drift-not-stop-hook-reset-architecture-rule) — this is the persistent in-tree shape used by
|
|
29
|
+
# `.claude/.install-updates-consent` (repo-local-skills-for-project-specific-workflow-tooling-architecture-rule / install-updates-consent-gate-fires-on-every-invocation-despite-the-answer-being-invariably-all-confirmed-siblings-problem precedent).
|
|
30
30
|
#
|
|
31
31
|
# Out of scope:
|
|
32
32
|
# - Read|Glob|Grep on .claude/ paths — only Write|Edit gated
|
|
33
33
|
# - Paths outside PWD project root (~/.claude/, other repos' .claude/)
|
|
34
|
-
# - Empty session_id / file_path — fail-open (
|
|
34
|
+
# - Empty session_id / file_path — fail-open (structured-user-interaction-for-governance-skill-decisions-architecture-rule Rule 6 parity
|
|
35
35
|
# with sibling hooks like manage-problem-enforce-create.sh)
|
|
36
36
|
#
|
|
37
37
|
# References:
|
|
38
|
-
#
|
|
39
|
-
# marker class;
|
|
38
|
+
# gate-marker-lifecycle-ttl-drift-not-stop-hook-reset-architecture-rule — gate marker lifecycle (this hook adds a NEW persistent
|
|
39
|
+
# marker class; gate-marker-lifecycle-ttl-drift-not-stop-hook-reset-architecture-rule's session-scoped /tmp markers
|
|
40
40
|
# unchanged)
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
#
|
|
41
|
+
# structured-user-interaction-for-governance-skill-decisions-architecture-rule Rule 6 — non-interactive fail-safe; deny via stdin JSON
|
|
42
|
+
# repo-local-skills-for-project-specific-workflow-tooling-architecture-rule — persistent in-tree consent marker precedent
|
|
43
|
+
# progressive-disclosure-once-per-session-budget-for-userpromptsubmit-governance-prose-architecture-rule — progressive disclosure (deny message <500 bytes)
|
|
44
|
+
# hook-injection-budget-policy-for-pretooluse-and-posttooluse-hooks-architecture-rule — hook injection budget (silent on allow path)
|
|
45
|
+
# agent-bypasses-wr-itil-manage-problem-step-2-duplicate-check-by-writing-tickets-directly-to-docs-problems-problem — manage-problem-enforce-create.sh hook shape precedent
|
|
46
|
+
# agents-write-project-generated-artefacts-under-claude-user-controlled-config-space-gate-exclusions-are-read-tolerance-not-write-permission-problem — driver
|
|
47
47
|
|
|
48
48
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
49
49
|
# shellcheck source=lib/claude-space-gate.sh
|
|
@@ -93,6 +93,13 @@ if has_approval_marker "$FILE_PATH" "$PWD"; then
|
|
|
93
93
|
fi
|
|
94
94
|
|
|
95
95
|
BASENAME=$(basename "$FILE_PATH")
|
|
96
|
+
REL_PATH="${FILE_PATH#"$PWD"/}"
|
|
97
|
+
CONFIG_DIR="${REL_PATH%%/*}"
|
|
96
98
|
|
|
97
|
-
|
|
99
|
+
if [ "$CONFIG_DIR" = ".claude" ]; then
|
|
100
|
+
INSTRUCTIONS="project CLAUDE.md MANDATORY rule"
|
|
101
|
+
else
|
|
102
|
+
INSTRUCTIONS="project AGENTS.md MANDATORY rule"
|
|
103
|
+
fi
|
|
104
|
+
claude_space_deny "BLOCKED: Cannot Write|Edit '${BASENAME}' under ${CONFIG_DIR}/. That directory is user-controlled config space — agents must not write project-generated artefacts there. Use docs/plans/ for plans, docs/audits/ for audit logs, or attach inline to the relevant problem ticket. To pre-authorize a specific ${CONFIG_DIR}/ path, create marker '${CONFIG_DIR}/.agent-write-approved-<sha256-of-rel-path>' (agents-write-project-generated-artefacts-under-claude-user-controlled-config-space-gate-exclusions-are-read-tolerance-not-write-permission-problem; see ${INSTRUCTIONS})."
|
|
98
105
|
exit 0
|