@codewizard-dt/bootstrap 5.3.0 → 6.0.1
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/LICENSE.md +105 -0
- package/README.md +22 -3
- package/bin/cli.js +16 -0
- package/lib/hooks/README.md +124 -3
- package/lib/hooks/claude-settings-guard.js +8 -2
- package/lib/prompts/README.md +1 -1
- package/lib/prompts/migrate-wiki.md +7 -7
- package/lib/scripts/README.md +111 -10
- package/lib/scripts/bootstrap-prefs-tui.js +1222 -0
- package/lib/scripts/install-global.sh +137 -6
- package/lib/scripts/migrate-project.sh +53 -11
- package/lib/scripts/rename-wiki-ids.js +232 -0
- package/lib/scripts/templates/CLAUDE-wiki.md +6 -6
- package/lib/scripts/templates/bootstrap-prefs-schema.json +11 -2
- package/lib/scripts/templates/settings-deny.json +1 -1
- package/lib/scripts/templates/settings-sandbox-unattended.json +36 -0
- package/lib/scripts/templates/settings-sandbox.json +7 -0
- package/lib/scripts/templates/wiki/conventions.md +9 -9
- package/lib/scripts/templates/wiki/dashboard.html +527 -23
- package/lib/scripts/templates/wiki/index.md +2 -2
- package/lib/scripts/templates/wiki/work/bugs/lifecycle.md +1 -1
- package/lib/scripts/templates/wiki/work/decisions/index.md +12 -4
- package/lib/scripts/templates/wiki/work/decisions/lifecycle.md +11 -9
- package/lib/scripts/templates/wiki/work/requirements/index.md +12 -4
- package/lib/scripts/templates/wiki/work/requirements/lifecycle.md +8 -8
- package/lib/scripts/templates/wiki/work/roadmaps/index.md +11 -3
- package/lib/scripts/templates/wiki/work/roadmaps/lifecycle.md +7 -5
- package/lib/scripts/templates/wiki/work/tasks/index.md +1 -1
- package/lib/scripts/templates/wiki/work/tasks/lifecycle.md +16 -8
- package/lib/scripts/templates/wiki/work/uat/lifecycle.md +3 -3
- package/lib/scripts/wiki-dashboard-server.js +98 -0
- package/lib/skills/README.md +27 -22
- package/lib/skills/_shared/ARCHIVE-WORK-ITEM.md +103 -0
- package/lib/skills/_shared/ID-RESOLUTION.md +142 -0
- package/lib/skills/_shared/SKILL-BOILERPLATE.md +50 -0
- package/lib/skills/adr-assess/SKILL.md +112 -0
- package/lib/skills/{decision-create → adr-create}/SKILL.md +26 -26
- package/lib/skills/adr-deprecate/SKILL.md +190 -0
- package/lib/skills/adr-extract/SKILL.md +255 -0
- package/lib/skills/{decision-finalize → adr-finalize}/SKILL.md +38 -38
- package/lib/skills/{decision-next → adr-next}/SKILL.md +20 -19
- package/lib/skills/{decision-walkthrough → adr-walkthrough}/SKILL.md +23 -29
- package/lib/skills/architecture-audit/SKILL.md +1 -1
- package/lib/skills/autopilot/SKILL.md +110 -0
- package/lib/skills/bootstrap-config/SKILL.md +1 -1
- package/lib/skills/bug-assess/SKILL.md +3 -3
- package/lib/skills/bug-close/SKILL.md +13 -27
- package/lib/skills/{bug-file → bug-create}/SKILL.md +10 -14
- package/lib/skills/bug-triage/SKILL.md +5 -19
- package/lib/skills/demo/SKILL.md +1 -1
- package/lib/skills/extract-feature/SKILL.md +3 -3
- package/lib/skills/git-commit/SKILL.md +4 -4
- package/lib/skills/port-feature/SKILL.md +3 -3
- package/lib/skills/power-mode/SKILL.md +42 -49
- package/lib/skills/prd-assess/SKILL.md +105 -0
- package/lib/skills/{req-compile → prd-compile}/SKILL.md +6 -13
- package/lib/skills/{req-create → prd-create}/SKILL.md +19 -19
- package/lib/skills/prd-deprecate/SKILL.md +173 -0
- package/lib/skills/{req-finalize → prd-finalize}/SKILL.md +20 -29
- package/lib/skills/primer/SKILL.md +2 -2
- package/lib/skills/research/SKILL.md +3 -3
- package/lib/skills/roadmap-assess/SKILL.md +20 -20
- package/lib/skills/roadmap-create/SKILL.md +19 -29
- package/lib/skills/roadmap-next/SKILL.md +16 -28
- package/lib/skills/security-audit/SKILL.md +1 -1
- package/lib/skills/tackle/SKILL.md +13 -15
- package/lib/skills/{task-audit → task-assess}/SKILL.md +34 -44
- package/lib/skills/task-close/SKILL.md +73 -0
- package/lib/skills/{task-add → task-create}/SKILL.md +25 -24
- package/lib/skills/uat-assess/SKILL.md +124 -0
- package/lib/skills/uat-auto/SKILL.md +9 -7
- package/lib/skills/uat-auto-plus/SKILL.md +2 -2
- package/lib/skills/{uat-generate → uat-create}/SKILL.md +10 -12
- package/lib/skills/uat-skip/SKILL.md +5 -9
- package/lib/skills/uat-walk/SKILL.md +2 -2
- package/lib/skills/uat-walk/UAT-CORE.md +29 -16
- package/lib/skills/update-docs/SKILL.md +1 -1
- package/lib/skills/usage-report/SKILL.md +52 -0
- package/lib/skills/usage-report/scripts/pricing.json +22 -0
- package/lib/skills/usage-report/scripts/usage-report.js +518 -0
- package/lib/skills/whats-next/SKILL.md +177 -0
- package/lib/skills/wiki-archive/SKILL.md +12 -23
- package/lib/skills/wiki-lint/SKILL.md +23 -13
- package/lib/skills/wiki-query/SKILL.md +1 -1
- package/lib/skills/wiki-rotate-log/SKILL.md +1 -1
- package/lib/skills/wiki-tidy/SKILL.md +6 -9
- package/package.json +3 -3
- package/lib/scripts/templates/wiki/work/decisions/archive/index.md +0 -10
- package/lib/scripts/templates/wiki/work/requirements/archive/index.md +0 -10
- package/lib/scripts/templates/wiki/work/roadmaps/archive/index.md +0 -10
- package/lib/skills/req-extract-decisions/SKILL.md +0 -241
- package/lib/skills/req-retire/SKILL.md +0 -185
- package/lib/skills/req-update/SKILL.md +0 -265
- package/lib/skills/task-trash/SKILL.md +0 -115
- package/lib/skills/task-update/SKILL.md +0 -136
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: req-extract-decisions
|
|
3
|
-
description: Extract Architecturally Significant Requirements from an approved requirement, cross-check existing decisions, and propose Decision Group candidates for /decision-create
|
|
4
|
-
category: planning
|
|
5
|
-
model: claude-opus-5
|
|
6
|
-
effort: high
|
|
7
|
-
argument-hint: <path/to/req.md, NNN-slug, or NNN>
|
|
8
|
-
disable-model-invocation: false
|
|
9
|
-
user-invocable: true
|
|
10
|
-
---
|
|
11
|
-
**Prereqs:** obey `wiki/guides/mcp-tools.md`; run /primer if not done this session.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# Requirement to Decisions
|
|
15
|
-
|
|
16
|
-
Bridge an **approved** requirement into the architectural decision pipeline. This skill walks the requirement, extracts **Architecturally Significant Requirements (ASRs)**, cross-checks them against the existing decision log, groups remaining ASRs into Decision Group candidates, and writes both sides of the bidirectional cross-link: placeholder rows in the requirement's `## Linked Decisions` table and `Source REQ:` back-links on any existing decision that already covers an ASR.
|
|
17
|
-
|
|
18
|
-
This skill **never** invokes `/decision-create` itself. It surfaces the commands the user runs next, one per confirmed Decision Group. The user remains in control of which decisions to write, when, and with what scope.
|
|
19
|
-
|
|
20
|
-
**Check `wiki/work/decisions/lifecycle.md` AND `wiki/work/decisions/` first.** The lifecycle defines the decision format; recent decision files show the `## Linked Decisions` table format with wikilinks and the ASR taxonomy.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
**Target**: $ARGUMENTS
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Instructions
|
|
29
|
-
|
|
30
|
-
### Step 1: Resolve the requirement file
|
|
31
|
-
|
|
32
|
-
Parse `$ARGUMENTS` to identify the target:
|
|
33
|
-
|
|
34
|
-
| Input form | Resolution |
|
|
35
|
-
|------------|------------|
|
|
36
|
-
| `<path>` (e.g. `wiki/work/requirements/REQ-003-onboarding.md`) | Use as-is; verify the file exists |
|
|
37
|
-
| `<NNN-slug>` (e.g. `003-onboarding`) | `mcp__serena__find_file` with mask `003-onboarding.md` under `wiki/work/requirements/` |
|
|
38
|
-
| `<NNN>` (e.g. `3` or `003`) | Pad to 3 digits; `mcp__serena__find_file` with mask `NNN-*.md` under `wiki/work/requirements/` |
|
|
39
|
-
| Empty / missing | List every requirement in `wiki/work/requirements/` whose `status` is `approved`, one row per file, and ask the user via `AskUserQuestion` to pick one |
|
|
40
|
-
|
|
41
|
-
If the file cannot be located, **stop** and report — do not invent or create.
|
|
42
|
-
|
|
43
|
-
### Step 2: Verify status is `approved`
|
|
44
|
-
|
|
45
|
-
Read the requirement's frontmatter `status` field. Refuse to continue with explicit guidance for any non-approved status:
|
|
46
|
-
|
|
47
|
-
| Current Status | Action |
|
|
48
|
-
|----------------|--------|
|
|
49
|
-
| `approved` | Continue to Step 3 |
|
|
50
|
-
| `draft` | Stop. Tell the user: "This requirement is still in draft. Run `/req-finalize <path>` first, then re-run `/req-extract-decisions`." |
|
|
51
|
-
| `retired` | Stop. Tell the user: "This requirement is retired. If a new architectural decision is needed, write a new requirement via `/req-create`." |
|
|
52
|
-
| `superseded` | Stop. Tell the user: "This requirement has been superseded. Run `/req-extract-decisions` against the successor requirement instead." |
|
|
53
|
-
|
|
54
|
-
### Step 3: Read the requirement and extract ASR candidates
|
|
55
|
-
|
|
56
|
-
Walk the requirement section by section and identify statements that imply architectural decisions. Use the ASR taxonomy — anything that affects structure, NFRs, dependencies, interfaces, construction techniques, or hard-to-reverse choices.
|
|
57
|
-
|
|
58
|
-
Scan with this map:
|
|
59
|
-
|
|
60
|
-
| Source Section | What to scan for | Likely decision category |
|
|
61
|
-
|----------------|------------------|--------------------------|
|
|
62
|
-
| Problem Statement | Mentions of scale, latency, integration boundaries, multi-tenancy | Structure, NFRs |
|
|
63
|
-
| Goals + Success Metrics | Quantitative thresholds (p95 latency, throughput, availability, error budget) | NFRs |
|
|
64
|
-
| User Stories acceptance criteria | Cross-system integrations, real-time requirements, transactional boundaries | Interfaces, NFRs |
|
|
65
|
-
| Constraints | Regulatory, compliance, vendor-mandated, contractual | Dependencies, security |
|
|
66
|
-
| Assumptions | Existing-system dependencies the requirement relies on | Dependencies |
|
|
67
|
-
| Non-Goals | What is NOT being built — informs scope of decisions, prevents over-broad decisions | Scope-bounding |
|
|
68
|
-
|
|
69
|
-
Build a candidate-ASR table. Every row must trace to a specific requirement location — quote or paraphrase verbatim, never invent:
|
|
70
|
-
|
|
71
|
-
| ASR# | ASR Statement (from requirement) | Source Section | Likely Decision Area | Likely Category |
|
|
72
|
-
|------|----------------------------------|----------------|----------------------|-----------------|
|
|
73
|
-
| A1 | "p95 search latency < 200ms with 10k active users" | SM-2 | search-infrastructure | NFR / Structure |
|
|
74
|
-
| A2 | "Must comply with SOC 2 access controls" | Constraint 1 | auth-and-access | Dependencies / Security |
|
|
75
|
-
| A3 | "Onboarding flow integrates with HRIS providers" | US-3 AC#2 | hris-integration | Interfaces |
|
|
76
|
-
|
|
77
|
-
**Boundary enforcement:** If an ASR statement smuggles a solution ("use Redis", "switch to GraphQL"), reformulate it as the underlying outcome ("session lookups must be < 5ms p99", "client schemas must evolve without redeploys") before adding it to the table.
|
|
78
|
-
|
|
79
|
-
If a candidate is borderline, exclude it and note the exclusion.
|
|
80
|
-
|
|
81
|
-
### Step 4: Cross-check existing decisions
|
|
82
|
-
|
|
83
|
-
For each candidate ASR, check whether an existing `accepted` decision already covers it.
|
|
84
|
-
|
|
85
|
-
**Procedure:**
|
|
86
|
-
|
|
87
|
-
1. `mcp__serena__list_dir` on `wiki/work/decisions/` to enumerate decision files
|
|
88
|
-
2. `Read` each decision file and walk every `## D*` block; collect blocks where `status: accepted` (or recently `proposed`)
|
|
89
|
-
3. For each candidate ASR, score each decision block using Tier-1 tag-overlap signal:
|
|
90
|
-
|
|
91
|
-
| Tier | Signal | Detection |
|
|
92
|
-
|------|--------|-----------|
|
|
93
|
-
| 1 | Tag overlap on the decision block | ≥ 1 shared tag with the ASR's likely decision area |
|
|
94
|
-
| 2 | Decision sub-title noun-phrase overlap | Substantial overlap |
|
|
95
|
-
| 3 | File-slug stem overlap | Only when the decision is a single-decision file |
|
|
96
|
-
|
|
97
|
-
4. Build the existing-coverage table:
|
|
98
|
-
|
|
99
|
-
| ASR# | Existing Decision Coverage | Coverage Status | Action |
|
|
100
|
-
|------|---------------------------|-----------------|--------|
|
|
101
|
-
| A1 | none | — | propose new decision |
|
|
102
|
-
| A2 | [[0003-auth-and-access\|DEC-0003#D2]] (tags: auth, soc2) | accepted | reuse — no new decision; add Source REQ back-link |
|
|
103
|
-
| A3 | [[0005-integrations\|DEC-0005#D1]] (tags: hris) | proposed | propose new decision if A3's scope is broader |
|
|
104
|
-
|
|
105
|
-
A `proposed` candidate is **not** a substitute for new coverage — flag it for the user.
|
|
106
|
-
|
|
107
|
-
### Step 5: Group ASRs into Decision Group candidates
|
|
108
|
-
|
|
109
|
-
Group ASRs **not already covered** by accepted decisions.
|
|
110
|
-
|
|
111
|
-
Group when shared context, deciders, or tight coupling argues for one file. Split when decision areas, audiences, or timelines diverge. Default to splitting when in doubt.
|
|
112
|
-
|
|
113
|
-
Output the proposed grouping table:
|
|
114
|
-
|
|
115
|
-
| Group | ASRs | Suggested Decision Slug | Rationale (group/split signal) |
|
|
116
|
-
|-------|------|-----------------------|--------------------------------|
|
|
117
|
-
| G1 | A1 | search-infrastructure | Single decision area, single decider set |
|
|
118
|
-
| G2 | A3 | hris-integration | Distinct decision area; different reviewers from G1 |
|
|
119
|
-
|
|
120
|
-
### Step 6: Present and confirm via `AskUserQuestion`
|
|
121
|
-
|
|
122
|
-
Show the user three tables in this order:
|
|
123
|
-
|
|
124
|
-
1. The full ASR table from Step 3 (with the existing-coverage column folded in from Step 4)
|
|
125
|
-
2. The proposed grouping from Step 5
|
|
126
|
-
3. A per-group action prompt
|
|
127
|
-
|
|
128
|
-
For **each proposed group**, ask: "Create this as a decision now?" with options:
|
|
129
|
-
|
|
130
|
-
| Option | Meaning |
|
|
131
|
-
|--------|---------|
|
|
132
|
-
| `yes` | Confirm the group; the skill will write a placeholder row in the requirement and the user will run `/decision-create` next |
|
|
133
|
-
| `defer` | Keep the ASRs in the requirement's `## Linked Decisions` table as `not yet created` |
|
|
134
|
-
| `merge into <Gx>` | Combine this group with another listed group |
|
|
135
|
-
| `split` | Break this group into multiple smaller groups |
|
|
136
|
-
| `skip — already covered` | Drop the group; the ASR is handled by an existing decision |
|
|
137
|
-
| `skip — non-architectural` | Drop the group; handle directly via `/task-add --req REQ-NNNN` |
|
|
138
|
-
|
|
139
|
-
### Step 7: Update the requirement's `## Linked Decisions` section
|
|
140
|
-
|
|
141
|
-
Use `Read` then `Edit` to populate the requirement's `## Linked Decisions` table. The edit is **surgical** — replace only the placeholder row inside that section.
|
|
142
|
-
|
|
143
|
-
For each row in the confirmed plan, use **wikilink format** for existing decisions:
|
|
144
|
-
|
|
145
|
-
| ASR | Decision | Status |
|
|
146
|
-
|-----|----------|--------|
|
|
147
|
-
| A1: <verbatim statement> | _to be created via `/decision-create group: search-infrastructure`_ | not yet created |
|
|
148
|
-
| A2: <verbatim statement> | `[[0003-auth-and-access\|DEC-0003#D2]]` | accepted |
|
|
149
|
-
| A3: <verbatim statement> | _to be created via `/decision-create hris-integration`_ | not yet created |
|
|
150
|
-
|
|
151
|
-
Rules for the row content:
|
|
152
|
-
|
|
153
|
-
| Column | Rule |
|
|
154
|
-
|--------|------|
|
|
155
|
-
| `ASR` | The ASR ID and verbatim (or near-verbatim) statement from Step 3 |
|
|
156
|
-
| `Decision` | If covered by existing decision: wikilink `[[NNNN-slug\|DEC-NNNN#DM]]`. If creating new: italicized placeholder with the exact `/decision-create` command |
|
|
157
|
-
| `Status` | `accepted` / `proposed` / `not yet created` |
|
|
158
|
-
|
|
159
|
-
Also update the requirement's frontmatter `updated` to today's date. Both edits use `Read` + `Edit` — never `sed`, `echo >>`, or `cat <<EOF`.
|
|
160
|
-
|
|
161
|
-
Append to `wiki/log.md`:
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
## [YYYY-MM-DD] req-extract-decisions | REQ-NNNN <title> — N ASRs identified
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### Step 8: Update existing decisions that reuse requirement ASRs
|
|
168
|
-
|
|
169
|
-
For each ASR marked as "covered by existing decision" in Step 4 and confirmed by the user in Step 6, edit the referenced decision's `### Links` section to add a `Source REQ:` line.
|
|
170
|
-
|
|
171
|
-
For each affected decision file:
|
|
172
|
-
|
|
173
|
-
1. `Read` the file
|
|
174
|
-
2. Locate the target decision's `### Links` section
|
|
175
|
-
3. Check whether `Source REQ: REQ-NNNN` already exists — **skip if present** (idempotent)
|
|
176
|
-
4. `Edit` to append: `- Source REQ: [REQ-NNNN](../requirements/NNN-slug.md)`
|
|
177
|
-
|
|
178
|
-
Touch only the target decision's `### Links`. Do not modify any decision's status, metadata, or content beyond the `### Links` append.
|
|
179
|
-
|
|
180
|
-
### Step 9: Report and instruct
|
|
181
|
-
|
|
182
|
-
Print a tabular completion report:
|
|
183
|
-
|
|
184
|
-
| Field | Value |
|
|
185
|
-
|-------|-------|
|
|
186
|
-
| Requirement | `REQ-NNNN <title>` |
|
|
187
|
-
| ASRs identified | count |
|
|
188
|
-
| ASRs covered by existing decisions | count (linked back) |
|
|
189
|
-
| New decision groups proposed | count |
|
|
190
|
-
| New decision groups confirmed by user | count |
|
|
191
|
-
| ASRs deferred | count |
|
|
192
|
-
| ASRs skipped as non-architectural | count |
|
|
193
|
-
| Requirement `## Linked Decisions` updated | yes |
|
|
194
|
-
| Existing decision back-links added | count |
|
|
195
|
-
| Log entry | appended to wiki/log.md |
|
|
196
|
-
|
|
197
|
-
Then list the **next-action commands**, one per confirmed new group:
|
|
198
|
-
|
|
199
|
-
```
|
|
200
|
-
To create the proposed decisions, run each:
|
|
201
|
-
/decision-create group: search-infrastructure (from REQ-NNNN)
|
|
202
|
-
/decision-create hris-integration (from REQ-NNNN)
|
|
203
|
-
|
|
204
|
-
After each /decision-create completes, return to REQ-NNNN's `## Linked Decisions` table
|
|
205
|
-
and update the placeholder row with the actual wikilink [[NNNN-slug|DEC-NNNN#DM]].
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
If any ASRs were skipped as non-architectural, also surface:
|
|
209
|
-
|
|
210
|
-
```
|
|
211
|
-
The following ASRs are best handled directly as tasks (no decision needed):
|
|
212
|
-
/task-add --req REQ-NNNN "<short description for ASR Ax>"
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
The skill does **not** auto-invoke `/decision-create` or `/task-add`. It surfaces the commands; the user runs them.
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
## Output Formatting Rules (mandatory)
|
|
220
|
-
|
|
221
|
-
1. **Tables, not bullets.** ASR identification, existing-coverage analysis, and grouping proposals are all tables.
|
|
222
|
-
2. **Never auto-invoke `/decision-create` or `/task-add`.** Surface the exact commands; the user runs them.
|
|
223
|
-
3. **Never invent ASRs.** Every entry in the ASR table must trace to a specific requirement section, quoted or paraphrased verbatim.
|
|
224
|
-
4. **Boundary rule is enforced strictly.** Requirements ask for outcomes, decisions admit trade-offs. If a candidate ASR sounds like a solution, reformulate it as the underlying outcome.
|
|
225
|
-
5. **Requirement edits are surgical.** Use `Read` then `Edit` to update only the `## Linked Decisions` table and the `updated` field. Never rewrite the file.
|
|
226
|
-
6. **Idempotent back-links.** If `Source REQ: REQ-NNNN` already exists in a decision's `### Links`, skip the edit. Re-running this skill against the same requirement must not duplicate links.
|
|
227
|
-
7. **Wikilinks for existing decisions.** Use `[[NNNN-slug\|DEC-NNNN#DM]]` format in the `## Linked Decisions` table.
|
|
228
|
-
|
|
229
|
-
---
|
|
230
|
-
|
|
231
|
-
## CRITICAL Rules
|
|
232
|
-
|
|
233
|
-
1. **Refuse to run on requirements not in `approved` status.** Step 2 is a hard gate.
|
|
234
|
-
2. **Never invent ASRs.** Every candidate is grounded in a specific requirement section.
|
|
235
|
-
3. **Never auto-create decisions.** Surface them as commands the user runs.
|
|
236
|
-
4. **Cross-check existing decisions before proposing duplicates.** Step 4 is mandatory.
|
|
237
|
-
5. **Bidirectional linkage is the contract.** The requirement's `## Linked Decisions` and any existing decision's `### Links` must both reflect the relationship. Re-running is idempotent.
|
|
238
|
-
6. **Per-decision tag overlap is the existing-coverage signal.**
|
|
239
|
-
7. **Maximum 3 sub-processes at a time** if delegating research or coverage analysis.
|
|
240
|
-
8. **Always terminate processes when done.**
|
|
241
|
-
9. **Never use `sed`/`echo >>`/`cat <<EOF`** — always `Read` + `Edit`.
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: req-retire
|
|
3
|
-
description: Retire a requirement — set status to retired in frontmatter, document the reason, move to archive/, append a log entry.
|
|
4
|
-
category: planning
|
|
5
|
-
model: claude-haiku-4-5-20251001
|
|
6
|
-
argument-hint: <wiki/work/requirements/REQ-NNNN-slug.md, NNN-slug, or NNN> [reason]
|
|
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
|
-
**Read `wiki/work/requirements/lifecycle.md` first** — it defines the requirement lifecycle, terminal states, and the archive rule.
|
|
12
|
-
|
|
13
|
-
# Retire Requirement
|
|
14
|
-
|
|
15
|
-
Set a requirement's `status` to `retired`, document why, then move the file to `wiki/work/requirements/archive/`. After archiving, cross-references using `[[REQ-NNNN]]` remain valid — the ID is stable regardless of file location.
|
|
16
|
-
|
|
17
|
-
This skill is a focused shortcut for the retirement flow. For amendments that don't touch status, use `/req-update`. For supersession (a new requirement replaces this one), use `/req-update` with supersession intent or pass `status: superseded` instructions here.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
**Requirement**: $ARGUMENTS
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Instructions
|
|
28
|
-
|
|
29
|
-
### Step 1: Resolve the requirement file
|
|
30
|
-
|
|
31
|
-
Parse `$ARGUMENTS`:
|
|
32
|
-
- **First token(s)** — the file reference: `<path>`, `<NNN-slug>`, or `<NNN>`
|
|
33
|
-
- **Remaining text** — optional reason for retirement (may be elicited in Step 3 if absent)
|
|
34
|
-
|
|
35
|
-
| Input form | Resolution |
|
|
36
|
-
|------------|------------|
|
|
37
|
-
| `<path>` (e.g. `wiki/work/requirements/REQ-003-search.md`) | Use as-is; verify exists via `mcp__serena__find_file` |
|
|
38
|
-
| `<NNN-slug>` (e.g. `003-search`) | `mcp__serena__find_file` with mask `003-search.md` under `wiki/work/requirements/` |
|
|
39
|
-
| `<NNN>` (e.g. `3` or `003`) | Pad to 3 digits; `mcp__serena__find_file` with mask `NNN-*.md` under `wiki/work/requirements/` |
|
|
40
|
-
| Empty / missing | List every requirement in `wiki/work/requirements/` and ask the user via `AskUserQuestion` to pick |
|
|
41
|
-
|
|
42
|
-
If the file cannot be located, **stop** and report.
|
|
43
|
-
|
|
44
|
-
### Step 2: Read the requirement and verify status
|
|
45
|
-
|
|
46
|
-
1. **Read** the requirement file with `Read`.
|
|
47
|
-
2. **Check `status:` in frontmatter:**
|
|
48
|
-
|
|
49
|
-
| Current status | Action |
|
|
50
|
-
|----------------|--------|
|
|
51
|
-
| `draft` | Continue — may be retired before approval |
|
|
52
|
-
| `approved` | Continue — most common case |
|
|
53
|
-
| `retired` | **STOP.** Tell the user: "REQ-NNNN is already retired. No action needed." |
|
|
54
|
-
| `superseded` | **STOP.** Tell the user: "REQ-NNNN is already superseded. No action needed." |
|
|
55
|
-
|
|
56
|
-
3. **Check for downstream artifacts** in `## Linked Decisions` and `## Linked Tasks`:
|
|
57
|
-
- List any linked decisions and their current status
|
|
58
|
-
- List any linked tasks and their current status
|
|
59
|
-
- Build a downstream artifacts table for Step 3
|
|
60
|
-
|
|
61
|
-
### Step 3: Confirm with the user
|
|
62
|
-
|
|
63
|
-
Use `AskUserQuestion` to confirm. Show:
|
|
64
|
-
|
|
65
|
-
- The requirement file to be retired (full path, ID, title)
|
|
66
|
-
- Current status
|
|
67
|
-
- Downstream artifacts table (if any linked decisions or tasks exist):
|
|
68
|
-
|
|
69
|
-
| Artifact | Type | Current status | Suggested action |
|
|
70
|
-
|----------|------|----------------|------------------|
|
|
71
|
-
| `[[0007-auth\|DEC-0007#D2]]` | linked decision | accepted | Review independently — accepted decisions are immutable; if no longer needed, write a deprecating successor |
|
|
72
|
-
| `[[004-billing\|TASK-004]]` | linked task | todo | Run `/task-trash wiki/work/tasks/TASK-004-billing.md` if the task is also cancelled |
|
|
73
|
-
|
|
74
|
-
Ask the user:
|
|
75
|
-
|
|
76
|
-
1. **"Retire this requirement? (yes / no)"**
|
|
77
|
-
2. **"Reason for retiring REQ-NNNN?"** (if not provided in `$ARGUMENTS` — required, one line or more)
|
|
78
|
-
|
|
79
|
-
If the user says **No**, STOP. Do not proceed.
|
|
80
|
-
|
|
81
|
-
**Do NOT ask whether to retire linked decisions or tasks** — they are surfaced as suggestions only. This skill never auto-cascades.
|
|
82
|
-
|
|
83
|
-
### Step 4: Apply the retirement edits
|
|
84
|
-
|
|
85
|
-
Use `Edit` for all changes — never `sed`, `awk`, `echo >>`, `cat <<EOF`, or `Write` for a full-file rewrite.
|
|
86
|
-
|
|
87
|
-
Apply in this order:
|
|
88
|
-
|
|
89
|
-
1. **Update `status: <current>` → `status: retired`** in frontmatter.
|
|
90
|
-
2. **Update `updated: YYYY-MM-DD`** in frontmatter to today's date.
|
|
91
|
-
3. **Append the retirement reason to `## Notes`**:
|
|
92
|
-
- If `## Notes` already has content, append a new paragraph.
|
|
93
|
-
- If `## Notes` is empty or has only a placeholder, replace the placeholder with the retirement entry:
|
|
94
|
-
```
|
|
95
|
-
**Retired [YYYY-MM-DD]**: <reason provided by user>
|
|
96
|
-
```
|
|
97
|
-
- If the `## Notes` section does not exist, add it at the end of the file.
|
|
98
|
-
|
|
99
|
-
### Step 5: Remove from the family index
|
|
100
|
-
|
|
101
|
-
`retired` is a terminal status — **delete the requirement's row** from `wiki/work/requirements/index.md` (the family index lists active items only).
|
|
102
|
-
|
|
103
|
-
Use `Read` then `Edit` — never `echo >>` or `sed`. If the row is already absent, note it and continue.
|
|
104
|
-
|
|
105
|
-
### Step 5.5: Archive the file
|
|
106
|
-
|
|
107
|
-
Move the file to `archive/` (Bash — `git mv` only):
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
git mv wiki/work/requirements/<file>.md wiki/work/requirements/archive/<file>.md
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
Then append to `wiki/work/requirements/archive/index.md`:
|
|
114
|
-
|
|
115
|
-
```
|
|
116
|
-
| [[REQ-NNNN]] | <Title> | retired | YYYY-MM-DD |
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Use `Read` then `Edit` for the archive index append — never `echo >>`.
|
|
120
|
-
|
|
121
|
-
### Step 6: Append to wiki/log.md
|
|
122
|
-
|
|
123
|
-
Append one entry to `wiki/log.md`:
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
## [YYYY-MM-DD] req-retired | REQ-NNNN <title> — reason: <one-line summary of reason>
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Use `Read` then `Edit` — never `echo >>` or `sed`.
|
|
130
|
-
|
|
131
|
-
### Step 7: Surface downstream artifacts for independent action
|
|
132
|
-
|
|
133
|
-
Print the downstream artifacts table from Step 3 again, with suggested next-action commands:
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
Linked decisions and tasks surfaced for independent review:
|
|
137
|
-
|
|
138
|
-
To act on linked tasks (each independently):
|
|
139
|
-
/task-trash wiki/work/tasks/TASK-004-billing.md # if task is also cancelled
|
|
140
|
-
|
|
141
|
-
To act on linked decisions (each independently):
|
|
142
|
-
# Accepted decisions are immutable — write a deprecating successor:
|
|
143
|
-
/decision-create deprecate <topic> (supersedes DEC-0007#D2)
|
|
144
|
-
# Proposed decisions may be left, finalized, or abandoned
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
### Step 8: Report completion
|
|
148
|
-
|
|
149
|
-
Print a tabular summary:
|
|
150
|
-
|
|
151
|
-
| Field | Value |
|
|
152
|
-
|-------|-------|
|
|
153
|
-
| Requirement | `REQ-NNNN <title>` |
|
|
154
|
-
| File path | `wiki/work/requirements/REQ-NNNN-slug.md` → `wiki/work/requirements/archive/REQ-NNNN-slug.md` |
|
|
155
|
-
| Old status | `draft` or `approved` |
|
|
156
|
-
| New status | `retired` |
|
|
157
|
-
| Reason | <one-line summary> |
|
|
158
|
-
| Family index updated | yes (row removed — terminal status) |
|
|
159
|
-
| Archive index updated | yes (row appended) |
|
|
160
|
-
| wiki/log.md entry | yes |
|
|
161
|
-
| Linked decisions surfaced | count |
|
|
162
|
-
| Linked tasks surfaced | count |
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## Output Formatting Rules
|
|
167
|
-
|
|
168
|
-
1. Use tables for the downstream artifacts list and the completion report — never paragraph prose.
|
|
169
|
-
2. **One `Edit` call per change** — never bulk rewrites.
|
|
170
|
-
3. **After archiving, cross-references using `[[REQ-NNNN]]` remain valid** — the ID is stable regardless of file location.
|
|
171
|
-
4. **The skill never auto-retires or auto-deprecates downstream artifacts** — it surfaces them with suggested commands.
|
|
172
|
-
5. **The retirement reason in `## Notes` is permanent** — it is the audit trail for why this requirement was retired.
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## CRITICAL Rules
|
|
177
|
-
|
|
178
|
-
1. **Archiving (not deletion) is the terminal action.** Set `status: retired` in frontmatter AND move the file to `wiki/work/requirements/archive/` via `git mv`.
|
|
179
|
-
2. **Never auto-cascade** to linked decisions or tasks. Surface them as suggestions only.
|
|
180
|
-
3. **Confirm with the user before any edits** — `AskUserQuestion` is mandatory in Step 3.
|
|
181
|
-
4. **Retirement reason is required** — refuse to retire without a documented reason.
|
|
182
|
-
5. **Never use `sed` / `awk` / `echo >>` / `cat <<EOF`** — always `Edit`. `Bash` is permitted only for `git mv`. See `wiki/guides/mcp-tools.md`.
|
|
183
|
-
6. **Refuse if already retired or superseded** — these are terminal states; running again is a no-op, not an error.
|
|
184
|
-
7. Maximum 3 sub-processes at a time if delegating any step.
|
|
185
|
-
8. Always terminate background processes when done.
|