@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.
Files changed (266) hide show
  1. package/.agents/plugins/marketplace.json +12 -0
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +42 -0
  4. package/README.md +34 -25
  5. package/agents/hang-off-check.md +34 -34
  6. package/bin/install.mjs +71 -5
  7. package/bin/wr-itil-catchup-scan +4 -4
  8. package/bin/wr-itil-check-deferred-placeholder-staleness +4 -4
  9. package/bin/wr-itil-check-fail-soft-skip-discipline +4 -4
  10. package/bin/wr-itil-check-fix-rfc-trace +4 -4
  11. package/bin/wr-itil-check-locale-discipline +4 -4
  12. package/bin/wr-itil-check-outbound-responses-staleness +4 -4
  13. package/bin/wr-itil-check-problems-readme-budget +4 -4
  14. package/bin/wr-itil-check-rfc-has-stories +4 -4
  15. package/bin/wr-itil-check-rfc-stories-ratified +4 -4
  16. package/bin/wr-itil-check-ticket-jtbd-ratification +4 -4
  17. package/bin/wr-itil-check-upstream-cache-staleness +4 -4
  18. package/bin/wr-itil-check-upstream-responses +4 -4
  19. package/bin/wr-itil-classify-readme-drift +4 -4
  20. package/bin/wr-itil-derive-release-vehicle +4 -4
  21. package/bin/wr-itil-detect-unratified-stories-maps +4 -4
  22. package/bin/wr-itil-effort-tally +4 -4
  23. package/bin/wr-itil-enumerate-postrelease-kv-candidates +4 -4
  24. package/bin/wr-itil-evaluate-relevance +4 -4
  25. package/bin/wr-itil-mark-create-gate +4 -4
  26. package/bin/wr-itil-mark-story-oversight-confirmed +4 -4
  27. package/bin/wr-itil-migrate-problems-layout +4 -4
  28. package/bin/wr-itil-migrate-story-status-mirror +4 -4
  29. package/bin/wr-itil-next-rfc-id +4 -4
  30. package/bin/wr-itil-plugin-exercise-index +4 -4
  31. package/bin/wr-itil-plugin-maturity-populate +4 -4
  32. package/bin/wr-itil-plugin-maturity-render +4 -4
  33. package/bin/wr-itil-plugin-validate-ci-gate +4 -4
  34. package/bin/wr-itil-reconcile-readme +4 -4
  35. package/bin/wr-itil-reconcile-rfcs +4 -4
  36. package/bin/wr-itil-reconcile-stories +4 -4
  37. package/bin/wr-itil-reconcile-story-maps +4 -4
  38. package/bin/wr-itil-render-story-map +4 -4
  39. package/bin/wr-itil-resolve-governance-plugin-dirs +4 -4
  40. package/bin/wr-itil-skill-invocations +4 -4
  41. package/bin/wr-itil-story-map-edit +4 -4
  42. package/bin/wr-itil-story-map-query +4 -4
  43. package/bin/wr-itil-update-jtbd-references-section +4 -4
  44. package/bin/wr-itil-update-problem-references-section +4 -4
  45. package/bin/wr-itil-update-problem-rfcs-section +4 -4
  46. package/bin/wr-itil-update-rfc-commits-section +4 -4
  47. package/bin/wr-itil-update-rfc-references-section +4 -4
  48. package/bin/wr-itil-verify-iter-summary +4 -4
  49. package/hooks/itil-assistant-output-gate.sh +3 -3
  50. package/hooks/itil-assistant-output-review.sh +5 -5
  51. package/hooks/itil-bash-polling-antipattern-detect.sh +11 -11
  52. package/hooks/itil-changeset-discipline.sh +24 -24
  53. package/hooks/itil-claude-space-protection.sh +21 -14
  54. package/hooks/itil-codex-dispatch.sh +164 -0
  55. package/hooks/itil-commit-trailer-transition-advisory.sh +11 -11
  56. package/hooks/itil-correction-detect.sh +8 -8
  57. package/hooks/itil-deferral-cadence-gate.sh +23 -23
  58. package/hooks/itil-fictional-defer-detect.sh +16 -16
  59. package/hooks/itil-fix-title-lifecycle-advisory.sh +11 -11
  60. package/hooks/itil-mid-loop-ask-detect.sh +14 -14
  61. package/hooks/itil-no-implement-draft-gate.sh +18 -18
  62. package/hooks/itil-pending-questions-surface.sh +11 -11
  63. package/hooks/itil-readme-refresh-discipline.sh +27 -27
  64. package/hooks/itil-rfc-oversight-nudge.sh +7 -7
  65. package/hooks/itil-rfc-trailer-advisory.sh +28 -28
  66. package/hooks/itil-runtime-sid-marker.sh +11 -11
  67. package/hooks/itil-story-mirror-migration-nudge.sh +7 -7
  68. package/hooks/lib/block-list.sh +17 -17
  69. package/hooks/lib/changeset-detect.sh +27 -27
  70. package/hooks/lib/claude-space-gate.sh +23 -15
  71. package/hooks/lib/command-detect.sh +12 -12
  72. package/hooks/lib/create-gate.sh +9 -39
  73. package/hooks/lib/detectors.sh +12 -12
  74. package/hooks/lib/readme-refresh-detect.sh +51 -51
  75. package/hooks/lib/runtime-sid.sh +12 -12
  76. package/hooks/lib/session-id.sh +28 -28
  77. package/hooks/lib/session-marker.sh +1 -1
  78. package/hooks/lib/staging-detect.sh +13 -13
  79. package/hooks/manage-problem-enforce-create.sh +16 -27
  80. package/hooks/p057-staging-trap-detect.sh +18 -18
  81. package/hooks/pre-publish-intake-gate.sh +5 -5
  82. package/hooks/staleness-check.sh +6 -6
  83. package/hooks-codex/hooks.json +57 -0
  84. package/lib/check-deferred-placeholder-staleness.sh +10 -10
  85. package/lib/check-outbound-responses-staleness.sh +2 -2
  86. package/lib/check-upstream-cache-staleness.sh +2 -2
  87. package/lib/derive-first-dispatch.sh +19 -19
  88. package/lib/enumerate-postrelease-kv-candidates.sh +18 -18
  89. package/lib/migrate-problems-layout.sh +12 -12
  90. package/lib/story-oversight.sh +27 -27
  91. package/package.json +16 -3
  92. package/scripts/catchup-scan.sh +25 -25
  93. package/scripts/check-fail-soft-skip-discipline.sh +10 -10
  94. package/scripts/check-fix-rfc-trace.sh +8 -8
  95. package/scripts/check-locale-discipline.sh +13 -13
  96. package/scripts/check-problems-readme-budget.sh +12 -12
  97. package/scripts/check-rfc-has-stories.sh +7 -7
  98. package/scripts/check-rfc-rejected-alternatives.sh +11 -11
  99. package/scripts/check-rfc-stories-ratified.sh +9 -9
  100. package/scripts/check-ticket-jtbd-ratification.sh +10 -10
  101. package/scripts/check-upstream-responses.sh +22 -22
  102. package/scripts/classify-readme-drift.sh +13 -13
  103. package/scripts/codex-agent.mjs +104 -0
  104. package/scripts/derive-release-vehicle.sh +23 -23
  105. package/scripts/detect-unoversighted-rfcs.sh +3 -3
  106. package/scripts/detect-unratified-stories-maps.sh +5 -5
  107. package/scripts/effort-tally.sh +10 -10
  108. package/scripts/evaluate-relevance.sh +16 -16
  109. package/scripts/mark-create-gate.sh +4 -4
  110. package/scripts/mark-story-oversight-confirmed.sh +14 -14
  111. package/scripts/migrate-story-status-mirror.sh +6 -6
  112. package/scripts/next-rfc-id.sh +5 -5
  113. package/scripts/plugin-exercise-index.sh +26 -26
  114. package/scripts/plugin-maturity-populate.sh +38 -38
  115. package/scripts/plugin-maturity-render.sh +26 -26
  116. package/scripts/plugin-validate-ci-gate.sh +14 -14
  117. package/scripts/reconcile-readme.sh +23 -23
  118. package/scripts/reconcile-rfcs.sh +13 -13
  119. package/scripts/reconcile-stories.sh +12 -12
  120. package/scripts/reconcile-story-maps.sh +6 -6
  121. package/scripts/render-story-map.mjs +24 -24
  122. package/scripts/render-story-map.sh +3 -3
  123. package/scripts/resolve-governance-plugin-dirs.sh +10 -10
  124. package/scripts/run-check-deferred-placeholder-staleness.sh +3 -3
  125. package/scripts/run-check-outbound-responses-staleness.sh +3 -3
  126. package/scripts/run-check-upstream-cache-staleness.sh +3 -3
  127. package/scripts/run-enumerate-postrelease-kv-candidates.sh +3 -3
  128. package/scripts/run-migrate-problems-layout.sh +3 -3
  129. package/scripts/skill-invocations.sh +29 -29
  130. package/scripts/story-map-edit.mjs +6 -6
  131. package/scripts/story-map-edit.sh +3 -3
  132. package/scripts/story-map-query.mjs +8 -8
  133. package/scripts/story-map-query.sh +3 -3
  134. package/scripts/update-jtbd-references-section.sh +8 -8
  135. package/scripts/update-problem-references-section.sh +12 -12
  136. package/scripts/update-problem-rfcs-section.sh +9 -9
  137. package/scripts/update-rfc-commits-section.sh +7 -7
  138. package/scripts/update-rfc-references-section.sh +3 -3
  139. package/scripts/update-story-references-section.sh +5 -5
  140. package/scripts/verify-iter-summary.sh +3 -3
  141. package/skills/capture-problem/REFERENCE.md +33 -33
  142. package/skills/capture-problem/SKILL.md +108 -108
  143. package/skills/capture-problem/agents/openai.yaml +3 -0
  144. package/skills/capture-rfc/SKILL.md +21 -323
  145. package/skills/capture-rfc/agents/openai.yaml +3 -0
  146. package/skills/capture-story/SKILL.md +65 -65
  147. package/skills/capture-story/agents/openai.yaml +3 -0
  148. package/skills/capture-story-map/SKILL.md +31 -31
  149. package/skills/capture-story-map/agents/openai.yaml +3 -0
  150. package/skills/check-upstream-responses/SKILL.md +38 -38
  151. package/skills/check-upstream-responses/agents/openai.yaml +3 -0
  152. package/skills/close-incident/SKILL.md +25 -25
  153. package/skills/close-incident/agents/openai.yaml +3 -0
  154. package/skills/link-incident/SKILL.md +22 -22
  155. package/skills/link-incident/agents/openai.yaml +3 -0
  156. package/skills/list-incidents/SKILL.md +9 -9
  157. package/skills/list-incidents/agents/openai.yaml +3 -0
  158. package/skills/list-problems/SKILL.md +17 -17
  159. package/skills/list-problems/agents/openai.yaml +3 -0
  160. package/skills/list-stories/SKILL.md +23 -23
  161. package/skills/list-stories/agents/openai.yaml +3 -0
  162. package/skills/list-story-maps/SKILL.md +9 -9
  163. package/skills/list-story-maps/agents/openai.yaml +3 -0
  164. package/skills/manage-incident/SKILL.md +59 -59
  165. package/skills/manage-incident/agents/openai.yaml +3 -0
  166. package/skills/manage-problem/SKILL.md +222 -222
  167. package/skills/manage-problem/agents/openai.yaml +3 -0
  168. package/skills/manage-rfc/SKILL.md +62 -62
  169. package/skills/manage-rfc/agents/openai.yaml +3 -0
  170. package/skills/manage-story/SKILL.md +49 -49
  171. package/skills/manage-story/agents/openai.yaml +3 -0
  172. package/skills/manage-story-map/SKILL.md +30 -30
  173. package/skills/manage-story-map/agents/openai.yaml +3 -0
  174. package/skills/mitigate-incident/SKILL.md +40 -40
  175. package/skills/mitigate-incident/agents/openai.yaml +3 -0
  176. package/skills/reconcile-readme/SKILL.md +28 -28
  177. package/skills/reconcile-readme/agents/openai.yaml +3 -0
  178. package/skills/reconcile-stories/SKILL.md +17 -17
  179. package/skills/reconcile-stories/agents/openai.yaml +3 -0
  180. package/skills/reconcile-story-maps/SKILL.md +11 -11
  181. package/skills/reconcile-story-maps/agents/openai.yaml +3 -0
  182. package/skills/report-upstream/SKILL.md +73 -73
  183. package/skills/report-upstream/agents/openai.yaml +3 -0
  184. package/skills/restore-incident/SKILL.md +28 -28
  185. package/skills/restore-incident/agents/openai.yaml +3 -0
  186. package/skills/review-problems/SKILL.md +129 -129
  187. package/skills/review-problems/agents/openai.yaml +3 -0
  188. package/skills/scaffold-intake/SKILL.md +26 -26
  189. package/skills/scaffold-intake/agents/openai.yaml +3 -0
  190. package/skills/transition-problem/SKILL.md +85 -85
  191. package/skills/transition-problem/agents/openai.yaml +3 -0
  192. package/skills/transition-problems/SKILL.md +69 -69
  193. package/skills/transition-problems/agents/openai.yaml +3 -0
  194. package/skills/update-upstream/SKILL.md +97 -97
  195. package/skills/update-upstream/agents/openai.yaml +3 -0
  196. package/skills/work-problem/SKILL.md +42 -42
  197. package/skills/work-problem/agents/openai.yaml +3 -0
  198. package/skills/work-problems/SKILL.md +327 -327
  199. package/skills/work-problems/agents/openai.yaml +3 -0
  200. package/skills-codex/capture-problem/REFERENCE.md +139 -0
  201. package/skills-codex/capture-problem/SKILL.md +438 -0
  202. package/skills-codex/capture-problem/agents/openai.yaml +3 -0
  203. package/skills-codex/capture-rfc/SKILL.md +45 -0
  204. package/skills-codex/capture-rfc/agents/openai.yaml +3 -0
  205. package/skills-codex/capture-story/SKILL.md +407 -0
  206. package/skills-codex/capture-story/agents/openai.yaml +3 -0
  207. package/skills-codex/capture-story-map/SKILL.md +286 -0
  208. package/skills-codex/capture-story-map/agents/openai.yaml +3 -0
  209. package/skills-codex/check-upstream-responses/SKILL.md +160 -0
  210. package/skills-codex/check-upstream-responses/agents/openai.yaml +3 -0
  211. package/skills-codex/close-incident/SKILL.md +192 -0
  212. package/skills-codex/close-incident/agents/openai.yaml +3 -0
  213. package/skills-codex/link-incident/SKILL.md +173 -0
  214. package/skills-codex/link-incident/agents/openai.yaml +3 -0
  215. package/skills-codex/list-incidents/SKILL.md +92 -0
  216. package/skills-codex/list-incidents/agents/openai.yaml +3 -0
  217. package/skills-codex/list-problems/SKILL.md +126 -0
  218. package/skills-codex/list-problems/agents/openai.yaml +3 -0
  219. package/skills-codex/list-stories/SKILL.md +170 -0
  220. package/skills-codex/list-stories/agents/openai.yaml +3 -0
  221. package/skills-codex/list-story-maps/SKILL.md +104 -0
  222. package/skills-codex/list-story-maps/agents/openai.yaml +3 -0
  223. package/skills-codex/manage-incident/SKILL.md +378 -0
  224. package/skills-codex/manage-incident/agents/openai.yaml +3 -0
  225. package/skills-codex/manage-problem/SKILL.md +1180 -0
  226. package/skills-codex/manage-problem/agents/openai.yaml +3 -0
  227. package/skills-codex/manage-rfc/SKILL.md +314 -0
  228. package/skills-codex/manage-rfc/agents/openai.yaml +3 -0
  229. package/skills-codex/manage-story/SKILL.md +284 -0
  230. package/skills-codex/manage-story/agents/openai.yaml +3 -0
  231. package/skills-codex/manage-story-map/SKILL.md +198 -0
  232. package/skills-codex/manage-story-map/agents/openai.yaml +3 -0
  233. package/skills-codex/mitigate-incident/SKILL.md +239 -0
  234. package/skills-codex/mitigate-incident/agents/openai.yaml +3 -0
  235. package/skills-codex/reconcile-readme/SKILL.md +175 -0
  236. package/skills-codex/reconcile-readme/agents/openai.yaml +3 -0
  237. package/skills-codex/reconcile-stories/SKILL.md +124 -0
  238. package/skills-codex/reconcile-stories/agents/openai.yaml +3 -0
  239. package/skills-codex/reconcile-story-maps/SKILL.md +81 -0
  240. package/skills-codex/reconcile-story-maps/agents/openai.yaml +3 -0
  241. package/skills-codex/report-upstream/SKILL.md +716 -0
  242. package/skills-codex/report-upstream/agents/openai.yaml +3 -0
  243. package/skills-codex/restore-incident/SKILL.md +216 -0
  244. package/skills-codex/restore-incident/agents/openai.yaml +3 -0
  245. package/skills-codex/review-problems/SKILL.md +524 -0
  246. package/skills-codex/review-problems/agents/openai.yaml +3 -0
  247. package/skills-codex/scaffold-intake/SKILL.md +209 -0
  248. package/skills-codex/scaffold-intake/agents/openai.yaml +3 -0
  249. package/skills-codex/scaffold-intake/templates/CONTRIBUTING.md.tmpl +31 -0
  250. package/skills-codex/scaffold-intake/templates/SECURITY.md.tmpl +39 -0
  251. package/skills-codex/scaffold-intake/templates/SUPPORT.md.tmpl +32 -0
  252. package/skills-codex/scaffold-intake/templates/config.yml.tmpl +8 -0
  253. package/skills-codex/scaffold-intake/templates/problem-report.yml.tmpl +114 -0
  254. package/skills-codex/transition-problem/SKILL.md +371 -0
  255. package/skills-codex/transition-problem/agents/openai.yaml +3 -0
  256. package/skills-codex/transition-problems/SKILL.md +310 -0
  257. package/skills-codex/transition-problems/agents/openai.yaml +3 -0
  258. package/skills-codex/update-upstream/SKILL.md +583 -0
  259. package/skills-codex/update-upstream/agents/openai.yaml +3 -0
  260. package/skills-codex/work-problem/SKILL.md +160 -0
  261. package/skills-codex/work-problem/agents/openai.yaml +3 -0
  262. package/skills-codex/work-problems/SKILL.md +58 -0
  263. package/skills-codex/work-problems/agents/openai.yaml +3 -0
  264. package/templates/story-map.css +1 -1
  265. package/bin/wr-itil-mark-rfc-capture-gate +0 -51
  266. package/scripts/mark-rfc-capture-gate.sh +0 -32
@@ -3,7 +3,7 @@
3
3
  //
4
4
  // A map's data lives in a JSON island inside a several-hundred-line HTML file,
5
5
  // with `<` escaped as <. Editing that with an exact-match string tool is
6
- // error-prone enough that it does not get done: during ADR-102's own authoring
6
+ // error-prone enough that it does not get done: during story-maps-render-from-json-through-a-canonical-template-architecture-rule's own authoring
7
7
  // every island change went through a throwaway load-mutate-save script rather
8
8
  // than the editing tool an agent normally reaches for. This command is that
9
9
  // script, made a first-class surface — state the operation, never open the JSON.
@@ -22,13 +22,13 @@
22
22
  //
23
23
  // Nothing the story file already says is settable here — status, the value
24
24
  // statement, and the problems a story closes are all read from the story at
25
- // render time (ADR-104). A card carries what identifies it and where it sits;
25
+ // render time (a-story-map-card-stores-no-value-a-story-file-already-carries-architecture-rule). A card carries what identifies it and where it sits;
26
26
  // a row carries its RFC identity and its name. There are no --status, --value
27
27
  // or --badge flags, and a row's status and problems are derived from the
28
28
  // stories in it.
29
29
  //
30
- // @adr ADR-102 (story maps render from JSON through a canonical template)
31
- // @adr ADR-095 (story-map membership enforced at capture — drives add-card)
30
+ // @adr story-maps-render-from-json-through-a-canonical-template-architecture-rule (story maps render from JSON through a canonical template)
31
+ // @adr story-map-membership-and-story-content-completeness-are-enforced-at-capture-architecture-rule (story-map membership enforced at capture — drives add-card)
32
32
 
33
33
  import { readFileSync, writeFileSync, existsSync } from 'node:fs';
34
34
  import { dirname, join, resolve } from 'node:path';
@@ -139,7 +139,7 @@ const OPS = {
139
139
  throw new Error(`release band "${id}" already exists on this map.`);
140
140
  }
141
141
  const band = { id, name };
142
- // A row IS an RFC (ADR-103). Where a problem has proposed the row it carries
142
+ // A row IS an RFC (a-release-row-is-the-rfc-and-the-map-is-the-approval-surface-architecture-rule). Where a problem has proposed the row it carries
143
143
  // that identity; where nothing has, it renders as speculative and says so.
144
144
  if (flags.rfc && flags.rfc !== true) band.rfc = String(flags.rfc);
145
145
  if (flags.note && flags.note !== true) band.note = String(flags.note);
@@ -176,7 +176,7 @@ function usage() {
176
176
  console.error(' | story-map-edit.mjs <map.html> --json -');
177
177
  console.error('');
178
178
  console.error('Status, value and problems are derived from the story files at');
179
- console.error('render time and are not settable here (ADR-104).');
179
+ console.error('render time and are not settable here (a-story-map-card-stores-no-value-a-story-file-already-carries-architecture-rule).');
180
180
  }
181
181
 
182
182
  /** Read an operation as a JSON object on stdin.
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env bash
2
- # Bash entry point for the story-map card editor, so the ADR-049/ADR-080 shim
2
+ # Bash entry point for the story-map card editor, so the plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule/highest-version-wins-shim-wrapper-for-plugin-scaffold-template-shims-architecture-rule shim
3
3
  # machinery (which resolves `scripts/<NAME>.sh`) reaches the Node implementation.
4
4
  #
5
5
  # Usage: wr-itil-story-map-edit <map.html> <operation> [flags]
6
6
  #
7
- # @adr ADR-102 (story maps render from JSON through a canonical template)
8
- # @adr ADR-049 (plugin scripts resolve via bin/ on $PATH)
7
+ # @adr story-maps-render-from-json-through-a-canonical-template-architecture-rule (story maps render from JSON through a canonical template)
8
+ # @adr plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule (plugin scripts resolve via bin/ on $PATH)
9
9
  set -euo pipefail
10
10
  exec node "$(cd "$(dirname "$0")" && pwd)/story-map-edit.mjs" "$@"
@@ -4,7 +4,7 @@
4
4
  // story-map-query.sh, which owns the single hash definition. Nothing here
5
5
  // hashes anything; see that wrapper's header for why.
6
6
  //
7
- // Reads the data island, never the rendered grid. Under ADR-102 the grid is a
7
+ // Reads the data island, never the rendered grid. Under story-maps-render-from-json-through-a-canonical-template-architecture-rule the grid is a
8
8
  // projection regenerated from the island, so a map edited but not yet
9
9
  // re-rendered would answer with stale content if this scraped the markup — and
10
10
  // would disagree with the oversight hash, which is island-scoped.
@@ -19,14 +19,14 @@
19
19
  // and which maps could not answer
20
20
  // unratified only the maps needing ratification, with a reason
21
21
  //
22
- // @adr ADR-102 (story maps render from JSON through a canonical template)
23
- // @adr ADR-090 (drift-invalidated human-oversight marker)
22
+ // @adr story-maps-render-from-json-through-a-canonical-template-architecture-rule (story maps render from JSON through a canonical template)
23
+ // @adr story-maps-and-stories-carry-a-drift-invalidated-human-oversight-marker-architecture-rule (drift-invalidated human-oversight marker)
24
24
 
25
25
  import { readFileSync } from 'node:fs';
26
26
 
27
27
  const ISLAND_OPEN = '<script id="story-map-data" type="application/json">';
28
28
 
29
- /** Read the authored data. Falls through to null for a pre-ADR-102 map, which
29
+ /** Read the authored data. Falls through to null for a pre-story-maps-render-from-json-through-a-canonical-template-architecture-rule map, which
30
30
  * has no island — mirroring _oversight_hashable's own fallthrough rather than
31
31
  * inventing a second rule about what counts as a map. */
32
32
  function island(path) {
@@ -157,7 +157,7 @@ const OPS = {
157
157
  list: (maps) => maps.map(summary),
158
158
 
159
159
  get(maps, [id]) {
160
- if (!id) throw new Error('get needs a story-map id, e.g. STORY-MAP-002');
160
+ if (!id) throw new Error('get needs a story-map id, e.g. take-a-problem-from-noticed-to-resolved-journey-map-journey-map');
161
161
  const m = maps.find((x) => x.data.storyMapId === id);
162
162
  if (!m) throw new Error(`no story map ${id} in this corpus`);
163
163
  return {
@@ -172,7 +172,7 @@ const OPS = {
172
172
  },
173
173
 
174
174
  'find-story': (maps, [storyId]) => {
175
- if (!storyId) throw new Error('find-story needs a story id, e.g. STORY-047');
175
+ if (!storyId) throw new Error('find-story needs a story id, e.g. gate-the-correction-nudge-on-prompt-authorship-delivery-story');
176
176
  const hits = [];
177
177
  for (const m of maps) {
178
178
  for (const t of m.data.tasks ?? []) {
@@ -191,7 +191,7 @@ const OPS = {
191
191
  },
192
192
 
193
193
  'find-rfc': (maps, [rfcId]) => {
194
- if (!rfcId) throw new Error('find-rfc needs an RFC id, e.g. RFC-062');
194
+ if (!rfcId) throw new Error('find-rfc needs an RFC id, e.g. example-release-design-release-design');
195
195
  const hits = [];
196
196
  for (const m of maps) {
197
197
  for (const row of m.data.releases ?? []) {
@@ -229,7 +229,7 @@ const OPS = {
229
229
  * Do not normalise this back to an array.
230
230
  */
231
231
  'find-problem': (maps, [pid]) => {
232
- if (!pid) throw new Error('find-problem needs a problem id, e.g. P508');
232
+ if (!pid) throw new Error('find-problem needs a problem id, e.g. the-fix-proposal-still-instantiates-a-standalone-rfc-document-after-made-it-a-release-row-problem');
233
233
  const hits = [];
234
234
  // A map with no authored island cannot be read at all.
235
235
  const unanswerable = (maps.islandless ?? []).map((m) => ({
@@ -17,9 +17,9 @@
17
17
  # story-map-edit reads an operation FROM stdin under `--json -`. The asymmetry
18
18
  # is deliberate; do not assume symmetry between the two.
19
19
  #
20
- # @adr ADR-102 (story maps render from JSON through a canonical template)
21
- # @adr ADR-090 (drift-invalidated human-oversight marker)
22
- # @adr ADR-049 (plugin scripts resolve via bin/ on $PATH)
20
+ # @adr story-maps-render-from-json-through-a-canonical-template-architecture-rule (story maps render from JSON through a canonical template)
21
+ # @adr story-maps-and-stories-carry-a-drift-invalidated-human-oversight-marker-architecture-rule (drift-invalidated human-oversight marker)
22
+ # @adr plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule (plugin scripts resolve via bin/ on $PATH)
23
23
 
24
24
  set -uo pipefail
25
25
 
@@ -6,11 +6,11 @@
6
6
  # JTBD-NNN-*.md files. Mirror of update-problem-references-section.sh
7
7
  # with jtbd: frontmatter / data-jtbd attribute extraction.
8
8
  #
9
- # Per ADR-060 § Phase 2 encoding amendment 2026-05-12 architect
9
+ # Per problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule § Phase 2 encoding amendment 2026-05-12 architect
10
10
  # finding 4: no per-section-name branching; lookup-table dispatch.
11
11
  #
12
- # @adr ADR-060 (Phase 2 encoding amendment 2026-05-12)
13
- # @problem P170 (Phase 2 Slice 2b)
12
+ # @adr problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule (Phase 2 encoding amendment 2026-05-12)
13
+ # @problem problem-tickets-strain-as-fixes-decompose-into-multiple-coordinated-changes-need-an-rfc-framework-that-ties-all-changes-back-to-problems-and-unifies-technical-with-user-business-problems-problem (Phase 2 Slice 2b)
14
14
 
15
15
  set -uo pipefail
16
16
 
@@ -38,13 +38,13 @@ SECTION_MODE["Stories"]="markdown-frontmatter-jtbd"
38
38
  SECTION_ID_PATTERN["Stories"]="STORY-[0-9]+"
39
39
  SECTION_ID_PREFIX["Stories"]=""
40
40
 
41
- # P170 Phase 4 P4.1 — Related problems reverse-trace from problem
41
+ # problem-tickets-strain-as-fixes-decompose-into-multiple-coordinated-changes-need-an-rfc-framework-that-ties-all-changes-back-to-problems-and-unifies-technical-with-user-business-problems-problem Phase 4 P4.1 — Related problems reverse-trace from problem
42
42
  # tickets that cite this JTBD in their `jtbd:` frontmatter array.
43
- # Per ADR-060 § Phase 3 + Phase 4 in-scope amendment (2026-05-13)
43
+ # Per problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule § Phase 3 + Phase 4 in-scope amendment (2026-05-13)
44
44
  # P4.1 + JTBD finding F5: lookup-table row addition (no per-section
45
- # branching). Searches per-state subdirs (RFC-002 layout) via the
45
+ # branching). Searches per-state subdirs (docs-problems-flat-layout-migration-per-state-subdirs-adopter-auto-migration-release-design layout) via the
46
46
  # `*/` glob segment; the flat-layout half is intentionally omitted
47
- # because Phase 4 ships after RFC-002 T5 has completed migration.
47
+ # because Phase 4 ships after docs-problems-flat-layout-migration-per-state-subdirs-adopter-auto-migration-release-design T5 has completed migration.
48
48
  # Problem-ticket filenames are `<NNN>-<title>.md` without the `P`
49
49
  # prefix; render-prefix "P" produces the canonical `P<NNN>` form
50
50
  # for the rendered table row.
@@ -69,7 +69,7 @@ declare -a matched_ids=() matched_titles=() matched_statuses=()
69
69
  extract_from_markdown_frontmatter_jtbd() {
70
70
  local file="$1"
71
71
  # YAML frontmatter `jtbd:` array OR body-field `**JTBD**:` line.
72
- # Problem tickets use body-field convention (per existing P170 / P189
72
+ # Problem tickets use body-field convention (per existing problem-tickets-strain-as-fixes-decompose-into-multiple-coordinated-changes-need-an-rfc-framework-that-ties-all-changes-back-to-problems-and-unifies-technical-with-user-business-problems-problem / agent-invents-deferred-framing-on-tracked-phases-without-user-deferral-direction-projects-fictional-out-of-scope-onto-in-scope-work-problem
73
73
  # schema); RFCs / Stories / Story Maps use frontmatter `jtbd:` arrays.
74
74
  # Phase 4 P4.2: capture-problem skeleton uses body field `**JTBD**:`
75
75
  # per the existing convention; frontmatter migration is deferred to
@@ -8,7 +8,7 @@
8
8
  # attributes (story-maps) or YAML frontmatter `problems:` list
9
9
  # (stories + RFCs).
10
10
  #
11
- # Per ADR-060 § Phase 2 encoding amendment 2026-05-12 architect
11
+ # Per problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule § Phase 2 encoding amendment 2026-05-12 architect
12
12
  # finding 4: the helper body MUST NOT carry per-section-name
13
13
  # branching; `<section-name>` is a positional argument; the only
14
14
  # branch in the helper body is the per-input-extension dispatch
@@ -20,8 +20,8 @@
20
20
  #
21
21
  # Supersedes/absorbs the single-purpose
22
22
  # `packages/itil/scripts/update-problem-rfcs-section.sh` for the
23
- # `## RFCs` section per ADR-060 amendment 2026-05-12 § Phase 2
24
- # commit-grain decomposition + ADR-010 forwarder pattern. The old
23
+ # `## RFCs` section per problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule amendment 2026-05-12 § Phase 2
24
+ # commit-grain decomposition + rename-wr-problem-plugin-to-wr-itil-architecture-rule forwarder pattern. The old
25
25
  # single-purpose helper stays as a thin shim during the deprecation
26
26
  # window for back-compat with any pinned callers.
27
27
  #
@@ -33,7 +33,7 @@
33
33
  # - Story Maps → docs/story-maps/*/*.html (data-attribute extraction)
34
34
  # - Stories → docs/stories/*/*.md (frontmatter `problems:` extraction)
35
35
  #
36
- # Lazy-empty discipline (per JTBD-101 atomic-fix-adopter friction
36
+ # Lazy-empty discipline (per extend-the-suite-with-new-plugins-user-outcome atomic-fix-adopter friction
37
37
  # guard + sibling pattern from update-problem-rfcs-section.sh): if
38
38
  # zero artefacts trace the problem, the `## <section-name>` section
39
39
  # is REMOVED entirely from the ticket file.
@@ -42,13 +42,13 @@
42
42
  # diff). Section placement: between `## Related` and `## Fix Released`
43
43
  # (or at EOF if neither present), mirroring the RFC-section convention.
44
44
  #
45
- # @adr ADR-060 (Phase 2 encoding amendment 2026-05-12 — architect
45
+ # @adr problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule (Phase 2 encoding amendment 2026-05-12 — architect
46
46
  # finding 4: no per-section-name branching; per-extension dispatch
47
47
  # via lookup table)
48
- # @adr ADR-014 (called by capture/manage skills to ride single-purpose
48
+ # @adr governance-skills-commit-their-own-completed-work-architecture-rule (called by capture/manage skills to ride single-purpose
49
49
  # commit grain)
50
- # @adr ADR-052 (behavioural bats coverage in test/)
51
- # @problem P170 (Phase 2 Slice 2 deliverable)
50
+ # @adr behavioural-tests-default-for-skill-testing-architecture-rule (behavioural bats coverage in test/)
51
+ # @problem problem-tickets-strain-as-fixes-decompose-into-multiple-coordinated-changes-need-an-rfc-framework-that-ties-all-changes-back-to-problems-and-unifies-technical-with-user-business-problems-problem (Phase 2 Slice 2 deliverable)
52
52
 
53
53
  set -uo pipefail
54
54
 
@@ -125,8 +125,8 @@ declare -a matched_statuses=()
125
125
  extract_from_markdown_frontmatter() {
126
126
  local file="$1"
127
127
  # Read frontmatter problems: list. Match formats:
128
- # problems: [P200, P201]
129
- # problems: ["P200", "P201"]
128
+ # problems: [wr-voice-tone-agent-returns-blanket-fail-when-docs-voice-and-tone-md-is-missing-problem, windyroad-tdd-hook-only-recognises-same-dir-or-tests-test-associations-problem]
129
+ # problems: ["wr-voice-tone-agent-returns-blanket-fail-when-docs-voice-and-tone-md-is-missing-problem", "windyroad-tdd-hook-only-recognises-same-dir-or-tests-test-associations-problem"]
130
130
  local problems_line
131
131
  problems_line=$(awk '/^---$/{f=!f;next} f && /^problems:/' "$file" | head -1)
132
132
  if [ -z "$problems_line" ]; then
@@ -137,7 +137,7 @@ extract_from_markdown_frontmatter() {
137
137
 
138
138
  extract_from_html_data_attribute() {
139
139
  local file="$1"
140
- # Read <meta name="problems" content="P200,P201">
140
+ # Read <meta name="problems" content="wr-voice-tone-agent-returns-blanket-fail-when-docs-voice-and-tone-md-is-missing-problem,windyroad-tdd-hook-only-recognises-same-dir-or-tests-test-associations-problem">
141
141
  local problems_line
142
142
  problems_line=$(grep -E '<meta[[:space:]]+name="problems"[[:space:]]+content="[^"]+"' "$file" | head -1)
143
143
  if [ -z "$problems_line" ]; then
@@ -265,7 +265,7 @@ if [ -n "$new_section" ]; then
265
265
  tmp_file2="$(mktemp)"
266
266
  # Pass the multi-line section via a file: awk -v rejects embedded newlines
267
267
  # on BSD awk (macOS), so getline keeps it portable across BSD awk + gawk
268
- # (proven in effort-tally.sh --write, commit 1c967ba0; P392). new_section
268
+ # (proven in effort-tally.sh --write, commit 1c967ba0; blessed-replace-section-awk-v-section-multiline-idiom-fails-on-bsd-awk-macos-problem). new_section
269
269
  # ends in a single \n, matching the prior `printf "%s\n", section` output.
270
270
  section_file="$(mktemp)"
271
271
  printf '%s' "$new_section" > "$section_file"
@@ -7,8 +7,8 @@
7
7
  #
8
8
  # Called inline by `/wr-itil:capture-rfc` Step 6 and `/wr-itil:manage-rfc`
9
9
  # Step 7 (transitions) + Step 9 (review re-rank) so the cross-tier
10
- # reverse-trace is current at every commit per ADR-014 single-commit
11
- # grain. Closes ADR-060 Phase 1 item 10 + Confirmation criterion 3
10
+ # reverse-trace is current at every commit per governance-skills-commit-their-own-completed-work-architecture-rule single-commit
11
+ # grain. Closes problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule Phase 1 item 10 + Confirmation criterion 3
12
12
  # (skill-side primary surface; architect Q1 + Q3 verdicts).
13
13
  #
14
14
  # Usage:
@@ -16,7 +16,7 @@
16
16
  #
17
17
  # Default <rfcs-dir> is `docs/rfcs`.
18
18
  #
19
- # Lazy-empty discipline (per JTBD-101 atomic-fix-adopter friction
19
+ # Lazy-empty discipline (per extend-the-suite-with-new-plugins-user-outcome atomic-fix-adopter friction
20
20
  # guard + architect Q3 verdict): if zero RFCs trace this problem, the
21
21
  # `## RFCs` section is REMOVED entirely. Atomic-fix tickets with no
22
22
  # RFC trace stay free of empty-table noise.
@@ -25,7 +25,7 @@
25
25
  #
26
26
  # Section placement (per architect Q3 verdict):
27
27
  # - Before `## Fix Released` if present (closure section stays at tail
28
- # per ADR-022 trailing-audit-artefact convention).
28
+ # per problem-lifecycle-add-a-verification-pending-status-between-known-error-and-closed-architecture-rule trailing-audit-artefact convention).
29
29
  # - Else at EOF.
30
30
  #
31
31
  # Output:
@@ -33,16 +33,16 @@
33
33
  # update; otherwise leaves the file untouched.
34
34
  # - Emits exit 0 always (caller skills don't need defensive handling).
35
35
  #
36
- # @adr ADR-060 (Phase 1 item 10 + Confirmation criterion 3 — auto-
36
+ # @adr problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule (Phase 1 item 10 + Confirmation criterion 3 — auto-
37
37
  # maintained reverse trace; architect Q3 — table format, lazy empty,
38
38
  # between `## Related` and `## Fix Released`)
39
- # @adr ADR-014 (called by capture-rfc Step 6 + manage-rfc Step 7+9
39
+ # @adr governance-skills-commit-their-own-completed-work-architecture-rule (called by capture-rfc Step 6 + manage-rfc Step 7+9
40
40
  # to ride the same single-purpose commit)
41
- # @adr ADR-022 (`## Fix Released` is the trailing closure section;
41
+ # @adr problem-lifecycle-add-a-verification-pending-status-between-known-error-and-closed-architecture-rule (`## Fix Released` is the trailing closure section;
42
42
  # `## RFCs` precedes it)
43
- # @adr ADR-052 (behavioural bats coverage in
43
+ # @adr behavioural-tests-default-for-skill-testing-architecture-rule (behavioural bats coverage in
44
44
  # packages/itil/scripts/test/update-problem-rfcs-section.bats)
45
- # @problem P170
45
+ # @problem problem-tickets-strain-as-fixes-decompose-into-multiple-coordinated-changes-need-an-rfc-framework-that-ties-all-changes-back-to-problems-and-unifies-technical-with-user-business-problems-problem
46
46
 
47
47
  set -uo pipefail
48
48
 
@@ -2,20 +2,20 @@
2
2
  # packages/itil/scripts/update-rfc-commits-section.sh
3
3
  #
4
4
  # Renders an RFC's `## Commits` section as a DERIVED VIEW from the git history
5
- # (P378/RFC-030 Piece 1; ADR-085). The commit log is the source of truth; the
5
+ # (rfc-lifecycle-is-not-self-maintaining-it-leans-on-human-memory-problem/rfc-lifecycle-self-maintenance-release-design Piece 1; the-rfc-commits-section-is-a-git-log-derived-view-rendered-skill-side-architecture-rule). The commit log is the source of truth; the
6
6
  # section is a projection of `git log --grep "Refs: RFC-NNN"`. Because nothing
7
7
  # is written per-commit, there is no post-commit working-tree edit and no
8
- # ADR-014 grain problem — the section is regenerated skill-side (manage-rfc on
8
+ # governance-skills-commit-their-own-completed-work-architecture-rule grain problem — the section is regenerated skill-side (manage-rfc on
9
9
  # every transition/review; reconcile-rfcs) exactly like docs/problems/README.md
10
- # is a rendered index (ADR-031 precedent).
10
+ # is a rendered index (problem-ticket-directory-layout-per-state-subdirectories-under-docs-problems-architecture-rule precedent).
11
11
  #
12
12
  # Usage: update-rfc-commits-section.sh <rfc-file>
13
13
  # Idempotent: rewriting a current section is a byte-stable no-op.
14
14
  #
15
- # @adr ADR-085 (RFC ## Commits is a git-log-derived view, rendered skill-side)
16
- # @adr ADR-031 (rendered-index precedent) ADR-014 (why not a post-commit hook)
17
- # @problem P378
18
- # @rfc RFC-030
15
+ # @adr the-rfc-commits-section-is-a-git-log-derived-view-rendered-skill-side-architecture-rule (RFC ## Commits is a git-log-derived view, rendered skill-side)
16
+ # @adr problem-ticket-directory-layout-per-state-subdirectories-under-docs-problems-architecture-rule (rendered-index precedent) governance-skills-commit-their-own-completed-work-architecture-rule (why not a post-commit hook)
17
+ # @problem rfc-lifecycle-is-not-self-maintaining-it-leans-on-human-memory-problem
18
+ # @rfc rfc-lifecycle-self-maintenance-release-design
19
19
 
20
20
  set -uo pipefail
21
21
 
@@ -7,13 +7,13 @@
7
7
  # - ## Story Maps : sources docs/story-maps/*/*.html via data attributes
8
8
  # - ## Stories : forward-trace from RFC's own frontmatter `stories:`
9
9
  #
10
- # Per ADR-060 § Phase 2 encoding amendment 2026-05-12 architect finding 4:
10
+ # Per problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule § Phase 2 encoding amendment 2026-05-12 architect finding 4:
11
11
  # no per-section-name branching in body; lookup-table-driven dispatch.
12
12
  #
13
13
  # Usage: update-rfc-references-section.sh <rfc-file> <section-name>
14
14
  #
15
- # @adr ADR-060 (Phase 2 encoding amendment 2026-05-12)
16
- # @problem P170 (Phase 2 Slice 2b)
15
+ # @adr problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule (Phase 2 encoding amendment 2026-05-12)
16
+ # @problem problem-tickets-strain-as-fixes-decompose-into-multiple-coordinated-changes-need-an-rfc-framework-that-ties-all-changes-back-to-problems-and-unifies-technical-with-user-business-problems-problem (Phase 2 Slice 2b)
17
17
 
18
18
  set -uo pipefail
19
19
 
@@ -5,11 +5,11 @@
5
5
  # table supports ## RFCs, ## Story Maps sections on STORY-NNN-*.md
6
6
  # files (a story's parent RFC + parent story-map traces).
7
7
  #
8
- # Per ADR-060 § Phase 2 encoding amendment 2026-05-12 architect
8
+ # Per problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule § Phase 2 encoding amendment 2026-05-12 architect
9
9
  # finding 4: no per-section-name branching; lookup-table dispatch.
10
10
  #
11
- # @adr ADR-060 (Phase 2 encoding amendment 2026-05-12)
12
- # @problem P170 (Phase 2 Slice 2b)
11
+ # @adr problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule (Phase 2 encoding amendment 2026-05-12)
12
+ # @problem problem-tickets-strain-as-fixes-decompose-into-multiple-coordinated-changes-need-an-rfc-framework-that-ties-all-changes-back-to-problems-and-unifies-technical-with-user-business-problems-problem (Phase 2 Slice 2b)
13
13
 
14
14
  set -uo pipefail
15
15
 
@@ -49,11 +49,11 @@ extract_from_markdown_frontmatter_stories() {
49
49
 
50
50
  extract_from_html_data_story_id() {
51
51
  local file="$1"
52
- # Story maps reference stories via <a data-story-id="STORY-NNN"> per ADR-060
52
+ # Story maps reference stories via <a data-story-id="STORY-NNN"> per problem-rfc-story-framework-with-mandatory-problem-trace-and-unified-problem-ontology-architecture-rule
53
53
  # amendment schema; grep on the literal attribute match.
54
54
  # Two spellings carry the same fact, and a rendered map carries BOTH: the
55
55
  # card as data-story-id="X", and the authored island entry as "storyId": "X".
56
- # Pre-ADR-102 maps have only the first; a map edited but not yet re-rendered
56
+ # Pre-story-maps-render-from-json-through-a-canonical-template-architecture-rule maps have only the first; a map edited but not yet re-rendered
57
57
  # has only the second. Matching both covers every state. The alternation is
58
58
  # boolean per file, so a map carrying both spellings is not double-listed.
59
59
  grep -qE "data-story-id=\"${story_id}\"|\"storyId\"[[:space:]]*:[[:space:]]*\"${story_id}\"" "$file"
@@ -2,7 +2,7 @@
2
2
  # verify-iter-summary.sh — detect ITERATION_SUMMARY over-claim against
3
3
  # on-disk ADR Confirmation state.
4
4
  #
5
- # Closes P335: AFK iter subprocess over-claims completion in ITERATION_SUMMARY
5
+ # Closes afk-iter-subprocesses-can-over-claim-completion-in-their-iteration-summary-orchestrator-trusts-the-claim-but-on-disk-state-contradicts-it-problem: AFK iter subprocess over-claims completion in ITERATION_SUMMARY
6
6
  # while on-disk Confirmation `[ ]` boxes remain. Step 6.75 of work-problems
7
7
  # dispatches this script between iter completion and Step 7 loop-back.
8
8
  #
@@ -17,7 +17,7 @@
17
17
  # section
18
18
  # 2 = invocation error (missing args, missing notes file, bad sha)
19
19
  #
20
- # Per ADR-049, this script is invoked via the PATH shim
20
+ # Per plugin-bundled-scripts-invoked-from-skill-md-resolve-via-bin-on-path-architecture-rule, this script is invoked via the PATH shim
21
21
  # `wr-itil-verify-iter-summary` from SKILL.md prose — never via the
22
22
  # repo-relative `packages/itil/scripts/...` path.
23
23
 
@@ -63,7 +63,7 @@ fi
63
63
  # - "all <something> green|complete|done|checked|ticked"
64
64
  # - "every <something> green|complete|done|checked|ticked"
65
65
  # - "all (Confirmation|criteria) items <complete|green|done|ticked>"
66
- # - "(a)-(<letter>) green|complete|all" (the ADR-077 witness shape)
66
+ # - "(a)-(<letter>) green|complete|all" (the generated-docs-decisions-readme-md-compendium-as-token-cheap-load-surface-for-routine-architect-agent-compliance-architecture-rule witness shape)
67
67
  # - "Confirmation items (a)-(<letter>) all green at source"
68
68
  has_signal=0
69
69
  if echo "$combined" | grep -qiE '(all|every)[[:space:]]+[^.]{0,80}(green|complete|done|checked|ticked|landed)' ; then
@@ -1,18 +1,18 @@
1
1
  # `/wr-itil:capture-problem` Reference
2
2
 
3
- This file hosts the rationale, edge cases, contract trade-offs, and ADR cross-references for the `/wr-itil:capture-problem` skill. SKILL.md is the runtime contract (~150 lines, on-topic per ADR-038 progressive disclosure); this REFERENCE.md is the on-demand expansion for maintainers and curious users.
3
+ This file hosts the rationale, edge cases, contract trade-offs, and ADR cross-references for the `/wr-itil:capture-problem` skill. SKILL.md is the runtime contract (~150 lines, on-topic per the "Progressive disclosure + once-per-session budget for UserPromptSubmit governance prose" architecture rule progressive disclosure); this REFERENCE.md is the on-demand expansion for maintainers and curious users.
4
4
 
5
5
  ## Why a separate skill?
6
6
 
7
- The `/wr-itil:manage-problem` flow is ~10 turns of agent work for a full new-problem intake: Step 0 README reconciliation preflight, Step 2 wide-net duplicate grep + AskUserQuestion branch, Step 3 next-ID, Step 4 information-gathering AskUserQuestion, Step 4b multi-concern split AskUserQuestion, Step 5 ticket file write + P094 README refresh, Step 11 commit gate.
7
+ The `/wr-itil:manage-problem` flow is ~10 turns of agent work for a full new-problem intake: Step 0 README reconciliation preflight, Step 2 wide-net duplicate grep + AskUserQuestion branch, Step 3 next-ID, Step 4 information-gathering AskUserQuestion, Step 4b multi-concern split AskUserQuestion, Step 5 ticket file write + the "Problem 094: `/wr-itil:manage-problem` does not refresh `docs/problems/README.md` on ticket creation" problem README refresh, Step 11 commit gate.
8
8
 
9
9
  That cost is correct for the canonical new-problem path — the user wants to walk the flow, see duplicate-match prompts, and place the ticket in the WSJF ranking immediately.
10
10
 
11
- It is wrong for the **aside-invocation** use case. P155 surfaced three repeating patterns where the heavyweight cost is load-bearing friction:
11
+ It is wrong for the **aside-invocation** use case. the "Ship `/wr-itil:capture-problem` skill — lightweight aside-invocation surface for problem capture during foreground work" problem surfaced three repeating patterns where the heavyweight cost is load-bearing friction:
12
12
 
13
13
  1. **Mid-AFK-iter sibling-findings**: agent observes a tangential ticket-worthy issue. The 10-turn ceremony breaks iter cadence — observation gets buried in `notes` field of `ITERATION_SUMMARY` and ~50% never reach the backlog.
14
14
  2. **User-initiated rapid captures**: user says "btw, this is broken too — capture it". The 10-turn ceremony breaks conversational flow.
15
- 3. **AFK orchestrator main turn captures**: user-driven mid-loop interjections (P151 / P152 / P154 in the session that surfaced P155). Each capture took 5-15 minutes wall-clock through the heavyweight flow.
15
+ 3. **AFK orchestrator main turn captures**: user-driven mid-loop interjections (the "Published skills reference repo-relative script paths — adopter `bash` invocations hard-fail at Step 0" problem / the "No pressure or nudge for keeping documentation up to date — README narrative drifts from package behaviour silently because no gate, hook, or advisory applies pressure on doc-content currency" problem / the "namespace-prefix detector must run against npm pack output not source tree — source-tree advisory misses publish-manifest drift class (broken-shim regression caught only after production ship)" problem in the session that surfaced the "Ship `/wr-itil:capture-problem` skill — lightweight aside-invocation surface for problem capture during foreground work" problem). Each capture took 5-15 minutes wall-clock through the heavyweight flow.
16
16
 
17
17
  `/wr-itil:capture-problem` is the source-side fix: a lightweight skill with a deferred-placeholder pattern that captures the observation in ~3-4 turns and routes the deferred re-rating + README refresh through `/wr-itil:review-problems` at a time of the user's choosing.
18
18
 
@@ -20,25 +20,25 @@ It is wrong for the **aside-invocation** use case. P155 surfaced three repeating
20
20
 
21
21
  ### Capture-time false-positives are cheaper than false-negatives
22
22
 
23
- P155 line 24: "capture-time false-positives (creating a duplicate that gets merged later) are cheaper than capture-time false-negatives (losing the observation entirely)."
23
+ the "Ship `/wr-itil:capture-problem` skill — lightweight aside-invocation surface for problem capture during foreground work" problem line 24: "capture-time false-positives (creating a duplicate that gets merged later) are cheaper than capture-time false-negatives (losing the observation entirely)."
24
24
 
25
25
  This is the structural rationale for:
26
26
  - **3-keyword cap on the duplicate-grep** — wider grep would surface more matches but force the user to either (a) add an AskUserQuestion branch (which capture-problem doesn't have) or (b) ignore the matches and proceed silently. A 3-keyword cap keeps the match list short and audit-able in the report.
27
27
  - **Title-only filename match** — body-content matches would be too noisy at the conservative threshold. Files whose filenames have zero overlap but whose bodies mention a keyword are almost always different tickets that happen to discuss similar topics. False-positive cost would dominate.
28
28
  - **No halt-on-match** — even when matches are found, capture proceeds. The duplicate gets resolved at next `/wr-itil:review-problems` (where the full-rank scan can detect and merge actual duplicates with the user in the loop).
29
29
 
30
- ### README refresh: inline (P199 Option 2 amendment, 2026-06-05)
30
+ ### README refresh: inline (the "capture-problem → manage-problem same-session halts at Step 0 reconcile (HALT_ROUTE_RECONCILE on deferred-refresh seam)" problem Option 2 amendment, 2026-06-05)
31
31
 
32
- Capture-problem stages `docs/problems/README.md` inline at Step 6, mirroring `/wr-itil:manage-problem` Step 5 P094 (refresh-on-create) + P134 (last-reviewed rotation). The previously-load-bearing "Deferred-README-refresh contract" was reversed by user direction recorded in P199 on 2026-05-31, then implemented on 2026-06-05.
32
+ Capture-problem stages `docs/problems/README.md` inline at Step 6, mirroring `/wr-itil:manage-problem` Step 5 the "Problem 094: `/wr-itil:manage-problem` does not refresh `docs/problems/README.md` on ticket creation" problem (refresh-on-create) + the "`docs/problems/README.md` line 3 narrative-blob accumulator bloat — sibling to (briefing tier 3) on a different surface" problem (last-reviewed rotation). The previously-load-bearing "Deferred-README-refresh contract" was reversed by user direction recorded in the "capture-problem → manage-problem same-session halts at Step 0 reconcile (HALT_ROUTE_RECONCILE on deferred-refresh seam)" problem on 2026-05-31, then implemented on 2026-06-05.
33
33
 
34
34
  **Rationale for the reversal** (user direction):
35
- - The P165 README-refresh-discipline hook (shipped after the initial capture-problem design) blocks every capture commit that does not stage README. The P262 workaround (a `RISK_BYPASS: capture-deferred-readme` trailer) cleared the gate but kept the README transiently stale by design — a contract that always felt half-superseded by P165 reality.
35
+ - The "README-refresh enforcement gap — iter subprocess commits can land a `.verifying.md` rename without staging the corresponding Verification Queue row in `docs/problems/README.md`" problem README-refresh-discipline hook (shipped after the initial capture-problem design) blocks every capture commit that does not stage README. The "README-refresh hook conflicts with capture-problem SKILL's deferred-README-refresh contract — hook wins; SKILL needs update OR hook needs carve-out" problem workaround (a `RISK_BYPASS: capture-deferred-readme` trailer) cleared the gate but kept the README transiently stale by design — a contract that always felt half-superseded by the "README-refresh enforcement gap — iter subprocess commits can land a `.verifying.md` rename without staging the corresponding Verification Queue row in `docs/problems/README.md`" problem reality.
36
36
  - Option 2 acknowledges reality: stage the README. The cost is one mechanical render-and-stage primitive (already proven in `/wr-itil:manage-problem`); the capture-time speed distinction from manage-problem comes from the wide-net duplicate grep + AskUserQuestion branches that capture-problem skips, not the README skip.
37
37
  - The `RISK_BYPASS: capture-deferred-readme` trailer is dropped from emission. The allow-list entry in `packages/itil/hooks/lib/readme-refresh-detect.sh::_README_REFRESH_BYPASS_TRAILERS` is retained as inert dead code for adopter compatibility (minimal-change discipline).
38
38
 
39
39
  **Trade-off table (post-amendment)**:
40
40
 
41
- | Surface | manage-problem | capture-problem (post-P199) |
41
+ | Surface | manage-problem | capture-problem (post-the "capture-problem → manage-problem same-session halts at Step 0 reconcile (HALT_ROUTE_RECONCILE on deferred-refresh seam)" problem) |
42
42
  |---------|----------------|------------------------------|
43
43
  | README authoritativeness | Always current at commit boundary | Always current at commit boundary |
44
44
  | Capture-time turn cost | +1-2 turns (regenerate + stage) | +1-2 turns (same primitive) |
@@ -51,14 +51,14 @@ The on-disk ticket inventory remains the source of truth; `/wr-itil:list-problem
51
51
 
52
52
  ### No AskUserQuestion at all
53
53
 
54
- Architect Q4 + JTBD review confirmed: capture-problem is a **mechanical-stage skill** per ADR-044's framework-resolution boundary. Every potentially-interactive decision is framework-mediated:
54
+ Architect Q4 + JTBD review confirmed: capture-problem is a **mechanical-stage skill** per the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule's framework-resolution boundary. Every potentially-interactive decision is framework-mediated:
55
55
 
56
56
  - **Duplicate-check**: false-positive bias > false-negative bias. Mechanical rule: list matches, proceed regardless.
57
57
  - **Priority**: framework-policy default `3 (Medium) — Impact 3 × Likelihood 1`, flagged for re-rate. Re-rating is mandatory before the ticket is worked, so no ticket gets ranked on a wrong default.
58
58
  - **Effort**: framework-policy default `M`, flagged for re-rate. Same re-rating contract as Priority.
59
59
  - **Multi-concern split**: out of scope. The user invoking capture-problem with a multi-concern observation gets one ticket with the full description as the body; they re-route to `/wr-itil:manage-problem` for the structured split.
60
60
 
61
- This mirrors the mechanical-stage carve-out pattern documented in CLAUDE.md (P132 / inverse-P078 trap): when a SKILL contract names a stage as mechanical, do not ask. Per-action consent gates re-ask decisions the user already made and silently undo the load-bearing UX investment.
61
+ This mirrors the mechanical-stage carve-out pattern documented in CLAUDE.md (the "Agents over-ask in interactive sessions — conflating mechanical-stages with user-interactive-stages of multi-stage skill contracts (inverse-)" problem / inverse-the "Problem 078: Assistant does not offer to capture a problem ticket when the user delivers strong-signal correction" problem trap): when a SKILL contract names a stage as mechanical, do not ask. Per-action consent gates re-ask decisions the user already made and silently undo the load-bearing UX investment.
62
62
 
63
63
  ## Edge cases
64
64
 
@@ -78,7 +78,7 @@ This is a degenerate case — real captures carry meaningful first-tokens — bu
78
78
 
79
79
  The next-ID formula uses `git ls-tree origin/main` to read the remote-tracking ref without requiring a fetch. If a parallel session minted the same ID for a different problem and pushed it before this session captures, the local read sees the higher origin ID and increments past it.
80
80
 
81
- If the local session has not fetched recently and origin has captures the local doesn't see, the formula may still collide. The renumber audit log line in Step 7 captures the resolution. P040 incident applies.
81
+ If the local session has not fetched recently and origin has captures the local doesn't see, the formula may still collide. The renumber audit log line in Step 7 captures the resolution. the "Problem 040: work-problems does not fetch origin before starting" problem incident applies.
82
82
 
83
83
  ### Cross-skill marker ordering
84
84
 
@@ -86,9 +86,9 @@ The `/tmp/manage-problem-grep-${SESSION_ID}` create-gate marker is shared betwee
86
86
 
87
87
  This means a session that does `manage-problem` once then `capture-problem` three times has the marker set after the first manage-problem grep, and all three captures land without re-running the grep + mark sequence. capture-problem still runs its own minimal-grep in Step 2 (because the conservative threshold + report-listing is part of the contract), but the marker write is a no-op.
88
88
 
89
- ### P057 staging-trap
89
+ ### the "Problem 057: `git mv` + Edit + `git add` staging-ordering trap drops content edits from the commit" problem staging-trap
90
90
 
91
- Not applicable. capture-problem only Writes a new file; it does not `git mv` an existing one. The P057 rule (re-stage after Edit on a `git mv`-d file) is irrelevant to this skill.
91
+ Not applicable. capture-problem only Writes a new file; it does not `git mv` an existing one. The "Problem 057: `git mv` + Edit + `git add` staging-ordering trap drops content edits from the commit" problem rule (re-stage after Edit on a `git mv`-d file) is irrelevant to this skill.
92
92
 
93
93
  ### Multi-concern descriptions
94
94
 
@@ -108,7 +108,7 @@ Heavyweight intake counterpart. Shares the create-gate marker with capture-probl
108
108
 
109
109
  ### `/wr-itil:work-problems` (AFK orchestrator)
110
110
 
111
- Iter subprocesses can invoke capture-problem to capture sibling-findings without breaking iter cadence. The AFK carve-out in ADR-032 (line 85) excludes the **background-capture** variant from AFK contexts; the **foreground-lightweight-capture** variant introduced by this skill is fine inside iter subprocesses because it has no `Agent(run_in_background: true)` invocation — it's a normal foreground-synchronous skill that happens to do less work than manage-problem.
111
+ Iter subprocesses can invoke capture-problem to capture sibling-findings without breaking iter cadence. The AFK carve-out in the "Governance skill invocation patterns — foreground + background with deferred-question resumption" architecture rule (line 85) excludes the **background-capture** variant from AFK contexts; the **foreground-lightweight-capture** variant introduced by this skill is fine inside iter subprocesses because it has no `Agent(run_in_background: true)` invocation — it's a normal foreground-synchronous skill that happens to do less work than manage-problem.
112
112
 
113
113
  ### `/wr-itil:capture-problem` callers
114
114
 
@@ -116,24 +116,24 @@ The intended invocation surface is `/wr-itil:capture-problem <description>`. The
116
116
 
117
117
  ## Related ADRs
118
118
 
119
- - **ADR-009** — gate-marker-lifecycle (per-session /tmp markers; capture-problem reuses the manage-problem marker).
120
- - **ADR-013** — structured user interaction (Rule 6 fail-safe; capture-problem has no AskUserQuestion branches so Rule 6 is trivially satisfied).
121
- - **ADR-014** — governance skills commit their own work (capture-problem owns its commit).
122
- - **ADR-022** — verification-pending status (out of scope for capture-problem; status transitions live in transition-problem).
123
- - **ADR-031** — problem-ticket directory layout (capture-problem matches current flat-layout production reality; auto-migration is a future ADR-031 follow-up).
124
- - **ADR-032** — governance skill invocation patterns (this skill's parent ADR; foreground-lightweight-capture variant amendment 2026-05-03).
125
- - **ADR-038** — progressive disclosure (SKILL.md + REFERENCE.md split shape).
126
- - **ADR-044** — decision-delegation contract (framework-mediated mechanical-stage carve-outs).
127
- - **ADR-049** — bin/ on PATH (capture-problem reuses existing `wr-itil-reconcile-readme` shim; no new shim).
128
- - **ADR-052** — behavioural-tests-default for skill testing (capture-problem's bats fixtures exercise primitives, not SKILL.md prose).
119
+ - **the "Gate Marker Lifecycle: TTL + Drift, Not Stop-Hook Reset" architecture rule** — gate-marker-lifecycle (per-session /tmp markers; capture-problem reuses the manage-problem marker).
120
+ - **the "Structured User Interaction for Governance-Skill Decisions" architecture rule** — structured user interaction (Rule 6 fail-safe; capture-problem has no AskUserQuestion branches so Rule 6 is trivially satisfied).
121
+ - **the "Governance Skills Commit Their Own Completed Work" architecture rule** — governance skills commit their own work (capture-problem owns its commit).
122
+ - **the "Problem lifecycle — add a Verification Pending status between Known Error and Closed" architecture rule** — verification-pending status (out of scope for capture-problem; status transitions live in transition-problem).
123
+ - **the "Problem-ticket directory layout — per-state subdirectories under `docs/problems/`" architecture rule** — problem-ticket directory layout (capture-problem matches current flat-layout production reality; auto-migration is a future the "Problem-ticket directory layout — per-state subdirectories under `docs/problems/`" architecture rule follow-up).
124
+ - **the "Governance skill invocation patterns — foreground + background with deferred-question resumption" architecture rule** — governance skill invocation patterns (this skill's parent ADR; foreground-lightweight-capture variant amendment 2026-05-03).
125
+ - **the "Progressive disclosure + once-per-session budget for UserPromptSubmit governance prose" architecture rule** — progressive disclosure (SKILL.md + REFERENCE.md split shape).
126
+ - **the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule** — decision-delegation contract (framework-mediated mechanical-stage carve-outs).
127
+ - **the "Plugin-bundled scripts invoked from SKILL.md resolve via `bin/` on `$PATH`" architecture rule** — bin/ on PATH (capture-problem reuses existing `wr-itil-reconcile-readme` shim; no new shim).
128
+ - **the "Behavioural-tests-default for skill testing" architecture rule** — behavioural-tests-default for skill testing (capture-problem's bats fixtures exercise primitives, not SKILL.md prose).
129
129
 
130
130
  ## Related problems
131
131
 
132
- - **P014** — parent / master tracker.
133
- - **P078** — capture-on-correction OFFER; depends on capture-problem.
134
- - **P088** — settled the user-direction-scoped decision: capture-problem + capture-adr are shippable; capture-retro is deferred.
135
- - **P119** — manage-problem create-gate; capture-problem composes with the same marker.
136
- - **P148** — Tickets Deferred retro section (legacy when capture-problem ships).
137
- - **P155** — driver ticket.
138
- - **P156** — sibling capture-adr.
139
- - **P157** — sibling pending-questions-surface hook.
132
+ - **the "Problem 014: No lightweight aside invocation for governance skills (problems, retros, ADRs)" problem** — parent / master tracker.
133
+ - **the "Problem 078: Assistant does not offer to capture a problem ticket when the user delivers strong-signal correction" problem** — capture-on-correction OFFER; depends on capture-problem.
134
+ - **the "Problem 088: run-retro cannot see the full session context when invoked as a subagent, subprocess, or from any non-parent-session surface — 's fix is partially blind" problem** — settled the user-direction-scoped decision: capture-problem + capture-adr are shippable; capture-retro is deferred.
135
+ - **the "Agent bypasses `/wr-itil:manage-problem` Step 2 duplicate-check by writing tickets directly to `docs/problems/`" problem** — manage-problem create-gate; capture-problem composes with the same marker.
136
+ - **the "Agent defers ticket creation to retro summary "Tickets Deferred" section instead of immediately invoking `/wr-itil:manage-problem` — observations could be lost if user is in a rush" problem** — Tickets Deferred retro section (legacy when capture-problem ships).
137
+ - **the "Ship `/wr-itil:capture-problem` skill — lightweight aside-invocation surface for problem capture during foreground work" problem** — driver ticket.
138
+ - **the "Ship `/wr-architect:capture-adr` skill — lightweight aside-invocation surface for ADR capture during foreground work" problem** — sibling capture-adr.
139
+ - **the "Ship pending-questions-surface hook — auto-surface accumulated `outstanding_questions` from `.afk-run-state/outstanding-questions.jsonl` at session start when user returns interactive" problem** — sibling pending-questions-surface hook.