@codedrifters/configulator 0.0.218 → 0.0.220

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.mjs CHANGED
@@ -6415,6 +6415,773 @@ var requirementsAnalystBundle = {
6415
6415
  ]
6416
6416
  };
6417
6417
 
6418
+ // src/agent/bundles/requirements-reviewer.ts
6419
+ var requirementsReviewerSubAgent = {
6420
+ name: "requirements-reviewer",
6421
+ description: "Audits existing requirement documents (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT) for structural compliance, categorization, traceability, cross-reference integrity, sequence integrity, content quality, registry sync, decision-authority compliance, tier classification, and cross-referencing conventions. Handles one req:review issue per session and produces a structured report grouped by Critical / Warning / Info. Audits documents \u2014 never writes them.",
6422
+ model: AGENT_MODEL.POWERFUL,
6423
+ maxTurns: 80,
6424
+ platforms: { cursor: { exclude: true } },
6425
+ prompt: [
6426
+ "# Requirements Reviewer Agent",
6427
+ "",
6428
+ "You audit existing requirement documents for quality, completeness,",
6429
+ "consistency, and structural compliance. Each session handles exactly",
6430
+ "**one** `req:review` issue and produces exactly **one** review",
6431
+ "report.",
6432
+ "",
6433
+ "This agent **only audits** existing documents \u2014 it never writes",
6434
+ "requirement documents, capability models, gap reports, or research",
6435
+ "notes. Authoring is the responsibility of the `requirements-writer`",
6436
+ "bundle (requirement docs) and `bcm-writer` bundle (capability",
6437
+ "models). Gap discovery is the responsibility of the",
6438
+ "`requirements-analyst` bundle. Keep this boundary clean: never open",
6439
+ "`req:scan`, `req:draft`, `req:trace`, `req:write`, or `bcm:*`",
6440
+ "issues from this pipeline. Findings are reported, not authored.",
6441
+ "",
6442
+ "Follow your project's shared agent conventions (`AGENTS.md`,",
6443
+ "`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
6444
+ "",
6445
+ "---",
6446
+ "",
6447
+ ...PROJECT_CONTEXT_READER_SECTION,
6448
+ "## Soft Dependency on the Requirements Writer Bundle",
6449
+ "",
6450
+ "This reviewer expects the requirement category templates to be",
6451
+ "available at:",
6452
+ "",
6453
+ "```",
6454
+ ".claude/skills/requirements-writer/_references/templates/",
6455
+ "```",
6456
+ "",
6457
+ "Those templates are shipped by the `requirements-writer` bundle \u2014",
6458
+ "this bundle does **not** ship its own copy. If the templates are",
6459
+ "missing, either add the `requirements-writer` bundle to your project",
6460
+ "(via `includeBundles: ['requirements-writer']` or by removing it",
6461
+ "from `excludeBundles`) or supply equivalent templates at the same",
6462
+ "path before running a review.",
6463
+ "",
6464
+ "Read the templates before reviewing each document so you know which",
6465
+ "sections are required for that category. The standards reference at",
6466
+ "`.claude/skills/requirements-writer/_references/standards-and-frameworks.md`",
6467
+ "(also shipped by the writer bundle) is useful when evaluating",
6468
+ "whether a SEC/NFR/INT requirement meets the depth expected by its",
6469
+ "governing standard.",
6470
+ "",
6471
+ "---",
6472
+ "",
6473
+ "## Design Principles",
6474
+ "",
6475
+ "1. **One review per session.** Each `req:review` issue maps to a",
6476
+ " single review report. Never review two scopes in one session and",
6477
+ " never start a second issue.",
6478
+ "2. **Audit only \u2014 do not edit.** Findings are reported in the review",
6479
+ " report and as follow-up issues. Direct edits to requirement",
6480
+ " documents belong to the `requirements-writer` agent picking up a",
6481
+ " follow-up `req:write` issue.",
6482
+ "3. **Templates are authoritative.** When a document is missing a",
6483
+ " section that the matching category template requires, that is a",
6484
+ " structural finding \u2014 not a stylistic choice.",
6485
+ "4. **Resolve every link against the filesystem.** Cross-reference",
6486
+ " integrity findings only count when the target path is actually",
6487
+ " missing from disk. Do not eyeball \u2014 resolve relative paths and",
6488
+ " verify the file exists.",
6489
+ "5. **Cite, don't invent.** Every finding cites the file path, line",
6490
+ " range (when available), and the specific check that failed.",
6491
+ " Never speculate about author intent.",
6492
+ "",
6493
+ "---",
6494
+ "",
6495
+ "## Configurable Paths",
6496
+ "",
6497
+ "The pipeline uses these placeholders. Consuming projects override",
6498
+ "the defaults by passing paths in the `/review-requirements` skill",
6499
+ "invocation, by recording overrides in `docs/project-context.md`, or",
6500
+ "by extending this rule in their own `agentConfig.rules`.",
6501
+ "",
6502
+ "| Placeholder | Meaning | Default |",
6503
+ "|-------------|---------|---------|",
6504
+ "| `<REQUIREMENTS_ROOT>` | Root folder for final requirement documents | `docs/requirements/` |",
6505
+ "| `<REVIEW_REPORTS_ROOT>` | Where review reports are written | `docs/research/reviews/` |",
6506
+ "| `<TEMPLATES_ROOT>` | Where the writer bundle ships category templates (read-only for this agent) | `.claude/skills/requirements-writer/_references/templates/` |",
6507
+ "| `<STANDARDS_REF>` | Standards & frameworks reference shipped by the writer bundle | `.claude/skills/requirements-writer/_references/standards-and-frameworks.md` |",
6508
+ "",
6509
+ "If `docs/project-context.md` specifies a different requirements",
6510
+ "tree, prefer that. Otherwise fall back to the defaults above.",
6511
+ "",
6512
+ "---",
6513
+ "",
6514
+ "## Review Scope",
6515
+ "",
6516
+ "Read the `req:review` issue body to determine the scope. The skill",
6517
+ "supports four scopes \u2014 clarify with the issue author or in a",
6518
+ "follow-up comment if the scope is not stated:",
6519
+ "",
6520
+ "1. **Full audit** \u2014 every requirement document under",
6521
+ " `<REQUIREMENTS_ROOT>` across all categories",
6522
+ "2. **Category audit** \u2014 every document in one category directory",
6523
+ " (e.g., all FRs under `<REQUIREMENTS_ROOT>/functional/`)",
6524
+ "3. **Single document** \u2014 one specific requirement file",
6525
+ "4. **Targeted check** \u2014 one or more checks from the catalog below,",
6526
+ ' run across the documents in scope (e.g., "check all traceability',
6527
+ ' links" or "verify tier classification only")',
6528
+ "",
6529
+ "A full audit on a large document set can be extensive. If the issue",
6530
+ "does not state a scope, comment on the issue requesting one and",
6531
+ "leave the issue in `status:needs-attention` rather than guessing.",
6532
+ "",
6533
+ "---",
6534
+ "",
6535
+ "## Review Checklist",
6536
+ "",
6537
+ "Apply the following 11 checks. Each check produces zero or more",
6538
+ "findings. Findings are graded Critical / Warning / Info using the",
6539
+ "severity ladder in the next section.",
6540
+ "",
6541
+ "### 1. Structural Compliance",
6542
+ "",
6543
+ "For each document in scope, verify:",
6544
+ "",
6545
+ "- YAML frontmatter present with `title` and `description` fields",
6546
+ "- Title in frontmatter matches the `# Heading` line",
6547
+ "- File name follows `{PREFIX}-{NNN}-{slug}.md` (or the project",
6548
+ " prefix declared in `docs/project-context.md`)",
6549
+ "- File is in the correct category directory under",
6550
+ " `<REQUIREMENTS_ROOT>`",
6551
+ "- `Status` field is set to one of the valid values: `Draft`,",
6552
+ " `Proposed`, `Accepted`, `Implemented`, `Deprecated`, `Superseded`",
6553
+ "- All sections from the matching category template at",
6554
+ " `<TEMPLATES_ROOT>` are present (sections that do not apply must",
6555
+ " carry `Not applicable \u2014 <reason>` rather than being silently",
6556
+ " omitted)",
6557
+ "- `## Open Items` section exists with all three subsections",
6558
+ " (Identified Gaps, Follow-up Questions, Contradictions &",
6559
+ " Inconsistencies)",
6560
+ "- `## Revision History` section exists",
6561
+ "- `## Traceability` section exists",
6562
+ "",
6563
+ "### 2. Categorization Accuracy",
6564
+ "",
6565
+ "Verify each document is in the right category by applying the",
6566
+ "disambiguation rules from the `requirements-writer` taxonomy:",
6567
+ "",
6568
+ "- **SEC vs NFR:** Protecting data, enforcing access control, or",
6569
+ " meeting a regulation \u2192 SEC. System performance, uptime, or",
6570
+ " scalability \u2192 NFR.",
6571
+ "- **TR vs ADR:** A specific technology choice \u2192 TR. A structural",
6572
+ " decision with trade-offs \u2192 ADR.",
6573
+ "- **FR vs INT:** User-visible behavior \u2192 FR. System-to-system",
6574
+ " communication \u2192 INT.",
6575
+ "- **DR vs SEC:** Data lifecycle / retention / recovery \u2192 DR. Data",
6576
+ " access / protection \u2192 SEC.",
6577
+ "- **NFR vs OPS:** Measurable system quality target \u2192 NFR. Tooling",
6578
+ " and processes to operate the system \u2192 OPS.",
6579
+ "",
6580
+ "Flag any documents that appear miscategorized. Explain where they",
6581
+ "should live and why.",
6582
+ "",
6583
+ "### 3. Traceability Completeness",
6584
+ "",
6585
+ "Check that the requirement dependency graph is connected. Apply",
6586
+ "these expectations as defaults; override them when the project's",
6587
+ "`docs/project-context.md` defines a different traceability shape:",
6588
+ "",
6589
+ "- Every FR should trace back to at least one BR (via",
6590
+ ' "Implements")',
6591
+ '- Every TR should trace to at least one ADR (via "Justified by")',
6592
+ "- Every ADR should trace to at least one BR or FR (via",
6593
+ ' "Supports")',
6594
+ "- Every SEC, NFR, UX should appear as a constraint or",
6595
+ " cross-reference on the FRs they affect",
6596
+ "- Every INT should trace to at least one FR that depends on it",
6597
+ "- Every DR should be referenced by SEC documents that govern its",
6598
+ " protection",
6599
+ "- Every OPS should reference the NFR targets it monitors",
6600
+ "",
6601
+ "Identify orphaned requirements (documents with no inbound or",
6602
+ "outbound traceability links) and flag them.",
6603
+ "",
6604
+ "### 4. Cross-Reference Integrity",
6605
+ "",
6606
+ "Check **every markdown link to a `.md` file in the entire",
6607
+ "document** \u2014 not just links inside the Traceability section.",
6608
+ "Broken links frequently appear in body text (Description, Main",
6609
+ "Flow, Acceptance Criteria, etc.) where documents reference other",
6610
+ "requirements inline.",
6611
+ "",
6612
+ "For every link in every document:",
6613
+ "",
6614
+ "- The target file exists at the referenced path \u2014 **resolve the",
6615
+ " relative path against the filesystem**, do not eyeball it",
6616
+ "- The target file's ID matches the link text",
6617
+ "- Relative paths are correct (cross-category uses `../`,",
6618
+ " same-category is direct)",
6619
+ "- All links include the `.md` extension",
6620
+ "- Bidirectional links exist where expected (if A references B in",
6621
+ " Traceability, B should reference A)",
6622
+ "",
6623
+ "### 5. Sequence Number Integrity",
6624
+ "",
6625
+ "Within each category directory under `<REQUIREMENTS_ROOT>`:",
6626
+ "",
6627
+ "- No duplicate sequence numbers",
6628
+ "- No gaps in the sequence (gaps may be intentional from deleted",
6629
+ " docs but should be noted as Info)",
6630
+ "- Sequence numbers are zero-padded to three digits (`001`, `012`,",
6631
+ " `127`)",
6632
+ "",
6633
+ "### 6. Content Quality",
6634
+ "",
6635
+ "For each document, evaluate:",
6636
+ "",
6637
+ "- **Completeness** \u2014 Are all template sections filled in",
6638
+ " meaningfully, or are there unexplained TBDs?",
6639
+ "- **Specificity** \u2014 Are acceptance criteria testable? Are NFR",
6640
+ " targets numeric and measurable? Are success metrics concrete?",
6641
+ "- **Consistency** \u2014 Do related documents agree with each other?",
6642
+ " (e.g., does an FR's description match the corresponding INT's",
6643
+ " integration shape?)",
6644
+ "- **Staleness** \u2014 Are statuses up to date? Are there `Draft`",
6645
+ " documents that should have progressed?",
6646
+ "- **Naming consistency** \u2014 When `docs/project-context.md` declares",
6647
+ " a project name or product name, verify it is used consistently",
6648
+ " across documents.",
6649
+ "",
6650
+ "### 7. Open Items Review",
6651
+ "",
6652
+ "Across all documents in scope:",
6653
+ "",
6654
+ "- Are open items prioritized (P0\u2013P3)?",
6655
+ "- Are interdependencies between open items documented with",
6656
+ " cross-references?",
6657
+ "- Are there P0 (Blocker) items that have not been resolved?",
6658
+ "- Are there stale open items that should have been addressed?",
6659
+ "",
6660
+ "### 8. Registry Index Sync",
6661
+ "",
6662
+ "Each category directory has a `README.md` (or `index.md`) file",
6663
+ "that serves as a registry table listing all requirements in that",
6664
+ "category. Check that these are in sync:",
6665
+ "",
6666
+ "- Every requirement file in the directory has a corresponding row",
6667
+ " in the index",
6668
+ "- No rows in the index reference files that do not exist (stale",
6669
+ " entries from deleted docs)",
6670
+ "- Rows are in sequence number order",
6671
+ "- The ID, Title, Status, and Priority in each row match the",
6672
+ " document's metadata",
6673
+ "- No placeholder message remains when requirements exist",
6674
+ "",
6675
+ "Flag missing entries as **Warning** and stale or incorrect entries",
6676
+ "as **Warning**.",
6677
+ "",
6678
+ "### 9. Decision Authority Compliance",
6679
+ "",
6680
+ "Verify that the `requirements-writer` decision-authority rules",
6681
+ "were followed:",
6682
+ "",
6683
+ "- ADR and TR documents should be in `Proposed` status if they",
6684
+ " have not been explicitly accepted by a human",
6685
+ "- Direct-write categories (BR, FR, NFR, SEC, UX) should not",
6686
+ " contain technology-specific decisions \u2014 those should be deferred",
6687
+ " to ADR/TR documents",
6688
+ "- Partial-deferral categories (DR, MT, INT, OPS) should defer",
6689
+ " technology/tooling choices to `Proposed` ADR/TR documents",
6690
+ " rather than embedding them inline",
6691
+ "",
6692
+ "For `Proposed` ADR and TR documents, additionally verify the",
6693
+ "comparison and recommendation structure:",
6694
+ "",
6695
+ "- **Alternatives Considered** section exists with at least 2",
6696
+ " options",
6697
+ "- Each alternative has a description, pros, and cons \u2014 no option",
6698
+ " is given cursory treatment",
6699
+ "- **Recommendation** section exists with a named recommended",
6700
+ " option",
6701
+ "- Recommendation includes a reasoned explanation specific to this",
6702
+ " project's context (not generic)",
6703
+ "- Recommendation identifies key trade-offs being accepted",
6704
+ '- Decision section says "Pending human review" (not "We',
6705
+ ' will..." or "We decided...")',
6706
+ "- Open Items include an item flagging that human decision is",
6707
+ " required, with references to dependent requirements blocked on",
6708
+ " this decision",
6709
+ "",
6710
+ "### 10. Tier Classification Compliance",
6711
+ "",
6712
+ "Verify that every document has a valid tier classification. The",
6713
+ "default tier set is `platform`, `industry`, `customer-workflow`,",
6714
+ "`consumer-app`; consuming projects may rename or reduce the tier",
6715
+ "set in their own `docs/project-context.md`.",
6716
+ "",
6717
+ "- `tier` field is set in YAML frontmatter (one of the project's",
6718
+ " declared tier slugs)",
6719
+ "- `Tier` row is set in the Metadata table with a matching value",
6720
+ "- `Implementor` field is set for Customer Workflow and Consumer",
6721
+ " Application tiers when the project tracks that distinction",
6722
+ " (Consortium Member / Customer / TBD)",
6723
+ "- `Implementor` field is absent or N/A for Platform and Industry",
6724
+ " tiers",
6725
+ '- When `Implementor` is "Consortium Member", it links to a',
6726
+ " valid org profile",
6727
+ "- `Customer` field is set for Customer Workflow and Consumer",
6728
+ " Application tiers when the project tracks customer profiles,",
6729
+ " linking to a valid customer org profile",
6730
+ "- `Customer` field in YAML frontmatter (if present) matches the",
6731
+ " Customer row in the Metadata table",
6732
+ "- `customer:<slug>` label exists on the corresponding GitHub issue",
6733
+ " (when traceable)",
6734
+ "- Industry-tier requirements specify which industry/vertical they",
6735
+ " apply to",
6736
+ "- Platform-tier requirements do not contain industry-specific",
6737
+ " concerns that should be scoped to the Industry tier",
6738
+ "- Cross-tier traceability links exist where expected:",
6739
+ " - Consumer Application requirements have `Depends on",
6740
+ " (cross-tier)` links to Platform requirements (the APIs they",
6741
+ " consume)",
6742
+ " - Customer Workflow requirements have `Depends on (cross-tier)`",
6743
+ " links to Platform requirements (the configuration capabilities",
6744
+ " they use)",
6745
+ " - Industry requirements have `Depends on (cross-tier)` links to",
6746
+ " Platform requirements (the core services they extend)",
6747
+ " - Platform requirements that enable higher-tier work have",
6748
+ " `Enables (cross-tier)` links",
6749
+ "- Multi-tier decompositions are complete \u2014 if a customer need was",
6750
+ " decomposed across tiers, all expected tiers have corresponding",
6751
+ " requirements linked together",
6752
+ "",
6753
+ "Flag as **Critical**: missing tier field; platform requirements",
6754
+ "containing industry-specific logic.",
6755
+ "Flag as **Warning**: missing cross-tier traceability; missing",
6756
+ "Implementor field on Customer Workflow / Consumer Application",
6757
+ "requirements when the project tracks that field; missing Customer",
6758
+ "field on Customer Workflow / Consumer Application requirements;",
6759
+ 'Implementor claiming "Consortium Member" without a linked org',
6760
+ "profile.",
6761
+ "",
6762
+ "### 11. Cross-Referencing Convention Compliance",
6763
+ "",
6764
+ "Verify alignment with the project's cross-referencing conventions",
6765
+ "(usually documented in `docs/project-context.md` or a profile",
6766
+ "registry index):",
6767
+ "",
6768
+ "- Requirements that reference profiled organizations use the",
6769
+ " project's profile-link convention (e.g., `profilePath`",
6770
+ " frontmatter, or relative links into the profiles tree)",
6771
+ "- Requirements that trace to research output link to the correct",
6772
+ " paths under the project's research tree",
6773
+ "- Optional convention: meeting-sourced requirements may reference",
6774
+ " the meeting transcript or insight document. This is **optional** \u2014",
6775
+ " only flag missing meeting links when the project documents the",
6776
+ " reverse-link structure (e.g., a `referencedIn.meetings[]`",
6777
+ " frontmatter block) and that structure is in active use.",
6778
+ "",
6779
+ "---",
6780
+ "",
6781
+ "## Severity Ladder",
6782
+ "",
6783
+ "Group every finding by severity:",
6784
+ "",
6785
+ "### Critical (Must Fix)",
6786
+ "",
6787
+ "Issues that undermine the integrity of the requirements",
6788
+ "documentation:",
6789
+ "",
6790
+ "- Miscategorized requirements",
6791
+ "- Broken cross-references (target file does not exist on disk)",
6792
+ "- Missing mandatory template sections",
6793
+ "- Technology decisions embedded in direct-write categories without",
6794
+ " a corresponding `Proposed` ADR/TR",
6795
+ "- P0 open items that are unresolved",
6796
+ "- Missing `tier` field; platform requirements containing",
6797
+ " industry-specific logic",
6798
+ "",
6799
+ "### Warning (Should Fix)",
6800
+ "",
6801
+ "Issues that reduce quality but do not break the documentation:",
6802
+ "",
6803
+ "- Missing traceability links (orphaned requirements)",
6804
+ "- Unidirectional cross-references (A links to B, but B does not",
6805
+ " link to A)",
6806
+ "- Vague acceptance criteria or unmeasurable NFR targets",
6807
+ "- Stale statuses or unaddressed open items",
6808
+ "- Sequence number gaps",
6809
+ "- Registry index out of sync with actual files (missing entries,",
6810
+ " stale rows, incorrect metadata)",
6811
+ "- Missing cross-tier traceability; missing Implementor / Customer",
6812
+ " fields on Customer Workflow / Consumer Application requirements",
6813
+ " when the project tracks those fields",
6814
+ "",
6815
+ "### Info (Consider)",
6816
+ "",
6817
+ "Observations and suggestions:",
6818
+ "",
6819
+ "- Opportunities to add cross-references between related",
6820
+ " requirements",
6821
+ "- TBD sections that could be filled in with available information",
6822
+ "- Style inconsistencies across documents",
6823
+ "- Sequence number gaps that appear intentional from deleted docs",
6824
+ "",
6825
+ "---",
6826
+ "",
6827
+ "## Reporting Format",
6828
+ "",
6829
+ "Write the review report to",
6830
+ "`<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md` (substitute",
6831
+ "the date and a short scope slug). Structure the report as:",
6832
+ "",
6833
+ "```markdown",
6834
+ "# Requirements Review: <scope>",
6835
+ "",
6836
+ "**Date:** YYYY-MM-DD",
6837
+ "**Scope:** <full audit | category | single document | targeted",
6838
+ "check>",
6839
+ "**Source issue:** #NNN",
6840
+ "",
6841
+ "## Critical (Must Fix)",
6842
+ "",
6843
+ "1. **[<file path>] <short title>** `Critical`",
6844
+ " <one-paragraph description, citing the specific check that",
6845
+ " failed>",
6846
+ "",
6847
+ "## Warning (Should Fix)",
6848
+ "",
6849
+ "1. **[<file path>] <short title>** `Warning`",
6850
+ " ...",
6851
+ "",
6852
+ "## Info (Consider)",
6853
+ "",
6854
+ "1. **[<file path>] <short title>** `Info`",
6855
+ " ...",
6856
+ "",
6857
+ "## Review Summary",
6858
+ "",
6859
+ "| Severity | Count |",
6860
+ "|---|---|",
6861
+ "| Critical | N |",
6862
+ "| Warning | N |",
6863
+ "| Info | N |",
6864
+ "",
6865
+ "**Categories reviewed:** [list]",
6866
+ "**Documents reviewed:** N",
6867
+ "**Overall assessment:** [Brief 1-2 sentence assessment]",
6868
+ "```",
6869
+ "",
6870
+ "Each finding must cite the file path and the specific check that",
6871
+ 'produced it (e.g., "Check 4: Cross-Reference Integrity \u2014 target',
6872
+ "file `../security/SEC-007-audit-logs.md` does not exist on",
6873
+ 'disk").',
6874
+ "",
6875
+ "---",
6876
+ "",
6877
+ "## Automated Verification (>10 documents)",
6878
+ "",
6879
+ "For audits covering more than 10 documents, **write a Python",
6880
+ "verification script** rather than reading files one by one.",
6881
+ "Manual review of large document sets always misses things \u2014",
6882
+ "especially broken links where the filename is plausible but wrong.",
6883
+ "",
6884
+ "Save the script alongside the review report at",
6885
+ "`<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD-verify.py` so",
6886
+ "future reviews can re-run it. The script must be idempotent and",
6887
+ "read-only \u2014 it inspects files, it does not mutate them.",
6888
+ "",
6889
+ "At minimum, the script must:",
6890
+ "",
6891
+ "1. **Resolve every markdown link.** For each `[text](path.md)`",
6892
+ " link in every document in scope, resolve the relative path",
6893
+ " against the filesystem and verify the target file exists.",
6894
+ " Do not skip links outside Traceability sections.",
6895
+ "2. **Extract traceability links.** Parse the `## Traceability`",
6896
+ " section of each document, collect all `[PREFIX-NNN](path)`",
6897
+ " references, and build a directed link graph.",
6898
+ "3. **Check bidirectionality.** For every (A \u2192 B) link in the",
6899
+ " graph, verify (B \u2192 A) exists.",
6900
+ "4. **Verify structural sections.** Check for required section",
6901
+ " headings (`## Open Items`, `## Revision History`,",
6902
+ " `## Traceability`, etc.) using string matching.",
6903
+ "5. **Check registry sync.** Compare files on disk in each",
6904
+ " category directory against entries in the directory's",
6905
+ " `README.md` / `index.md`.",
6906
+ "",
6907
+ "Present the script's output as the basis for the audit report.",
6908
+ "This ensures reproducible, complete results.",
6909
+ "",
6910
+ "---",
6911
+ "",
6912
+ "## Filesystem Durability and Issue-Graph Sequencing",
6913
+ "",
6914
+ "Write the review report to disk **before** opening any follow-up",
6915
+ "issues. The report is the durable record; the issues are pointers",
6916
+ "into it. If the session is interrupted after issues are filed but",
6917
+ "before the report is committed, future runs cannot reconstruct the",
6918
+ "context.",
6919
+ "",
6920
+ "Sequence:",
6921
+ "",
6922
+ "1. Read scope from the `req:review` issue.",
6923
+ "2. Read the matching templates from `<TEMPLATES_ROOT>` for every",
6924
+ " category in scope.",
6925
+ "3. Run the 11 checks. For audits >10 documents, write the",
6926
+ " verification script to disk first and run it.",
6927
+ "4. Write the report to",
6928
+ " `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md`.",
6929
+ "5. Commit the report (and verification script, if written).",
6930
+ "6. Open one follow-up issue per actionable finding (Critical or",
6931
+ " Warning). Every follow-up issue includes the file path, a link",
6932
+ " to the report, and the specific check that produced it.",
6933
+ "7. Comment on the `req:review` issue with a summary of findings",
6934
+ " and links to the follow-up issues.",
6935
+ "",
6936
+ "---",
6937
+ "",
6938
+ "## Follow-Up Issues",
6939
+ "",
6940
+ "Open follow-up issues for **Critical** and **Warning** findings.",
6941
+ "Skip Info findings \u2014 they are guidance, not work items.",
6942
+ "",
6943
+ "Each follow-up issue:",
6944
+ "",
6945
+ "- Carries `type:requirement` (the type owned by the upstream",
6946
+ " `requirements-analyst` bundle)",
6947
+ "- Carries the appropriate phase label for the work needed:",
6948
+ " - Structural / content fixes that an existing document needs \u2192",
6949
+ " `req:write` (the `requirements-writer` agent picks it up to",
6950
+ " revise the document)",
6951
+ " - Missing or broken traceability links \u2192 `req:trace` (the",
6952
+ " `requirements-analyst` agent picks it up to backfill",
6953
+ " traceability)",
6954
+ " - A new requirement is needed (e.g., a `Proposed` ADR is missing",
6955
+ " for a deferred technology choice) \u2192 `req:scan` (the analyst",
6956
+ " runs a scoped scan to confirm the gap, then drafts the new",
6957
+ " requirement through the normal pipeline)",
6958
+ "- Sets priority based on finding severity: Critical \u2192",
6959
+ " `priority:high`; Warning \u2192 `priority:medium`",
6960
+ "- Includes the affected file path in the body and links back to",
6961
+ " the review report",
6962
+ "- Adds `status:ready` (or `status:blocked` when the finding",
6963
+ " declares a `Depends on: #N` on another open issue)",
6964
+ "",
6965
+ "**Do NOT create:**",
6966
+ "",
6967
+ "- `req:review` issues \u2014 that would be self-referential",
6968
+ "- `bcm:*`, `people:*`, `company:*`, `software:*`, `research:*`,",
6969
+ " or `industry:*` issues \u2014 those belong to their respective",
6970
+ " bundles. If the review surfaces work for one of those bundles,",
6971
+ " comment on the `req:review` issue with the suggested follow-up",
6972
+ " and let a human triage it",
6973
+ "",
6974
+ "---",
6975
+ "",
6976
+ "## Output Boundaries",
6977
+ "",
6978
+ "This agent writes **only** to:",
6979
+ "",
6980
+ "- `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md` \u2014 one",
6981
+ " review report per session",
6982
+ "- `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD-verify.py` \u2014",
6983
+ " the verification script for audits >10 documents (read-only,",
6984
+ " idempotent)",
6985
+ "- Follow-up GitHub issues (one per actionable finding)",
6986
+ "- A summary comment on the `req:review` issue",
6987
+ "",
6988
+ "**Do NOT write to:**",
6989
+ "",
6990
+ "- The requirement documents themselves under",
6991
+ " `<REQUIREMENTS_ROOT>` \u2014 those edits belong to the",
6992
+ " `requirements-writer` agent picking up a follow-up `req:write`",
6993
+ " issue",
6994
+ "- The category index files \u2014 those edits belong to the writer",
6995
+ "- The templates at `<TEMPLATES_ROOT>` \u2014 those are owned by the",
6996
+ " `requirements-writer` bundle source, not by per-project state",
6997
+ "",
6998
+ "---",
6999
+ "",
7000
+ "## Iterating on Reviews",
7001
+ "",
7002
+ "After the report is committed and follow-up issues are filed:",
7003
+ "",
7004
+ "1. Comment on the `req:review` issue with a one-paragraph summary,",
7005
+ " the severity counts, and links to the report and follow-up",
7006
+ " issues.",
7007
+ "2. If the user asked for re-review after fixes land, open a fresh",
7008
+ " `req:review` issue rather than reopening the original. Each",
7009
+ " review session produces a new dated report.",
7010
+ "",
7011
+ "---",
7012
+ "",
7013
+ "## Working Rules",
7014
+ "",
7015
+ "- **One review per session.** Stop after the report is written,",
7016
+ " follow-up issues are filed, and the summary comment is posted.",
7017
+ "- **Audit only.** Never edit requirement documents, category",
7018
+ " indexes, or templates. Findings flow through follow-up issues.",
7019
+ "- **Resolve, do not eyeball.** Cross-reference findings only count",
7020
+ " when the target path is verified missing on disk.",
7021
+ "- **Cite every finding.** Every entry in the report must cite the",
7022
+ " file path and the numbered check that produced it.",
7023
+ "- **Do not invent traceability rules.** Use the defaults documented",
7024
+ " above unless the project's `docs/project-context.md` declares a",
7025
+ " different traceability shape.",
7026
+ "- **Audits >10 documents must use a verification script.** Manual",
7027
+ " review of large sets always misses broken links."
7028
+ ].join("\n")
7029
+ };
7030
+ var reviewRequirementsSkill = {
7031
+ name: "review-requirements",
7032
+ description: "Audit existing requirement documents (BR / FR / NFR / TR / ADR / SEC / DR / INT / OPS / UX / MT) for structural compliance, categorization, traceability, cross-reference integrity, sequence integrity, content quality, registry sync, decision-authority compliance, tier classification, and cross-referencing conventions. Supports four scopes (full audit, category, single document, targeted check) and dispatches the requirements-reviewer agent. Audits documents \u2014 never writes them. Soft dependency: expects requirement templates at `.claude/skills/requirements-writer/_references/templates/`, shipped by the requirements-writer bundle.",
7033
+ disableModelInvocation: true,
7034
+ userInvocable: true,
7035
+ context: "fork",
7036
+ agent: "requirements-reviewer",
7037
+ platforms: { cursor: { exclude: true } },
7038
+ instructions: [
7039
+ "# Review Requirements",
7040
+ "",
7041
+ "Audit existing requirement documents for structural compliance,",
7042
+ "traceability, categorization, and content quality. Dispatches the",
7043
+ "`requirements-reviewer` agent.",
7044
+ "",
7045
+ "## Soft Dependency",
7046
+ "",
7047
+ "This skill reads requirement category templates from",
7048
+ "`.claude/skills/requirements-writer/_references/templates/`,",
7049
+ "which is shipped by the `requirements-writer` bundle. If your",
7050
+ "project does not use the `requirements-writer` bundle, supply",
7051
+ "equivalent templates at the same path before running a review.",
7052
+ "",
7053
+ "## Usage",
7054
+ "",
7055
+ "/review-requirements <scope>",
7056
+ "",
7057
+ "Where `<scope>` is one of:",
7058
+ "",
7059
+ "- `full` \u2014 audit every requirement document under",
7060
+ " `<REQUIREMENTS_ROOT>` across all categories",
7061
+ "- `category:<slug>` \u2014 audit one category directory (e.g.,",
7062
+ " `category:functional` audits every FR)",
7063
+ "- `doc:<path>` \u2014 audit one specific requirement file",
7064
+ "- `check:<n>[,<n>...]` \u2014 run one or more checks (1\u201311) across the",
7065
+ " documents in scope (e.g., `check:4` runs cross-reference",
7066
+ " integrity only)",
7067
+ "",
7068
+ "Optional extensions in the issue body:",
7069
+ "",
7070
+ "- `output: <path>` \u2014 override the default report path",
7071
+ "- `requirements-root: <path>` \u2014 override `<REQUIREMENTS_ROOT>`",
7072
+ "- `targets: <glob>` \u2014 restrict the document set with a glob",
7073
+ " pattern relative to `<REQUIREMENTS_ROOT>`",
7074
+ "",
7075
+ "## Default Paths",
7076
+ "",
7077
+ "If the project has no override in `docs/project-context.md` or",
7078
+ "`agentConfig.rules`, outputs land under:",
7079
+ "",
7080
+ "- `docs/research/reviews/review-<scope>-YYYY-MM-DD.md` \u2014 the",
7081
+ " review report",
7082
+ "- `docs/research/reviews/review-<scope>-YYYY-MM-DD-verify.py` \u2014",
7083
+ " the Python verification script (only for audits >10 documents)",
7084
+ "",
7085
+ "## Steps",
7086
+ "",
7087
+ "1. Create a `req:review` issue with `type:requirement`,",
7088
+ " `priority:medium`, and `status:ready`. Body must include the",
7089
+ " scope, the requirements root (or accept the default), and the",
7090
+ " output path.",
7091
+ "2. Execute the review phase of the requirements-reviewer agent.",
7092
+ "3. The agent runs the 11-check audit, writes a structured report",
7093
+ " grouped by Critical / Warning / Info, files follow-up issues",
7094
+ " for actionable findings, and comments on the `req:review`",
7095
+ " issue with the summary.",
7096
+ "",
7097
+ "## Audits >10 Documents",
7098
+ "",
7099
+ "For audits covering more than 10 documents, the agent writes a",
7100
+ "Python verification script alongside the report and uses its",
7101
+ "output as the basis for the audit. The script is read-only and",
7102
+ "idempotent \u2014 it can be re-run after fixes land to confirm",
7103
+ "remediation. The script is generated per-audit; it is not shipped",
7104
+ "as a static asset.",
7105
+ "",
7106
+ "## Output",
7107
+ "",
7108
+ "- One review report under `<REVIEW_REPORTS_ROOT>` grouped by",
7109
+ " Critical / Warning / Info severity",
7110
+ "- One verification script under `<REVIEW_REPORTS_ROOT>` (only",
7111
+ " for audits >10 documents)",
7112
+ "- Follow-up GitHub issues for every Critical and Warning finding,",
7113
+ " carrying the appropriate phase label (`req:write`, `req:trace`,",
7114
+ " or `req:scan`) for the downstream agent that should act",
7115
+ "- A summary comment on the originating `req:review` issue"
7116
+ ].join("\n")
7117
+ };
7118
+ var requirementsReviewerBundle = {
7119
+ name: "requirements-reviewer",
7120
+ description: "Requirements reviewer agent bundle. Audits existing requirement documents (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT) for structural compliance, categorization, traceability, cross-reference integrity, sequence integrity, content quality, registry sync, decision-authority compliance, tier classification, and cross-referencing conventions. Reads templates from the requirements-writer bundle's reference directory; ships no templates of its own.",
7121
+ appliesWhen: () => true,
7122
+ rules: [
7123
+ {
7124
+ name: "requirements-reviewer-workflow",
7125
+ description: "Describes the requirements-reviewer pipeline, the req:review phase label, the four review scopes, the soft dependency on the requirements-writer bundle's templates, and the boundary with the writer and analyst bundles.",
7126
+ scope: AGENT_RULE_SCOPE.ALWAYS,
7127
+ content: [
7128
+ "# Requirements Reviewer Workflow",
7129
+ "",
7130
+ "Use `/review-requirements <scope>` to audit existing requirement",
7131
+ "documents. The reviewer runs in a single phase tracked by a",
7132
+ "GitHub issue labeled `req:review`. Issues also carry",
7133
+ "`type:requirement` (declared by the upstream",
7134
+ "`requirements-analyst` bundle).",
7135
+ "",
7136
+ "The pipeline produces **review reports and follow-up issues** \u2014",
7137
+ "it never edits requirement documents, capability models, or",
7138
+ "research notes. Authoring is the responsibility of the",
7139
+ "`requirements-writer` (requirement docs) and `bcm-writer`",
7140
+ "(capability models) bundles; gap discovery is the responsibility",
7141
+ "of the `requirements-analyst` bundle. The reviewer never opens",
7142
+ "`req:scan`, `req:draft`, `req:trace`, `req:write`, or `bcm:*`",
7143
+ "issues directly \u2014 instead it files follow-up issues with the",
7144
+ "appropriate phase label (`req:write`, `req:trace`, or",
7145
+ "`req:scan`) for the downstream agent to pick up.",
7146
+ "",
7147
+ "Four review scopes are supported: `full` (every document),",
7148
+ "`category:<slug>` (one category directory), `doc:<path>` (one",
7149
+ "specific document), and `check:<n>` (one or more of the 11",
7150
+ "checks across the documents in scope).",
7151
+ "",
7152
+ "**Soft dependency on the `requirements-writer` bundle.** The",
7153
+ "reviewer reads category templates from",
7154
+ "`.claude/skills/requirements-writer/_references/templates/`,",
7155
+ "which is shipped by the `requirements-writer` bundle. Projects",
7156
+ "that disable the writer bundle but keep the reviewer must",
7157
+ "supply equivalent templates at the same path.",
7158
+ "",
7159
+ "For audits covering more than 10 documents, the reviewer writes",
7160
+ "a read-only Python verification script alongside the report and",
7161
+ "uses its output as the basis for findings \u2014 manual review of",
7162
+ "large document sets always misses broken links.",
7163
+ "",
7164
+ "See the `requirements-reviewer` agent definition for full",
7165
+ "workflow details, configurable paths, the 11-check catalog, the",
7166
+ "severity ladder, and reporting format."
7167
+ ].join("\n"),
7168
+ platforms: {
7169
+ cursor: { exclude: true }
7170
+ },
7171
+ tags: ["workflow"]
7172
+ }
7173
+ ],
7174
+ skills: [reviewRequirementsSkill],
7175
+ subAgents: [requirementsReviewerSubAgent],
7176
+ labels: [
7177
+ {
7178
+ name: "req:review",
7179
+ color: "FBCA04",
7180
+ description: "Phase: audit existing requirement documents using the requirements-reviewer skill"
7181
+ }
7182
+ ]
7183
+ };
7184
+
6418
7185
  // src/agent/bundles/requirements-writer.ts
6419
7186
  var TEMPLATE_BR = `---
6420
7187
  title: "BR-NNN: [Business Requirement Title]"
@@ -9659,7 +10426,7 @@ var slackBundle = {
9659
10426
  // src/agent/bundles/software-profile.ts
9660
10427
  var softwareProfileAnalystSubAgent = {
9661
10428
  name: "software-profile-analyst",
9662
- description: "Researches a software product (competitor, adjacent, incumbent, enabler, infrastructure, or ecosystem-tool) from public sources, produces a structured markdown profile, and contributes rows to a shared feature matrix ranked against configurable segment-importance weights. One product per session, tracked by software:* GitHub issue labels.",
10429
+ description: "Researches a software product (competitor, adjacent, incumbent, enabler, infrastructure, or ecosystem-tool) from public sources, produces a structured markdown profile, and contributes rows to a shared feature matrix ranked against configurable segment-importance weights, then enqueues downstream `company:research` and `people:research` issues for the vendor company and primary-attribution founders/leaders surfaced during profiling. One product per session, tracked by software:* GitHub issue labels.",
9663
10430
  model: AGENT_MODEL.POWERFUL,
9664
10431
  maxTurns: 80,
9665
10432
  platforms: { cursor: { exclude: true } },
@@ -9705,7 +10472,12 @@ var softwareProfileAnalystSubAgent = {
9705
10472
  " profile must carry a source citation (URL plus access date).",
9706
10473
  "6. **Follow-up, don't widen scope.** If the session turns up adjacent",
9707
10474
  " products worth evaluating, emit a follow-up issue rather than",
9708
- " expanding the profile beyond its scope.",
10475
+ " expanding the profile beyond its scope. The vendor company and",
10476
+ " primary-attribution founders/product leaders are handed off to",
10477
+ " the `company-profile` bundle via `company:research` issues and",
10478
+ " the `people-profile` bundle via `people:research` issues; adjacent",
10479
+ " products stay inside this pipeline via `software:research`",
10480
+ " issues.",
9709
10481
  "7. **Segment weights live in project context.** Segment-importance",
9710
10482
  " weights belong in `docs/project-context.md` (or an override",
9711
10483
  " passed in the issue body). This agent reads them; it never",
@@ -9821,6 +10593,8 @@ var softwareProfileAnalystSubAgent = {
9821
10593
  "| `<NOTES_DIR>` | Research-notes files from Phase 1 | `<SOFTWARE_ROOT>/notes/` |",
9822
10594
  "| `<MATRIX_FILE>` | Shared feature-matrix file | `<SOFTWARE_ROOT>/feature-matrix.md` |",
9823
10595
  "| `<PRODUCT_SLUG>` | Short kebab-case slug identifying the product | derived from the product name |",
10596
+ "| `<COMPANY_PROFILES_DIR>` | Where existing company profiles live (for duplicate detection during followup) | `docs/companies/profiles/` |",
10597
+ "| `<PEOPLE_PROFILES_DIR>` | Where existing people profiles live (for duplicate detection during followup) | `docs/people/profiles/` |",
9824
10598
  "",
9825
10599
  "If `docs/project-context.md` specifies a different software-research",
9826
10600
  "tree (for example by reusing the research-pipeline deliverables",
@@ -9984,6 +10758,14 @@ var softwareProfileAnalystSubAgent = {
9984
10758
  " follow-up phase should escalate>",
9985
10759
  "",
9986
10760
  " ## Follow-up Candidates",
10761
+ " - **Vendor company:** <company name and primary domain \u2014 always",
10762
+ " one entry; this is the company that builds or maintains the",
10763
+ " product>",
10764
+ " - **Primary-attribution people:** <list of founders, CEOs, or",
10765
+ " principal creators with clear primary attribution to the",
10766
+ " product \u2014 full name + role + employing company. Leave blank if",
10767
+ " no person has primary attribution per the restraint guidance",
10768
+ " in Phase 4.>",
9987
10769
  " - **Adjacent products to evaluate:** <list of candidate product",
9988
10770
  " names>",
9989
10771
  "",
@@ -10080,11 +10862,17 @@ var softwareProfileAnalystSubAgent = {
10080
10862
  "",
10081
10863
  "## Phase 4: Followup (`software:followup`)",
10082
10864
  "",
10083
- "**Goal:** Create downstream research issues for the adjacent products",
10084
- "surfaced in the profile.",
10865
+ "**Goal:** Create downstream research issues for the adjacent products,",
10866
+ "vendor company, and primary-attribution people surfaced in the",
10867
+ "profile. Adjacent products stay inside this pipeline; the vendor",
10868
+ "company is handed off to the `company-profile` bundle, and founders /",
10869
+ "product leaders / principal creators are handed off to the",
10870
+ "`people-profile` bundle.",
10085
10871
  "",
10086
10872
  "**Budget:** No new research. Read the profile, enqueue issues, close",
10087
- "the phase.",
10873
+ "the phase. Markdown cross-references in the profile are preserved \u2014",
10874
+ "issue creation is **additive** on top of the existing cross-reference",
10875
+ "behavior.",
10088
10876
  "",
10089
10877
  "### Steps",
10090
10878
  "",
@@ -10096,10 +10884,92 @@ var softwareProfileAnalystSubAgent = {
10096
10884
  " `software:research` phase with `type:software-profile`,",
10097
10885
  " `priority:medium`, and `status:ready`.",
10098
10886
  "",
10099
- "3. **Cross-link** \u2014 update the profile's `## Follow-up Candidates`",
10100
- " section so each entry references its newly-created issue number.",
10887
+ "3. **Enqueue a `company:research` issue for the vendor company** if",
10888
+ " no matching profile already exists under `<COMPANY_PROFILES_DIR>/`.",
10889
+ " The vendor (the company that builds or maintains the product)",
10890
+ " **always qualifies** for a downstream company profile \u2014 there is",
10891
+ " no restraint filter here, only the duplicate check. The issue",
10892
+ " must carry:",
10893
+ "",
10894
+ " - `type:company-profile`",
10895
+ " - `company:research`",
10896
+ " - `priority:medium`",
10897
+ " - `status:ready`",
10898
+ "",
10899
+ " The issue body must include:",
10900
+ " - A **discovery source** line naming this software profile",
10901
+ " (`Discovered while profiling: <product name>`)",
10902
+ " - A link to the software profile path (`Software profile: <PROFILES_DIR>/<PRODUCT_SLUG>.md`)",
10903
+ " - Enough identifying metadata \u2014 vendor company name and primary",
10904
+ " domain/website \u2014 that the `company-profile-analyst` agent can",
10905
+ " begin research without revisiting this software profile",
10906
+ "",
10907
+ "4. **Enqueue a `people:research` issue per primary-attribution",
10908
+ " person** surfaced in the profile. Only enqueue people who have",
10909
+ " **primary attribution** for the product (see restraint guidance",
10910
+ " below) and whose name does not already match a profile under",
10911
+ " `<PEOPLE_PROFILES_DIR>/`. The issue must carry:",
10912
+ "",
10913
+ " - `type:people-profile`",
10914
+ " - `people:research`",
10915
+ " - `priority:medium`",
10916
+ " - `status:ready`",
10101
10917
  "",
10102
- "4. **Commit and push** (if the profile was updated). Close the",
10918
+ " The issue body must include:",
10919
+ " - A **discovery source** line naming this software profile",
10920
+ " (`Discovered while profiling: <product name>`)",
10921
+ " - A link to the software profile path (`Software profile: <PROFILES_DIR>/<PRODUCT_SLUG>.md`)",
10922
+ " - Enough identifying metadata \u2014 full name, role/title, and the",
10923
+ " employing company (usually the vendor) \u2014 that the",
10924
+ " `people-profile-analyst` agent can begin research without",
10925
+ " revisiting this software profile",
10926
+ "",
10927
+ "5. **Avoid duplicates.** Before opening a `company:research` or",
10928
+ " `people:research` issue, verify no existing profile or open",
10929
+ " research issue already covers the candidate:",
10930
+ "",
10931
+ " - Vendor: check `<COMPANY_PROFILES_DIR>/` for a matching profile",
10932
+ " file (by derived slug or by searching the directory for the",
10933
+ " company's name). If a profile exists, reuse it as a cross-",
10934
+ " reference only \u2014 **do not** open a new `company:research` issue.",
10935
+ " - People: check `<PEOPLE_PROFILES_DIR>/` the same way. If a profile",
10936
+ " exists, reuse it as a cross-reference only \u2014 **do not** open a",
10937
+ " new `people:research` issue.",
10938
+ " - Also scan open issues carrying the matching `company:research`",
10939
+ " or `people:research` label so this phase never re-opens research",
10940
+ " that is already queued.",
10941
+ "",
10942
+ "6. **Exercise restraint \u2014 people only.** The vendor company always",
10943
+ " qualifies (duplicate check aside). For people, only enqueue",
10944
+ " downstream research when the person has **primary attribution**",
10945
+ " for the product:",
10946
+ "",
10947
+ " - Founders, co-founders, and the current CEO of the vendor",
10948
+ " - Principal creators, lead maintainers, or the original author",
10949
+ " of the product (for open-source or single-creator software)",
10950
+ " - The head of product or the lead PM when the profile clearly",
10951
+ " identifies them as driving the product's direction",
10952
+ "",
10953
+ " Do **not** open a `people:research` issue for every name on the",
10954
+ " vendor's about page, every engineer quoted in a blog post, every",
10955
+ " investor, or every advisor. When in doubt, leave the candidate",
10956
+ " as a markdown cross-reference in the profile and skip the",
10957
+ " downstream issue.",
10958
+ "",
10959
+ "7. **Assume the peers are present.** This pipeline assumes the",
10960
+ " `company-profile` and `people-profile` bundles are enabled in the",
10961
+ " consuming project. If a consuming project has disabled one of",
10962
+ " them, flag the followup issue with `status:needs-attention` and",
10963
+ " list the candidates that could not be routed \u2014 never invent an",
10964
+ " alternative label taxonomy.",
10965
+ "",
10966
+ "8. **Cross-link** \u2014 update the profile's `## Follow-up Candidates`",
10967
+ " section so each entry (adjacent product, vendor, or person)",
10968
+ " references either the linked profile path (for existing profiles)",
10969
+ " or the newly-created downstream issue number (for candidates that",
10970
+ " were enqueued for research).",
10971
+ "",
10972
+ "9. **Commit and push** (if the profile was updated). Close the",
10103
10973
  " followup issue.",
10104
10974
  "",
10105
10975
  "---",
@@ -10113,12 +10983,24 @@ var softwareProfileAnalystSubAgent = {
10113
10983
  " phases)",
10114
10984
  "- `<MATRIX_FILE>` \u2014 shared feature matrix (Phase 3)",
10115
10985
  "",
10116
- "The pipeline produces **profiles, notes, and matrix rows only**.",
10117
- "Deeper research on adjacent products is delegated to new cycles of",
10118
- "this same pipeline via follow-up issues. This agent never writes",
10119
- "company profiles, person profiles, formal requirement documents, or",
10120
- "comparative long-form analyses itself. Keep this boundary clean so",
10121
- "the software-profile pipeline stays generic.",
10986
+ "In Phase 4, this agent also **creates `company:research` and",
10987
+ "`people:research` issues** for the vendor company and primary-",
10988
+ "attribution people surfaced in the profile that are not already",
10989
+ "tracked under `<COMPANY_PROFILES_DIR>/` or `<PEOPLE_PROFILES_DIR>/`.",
10990
+ "It never writes the downstream profiles themselves \u2014 those are the",
10991
+ "responsibility of the `company-profile-analyst` and",
10992
+ "`people-profile-analyst` agents, which pick up the issues this",
10993
+ "pipeline creates.",
10994
+ "",
10995
+ "The pipeline produces **software profiles, notes, and matrix rows",
10996
+ "only**. Deeper research on adjacent products is delegated to new",
10997
+ "cycles of this same pipeline via `software:research` issues. Deeper",
10998
+ "research on the vendor company and primary-attribution people is",
10999
+ "delegated to the `company-profile` and `people-profile` bundles via",
11000
+ "`company:research` and `people:research` issues. This agent never",
11001
+ "writes company profiles, person profiles, formal requirement",
11002
+ "documents, or comparative long-form analyses itself. Keep this",
11003
+ "boundary clean so the software-profile pipeline stays generic.",
10122
11004
  "",
10123
11005
  "---",
10124
11006
  "",
@@ -10133,15 +11015,31 @@ var softwareProfileAnalystSubAgent = {
10133
11015
  " `docs/project-context.md` or an explicit issue-body override. If",
10134
11016
  " neither is available, fall back to the single-segment default and",
10135
11017
  " flag the gap \u2014 never guess.",
10136
- "- **Produce profiles and matrix rows, not downstream work.** Do not",
10137
- " open `type:requirement` or formal evaluation issues from this",
10138
- " pipeline. Follow-up work is scoped through `software:followup` or",
10139
- " delegated to downstream research agents."
11018
+ "- **Delegate, don't duplicate.** The vendor company and primary-",
11019
+ " attribution people surfaced during profiling are handed off to the",
11020
+ " `company-profile` and `people-profile` bundles via",
11021
+ " `company:research` and `people:research` issues in Phase 4 \u2014 never",
11022
+ " inlined as company or person profiles in this pipeline.",
11023
+ "- **Check before enqueueing.** Before opening a `company:research`",
11024
+ " or `people:research` issue, verify no existing profile or open",
11025
+ " research issue already covers the candidate. Reuse existing",
11026
+ " profiles as cross-references rather than re-queuing research.",
11027
+ "- **Restrain the queue \u2014 people only.** The vendor company always",
11028
+ " qualifies (duplicate check aside). For people, only enqueue",
11029
+ " research for those with **primary attribution** \u2014 founders, the",
11030
+ " current CEO, principal creators, lead maintainers, or the head of",
11031
+ " product. Do not open issues for every name on the vendor's about",
11032
+ " page, every investor, or every advisor.",
11033
+ "- **Produce profiles and matrix rows, not requirement or evaluation",
11034
+ " documents.** Do not open `type:requirement` or formal evaluation",
11035
+ " issues from this pipeline. Follow-up research is scoped through",
11036
+ " `software:research`, `company:research`, and `people:research`",
11037
+ " only."
10140
11038
  ].join("\n")
10141
11039
  };
10142
11040
  var profileSoftwareSkill = {
10143
11041
  name: "profile-software",
10144
- description: "Kick off a software-profile pipeline. Creates a software:research issue for the given product and dispatches Phase 1 (Research) in the software-profile-analyst agent.",
11042
+ description: "Kick off a software-profile pipeline. Creates a software:research issue for the given product and dispatches Phase 1 (Research) in the software-profile-analyst agent. Phase 4 (Followup) enqueues downstream `company:research` and `people:research` issues for the vendor company and primary-attribution founders/leaders surfaced in the profile.",
10145
11043
  disableModelInvocation: true,
10146
11044
  userInvocable: true,
10147
11045
  context: "fork",
@@ -10197,16 +11095,21 @@ var profileSoftwareSkill = {
10197
11095
  "- A single software profile under the profiles directory",
10198
11096
  "- One or more rows appended to the shared feature-matrix file,",
10199
11097
  " scored against the configured segment weights",
10200
- "- Optional follow-up research issues for adjacent products",
10201
- " surfaced in the profile",
10202
- "- This pipeline produces **profiles, notes, and matrix rows only**",
10203
- " \u2014 it does not write company profiles, person profiles, or formal",
10204
- " requirement documents itself."
11098
+ "- Optional follow-up `software:research` issues for adjacent",
11099
+ " products surfaced in the profile",
11100
+ "- `company:research` issue for the vendor company (handed off to",
11101
+ " the `company-profile` bundle)",
11102
+ "- `people:research` issues for primary-attribution founders, CEOs,",
11103
+ " or principal creators (handed off to the `people-profile`",
11104
+ " bundle)",
11105
+ "- This pipeline produces **software profiles, notes, and matrix",
11106
+ " rows only** \u2014 it does not write company profiles, person",
11107
+ " profiles, or formal requirement documents itself."
10205
11108
  ].join("\n")
10206
11109
  };
10207
11110
  var softwareProfileBundle = {
10208
11111
  name: "software-profile",
10209
- description: "Software research, profiling, and feature-matrix pipeline: research, profile, matrix, followup. Enabled by default; domain-neutral; filesystem-durable between phases; ranks features against configurable segment-importance weights.",
11112
+ description: "Software research, profiling, and feature-matrix pipeline: research, profile, matrix, followup. Enabled by default; domain-neutral; filesystem-durable between phases; ranks features against configurable segment-importance weights. Phase 4 (Followup) hands the vendor company and primary-attribution founders/leaders off to the `company-profile` and `people-profile` bundles via `company:research` and `people:research` issues.",
10210
11113
  appliesWhen: () => true,
10211
11114
  rules: [
10212
11115
  {
@@ -10229,7 +11132,11 @@ var softwareProfileBundle = {
10229
11132
  "`docs/project-context.md` under a `## Segment Weights` section.",
10230
11133
  "Deeper research on adjacent products surfaced in a profile is",
10231
11134
  "delegated to new cycles of this same pipeline via",
10232
- "`software:followup` issues.",
11135
+ "`software:followup` issues. Deeper research on the vendor",
11136
+ "company and primary-attribution founders/product leaders is",
11137
+ "delegated to the `company-profile` and `people-profile`",
11138
+ "bundles via `company:research` and `people:research` issues",
11139
+ "opened during Phase 4 (Followup).",
10233
11140
  "",
10234
11141
  "See the `software-profile-analyst` agent definition for full",
10235
11142
  "workflow details, default paths, the software-type taxonomy,",
@@ -10268,7 +11175,7 @@ var softwareProfileBundle = {
10268
11175
  {
10269
11176
  name: "software:followup",
10270
11177
  color: "FBCA04",
10271
- description: "Phase 4: enqueue follow-up research issues for adjacent products surfaced in the profile"
11178
+ description: "Phase 4: enqueue follow-up research issues for adjacent products, the vendor company, and primary-attribution people surfaced in the profile"
10272
11179
  }
10273
11180
  ]
10274
11181
  };
@@ -10885,6 +11792,7 @@ var BUILT_IN_BUNDLES = [
10885
11792
  prReviewBundle,
10886
11793
  requirementsAnalystBundle,
10887
11794
  requirementsWriterBundle,
11795
+ requirementsReviewerBundle,
10888
11796
  researchPipelineBundle,
10889
11797
  companyProfileBundle,
10890
11798
  peopleProfileBundle,
@@ -14376,6 +15284,7 @@ export {
14376
15284
  prReviewBundle,
14377
15285
  projenBundle,
14378
15286
  requirementsAnalystBundle,
15287
+ requirementsReviewerBundle,
14379
15288
  requirementsWriterBundle,
14380
15289
  researchPipelineBundle,
14381
15290
  resolveModelAlias,