@windyroad/retrospective 0.1.6 → 0.2.0-preview.109
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
|
@@ -28,12 +28,28 @@ Consider the work done in this session and identify:
|
|
|
28
28
|
|
|
29
29
|
**What should we make easier or automate** — repetitive manual steps, missing tooling, things that could be scripted. These should become problem tickets via the `/problem` skill.
|
|
30
30
|
|
|
31
|
-
**What recurring
|
|
31
|
+
**What recurring pattern did I (or the assistant) observe that would be better codified?** — a pattern that (a) was invoked multiple times in one session or across sessions, (b) has a deterministic action order or a clear invariant, and (c) is reusable beyond one project. These are **codification candidates** and route through Step 4b below. Do not treat them as problem tickets unless the user explicitly picks that routing option.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
33
|
+
For each codification candidate, also identify the **best shape** for the codification. The Windy Road suite supports many shapes — pick the one that fits the pattern, not the one you happened to learn first:
|
|
34
|
+
|
|
35
|
+
- **Skill** — deterministic multi-step sequence the user invokes by name (e.g. `wr-itil:ship-fix`). Worked example: `fetch origin → check changesets → score risk → commit → push → release → sync manifest → mark Fix Released`.
|
|
36
|
+
- **Agent** — bounded investigation or review the main agent should delegate to (e.g. a performance-specialist the architect calls in for runtime-path changes). Place under `packages/<plugin>/agents/`.
|
|
37
|
+
- **Hook** — event-driven enforcement or prompt injection (PreToolUse, PostToolUse, UserPromptSubmit). Use when "I keep forgetting to X before Y" — hooks make X unmissable without adding memory load.
|
|
38
|
+
- **Settings entry** — `.claude/settings.json` changes: allowlisted commands, env vars, hook wiring. Best fit when a session repeatedly hits permission prompts for the same benign tool.
|
|
39
|
+
- **Shell or Node script** — reusable repo-level tooling in `scripts/` (e.g. `sync-install-utils.sh`, `sync-plugin-manifests.mjs`). Best fit for multi-step shell sequences worth scripting.
|
|
40
|
+
- **CI step** — `.github/workflows/*.yml` insertion. Best fit for "we'd have caught that earlier with a CI check".
|
|
41
|
+
- **ADR** — architectural decision worth recording. Route to `/wr-architect:create-adr`.
|
|
42
|
+
- **JTBD** — job-to-be-done record for a persona. Route to `/wr-jtbd:update-guide`.
|
|
43
|
+
- **Guide** — voice, style, or risk policy edit. Route to `/wr-voice-tone:update-guide`, `/wr-style-guide:update-guide`, or `/wr-risk-scorer:update-policy`.
|
|
44
|
+
- **Problem ticket** — diagnostic, project-specific friction (the default for flaws). Route to `/wr-itil:manage-problem`.
|
|
45
|
+
- **Test fixture** — regression test for a recurring failure pattern (bats fixture, unit test). Best fit when the observation is "this kept breaking the same way".
|
|
46
|
+
- **Memory** — per-user or per-project memory note in `~/.claude/.../memory/`. Best fit for short, user-habit observations that aren't a codifiable sequence (e.g. "I always forget to run `npm run verify` before pushing").
|
|
47
|
+
|
|
48
|
+
If no shape fits — the observation is a one-off learning, not a repeating pattern — it belongs in BRIEFING.md (Step 3), not Step 4b.
|
|
49
|
+
|
|
50
|
+
Counter-examples (what does **not** become a codification candidate):
|
|
51
|
+
- "The commit gate rejected my work twice because X was misconfigured" — diagnostic, project-specific → **problem ticket** shape (route via Step 4b).
|
|
52
|
+
- "I always forget to run `npm run verify` before pushing" — short, user-habit rather than codifiable sequence → **memory** shape or **BRIEFING.md** note.
|
|
37
53
|
|
|
38
54
|
### 3. Update BRIEFING.md
|
|
39
55
|
|
|
@@ -57,31 +73,44 @@ For each item identified in "What was harder than it should have been", "What fa
|
|
|
57
73
|
- If yes: update it with new evidence from this session
|
|
58
74
|
- If no: create a new problem ticket
|
|
59
75
|
|
|
60
|
-
### 4b. Recommend new
|
|
76
|
+
### 4b. Recommend new codifications
|
|
61
77
|
|
|
62
|
-
For each **
|
|
78
|
+
For each **codification candidate** identified in Step 2, route the decision through a single `AskUserQuestion` call. This is the ADR-013 Rule 1 structured-interaction pattern — do not present the choices as prose enumeration in the skill output. The shape identified in Step 2 determines which option rows the user picks from; every shape routes through the same `AskUserQuestion` so the decision stays one structured interaction (architect decision: flat shape-prefixed options, not a two-step type-then-action flow).
|
|
63
79
|
|
|
64
80
|
For each candidate, invoke `AskUserQuestion` with:
|
|
65
|
-
- `header: "
|
|
81
|
+
- `header: "Codification candidate"`
|
|
66
82
|
- `multiSelect: false`
|
|
67
|
-
-
|
|
68
|
-
1. `
|
|
69
|
-
2. `
|
|
70
|
-
3. `
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
83
|
+
- Options (a flat list; each option names the shape up front so the decision is auditable):
|
|
84
|
+
1. `Skill — create stub` — description: "Record a stub candidate (suggested name, scope, triggers, prior uses) for a future scaffolding flow. Skill scaffolding itself is out of scope for this retrospective."
|
|
85
|
+
2. `Agent — create stub` — description: "Record a stub candidate for a new agent (suggested name, scope, trigger conditions, delegating skill). Place under `packages/<plugin>/agents/` when scaffolded."
|
|
86
|
+
3. `Hook — create stub` — description: "Record a stub candidate for a new hook (event: PreToolUse / PostToolUse / UserPromptSubmit; trigger; action summary)."
|
|
87
|
+
4. `Settings — propose entry` — description: "Record a proposed `.claude/settings.json` entry (allowlist / env / hook wiring) for later review."
|
|
88
|
+
5. `Script — create stub` — description: "Record a stub `scripts/*.sh` or `scripts/*.mjs` candidate (shebang + TODO + scope)."
|
|
89
|
+
6. `CI — propose step` — description: "Record a proposed `.github/workflows/ci.yml` insertion."
|
|
90
|
+
7. `ADR — invoke create-adr` — description: "Delegate to `/wr-architect:create-adr` so the decision is captured with proper MADR structure. Routing skill, not a stub."
|
|
91
|
+
8. `JTBD — invoke update-guide` — description: "Delegate to `/wr-jtbd:update-guide` to add or amend a job-to-be-done record. Routing skill, not a stub."
|
|
92
|
+
9. `Guide — invoke update-guide / update-policy` — description: "Delegate to `/wr-voice-tone:update-guide`, `/wr-style-guide:update-guide`, or `/wr-risk-scorer:update-policy` depending on the guide touched."
|
|
93
|
+
10. `Problem — invoke manage-problem` — description: "Delegate to `/wr-itil:manage-problem` so the candidate is WSJF-ranked against other backlog items. Routing skill, not a stub."
|
|
94
|
+
11. `Test fixture — create stub` — description: "Record a candidate bats / unit-test fixture for the recurring failure pattern."
|
|
95
|
+
12. `Memory — propose note` — description: "Record a proposed memory note (per-user or per-project) for a short user-habit observation that isn't a codifiable sequence."
|
|
96
|
+
13. `Skip — not codify-worthy` — description: "Neither stub nor route. The observation is too small, too ambiguous, or a one-off learning that belongs in BRIEFING.md."
|
|
97
|
+
|
|
98
|
+
If the option count is impractical for a single `AskUserQuestion` payload in a given Claude Code version, fall back to a two-question flow: (1) `"Which shape fits?"` with the shape list, (2) `"What action?"` with `Create stub / Invoke dedicated skill / Skip` — but prefer the single call when the surface allows it.
|
|
99
|
+
|
|
100
|
+
When the user chooses any of the **Create stub** shapes (skill / agent / hook / settings / script / CI / test / memory), record a candidate entry in the Step 5 summary under "Codification Candidates" with:
|
|
101
|
+
- **Shape** — which codification type (skill, agent, hook, etc.)
|
|
102
|
+
- **Suggested name** — for skills: `wr-<plugin>:<action>`; for agents: `<plugin>:<name>`; for hooks: `<event>:<trigger>`; for scripts: `scripts/<name>.<ext>`; etc.
|
|
103
|
+
- **Scope** — one sentence on what the codification does and when it should fire
|
|
104
|
+
- **Triggers** — example user prompts or events that should invoke it
|
|
76
105
|
- **Prior uses** — 2-3 observed invocations from this session
|
|
77
106
|
|
|
78
|
-
|
|
107
|
+
When the user chooses any of the **Invoke <dedicated skill>** routes (ADR / JTBD / Guide / Problem), delegate to the named skill with a context hand-off describing the candidate. Record the routing decision in the Step 5 summary under "Codification Candidates" with Shape = the routing target and a `routed to <skill>` marker.
|
|
79
108
|
|
|
80
|
-
When the user chooses **
|
|
109
|
+
When the user chooses **Skip**, record the candidate in the Step 5 summary under "Codification Candidates" with a `skipped` marker so the pattern is still visible in the session audit trail.
|
|
81
110
|
|
|
82
|
-
|
|
111
|
+
**Non-interactive fallback (per ADR-013 Rule 6):** if `AskUserQuestion` is unavailable, record each candidate in the Step 5 summary under "Codification Candidates" with a `flagged — not actioned (non-interactive)` marker, noting the identified Shape. Do not create stubs, route to dedicated skills, or scaffold. The user can review the flags and decide when they return.
|
|
83
112
|
|
|
84
|
-
**
|
|
113
|
+
**Backward compatibility**: "Skill" is retained as one shape among many so existing P044 muscle memory and `run-retro-skill-candidates.bats` continue to hold. Use the singular shape name in the summary (e.g. `Shape: skill`) so legacy greps still match.
|
|
85
114
|
|
|
86
115
|
### 5. Summary
|
|
87
116
|
|
|
@@ -98,13 +127,18 @@ Present a summary to the user:
|
|
|
98
127
|
### Problems Created/Updated
|
|
99
128
|
- [problem ticket]: [summary]
|
|
100
129
|
|
|
101
|
-
###
|
|
102
|
-
|
|
130
|
+
### Codification Candidates
|
|
131
|
+
|
|
132
|
+
| Shape | Suggested name | Scope | Triggers | Decision |
|
|
133
|
+
|-------|---------------|-------|----------|----------|
|
|
134
|
+
| skill | [suggested name] | [scope] | [examples] | created stub / routed to <skill> / skipped / flagged (non-interactive) |
|
|
135
|
+
| agent | ... | ... | ... | ... |
|
|
136
|
+
| hook | ... | ... | ... | ... |
|
|
103
137
|
|
|
104
138
|
### No Action Needed
|
|
105
139
|
- [learnings that were already captured]
|
|
106
140
|
```
|
|
107
141
|
|
|
108
|
-
If the "
|
|
142
|
+
If the "Codification Candidates" table has no rows, omit it rather than rendering an empty header. The legacy "Skill Candidates" heading is preserved as a worked-example row in the Shape column so downstream tooling that grepped for "Skill Candidates" continues to find skill-shaped entries within the unified table.
|
|
109
143
|
|
|
110
144
|
$ARGUMENTS
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env bats
|
|
2
|
+
# Doc-lint guard: run-retro SKILL.md must include a generalised codification
|
|
3
|
+
# branch that recommends agents, hooks, and other codifiable outputs — not
|
|
4
|
+
# only skills. This is the P050 generalisation of P044's single-output-type
|
|
5
|
+
# recommendation surface.
|
|
6
|
+
#
|
|
7
|
+
# Structural assertion — Permitted Exception to the source-grep ban (ADR-005 / P011).
|
|
8
|
+
# These tests assert that the skill specification document includes the
|
|
9
|
+
# multi-shape codification branch introduced by P050.
|
|
10
|
+
#
|
|
11
|
+
# Cross-reference:
|
|
12
|
+
# P050: docs/problems/050-run-retro-does-not-recommend-other-codifiable-outputs.open.md
|
|
13
|
+
# P044: docs/problems/044-run-retro-does-not-recommend-new-skills.known-error.md (predecessor)
|
|
14
|
+
# ADR-013 Rule 1 / Rule 6 (docs/decisions/013-structured-user-interaction-for-governance-decisions.proposed.md)
|
|
15
|
+
# @jtbd JTBD-101 (extend the suite with clear patterns)
|
|
16
|
+
# @jtbd JTBD-006 (progress the backlog while I'm away — AFK-safe Rule 6 fallback)
|
|
17
|
+
# @jtbd JTBD-001 (enforce governance without slowing down)
|
|
18
|
+
|
|
19
|
+
setup() {
|
|
20
|
+
SKILL_DIR="$(cd "$(dirname "$BATS_TEST_FILENAME")/.." && pwd)"
|
|
21
|
+
SKILL_FILE="${SKILL_DIR}/SKILL.md"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@test "SKILL.md Step 2 includes a generalised codification reflection category (P050)" {
|
|
25
|
+
# P050 fix: Step 2 must prompt for recurring patterns that would be better
|
|
26
|
+
# codified — not only as skills. The generalised wording names "codif"
|
|
27
|
+
# (codification / codifiable / codified) so reviewers and agents can tell
|
|
28
|
+
# P050 shipped.
|
|
29
|
+
run grep -in "codification candidate\|codifiable\|codify\|codified" "$SKILL_FILE"
|
|
30
|
+
[ "$status" -eq 0 ]
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@test "SKILL.md Step 2 names at least three codification shapes beyond skills (P050)" {
|
|
34
|
+
# The shape question is the point of P050. Names at minimum: agent, hook,
|
|
35
|
+
# and one of: settings, script, CI step, ADR, JTBD, guide, test. "skill"
|
|
36
|
+
# stays in the list as a worked example so P044 muscle memory survives.
|
|
37
|
+
run grep -ic "agent" "$SKILL_FILE"
|
|
38
|
+
[ "$status" -eq 0 ]
|
|
39
|
+
[ "$output" -ge 1 ]
|
|
40
|
+
run grep -ic "hook" "$SKILL_FILE"
|
|
41
|
+
[ "$status" -eq 0 ]
|
|
42
|
+
[ "$output" -ge 1 ]
|
|
43
|
+
run grep -icE "settings|script|ci step|ADR|JTBD|guide|test fixture" "$SKILL_FILE"
|
|
44
|
+
[ "$status" -eq 0 ]
|
|
45
|
+
[ "$output" -ge 1 ]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@test "SKILL.md Step 4b recommendation branch covers multiple shapes (P050)" {
|
|
49
|
+
# Step 4b must route per-shape. The recommendation branch names more than
|
|
50
|
+
# just "skill" as an output type.
|
|
51
|
+
run grep -inE "(agent|hook).*stub|stub.*(agent|hook)|create.*(agent|hook)|(agent|hook).*candidate" "$SKILL_FILE"
|
|
52
|
+
[ "$status" -eq 0 ]
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@test "SKILL.md Step 4b uses a single AskUserQuestion with shape-prefixed options (ADR-013 Rule 1)" {
|
|
56
|
+
# Architect decision: flat AskUserQuestion with type-prefixed labels, not a
|
|
57
|
+
# two-step chained flow. At least three shape-prefixed option lines must
|
|
58
|
+
# appear in the Step 4b block. Match both plain and backticked forms:
|
|
59
|
+
# "Skill — ..." / "`Skill — ...`" / "**Skill** — ..."
|
|
60
|
+
run grep -cE "(\`|\*\*)?(Skill|Agent|Hook|Settings|Script|CI|ADR|JTBD|Guide|Problem|Test fixture|Memory)(\`|\*\*)? +(—|-) " "$SKILL_FILE"
|
|
61
|
+
[ "$status" -eq 0 ]
|
|
62
|
+
[ "$output" -ge 3 ]
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@test "SKILL.md Step 4b routes ADR candidates to wr-architect:create-adr (P050)" {
|
|
66
|
+
# Dedicated codification skills already exist — Step 4b must route to them,
|
|
67
|
+
# not duplicate intake.
|
|
68
|
+
run grep -in "wr-architect:create-adr\|/wr-architect:create-adr" "$SKILL_FILE"
|
|
69
|
+
[ "$status" -eq 0 ]
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@test "SKILL.md Step 4b routes JTBD candidates to wr-jtbd:update-guide (P050)" {
|
|
73
|
+
run grep -in "wr-jtbd:update-guide\|/wr-jtbd:update-guide" "$SKILL_FILE"
|
|
74
|
+
[ "$status" -eq 0 ]
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@test "SKILL.md Step 4b preserves non-interactive fallback for generalised shapes (ADR-013 Rule 6)" {
|
|
78
|
+
# The Rule 6 fallback that P044 introduced must cover the generalised surface.
|
|
79
|
+
# When AskUserQuestion is unavailable, all shape candidates are flagged rather
|
|
80
|
+
# than silently chosen.
|
|
81
|
+
run grep -in "non-interactive\|Rule 6" "$SKILL_FILE"
|
|
82
|
+
[ "$status" -eq 0 ]
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@test "SKILL.md Step 5 summary has a Codification Candidates section with Shape column (P050)" {
|
|
86
|
+
# P050 candidate fix (3): unified table. Either:
|
|
87
|
+
# - a "### Codification Candidates" heading AND a "Shape" column, OR
|
|
88
|
+
# - a "### Codification Candidates" heading with per-shape rows.
|
|
89
|
+
# Accept either shape but require the heading.
|
|
90
|
+
run grep -n "### Codification Candidates\|## Codification Candidates" "$SKILL_FILE"
|
|
91
|
+
[ "$status" -eq 0 ]
|
|
92
|
+
run grep -in "shape" "$SKILL_FILE"
|
|
93
|
+
[ "$status" -eq 0 ]
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@test "SKILL.md retains 'skill' as a worked example within the generalised category (backward compat with P044)" {
|
|
97
|
+
# Architect advisory: keep 'skill' in the shape list as one worked example so
|
|
98
|
+
# the existing P044 muscle memory and the run-retro-skill-candidates.bats
|
|
99
|
+
# line-30 grep still pass. This is the compatibility test.
|
|
100
|
+
run grep -in "would be better as a skill\|better as a skill\|as a skill\|skill candidate" "$SKILL_FILE"
|
|
101
|
+
[ "$status" -eq 0 ]
|
|
102
|
+
}
|
|
@@ -23,11 +23,13 @@ setup() {
|
|
|
23
23
|
[ "$output" = "---" ]
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
@test "SKILL.md Step 2 includes the skill-candidate reflection category (P044)" {
|
|
27
|
-
# P044 fix: Step 2 must prompt for recurring workflows that would be better
|
|
28
|
-
#
|
|
29
|
-
#
|
|
30
|
-
|
|
26
|
+
@test "SKILL.md Step 2 includes the skill-candidate reflection category (P044, updated by P050)" {
|
|
27
|
+
# P044 fix: Step 2 must prompt for recurring workflows that would be better
|
|
28
|
+
# as skills. P050 generalises this to a codification category, with "skill"
|
|
29
|
+
# retained as one worked example within the shape list. This test accepts
|
|
30
|
+
# either the original P044 phrasing OR the P050 generalised phrasing that
|
|
31
|
+
# still names "skill" as a shape.
|
|
32
|
+
run grep -in "recurring workflow.*better as a skill\|would be better as a skill\|recurring pattern.*better codified\|\*\*Skill\*\* — " "$SKILL_FILE"
|
|
31
33
|
[ "$status" -eq 0 ]
|
|
32
34
|
}
|
|
33
35
|
|
|
@@ -46,20 +48,26 @@ setup() {
|
|
|
46
48
|
[ "$status" -eq 0 ]
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
@test "SKILL.md Step 4b header matches ADR-013 structured-interaction pattern" {
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
|
|
51
|
+
@test "SKILL.md Step 4b header matches ADR-013 structured-interaction pattern (P044, updated by P050)" {
|
|
52
|
+
# P044 used "Skill candidate" as the AskUserQuestion header. P050 generalises
|
|
53
|
+
# to "Codification candidate" with "Skill" as one shape option. Accept either —
|
|
54
|
+
# both preserve the ADR-013 Rule 1 structured-interaction shape.
|
|
55
|
+
run grep -in "Skill candidate\|Codification candidate" "$SKILL_FILE"
|
|
53
56
|
[ "$status" -eq 0 ]
|
|
54
57
|
}
|
|
55
58
|
|
|
56
|
-
@test "SKILL.md Step 4b names the
|
|
57
|
-
#
|
|
58
|
-
|
|
59
|
+
@test "SKILL.md Step 4b names the structured options for skill-shaped candidates (P044, updated by P050)" {
|
|
60
|
+
# P044 required three specific option labels (Create a new skill / Track as a
|
|
61
|
+
# problem / Skip — not skill-worthy). P050 generalises: the skill shape now
|
|
62
|
+
# appears as a row in the flat shape-prefixed option list ("Skill — create
|
|
63
|
+
# stub"). The "track as problem" path becomes the explicit "Problem" row.
|
|
64
|
+
# Skip path becomes "Skip — not codify-worthy". This test accepts either
|
|
65
|
+
# pattern so the P044 regression guard survives P050's generalisation.
|
|
66
|
+
run grep -in "Create a new skill\|Skill — create stub\|Skill - create stub" "$SKILL_FILE"
|
|
59
67
|
[ "$status" -eq 0 ]
|
|
60
|
-
run grep -
|
|
68
|
+
run grep -in "Track as a problem ticket\|Problem — invoke manage-problem\|Problem - invoke manage-problem" "$SKILL_FILE"
|
|
61
69
|
[ "$status" -eq 0 ]
|
|
62
|
-
run grep -
|
|
70
|
+
run grep -in "Skip — not skill-worthy\|Skip - not skill-worthy\|Skip — not codify-worthy\|Skip - not codify-worthy" "$SKILL_FILE"
|
|
63
71
|
[ "$status" -eq 0 ]
|
|
64
72
|
}
|
|
65
73
|
|
|
@@ -70,11 +78,13 @@ setup() {
|
|
|
70
78
|
[ "$status" -eq 0 ]
|
|
71
79
|
}
|
|
72
80
|
|
|
73
|
-
@test "SKILL.md Step 5 summary template has a Skill Candidates slot (P044)" {
|
|
81
|
+
@test "SKILL.md Step 5 summary template has a Skill / Codification Candidates slot (P044, updated by P050)" {
|
|
74
82
|
# P044 fix: the summary template must include a Skill Candidates section so
|
|
75
83
|
# recommendations are visible in the session audit alongside BRIEFING changes
|
|
76
|
-
# and problem tickets.
|
|
77
|
-
|
|
84
|
+
# and problem tickets. P050 generalises this to a unified "Codification
|
|
85
|
+
# Candidates" table with a Shape column; skill-shaped candidates still appear
|
|
86
|
+
# (as Shape: skill rows). Accept either heading.
|
|
87
|
+
run grep -n "### Skill Candidates\|### Codification Candidates" "$SKILL_FILE"
|
|
78
88
|
[ "$status" -eq 0 ]
|
|
79
89
|
}
|
|
80
90
|
|