@codedrifters/configulator 0.0.234 → 0.0.235

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.js CHANGED
@@ -7342,6 +7342,106 @@ var projenBundle = {
7342
7342
  ]
7343
7343
  };
7344
7344
 
7345
+ // src/agent/bundles/requirements-taxonomy.ts
7346
+ var REQUIREMENTS_TAXONOMY_TABLE_SECTION = [
7347
+ "## The 11-Category Taxonomy",
7348
+ "",
7349
+ "All requirements follow the BIZBOK-aligned 11-category taxonomy",
7350
+ "below. Getting requirements into the right category matters because",
7351
+ "it determines which template applies, which standards inform it, and",
7352
+ "how it traces to other requirements.",
7353
+ "",
7354
+ "| Category | Prefix | Directory (default) | Question it answers |",
7355
+ "|----------|--------|---------------------|---------------------|",
7356
+ "| Business Requirements | BR | `business/` | **Why** are we building this? What business value does it deliver? |",
7357
+ "| Functional Requirements | FR | `functional/` | **What** does the system do? What is the user-visible behavior? |",
7358
+ "| Non-Functional Requirements | NFR | `non-functional/` | **How well** must the system perform? What quality bar must it meet? |",
7359
+ "| Technical Requirements | TR | `technical/` | **What technology** are we using, and why that one? |",
7360
+ "| Architectural Decisions | ADR | `architectural-decisions/` | **What structural decision** are we making, and what are the trade-offs? |",
7361
+ "| Security & Compliance | SEC | `security/` | **What must we protect**, and what rules govern that protection? |",
7362
+ "| Data Requirements | DR | `data/` | **What data** do we store, how long, and how do we recover it? |",
7363
+ "| Integration Requirements | INT | `integration/` | **What external systems** do we connect to, and how? |",
7364
+ "| Operational Requirements | OPS | `operational/` | **How do we deploy, monitor, and respond** to incidents? |",
7365
+ "| UX Requirements | UX | `ux/` | **How must the interface look, feel, and behave** for users? |",
7366
+ "| Multi-Tenancy & Licensing | MT | `multi-tenancy/` | **How do we isolate tenants, gate features, and meter usage?** |",
7367
+ "",
7368
+ "All requirement documents live under `<REQUIREMENTS_ROOT>` in the",
7369
+ "category directory shown above. Directory names are defaults \u2014",
7370
+ "consuming projects may rename them, but the prefixes are universal."
7371
+ ];
7372
+ var REQUIREMENTS_TAXONOMY_DISAMBIGUATION_SECTION = [
7373
+ "- **SEC vs NFR:** Protecting data, enforcing access control, or",
7374
+ " meeting a regulation \u2192 SEC. System performance, uptime, or",
7375
+ ' scalability \u2192 NFR. "99.9% uptime" is NFR; "audit logs for all',
7376
+ ' admin actions" is SEC.',
7377
+ '- **TR vs ADR:** A TR pins down a specific technology choice ("use',
7378
+ ' PostgreSQL 16+"). An ADR records a structural decision with',
7379
+ ' context, trade-offs, and alternatives ("why row-level isolation',
7380
+ ' over schema-per-tenant"). TRs often follow from ADRs.',
7381
+ "- **FR vs INT:** What the user experiences \u2192 FR. How two systems",
7382
+ ' communicate \u2192 INT. "User can pay with a credit card" is FR;',
7383
+ ' "Stripe Checkout API integration for payment processing" is INT.',
7384
+ "- **DR vs SEC:** What data exists, how long we keep it, and how we",
7385
+ " recover it \u2192 DR. Who can access it and how it's protected \u2192 SEC.",
7386
+ " These often cross-reference each other.",
7387
+ "- **NFR vs OPS:** A measurable target the system must meet \u2192 NFR.",
7388
+ ' The tooling and processes to run the system \u2192 OPS. "p99 latency',
7389
+ ' < 200ms" is NFR; "Datadog APM for latency monitoring" is OPS.'
7390
+ ];
7391
+ var REQUIREMENTS_TIER_TABLE_SECTION = [
7392
+ "| Tier | Slug | When to use |",
7393
+ "|------|------|-------------|",
7394
+ "| **Platform** | `platform` | Core platform services \u2014 APIs, tenant isolation, auth, event bus, shared infrastructure |",
7395
+ "| **Industry** | `industry` | Vertical-specific capabilities not every tenant needs |",
7396
+ "| **Customer Workflow** | `customer-workflow` | Business logic tenants configure within the platform \u2014 approval chains, notification rules, intake processes |",
7397
+ "| **Consumer Application** | `consumer-app` | UI/UX and integrations in external front-ends/systems consuming the platform's APIs |"
7398
+ ];
7399
+ var REQ_WRITE_ISSUE_SCHEMA_SECTION = [
7400
+ "The body of every `req:write` issue **must** declare the three",
7401
+ "fields below. The downstream `requirements-writer` agent parses",
7402
+ "them on intake and will refuse to write a document (and flag the",
7403
+ "issue `status:needs-attention`) if any required field is missing",
7404
+ "or contradictory.",
7405
+ "",
7406
+ "### Required Fields",
7407
+ "",
7408
+ "- **Category:** one of `BR` / `FR` / `NFR` / `TR` / `ADR` / `SEC` /",
7409
+ " `DR` / `INT` / `OPS` / `UX` / `MT`. Must match the category",
7410
+ " prefix in the requirement's title and file name.",
7411
+ "- **Tier:** one of `platform` / `industry` / `customer-workflow` /",
7412
+ " `consumer-app`. Must match the `tier:*` label applied to the",
7413
+ " issue.",
7414
+ "- **Output Path:** absolute-from-repo-root path ending in",
7415
+ " `<PREFIX>-<NNN>-<slug>.md` under the target category directory",
7416
+ " (for example,",
7417
+ " `docs/requirements/functional/FR-012-checkout-flow.md`).",
7418
+ "",
7419
+ "### Strongly Recommended",
7420
+ "",
7421
+ "- **Inputs / Read:** bullet list of source files the writer should",
7422
+ " consult \u2014 the upstream proposal file (when one exists), the",
7423
+ " BCM/source document(s) the proposal cites, and any related",
7424
+ " requirements the new document should trace to. Omit only for",
7425
+ " ad-hoc requirements where no upstream proposal exists; the",
7426
+ " writer will then treat the issue body itself as the input.",
7427
+ "",
7428
+ "### Missing Fields",
7429
+ "",
7430
+ "When an upstream producer cannot derive one of the required",
7431
+ "fields, it **must not** guess a value. Instead it opens the",
7432
+ "`req:write` issue with `status:needs-attention` (not",
7433
+ "`status:ready`) and includes a `Missing:` line listing the",
7434
+ "field(s) that could not be determined. For example:",
7435
+ "",
7436
+ "```",
7437
+ "Missing: Tier \u2014 source document has no tier metadata and the",
7438
+ "referencing requirement is cross-tier.",
7439
+ "```",
7440
+ "",
7441
+ "A human triages the issue, fills in the missing field, and flips",
7442
+ "the label to `status:ready` before the writer picks it up."
7443
+ ];
7444
+
7345
7445
  // src/agent/bundles/requirements-analyst.ts
7346
7446
  var requirementsAnalystSubAgent = {
7347
7447
  name: "requirements-analyst",
@@ -7572,6 +7672,7 @@ var requirementsAnalystSubAgent = {
7572
7672
  " ## Proposed: <PREFIX>-<NNN> \u2014 <Title>",
7573
7673
  "",
7574
7674
  " **Category:** <FR/BR/NFR/SEC/DR/INT/OPS/UX/MT/ADR/TR>",
7675
+ " **Tier:** <platform/industry/customer-workflow/consumer-app>",
7575
7676
  " **Priority:** <High/Normal/Low>",
7576
7677
  " **Source:** <document path and section>",
7577
7678
  "",
@@ -7625,6 +7726,41 @@ var requirementsAnalystSubAgent = {
7625
7726
  "**Budget:** No web searches. Issue creation + minor edits to source",
7626
7727
  "documents.",
7627
7728
  "",
7729
+ "### `req:write` issue schema",
7730
+ "",
7731
+ "The `req:write` issues this phase creates are picked up by the",
7732
+ "downstream `requirements-writer` agent, which parses a strict",
7733
+ "schema on intake. The authoritative schema is defined in the",
7734
+ "`requirements-writer` sub-agent prompt under **The `req:write`",
7735
+ "Issue Schema** \u2014 every `req:write` issue this phase opens must",
7736
+ "conform. The same schema is embedded in the",
7737
+ "`requirements-reviewer` follow-up generator so the three",
7738
+ "producers never drift apart.",
7739
+ "",
7740
+ ...REQ_WRITE_ISSUE_SCHEMA_SECTION,
7741
+ "",
7742
+ "**Deriving the three required fields from the proposal.** For",
7743
+ "every `req:write` issue this phase opens, the three fields come",
7744
+ "directly from the Phase 2 proposal entry:",
7745
+ "",
7746
+ "- **Category** \u2014 the proposal's `**Category:**` line.",
7747
+ "- **Tier** \u2014 the proposal's `**Tier:**` line (added in Phase 2).",
7748
+ " If the proposal omitted the Tier line (older proposals may),",
7749
+ " route the issue through `Missing:` rather than guessing.",
7750
+ "- **Output Path** \u2014",
7751
+ " `<REQUIREMENTS_ROOT>/<category-dir>/<PREFIX>-<NNN>-<slug>.md`,",
7752
+ " using the sequence number determined in Phase 2 step 4.",
7753
+ "",
7754
+ "**Validation step \u2014 required before opening the issue.** Before",
7755
+ "calling `gh issue create`, verify all three required fields are",
7756
+ "populated and internally consistent (Category matches title",
7757
+ "prefix, Tier matches `tier:*` label, Output Path filename starts",
7758
+ "with the Category prefix). If any field cannot be derived, open",
7759
+ "the issue with `status:needs-attention` (not `status:ready`) and",
7760
+ "include a `Missing: <field> \u2014 <one-line reason>` line so a human",
7761
+ "triaging the issue only has to supply the remaining value(s)",
7762
+ "before flipping the label to `status:ready`.",
7763
+ "",
7628
7764
  "### Steps",
7629
7765
  "",
7630
7766
  "1. **Read the proposals** from Phase 2.",
@@ -7633,21 +7769,26 @@ var requirementsAnalystSubAgent = {
7633
7769
  "",
7634
7770
  " All `type:requirement` issues default to `priority:medium` (override",
7635
7771
  " only if the proposal's priority was explicitly High or Low). Each",
7636
- " issue must also carry the `req:write` phase label so the downstream",
7637
- " `requirements-writer` bundle picks it up.",
7772
+ " issue must also carry the `req:write` phase label plus the matching",
7773
+ " `tier:*` label so the downstream `requirements-writer` bundle picks",
7774
+ " it up with the correct tier.",
7638
7775
  "",
7639
7776
  " ```bash",
7640
7777
  " gh issue create \\",
7641
7778
  ' --title "docs(<category>): <PREFIX>-<NNN> \u2014 <title>" \\',
7642
- ' --label "type:requirement" --label "req:write" --label "status:ready" --label "priority:medium" \\',
7779
+ ' --label "type:requirement" --label "req:write" --label "tier:<tier-slug>" --label "status:ready" --label "priority:medium" \\',
7643
7780
  ' --body "## Objective',
7644
7781
  " Write <PREFIX>-<NNN> \u2014 <title>.",
7645
7782
  "",
7783
+ " **Category:** <BR/FR/NFR/TR/ADR/SEC/DR/INT/OPS/UX/MT>",
7784
+ " **Tier:** <platform/industry/customer-workflow/consumer-app>",
7785
+ " **Output Path:** <REQUIREMENTS_ROOT>/<category-dir>/<PREFIX>-<NNN>-<slug>.md",
7786
+ "",
7646
7787
  " ## Context",
7647
7788
  " - **Gap identified by:** requirements scan of <source>",
7648
7789
  " - **Proposals file:** <RESEARCH_REQUIREMENTS_ROOT>/req-proposals-<scope>-<date>.md",
7649
7790
  "",
7650
- " ## Inputs",
7791
+ " ## Inputs / Read",
7651
7792
  " - **Depends on:** (none)",
7652
7793
  " - **Read:** <RESEARCH_REQUIREMENTS_ROOT>/req-proposals-<scope>-<date>.md, <source docs>",
7653
7794
  "",
@@ -7658,12 +7799,17 @@ var requirementsAnalystSubAgent = {
7658
7799
  " - [ ] Decision authority rules followed (direct write vs. proposed)",
7659
7800
  "",
7660
7801
  " ## Scope Size",
7661
- " small",
7662
- "",
7663
- " ## Output Path",
7664
- ' <REQUIREMENTS_ROOT>/<category>/<PREFIX>-<NNN>-<slug>.md"',
7802
+ ' small"',
7665
7803
  " ```",
7666
7804
  "",
7805
+ " When one of Category / Tier / Output Path could not be derived",
7806
+ " from the proposal (for example, the proposal omitted the Tier",
7807
+ " line), replace `status:ready` with `status:needs-attention` in",
7808
+ " the label list and add a `Missing: <field> \u2014 <reason>` line",
7809
+ " directly below the Output Path line in the body. Populate",
7810
+ " whichever of the three fields **could** be derived so a human",
7811
+ " triaging the issue has the minimum possible cleanup.",
7812
+ "",
7667
7813
  "3. **Update source documents.** In each BCM model doc or competitive",
7668
7814
  " analysis that was scanned, add a note in the project-relevance /",
7669
7815
  " strategic-implications section (whichever heading the source doc uses)",
@@ -7824,61 +7970,6 @@ var requirementsAnalystBundle = {
7824
7970
  ]
7825
7971
  };
7826
7972
 
7827
- // src/agent/bundles/requirements-taxonomy.ts
7828
- var REQUIREMENTS_TAXONOMY_TABLE_SECTION = [
7829
- "## The 11-Category Taxonomy",
7830
- "",
7831
- "All requirements follow the BIZBOK-aligned 11-category taxonomy",
7832
- "below. Getting requirements into the right category matters because",
7833
- "it determines which template applies, which standards inform it, and",
7834
- "how it traces to other requirements.",
7835
- "",
7836
- "| Category | Prefix | Directory (default) | Question it answers |",
7837
- "|----------|--------|---------------------|---------------------|",
7838
- "| Business Requirements | BR | `business/` | **Why** are we building this? What business value does it deliver? |",
7839
- "| Functional Requirements | FR | `functional/` | **What** does the system do? What is the user-visible behavior? |",
7840
- "| Non-Functional Requirements | NFR | `non-functional/` | **How well** must the system perform? What quality bar must it meet? |",
7841
- "| Technical Requirements | TR | `technical/` | **What technology** are we using, and why that one? |",
7842
- "| Architectural Decisions | ADR | `architectural-decisions/` | **What structural decision** are we making, and what are the trade-offs? |",
7843
- "| Security & Compliance | SEC | `security/` | **What must we protect**, and what rules govern that protection? |",
7844
- "| Data Requirements | DR | `data/` | **What data** do we store, how long, and how do we recover it? |",
7845
- "| Integration Requirements | INT | `integration/` | **What external systems** do we connect to, and how? |",
7846
- "| Operational Requirements | OPS | `operational/` | **How do we deploy, monitor, and respond** to incidents? |",
7847
- "| UX Requirements | UX | `ux/` | **How must the interface look, feel, and behave** for users? |",
7848
- "| Multi-Tenancy & Licensing | MT | `multi-tenancy/` | **How do we isolate tenants, gate features, and meter usage?** |",
7849
- "",
7850
- "All requirement documents live under `<REQUIREMENTS_ROOT>` in the",
7851
- "category directory shown above. Directory names are defaults \u2014",
7852
- "consuming projects may rename them, but the prefixes are universal."
7853
- ];
7854
- var REQUIREMENTS_TAXONOMY_DISAMBIGUATION_SECTION = [
7855
- "- **SEC vs NFR:** Protecting data, enforcing access control, or",
7856
- " meeting a regulation \u2192 SEC. System performance, uptime, or",
7857
- ' scalability \u2192 NFR. "99.9% uptime" is NFR; "audit logs for all',
7858
- ' admin actions" is SEC.',
7859
- '- **TR vs ADR:** A TR pins down a specific technology choice ("use',
7860
- ' PostgreSQL 16+"). An ADR records a structural decision with',
7861
- ' context, trade-offs, and alternatives ("why row-level isolation',
7862
- ' over schema-per-tenant"). TRs often follow from ADRs.',
7863
- "- **FR vs INT:** What the user experiences \u2192 FR. How two systems",
7864
- ' communicate \u2192 INT. "User can pay with a credit card" is FR;',
7865
- ' "Stripe Checkout API integration for payment processing" is INT.',
7866
- "- **DR vs SEC:** What data exists, how long we keep it, and how we",
7867
- " recover it \u2192 DR. Who can access it and how it's protected \u2192 SEC.",
7868
- " These often cross-reference each other.",
7869
- "- **NFR vs OPS:** A measurable target the system must meet \u2192 NFR.",
7870
- ' The tooling and processes to run the system \u2192 OPS. "p99 latency',
7871
- ' < 200ms" is NFR; "Datadog APM for latency monitoring" is OPS.'
7872
- ];
7873
- var REQUIREMENTS_TIER_TABLE_SECTION = [
7874
- "| Tier | Slug | When to use |",
7875
- "|------|------|-------------|",
7876
- "| **Platform** | `platform` | Core platform services \u2014 APIs, tenant isolation, auth, event bus, shared infrastructure |",
7877
- "| **Industry** | `industry` | Vertical-specific capabilities not every tenant needs |",
7878
- "| **Customer Workflow** | `customer-workflow` | Business logic tenants configure within the platform \u2014 approval chains, notification rules, intake processes |",
7879
- "| **Consumer Application** | `consumer-app` | UI/UX and integrations in external front-ends/systems consuming the platform's APIs |"
7880
- ];
7881
-
7882
7973
  // src/agent/bundles/requirements-writer.ts
7883
7974
  var TEMPLATE_BR = `---
7884
7975
  title: "BR-NNN: [Business Requirement Title]"
@@ -10157,6 +10248,19 @@ var requirementsWriterSubAgent = {
10157
10248
  "",
10158
10249
  "---",
10159
10250
  "",
10251
+ "## The `req:write` Issue Schema",
10252
+ "",
10253
+ "This section is the **authoritative schema** for `req:write` issue",
10254
+ "bodies. Upstream producers (the `requirements-analyst` trace phase,",
10255
+ "the `requirements-reviewer` follow-up generator, and any human",
10256
+ "authoring a `req:write` issue directly) must embed or link to this",
10257
+ "same schema so the three required fields are always present when",
10258
+ "the writer picks the issue up.",
10259
+ "",
10260
+ ...REQ_WRITE_ISSUE_SCHEMA_SECTION,
10261
+ "",
10262
+ "---",
10263
+ "",
10160
10264
  "## The `req:write` Phase",
10161
10265
  "",
10162
10266
  "**Goal:** Read the proposal that produced this issue, write a single",
@@ -10171,14 +10275,25 @@ var requirementsWriterSubAgent = {
10171
10275
  "",
10172
10276
  "### Steps",
10173
10277
  "",
10174
- "1. **Parse the issue.** The `req:write` issue body must include:",
10175
- " - **Category** (`BR`/`FR`/`NFR`/`TR`/`ADR`/`SEC`/`DR`/`INT`/`OPS`/`UX`/`MT`)",
10176
- " - **Tier** (`platform`/`industry`/`customer-workflow`/`consumer-app`)",
10177
- " - **Output Path** under `<REQUIREMENTS_ROOT>/<category-dir>/<PREFIX>-<NNN>-<slug>.md`",
10178
- " - **Inputs / Read** \u2014 the upstream proposals file and any source",
10179
- " documents",
10180
- " If any of these are missing or contradictory, comment on the",
10181
- " issue, add `status:needs-attention`, and stop without writing.",
10278
+ "1. **Parse the issue.** The `req:write` issue body follows the",
10279
+ " authoritative schema in the",
10280
+ " [The `req:write` Issue Schema](#the-reqwrite-issue-schema)",
10281
+ " section below. Before writing, verify every required field",
10282
+ " (Category, Tier, Output Path) is present and internally",
10283
+ " consistent:",
10284
+ "",
10285
+ " - Category matches the prefix on the requirement title and on",
10286
+ " the Output Path filename.",
10287
+ " - Tier matches the `tier:*` label applied to the issue.",
10288
+ " - Output Path sits under",
10289
+ " `<REQUIREMENTS_ROOT>/<category-dir>/<PREFIX>-<NNN>-<slug>.md`.",
10290
+ "",
10291
+ " If any required field is missing, contradictory, or the issue",
10292
+ " already carries `status:needs-attention` with a `Missing:` line",
10293
+ " (upstream could not derive it), comment on the issue with",
10294
+ " which field is wrong, ensure `status:needs-attention` is set,",
10295
+ " and stop without writing. A human triages before the writer",
10296
+ " tries again.",
10182
10297
  "",
10183
10298
  "2. **Read the proposal.** Open the proposals file referenced in the",
10184
10299
  " issue inputs (under `<RESEARCH_REQUIREMENTS_ROOT>`). Find the",
@@ -11070,7 +11185,9 @@ var requirementsReviewerSubAgent = {
11070
11185
  " `requirements-writer` agent picks it up to revise the",
11071
11186
  " document). Only the writer is scoped to edit requirement",
11072
11187
  " documents, so anything that requires an in-place edit under",
11073
- " `<REQUIREMENTS_ROOT>` routes here.",
11188
+ " `<REQUIREMENTS_ROOT>` routes here. `req:write` follow-ups",
11189
+ " must also carry the matching `tier:*` label and an issue",
11190
+ " body that conforms to the `req:write` issue schema below.",
11074
11191
  " - Missing traceability in **source documents** \u2014 BCM model",
11075
11192
  " docs, competitive-analysis notes, product-roadmap entries,",
11076
11193
  " meeting extracts \u2014 that should link forward to an existing",
@@ -11091,6 +11208,54 @@ var requirementsReviewerSubAgent = {
11091
11208
  "- Adds `status:ready` (or `status:blocked` when the finding",
11092
11209
  " declares a `Depends on: #N` on another open issue)",
11093
11210
  "",
11211
+ "### `req:write` follow-up schema",
11212
+ "",
11213
+ "Because this bundle is the second-largest producer of `req:write`",
11214
+ "issues (the analyst's trace phase is the first), every `req:write`",
11215
+ "follow-up opened in either the review phase or the deprecation",
11216
+ "phase must satisfy the schema the writer parses on intake:",
11217
+ "",
11218
+ ...REQ_WRITE_ISSUE_SCHEMA_SECTION,
11219
+ "",
11220
+ "**Deriving the three required fields from the target document.**",
11221
+ "For every structural-repair follow-up the reviewer generates, the",
11222
+ "three fields come directly from the requirement document being",
11223
+ "edited:",
11224
+ "",
11225
+ "- **Category** \u2014 read the category prefix from the document's",
11226
+ " filename (`FR-012-...` \u2192 `FR`). Confirm against the frontmatter",
11227
+ " / Metadata table `ID` row and the document's `# Heading`. If",
11228
+ " the three disagree, route through `Missing:` with the",
11229
+ " disagreement noted rather than picking one.",
11230
+ "- **Tier** \u2014 read the Metadata table `Tier` row. Normalize to the",
11231
+ " slug form (`platform`, `industry`, `customer-workflow`,",
11232
+ " `consumer-app`). If the Tier row is missing, empty, or set to",
11233
+ " a value outside the four-tier taxonomy, route through",
11234
+ " `Missing:`.",
11235
+ "- **Output Path** \u2014 the current absolute-from-repo-root path of",
11236
+ " the document being edited. The writer edits in place; the path",
11237
+ " does not change for a structural repair.",
11238
+ "",
11239
+ "For deprecation back-reference follow-ups, the three fields come",
11240
+ "from the **referencing** document (the one that still mentions",
11241
+ "the deprecated ID), not the deprecated target itself.",
11242
+ "",
11243
+ "**Validation step \u2014 required before opening the issue.** The",
11244
+ "reviewer asserts all three required fields are populated before",
11245
+ "it calls `gh issue create`. If any field cannot be derived:",
11246
+ "",
11247
+ "1. Open the follow-up with `status:needs-attention` (not",
11248
+ " `status:ready`).",
11249
+ "2. Include a `Missing: <field> \u2014 <one-line reason>` line at the",
11250
+ " top of the body explaining which field could not be",
11251
+ " determined and why (e.g., `Missing: Tier \u2014 Metadata table",
11252
+ " has no Tier row and the document predates the four-tier",
11253
+ " classification`).",
11254
+ "3. Populate whichever of the three fields **could** be derived",
11255
+ " so a human triaging the issue only has to supply the",
11256
+ " remaining value(s) before flipping the label to",
11257
+ " `status:ready`.",
11258
+ "",
11094
11259
  "**Do NOT create:**",
11095
11260
  "",
11096
11261
  "- `req:review` issues \u2014 that would be self-referential",
@@ -11268,15 +11433,26 @@ var requirementsReviewerSubAgent = {
11268
11433
  " references that a single writer session can address together).",
11269
11434
  "- The issue title must be",
11270
11435
  " `req(deprecate): update references to <deprecated-ID> in <referencing-ID>`.",
11271
- "- The body must include: the referencing document path, the",
11272
- " deprecated document path, the successor path (when applicable),",
11273
- " the list of line ranges that mention the deprecated ID, the",
11274
- " `req:deprecate` issue number, and a short instruction asking the",
11275
- " writer to either remove the reference, point it at the successor,",
11276
- " or convert it to a historical note (the writer decides per",
11436
+ "- The body must conform to the `req:write` issue schema defined",
11437
+ " in the review phase's **`req:write` follow-up schema** section",
11438
+ " above: Category, Tier, and Output Path derived from the",
11439
+ " **referencing** document (not the deprecated target) via the",
11440
+ " same rules \u2014 prefix from filename, Tier from the Metadata",
11441
+ " table, Output Path is the referencing document's current path.",
11442
+ " In addition, the body must include: the deprecated document",
11443
+ " path, the successor path (when applicable), the list of line",
11444
+ " ranges that mention the deprecated ID, the `req:deprecate`",
11445
+ " issue number, and a short instruction asking the writer to",
11446
+ " either remove the reference, point it at the successor, or",
11447
+ " convert it to a historical note (the writer decides per",
11277
11448
  " reference).",
11278
- "- Labels: `type:requirement`, `req:write`, `priority:medium`,",
11279
- " `status:ready`.",
11449
+ "- Labels: `type:requirement`, `req:write`, the matching",
11450
+ " `tier:*` label derived from the referencing document's Tier,",
11451
+ " `priority:medium`, `status:ready`.",
11452
+ "- If any of Category / Tier / Output Path cannot be derived from",
11453
+ " the referencing document, open the follow-up with",
11454
+ " `status:needs-attention` and a `Missing:` line, per the same",
11455
+ " validation rule that applies in the review phase.",
11280
11456
  "- Body must include `Depends on: #<req:deprecate issue number>`",
11281
11457
  " when the rewrite should wait for the deprecation to land, or",
11282
11458
  " omit that line when the rewrite can run in parallel.",