@codewizard-dt/bootstrap 5.1.0 → 6.0.0

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 (95) hide show
  1. package/README.md +11 -3
  2. package/bin/cli.js +16 -0
  3. package/lib/hooks/README.md +124 -3
  4. package/lib/hooks/claude-settings-guard.js +8 -2
  5. package/lib/prompts/README.md +1 -1
  6. package/lib/prompts/migrate-wiki.md +7 -7
  7. package/lib/scripts/README.md +111 -10
  8. package/lib/scripts/bootstrap-prefs-tui.js +1222 -0
  9. package/lib/scripts/install-global.sh +137 -6
  10. package/lib/scripts/migrate-project.sh +52 -10
  11. package/lib/scripts/rename-wiki-ids.js +232 -0
  12. package/lib/scripts/templates/CLAUDE-wiki.md +6 -6
  13. package/lib/scripts/templates/bootstrap-prefs-schema.json +11 -2
  14. package/lib/scripts/templates/settings-sandbox-unattended.json +36 -0
  15. package/lib/scripts/templates/settings-sandbox.json +7 -0
  16. package/lib/scripts/templates/wiki/conventions.md +12 -10
  17. package/lib/scripts/templates/wiki/dashboard.html +527 -23
  18. package/lib/scripts/templates/wiki/index.md +2 -2
  19. package/lib/scripts/templates/wiki/work/bugs/lifecycle.md +1 -1
  20. package/lib/scripts/templates/wiki/work/decisions/index.md +12 -4
  21. package/lib/scripts/templates/wiki/work/decisions/lifecycle.md +11 -9
  22. package/lib/scripts/templates/wiki/work/requirements/index.md +12 -4
  23. package/lib/scripts/templates/wiki/work/requirements/lifecycle.md +8 -8
  24. package/lib/scripts/templates/wiki/work/roadmaps/index.md +11 -3
  25. package/lib/scripts/templates/wiki/work/roadmaps/lifecycle.md +7 -5
  26. package/lib/scripts/templates/wiki/work/tasks/index.md +1 -1
  27. package/lib/scripts/templates/wiki/work/tasks/lifecycle.md +16 -8
  28. package/lib/scripts/templates/wiki/work/uat/lifecycle.md +3 -3
  29. package/lib/scripts/wiki-dashboard-server.js +98 -0
  30. package/lib/skills/README.md +27 -22
  31. package/lib/skills/_shared/ARCHIVE-WORK-ITEM.md +103 -0
  32. package/lib/skills/_shared/ID-RESOLUTION.md +142 -0
  33. package/lib/skills/_shared/SKILL-BOILERPLATE.md +50 -0
  34. package/lib/skills/adr-assess/SKILL.md +112 -0
  35. package/lib/skills/{decision-create → adr-create}/SKILL.md +27 -26
  36. package/lib/skills/adr-deprecate/SKILL.md +190 -0
  37. package/lib/skills/adr-extract/SKILL.md +255 -0
  38. package/lib/skills/{decision-finalize → adr-finalize}/SKILL.md +38 -38
  39. package/lib/skills/{decision-next → adr-next}/SKILL.md +20 -19
  40. package/lib/skills/{decision-walkthrough → adr-walkthrough}/SKILL.md +23 -29
  41. package/lib/skills/architecture-audit/SKILL.md +24 -3
  42. package/lib/skills/autopilot/SKILL.md +110 -0
  43. package/lib/skills/bootstrap-config/SKILL.md +1 -1
  44. package/lib/skills/bug-assess/SKILL.md +3 -3
  45. package/lib/skills/bug-close/SKILL.md +15 -26
  46. package/lib/skills/{bug-file → bug-create}/SKILL.md +25 -15
  47. package/lib/skills/bug-triage/SKILL.md +5 -19
  48. package/lib/skills/demo/SKILL.md +11 -11
  49. package/lib/skills/elevator-pitch/SKILL.md +1 -1
  50. package/lib/skills/extract-feature/SKILL.md +29 -87
  51. package/lib/skills/git-commit/SKILL.md +4 -4
  52. package/lib/skills/marp-slideshow/SKILL.md +2 -2
  53. package/lib/skills/port-feature/SKILL.md +28 -83
  54. package/lib/skills/power-mode/SKILL.md +42 -49
  55. package/lib/skills/prd-assess/SKILL.md +105 -0
  56. package/lib/skills/{req-compile → prd-compile}/SKILL.md +6 -13
  57. package/lib/skills/{req-create → prd-create}/SKILL.md +19 -19
  58. package/lib/skills/prd-deprecate/SKILL.md +173 -0
  59. package/lib/skills/{req-finalize → prd-finalize}/SKILL.md +20 -29
  60. package/lib/skills/primer/SKILL.md +2 -2
  61. package/lib/skills/research/SKILL.md +3 -3
  62. package/lib/skills/roadmap-assess/SKILL.md +20 -20
  63. package/lib/skills/roadmap-create/SKILL.md +23 -29
  64. package/lib/skills/roadmap-next/SKILL.md +16 -28
  65. package/lib/skills/security-audit/SKILL.md +3 -3
  66. package/lib/skills/tackle/SKILL.md +13 -15
  67. package/lib/skills/{task-audit → task-assess}/SKILL.md +34 -44
  68. package/lib/skills/task-close/SKILL.md +73 -0
  69. package/lib/skills/{task-add → task-create}/SKILL.md +44 -24
  70. package/lib/skills/uat-assess/SKILL.md +124 -0
  71. package/lib/skills/uat-auto/SKILL.md +9 -6
  72. package/lib/skills/uat-auto-plus/SKILL.md +2 -2
  73. package/lib/skills/{uat-generate → uat-create}/SKILL.md +10 -12
  74. package/lib/skills/uat-skip/SKILL.md +5 -9
  75. package/lib/skills/uat-walk/SKILL.md +2 -2
  76. package/lib/skills/uat-walk/UAT-CORE.md +29 -16
  77. package/lib/skills/update-docs/SKILL.md +1 -1
  78. package/lib/skills/usage-report/SKILL.md +52 -0
  79. package/lib/skills/usage-report/scripts/pricing.json +22 -0
  80. package/lib/skills/usage-report/scripts/usage-report.js +518 -0
  81. package/lib/skills/whats-next/SKILL.md +177 -0
  82. package/lib/skills/wiki-archive/SKILL.md +12 -23
  83. package/lib/skills/wiki-lint/SKILL.md +42 -5
  84. package/lib/skills/wiki-query/SKILL.md +1 -1
  85. package/lib/skills/wiki-rotate-log/SKILL.md +1 -1
  86. package/lib/skills/wiki-tidy/SKILL.md +6 -9
  87. package/package.json +1 -1
  88. package/lib/scripts/templates/wiki/work/decisions/archive/index.md +0 -10
  89. package/lib/scripts/templates/wiki/work/requirements/archive/index.md +0 -10
  90. package/lib/scripts/templates/wiki/work/roadmaps/archive/index.md +0 -10
  91. package/lib/skills/req-extract-decisions/SKILL.md +0 -241
  92. package/lib/skills/req-retire/SKILL.md +0 -185
  93. package/lib/skills/req-update/SKILL.md +0 -265
  94. package/lib/skills/task-trash/SKILL.md +0 -115
  95. package/lib/skills/task-update/SKILL.md +0 -136
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: decision-next
3
- description: Find the first accepted decision missing a task reference; surface suggested /task-add command
2
+ name: adr-next
3
+ description: Find the first accepted decision missing a task reference; surface suggested /task-create command
4
4
  category: researching
5
5
  model: claude-haiku-4-5-20251001
6
6
  argument-hint: "[optional: path to a specific decision file or NNNN prefix to scope the search]"
@@ -15,6 +15,8 @@ Scan accepted decisions for ones missing a task reference and surface the first
15
15
 
16
16
  **Task-linked** = every accepted decision has a `Source task(s):` line with at least one task path (i.e. no task-less accepted decisions remain).
17
17
 
18
+ This same check now also runs as part of `/wiki-lint` (check 2.12) for scheduled sweeps across every decision file at once — use this skill directly when you want just the next single gap, fast.
19
+
18
20
  ---
19
21
 
20
22
  **Scope**: $ARGUMENTS
@@ -23,18 +25,15 @@ Scan accepted decisions for ones missing a task reference and surface the first
23
25
 
24
26
  ## Step 0: Resolve the Search Scope
25
27
 
26
- Parse `$ARGUMENTS`:
28
+ Resolve the file per ~/.claude/skills/_shared/ID-RESOLUTION.md — family: decisions · scope: active · ambiguous: interactive · empty: search all decision files in `wiki/work/decisions/` (exclude `lifecycle.md`)
29
+
30
+ Both `ADR-NNNN` and legacy `DEC-NNNN` references are accepted (the number selects the file, per that doc).
27
31
 
28
- | Input | Resolution |
29
- |-------|------------|
30
- | Empty | Search all decision files in `wiki/work/decisions/` (exclude `lifecycle.md`) |
31
- | File path (e.g. `wiki/work/decisions/DEC-0007-session.md`) | Scope to that file only |
32
- | `NNNN-slug` (e.g. `0007-session`) | Locate `NNNN-slug.md` in `wiki/work/decisions/` |
33
- | `NNNN` or plain number (e.g. `7` or `007`) | Pad to 4 digits; `mcp__serena__find_file` with mask `NNNN-*.md` |
32
+ A resolved reference scopes the search to that file only.
34
33
 
35
34
  Use `mcp__serena__find_file` and `mcp__serena__list_dir` for all discovery — never `bash`.
36
35
 
37
- If `wiki/work/decisions/` cannot be found, STOP and report: `No decisions directory found. Run /decision-create to start one.`
36
+ If `wiki/work/decisions/` cannot be found, STOP and report: `No decisions directory found. Run /adr-create to start one.`
38
37
 
39
38
  ---
40
39
 
@@ -42,6 +41,8 @@ If `wiki/work/decisions/` cannot be found, STOP and report: `No decisions direct
42
41
 
43
42
  Use `mcp__serena__list_dir` on `wiki/work/decisions/` to collect all `*.md` files **except `lifecycle.md`**.
44
43
 
44
+ Fully-decided groups stay in this directory (they sit under `## Closed` in the family index), so this scan covers them by `Status:` — never by index section. If a legacy holding folder exists under `wiki/work/decisions/` from an older layout, include its `*.md` files in the scan too.
45
+
45
46
  Sort files by their 4-digit numeric prefix ascending (lowest number first) so you scan in chronological decision order.
46
47
 
47
48
  If `$ARGUMENTS` scoped to a single file, the list contains only that file.
@@ -89,33 +90,33 @@ All accepted decisions have task references. Nothing to action.
89
90
  ### B. Task-less decision found — no broken link
90
91
 
91
92
  ```
92
- DEC-NNNN#DM: <Decision Title>
93
- File: wiki/work/decisions/DEC-NNNN-slug.md
93
+ ADR-NNNN#DM: <Decision Title>
94
+ File: wiki/work/decisions/ADR-NNNN-slug.md
94
95
  Status: accepted — no task linked
95
96
 
96
97
  Suggested next step:
97
- /task-add <short action derived from the decision title, e.g. "Implement <title>"> --decision NNNN#DM
98
+ /task-create <short action derived from the decision title, e.g. "Implement <title>"> --decision ADR-NNNN#DM
98
99
  ```
99
100
 
100
- Append a one-sentence reminder of what the decision chose (pulled from `### Decision Outcome`) so the user knows what the task should implement.
101
+ Print the file's own `id:` (a not-yet-migrated item prints its legacy `DEC-NNNN` ID and filename). Append a one-sentence reminder of what the decision chose (pulled from `### Decision Outcome`) so the user knows what the task should implement.
101
102
 
102
103
  ### C. Task-less decision found — broken link (file missing)
103
104
 
104
105
  ```
105
- DEC-NNNN#DM: <Decision Title>
106
- File: wiki/work/decisions/DEC-NNNN-slug.md
106
+ ADR-NNNN#DM: <Decision Title>
107
+ File: wiki/work/decisions/ADR-NNNN-slug.md
107
108
  Status: accepted — task link broken (referenced file not found)
108
109
  Broken link: <original path from Source task(s):>
109
110
 
110
111
  Suggested next steps:
111
112
  • Search wiki/work/tasks/ for the task by ID — files never move; check its status: frontmatter
112
- • Or create a replacement: /task-add <short action> --decision DEC-NNNN#DM
113
+ • Or create a replacement: /task-create <short action> --decision ADR-NNNN#DM
113
114
  ```
114
115
 
115
116
  ### D. Scoped file has no accepted decisions
116
117
 
117
118
  ```
118
- <file path> has no accepted decisions. Run /decision-finalize <file>#DM to accept a proposed decision.
119
+ <file path> has no accepted decisions. Run /adr-finalize <file>#DM to accept a proposed decision.
119
120
  ```
120
121
 
121
122
  ---
@@ -124,6 +125,6 @@ Suggested next steps:
124
125
 
125
126
  - Use only `mcp__serena__list_dir`, `mcp__serena__find_file`, `Read`, and `AskUserQuestion`.
126
127
  - Never use `bash` for reads (`cat`, `find`, `grep`, `sed`, `ls`).
127
- - Stop at the **first** gap — do not enumerate all gaps. The user runs `/decision-next` again after actioning each one.
128
+ - Stop at the **first** gap — do not enumerate all gaps. The user runs `/adr-next` again after actioning each one.
128
129
  - Keep the report terse — one block, no preamble, no closing summary.
129
130
  - There is no `completed/` subdirectory and no `git mv` — decision files stay at their stable `wiki/work/decisions/` path permanently.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: decision-walkthrough
2
+ name: adr-walkthrough
3
3
  description: Walk through a decision file decision-by-decision, presenting each architecture choice and confirming it with the user via Q&A
4
4
  category: planning
5
5
  model: claude-sonnet-5
@@ -14,7 +14,7 @@ user-invocable: true
14
14
 
15
15
  Systematically walk through every decision block in a decision file. For each decision, present a compact summary of drivers, options, the recommended choice, and trade-offs, then ask the user via `AskUserQuestion` to **confirm**, **change**, **defer**, or **skip**. Sibling decisions are treated independently; the file's other blocks are never touched while one block is being discussed.
16
16
 
17
- This skill is a **review pass**, not a finalizer. It does **not** flip status to `accepted` — that responsibility belongs to `/decision-finalize <file>#<DM>`, which runs the full E-C-A-D-R audit and supersession check. Use this command when you want a low-friction walkthrough to ratify (or revise) the architecture choices in a draft decision file before sending each decision through `/decision-finalize`.
17
+ This skill is a **review pass**, not a finalizer. It does **not** flip status to `accepted` — that responsibility belongs to `/adr-finalize <file>#<DM>`, which runs the full E-C-A-D-R audit and supersession check. Use this command when you want a low-friction walkthrough to ratify (or revise) the architecture choices in a draft decision file before sending each decision through `/adr-finalize`.
18
18
 
19
19
  **Read `wiki/work/decisions/lifecycle.md` first.** It defines the Decision Group model and the per-decision rules this command must respect (especially: siblings are inviolate; per-decision metadata is mandatory; tables not bullets; mermaid for flows).
20
20
 
@@ -26,9 +26,9 @@ This skill is a **review pass**, not a finalizer. It does **not** flip status to
26
26
 
27
27
  ## Pipeline Context
28
28
 
29
- `/decision-create` → **`/decision-walkthrough`** → `/decision-finalize <file>#<DM>` (per decision) → `/task-add` → `/tackle`
29
+ `/adr-create` → **`/adr-walkthrough`** → `/adr-finalize <file>#<DM>` (per decision) → `/task-create` → `/tackle`
30
30
 
31
- The walkthrough is optional — `/decision-finalize` alone is sufficient when only one decision needs ratifying. Use `/decision-walkthrough` when a decision file has 2+ proposed decisions and you want a single guided pass to align on every choice before finalizing each.
31
+ The walkthrough is optional — `/adr-finalize` alone is sufficient when only one decision needs ratifying. Use `/adr-walkthrough` when a decision file has 2+ proposed decisions and you want a single guided pass to align on every choice before finalizing each.
32
32
 
33
33
  ---
34
34
 
@@ -36,14 +36,9 @@ The walkthrough is optional — `/decision-finalize` alone is sufficient when on
36
36
 
37
37
  ### Step 1: Locate the decision file
38
38
 
39
- Parse `$ARGUMENTS` to identify the file:
39
+ Resolve the file per ~/.claude/skills/_shared/ID-RESOLUTION.md — family: decisions · scope: active · ambiguous: interactive · empty: list every decision file in `wiki/work/decisions/` with at least one `proposed` decision (scan each file's block `Status:`, not the index sections; a legacy holding folder is tolerated); ask the user via `AskUserQuestion` to pick
40
40
 
41
- | Input form | Resolution |
42
- |------------|------------|
43
- | `<path>` (e.g. `wiki/work/decisions/DEC-0007-session.md`) | Use as-is |
44
- | `<NNNN-slug>` (e.g. `0007-session`) | Search `wiki/work/decisions/` for `NNNN-slug.md` |
45
- | `<NNNN>` (e.g. `7` or `0007`) | Pad to 4 digits; `mcp__serena__find_file` with mask `NNNN-*.md` |
46
- | Empty / missing | List every decision file in `wiki/work/decisions/` with at least one `proposed` decision; ask the user via `AskUserQuestion` to pick |
41
+ Both `ADR-NNNN` and legacy `DEC-NNNN` references are accepted (the number selects the file, per that doc).
47
42
 
48
43
  If the file cannot be located, **stop** and report — do not invent or create.
49
44
 
@@ -71,7 +66,7 @@ If the file cannot be located, **stop** and report — do not invent or create.
71
66
  | `proposed` | **In scope** — runs the full Q&A confirm/change loop in Step 3 |
72
67
  | `accepted` | **Informational only** — print a one-line summary; skip Q&A (decision is immutable) |
73
68
  | `deprecated` | **Informational only** — print summary; skip Q&A |
74
- | `superseded by DEC-X#DY` | **Informational only** — print summary with the supersession target; skip Q&A |
69
+ | `superseded by ADR-X#DY` (or legacy `DEC-X#DY`) | **Informational only** — print summary with the supersession target; skip Q&A |
75
70
 
76
71
  If **no** decisions are `proposed`, print the roster, note that nothing requires confirmation, and stop.
77
72
 
@@ -82,7 +77,7 @@ For each `proposed` decision in roster order:
82
77
  1. **Present the decision summary** as tables (never bullets):
83
78
 
84
79
  ```
85
- ─── DEC-NNNN#DM — <title> ───────────────────────────────────────
80
+ ─── ADR-NNNN#DM — <title> ───────────────────────────────────────
86
81
  Status: proposed Tags: <list> Date: <YYYY-MM-DD or blank>
87
82
  ```
88
83
 
@@ -94,7 +89,7 @@ For each `proposed` decision in roster order:
94
89
  - **Currently chosen option** (the bolded option in `### Decision Outcome`, or `(none yet)` if absent)
95
90
  - **Top 2 trade-off rows** for the chosen option from `### Trade-off Detail per Option` (Pros + Cons)
96
91
 
97
- Cap the summary at ~25 lines. If a section is missing or all-placeholder, mark it `⚠️ gap — surface at finalize time`. **Do not edit gaps here** — that is `/decision-finalize`'s job.
92
+ Cap the summary at ~25 lines. If a section is missing or all-placeholder, mark it `⚠️ gap — surface at finalize time`. **Do not edit gaps here** — that is `/adr-finalize`'s job.
98
93
 
99
94
  2. **Ask the user via `AskUserQuestion`** with these four options:
100
95
 
@@ -107,13 +102,13 @@ For each `proposed` decision in roster order:
107
102
 
108
103
  If the decision has **no** chosen option yet, replace `Confirm` with `Choose` (same Change-flow follow-up).
109
104
 
110
- 3. **Apply edits only when the verdict is Confirm-without-bold or Change.** Use `Edit` (never `sed`/`echo`). Constrain `old_string` to text unique within the target block to avoid touching siblings.
105
+ 3. **Apply edits only when the verdict is Confirm-without-bold or Change.** Edit only — see `~/.claude/skills/_shared/SKILL-BOILERPLATE.md` § Edit hygiene. Constrain `old_string` to text unique within the target block to avoid touching siblings.
111
106
 
112
107
  | Trigger | Edit |
113
108
  |---------|------|
114
109
  | Confirm, but `### Decision Outcome` lacks a bolded option | Bold the chosen option; add a one-sentence justification anchored to the highest-priority driver |
115
110
  | Change | Unbold the previous option; bold the new one; rewrite the justification; if user volunteers replacement context for `### Consequences` or `### Validation`, capture only what they explicitly state — never fabricate |
116
- | Any verdict | **Never** flip `Status` to `accepted` (that is `/decision-finalize`'s gate); **never** edit sibling decision blocks; **never** edit the index or relationship graph |
111
+ | Any verdict | **Never** flip `Status` to `accepted` (that is `/adr-finalize`'s gate); **never** edit sibling decision blocks; **never** edit the index or relationship graph |
117
112
 
118
113
  4. **Record the per-decision verdict** in working memory for the Step 5 report.
119
114
 
@@ -127,7 +122,7 @@ After Step 3 completes for every proposed decision, ask once via `AskUserQuestio
127
122
  | `Deciders` | Names/roles supplied by the user — only if blank |
128
123
  | `Tags` | 1–3 short tags supplied by the user — only if blank |
129
124
 
130
- Anything beyond these three fields, or any change requiring research (drivers, consequences, validation thresholds), is **out of scope** — defer to `/decision-finalize` and report it in Step 5.
125
+ Anything beyond these three fields, or any change requiring research (drivers, consequences, validation thresholds), is **out of scope** — defer to `/adr-finalize` and report it in Step 5.
131
126
 
132
127
  ### Step 5: Report and recommend next steps
133
128
 
@@ -136,14 +131,14 @@ Print a single tabular completion report:
136
131
  | Decision | Title | Pre-walkthrough status | Verdict | Edits applied | Next step |
137
132
  |----------|-------|------------------------|---------|---------------|-----------|
138
133
  | D1 | Storage backend | accepted | (informational) | none | n/a — already accepted |
139
- | D2 | Session lifetime | proposed | Confirmed | bolded chosen option | `/decision-finalize 0007-session#D2` |
140
- | D3 | Invalidation trigger | proposed | Changed (Webhook → Polling) | rewrote outcome | `/decision-finalize 0007-session#D3` |
134
+ | D2 | Session lifetime | proposed | Confirmed | bolded chosen option | `/adr-finalize 0007-session#D2` |
135
+ | D3 | Invalidation trigger | proposed | Changed (Webhook → Polling) | rewrote outcome | `/adr-finalize 0007-session#D3` |
141
136
 
142
137
  Append:
143
138
 
144
- - **Confirmed proposed decisions** — list `/decision-finalize <file>#<DM>` commands the user can run next (one per confirmed decision).
145
- - **Deferred decisions** — list IDs the user chose to revisit; suggest re-running `/decision-walkthrough` later.
146
- - **Gaps surfaced but not fixed** (placeholders, missing mermaid, asymmetric tables, etc.) — flag explicitly so the user knows `/decision-finalize` will pick them up.
139
+ - **Confirmed proposed decisions** — list `/adr-finalize <file>#<DM>` commands the user can run next (one per confirmed decision).
140
+ - **Deferred decisions** — list IDs the user chose to revisit; suggest re-running `/adr-walkthrough` later.
141
+ - **Gaps surfaced but not fixed** (placeholders, missing mermaid, asymmetric tables, etc.) — flag explicitly so the user knows `/adr-finalize` will pick them up.
147
142
  - **Sibling status confirmation** — restate which decisions in the file were left byte-for-byte unchanged.
148
143
 
149
144
  ---
@@ -154,16 +149,15 @@ Append:
154
149
  2. **One decision at a time** — present, ask, edit, then move on. Never bundle Q&A across multiple decisions in one `AskUserQuestion`.
155
150
  3. **Surgical edits only** — `Edit` calls are scoped to the target decision block. Anchor `old_string` with text from that block (e.g., the `## DM. <title>` line plus a few characters) to guarantee no sibling drift.
156
151
  4. **Present tense, full sentences** when rewriting a Decision Outcome justification.
157
- 5. **Never invent content** — if the user picks a new option that lacks a comparison row, do **not** synthesize one; flag it and recommend `/decision-finalize` (which will demand the research).
152
+ 5. **Never invent content** — if the user picks a new option that lacks a comparison row, do **not** synthesize one; flag it and recommend `/adr-finalize` (which will demand the research).
158
153
 
159
154
  ---
160
155
 
161
156
  ## CRITICAL Rules
162
157
 
163
- 1. **No status flips** — this command never writes `Status: accepted`, `Status: deprecated`, or `Status: superseded by …`. Those transitions belong to `/decision-finalize` (and to the supersession path `/decision-finalize` enforces).
158
+ 1. **No status flips** — this command never writes `Status: accepted`, `Status: deprecated`, or `Status: superseded by …`. Those transitions belong to `/adr-finalize` (and to the supersession path `/adr-finalize` enforces); the deprecation transition belongs to `/adr-deprecate`.
164
159
  2. **Per-decision scope** — only the currently-discussed block changes. All other `D*` blocks must be byte-for-byte unchanged at end-of-run; verify before reporting.
165
- 3. **No supersession work** — supersession detection and the two-block cross-reference rule are `/decision-finalize`'s job. Do not search other decision files; do not edit the index or relationship graph.
166
- 4. **Refuse on missing-`Tags` write requests** — if the user asks to confirm a decision whose `Tags` line is empty and they decline to fill it in Step 4, leave the block as-is and tell them `/decision-finalize` will block on it.
167
- 5. **Never use `sed`/`awk`/`echo >>`/`cat <<EOF`** — always `Edit`.
168
- 6. **Maximum 3 sub-processes at a time** if delegating reads.
169
- 7. **Always terminate processes when done.**
160
+ 3. **No supersession work** — supersession detection and the two-block cross-reference rule are `/adr-finalize`'s job. Do not search other decision files; do not edit the index or relationship graph.
161
+ 4. **Refuse on missing-`Tags` write requests** — if the user asks to confirm a decision whose `Tags` line is empty and they decline to fill it in Step 4, leave the block as-is and tell them `/adr-finalize` will block on it.
162
+ 5. **Maximum 3 sub-processes at a time** if delegating reads.
163
+ 6. **Always terminate processes when done.**
@@ -20,6 +20,7 @@ Structured architecture audit of this project's agentic/LLM system design. **Aud
20
20
  2. **Find the agentic surface** — orchestrator/lead-agent entry points, subagent or worker definitions, tool/function registries, agent framework imports (`langgraph`, `crewai`, `autogen`, `@anthropic-ai/claude-agent-sdk`, `openai-agents`, `google-adk`, `@mastra/*`, `ai` (Vercel AI SDK)), any workflow/pipeline DSL.
21
21
  3. **Establish the shape** — single agent, code-defined workflow, or multi-agent (and if multi-agent: how many roles, what topology connects them). This shape gates which checks below even apply.
22
22
  4. **Note deployment context** — is this repo the LLM application itself, or (as with `bootstrap-claude`) tooling that configures agent behavior for other projects/sessions. Adjust "codebase" checks accordingly — e.g. for a Claude Code skill/subagent system, the orchestrator is a skill file, not application code.
23
+ 5. **Diagram the topology** — sketch the actual control-flow graph found in the codebase: the orchestrator/lead node, each distinct subagent/role node, and any tool/data-store nodes material to control flow, with edges labeled by kind (`delegates`, `returns`, `invokes`). This becomes the Mermaid flowchart embedded in the report (see Reporting).
23
24
 
24
25
  Use Serena `find_symbol` / `search_for_pattern` to locate code — never shell `grep`/`find`.
25
26
 
@@ -167,7 +168,20 @@ Individually-benign behavior in each agent can compound into an unwanted *global
167
168
 
168
169
  ## Reporting
169
170
 
170
- **Output**: after compiling findings, write the full report to `.docs/architecture-audit/report-<YYYY-MM-DD>.md` using the **Write** tool (create the directory if it doesn't exist). If a report for today already exists, write `report-<YYYY-MM-DD>-2.md` (then `-3`, …) rather than overwriting, so architecture posture is trackable over time rather than a one-off snapshot. Print the same report in the conversation as well; the file is a durable copy, not a replacement for the reply.
171
+ **Output**: after compiling findings, write the full report to `wiki/reports/architecture-audit/<YYYY-MM-DD>.md` using the **Write** tool (create the directory if it doesn't exist). If a report for today already exists, write `<YYYY-MM-DD>-2.md` (then `-3`, …) rather than overwriting, so architecture posture is trackable over time rather than a one-off snapshot. Print the same report in the conversation as well; the file is a durable copy, not a replacement for the reply.
172
+
173
+ **Topology diagram**: every report embeds a Mermaid flowchart of the *actual* orchestration topology found in the codebase (from Setup step 5) — not an idealized one. Nodes: the orchestrator/lead agent, each distinct subagent/role, and any tool/data-store nodes material to control flow (group many similar tools into a single `Tools` node rather than enumerating each). Edges: label direction and kind (`delegates`, `returns`, `invokes`). If OT3 finds a peer-to-peer/mesh edge (agents communicating directly, bypassing the orchestrator), render it as a distinct dashed edge with a `⚠` label so the violation is visible in the diagram itself, not just called out in prose:
174
+
175
+ ```mermaid
176
+ flowchart TD
177
+ U[User] --> O[Orchestrator]
178
+ O -->|delegates| A1[Subagent: Research]
179
+ O -->|delegates| A2[Subagent: Writer]
180
+ A1 -->|returns| O
181
+ A2 -->|returns| O
182
+ A1 -.->|⚠ direct handoff, bypasses orchestrator| A2
183
+ O --> T[(Tools / data stores)]
184
+ ```
171
185
 
172
186
  **Per-check status:** ✅ PASS (control exists & effective) · ⚠️ WARN (partial / has gaps) · ❌ FAIL (no evidence; at risk) · ℹ️ N/A (not applicable to this architecture) · 🔍 NEEDS-REVIEW (can't determine from code — flag for manual review).
173
187
 
@@ -177,6 +191,12 @@ Individually-benign behavior in each agent can compound into an unwanted *global
177
191
  Architecture shape: [single agent / code-defined workflow / multi-agent — N roles, topology]
178
192
  Categories audited: [list]
179
193
 
194
+ ### Topology
195
+ ```mermaid
196
+ flowchart TD
197
+ ...
198
+ ```
199
+
180
200
  ### [Category Name]
181
201
  | Check | Status | Notes |
182
202
  |-------|--------|-------|
@@ -200,8 +220,9 @@ Categories audited: [list]
200
220
  2. **Cite specific files and line numbers** for every PASS or FAIL — say where you looked; "no evidence found" alone is insufficient.
201
221
  3. **Serena for all code navigation** (`find_symbol`, `search_for_pattern`, `get_symbols_overview`) — no shell grep.
202
222
  4. **Flag NEEDS-REVIEW honestly** — controls needing runtime observation (e.g. actual token-cost multiplier, live cascade behavior) get flagged with what to verify manually.
203
- 5. **Do not fix** — audit and report only; hand off fixes to the user or `/task-add`.
223
+ 5. **Do not fix** — audit and report only; hand off fixes to the user or `/task-create`.
204
224
  6. **Scope to the repo** — don't speculate about external infra unless config files are present.
205
225
  7. **One category at a time** — complete each fully before the next; don't interleave findings.
206
226
  8. **Judge fit, not fashion** — a single agent that passes evaluation is not a finding against it; only flag multi-agent complexity, topology, or framework choice as a gap when it's mismatched to the actual task shape, not merely "not the newest pattern."
207
- 9. **Persist the report** — write it to `.docs/architecture-audit/` (see Reporting) in addition to printing it; a report that only lives in the chat leaves no trail for the next audit to compare against.
227
+ 9. **Persist the report** — write it to `wiki/reports/architecture-audit/` (see Reporting) in addition to printing it; a report that only lives in the chat leaves no trail for the next audit to compare against.
228
+ 10. **Diagram the topology** — every report includes a Mermaid flowchart of the actual control-flow graph (Setup step 5, Reporting § Topology diagram); mark any peer-to-peer/mesh edges distinctly so OT3 violations are visible in the picture, not just described in prose.
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: autopilot
3
+ description: One unattended tick of self-driving work, built for `/loop 1h /autopilot` — if idle, run /whats-next and hand the first drivable item to /power-mode; if no work is left, run /research on similar products against this codebase; if there is still none, turn the newest research into a new roadmap
4
+ category: executing
5
+ model: claude-sonnet-5
6
+ argument-hint: "[--dry-run]"
7
+ disable-model-invocation: false
8
+ user-invocable: true
9
+ ---
10
+ **Prereqs:** obey `wiki/guides/mcp-tools.md`; run /primer if not done this session.
11
+
12
+ # Autopilot
13
+
14
+ One **tick** of an unattended work loop. Run it on a schedule — `/loop 1h /autopilot` — and each tick does exactly one of four things, in this order: stand down because work is already running, drive the next piece of open work, research for new ideas when nothing is open, or turn the newest research into a roadmap so the next tick has something to drive.
15
+
16
+ The schedule belongs to `/loop`. This skill never calls `ScheduleWakeup`, `CronCreate` or any timer — it runs once and stops, so a tick that finds nothing to do simply ends.
17
+
18
+ **No user is present.** Never call `AskUserQuestion`, and never wait for confirmation. Every decision below has a defined default; where a sub-skill would normally ask, this skill supplies the answer itself (Stage C spells out how). `--dry-run` runs the checks and the sweep, prints what the tick *would* do, and changes nothing.
19
+
20
+ ---
21
+
22
+ ## Step 1: Am I already working?
23
+
24
+ The tick must not stack on top of itself. Call `ListAgents` and check for background tasks started by this session.
25
+
26
+ - **Any agent or task still running** (a `/power-mode` team from an earlier tick, a `/research` sub-process, a `/tackle` in flight) → stop with `Autopilot: busy — <N> agent(s) still running (<names>). Skipping this tick.` Do not read the wiki, do not dispatch anything.
27
+ - **Nothing running** → continue. Agents that finished or went idle do not count as busy, but never reap or message agents this skill did not spawn.
28
+
29
+ A task that sits at `status: in-progress` with no agent running is an orphan from an interrupted run, not "work in progress" — it is ordinary Stage A input.
30
+
31
+ ## Stage A: Drive the next open work
32
+
33
+ 1. Run `/whats-next` (read-only) and read its ranked table and Blocked list.
34
+ 2. If it printed `No open work found`, go to **Stage B**.
35
+ 3. Walk the Ranked table **top-down** and pick the first row `/power-mode` can drive:
36
+
37
+ | Row | Power-mode argument |
38
+ |-----|---------------------|
39
+ | task (`todo`, `in-progress`, `pending-uat`) | the task file path, `wiki/work/tasks/TASK-NNNN-slug.md` |
40
+ | inline roadmap item, or a fully-worked roadmap | the roadmap file path, `wiki/work/roadmaps/ROADMAP-NNNN-slug.md` |
41
+
42
+ Skip rows that need a human decision — bug triage, ADR finalize, PRD finalize, UAT cases that are manual-only (`/uat-walk`), index-drift hygiene. They are not drivable unattended, and skipping them keeps the tick from inventing an answer to a judgment call.
43
+ 4. **Drivable row found** → run `/power-mode <argument>` on it and let it run to completion. Then stop (Step: Report). The next tick re-sweeps from scratch; do not pick a second item in the same tick.
44
+ 5. **Rows exist but none is drivable** → this is unfinished work waiting on a human, not "nothing to do". **Do not fall through to Stage B.** Stop with `Autopilot: open work needs a human — <N> item(s): <ID — Next command>, …` listing the top three.
45
+
46
+ ## Stage B: Research when the queue is empty
47
+
48
+ Reached only when `/whats-next` reported no open work at all.
49
+
50
+ 1. Work out what this project is: read the root `README.md` and `CLAUDE.md` (first screen of each is enough) and the Serena memory `project/overview`.
51
+ 2. List existing topics with `list_dir` on `raw/research/` and read each `index.md` title line, so the new topic does not repeat one. If the obvious topic already has a report, choose an adjacent angle (a feature area, a competitor class, a technique) that the existing reports leave open — never the same question twice.
52
+ 3. Run `/research` with a topic of this shape, filled in from step 1 and narrowed by step 2:
53
+
54
+ `Existing products, open-source projects and published approaches similar to <what this project is>: how they solve <its core problem>, what they offer that this codebase does not, and where this codebase is ahead — compared against this repository's current features and architecture`
55
+
56
+ `/research` already covers both halves the loop needs: Phase 2 analyses this codebase, Phase 3 searches the web (Brave) and library docs (Context7). Let it apply its own `research.persistToRaw` / `research.autoIngest` gates — do not override them.
57
+ 4. Continue to **Stage C**.
58
+
59
+ ## Stage C: Roadmap from the newest research
60
+
61
+ 1. **Re-check for work.** Run `/whats-next` once more. If it now lists open work (something else created it while research ran), stop — the next tick drives it. Otherwise continue.
62
+ 2. **Pick the source.** The newest report is the highest `researched:` date across `raw/research/*/index*.md` (`search_for_pattern` on `^researched:[^\n]*`; on a tie prefer the report `/research` just wrote). Skip any report already cited by an existing roadmap — search `wiki/work/roadmaps/ROADMAP-*.md` for its slug or path, in any status. If `/research` persisted nothing (`research.persistToRaw=false`), use this tick's in-context report and say so in the roadmap `## Notes`.
63
+ 3. **Create the roadmap without the Q&A.** Follow `lib/skills/roadmap-create/SKILL.md` — number allocation, the file template, the item-rendering rules, the index row, the hot-cache refresh — with these substitutions for its interactive steps:
64
+ - The `/research` it demands as a first step is satisfied by Stage B; do not run a second one.
65
+ - Skip its Step 3 Q&A and Step 4 approval prompt. Answer the elicitations yourself, from the report's `## Recommendation` and `## Next Steps`:
66
+
67
+ | Elicitation | Answer |
68
+ |-------------|--------|
69
+ | Goal | 1–2 sentences: the observable end state if the recommendation is carried out |
70
+ | Phases | 2–4 short execution-flavoured names, in dependency order |
71
+ | Owner | the name from `git config user.name` (a named person passes the quality bar; "the team" does not) |
72
+ | Linked PRD / ADRs | `—` — never invent references |
73
+ | Items | one checkbox-sized inline item per concrete recommendation, 3–9 in total, each grounded in a finding of the report. No sub-bullets, no file paths, no steps — that is task territory. At least one phase must hold at least one item |
74
+
75
+ - Record the source in `## Notes` as a path (`raw/research/<slug>/index.md`). Set `derived_from:` only when a `wiki/knowledge/sources/` page for that report already exists; otherwise omit it.
76
+ - The roadmap's own refusal rules still hold (vague Goal, missing Owner, zero items): if the report yields no concrete recommendation, write nothing and report `Autopilot: research produced no actionable recommendation — no roadmap created.`
77
+ 4. **Log it.** Append `## [YYYY-MM-DD] roadmap | ROADMAP-NNNN <title>` plus one sentence — `created by /autopilot from raw/research/<slug>/` — to `wiki/log.md` (append-only; never edit an existing entry).
78
+ 5. **Stop.** Do not call `/power-mode` in this tick. Research plus roadmap creation is already a long tick, and the next tick's Stage A finds the new roadmap's inline items and drives them.
79
+
80
+ ## Report
81
+
82
+ One block, no preamble:
83
+
84
+ ```
85
+ Autopilot tick — <YYYY-MM-DD HH:MM>
86
+ Stage: <busy | A drove <ID> | A needs-human | B+C created <ROADMAP-NNNN> | B no-recommendation>
87
+ Details: <one line — what was run, the path acted on, or the reason it stopped>
88
+ Next: <what the next tick will do, when known>
89
+ ```
90
+
91
+ With `--dry-run`, prefix `DRY RUN —` and describe the action instead of taking it.
92
+
93
+ ---
94
+
95
+ ## Constraints
96
+
97
+ - **Unattended.** No `AskUserQuestion`, no confirmation waits. The roadmap in Stage C is written on this skill's own judgement — say so in the report so the human can edit or `/task-close` it.
98
+ - **One action per tick.** At most one `/power-mode` run, or one research-plus-roadmap pass. Never both in the same tick.
99
+ - **Never fall through past real work.** Stage B runs only when `/whats-next` found *no* open work; open work that merely needs a human stops the tick at Stage A.
100
+ - **Never schedule.** The interval belongs to `/loop`; this skill has no timer of its own.
101
+ - **Never edit `raw/`** except through `/research`, which owns `raw/research/`.
102
+ - **Delegated safety.** `/power-mode` and `/research` keep their own rules — agent naming, reaping, permission mode, preference gates, Serena-first navigation. This skill relaxes none of them.
103
+ - **Sub-skills only.** Do not reimplement ranking, the pipeline or the roadmap template here; read them from the skills named above.
104
+
105
+ ## Usage
106
+
107
+ ```
108
+ /loop 1h /autopilot # the intended form
109
+ /autopilot --dry-run # see what the next tick would do
110
+ ```
@@ -11,7 +11,7 @@ user-invocable: true
11
11
 
12
12
  # /bootstrap-config — View, edit, and reset stored preferences
13
13
 
14
- Bootstrap remembers your answers to installer and skill prompts in two flat JSON files — the global `~/.claude/bootstrap-prefs.json` and the per-project `<project>/.claude/bootstrap-prefs.json` — and every read and write of them goes through the helper `lib/scripts/bootstrap-prefs.js`. This command is the front end to that store: it reads current state with the helper, explains each key from the registry at `lib/scripts/templates/bootstrap-prefs-schema.json`, and changes exactly what you confirm.
14
+ Bootstrap remembers your answers to installer and skill prompts in two flat JSON files — the global `~/.claude/bootstrap-prefs.json` and the per-project `<project>/.claude/bootstrap-prefs.json` — and every read and write of them goes through the helper `lib/scripts/bootstrap-prefs.js`. This command is the front end to that store: it reads current state with the helper, explains each key from the registry at `lib/scripts/templates/bootstrap-prefs-schema.json`, and changes exactly what you confirm. Outside a Claude Code session, the same store is editable from a terminal with `npx @codewizard-dt/bootstrap config` (interactive menu, or flag passthrough such as `--get` / `--set <key> --value <v>` / `--unset` / `--list`); both front ends go through `bootstrap-prefs.js`, so results are identical.
15
15
 
16
16
  **CRITICAL ORDERING RULE**: Steps A and B (locate + read current state) MUST complete, and the Step B2 state summary MUST be printed, before any `AskUserQuestion` call. Never prompt against an unread store — the whole point of this command is that the user decides against real current state, not a guess.
17
17
 
@@ -18,7 +18,7 @@ This skill is read-mostly with one deliberate exception: if any bug is still `st
18
18
 
19
19
  ## Step 1: Discover active bugs
20
20
 
21
- `list_dir` `wiki/work/bugs/` for `BUG-*.md` files **directly** in it (not `archive/`); skip `lifecycle.md`, `index.md`. None found → STOP: `No bugs found in wiki/work/bugs/. Use /bug-file <description> to file one.`
21
+ `list_dir` `wiki/work/bugs/` for `BUG-*.md` files **directly** in it (not `archive/`); skip `lifecycle.md`, `index.md`. None found → STOP: `No bugs found in wiki/work/bugs/. Use /bug-create <description> to file one.`
22
22
 
23
23
  A single active bug is still worth assessing — the status update in Step 6d is useful on its own.
24
24
 
@@ -120,7 +120,7 @@ One block per bug, in ranked order:
120
120
  `Next` by status:
121
121
 
122
122
  - `open` → `/bug-triage BUG-NNNN`
123
- - `triaged` → `/bug-triage BUG-NNNN` to start work, or suggest `/task-add` for a fix task
123
+ - `triaged` → `/bug-triage BUG-NNNN` to start work, or suggest `/task-create` for a fix task
124
124
  - `in-progress` → continue the fix; `/bug-close BUG-NNNN` when the fix commit and regression test land
125
125
 
126
126
  ### 6e. Warnings (omit if none found)
@@ -131,7 +131,7 @@ Flag, each as its own short block: dependency cycles (`BUG-NNNN → BUG-MMM →
131
131
 
132
132
  ## Constraints
133
133
 
134
- - Read-only except the Step 3 batch-triage edits (status flip to `triaged`, triage fields, index row text, one combined log entry) — never flip to `in-progress` or a terminal status, never archive, never create task files. That is `/bug-triage`, `/bug-close`, and `/task-add`'s job once the user acts on this report.
134
+ - Read-only except the Step 3 batch-triage edits (status flip to `triaged`, triage fields, index row text, one combined log entry) — never flip to `in-progress` or a terminal status, never archive, never create task files. That is `/bug-triage`, `/bug-close`, and `/task-create`'s job once the user acts on this report.
135
135
  - Permitted tools: `list_dir`, `find_file`, `Read`, `Edit`, `AskUserQuestion` (Step 3 confirmations only — otherwise this skill should run to completion without prompting).
136
136
  - Never bash reads (`cat`/`find`/`grep`/`sed`/`ls`).
137
137
  - Keep the report terse — no preamble, no closing summary beyond the tables above.
@@ -23,18 +23,11 @@ Finalize a bug that has been fixed. Records the root cause, the resolution (comm
23
23
 
24
24
  ### Step 1: Resolve the Bug File
25
25
 
26
- Parse `$ARGUMENTS`. Accepted forms:
27
- - `BUG-NNNN` (e.g. `BUG-0042`)
28
- - `NNNN` (e.g. `0042` or `42`)
29
- - `NNNN-slug` (e.g. `0042-csv-export`)
30
- - Full path
31
-
32
- Resolution order:
33
- 1. If full path: confirm with `mcp__serena__list_dir`.
34
- 2. Otherwise normalize and search `wiki/work/bugs/` first via `mcp__serena__find_file`.
35
- 3. If found in `wiki/work/bugs/` root: STOP and tell the user the bug must be triaged and worked first — `/bug-triage` → choose "Start work now" → land a fix → re-run `/bug-close`.
36
- 4. If found in `archive/`: STOP — already terminal.
37
- 5. If not found anywhere: STOP and report the error.
26
+ Resolve the file per ~/.claude/skills/_shared/ID-RESOLUTION.md — family: bugs · scope: active-then-archive-gate · ambiguous: interactive · empty: not found anywhere → STOP and report the error
27
+
28
+ Gates on the resolution result:
29
+ - If found in `wiki/work/bugs/` root: STOP and tell the user the bug must be triaged and worked first — `/bug-triage` → choose "Start work now" → land a fix → re-run `/bug-close`.
30
+ - If found in `archive/`: STOP — already terminal.
38
31
 
39
32
  Read the bug file in full.
40
33
 
@@ -59,7 +52,7 @@ Use `AskUserQuestion` (single-select):
59
52
 
60
53
  | Choice | Effect | When to pick |
61
54
  |--------|--------|--------------|
62
- | **Verify and close** (default) | Status → `verified`; **move file** to `archive/` | A fix has been merged and validated |
55
+ | **Verify and close** (default) | Status → `closed`; **move file** to `archive/` | A fix has been merged and validated |
63
56
  | **Mark fixed (not yet verified)** | Status → `fixed`; file stays in `wiki/work/bugs/` | Patch landed but waiting on UAT or staging soak |
64
57
  | **Won't fix (late decision)** | Status → `wontfix`; **move file** to `archive/` | Investigation revealed the fix isn't worth the cost or invalidates a constraint |
65
58
  | **Cannot reproduce (re-evaluated)** | Status → `cannot-reproduce`; **move file** to `archive/` | Work started, repro never re-surfaced, abandoning |
@@ -80,7 +73,7 @@ Edit the bug file to replace the placeholder line under `## Root Cause Analysis`
80
73
 
81
74
  Use `AskUserQuestion` (batched where the UI permits):
82
75
 
83
- | Field | Form | Required for `verified`? |
76
+ | Field | Form | Required for `closed`? |
84
77
  |-------|------|--------------------------|
85
78
  | Fix commit | Short SHA (or "see PR") | **Yes** |
86
79
  | Fix version | Release tag or `—` | No |
@@ -102,24 +95,17 @@ Update `Status:` and `Last updated:` in the bug file via `Edit` before moving.
102
95
 
103
96
  | Outcome | Action |
104
97
  |---------|--------|
105
- | Verify and close | Archive-move sequence (see below) with status `verified` |
98
+ | Verify and close | Archive with `terminal_status: closed` |
106
99
  | Mark fixed | No move |
107
- | Won't fix / Cannot reproduce | Archive-move sequence (see below) with the appropriate status |
108
-
109
- **Archive-move sequence** (for all terminal outcomes — `Bash` only for `git mv`):
100
+ | Won't fix / Cannot reproduce | Archive with `terminal_status: wontfix` or `cannot-reproduce` |
110
101
 
111
- 1. `Bash`: `git mv wiki/work/bugs/NNNN-slug.md wiki/work/bugs/archive/NNNN-slug.md`
112
- 2. `Edit`: remove the bug's row from `wiki/work/bugs/index.md`
113
- 3. `Edit`: append to `wiki/work/bugs/archive/index.md`: `| [[BUG-NNNN]] | <title> | <status> | YYYY-MM-DD |`
114
- 4. `Edit`: append to `wiki/log.md`
102
+ For every archiving outcome, read `~/.claude/skills/_shared/ARCHIVE-WORK-ITEM.md` now, then run its Procedure: `family: bugs`, `terminal_status: closed | wontfix | cannot-reproduce`, default log entry. That procedure writes the only `wiki/log.md` entry for the close.
115
103
 
116
104
  ### Step 8: Update the Bug Index
117
105
 
118
- For all terminal outcomes (`verified`, `wontfix`, `cannot-reproduce`), the archive-move sequence in Step 7 already removes the active index row and appends to `archive/index.md`. No further index edits are needed for those outcomes.
119
-
120
106
  For `fixed` (no move): find the row for this bug in `wiki/work/bugs/index.md` and update the `Status` column to `fixed`.
121
107
 
122
- Use **`Edit`** — one targeted call. Never `sed`, `awk`, `perl -i`, or `echo >>`.
108
+ Use one targeted `Edit` call. Edit only — see `~/.claude/skills/_shared/SKILL-BOILERPLATE.md` § Edit hygiene.
123
109
 
124
110
  ### Step 9: Cross-Linking
125
111
 
@@ -132,5 +118,8 @@ Print:
132
118
  - Bug ID, title
133
119
  - Old status → new status; folder move (if any)
134
120
  - Resolution summary: fix commit, regression test path
135
- - For `verified`: a one-line clustering check — search `wiki/work/bugs/archive/` for the last 3 closes with overlapping `Tags` and surface them as "related recent closes" so the user can spot systemic issues.
121
+ - For `closed`: a one-line clustering check — search `wiki/work/bugs/archive/` for the last 3 closes with overlapping `Tags` and surface them as "related recent closes" so the user can spot systemic issues.
122
+ - If the clustering check finds **2 or more** related recent closes (not counting the bug just closed), use `AskUserQuestion` to ask inline: `N related bugs closed recently with tag(s) <tags> — <BUG-NNNN titles>. File a regression-prevention task? (y/n)`
123
+ - On yes: invoke `Skill` `task-create` with a description referencing the clustered bug IDs and shared tag(s) (e.g. "Investigate recurring `<tag>` failures — see BUG-0003, BUG-0006, BUG-0009"). Do not pass `--roadmap` — there's no roadmap context here; the user can link one later via `/task-create --roadmap` if warranted.
124
+ - On no (or ≤1 related close): unchanged from today — print the clustering observation and stop, no prompt.
136
125
  - For `fixed`: remind the user to re-run `/bug-close` once verification lands.