@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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wr-itil:capture-rfc
|
|
3
|
+
description: Draw a problem-traced RFC release row on a story map and attach at least one delivery story. Uses the existing delivery-planning vehicle instead of creating an RFC document.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Grep, Glob, Skill, request_user_input
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from the runtime-neutral skill source. Do not edit. -->
|
|
8
|
+
|
|
9
|
+
> Codex runtime note: use `request_user_input` only where this contract
|
|
10
|
+
> explicitly requires a human decision. Resolve `<itil-plugin-root>` from
|
|
11
|
+
> this installed `SKILL.md`: it is two directories above the skill
|
|
12
|
+
> directory. Run bundled commands from `<itil-plugin-root>/bin/`; do not
|
|
13
|
+
> search the adopter repository or rely on those commands being on `PATH`.
|
|
14
|
+
> Spawn `wr-itil:hang-off-check` with the native Codex subagent tool, wait
|
|
15
|
+
> for it, and close that same agent.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Capture RFC
|
|
19
|
+
|
|
20
|
+
Draw a lightweight RFC release row on an existing story map. An RFC is a planning row, not a standalone document.
|
|
21
|
+
|
|
22
|
+
## Arguments
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
/wr-itil:capture-rfc <problem-trace> <description> [--story-map STORY-MAP-NNN] [--stories STORY-NNN,...] [--fix-time]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`<problem-trace>` is one or more comma-separated `P<NNN>` identifiers. `--fix-time` is retained as a compatibility alias and does not change the row-based workflow.
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
|
|
32
|
+
1. Require every problem trace to resolve under `docs/problems/`. If a trace is missing, stop and direct the caller to `/wr-itil:capture-problem`; never infer or create a problem silently.
|
|
33
|
+
2. Reuse the existing delivery-planning vehicle. Prefer the supplied `--story-map`; otherwise select an approved story map whose journey contains the fix. Never create a duplicate vehicle.
|
|
34
|
+
3. If no existing map, activity, job, or ratified decision can carry the proposed work, brief the missing substance and use `request_user_input`. In unattended work, queue the question and continue with other actionable work. Do not create a row until the direction is supplied.
|
|
35
|
+
4. Allocate the RFC identity mechanically with `<itil-plugin-root>/bin/wr-itil-next-rfc-id`; never scan one directory or reuse a retired identity.
|
|
36
|
+
5. Reuse the ordered stories supplied by `--stories`, or capture the smallest delivery stories needed for the fix. Every story must name the driving problem trace.
|
|
37
|
+
6. Run `<itil-plugin-root>/bin/wr-itil-story-map add-band` to add one release row and `<itil-plugin-root>/bin/wr-itil-story-map add-card` for each story. The row must include the RFC identity, description, problem trace, and ordered story identifiers.
|
|
38
|
+
7. Render the story map, update the driving problem's RFC references, and run the relevant reconciliation checks.
|
|
39
|
+
8. Commit the map, stories, problem references, and regenerated render together in one focused commit.
|
|
40
|
+
|
|
41
|
+
## Prohibitions
|
|
42
|
+
|
|
43
|
+
- Never create a new file under `docs/rfcs/`.
|
|
44
|
+
- Never amend a ratified decision to introduce new substance. Create a proposed superseding decision and obtain ratification first.
|
|
45
|
+
- Never treat `--fix-time` as permission to bypass the story map, story, or decision gates.
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wr-itil:capture-story
|
|
3
|
+
description: Lightweight story-capture skill for aside-invocation during foreground work — mandatory leading problem-trace AND JTBD-trace per the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule I6 + I9 invariants, mandatory `--story-map` trace (I8 enforced AT CAPTURE per the "Story-map membership and story-content completeness are enforced at capture" architecture rule, refuse-and-route if absent) + optional `--rfc` (I7 at accepted) + real user-value + >=1 acceptance criterion at capture (I10 content subset / the "Story-map membership and story-content completeness are enforced at capture" architecture rule), skeleton story file at `docs/stories/draft/STORY-NNN-<slug>.md`, single commit per capture, no inline README refresh. Defers full INVEST shape + acceptance transition to /wr-itil:manage-story. Use when the user (or agent) wants to capture a story quickly with clear problem + JTBD anchoring. For full lifecycle management, use /wr-itil:manage-story.
|
|
4
|
+
allowed-tools: Read, Write, Edit, Bash, Grep, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<!-- Generated from the runtime-neutral skill source. Do not edit. -->
|
|
8
|
+
|
|
9
|
+
> Codex runtime note: use `request_user_input` only where this contract
|
|
10
|
+
> explicitly requires a human decision. Resolve `<itil-plugin-root>` from
|
|
11
|
+
> this installed `SKILL.md`: it is two directories above the skill
|
|
12
|
+
> directory. Run bundled commands from `<itil-plugin-root>/bin/`; do not
|
|
13
|
+
> search the adopter repository or rely on those commands being on `PATH`.
|
|
14
|
+
> Spawn `wr-itil:hang-off-check` with the native Codex subagent tool, wait
|
|
15
|
+
> for it, and close that same agent.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Capture Story Skill
|
|
19
|
+
|
|
20
|
+
Capture an INVEST-shaped story ticket quickly during foreground work. Lightweight aside-invocation surface that complements the heavyweight `/wr-itil:manage-story` flow. Mirrors `/wr-itil:capture-rfc` shape per the "Governance skill invocation patterns — foreground + background with deferred-question resumption" architecture rule lightweight + heavyweight skill split, extended for the story tier's stricter trace-mandate (problem, JTBD, AND story-map at capture — I8 enforced at capture per the "Story-map membership and story-content completeness are enforced at capture" architecture rule; RFC deferred to accepted).
|
|
21
|
+
|
|
22
|
+
This skill is one half of the capture-then-manage story framework introduced by the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule (Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology, accepted 2026-05-05; Phase 2 amendment 2026-05-12 introducing the story tier). The other half is `/wr-itil:manage-story` (heavyweight intake + INVEST-gated lifecycle management).
|
|
23
|
+
|
|
24
|
+
**Related JTBDs**: the ": Decompose a Fix Into Coordinated Changes" user outcome (primary — Decompose a Fix Into Coordinated Changes; story is the INVEST-shaped sub-workstream entity the ": Decompose a Fix Into Coordinated Changes" user outcome line 20 names), the ": Enforce Governance Without Slowing Down" user outcome (extended scope — story-level governance via INVEST gates at acceptance + auto-transition on RFC-closes + acceptance-criteria all-ticked), the "Extend the Suite with New Plugins" user outcome (atomic-fix-adopter friction guard — capture-story remains opt-in; atomic-RFC fallback per the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule line 262 means atomic adopters never invoke capture-story).
|
|
25
|
+
|
|
26
|
+
## When to invoke
|
|
27
|
+
|
|
28
|
+
- **Slicing an RFC into INVEST-shaped sub-workstreams**: agent / user has captured an RFC and is now decomposing its scope into the ordered `stories:` array per the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule's working-the-problem flow (line 300-320). Each slice on a story-map's backbone → ribs → slices grid becomes one story.
|
|
29
|
+
- **Placing a story on its map at capture**: per the "Story-map membership and story-content completeness are enforced at capture" architecture rule a story is born on a story map — `--story-map` is MANDATORY at capture (I8 refuse-and-route if absent). `--rfc` stays optional (I7 enforces at the `draft → accepted` transition); a draft story may exist with NO `rfcs:` until the design firms up, but NEVER with an empty `story-maps:`.
|
|
30
|
+
- **Retrospective bootstrap migration** (Slice 15 of the "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): extracting existing slices from `docs/plans/170-rfc-framework-story-map.md` into individual story files. The bootstrap-exempt marker (the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule A4 / the "`@windyroad/*` plugin / skill / agent / hook maturity taxonomy" architecture rule) permits the retrospective sequence to bypass the capture-time I8 hard-block for migration stories ONLY; `rfcs:` still fills in before the manage-story <NNN> accepted gate (I7).
|
|
31
|
+
- **Forward dogfood capture**: a new story for in-flight work, captured at the start of implementation, runs to `done` via `Refs: STORY-NNN` trailer detection + acceptance-criteria all-ticked.
|
|
32
|
+
|
|
33
|
+
**Use `/wr-itil:manage-story` instead** when:
|
|
34
|
+
- The work is advancing an existing story through its lifecycle (draft → accepted → in-progress → done).
|
|
35
|
+
- The user wants the full INVEST intake flow with structured value-statement + acceptance-criteria + effort-estimation prompts.
|
|
36
|
+
- The story needs the I10 INVEST shape behavioural test to fire at accepted.
|
|
37
|
+
|
|
38
|
+
## Argument grammar
|
|
39
|
+
|
|
40
|
+
**Positional (both mandatory)**: `<problem-trace> <jtbd-trace> <description>` where:
|
|
41
|
+
- `<problem-trace>` is `P<NNN>` or comma-separated `P<NNN>,P<NNN>,...` (no spaces inside the trace; multiple problems comma-separated).
|
|
42
|
+
- `<jtbd-trace>` is `JTBD-<NNN>` or comma-separated `JTBD-<NNN>,JTBD-<NNN>,...`.
|
|
43
|
+
|
|
44
|
+
**Optional flags** (any order, before or after positional args):
|
|
45
|
+
- `--rfc RFC-<NNN>[,RFC-<NNN>,...]` — RFC(s) this story will be referenced by once design firms up.
|
|
46
|
+
- `--story-map STORY-MAP-<NNN>[,STORY-MAP-<NNN>,...]` — story-map(s) this story will be placed on once design firms up.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
/wr-itil:capture-story the "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 the ": Decompose a Fix Into Coordinated Changes" user outcome Build /wr-itil:capture-story-map skill scaffold
|
|
50
|
+
/wr-itil:capture-story the "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 the ": Decompose a Fix Into Coordinated Changes" user outcome,the ": Enforce Governance Without Slowing Down" user outcome --rfc the ": docs/problems/ flat layout migration — per-state subdirs + adopter auto-migration" release design Ship hook exemption globs across 4 enforce-edit hooks
|
|
51
|
+
/wr-itil:capture-story the "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 the ": Decompose a Fix Into Coordinated Changes" user outcome --story-map the "RFC framework bootstrap journey map" journey map --rfc the ": docs/problems/ flat layout migration — per-state subdirs + adopter auto-migration" release design Extract Slice 5 T7 shared-migration-routine into STORY-NNN
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule § Skills line 291 phrasing footnote**: the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule names "Mandatory: ≥1 problem trace, ≥1 JTBD trace" verbatim. This skill uses the **positional** form (no `--problem` / `--jtbd` prefix on the mandatory pair) to match the lightweight aside-invocation grammar of `capture-rfc` (per the "Governance skill invocation patterns — foreground + background with deferred-question resumption" architecture rule) and because Codex skill arguments don't carry a proper CLI flag parser. The optional `--rfc` / `--story-map` flags exist BECAUSE they are optional — fully positional would require sentinel values for absent traces. The hard-block intent (the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule § Confirmation criterion implied by I6 + I9 — capture fails without both mandatory traces) is preserved verbatim — only the surface syntax differs.
|
|
55
|
+
|
|
56
|
+
## Rule 6 audit (per the "Governance skill invocation patterns — foreground + background with deferred-question resumption" architecture rule + the "Structured User Interaction for Governance-Skill Decisions" architecture rule + the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule)
|
|
57
|
+
|
|
58
|
+
This skill has **two direction-setting request_user_input fires** (problem-trace AND JTBD-trace, when arguments are non-empty but malformed) and **one optional taste request_user_input** (title/scope summary, silent-default if unavailable). Every other potentially-interactive decision is framework-mediated per the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule:
|
|
59
|
+
|
|
60
|
+
| Decision | Resolution | Authority class |
|
|
61
|
+
|----------|-----------|-----------------|
|
|
62
|
+
| Problem trace presence | I6 hard-block — refuse on missing trace; emit deny log + halt-with-stderr-directive | direction-setting |
|
|
63
|
+
| Problem trace validation | Mechanical: each `P<NNN>` must exist in `docs/problems/`. Open / Known Error / Verifying = pass; Closed / Parked = advisory-warn but proceed (bounded-escape carve-out — see Step 2) | silent-mechanical |
|
|
64
|
+
| JTBD trace presence | I9 hard-block — refuse on missing JTBD trace; emit deny log + halt-with-stderr-directive | direction-setting |
|
|
65
|
+
| JTBD trace validation | Mechanical: each `JTBD-<NNN>` must resolve to a file under `docs/jtbd/<persona>/JTBD-<NNN>-*.md` (any lifecycle status) | silent-mechanical |
|
|
66
|
+
| Optional `--rfc` trace validation | Mechanical: each provided `RFC-<NNN>` must resolve either to a legacy file under `docs/rfcs/` or to a release row returned by `<itil-plugin-root>/bin/wr-itil-story-map-query find-rfc`; advisory-warn on `proposed` / `verifying` legacy files; missing from both surfaces = hard-block on the provided arg | silent-mechanical |
|
|
67
|
+
| Optional `--story-map` trace validation | Same mechanical pattern against `docs/story-maps/*/STORY-MAP-*.html` (HTML data-attribute existence check); advisory-warn on `draft` / `in-progress` story-maps | silent-mechanical |
|
|
68
|
+
| STORY ID allocation | Mechanical: `max(local, origin) + 1`, three-digit padded; enumerates `docs/stories/*/STORY-*.md` + `git ls-tree origin/main docs/stories/`. the "AFK orchestrator preflight: get the repo into a clean state before starting" architecture rule collision-guard inline per Slice 3 design review architect approval (finding 3 option a — inline-only path) | silent-mechanical |
|
|
69
|
+
| Title kebab-slug | Mechanical: first 8-10 non-stopword tokens of description | silent-mechanical |
|
|
70
|
+
| Title prose / scope summary refinement | Optional `request_user_input`; silent-default to derived form when unavailable | taste |
|
|
71
|
+
| File write / frontmatter | Mechanical: shape per `docs/stories/README.md` § Frontmatter shape + the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule lines 220-228 | silent-mechanical |
|
|
72
|
+
| Single commit | Mechanical: `feat(itil): capture STORY-<NNN> <title>` + `Refs: STORY-<NNN>` trailer | silent-mechanical |
|
|
73
|
+
| Empty arguments | Halt-with-stderr-directive: print "capture-story requires `<problem-trace> <jtbd-trace> <description>` — invoke /wr-itil:manage-story instead for the full intake flow" and exit. AFK orchestrators MUST NOT invoke capture-story with empty arguments. | n/a |
|
|
74
|
+
|
|
75
|
+
Per the "Structured User Interaction for Governance-Skill Decisions" architecture rule Rule 6 fail-safe + the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule + 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: every silent-mechanical branch above resolves without user input, so AFK and interactive contexts behave identically modulo the optional taste prompt.
|
|
76
|
+
|
|
77
|
+
## Steps
|
|
78
|
+
|
|
79
|
+
### 0. Preflight (Phase 2 cross-directory)
|
|
80
|
+
|
|
81
|
+
This skill's preflight uses `<itil-plugin-root>/bin/wr-itil-reconcile-readme docs/problems` (the existing problems-README reconciliation contract per the "`docs/problems/README.md` drifts from filesystem truth across sessions despite (refresh-on-create) and (refresh-on-transition) both Closed" problem). Sibling reconcile-stories + reconcile-story-maps scripts land in Slice 5 + Slice 9 of the "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 — once those ship, swap this preflight to call all three reconciliations (cross-tier integrity holds at all three surfaces).
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
<itil-plugin-root>/bin/wr-itil-reconcile-readme docs/problems > /tmp/wr-itil-drift-$$.txt
|
|
85
|
+
reconcile_exit=$?
|
|
86
|
+
if [ "$reconcile_exit" -eq 1 ]; then
|
|
87
|
+
<itil-plugin-root>/bin/wr-itil-classify-readme-drift /tmp/wr-itil-drift-$$.txt docs/problems
|
|
88
|
+
classify_exit=$?
|
|
89
|
+
rm -f /tmp/wr-itil-drift-$$.txt
|
|
90
|
+
# classify_exit 0 (INLINE_REFRESH): proceed (no inline refresh in this skill).
|
|
91
|
+
# classify_exit 1 (HALT_ROUTE_RECONCILE): halt; invoke /wr-itil:reconcile-readme.
|
|
92
|
+
# classify_exit 2 (parse error): conservative halt-and-route.
|
|
93
|
+
fi
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 1. Parse arguments
|
|
97
|
+
|
|
98
|
+
Tokenise the argument string. Optional flags (`--rfc <ids>`, `--story-map <ids>`) may appear in any position. The remaining positional tokens are `<problem-trace> <jtbd-trace> <description>` in that order.
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Pseudo:
|
|
102
|
+
rfc_trace=""
|
|
103
|
+
story_map_trace=""
|
|
104
|
+
positional=()
|
|
105
|
+
while [ $# -gt 0 ]; do
|
|
106
|
+
case "$1" in
|
|
107
|
+
--rfc) rfc_trace="$2"; shift 2 ;;
|
|
108
|
+
--story-map) story_map_trace="$2"; shift 2 ;;
|
|
109
|
+
*) positional+=("$1"); shift ;;
|
|
110
|
+
esac
|
|
111
|
+
done
|
|
112
|
+
problem_trace="${positional[0]}"
|
|
113
|
+
jtbd_trace="${positional[1]}"
|
|
114
|
+
description="${positional[*]:2}"
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
If `$problem_trace` does not match `^P[0-9]{3}(,P[0-9]{3})*$` (regex), this is an I6 violation — go to Step 2's deny path. If `$jtbd_trace` does not match `^JTBD-[0-9]{3}(,JTBD-[0-9]{3})*$`, this is an I9 violation. If `$description` is empty, halt with the empty-arguments directive from the Rule 6 audit table.
|
|
118
|
+
|
|
119
|
+
Derive a kebab-case title slug from the first 8-10 non-stopword tokens of `$description` (matching `capture-rfc` slug derivation).
|
|
120
|
+
|
|
121
|
+
### 2. Validate problem trace + I6 hard-block enforcement
|
|
122
|
+
|
|
123
|
+
For each `P<NNN>` in the trace list:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# Dual-tolerant ticket discovery (the ": docs/problems/ flat layout migration — per-state subdirs + adopter auto-migration" release design migration window):
|
|
127
|
+
# BOTH flat `docs/problems/<NNN>-<title>.<state>.md` AND per-state
|
|
128
|
+
# subdir `docs/problems/<state>/<NNN>-<title>.md` layouts.
|
|
129
|
+
trace_files=$(ls docs/problems/<NNN>-*.md docs/problems/*/<NNN>-*.md 2>/dev/null)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**I6 hard-block (per the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule line 248)**:
|
|
133
|
+
|
|
134
|
+
- **Trace token absent OR malformed**: emit deny log entry + halt with stderr directive:
|
|
135
|
+
```bash
|
|
136
|
+
mkdir -p logs
|
|
137
|
+
printf '{"timestamp":"%s","session_id":"%s","reason":"%s","args":%s}\n' \
|
|
138
|
+
"$(date -u +%Y-%m-%dT%H:%M:%SZ)" "$(get_current_session_id 2>/dev/null || echo unknown)" \
|
|
139
|
+
"<missing|malformed|unresolved>-trace" \
|
|
140
|
+
"$(printf '%s' "$ARGUMENTS" | jq -Rs .)" \
|
|
141
|
+
>> logs/story-capture-denials.jsonl
|
|
142
|
+
echo "/wr-itil:capture-story requires a leading problem-trace argument (P<NNN> or P<NNN>,P<NNN>...). Open the driving problem via /wr-itil:capture-problem first, then re-invoke capture-story with the trace." >&2
|
|
143
|
+
exit 1
|
|
144
|
+
```
|
|
145
|
+
The deny log feeds the trace-violation-rate reassessment criterion (sibling to RFC's `logs/rfc-capture-denials.jsonl`).
|
|
146
|
+
|
|
147
|
+
- **Each `P<NNN>` must resolve to a file in `docs/problems/`**. If any does not, emit deny log entry with `reason: unresolved-trace` + the unresolved IDs, halt, exit 1.
|
|
148
|
+
|
|
149
|
+
**Bounded-escape carve-out for Closed/Verifying/Parked traces**: classify by suffix or path; `.open.md` / `.known-error.md` (or `open/` / `known-error/` subdirs) pass silently; `.verifying.md` (or `verifying/` subdir) passes with advisory note; `.closed.md` (or `closed/` subdir) and `.parked.md` (or `parked/` subdir) pass with advisory-warn (story may be a retrospective extraction).
|
|
150
|
+
|
|
151
|
+
### 2.5. Validate JTBD trace + I9 hard-block enforcement
|
|
152
|
+
|
|
153
|
+
For each `JTBD-<NNN>` in the JTBD trace list:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
jtbd_file=$(ls docs/jtbd/*/JTBD-<NNN>-*.md 2>/dev/null | head -1)
|
|
157
|
+
[ -z "$jtbd_file" ] && unresolved_jtbds+=("JTBD-<NNN>")
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
**I9 hard-block (per the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule line 251)**:
|
|
161
|
+
|
|
162
|
+
- **JTBD trace token absent OR malformed**: emit deny log entry + halt with directive: `/wr-itil:capture-story requires a JTBD trace argument (JTBD-<NNN> or JTBD-<NNN>,JTBD-<NNN>...). Author the driving JTBD via /wr-jtbd:update-guide first, then re-invoke capture-story.`
|
|
163
|
+
- **Each `JTBD-<NNN>` must resolve to a file in `docs/jtbd/`**. If any does not, emit deny log with `reason: unresolved-jtbd-trace`, halt, exit 1.
|
|
164
|
+
|
|
165
|
+
JTBD lifecycle states (`.proposed.md` / `.accepted.md` / `.archived.md`) all pass silently — a story may anchor on a proposed JTBD per the dogfood pattern (Phase 2 itself is being captured against proposed JTBDs).
|
|
166
|
+
|
|
167
|
+
### 2.6. Validate story-map trace (I8 hard-block AT CAPTURE per the "Story-map membership and story-content completeness are enforced at capture" architecture rule) + optional `--rfc`
|
|
168
|
+
|
|
169
|
+
**I8 story-map membership is enforced at CAPTURE (the "Story-map membership and story-content completeness are enforced at capture" architecture rule) — a story is born on a map.** `--story-map` is MANDATORY:
|
|
170
|
+
|
|
171
|
+
- **`--story-map` absent**: hard-block with **refuse-and-route** (parity with the I6/I9 mandatory-trace gates). Do NOT scaffold `story-maps: []`. Emit the deny log (`reason: missing-story-map-trace`) and halt with:
|
|
172
|
+
> `/wr-itil:capture-story` requires a story-map trace (the "Story-map membership and story-content completeness are enforced at capture" architecture rule / I8): every story is born on a story map. Create a map first via `/wr-itil:capture-story-map` (or extend one via `/wr-itil:manage-story-map`), then re-invoke capture-story with `--story-map STORY-MAP-<NNN>`.
|
|
173
|
+
|
|
174
|
+
AFK orchestrators author the map first (born `"humanOversight": "unconfirmed"` in its data island per the "Story maps render from JSON through a canonical template" architecture rule, drained later), then capture the story onto it — nothing halts silently; the map is a prerequisite step.
|
|
175
|
+
- **`--story-map` present**: for each `STORY-MAP-<NNN>`, existence check `ls docs/story-maps/*/STORY-MAP-<NNN>-*.html 2>/dev/null`. Malformed or unresolved → hard-block (`reason: unresolved-story-map-trace`). Lifecycle advisory-warn on `draft` / `in-progress` maps; pass silently on `accepted` / `completed`.
|
|
176
|
+
- **Bootstrap exemption (the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule A4 / the "`@windyroad/*` plugin / skill / agent / hook maturity taxonomy" architecture rule)**: a capture carrying the inline `<!-- bootstrap-exempt: ... -->` marker bypasses the I8 hard-block for migration stories ONLY. A **non-bootstrap** capture carrying the marker is rejected (the marker is not a general capture-time escape hatch — behavioural test asserts).
|
|
177
|
+
|
|
178
|
+
`--rfc` stays **OPTIONAL** at capture (I7 enforces at the `accepted` transition — a story can legitimately precede its RFC firming up):
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
shopt -s nullglob
|
|
182
|
+
rfc_files=(docs/rfcs/RFC-<NNN>-*.md)
|
|
183
|
+
rfc_rows=$(<itil-plugin-root>/bin/wr-itil-story-map-query find-rfc RFC-<NNN>)
|
|
184
|
+
[ ${#rfc_files[@]} -eq 0 ] && [ "$rfc_rows" = "[]" ] && unresolved_rfcs+=("RFC-<NNN>")
|
|
185
|
+
shopt -u nullglob
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
- `--rfc` token absent: skip (the optional path). Present-but-malformed OR resolves to neither a legacy RFC file nor a release row: hard-block (`reason: unresolved-rfc-trace`). the "A release row is the RFC, and the map is the approval surface" architecture rule makes the row the normal RFC surface; a standalone file is retained only for existing RFCs.
|
|
189
|
+
|
|
190
|
+
### 3. Compute next STORY ID
|
|
191
|
+
|
|
192
|
+
Inline `max(local, origin) + 1` formula (per Slice 3 design review architect finding 3 option a — inline-only path; no separate `check-id-collision.sh` script per capture-rfc / capture-problem precedent):
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
local_max=$(ls docs/stories/*/STORY-*.md 2>/dev/null | sed 's|.*/STORY-||;s|-.*||' | grep -oE '^[0-9]+' | sort -n | tail -1)
|
|
196
|
+
origin_max=$(git ls-tree -r --name-only origin/main docs/stories/ 2>/dev/null | sed 's|.*/STORY-||;s|-.*||' | grep -oE '^[0-9]+' | sort -n | tail -1)
|
|
197
|
+
next=$(printf '%03d' $(( 10#$(echo -e "${local_max:-0}\n${origin_max:-0}" | sort -n | tail -1) + 1 )))
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Log the renumber decision in the operation report if origin and local diverged. The `git ls-tree -r` recursive flag enumerates the per-state subdir layout — `docs/stories/draft/`, `docs/stories/accepted/`, etc.
|
|
201
|
+
|
|
202
|
+
### 4. Optional taste prompt for title / scope summary
|
|
203
|
+
|
|
204
|
+
If interactive (request_user_input available) AND the description is short enough that the derived title slug may not capture intent, fire one `request_user_input` with `header: "Story title"` offering: (a) the derived kebab-slug as default, (b) "edit". This is **taste** authority per the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule — silent-default to (a) when request_user_input is unavailable.
|
|
205
|
+
|
|
206
|
+
### 5. Write the story file
|
|
207
|
+
|
|
208
|
+
**File path**: `docs/stories/draft/STORY-<NNN>-<kebab-title>.md`
|
|
209
|
+
|
|
210
|
+
**Template** (mirrors `docs/stories/README.md` § Story frontmatter + body structure):
|
|
211
|
+
|
|
212
|
+
```markdown
|
|
213
|
+
---
|
|
214
|
+
status: draft
|
|
215
|
+
story-id: <kebab-slug>
|
|
216
|
+
reported: <YYYY-MM-DD>
|
|
217
|
+
decision-makers: [<git config user.name>]
|
|
218
|
+
problems: [P<NNN>, P<NNN>, ...]
|
|
219
|
+
jtbd: [JTBD-<NNN>, JTBD-<NNN>, ...]
|
|
220
|
+
rfcs: [<RFC-<NNN>, ...> or empty]
|
|
221
|
+
story-maps: [<STORY-MAP-<NNN>, ...>] # >=1 REQUIRED at capture (I8 / the "Story-map membership and story-content completeness are enforced at capture" architecture rule)
|
|
222
|
+
estimated-effort: <S|M|L|XL — derived at capture per the ": Cost-based WSJF effort — capture time + cost actuals, tally per ticket, retro-driven RMS calibration (tally-first)" architecture rule (real best-effort value, no deferral marker)>
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
<!-- NO `human-oversight:` field, and none of its siblings (the "A release row is the RFC, and the map is the approval surface" architecture rule). A story
|
|
226
|
+
carries no oversight marker: approval is its story map's, derived from the
|
|
227
|
+
`story-maps:` field above. Writing one here creates a second approval
|
|
228
|
+
surface that `story_is_approved` deliberately ignores, so it would be
|
|
229
|
+
inert as well as wrong. -->
|
|
230
|
+
|
|
231
|
+
<!-- Frontmatter `status:` is the ONLY place a story's lifecycle state lives.
|
|
232
|
+
Do NOT add a `**Status**:` body line here. It used to mirror the
|
|
233
|
+
frontmatter, and because the oversight fingerprint excludes the frontmatter
|
|
234
|
+
key but hashed the body copy, every accept transition drifted the story's
|
|
235
|
+
own hash — so a story the maintainer had just ratified read as unratified
|
|
236
|
+
and the no-implement gate denied its own implementing commit. Maintainer
|
|
237
|
+
direction 2026-07-29 removed the mirror rather than adding a fourth
|
|
238
|
+
normaliser rule for it (the "Oversight hash treats the `**Status**:` body mirror as substance, so an accept transition self-invalidates its own ratification" problem / the "Story maps and stories carry a drift-invalidated human-oversight marker" architecture rule amendment). -->
|
|
239
|
+
|
|
240
|
+
# STORY-<NNN>: <Title>
|
|
241
|
+
|
|
242
|
+
**Reported**: <YYYY-MM-DD>
|
|
243
|
+
**Problems**: <P<NNN> [, P<NNN>, ...]>
|
|
244
|
+
**JTBD**: <JTBD-<NNN> [, ...]>
|
|
245
|
+
**RFCs**: <RFC-<NNN> [, ...]> or (none — populate at accepted transition per I7)
|
|
246
|
+
**Story Maps**: <STORY-MAP-<NNN> [, ...]> (>=1 required at capture — I8 / the "Story-map membership and story-content completeness are enforced at capture" architecture rule)
|
|
247
|
+
**Estimated effort**: <S|M|L|XL> — derived at capture as a real best-effort value (the "Repo conflates a "named re-entry point" with a self-firing cadence — deferrals not transitively reachable from an automatic trigger rot" problem / the "Governance skill invocation patterns — foreground + background with deferred-question resumption" architecture rule amendment 2026-06-24; the ": Cost-based WSJF effort — capture time + cost actuals, tally per ticket, retro-driven RMS calibration (tally-first)" architecture rule silent-derivation). NO `deferred` default and no "not estimated" marker — those are deferrals (user correction 2026-06-24). Confirmed/refined at the accepted transition per I10 INVEST Estimable.
|
|
248
|
+
|
|
249
|
+
## User value (required, INVEST Valuable)
|
|
250
|
+
|
|
251
|
+
<REQUIRED at capture (I10 Valuable subset / the "Story-map membership and story-content completeness are enforced at capture" architecture rule): a real one-paragraph value-first user-facing statement — NOT a placeholder. "In order to <value>, as a <persona>, I want <capability>.">
|
|
252
|
+
|
|
253
|
+
## Acceptance criteria (accepted-gate, INVEST Testable)
|
|
254
|
+
|
|
255
|
+
- [ ] <REQUIRED at capture (I10 Testable subset / the "Story-map membership and story-content completeness are enforced at capture" architecture rule): >=1 real observable behavioural acceptance criterion — NOT a placeholder>
|
|
256
|
+
|
|
257
|
+
## Driving problem trace (required — I6 invariant)
|
|
258
|
+
|
|
259
|
+
<description from arguments — one-line summary linking the story scope to the problem's symptom or RCA finding for each driving problem>
|
|
260
|
+
|
|
261
|
+
## JTBD trace (required — I9 invariant)
|
|
262
|
+
|
|
263
|
+
<one-line summary linking each JTBD-<NNN> to the persona-job's desired outcome that this story serves>
|
|
264
|
+
|
|
265
|
+
## Implementation notes (optional)
|
|
266
|
+
|
|
267
|
+
(deferred — populate at /wr-itil:manage-story accepted transition or during implementation)
|
|
268
|
+
|
|
269
|
+
## Dependencies
|
|
270
|
+
|
|
271
|
+
- **Blocks**: (none — populate at /wr-itil:manage-story if applicable)
|
|
272
|
+
- **Blocked by**: (none — populate at /wr-itil:manage-story; Phase 2 I-invariant prohibits Blocked-by references to unaccepted stories at acceptance time per INVEST Independent)
|
|
273
|
+
|
|
274
|
+
## Related
|
|
275
|
+
|
|
276
|
+
(captured via /wr-itil:capture-story; expand at next /wr-itil:manage-story invocation)
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Born with no oversight field (the "A release row is the RFC, and the map is the approval surface" architecture rule).** A new story carries no `human-oversight:` and no `oversight-hash:`. Its approval is derived from the maps in its `story-maps:` field: approved when every one of them is ratified, never approved when it names none. Until then `<itil-plugin-root>/bin/wr-itil-detect-unratified-stories-maps` surfaces it and an RFC may not reference it (`<itil-plugin-root>/bin/wr-itil-check-rfc-stories-ratified`). Do NOT write an oversight field onto a story — `<itil-plugin-root>/bin/wr-itil-mark-story-oversight-confirmed` refuses a story path, and `story_is_approved` ignores any field left behind, so a hand-written one would be wrong AND inert. **Adding a story to its map does NOT re-open the map's ratification** — rows and cards sit outside the fingerprint basis, which is what removed the deadlock the "An AFK loop may accept and implement a story that only decomposes already-ratified substance" architecture rule existed to work around.
|
|
280
|
+
|
|
281
|
+
The deferred-section pattern matches `capture-rfc`'s placeholder approach — the captured story is intentionally minimal; full INVEST shape lands at the manage-story accepted-transition step.
|
|
282
|
+
|
|
283
|
+
### 6. Single commit — `## Stories` reverse-trace refresh; no stories README refresh
|
|
284
|
+
|
|
285
|
+
**Stage list**: the new story file PLUS each driving problem ticket file (refresh `## Stories` reverse-trace section) PLUS each driving JTBD file (refresh `## Stories` reverse-trace section) PLUS each legacy driving RFC file IF `--rfc` resolved to one. A row-backed RFC has no separate reverse-trace document; its card on the story map is the reverse trace. **Do NOT** stage `docs/stories/README.md` (deferred). **Do NOT** stage any story-map HTML files — story-maps are spatially-authored HTML; new stories must be placed on the relevant map manually via `/wr-itil:manage-story-map`. Capture-story emits an advisory stderr line naming the unplaced-on-map state.
|
|
286
|
+
|
|
287
|
+
The reverse-trace refresh on driving artefacts IS in-commit per the "Governance Skills Commit Their Own Completed Work" architecture rule single-commit grain — the cross-tier `## Stories` table on a problem / JTBD / RFC must stay current the moment a new story traces it. The same justification as capture-rfc's inline `## RFCs` refresh applies.
|
|
288
|
+
|
|
289
|
+
For each problem ID in `$problem_trace`:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
for pid_token in $(echo "$problem_trace" | tr ',' ' '); do
|
|
293
|
+
pid_num="${pid_token#P}"
|
|
294
|
+
# Dual-tolerant ticket discovery (the ": docs/problems/ flat layout migration — per-state subdirs + adopter auto-migration" release design migration window).
|
|
295
|
+
problem_file=$(ls docs/problems/${pid_num}-*.md docs/problems/*/${pid_num}-*.md 2>/dev/null | head -1)
|
|
296
|
+
[ -z "$problem_file" ] && continue
|
|
297
|
+
<itil-plugin-root>/bin/wr-itil-update-problem-references-section "$problem_file" "Stories"
|
|
298
|
+
git add "$problem_file"
|
|
299
|
+
done
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Same shape for each JTBD in `$jtbd_trace`:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
for jid_token in $(echo "$jtbd_trace" | tr ',' ' '); do
|
|
306
|
+
jid_num="${jid_token#JTBD-}"
|
|
307
|
+
jtbd_file=$(ls docs/jtbd/*/JTBD-${jid_num}-*.md 2>/dev/null | head -1)
|
|
308
|
+
[ -z "$jtbd_file" ] && continue
|
|
309
|
+
<itil-plugin-root>/bin/wr-itil-update-jtbd-references-section "$jtbd_file" "Stories"
|
|
310
|
+
git add "$jtbd_file"
|
|
311
|
+
done
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
Same shape for each RFC in `$rfc_trace` (only if non-empty):
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
for rid_token in $(echo "$rfc_trace" | tr ',' ' '); do
|
|
318
|
+
[ -z "$rid_token" ] && continue
|
|
319
|
+
rfc_file=$(ls docs/rfcs/${rid_token}-*.md 2>/dev/null | head -1)
|
|
320
|
+
[ -z "$rfc_file" ] && continue
|
|
321
|
+
<itil-plugin-root>/bin/wr-itil-update-rfc-references-section "$rfc_file" "Stories"
|
|
322
|
+
git add "$rfc_file"
|
|
323
|
+
done
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
The helpers (`update-problem-references-section.sh`, `update-jtbd-references-section.sh`, `update-rfc-references-section.sh`) all support `"Stories"` as a section-name token per Slice 2a/2b verified lookup tables. Each helper is idempotent: a no-op section is a no-op stage.
|
|
327
|
+
|
|
328
|
+
Stage the new story file:
|
|
329
|
+
|
|
330
|
+
```bash
|
|
331
|
+
git add docs/stories/draft/STORY-<NNN>-<slug>.md
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
Satisfy the commit gate per the "Governance Skills Commit Their Own Completed Work" architecture rule:
|
|
335
|
+
|
|
336
|
+
- **Primary**: delegate to subagent type `wr-risk-scorer:pipeline` via the native Codex subagent tool.
|
|
337
|
+
- **Fallback**: invoke `/wr-risk-scorer:assess-release` via the installed skill invocation when the subagent type is unavailable.
|
|
338
|
+
|
|
339
|
+
Commit message:
|
|
340
|
+
|
|
341
|
+
```
|
|
342
|
+
feat(itil): capture STORY-<NNN> <title>
|
|
343
|
+
|
|
344
|
+
Refs: STORY-<NNN>
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
The `capture` verb mirrors `capture-rfc`'s audit signal (lightweight aside path vs. heavyweight `manage-story` intake). The single `Refs: STORY-<NNN>` trailer is the universal story-trailer vocabulary per the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule line 307 + amendment 2026-05-10 nitpick N2 — capture commits and implementation commits both use `Refs:`; the manage-story skill's `draft → in-progress` auto-transition trigger discriminates by "is this the capture commit (subject starts with `capture`) or a subsequent commit" rather than by trailer verb.
|
|
348
|
+
|
|
349
|
+
### 7. Report
|
|
350
|
+
|
|
351
|
+
After the commit, report:
|
|
352
|
+
|
|
353
|
+
- The new story file path and ID.
|
|
354
|
+
- The traced problems with their lifecycle states.
|
|
355
|
+
- The traced JTBDs with their lifecycle states.
|
|
356
|
+
- Any traced RFCs / story-maps if provided, with lifecycle-state advisory warnings.
|
|
357
|
+
- Any unplaced-on-story-map advisory (always emit when `--story-map STORY-MAP-<NNN>` was provided — the HTML placement is manual per architect finding 2 on Slice 7).
|
|
358
|
+
- Trailing pointer: `Run /wr-itil:manage-story <STORY-<NNN>> next to populate User value + Acceptance criteria + Estimated effort, then advance draft → accepted; refresh docs/stories/README.md.`
|
|
359
|
+
|
|
360
|
+
The trailing pointer is **not optional** — it is the user-visible signal that the story is intentionally skeleton-only and how to advance it.
|
|
361
|
+
|
|
362
|
+
## Composition with manage-story
|
|
363
|
+
|
|
364
|
+
| Concern | manage-story | capture-story |
|
|
365
|
+
|---------|--------------|---------------|
|
|
366
|
+
| Problem-trace I6 enforcement | Re-validated at every lifecycle transition | Hard-block at capture-time; deny logged to `logs/story-capture-denials.jsonl` |
|
|
367
|
+
| JTBD-trace I9 enforcement | Re-validated at every lifecycle transition | Hard-block at capture-time |
|
|
368
|
+
| RFC-trace I7 enforcement | Hard-block at `accepted` transition (allows draft stories to exist before RFC reference firms up) | Advisory-warn at capture-time if `--rfc` provided and resolves to draft/proposed lifecycle |
|
|
369
|
+
| Story-map-trace I8 enforcement | Hard-block AT CAPTURE — refuse-and-route to `/wr-itil:capture-story-map` if absent (the "Story-map membership and story-content completeness are enforced at capture" architecture rule) | direction-setting (caller must supply or author a map first) |
|
|
370
|
+
| INVEST shape (I10) | Behavioural checks at `accepted` transition | Out of scope: capture produces a skeleton with deferred-placeholder sections |
|
|
371
|
+
| Skeleton-fill | Full-intake; request_user_input for User value + Acceptance criteria + Estimated effort | Deferred-placeholder pattern; one optional taste prompt only |
|
|
372
|
+
| Status transitions | Step 7 owns draft → accepted → in-progress → done | Out of scope (creation only) |
|
|
373
|
+
| `## Stories` README refresh | the "Problem 094: `/wr-itil:manage-problem` does not refresh `docs/problems/README.md` on ticket creation" problem / the "Problem 062: `manage-problem` does not refresh `docs/problems/README.md` on single-ticket transitions; fast-path cache goes stale silently" problem inline (regenerate + stage in same commit) | Deferred to `/wr-itil:manage-story review` or `<itil-plugin-root>/bin/wr-itil-reconcile-stories` (Slice 9) |
|
|
374
|
+
| Commit grain | One commit per intake / per transition | One commit per capture |
|
|
375
|
+
| Use case | Full lifecycle management | Aside-invocation; capture-and-continue |
|
|
376
|
+
|
|
377
|
+
The two skills share the `/tmp/wr-itil-story-capture-grep-${SESSION_ID}` create-gate marker (sibling to the capture-rfc marker per architect verdict on capture-rfc sub-decision (a)).
|
|
378
|
+
|
|
379
|
+
## Related
|
|
380
|
+
|
|
381
|
+
- **the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule** — Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology + Phase 2 amendment 2026-05-12 (story tier).
|
|
382
|
+
- **the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule lines 220-228** — Story frontmatter shape spec.
|
|
383
|
+
- **the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule lines 248-253** — I6-I11 story-tier invariants.
|
|
384
|
+
- **the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule line 291** — capture-story description (this skill's source-of-truth contract).
|
|
385
|
+
- **the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule line 307 + amendment 2026-05-10 nitpick N2** — single-trailer vocabulary (`Refs: STORY-<NNN>`).
|
|
386
|
+
- **the "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** — driver problem ticket.
|
|
387
|
+
- **the ": Decompose a Fix Into Coordinated Changes" user outcome** — Decompose a Fix Into Coordinated Changes. Primary persona-anchor.
|
|
388
|
+
- **the ": Enforce Governance Without Slowing Down" user outcome** (extended scope) — change-set-level governance composition.
|
|
389
|
+
- **the "Extend the Suite with New Plugins" user outcome** (atomic-fix-adopter friction guard) — capture-story remains opt-in aside-invocation; atomic-RFC fallback per the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule line 262.
|
|
390
|
+
- **`docs/stories/README.md`** — story tier lifecycle index + frontmatter/body shape spec (the "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 1 — committed `8562bbc`).
|
|
391
|
+
- **the "Rename `wr-problem` Plugin to `wr-itil`" architecture rule** — amended skill-granularity: capture-story + manage-story are two skills, not one.
|
|
392
|
+
- **the "Governance Skills Commit Their Own Completed Work" architecture rule** — single-commit grain per capture. Commit-message convention.
|
|
393
|
+
- **the "Problem lifecycle — add a Verification Pending status between Known Error and Closed" architecture rule** — problem lifecycle conventions; story lifecycle mirrors (draft / accepted / in-progress / done / archived).
|
|
394
|
+
- **the "Governance skill invocation patterns — foreground + background with deferred-question resumption" architecture rule** — governance-skill aside-invocation pattern. Lightweight + heavyweight split.
|
|
395
|
+
- **the "Progressive disclosure + once-per-session budget for UserPromptSubmit governance prose" architecture rule** — progressive disclosure. SKILL.md (this file) + future REFERENCE.md split deferred per the "SKILL.md runtime budget policy" architecture rule.
|
|
396
|
+
- **the "— Decision-Delegation Contract: when agents act on the framework vs ask the user" architecture rule** — decision delegation contract. Authority classes named in the Rule 6 audit table.
|
|
397
|
+
- **the "Plugin-bundled scripts invoked from SKILL.md resolve via `bin/` on `$PATH`" architecture rule** — plugin-bundled scripts via `bin/` on `$PATH`. `<itil-plugin-root>/bin/wr-itil-reconcile-stories` shim follows this grammar (Slice 9).
|
|
398
|
+
- **the "`@windyroad/*` plugin READMEs anchor on JTBD job IDs with load-bearing commit-hook + prose-woven framing" architecture rule** — load-bearing-from-the-start. I6 + I9 hard-block ship behaviourally on day one.
|
|
399
|
+
- **the "Behavioural-tests-default for skill testing" architecture rule** — behavioural-tests default. Bats coverage at `<itil-plugin-root>/skills/capture-story/test/capture-story-behavioural.bats` (this slice).
|
|
400
|
+
- **the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule Phase 2 Slice 2a/2b reverse-trace helpers** — `update-problem-references-section.sh`, `update-jtbd-references-section.sh`, `update-rfc-references-section.sh` all support `"Stories"` section-name token (verified lookup-table entries).
|
|
401
|
+
- **Capture-rfc precedent** — `<itil-plugin-root>/skills/capture-rfc/SKILL.md` — sibling skill at the RFC tier; structurally near-identical surface.
|
|
402
|
+
- **the "Problem 078: Assistant does not offer to capture a problem ticket when the user delivers strong-signal correction" problem** capture-on-correction — capture-story may be the correct response to a strong-signal user correction that names a single INVEST-shaped sub-workstream within an existing RFC.
|
|
403
|
+
- **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** — mechanical-stage carve-outs prevent over-asking; named in the Rule 6 audit table.
|
|
404
|
+
|
|
405
|
+
## Phase-out-of-order note
|
|
406
|
+
|
|
407
|
+
This skill ships BEFORE `/wr-itil:capture-story-map` (Slice 3 of the "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) due to the voice-tone-hook-on-HTML blocker documented at the "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 line 297. Building capture-story first was structurally permitted at the time (story-map traces were then optional at capture). **Superseded by the "Story-map membership and story-content completeness are enforced at capture" architecture rule** — I8 now hard-blocks at capture, and `/wr-itil:capture-story-map` has since shipped, so a map must exist before a story is captured. When Slices 3-6 eventually ship the story-map skills, `manage-story <NNN> accepted` will validate the I8 invariant against the then-existing story-map corpus. The deviation from the "Problem-RFC-Story framework with mandatory problem-trace and unified problem ontology" architecture rule's recommended commit-grain order (line 449-454 — sub-slice 3 story-map skills then sub-slice 4 story skills) is auditable here and in this commit's Slice 7 commit message.
|