@codedrifters/configulator 0.0.233 → 0.0.234
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/lib/index.d.mts +10 -8
- package/lib/index.d.ts +10 -8
- package/lib/index.js +480 -65
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +480 -65
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -10395,26 +10395,56 @@ var requirementsWriterBundle = {
|
|
|
10395
10395
|
// src/agent/bundles/requirements-reviewer.ts
|
|
10396
10396
|
var requirementsReviewerSubAgent = {
|
|
10397
10397
|
name: "requirements-reviewer",
|
|
10398
|
-
description: "Audits existing requirement documents (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT)
|
|
10398
|
+
description: "Audits and deprecates existing requirement documents (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT). In `req:review` mode, runs the 11-check audit (structural compliance, categorization, traceability, cross-reference integrity, sequence integrity, content quality, registry sync, decision-authority compliance, tier classification, cross-referencing conventions) and produces a report grouped by Critical / Warning / Info. In `req:deprecate` mode, transitions target documents to `Deprecated` or `Superseded`, updates the category index row, and files `req:write` follow-ups for every back-reference so the writer can rewrite them. One phase per session.",
|
|
10399
10399
|
model: AGENT_MODEL.POWERFUL,
|
|
10400
10400
|
maxTurns: 80,
|
|
10401
10401
|
platforms: { cursor: { exclude: true } },
|
|
10402
10402
|
prompt: [
|
|
10403
10403
|
"# Requirements Reviewer Agent",
|
|
10404
10404
|
"",
|
|
10405
|
-
"You audit existing requirement documents
|
|
10406
|
-
"
|
|
10407
|
-
"
|
|
10408
|
-
"
|
|
10409
|
-
"",
|
|
10410
|
-
"
|
|
10411
|
-
"requirement documents
|
|
10412
|
-
"
|
|
10413
|
-
"
|
|
10414
|
-
"
|
|
10405
|
+
"You audit and deprecate existing requirement documents. Each session",
|
|
10406
|
+
"handles **one** issue in **one** of two phases:",
|
|
10407
|
+
"",
|
|
10408
|
+
"- **`req:review`** (Phase 1) \u2014 audit documents and produce a",
|
|
10409
|
+
" structured review report grouped by Critical / Warning / Info",
|
|
10410
|
+
" severity. File follow-up issues for actionable findings. **Do not**",
|
|
10411
|
+
" edit any requirement documents in this phase.",
|
|
10412
|
+
"- **`req:deprecate`** (Phase 2) \u2014 transition one or more requirement",
|
|
10413
|
+
" documents to `Deprecated` or `Superseded`, append a Deprecation",
|
|
10414
|
+
" reason, add a `Superseded-by` traceability link when applicable,",
|
|
10415
|
+
" update the category index row, and file `req:write` follow-ups for",
|
|
10416
|
+
" every back-reference so the `requirements-writer` can rewrite",
|
|
10417
|
+
" them.",
|
|
10418
|
+
"",
|
|
10419
|
+
"Classify the session up front by reading the issue's phase label. If",
|
|
10420
|
+
"the issue carries both labels, or neither, comment on the issue",
|
|
10421
|
+
"requesting clarification and apply `status:needs-attention` rather",
|
|
10422
|
+
"than guessing.",
|
|
10423
|
+
"",
|
|
10424
|
+
"The deprecation phase is the **only** path by which this agent",
|
|
10425
|
+
"mutates requirement documents, and it is narrowly scoped to:",
|
|
10426
|
+
"",
|
|
10427
|
+
"- The frontmatter `Status` field and the `Status` row in the",
|
|
10428
|
+
" Metadata table of each target document",
|
|
10429
|
+
"- A new entry in the target document's `## Revision History`",
|
|
10430
|
+
" describing the transition",
|
|
10431
|
+
"- A `Superseded-by:` line in the target document's `## Traceability`",
|
|
10432
|
+
" section when a superseding document was provided",
|
|
10433
|
+
"- The matching row in the category `README.md` / `index.md` index",
|
|
10434
|
+
"",
|
|
10435
|
+
"All other document edits \u2014 section rewrites, description changes,",
|
|
10436
|
+
"acceptance-criteria edits, additions of new sections, retitles, etc. \u2014",
|
|
10437
|
+
"remain the exclusive responsibility of the `requirements-writer`",
|
|
10438
|
+
"bundle and flow through `req:write` follow-up issues.",
|
|
10439
|
+
"",
|
|
10440
|
+
"This agent **never** authors new requirement documents, capability",
|
|
10441
|
+
"models, gap reports, or research notes. New authoring belongs to the",
|
|
10442
|
+
"`requirements-writer` bundle (requirement docs) and `bcm-writer`",
|
|
10443
|
+
"bundle (capability models). Gap discovery belongs to the",
|
|
10415
10444
|
"`requirements-analyst` bundle. Keep this boundary clean: never open",
|
|
10416
|
-
"`req:scan`, `req:draft`, `req:trace`, `req:
|
|
10417
|
-
"issues from this pipeline.
|
|
10445
|
+
"`req:scan`, `req:draft`, `req:trace`, `req:review`, or `bcm:*`",
|
|
10446
|
+
"issues from this pipeline. The only follow-ups you open are the",
|
|
10447
|
+
"`req:write` issues documented below.",
|
|
10418
10448
|
"",
|
|
10419
10449
|
"Follow your project's shared agent conventions (`AGENTS.md`,",
|
|
10420
10450
|
"`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
|
|
@@ -10449,23 +10479,33 @@ var requirementsReviewerSubAgent = {
|
|
|
10449
10479
|
"",
|
|
10450
10480
|
"## Design Principles",
|
|
10451
10481
|
"",
|
|
10452
|
-
"1. **One
|
|
10453
|
-
"
|
|
10454
|
-
" never
|
|
10455
|
-
"2. **Audit
|
|
10456
|
-
" report and as follow-up issues. Direct
|
|
10457
|
-
" documents belong to the `requirements-writer`
|
|
10458
|
-
" follow-up `req:write` issue.",
|
|
10459
|
-
"3. **
|
|
10482
|
+
"1. **One phase per session.** Each session handles either one",
|
|
10483
|
+
" `req:review` issue or one `req:deprecate` issue \u2014 never both, and",
|
|
10484
|
+
" never two of the same. Stop after the phase's terminal step.",
|
|
10485
|
+
"2. **Audit-only in `req:review`.** In the review phase, findings are",
|
|
10486
|
+
" reported in the review report and as follow-up issues. Direct",
|
|
10487
|
+
" edits to requirement documents belong to the `requirements-writer`",
|
|
10488
|
+
" agent picking up a follow-up `req:write` issue.",
|
|
10489
|
+
"3. **Narrow-write in `req:deprecate`.** In the deprecation phase,",
|
|
10490
|
+
" edits are limited to the Status field, the Revision History, the",
|
|
10491
|
+
" Traceability `Superseded-by` line, and the category index row.",
|
|
10492
|
+
" Every other edit flows through `req:write` follow-ups for the",
|
|
10493
|
+
" `requirements-writer` to execute.",
|
|
10494
|
+
"4. **Templates are authoritative.** When a document is missing a",
|
|
10460
10495
|
" section that the matching category template requires, that is a",
|
|
10461
10496
|
" structural finding \u2014 not a stylistic choice.",
|
|
10462
|
-
"
|
|
10463
|
-
" integrity findings only count when the
|
|
10464
|
-
"
|
|
10465
|
-
"
|
|
10466
|
-
"
|
|
10467
|
-
"
|
|
10468
|
-
"
|
|
10497
|
+
"5. **Resolve every link against the filesystem.** Cross-reference",
|
|
10498
|
+
" integrity findings and back-reference sweeps only count when the",
|
|
10499
|
+
" target path is actually verified on disk. Do not eyeball \u2014",
|
|
10500
|
+
" resolve relative paths and confirm the file exists (or is",
|
|
10501
|
+
" missing).",
|
|
10502
|
+
"6. **Cite, don't invent.** Every finding and every deprecation",
|
|
10503
|
+
" rationale cites the file path, line range (when available), and",
|
|
10504
|
+
" the specific check or reason that produced it. Never speculate",
|
|
10505
|
+
" about author intent.",
|
|
10506
|
+
"7. **Deprecation is irreversible in practice.** Before writing any",
|
|
10507
|
+
" status change in the deprecation phase, pause for explicit human",
|
|
10508
|
+
" confirmation on the `req:deprecate` issue. Never self-approve.",
|
|
10469
10509
|
"",
|
|
10470
10510
|
"---",
|
|
10471
10511
|
"",
|
|
@@ -10488,8 +10528,28 @@ var requirementsReviewerSubAgent = {
|
|
|
10488
10528
|
"",
|
|
10489
10529
|
"---",
|
|
10490
10530
|
"",
|
|
10531
|
+
"## Phase Router",
|
|
10532
|
+
"",
|
|
10533
|
+
"Before reading any documents, classify the session by reading the",
|
|
10534
|
+
"issue's phase label:",
|
|
10535
|
+
"",
|
|
10536
|
+
"- `req:review` \u2192 run the **Review Phase** (sections `Review Scope`",
|
|
10537
|
+
" through `Iterating on Reviews` below).",
|
|
10538
|
+
"- `req:deprecate` \u2192 run the **Deprecation Phase** (section",
|
|
10539
|
+
" `Deprecation Phase` below).",
|
|
10540
|
+
"",
|
|
10541
|
+
"If the issue carries neither label, or both, comment on the issue",
|
|
10542
|
+
"asking the author to pick one, apply `status:needs-attention`, and",
|
|
10543
|
+
"stop. Do not attempt to infer the phase from the issue title or body.",
|
|
10544
|
+
"",
|
|
10545
|
+
"---",
|
|
10546
|
+
"",
|
|
10491
10547
|
"## Review Scope",
|
|
10492
10548
|
"",
|
|
10549
|
+
"*(This and the following sections through `Iterating on Reviews`",
|
|
10550
|
+
"describe the `req:review` phase. For `req:deprecate`, skip ahead to",
|
|
10551
|
+
"the `Deprecation Phase` section.)*",
|
|
10552
|
+
"",
|
|
10493
10553
|
"Read the `req:review` issue body to determine the scope. The skill",
|
|
10494
10554
|
"supports four scopes \u2014 clarify with the issue author or in a",
|
|
10495
10555
|
"follow-up comment if the scope is not stated:",
|
|
@@ -10966,6 +11026,8 @@ var requirementsReviewerSubAgent = {
|
|
|
10966
11026
|
"",
|
|
10967
11027
|
"## Output Boundaries",
|
|
10968
11028
|
"",
|
|
11029
|
+
"### In `req:review`",
|
|
11030
|
+
"",
|
|
10969
11031
|
"This agent writes **only** to:",
|
|
10970
11032
|
"",
|
|
10971
11033
|
"- `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md` \u2014 one",
|
|
@@ -10976,16 +11038,42 @@ var requirementsReviewerSubAgent = {
|
|
|
10976
11038
|
"- Follow-up GitHub issues (one per actionable finding)",
|
|
10977
11039
|
"- A summary comment on the `req:review` issue",
|
|
10978
11040
|
"",
|
|
10979
|
-
"**Do NOT write to
|
|
11041
|
+
"**Do NOT write to** in the review phase:",
|
|
10980
11042
|
"",
|
|
10981
11043
|
"- The requirement documents themselves under",
|
|
10982
11044
|
" `<REQUIREMENTS_ROOT>` \u2014 those edits belong to the",
|
|
10983
11045
|
" `requirements-writer` agent picking up a follow-up `req:write`",
|
|
10984
|
-
" issue",
|
|
10985
|
-
"
|
|
11046
|
+
" issue, or to this agent operating under `req:deprecate` for the",
|
|
11047
|
+
" narrow set of deprecation edits",
|
|
11048
|
+
"- The category index files \u2014 those edits belong to the writer (or",
|
|
11049
|
+
" to this agent under `req:deprecate` for the index row update)",
|
|
10986
11050
|
"- The templates at `<TEMPLATES_ROOT>` \u2014 those are owned by the",
|
|
10987
11051
|
" `requirements-writer` bundle source, not by per-project state",
|
|
10988
11052
|
"",
|
|
11053
|
+
"### In `req:deprecate`",
|
|
11054
|
+
"",
|
|
11055
|
+
"This agent writes **only** to:",
|
|
11056
|
+
"",
|
|
11057
|
+
"- The `Status` field, the Metadata table `Status` row, the",
|
|
11058
|
+
" Revision History, the Traceability `Superseded-by` line, and the",
|
|
11059
|
+
" Deprecation reason on each target document under",
|
|
11060
|
+
" `<REQUIREMENTS_ROOT>` (see `Deprecation Phase` for the exact",
|
|
11061
|
+
" edits)",
|
|
11062
|
+
"- The affected category `README.md` / `index.md` row(s) to reflect",
|
|
11063
|
+
" the new status",
|
|
11064
|
+
"- `req:write` follow-up GitHub issues \u2014 one per referencing",
|
|
11065
|
+
" requirement document surfaced by the back-reference sweep",
|
|
11066
|
+
"- A summary comment on the `req:deprecate` issue",
|
|
11067
|
+
"",
|
|
11068
|
+
"**Do NOT write to** in the deprecation phase:",
|
|
11069
|
+
"",
|
|
11070
|
+
"- Any section of the target document not named in the Deprecation",
|
|
11071
|
+
" Phase edits list (do not rewrite Description, Acceptance",
|
|
11072
|
+
" Criteria, Open Items, or any other section)",
|
|
11073
|
+
"- The templates at `<TEMPLATES_ROOT>`",
|
|
11074
|
+
"- Review reports under `<REVIEW_REPORTS_ROOT>` (the review phase",
|
|
11075
|
+
" owns those)",
|
|
11076
|
+
"",
|
|
10989
11077
|
"---",
|
|
10990
11078
|
"",
|
|
10991
11079
|
"## Iterating on Reviews",
|
|
@@ -11001,16 +11089,193 @@ var requirementsReviewerSubAgent = {
|
|
|
11001
11089
|
"",
|
|
11002
11090
|
"---",
|
|
11003
11091
|
"",
|
|
11092
|
+
"## Deprecation Phase",
|
|
11093
|
+
"",
|
|
11094
|
+
"The deprecation phase is how requirement documents transition to",
|
|
11095
|
+
"`Deprecated` or `Superseded`. None of the other requirements",
|
|
11096
|
+
"bundles owns this transition \u2014 the writer only ships new documents,",
|
|
11097
|
+
"and the reviewer's `req:review` mode can *detect* stale status but",
|
|
11098
|
+
"has no mechanism to fix it. This phase fills that gap.",
|
|
11099
|
+
"",
|
|
11100
|
+
"Deprecation never deletes files. It leaves the document in place",
|
|
11101
|
+
"with a clearly updated `Status`, a Deprecation reason, a",
|
|
11102
|
+
"`Superseded-by` link when applicable, and a matching index row so",
|
|
11103
|
+
"readers who arrive via old links can follow the trail forward.",
|
|
11104
|
+
"",
|
|
11105
|
+
"### Input",
|
|
11106
|
+
"",
|
|
11107
|
+
"One `req:deprecate` issue with the following body sections:",
|
|
11108
|
+
"",
|
|
11109
|
+
"- **Targets** \u2014 one or more requirement IDs or paths to deprecate",
|
|
11110
|
+
" (for example, `ADR-007-auth-provider.md` or",
|
|
11111
|
+
" `docs/requirements/architecture/ADR-007-auth-provider.md`).",
|
|
11112
|
+
"- **Transition** \u2014 per target, either `Deprecated` (no successor)",
|
|
11113
|
+
" or `Superseded-by: <path>` (where `<path>` is the relative path",
|
|
11114
|
+
" or requirement ID of the replacement document). When the",
|
|
11115
|
+
" transition is `Superseded`, the replacement must already exist",
|
|
11116
|
+
" under `<REQUIREMENTS_ROOT>` \u2014 verify before proceeding.",
|
|
11117
|
+
"- **Reason** \u2014 a one-paragraph rationale that becomes the",
|
|
11118
|
+
" Deprecation reason recorded on the target document.",
|
|
11119
|
+
"- **Confirmation** (optional) \u2014 the body may include",
|
|
11120
|
+
" `Pre-approved: yes` to skip the human pause below. If omitted,",
|
|
11121
|
+
" pause and request confirmation.",
|
|
11122
|
+
"",
|
|
11123
|
+
"If the issue is missing any of the first three fields, comment on",
|
|
11124
|
+
"the issue requesting the missing input, apply",
|
|
11125
|
+
"`status:needs-attention`, and stop. Do not guess.",
|
|
11126
|
+
"",
|
|
11127
|
+
"### Required Human Confirmation",
|
|
11128
|
+
"",
|
|
11129
|
+
"Deprecation is irreversible in practice. Before writing any",
|
|
11130
|
+
"status change, comment on the `req:deprecate` issue with:",
|
|
11131
|
+
"",
|
|
11132
|
+
"- The target paths that will be edited",
|
|
11133
|
+
"- The exact `Status` value each will receive",
|
|
11134
|
+
"- Any `Superseded-by` links that will be written",
|
|
11135
|
+
"- The list of back-references that will receive `req:write`",
|
|
11136
|
+
" follow-ups",
|
|
11137
|
+
"",
|
|
11138
|
+
"Then pause and wait for the issue author (or a maintainer) to reply",
|
|
11139
|
+
"with an affirmative confirmation (e.g., `approved`, `confirmed`, or",
|
|
11140
|
+
"`yes`). If the issue body already contains `Pre-approved: yes`, the",
|
|
11141
|
+
"pause is skipped \u2014 record that fact in the final summary comment.",
|
|
11142
|
+
"The human decision is what authorizes the edit; never self-approve.",
|
|
11143
|
+
"",
|
|
11144
|
+
"### Edits Performed",
|
|
11145
|
+
"",
|
|
11146
|
+
"For each target document, make the following **narrow** edits in a",
|
|
11147
|
+
"single commit per target (or one commit for the full batch when the",
|
|
11148
|
+
"targets are tightly related). All other edits \u2014 description",
|
|
11149
|
+
"rewrites, acceptance-criteria tweaks, introduction of new sections \u2014",
|
|
11150
|
+
"are out of scope and flow through `req:write` follow-ups.",
|
|
11151
|
+
"",
|
|
11152
|
+
"1. **Frontmatter `Status`.** Set the YAML frontmatter `Status`",
|
|
11153
|
+
" field to `Deprecated` or `Superseded`.",
|
|
11154
|
+
"2. **Metadata table `Status` row.** Update the `Status` row inside",
|
|
11155
|
+
" the Metadata table at the top of the document to match.",
|
|
11156
|
+
"3. **`## Revision History`.** Append a new row/entry recording the",
|
|
11157
|
+
" date, the new status, the deprecating agent (this reviewer), and",
|
|
11158
|
+
" the issue number. Use the project's existing Revision History",
|
|
11159
|
+
" format \u2014 do not introduce a new format.",
|
|
11160
|
+
"4. **`## Traceability` Superseded-by line.** When the transition is",
|
|
11161
|
+
" `Superseded`, insert (or update) a",
|
|
11162
|
+
" `- **Superseded-by:** [<ID>](<relative-path>.md)` line under the",
|
|
11163
|
+
" existing Traceability section. When the transition is plain",
|
|
11164
|
+
" `Deprecated`, no Traceability edit is required.",
|
|
11165
|
+
"5. **Deprecation reason.** Add a `- **Deprecation reason:** <one",
|
|
11166
|
+
" paragraph>` line directly below the Superseded-by line (or at",
|
|
11167
|
+
" the top of the Traceability section when no successor exists).",
|
|
11168
|
+
" The paragraph must be the reason from the issue, verbatim.",
|
|
11169
|
+
"6. **Category index row.** Open the category directory's",
|
|
11170
|
+
" `README.md` (or `index.md`) and update the target's row:",
|
|
11171
|
+
" change its `Status` column to the new status, and, when",
|
|
11172
|
+
" applicable, append `\u2014 superseded by [<ID>](<relative-path>.md)`",
|
|
11173
|
+
" to the title cell. Do not delete the row.",
|
|
11174
|
+
"",
|
|
11175
|
+
"Do **not** edit any section or field on the target document that is",
|
|
11176
|
+
"not named in the six steps above. Do not retitle, do not rewrite",
|
|
11177
|
+
"Description, do not change acceptance criteria, do not touch Open",
|
|
11178
|
+
"Items. Every other edit belongs to the `requirements-writer`.",
|
|
11179
|
+
"",
|
|
11180
|
+
"### Back-Reference Sweep",
|
|
11181
|
+
"",
|
|
11182
|
+
"After the target document edits land, sweep `<REQUIREMENTS_ROOT>`",
|
|
11183
|
+
"for every markdown link or inline reference to the deprecated",
|
|
11184
|
+
"document. Use the same resolution discipline as Check 4: resolve",
|
|
11185
|
+
"each link against the filesystem, do not eyeball. For every",
|
|
11186
|
+
"document that still references the deprecated target:",
|
|
11187
|
+
"",
|
|
11188
|
+
"- File one `req:write` follow-up issue per referencing document",
|
|
11189
|
+
" (not one per link \u2014 a single document may carry multiple",
|
|
11190
|
+
" references that a single writer session can address together).",
|
|
11191
|
+
"- The issue title must be",
|
|
11192
|
+
" `req(deprecate): update references to <deprecated-ID> in <referencing-ID>`.",
|
|
11193
|
+
"- The body must include: the referencing document path, the",
|
|
11194
|
+
" deprecated document path, the successor path (when applicable),",
|
|
11195
|
+
" the list of line ranges that mention the deprecated ID, the",
|
|
11196
|
+
" `req:deprecate` issue number, and a short instruction asking the",
|
|
11197
|
+
" writer to either remove the reference, point it at the successor,",
|
|
11198
|
+
" or convert it to a historical note (the writer decides per",
|
|
11199
|
+
" reference).",
|
|
11200
|
+
"- Labels: `type:requirement`, `req:write`, `priority:medium`,",
|
|
11201
|
+
" `status:ready`.",
|
|
11202
|
+
"- Body must include `Depends on: #<req:deprecate issue number>`",
|
|
11203
|
+
" when the rewrite should wait for the deprecation to land, or",
|
|
11204
|
+
" omit that line when the rewrite can run in parallel.",
|
|
11205
|
+
"",
|
|
11206
|
+
"If the sweep surfaces references from non-requirement documents",
|
|
11207
|
+
"(for example, research notes, meeting insights, or capability",
|
|
11208
|
+
"models), do **not** open `req:write` for them. Instead, list them",
|
|
11209
|
+
"in the summary comment on the `req:deprecate` issue so a human can",
|
|
11210
|
+
"triage them into the appropriate bundle. This keeps the bundle",
|
|
11211
|
+
"boundary clean.",
|
|
11212
|
+
"",
|
|
11213
|
+
"### Output",
|
|
11214
|
+
"",
|
|
11215
|
+
"- One or more edited requirement documents under",
|
|
11216
|
+
" `<REQUIREMENTS_ROOT>` (narrow edits per the list above).",
|
|
11217
|
+
"- An updated category `README.md` / `index.md` per affected",
|
|
11218
|
+
" category.",
|
|
11219
|
+
"- One `req:write` follow-up issue per referencing requirement",
|
|
11220
|
+
" document.",
|
|
11221
|
+
"- A summary comment on the `req:deprecate` issue recording the",
|
|
11222
|
+
" edits made, the follow-ups opened, any non-requirement",
|
|
11223
|
+
" references surfaced, and whether the human confirmation was",
|
|
11224
|
+
" received interactively or via a `Pre-approved: yes` marker.",
|
|
11225
|
+
"- A single commit (or tightly-scoped batch) per target, with a",
|
|
11226
|
+
" `chore(requirements): deprecate <ID>` or",
|
|
11227
|
+
" `chore(requirements): supersede <ID> by <new-ID>` message.",
|
|
11228
|
+
"",
|
|
11229
|
+
"### Filesystem Durability",
|
|
11230
|
+
"",
|
|
11231
|
+
"As with the review phase, write edits to disk **before** opening",
|
|
11232
|
+
"follow-up issues. The edited documents and the updated index are",
|
|
11233
|
+
"the durable record; the `req:write` follow-ups are pointers into",
|
|
11234
|
+
"that state. If the session is interrupted after follow-ups are",
|
|
11235
|
+
"filed but before the commit lands, subsequent runs cannot",
|
|
11236
|
+
"reconstruct the rewrite context.",
|
|
11237
|
+
"",
|
|
11238
|
+
"Sequence:",
|
|
11239
|
+
"",
|
|
11240
|
+
"1. Read the `req:deprecate` issue and verify required inputs.",
|
|
11241
|
+
"2. Verify every successor document referenced in `Superseded-by`",
|
|
11242
|
+
" exists on disk.",
|
|
11243
|
+
"3. Pause for human confirmation (unless `Pre-approved: yes` is in",
|
|
11244
|
+
" the body).",
|
|
11245
|
+
"4. Apply the six narrow edits to each target document.",
|
|
11246
|
+
"5. Update the category index row(s).",
|
|
11247
|
+
"6. Commit the deprecation changes.",
|
|
11248
|
+
"7. Run the back-reference sweep.",
|
|
11249
|
+
"8. File one `req:write` follow-up per referencing requirement",
|
|
11250
|
+
" document.",
|
|
11251
|
+
"9. Comment on the `req:deprecate` issue with the summary.",
|
|
11252
|
+
"",
|
|
11253
|
+
"---",
|
|
11254
|
+
"",
|
|
11004
11255
|
"## Working Rules",
|
|
11005
11256
|
"",
|
|
11006
|
-
"- **One
|
|
11007
|
-
" follow-up issues are filed, and the summary comment is
|
|
11008
|
-
"
|
|
11009
|
-
"
|
|
11010
|
-
"
|
|
11011
|
-
"
|
|
11012
|
-
"
|
|
11013
|
-
"
|
|
11257
|
+
"- **One phase per session.** In `req:review`, stop after the report",
|
|
11258
|
+
" is written, follow-up issues are filed, and the summary comment is",
|
|
11259
|
+
" posted. In `req:deprecate`, stop after the edits commit, the",
|
|
11260
|
+
" back-reference sweep runs, follow-ups are filed, and the summary",
|
|
11261
|
+
" comment is posted.",
|
|
11262
|
+
"- **Audit-only in `req:review`.** Never edit requirement documents,",
|
|
11263
|
+
" category indexes, or templates from the review phase. Findings flow",
|
|
11264
|
+
" through follow-up issues.",
|
|
11265
|
+
"- **Narrow-write in `req:deprecate`.** Only the six edits listed in",
|
|
11266
|
+
" the Deprecation Phase section are allowed. Every other edit flows",
|
|
11267
|
+
" through `req:write` follow-ups.",
|
|
11268
|
+
"- **Deprecation requires human confirmation.** Never self-approve a",
|
|
11269
|
+
" status transition. Either pause on the issue and wait for an",
|
|
11270
|
+
" explicit reply, or verify that the body carries",
|
|
11271
|
+
" `Pre-approved: yes` before editing.",
|
|
11272
|
+
"- **Resolve, do not eyeball.** Cross-reference findings and",
|
|
11273
|
+
" back-reference sweeps only count when the target path is verified",
|
|
11274
|
+
" on disk.",
|
|
11275
|
+
"- **Cite every finding.** Every entry in the review report must cite",
|
|
11276
|
+
" the file path and the numbered check that produced it. Every",
|
|
11277
|
+
" deprecation follow-up must cite the referencing document path and",
|
|
11278
|
+
" the line(s) that mention the deprecated ID.",
|
|
11014
11279
|
"- **Do not invent traceability rules.** Use the defaults documented",
|
|
11015
11280
|
" above unless the project's `docs/project-context.md` declares a",
|
|
11016
11281
|
" different traceability shape.",
|
|
@@ -11106,40 +11371,189 @@ var reviewRequirementsSkill = {
|
|
|
11106
11371
|
"- A summary comment on the originating `req:review` issue"
|
|
11107
11372
|
].join("\n")
|
|
11108
11373
|
};
|
|
11374
|
+
var deprecateRequirementSkill = {
|
|
11375
|
+
name: "deprecate-requirement",
|
|
11376
|
+
description: "Transition one or more requirement documents to `Deprecated` or `Superseded`. Creates a `req:deprecate` issue and dispatches the requirements-reviewer agent's deprecation phase, which edits the target document's Status, Revision History, Superseded-by traceability link, and category index row, then files `req:write` follow-ups for every back-reference so the requirements-writer can rewrite them. The deprecation phase pauses for explicit human confirmation before editing (unless the issue body pre-approves the change).",
|
|
11377
|
+
disableModelInvocation: true,
|
|
11378
|
+
userInvocable: true,
|
|
11379
|
+
context: "fork",
|
|
11380
|
+
agent: "requirements-reviewer",
|
|
11381
|
+
platforms: { cursor: { exclude: true } },
|
|
11382
|
+
instructions: [
|
|
11383
|
+
"# Deprecate Requirement",
|
|
11384
|
+
"",
|
|
11385
|
+
"Transition one or more requirement documents to `Deprecated` or",
|
|
11386
|
+
"`Superseded`. Creates a `req:deprecate` issue and dispatches the",
|
|
11387
|
+
"`requirements-reviewer` agent's deprecation phase. The agent pauses",
|
|
11388
|
+
"for explicit human confirmation before writing any status change.",
|
|
11389
|
+
"",
|
|
11390
|
+
"## When to use",
|
|
11391
|
+
"",
|
|
11392
|
+
"- An ADR is superseded by a newer decision and the old decision",
|
|
11393
|
+
" should no longer be referenced.",
|
|
11394
|
+
"- A functional requirement has been removed from the roadmap and",
|
|
11395
|
+
" should carry `Status: Deprecated` so downstream documents stop",
|
|
11396
|
+
" linking to it as if it were active.",
|
|
11397
|
+
"- A reviewer run (via `/review-requirements`) surfaced a stale",
|
|
11398
|
+
" `Accepted` status that should transition to `Deprecated` or",
|
|
11399
|
+
" `Superseded`.",
|
|
11400
|
+
"",
|
|
11401
|
+
"## Usage",
|
|
11402
|
+
"",
|
|
11403
|
+
"/deprecate-requirement <target> [--superseded-by <path>]",
|
|
11404
|
+
"",
|
|
11405
|
+
"Where `<target>` is either a requirement ID (e.g. `ADR-007`) or a",
|
|
11406
|
+
"path relative to `<REQUIREMENTS_ROOT>` (e.g.",
|
|
11407
|
+
"`architecture/ADR-007-auth-provider.md`). Pass",
|
|
11408
|
+
"`--superseded-by <path>` to record a replacement document; omit it",
|
|
11409
|
+
"for a plain deprecation with no successor.",
|
|
11410
|
+
"",
|
|
11411
|
+
"Multiple targets may be passed by repeating the skill invocation or",
|
|
11412
|
+
"by editing the issue body before the agent runs.",
|
|
11413
|
+
"",
|
|
11414
|
+
"## Required issue body fields",
|
|
11415
|
+
"",
|
|
11416
|
+
"The `req:deprecate` issue body must include:",
|
|
11417
|
+
"",
|
|
11418
|
+
"- **Targets** \u2014 the requirement IDs or paths to deprecate",
|
|
11419
|
+
"- **Transition** \u2014 `Deprecated` or `Superseded-by: <path>` per",
|
|
11420
|
+
" target (when `Superseded-by` is given, the replacement document",
|
|
11421
|
+
" must already exist on disk)",
|
|
11422
|
+
"- **Reason** \u2014 a one-paragraph rationale that becomes the",
|
|
11423
|
+
" Deprecation reason recorded on the target document",
|
|
11424
|
+
"- **Pre-approved: yes** *(optional)* \u2014 include this line to skip",
|
|
11425
|
+
" the interactive human-confirmation pause. Omit it to force the",
|
|
11426
|
+
" agent to comment on the issue and wait for an affirmative",
|
|
11427
|
+
" reply before editing.",
|
|
11428
|
+
"",
|
|
11429
|
+
"Issues that are missing any of the first three fields are flagged",
|
|
11430
|
+
"`status:needs-attention` and the agent stops without editing",
|
|
11431
|
+
"anything.",
|
|
11432
|
+
"",
|
|
11433
|
+
"## Steps",
|
|
11434
|
+
"",
|
|
11435
|
+
"1. Create a `req:deprecate` issue with `type:requirement`,",
|
|
11436
|
+
" `priority:medium`, and `status:ready`. Body must include the",
|
|
11437
|
+
" Targets, Transition, and Reason sections above (optionally",
|
|
11438
|
+
" `Pre-approved: yes`).",
|
|
11439
|
+
"2. Execute the deprecation phase of the requirements-reviewer",
|
|
11440
|
+
" agent.",
|
|
11441
|
+
"3. The agent verifies inputs, pauses for human confirmation (or",
|
|
11442
|
+
" skips the pause when `Pre-approved: yes` is set), edits each",
|
|
11443
|
+
" target document's `Status`, Revision History, Superseded-by,",
|
|
11444
|
+
" and Deprecation reason, updates the matching category index",
|
|
11445
|
+
" row, commits the changes, sweeps `<REQUIREMENTS_ROOT>` for",
|
|
11446
|
+
" inbound references, files one `req:write` follow-up per",
|
|
11447
|
+
" referencing document, and comments on the `req:deprecate`",
|
|
11448
|
+
" issue with the summary.",
|
|
11449
|
+
"",
|
|
11450
|
+
"## Output",
|
|
11451
|
+
"",
|
|
11452
|
+
"- Narrow edits to each target requirement document (Status,",
|
|
11453
|
+
" Metadata row, Revision History, Traceability Superseded-by,",
|
|
11454
|
+
" Deprecation reason)",
|
|
11455
|
+
"- Updated category index row(s)",
|
|
11456
|
+
"- One `req:write` follow-up issue per requirement document that",
|
|
11457
|
+
" still references the deprecated target, so the",
|
|
11458
|
+
" `requirements-writer` can rewrite those references",
|
|
11459
|
+
"- A summary comment on the originating `req:deprecate` issue",
|
|
11460
|
+
"",
|
|
11461
|
+
"## What this skill does NOT do",
|
|
11462
|
+
"",
|
|
11463
|
+
"- It does not delete files. Deprecated documents stay on disk with",
|
|
11464
|
+
" updated status so readers following old links can follow the",
|
|
11465
|
+
" trail forward.",
|
|
11466
|
+
"- It does not rewrite the body of the target document beyond the",
|
|
11467
|
+
" narrow fields listed above. Description, acceptance criteria,",
|
|
11468
|
+
" open items, and other sections are left unchanged. If the",
|
|
11469
|
+
" deprecation implies a rewrite of other sections, the issue",
|
|
11470
|
+
" author should open a separate `req:write` issue for the writer.",
|
|
11471
|
+
"- It does not rewrite references in the referencing documents.",
|
|
11472
|
+
" That work is handed off to the `requirements-writer` through",
|
|
11473
|
+
" the `req:write` follow-ups."
|
|
11474
|
+
].join("\n")
|
|
11475
|
+
};
|
|
11109
11476
|
var requirementsReviewerBundle = {
|
|
11110
11477
|
name: "requirements-reviewer",
|
|
11111
|
-
description: "Requirements reviewer agent bundle. Audits existing requirement documents (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT)
|
|
11478
|
+
description: "Requirements reviewer agent bundle. Audits existing requirement documents (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT) via the 11-check review phase, and transitions requirements to `Deprecated` or `Superseded` via the deprecation phase (narrow writes to Status, Revision History, Superseded-by, and category index row, with `req:write` follow-ups for every back-reference). Reads templates from the requirements-writer bundle's reference directory; ships no templates of its own.",
|
|
11112
11479
|
appliesWhen: () => true,
|
|
11113
11480
|
rules: [
|
|
11114
11481
|
{
|
|
11115
11482
|
name: "requirements-reviewer-workflow",
|
|
11116
|
-
description: "Describes the requirements-reviewer pipeline, the req:review phase
|
|
11483
|
+
description: "Describes the requirements-reviewer pipeline, the req:review and req:deprecate phase labels, the four review scopes, the deprecation-phase contract, the soft dependency on the requirements-writer bundle's templates, and the boundary with the writer and analyst bundles.",
|
|
11117
11484
|
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
11118
11485
|
content: [
|
|
11119
11486
|
"# Requirements Reviewer Workflow",
|
|
11120
11487
|
"",
|
|
11121
|
-
"
|
|
11122
|
-
"
|
|
11123
|
-
"
|
|
11124
|
-
"`
|
|
11125
|
-
"
|
|
11126
|
-
"",
|
|
11127
|
-
"
|
|
11128
|
-
"
|
|
11129
|
-
"
|
|
11130
|
-
"
|
|
11131
|
-
"
|
|
11132
|
-
"of the `requirements-analyst` bundle. The reviewer never opens",
|
|
11133
|
-
"`req:scan`, `req:draft`, `req:trace`, `req:write`, or `bcm:*`",
|
|
11134
|
-
"issues directly \u2014 instead it files follow-up issues with the",
|
|
11135
|
-
"appropriate phase label (`req:write`, `req:trace`, or",
|
|
11136
|
-
"`req:scan`) for the downstream agent to pick up.",
|
|
11488
|
+
"The requirements-reviewer agent runs in one of two phases per",
|
|
11489
|
+
"session, each tracked by its own GitHub issue label. Issues in",
|
|
11490
|
+
"both phases also carry `type:requirement` (declared by the",
|
|
11491
|
+
"upstream `requirements-analyst` bundle).",
|
|
11492
|
+
"",
|
|
11493
|
+
"| Phase | Skill | Label | Writes requirement docs? |",
|
|
11494
|
+
"|-------|-------|-------|--------------------------|",
|
|
11495
|
+
"| Review | `/review-requirements <scope>` | `req:review` | No \u2014 audit only |",
|
|
11496
|
+
"| Deprecate | `/deprecate-requirement <target>` | `req:deprecate` | Narrow writes (Status, Revision History, Superseded-by, index row) |",
|
|
11497
|
+
"",
|
|
11498
|
+
"## Review phase",
|
|
11137
11499
|
"",
|
|
11138
|
-
"
|
|
11500
|
+
"Use `/review-requirements <scope>` to audit existing requirement",
|
|
11501
|
+
"documents. Four scopes are supported: `full` (every document),",
|
|
11139
11502
|
"`category:<slug>` (one category directory), `doc:<path>` (one",
|
|
11140
11503
|
"specific document), and `check:<n>` (one or more of the 11",
|
|
11141
11504
|
"checks across the documents in scope).",
|
|
11142
11505
|
"",
|
|
11506
|
+
"The review phase produces **review reports and follow-up issues",
|
|
11507
|
+
"only** \u2014 it never edits requirement documents, capability",
|
|
11508
|
+
"models, or research notes. It files follow-up issues with the",
|
|
11509
|
+
"appropriate phase label (`req:write`, `req:trace`, or",
|
|
11510
|
+
"`req:scan`) for the downstream agent to pick up.",
|
|
11511
|
+
"",
|
|
11512
|
+
"For audits covering more than 10 documents, the reviewer writes",
|
|
11513
|
+
"a read-only Python verification script alongside the report and",
|
|
11514
|
+
"uses its output as the basis for findings \u2014 manual review of",
|
|
11515
|
+
"large document sets always misses broken links.",
|
|
11516
|
+
"",
|
|
11517
|
+
"## Deprecation phase",
|
|
11518
|
+
"",
|
|
11519
|
+
"Use `/deprecate-requirement <target> [--superseded-by <path>]`",
|
|
11520
|
+
"to transition one or more requirement documents to `Deprecated`",
|
|
11521
|
+
"or `Superseded`. The deprecation phase is the only path by",
|
|
11522
|
+
"which this agent mutates requirement documents, and it is",
|
|
11523
|
+
"narrowly scoped to:",
|
|
11524
|
+
"",
|
|
11525
|
+
"- The frontmatter `Status` field and the Metadata table",
|
|
11526
|
+
" `Status` row",
|
|
11527
|
+
"- A new entry in the target document's `## Revision History`",
|
|
11528
|
+
"- A `Superseded-by` line in the target's `## Traceability`",
|
|
11529
|
+
" section (when applicable) plus a Deprecation reason line",
|
|
11530
|
+
"- The matching row in the category `README.md` / `index.md`",
|
|
11531
|
+
"",
|
|
11532
|
+
"The agent pauses for explicit human confirmation on the",
|
|
11533
|
+
"`req:deprecate` issue before editing \u2014 deprecation is",
|
|
11534
|
+
"irreversible in practice. Issue authors can skip the pause by",
|
|
11535
|
+
"adding `Pre-approved: yes` to the issue body. After the edits",
|
|
11536
|
+
"commit, the agent sweeps `<REQUIREMENTS_ROOT>` for inbound",
|
|
11537
|
+
"references and files one `req:write` follow-up per referencing",
|
|
11538
|
+
"requirement document so the `requirements-writer` can rewrite",
|
|
11539
|
+
"those references. Documents are never deleted; the deprecated",
|
|
11540
|
+
"file stays on disk with updated status.",
|
|
11541
|
+
"",
|
|
11542
|
+
"The deprecation phase never authors new requirement documents,",
|
|
11543
|
+
"never rewrites the body of a target document beyond the narrow",
|
|
11544
|
+
"fields listed above, and never rewrites references in the",
|
|
11545
|
+
"referencing documents \u2014 that work is handed off to the",
|
|
11546
|
+
"`requirements-writer`.",
|
|
11547
|
+
"",
|
|
11548
|
+
"## Cross-bundle boundaries",
|
|
11549
|
+
"",
|
|
11550
|
+
"Authoring remains the responsibility of the `requirements-writer`",
|
|
11551
|
+
"(requirement docs) and `bcm-writer` (capability models) bundles.",
|
|
11552
|
+
"Gap discovery is the responsibility of the `requirements-analyst`",
|
|
11553
|
+
"bundle. The reviewer never opens `req:scan`, `req:draft`,",
|
|
11554
|
+
"`req:trace`, `req:review`, or `bcm:*` issues \u2014 only `req:write`",
|
|
11555
|
+
"follow-ups from either phase.",
|
|
11556
|
+
"",
|
|
11143
11557
|
"**Soft dependency on the `requirements-writer` bundle.** The",
|
|
11144
11558
|
"reviewer reads category templates from",
|
|
11145
11559
|
`\`${REQUIREMENTS_WRITER_PATHS.templatesRoot}\`,`,
|
|
@@ -11147,14 +11561,10 @@ var requirementsReviewerBundle = {
|
|
|
11147
11561
|
"that disable the writer bundle but keep the reviewer must",
|
|
11148
11562
|
"supply equivalent templates at the same path.",
|
|
11149
11563
|
"",
|
|
11150
|
-
"For audits covering more than 10 documents, the reviewer writes",
|
|
11151
|
-
"a read-only Python verification script alongside the report and",
|
|
11152
|
-
"uses its output as the basis for findings \u2014 manual review of",
|
|
11153
|
-
"large document sets always misses broken links.",
|
|
11154
|
-
"",
|
|
11155
11564
|
"See the `requirements-reviewer` agent definition for full",
|
|
11156
11565
|
"workflow details, configurable paths, the 11-check catalog, the",
|
|
11157
|
-
"severity ladder, and
|
|
11566
|
+
"severity ladder, the deprecation-phase edit contract, and the",
|
|
11567
|
+
"back-reference sweep rules."
|
|
11158
11568
|
].join("\n"),
|
|
11159
11569
|
platforms: {
|
|
11160
11570
|
cursor: { exclude: true }
|
|
@@ -11162,13 +11572,18 @@ var requirementsReviewerBundle = {
|
|
|
11162
11572
|
tags: ["workflow"]
|
|
11163
11573
|
}
|
|
11164
11574
|
],
|
|
11165
|
-
skills: [reviewRequirementsSkill],
|
|
11575
|
+
skills: [reviewRequirementsSkill, deprecateRequirementSkill],
|
|
11166
11576
|
subAgents: [requirementsReviewerSubAgent],
|
|
11167
11577
|
labels: [
|
|
11168
11578
|
{
|
|
11169
11579
|
name: "req:review",
|
|
11170
11580
|
color: "FBCA04",
|
|
11171
11581
|
description: "Phase: audit existing requirement documents using the requirements-reviewer skill"
|
|
11582
|
+
},
|
|
11583
|
+
{
|
|
11584
|
+
name: "req:deprecate",
|
|
11585
|
+
color: "D93F0B",
|
|
11586
|
+
description: "Phase: transition existing requirement documents to Deprecated or Superseded using the requirements-reviewer skill"
|
|
11172
11587
|
}
|
|
11173
11588
|
]
|
|
11174
11589
|
};
|