@windyroad/jtbd 0.4.0-preview.70 → 0.5.0-preview.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/jtbd",
3
- "version": "0.4.0-preview.70",
3
+ "version": "0.5.0-preview.72",
4
4
  "description": "Jobs-to-be-done enforcement for UI changes",
5
5
  "bin": {
6
6
  "windyroad-jtbd": "./bin/install.mjs"
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: wr-jtbd:review-jobs
3
+ description: On-demand JTBD alignment review. Checks staged changes and recent commits against documented persona jobs in docs/jtbd/. Use before a release or when adding new features.
4
+ allowed-tools: Read, Glob, Grep, Bash, AskUserQuestion, Skill
5
+ ---
6
+
7
+ # JTBD Alignment Review Skill
8
+
9
+ Run a Jobs To Be Done alignment review on demand — outside the pre-tool-use hook gate. Reviews staged changes and recent commits against the documented persona jobs in `docs/jtbd/`.
10
+
11
+ This skill is **read-only**. It does not commit, push, or modify files.
12
+
13
+ ## When to use
14
+
15
+ - Pre-flight before a release or client handover: confirm delivered features trace to documented persona needs
16
+ - When adding new features: verify the feature serves a documented JTBD before building
17
+ - After a significant capability change: check whether existing jobs are still served
18
+ - Any time the hook gate is not convenient: planning mode, spike work, design review
19
+
20
+ ## Steps
21
+
22
+ ### 1. Parse arguments
23
+
24
+ Read `$ARGUMENTS` for an explicit review scope (e.g., "review the new skill I just wrote", "check persona alignment for the release", "does this feature serve a documented job?"). If a scope is provided, use it. If empty, proceed to auto-detection.
25
+
26
+ ### 2. Auto-detect context
27
+
28
+ Run the following to establish what needs reviewing:
29
+
30
+ ```bash
31
+ # Staged changes
32
+ git diff --cached --stat
33
+ git diff --cached --name-only
34
+
35
+ # Recent commits not yet pushed
36
+ git log origin/$(git rev-parse --abbrev-ref HEAD)..HEAD --oneline 2>/dev/null || git log HEAD -5 --oneline
37
+
38
+ # All unstaged changes
39
+ git diff --name-only HEAD
40
+ ```
41
+
42
+ Summarise:
43
+ - Files staged or recently committed
44
+ - Whether the changes are feature additions, behavioural changes, or purely documentary
45
+
46
+ ### 3. Resolve ambiguity
47
+
48
+ If there are no staged changes and no recent unpushed commits, use `AskUserQuestion` to ask:
49
+
50
+ > "I don't see any staged or unpushed changes. What would you like me to review?
51
+ > (a) A specific set of files or a planned feature — please describe it
52
+ > (b) All changes since the last tag
53
+ > (c) Cancel"
54
+
55
+ Do not ask if there is an obvious set of changed files.
56
+
57
+ ### 4. Construct the assessment prompt
58
+
59
+ Build a self-contained prompt for the JTBD subagent that includes:
60
+ - The list of changed/staged files
61
+ - The git diff summary (stat output)
62
+ - Any explicit scope from the user
63
+ - The request: "Review these changes against the project's documented JTBD personas and jobs. Identify which jobs are served, whether any gaps exist (changes that don't trace to a documented job), and whether any jobs are unintentionally broken."
64
+
65
+ ### 5. Delegate to wr-jtbd:agent
66
+
67
+ Invoke the JTBD subagent via the `Skill` tool:
68
+
69
+ ```
70
+ subagent_type: wr-jtbd:agent
71
+ prompt: <constructed review prompt from step 4>
72
+ ```
73
+
74
+ Wait for the subagent to complete.
75
+
76
+ ### 6. Present results
77
+
78
+ Present the full alignment report to the user. The JTBD subagent will report:
79
+ - PASS: changes trace to documented jobs, no gaps
80
+ - GAPS: changes that don't trace to any documented job — new JTBD entry may be needed
81
+ - BREAKS: changes that appear to remove or degrade a documented job outcome
82
+ - NEW JOB NEEDED: capabilities being added that serve an undocumented need
83
+
84
+ If gaps or breaks are identified, use `AskUserQuestion` to ask how the user wants to proceed:
85
+ - (a) Document the new job before continuing (recommended)
86
+ - (b) Proceed with a documented exception
87
+ - (c) Revise the approach to serve an existing job
88
+
89
+ Do not make the decision unilaterally — per ADR-013 Rule 1, JTBD alignment decisions are the user's.
90
+
91
+ $ARGUMENTS