@codedrifters/configulator 0.0.231 → 0.0.233

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
@@ -7375,7 +7375,10 @@ var requirementsAnalystSubAgent = {
7375
7375
  " meeting extract).",
7376
7376
  "3. **Respect the taxonomy.** Route every discovered requirement to the",
7377
7377
  " correct BCM category (FR, BR, NFR, SEC, DR, INT, OPS, UX, MT, ADR, TR)",
7378
- " using the disambiguation rules in the requirements-writer skill.",
7378
+ " using the shared disambiguation rules \u2014 the same taxonomy the",
7379
+ " `requirements-writer` and `requirements-reviewer` load. The",
7380
+ " canonical source lives in `requirements-taxonomy.ts` and is",
7381
+ " embedded verbatim in both downstream agents' prompts.",
7379
7382
  "4. **Deduplicate.** Before creating an issue, check whether a requirement",
7380
7383
  " already exists or an issue is already open for it.",
7381
7384
  "",
@@ -7478,7 +7481,9 @@ var requirementsAnalystSubAgent = {
7478
7481
  "2. **Identify potential gaps.** For each potential missing requirement:",
7479
7482
  " - Classify into the correct BCM category (FR, BR, NFR, SEC, DR, INT,",
7480
7483
  " OPS, UX, MT, ADR, TR)",
7481
- " - Apply the disambiguation rules from the requirements-writer skill",
7484
+ " - Apply the shared disambiguation rules (from `requirements-taxonomy.ts`,",
7485
+ " also embedded in the requirements-writer and requirements-reviewer",
7486
+ " prompts)",
7482
7487
  " - Note the source that revealed the gap",
7483
7488
  " - Estimate priority based on the source context",
7484
7489
  "",
@@ -7819,6 +7824,61 @@ var requirementsAnalystBundle = {
7819
7824
  ]
7820
7825
  };
7821
7826
 
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
+
7822
7882
  // src/agent/bundles/requirements-writer.ts
7823
7883
  var TEMPLATE_BR = `---
7824
7884
  title: "BR-NNN: [Business Requirement Title]"
@@ -9750,52 +9810,13 @@ var requirementsWriterSubAgent = {
9750
9810
  "",
9751
9811
  "---",
9752
9812
  "",
9753
- "## The 11-Category Taxonomy",
9754
- "",
9755
- "All requirements follow the BIZBOK-aligned 11-category taxonomy",
9756
- "below. Getting requirements into the right category matters because",
9757
- "it determines which template applies, which standards inform it, and",
9758
- "how it traces to other requirements.",
9759
- "",
9760
- "| Category | Prefix | Directory (default) | Question it answers |",
9761
- "|----------|--------|---------------------|---------------------|",
9762
- "| Business Requirements | BR | `business/` | **Why** are we building this? What business value does it deliver? |",
9763
- "| Functional Requirements | FR | `functional/` | **What** does the system do? What is the user-visible behavior? |",
9764
- "| Non-Functional Requirements | NFR | `non-functional/` | **How well** must the system perform? What quality bar must it meet? |",
9765
- "| Technical Requirements | TR | `technical/` | **What technology** are we using, and why that one? |",
9766
- "| Architectural Decisions | ADR | `architectural-decisions/` | **What structural decision** are we making, and what are the trade-offs? |",
9767
- "| Security & Compliance | SEC | `security/` | **What must we protect**, and what rules govern that protection? |",
9768
- "| Data Requirements | DR | `data/` | **What data** do we store, how long, and how do we recover it? |",
9769
- "| Integration Requirements | INT | `integration/` | **What external systems** do we connect to, and how? |",
9770
- "| Operational Requirements | OPS | `operational/` | **How do we deploy, monitor, and respond** to incidents? |",
9771
- "| UX Requirements | UX | `ux/` | **How must the interface look, feel, and behave** for users? |",
9772
- "| Multi-Tenancy & Licensing | MT | `multi-tenancy/` | **How do we isolate tenants, gate features, and meter usage?** |",
9773
- "",
9774
- "All requirement documents live under `<REQUIREMENTS_ROOT>` in the",
9775
- "category directory shown above. Directory names are defaults \u2014",
9776
- "consuming projects may rename them, but the prefixes are universal.",
9813
+ ...REQUIREMENTS_TAXONOMY_TABLE_SECTION,
9777
9814
  "",
9778
9815
  "### Disambiguation Rules",
9779
9816
  "",
9780
9817
  "Apply these rules when deciding where a requirement belongs:",
9781
9818
  "",
9782
- "- **SEC vs NFR:** Protecting data, enforcing access control, or",
9783
- " meeting a regulation \u2192 SEC. System performance, uptime, or",
9784
- ' scalability \u2192 NFR. "99.9% uptime" is NFR; "audit logs for all',
9785
- ' admin actions" is SEC.',
9786
- '- **TR vs ADR:** A TR pins down a specific technology choice ("use',
9787
- ' PostgreSQL 16+"). An ADR records a structural decision with',
9788
- ' context, trade-offs, and alternatives ("why row-level isolation',
9789
- ' over schema-per-tenant"). TRs often follow from ADRs.',
9790
- "- **FR vs INT:** What the user experiences \u2192 FR. How two systems",
9791
- ' communicate \u2192 INT. "User can pay with a credit card" is FR;',
9792
- ' "Stripe Checkout API integration for payment processing" is INT.',
9793
- "- **DR vs SEC:** What data exists, how long we keep it, and how we",
9794
- " recover it \u2192 DR. Who can access it and how it's protected \u2192 SEC.",
9795
- " These often cross-reference each other.",
9796
- "- **NFR vs OPS:** A measurable target the system must meet \u2192 NFR.",
9797
- ' The tooling and processes to run the system \u2192 OPS. "p99 latency',
9798
- ' < 200ms" is NFR; "Datadog APM for latency monitoring" is OPS.',
9819
+ ...REQUIREMENTS_TAXONOMY_DISAMBIGUATION_SECTION,
9799
9820
  "",
9800
9821
  "---",
9801
9822
  "",
@@ -9807,12 +9828,7 @@ var requirementsWriterSubAgent = {
9807
9828
  "are the bundle defaults; consuming projects may rename or reduce the",
9808
9829
  "tier set in their own `docs/project-context.md`.",
9809
9830
  "",
9810
- "| Tier | Slug | When to use |",
9811
- "|------|------|-------------|",
9812
- "| **Platform** | `platform` | Core platform services \u2014 APIs, tenant isolation, auth, event bus, shared infrastructure |",
9813
- "| **Industry** | `industry` | Vertical-specific capabilities not every tenant needs |",
9814
- "| **Customer Workflow** | `customer-workflow` | Business logic tenants configure within the platform \u2014 approval chains, notification rules, intake processes |",
9815
- "| **Consumer Application** | `consumer-app` | UI/UX and integrations in external front-ends/systems consuming the platform's APIs |",
9831
+ ...REQUIREMENTS_TIER_TABLE_SECTION,
9816
9832
  "",
9817
9833
  "Tier is a **required metadata field**. Set it in the Metadata table",
9818
9834
  "of every requirement document and apply the matching `tier:*` issue",
@@ -10602,19 +10618,12 @@ var requirementsReviewerSubAgent = {
10602
10618
  "### 2. Categorization Accuracy",
10603
10619
  "",
10604
10620
  "Verify each document is in the right category by applying the",
10605
- "disambiguation rules from the `requirements-writer` taxonomy:",
10606
- "",
10607
- "- **SEC vs NFR:** Protecting data, enforcing access control, or",
10608
- " meeting a regulation \u2192 SEC. System performance, uptime, or",
10609
- " scalability \u2192 NFR.",
10610
- "- **TR vs ADR:** A specific technology choice \u2192 TR. A structural",
10611
- " decision with trade-offs \u2192 ADR.",
10612
- "- **FR vs INT:** User-visible behavior \u2192 FR. System-to-system",
10613
- " communication \u2192 INT.",
10614
- "- **DR vs SEC:** Data lifecycle / retention / recovery \u2192 DR. Data",
10615
- " access / protection \u2192 SEC.",
10616
- "- **NFR vs OPS:** Measurable system quality target \u2192 NFR. Tooling",
10617
- " and processes to operate the system \u2192 OPS.",
10621
+ "shared taxonomy disambiguation rules. The reviewer and the",
10622
+ "`requirements-writer` load the **same** rules from",
10623
+ "`requirements-taxonomy.ts` so the reviewer never flags a",
10624
+ "correctly-categorized document as wrong:",
10625
+ "",
10626
+ ...REQUIREMENTS_TAXONOMY_DISAMBIGUATION_SECTION,
10618
10627
  "",
10619
10628
  "Flag any documents that appear miscategorized. Explain where they",
10620
10629
  "should live and why.",
@@ -10659,6 +10668,16 @@ var requirementsReviewerSubAgent = {
10659
10668
  "- Bidirectional links exist where expected (if A references B in",
10660
10669
  " Traceability, B should reference A)",
10661
10670
  "",
10671
+ "Findings from this check describe edits inside an existing",
10672
+ "requirement document (the broken link lives in the body of the",
10673
+ "doc and must be rewritten or removed). Route follow-up issues to",
10674
+ "`req:write` so the `requirements-writer` \u2014 the only agent scoped",
10675
+ "to edit under `<REQUIREMENTS_ROOT>` \u2014 picks them up. Do **not**",
10676
+ "route Check 4 findings to `req:trace`; the analyst bundle does",
10677
+ "not edit requirement documents and the issue would sit",
10678
+ "unresolved. See the Follow-Up Issues section below for the full",
10679
+ "Check 3 vs. Check 4 routing split.",
10680
+ "",
10662
10681
  "### 5. Sequence Number Integrity",
10663
10682
  "",
10664
10683
  "Within each category directory under `<REQUIREMENTS_ROOT>`:",
@@ -10984,12 +11003,23 @@ var requirementsReviewerSubAgent = {
10984
11003
  "- Carries `type:requirement` (the type owned by the upstream",
10985
11004
  " `requirements-analyst` bundle)",
10986
11005
  "- Carries the appropriate phase label for the work needed:",
10987
- " - Structural / content fixes that an existing document needs \u2192",
10988
- " `req:write` (the `requirements-writer` agent picks it up to",
10989
- " revise the document)",
10990
- " - Missing or broken traceability links \u2192 `req:trace` (the",
10991
- " `requirements-analyst` agent picks it up to backfill",
10992
- " traceability)",
11006
+ " - Structural / content fixes that an existing requirement",
11007
+ " document needs (including broken internal cross-references",
11008
+ " from Check 4 \u2014 e.g., a `See: [FR-012](...)` link pointing at",
11009
+ " a renamed or deleted requirement) \u2192 `req:write` (the",
11010
+ " `requirements-writer` agent picks it up to revise the",
11011
+ " document). Only the writer is scoped to edit requirement",
11012
+ " documents, so anything that requires an in-place edit under",
11013
+ " `<REQUIREMENTS_ROOT>` routes here.",
11014
+ " - Missing traceability in **source documents** \u2014 BCM model",
11015
+ " docs, competitive-analysis notes, product-roadmap entries,",
11016
+ " meeting extracts \u2014 that should link forward to an existing",
11017
+ " requirement (Check 3: orphaned requirements whose fix lives",
11018
+ " in the source tree, not the requirement doc) \u2192 `req:trace`",
11019
+ " (the `requirements-analyst` agent picks it up to backfill",
11020
+ " source-doc traceability). **Do not** route Check 4 broken",
11021
+ " cross-references here \u2014 the analyst bundle never writes to",
11022
+ " `<REQUIREMENTS_ROOT>` and the issue would sit unresolved.",
10993
11023
  " - A new requirement is needed (e.g., a `Proposed` ADR is missing",
10994
11024
  " for a deferred technology choice) \u2192 `req:scan` (the analyst",
10995
11025
  " runs a scoped scan to confirm the gap, then drafts the new",