@codedrifters/configulator 0.0.219 → 0.0.221
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.mts +32 -1
- package/lib/index.d.ts +32 -1
- package/lib/index.js +830 -4
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +829 -4
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -236,6 +236,7 @@ __export(index_exports, {
|
|
|
236
236
|
prReviewBundle: () => prReviewBundle,
|
|
237
237
|
projenBundle: () => projenBundle,
|
|
238
238
|
requirementsAnalystBundle: () => requirementsAnalystBundle,
|
|
239
|
+
requirementsReviewerBundle: () => requirementsReviewerBundle,
|
|
239
240
|
requirementsWriterBundle: () => requirementsWriterBundle,
|
|
240
241
|
researchPipelineBundle: () => researchPipelineBundle,
|
|
241
242
|
resolveModelAlias: () => resolveModelAlias,
|
|
@@ -4438,8 +4439,14 @@ var issueWorkerSubAgent = {
|
|
|
4438
4439
|
"",
|
|
4439
4440
|
"## Phase 7: Open a PR",
|
|
4440
4441
|
"",
|
|
4442
|
+
"Every PR you open must carry the `origin:issue-worker` label so downstream",
|
|
4443
|
+
"agents can identify bot-authored PRs. Always include",
|
|
4444
|
+
"`--label 'origin:issue-worker'` in the `gh pr create` invocation:",
|
|
4445
|
+
"",
|
|
4441
4446
|
"```bash",
|
|
4442
|
-
'gh pr create --title "<type>(<scope>): <description>"
|
|
4447
|
+
'gh pr create --title "<type>(<scope>): <description>" \\',
|
|
4448
|
+
" --label 'origin:issue-worker' \\",
|
|
4449
|
+
' --body "## Summary',
|
|
4443
4450
|
"",
|
|
4444
4451
|
"<bullet points>",
|
|
4445
4452
|
"",
|
|
@@ -4491,7 +4498,12 @@ var issueWorkerSubAgent = {
|
|
|
4491
4498
|
"3. **Follow CLAUDE.md conventions** for branch naming, commits, and PRs.",
|
|
4492
4499
|
"4. **Do not assign PRs to a project board** \u2014 this repo has no GitHub project.",
|
|
4493
4500
|
"5. **Do not add AI co-author** attribution to commits.",
|
|
4494
|
-
"6. **
|
|
4501
|
+
"6. **Always label PRs with `origin:issue-worker`.** Every PR opened by",
|
|
4502
|
+
" the issue-worker must carry the `origin:issue-worker` label so",
|
|
4503
|
+
" downstream agents (notably the `pr-reviewer`) can identify",
|
|
4504
|
+
" bot-authored PRs. Pass `--label 'origin:issue-worker'` on every",
|
|
4505
|
+
" `gh pr create` call.",
|
|
4506
|
+
"7. **On failure:** If you cannot complete the issue, update labels and leave a comment:",
|
|
4495
4507
|
" ```bash",
|
|
4496
4508
|
' gh issue edit <number> --remove-label "status:in-progress" --add-label "status:needs-attention"',
|
|
4497
4509
|
' gh issue comment <number> --body "Worker could not complete: <reason>"',
|
|
@@ -5370,6 +5382,25 @@ var prReviewerSubAgent = {
|
|
|
5370
5382
|
"---",
|
|
5371
5383
|
"",
|
|
5372
5384
|
...PROJECT_CONTEXT_READER_SECTION,
|
|
5385
|
+
"## Invocation Flags",
|
|
5386
|
+
"",
|
|
5387
|
+
"Your invocation prompt may include flags that modify how you select and",
|
|
5388
|
+
"process PRs. Parse the prompt for these flags before starting Phase 1:",
|
|
5389
|
+
"",
|
|
5390
|
+
"- **`--allow-human-author`** \u2014 opt-in flag that allows the reviewer to",
|
|
5391
|
+
" process PRs authored by humans in addition to bot-authored PRs",
|
|
5392
|
+
" (those carrying the `origin:issue-worker` label). When absent, the",
|
|
5393
|
+
" reviewer only processes bot-authored PRs; when present, human-authored",
|
|
5394
|
+
" PRs are also eligible for this invocation only. The flag does **not**",
|
|
5395
|
+
" persist across invocations.",
|
|
5396
|
+
"",
|
|
5397
|
+
"Note: the behaviour wiring for `--allow-human-author` (the bot-only",
|
|
5398
|
+
"guard that the flag opts out of) lands in a follow-up issue. This",
|
|
5399
|
+
"agent currently acknowledges the flag so consumers can start passing",
|
|
5400
|
+
"it through; full gating on author identity arrives later.",
|
|
5401
|
+
"",
|
|
5402
|
+
"---",
|
|
5403
|
+
"",
|
|
5373
5404
|
"## Phase 1: Identify the PR",
|
|
5374
5405
|
"",
|
|
5375
5406
|
"If a PR number was provided in your instructions, use that. Otherwise stop",
|
|
@@ -5576,7 +5607,16 @@ var reviewPrSkill = {
|
|
|
5576
5607
|
"",
|
|
5577
5608
|
"## Usage",
|
|
5578
5609
|
"",
|
|
5579
|
-
"/review-pr <pr-number>",
|
|
5610
|
+
"/review-pr <pr-number> [--allow-human-author]",
|
|
5611
|
+
"",
|
|
5612
|
+
"### Flags",
|
|
5613
|
+
"",
|
|
5614
|
+
"- **`--allow-human-author`** \u2014 opt the reviewer into processing",
|
|
5615
|
+
" human-authored PRs for **this invocation only**. By default, the",
|
|
5616
|
+
" reviewer only processes bot-authored PRs (those carrying the",
|
|
5617
|
+
" `origin:issue-worker` label); pass this flag to review a",
|
|
5618
|
+
" human-authored PR. The flag does not persist \u2014 subsequent",
|
|
5619
|
+
" invocations return to the bot-only default.",
|
|
5580
5620
|
"",
|
|
5581
5621
|
"## What This Skill Does",
|
|
5582
5622
|
"",
|
|
@@ -5591,6 +5631,10 @@ var reviewPrSkill = {
|
|
|
5591
5631
|
"9. After merge, verifies the linked issue is closed and closes it if not",
|
|
5592
5632
|
"10. Cleans up the local branch after merge",
|
|
5593
5633
|
"",
|
|
5634
|
+
"Passing `--allow-human-author` opts the reviewer into processing",
|
|
5635
|
+
"human-authored PRs for this invocation only (the default scope is",
|
|
5636
|
+
"bot-authored PRs labeled `origin:issue-worker`).",
|
|
5637
|
+
"",
|
|
5594
5638
|
"## Input",
|
|
5595
5639
|
"",
|
|
5596
5640
|
"Provide the PR number to review. The skill resolves the linked issue from",
|
|
@@ -5625,7 +5669,16 @@ var reviewPrsSkill = {
|
|
|
5625
5669
|
"",
|
|
5626
5670
|
"## Usage",
|
|
5627
5671
|
"",
|
|
5628
|
-
"/review-prs",
|
|
5672
|
+
"/review-prs [--allow-human-author]",
|
|
5673
|
+
"",
|
|
5674
|
+
"### Flags",
|
|
5675
|
+
"",
|
|
5676
|
+
"- **`--allow-human-author`** \u2014 opt the reviewer into processing",
|
|
5677
|
+
" human-authored PRs for **this invocation only**. By default, the",
|
|
5678
|
+
" loop only processes bot-authored PRs (those carrying the",
|
|
5679
|
+
" `origin:issue-worker` label); pass this flag to include",
|
|
5680
|
+
" human-authored PRs in the queue. The flag does not persist \u2014",
|
|
5681
|
+
" subsequent invocations return to the bot-only default.",
|
|
5629
5682
|
"",
|
|
5630
5683
|
"## What This Skill Does",
|
|
5631
5684
|
"",
|
|
@@ -5670,6 +5723,10 @@ var reviewPrsSkill = {
|
|
|
5670
5723
|
"When no eligible PRs remain, emit a final summary listing every PR",
|
|
5671
5724
|
"processed and the verdict for each, then stop.",
|
|
5672
5725
|
"",
|
|
5726
|
+
"Passing `--allow-human-author` opts the reviewer into including",
|
|
5727
|
+
"human-authored PRs in the queue for this invocation only (the default",
|
|
5728
|
+
"scope is bot-authored PRs labeled `origin:issue-worker`).",
|
|
5729
|
+
"",
|
|
5673
5730
|
"## Output",
|
|
5674
5731
|
"",
|
|
5675
5732
|
"Per-PR structured report (same shape as `/review-pr`), followed by a",
|
|
@@ -6491,6 +6548,773 @@ var requirementsAnalystBundle = {
|
|
|
6491
6548
|
]
|
|
6492
6549
|
};
|
|
6493
6550
|
|
|
6551
|
+
// src/agent/bundles/requirements-reviewer.ts
|
|
6552
|
+
var requirementsReviewerSubAgent = {
|
|
6553
|
+
name: "requirements-reviewer",
|
|
6554
|
+
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.",
|
|
6555
|
+
model: AGENT_MODEL.POWERFUL,
|
|
6556
|
+
maxTurns: 80,
|
|
6557
|
+
platforms: { cursor: { exclude: true } },
|
|
6558
|
+
prompt: [
|
|
6559
|
+
"# Requirements Reviewer Agent",
|
|
6560
|
+
"",
|
|
6561
|
+
"You audit existing requirement documents for quality, completeness,",
|
|
6562
|
+
"consistency, and structural compliance. Each session handles exactly",
|
|
6563
|
+
"**one** `req:review` issue and produces exactly **one** review",
|
|
6564
|
+
"report.",
|
|
6565
|
+
"",
|
|
6566
|
+
"This agent **only audits** existing documents \u2014 it never writes",
|
|
6567
|
+
"requirement documents, capability models, gap reports, or research",
|
|
6568
|
+
"notes. Authoring is the responsibility of the `requirements-writer`",
|
|
6569
|
+
"bundle (requirement docs) and `bcm-writer` bundle (capability",
|
|
6570
|
+
"models). Gap discovery is the responsibility of the",
|
|
6571
|
+
"`requirements-analyst` bundle. Keep this boundary clean: never open",
|
|
6572
|
+
"`req:scan`, `req:draft`, `req:trace`, `req:write`, or `bcm:*`",
|
|
6573
|
+
"issues from this pipeline. Findings are reported, not authored.",
|
|
6574
|
+
"",
|
|
6575
|
+
"Follow your project's shared agent conventions (`AGENTS.md`,",
|
|
6576
|
+
"`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
|
|
6577
|
+
"",
|
|
6578
|
+
"---",
|
|
6579
|
+
"",
|
|
6580
|
+
...PROJECT_CONTEXT_READER_SECTION,
|
|
6581
|
+
"## Soft Dependency on the Requirements Writer Bundle",
|
|
6582
|
+
"",
|
|
6583
|
+
"This reviewer expects the requirement category templates to be",
|
|
6584
|
+
"available at:",
|
|
6585
|
+
"",
|
|
6586
|
+
"```",
|
|
6587
|
+
".claude/skills/requirements-writer/_references/templates/",
|
|
6588
|
+
"```",
|
|
6589
|
+
"",
|
|
6590
|
+
"Those templates are shipped by the `requirements-writer` bundle \u2014",
|
|
6591
|
+
"this bundle does **not** ship its own copy. If the templates are",
|
|
6592
|
+
"missing, either add the `requirements-writer` bundle to your project",
|
|
6593
|
+
"(via `includeBundles: ['requirements-writer']` or by removing it",
|
|
6594
|
+
"from `excludeBundles`) or supply equivalent templates at the same",
|
|
6595
|
+
"path before running a review.",
|
|
6596
|
+
"",
|
|
6597
|
+
"Read the templates before reviewing each document so you know which",
|
|
6598
|
+
"sections are required for that category. The standards reference at",
|
|
6599
|
+
"`.claude/skills/requirements-writer/_references/standards-and-frameworks.md`",
|
|
6600
|
+
"(also shipped by the writer bundle) is useful when evaluating",
|
|
6601
|
+
"whether a SEC/NFR/INT requirement meets the depth expected by its",
|
|
6602
|
+
"governing standard.",
|
|
6603
|
+
"",
|
|
6604
|
+
"---",
|
|
6605
|
+
"",
|
|
6606
|
+
"## Design Principles",
|
|
6607
|
+
"",
|
|
6608
|
+
"1. **One review per session.** Each `req:review` issue maps to a",
|
|
6609
|
+
" single review report. Never review two scopes in one session and",
|
|
6610
|
+
" never start a second issue.",
|
|
6611
|
+
"2. **Audit only \u2014 do not edit.** Findings are reported in the review",
|
|
6612
|
+
" report and as follow-up issues. Direct edits to requirement",
|
|
6613
|
+
" documents belong to the `requirements-writer` agent picking up a",
|
|
6614
|
+
" follow-up `req:write` issue.",
|
|
6615
|
+
"3. **Templates are authoritative.** When a document is missing a",
|
|
6616
|
+
" section that the matching category template requires, that is a",
|
|
6617
|
+
" structural finding \u2014 not a stylistic choice.",
|
|
6618
|
+
"4. **Resolve every link against the filesystem.** Cross-reference",
|
|
6619
|
+
" integrity findings only count when the target path is actually",
|
|
6620
|
+
" missing from disk. Do not eyeball \u2014 resolve relative paths and",
|
|
6621
|
+
" verify the file exists.",
|
|
6622
|
+
"5. **Cite, don't invent.** Every finding cites the file path, line",
|
|
6623
|
+
" range (when available), and the specific check that failed.",
|
|
6624
|
+
" Never speculate about author intent.",
|
|
6625
|
+
"",
|
|
6626
|
+
"---",
|
|
6627
|
+
"",
|
|
6628
|
+
"## Configurable Paths",
|
|
6629
|
+
"",
|
|
6630
|
+
"The pipeline uses these placeholders. Consuming projects override",
|
|
6631
|
+
"the defaults by passing paths in the `/review-requirements` skill",
|
|
6632
|
+
"invocation, by recording overrides in `docs/project-context.md`, or",
|
|
6633
|
+
"by extending this rule in their own `agentConfig.rules`.",
|
|
6634
|
+
"",
|
|
6635
|
+
"| Placeholder | Meaning | Default |",
|
|
6636
|
+
"|-------------|---------|---------|",
|
|
6637
|
+
"| `<REQUIREMENTS_ROOT>` | Root folder for final requirement documents | `docs/requirements/` |",
|
|
6638
|
+
"| `<REVIEW_REPORTS_ROOT>` | Where review reports are written | `docs/research/reviews/` |",
|
|
6639
|
+
"| `<TEMPLATES_ROOT>` | Where the writer bundle ships category templates (read-only for this agent) | `.claude/skills/requirements-writer/_references/templates/` |",
|
|
6640
|
+
"| `<STANDARDS_REF>` | Standards & frameworks reference shipped by the writer bundle | `.claude/skills/requirements-writer/_references/standards-and-frameworks.md` |",
|
|
6641
|
+
"",
|
|
6642
|
+
"If `docs/project-context.md` specifies a different requirements",
|
|
6643
|
+
"tree, prefer that. Otherwise fall back to the defaults above.",
|
|
6644
|
+
"",
|
|
6645
|
+
"---",
|
|
6646
|
+
"",
|
|
6647
|
+
"## Review Scope",
|
|
6648
|
+
"",
|
|
6649
|
+
"Read the `req:review` issue body to determine the scope. The skill",
|
|
6650
|
+
"supports four scopes \u2014 clarify with the issue author or in a",
|
|
6651
|
+
"follow-up comment if the scope is not stated:",
|
|
6652
|
+
"",
|
|
6653
|
+
"1. **Full audit** \u2014 every requirement document under",
|
|
6654
|
+
" `<REQUIREMENTS_ROOT>` across all categories",
|
|
6655
|
+
"2. **Category audit** \u2014 every document in one category directory",
|
|
6656
|
+
" (e.g., all FRs under `<REQUIREMENTS_ROOT>/functional/`)",
|
|
6657
|
+
"3. **Single document** \u2014 one specific requirement file",
|
|
6658
|
+
"4. **Targeted check** \u2014 one or more checks from the catalog below,",
|
|
6659
|
+
' run across the documents in scope (e.g., "check all traceability',
|
|
6660
|
+
' links" or "verify tier classification only")',
|
|
6661
|
+
"",
|
|
6662
|
+
"A full audit on a large document set can be extensive. If the issue",
|
|
6663
|
+
"does not state a scope, comment on the issue requesting one and",
|
|
6664
|
+
"leave the issue in `status:needs-attention` rather than guessing.",
|
|
6665
|
+
"",
|
|
6666
|
+
"---",
|
|
6667
|
+
"",
|
|
6668
|
+
"## Review Checklist",
|
|
6669
|
+
"",
|
|
6670
|
+
"Apply the following 11 checks. Each check produces zero or more",
|
|
6671
|
+
"findings. Findings are graded Critical / Warning / Info using the",
|
|
6672
|
+
"severity ladder in the next section.",
|
|
6673
|
+
"",
|
|
6674
|
+
"### 1. Structural Compliance",
|
|
6675
|
+
"",
|
|
6676
|
+
"For each document in scope, verify:",
|
|
6677
|
+
"",
|
|
6678
|
+
"- YAML frontmatter present with `title` and `description` fields",
|
|
6679
|
+
"- Title in frontmatter matches the `# Heading` line",
|
|
6680
|
+
"- File name follows `{PREFIX}-{NNN}-{slug}.md` (or the project",
|
|
6681
|
+
" prefix declared in `docs/project-context.md`)",
|
|
6682
|
+
"- File is in the correct category directory under",
|
|
6683
|
+
" `<REQUIREMENTS_ROOT>`",
|
|
6684
|
+
"- `Status` field is set to one of the valid values: `Draft`,",
|
|
6685
|
+
" `Proposed`, `Accepted`, `Implemented`, `Deprecated`, `Superseded`",
|
|
6686
|
+
"- All sections from the matching category template at",
|
|
6687
|
+
" `<TEMPLATES_ROOT>` are present (sections that do not apply must",
|
|
6688
|
+
" carry `Not applicable \u2014 <reason>` rather than being silently",
|
|
6689
|
+
" omitted)",
|
|
6690
|
+
"- `## Open Items` section exists with all three subsections",
|
|
6691
|
+
" (Identified Gaps, Follow-up Questions, Contradictions &",
|
|
6692
|
+
" Inconsistencies)",
|
|
6693
|
+
"- `## Revision History` section exists",
|
|
6694
|
+
"- `## Traceability` section exists",
|
|
6695
|
+
"",
|
|
6696
|
+
"### 2. Categorization Accuracy",
|
|
6697
|
+
"",
|
|
6698
|
+
"Verify each document is in the right category by applying the",
|
|
6699
|
+
"disambiguation rules from the `requirements-writer` taxonomy:",
|
|
6700
|
+
"",
|
|
6701
|
+
"- **SEC vs NFR:** Protecting data, enforcing access control, or",
|
|
6702
|
+
" meeting a regulation \u2192 SEC. System performance, uptime, or",
|
|
6703
|
+
" scalability \u2192 NFR.",
|
|
6704
|
+
"- **TR vs ADR:** A specific technology choice \u2192 TR. A structural",
|
|
6705
|
+
" decision with trade-offs \u2192 ADR.",
|
|
6706
|
+
"- **FR vs INT:** User-visible behavior \u2192 FR. System-to-system",
|
|
6707
|
+
" communication \u2192 INT.",
|
|
6708
|
+
"- **DR vs SEC:** Data lifecycle / retention / recovery \u2192 DR. Data",
|
|
6709
|
+
" access / protection \u2192 SEC.",
|
|
6710
|
+
"- **NFR vs OPS:** Measurable system quality target \u2192 NFR. Tooling",
|
|
6711
|
+
" and processes to operate the system \u2192 OPS.",
|
|
6712
|
+
"",
|
|
6713
|
+
"Flag any documents that appear miscategorized. Explain where they",
|
|
6714
|
+
"should live and why.",
|
|
6715
|
+
"",
|
|
6716
|
+
"### 3. Traceability Completeness",
|
|
6717
|
+
"",
|
|
6718
|
+
"Check that the requirement dependency graph is connected. Apply",
|
|
6719
|
+
"these expectations as defaults; override them when the project's",
|
|
6720
|
+
"`docs/project-context.md` defines a different traceability shape:",
|
|
6721
|
+
"",
|
|
6722
|
+
"- Every FR should trace back to at least one BR (via",
|
|
6723
|
+
' "Implements")',
|
|
6724
|
+
'- Every TR should trace to at least one ADR (via "Justified by")',
|
|
6725
|
+
"- Every ADR should trace to at least one BR or FR (via",
|
|
6726
|
+
' "Supports")',
|
|
6727
|
+
"- Every SEC, NFR, UX should appear as a constraint or",
|
|
6728
|
+
" cross-reference on the FRs they affect",
|
|
6729
|
+
"- Every INT should trace to at least one FR that depends on it",
|
|
6730
|
+
"- Every DR should be referenced by SEC documents that govern its",
|
|
6731
|
+
" protection",
|
|
6732
|
+
"- Every OPS should reference the NFR targets it monitors",
|
|
6733
|
+
"",
|
|
6734
|
+
"Identify orphaned requirements (documents with no inbound or",
|
|
6735
|
+
"outbound traceability links) and flag them.",
|
|
6736
|
+
"",
|
|
6737
|
+
"### 4. Cross-Reference Integrity",
|
|
6738
|
+
"",
|
|
6739
|
+
"Check **every markdown link to a `.md` file in the entire",
|
|
6740
|
+
"document** \u2014 not just links inside the Traceability section.",
|
|
6741
|
+
"Broken links frequently appear in body text (Description, Main",
|
|
6742
|
+
"Flow, Acceptance Criteria, etc.) where documents reference other",
|
|
6743
|
+
"requirements inline.",
|
|
6744
|
+
"",
|
|
6745
|
+
"For every link in every document:",
|
|
6746
|
+
"",
|
|
6747
|
+
"- The target file exists at the referenced path \u2014 **resolve the",
|
|
6748
|
+
" relative path against the filesystem**, do not eyeball it",
|
|
6749
|
+
"- The target file's ID matches the link text",
|
|
6750
|
+
"- Relative paths are correct (cross-category uses `../`,",
|
|
6751
|
+
" same-category is direct)",
|
|
6752
|
+
"- All links include the `.md` extension",
|
|
6753
|
+
"- Bidirectional links exist where expected (if A references B in",
|
|
6754
|
+
" Traceability, B should reference A)",
|
|
6755
|
+
"",
|
|
6756
|
+
"### 5. Sequence Number Integrity",
|
|
6757
|
+
"",
|
|
6758
|
+
"Within each category directory under `<REQUIREMENTS_ROOT>`:",
|
|
6759
|
+
"",
|
|
6760
|
+
"- No duplicate sequence numbers",
|
|
6761
|
+
"- No gaps in the sequence (gaps may be intentional from deleted",
|
|
6762
|
+
" docs but should be noted as Info)",
|
|
6763
|
+
"- Sequence numbers are zero-padded to three digits (`001`, `012`,",
|
|
6764
|
+
" `127`)",
|
|
6765
|
+
"",
|
|
6766
|
+
"### 6. Content Quality",
|
|
6767
|
+
"",
|
|
6768
|
+
"For each document, evaluate:",
|
|
6769
|
+
"",
|
|
6770
|
+
"- **Completeness** \u2014 Are all template sections filled in",
|
|
6771
|
+
" meaningfully, or are there unexplained TBDs?",
|
|
6772
|
+
"- **Specificity** \u2014 Are acceptance criteria testable? Are NFR",
|
|
6773
|
+
" targets numeric and measurable? Are success metrics concrete?",
|
|
6774
|
+
"- **Consistency** \u2014 Do related documents agree with each other?",
|
|
6775
|
+
" (e.g., does an FR's description match the corresponding INT's",
|
|
6776
|
+
" integration shape?)",
|
|
6777
|
+
"- **Staleness** \u2014 Are statuses up to date? Are there `Draft`",
|
|
6778
|
+
" documents that should have progressed?",
|
|
6779
|
+
"- **Naming consistency** \u2014 When `docs/project-context.md` declares",
|
|
6780
|
+
" a project name or product name, verify it is used consistently",
|
|
6781
|
+
" across documents.",
|
|
6782
|
+
"",
|
|
6783
|
+
"### 7. Open Items Review",
|
|
6784
|
+
"",
|
|
6785
|
+
"Across all documents in scope:",
|
|
6786
|
+
"",
|
|
6787
|
+
"- Are open items prioritized (P0\u2013P3)?",
|
|
6788
|
+
"- Are interdependencies between open items documented with",
|
|
6789
|
+
" cross-references?",
|
|
6790
|
+
"- Are there P0 (Blocker) items that have not been resolved?",
|
|
6791
|
+
"- Are there stale open items that should have been addressed?",
|
|
6792
|
+
"",
|
|
6793
|
+
"### 8. Registry Index Sync",
|
|
6794
|
+
"",
|
|
6795
|
+
"Each category directory has a `README.md` (or `index.md`) file",
|
|
6796
|
+
"that serves as a registry table listing all requirements in that",
|
|
6797
|
+
"category. Check that these are in sync:",
|
|
6798
|
+
"",
|
|
6799
|
+
"- Every requirement file in the directory has a corresponding row",
|
|
6800
|
+
" in the index",
|
|
6801
|
+
"- No rows in the index reference files that do not exist (stale",
|
|
6802
|
+
" entries from deleted docs)",
|
|
6803
|
+
"- Rows are in sequence number order",
|
|
6804
|
+
"- The ID, Title, Status, and Priority in each row match the",
|
|
6805
|
+
" document's metadata",
|
|
6806
|
+
"- No placeholder message remains when requirements exist",
|
|
6807
|
+
"",
|
|
6808
|
+
"Flag missing entries as **Warning** and stale or incorrect entries",
|
|
6809
|
+
"as **Warning**.",
|
|
6810
|
+
"",
|
|
6811
|
+
"### 9. Decision Authority Compliance",
|
|
6812
|
+
"",
|
|
6813
|
+
"Verify that the `requirements-writer` decision-authority rules",
|
|
6814
|
+
"were followed:",
|
|
6815
|
+
"",
|
|
6816
|
+
"- ADR and TR documents should be in `Proposed` status if they",
|
|
6817
|
+
" have not been explicitly accepted by a human",
|
|
6818
|
+
"- Direct-write categories (BR, FR, NFR, SEC, UX) should not",
|
|
6819
|
+
" contain technology-specific decisions \u2014 those should be deferred",
|
|
6820
|
+
" to ADR/TR documents",
|
|
6821
|
+
"- Partial-deferral categories (DR, MT, INT, OPS) should defer",
|
|
6822
|
+
" technology/tooling choices to `Proposed` ADR/TR documents",
|
|
6823
|
+
" rather than embedding them inline",
|
|
6824
|
+
"",
|
|
6825
|
+
"For `Proposed` ADR and TR documents, additionally verify the",
|
|
6826
|
+
"comparison and recommendation structure:",
|
|
6827
|
+
"",
|
|
6828
|
+
"- **Alternatives Considered** section exists with at least 2",
|
|
6829
|
+
" options",
|
|
6830
|
+
"- Each alternative has a description, pros, and cons \u2014 no option",
|
|
6831
|
+
" is given cursory treatment",
|
|
6832
|
+
"- **Recommendation** section exists with a named recommended",
|
|
6833
|
+
" option",
|
|
6834
|
+
"- Recommendation includes a reasoned explanation specific to this",
|
|
6835
|
+
" project's context (not generic)",
|
|
6836
|
+
"- Recommendation identifies key trade-offs being accepted",
|
|
6837
|
+
'- Decision section says "Pending human review" (not "We',
|
|
6838
|
+
' will..." or "We decided...")',
|
|
6839
|
+
"- Open Items include an item flagging that human decision is",
|
|
6840
|
+
" required, with references to dependent requirements blocked on",
|
|
6841
|
+
" this decision",
|
|
6842
|
+
"",
|
|
6843
|
+
"### 10. Tier Classification Compliance",
|
|
6844
|
+
"",
|
|
6845
|
+
"Verify that every document has a valid tier classification. The",
|
|
6846
|
+
"default tier set is `platform`, `industry`, `customer-workflow`,",
|
|
6847
|
+
"`consumer-app`; consuming projects may rename or reduce the tier",
|
|
6848
|
+
"set in their own `docs/project-context.md`.",
|
|
6849
|
+
"",
|
|
6850
|
+
"- `tier` field is set in YAML frontmatter (one of the project's",
|
|
6851
|
+
" declared tier slugs)",
|
|
6852
|
+
"- `Tier` row is set in the Metadata table with a matching value",
|
|
6853
|
+
"- `Implementor` field is set for Customer Workflow and Consumer",
|
|
6854
|
+
" Application tiers when the project tracks that distinction",
|
|
6855
|
+
" (Consortium Member / Customer / TBD)",
|
|
6856
|
+
"- `Implementor` field is absent or N/A for Platform and Industry",
|
|
6857
|
+
" tiers",
|
|
6858
|
+
'- When `Implementor` is "Consortium Member", it links to a',
|
|
6859
|
+
" valid org profile",
|
|
6860
|
+
"- `Customer` field is set for Customer Workflow and Consumer",
|
|
6861
|
+
" Application tiers when the project tracks customer profiles,",
|
|
6862
|
+
" linking to a valid customer org profile",
|
|
6863
|
+
"- `Customer` field in YAML frontmatter (if present) matches the",
|
|
6864
|
+
" Customer row in the Metadata table",
|
|
6865
|
+
"- `customer:<slug>` label exists on the corresponding GitHub issue",
|
|
6866
|
+
" (when traceable)",
|
|
6867
|
+
"- Industry-tier requirements specify which industry/vertical they",
|
|
6868
|
+
" apply to",
|
|
6869
|
+
"- Platform-tier requirements do not contain industry-specific",
|
|
6870
|
+
" concerns that should be scoped to the Industry tier",
|
|
6871
|
+
"- Cross-tier traceability links exist where expected:",
|
|
6872
|
+
" - Consumer Application requirements have `Depends on",
|
|
6873
|
+
" (cross-tier)` links to Platform requirements (the APIs they",
|
|
6874
|
+
" consume)",
|
|
6875
|
+
" - Customer Workflow requirements have `Depends on (cross-tier)`",
|
|
6876
|
+
" links to Platform requirements (the configuration capabilities",
|
|
6877
|
+
" they use)",
|
|
6878
|
+
" - Industry requirements have `Depends on (cross-tier)` links to",
|
|
6879
|
+
" Platform requirements (the core services they extend)",
|
|
6880
|
+
" - Platform requirements that enable higher-tier work have",
|
|
6881
|
+
" `Enables (cross-tier)` links",
|
|
6882
|
+
"- Multi-tier decompositions are complete \u2014 if a customer need was",
|
|
6883
|
+
" decomposed across tiers, all expected tiers have corresponding",
|
|
6884
|
+
" requirements linked together",
|
|
6885
|
+
"",
|
|
6886
|
+
"Flag as **Critical**: missing tier field; platform requirements",
|
|
6887
|
+
"containing industry-specific logic.",
|
|
6888
|
+
"Flag as **Warning**: missing cross-tier traceability; missing",
|
|
6889
|
+
"Implementor field on Customer Workflow / Consumer Application",
|
|
6890
|
+
"requirements when the project tracks that field; missing Customer",
|
|
6891
|
+
"field on Customer Workflow / Consumer Application requirements;",
|
|
6892
|
+
'Implementor claiming "Consortium Member" without a linked org',
|
|
6893
|
+
"profile.",
|
|
6894
|
+
"",
|
|
6895
|
+
"### 11. Cross-Referencing Convention Compliance",
|
|
6896
|
+
"",
|
|
6897
|
+
"Verify alignment with the project's cross-referencing conventions",
|
|
6898
|
+
"(usually documented in `docs/project-context.md` or a profile",
|
|
6899
|
+
"registry index):",
|
|
6900
|
+
"",
|
|
6901
|
+
"- Requirements that reference profiled organizations use the",
|
|
6902
|
+
" project's profile-link convention (e.g., `profilePath`",
|
|
6903
|
+
" frontmatter, or relative links into the profiles tree)",
|
|
6904
|
+
"- Requirements that trace to research output link to the correct",
|
|
6905
|
+
" paths under the project's research tree",
|
|
6906
|
+
"- Optional convention: meeting-sourced requirements may reference",
|
|
6907
|
+
" the meeting transcript or insight document. This is **optional** \u2014",
|
|
6908
|
+
" only flag missing meeting links when the project documents the",
|
|
6909
|
+
" reverse-link structure (e.g., a `referencedIn.meetings[]`",
|
|
6910
|
+
" frontmatter block) and that structure is in active use.",
|
|
6911
|
+
"",
|
|
6912
|
+
"---",
|
|
6913
|
+
"",
|
|
6914
|
+
"## Severity Ladder",
|
|
6915
|
+
"",
|
|
6916
|
+
"Group every finding by severity:",
|
|
6917
|
+
"",
|
|
6918
|
+
"### Critical (Must Fix)",
|
|
6919
|
+
"",
|
|
6920
|
+
"Issues that undermine the integrity of the requirements",
|
|
6921
|
+
"documentation:",
|
|
6922
|
+
"",
|
|
6923
|
+
"- Miscategorized requirements",
|
|
6924
|
+
"- Broken cross-references (target file does not exist on disk)",
|
|
6925
|
+
"- Missing mandatory template sections",
|
|
6926
|
+
"- Technology decisions embedded in direct-write categories without",
|
|
6927
|
+
" a corresponding `Proposed` ADR/TR",
|
|
6928
|
+
"- P0 open items that are unresolved",
|
|
6929
|
+
"- Missing `tier` field; platform requirements containing",
|
|
6930
|
+
" industry-specific logic",
|
|
6931
|
+
"",
|
|
6932
|
+
"### Warning (Should Fix)",
|
|
6933
|
+
"",
|
|
6934
|
+
"Issues that reduce quality but do not break the documentation:",
|
|
6935
|
+
"",
|
|
6936
|
+
"- Missing traceability links (orphaned requirements)",
|
|
6937
|
+
"- Unidirectional cross-references (A links to B, but B does not",
|
|
6938
|
+
" link to A)",
|
|
6939
|
+
"- Vague acceptance criteria or unmeasurable NFR targets",
|
|
6940
|
+
"- Stale statuses or unaddressed open items",
|
|
6941
|
+
"- Sequence number gaps",
|
|
6942
|
+
"- Registry index out of sync with actual files (missing entries,",
|
|
6943
|
+
" stale rows, incorrect metadata)",
|
|
6944
|
+
"- Missing cross-tier traceability; missing Implementor / Customer",
|
|
6945
|
+
" fields on Customer Workflow / Consumer Application requirements",
|
|
6946
|
+
" when the project tracks those fields",
|
|
6947
|
+
"",
|
|
6948
|
+
"### Info (Consider)",
|
|
6949
|
+
"",
|
|
6950
|
+
"Observations and suggestions:",
|
|
6951
|
+
"",
|
|
6952
|
+
"- Opportunities to add cross-references between related",
|
|
6953
|
+
" requirements",
|
|
6954
|
+
"- TBD sections that could be filled in with available information",
|
|
6955
|
+
"- Style inconsistencies across documents",
|
|
6956
|
+
"- Sequence number gaps that appear intentional from deleted docs",
|
|
6957
|
+
"",
|
|
6958
|
+
"---",
|
|
6959
|
+
"",
|
|
6960
|
+
"## Reporting Format",
|
|
6961
|
+
"",
|
|
6962
|
+
"Write the review report to",
|
|
6963
|
+
"`<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md` (substitute",
|
|
6964
|
+
"the date and a short scope slug). Structure the report as:",
|
|
6965
|
+
"",
|
|
6966
|
+
"```markdown",
|
|
6967
|
+
"# Requirements Review: <scope>",
|
|
6968
|
+
"",
|
|
6969
|
+
"**Date:** YYYY-MM-DD",
|
|
6970
|
+
"**Scope:** <full audit | category | single document | targeted",
|
|
6971
|
+
"check>",
|
|
6972
|
+
"**Source issue:** #NNN",
|
|
6973
|
+
"",
|
|
6974
|
+
"## Critical (Must Fix)",
|
|
6975
|
+
"",
|
|
6976
|
+
"1. **[<file path>] <short title>** `Critical`",
|
|
6977
|
+
" <one-paragraph description, citing the specific check that",
|
|
6978
|
+
" failed>",
|
|
6979
|
+
"",
|
|
6980
|
+
"## Warning (Should Fix)",
|
|
6981
|
+
"",
|
|
6982
|
+
"1. **[<file path>] <short title>** `Warning`",
|
|
6983
|
+
" ...",
|
|
6984
|
+
"",
|
|
6985
|
+
"## Info (Consider)",
|
|
6986
|
+
"",
|
|
6987
|
+
"1. **[<file path>] <short title>** `Info`",
|
|
6988
|
+
" ...",
|
|
6989
|
+
"",
|
|
6990
|
+
"## Review Summary",
|
|
6991
|
+
"",
|
|
6992
|
+
"| Severity | Count |",
|
|
6993
|
+
"|---|---|",
|
|
6994
|
+
"| Critical | N |",
|
|
6995
|
+
"| Warning | N |",
|
|
6996
|
+
"| Info | N |",
|
|
6997
|
+
"",
|
|
6998
|
+
"**Categories reviewed:** [list]",
|
|
6999
|
+
"**Documents reviewed:** N",
|
|
7000
|
+
"**Overall assessment:** [Brief 1-2 sentence assessment]",
|
|
7001
|
+
"```",
|
|
7002
|
+
"",
|
|
7003
|
+
"Each finding must cite the file path and the specific check that",
|
|
7004
|
+
'produced it (e.g., "Check 4: Cross-Reference Integrity \u2014 target',
|
|
7005
|
+
"file `../security/SEC-007-audit-logs.md` does not exist on",
|
|
7006
|
+
'disk").',
|
|
7007
|
+
"",
|
|
7008
|
+
"---",
|
|
7009
|
+
"",
|
|
7010
|
+
"## Automated Verification (>10 documents)",
|
|
7011
|
+
"",
|
|
7012
|
+
"For audits covering more than 10 documents, **write a Python",
|
|
7013
|
+
"verification script** rather than reading files one by one.",
|
|
7014
|
+
"Manual review of large document sets always misses things \u2014",
|
|
7015
|
+
"especially broken links where the filename is plausible but wrong.",
|
|
7016
|
+
"",
|
|
7017
|
+
"Save the script alongside the review report at",
|
|
7018
|
+
"`<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD-verify.py` so",
|
|
7019
|
+
"future reviews can re-run it. The script must be idempotent and",
|
|
7020
|
+
"read-only \u2014 it inspects files, it does not mutate them.",
|
|
7021
|
+
"",
|
|
7022
|
+
"At minimum, the script must:",
|
|
7023
|
+
"",
|
|
7024
|
+
"1. **Resolve every markdown link.** For each `[text](path.md)`",
|
|
7025
|
+
" link in every document in scope, resolve the relative path",
|
|
7026
|
+
" against the filesystem and verify the target file exists.",
|
|
7027
|
+
" Do not skip links outside Traceability sections.",
|
|
7028
|
+
"2. **Extract traceability links.** Parse the `## Traceability`",
|
|
7029
|
+
" section of each document, collect all `[PREFIX-NNN](path)`",
|
|
7030
|
+
" references, and build a directed link graph.",
|
|
7031
|
+
"3. **Check bidirectionality.** For every (A \u2192 B) link in the",
|
|
7032
|
+
" graph, verify (B \u2192 A) exists.",
|
|
7033
|
+
"4. **Verify structural sections.** Check for required section",
|
|
7034
|
+
" headings (`## Open Items`, `## Revision History`,",
|
|
7035
|
+
" `## Traceability`, etc.) using string matching.",
|
|
7036
|
+
"5. **Check registry sync.** Compare files on disk in each",
|
|
7037
|
+
" category directory against entries in the directory's",
|
|
7038
|
+
" `README.md` / `index.md`.",
|
|
7039
|
+
"",
|
|
7040
|
+
"Present the script's output as the basis for the audit report.",
|
|
7041
|
+
"This ensures reproducible, complete results.",
|
|
7042
|
+
"",
|
|
7043
|
+
"---",
|
|
7044
|
+
"",
|
|
7045
|
+
"## Filesystem Durability and Issue-Graph Sequencing",
|
|
7046
|
+
"",
|
|
7047
|
+
"Write the review report to disk **before** opening any follow-up",
|
|
7048
|
+
"issues. The report is the durable record; the issues are pointers",
|
|
7049
|
+
"into it. If the session is interrupted after issues are filed but",
|
|
7050
|
+
"before the report is committed, future runs cannot reconstruct the",
|
|
7051
|
+
"context.",
|
|
7052
|
+
"",
|
|
7053
|
+
"Sequence:",
|
|
7054
|
+
"",
|
|
7055
|
+
"1. Read scope from the `req:review` issue.",
|
|
7056
|
+
"2. Read the matching templates from `<TEMPLATES_ROOT>` for every",
|
|
7057
|
+
" category in scope.",
|
|
7058
|
+
"3. Run the 11 checks. For audits >10 documents, write the",
|
|
7059
|
+
" verification script to disk first and run it.",
|
|
7060
|
+
"4. Write the report to",
|
|
7061
|
+
" `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md`.",
|
|
7062
|
+
"5. Commit the report (and verification script, if written).",
|
|
7063
|
+
"6. Open one follow-up issue per actionable finding (Critical or",
|
|
7064
|
+
" Warning). Every follow-up issue includes the file path, a link",
|
|
7065
|
+
" to the report, and the specific check that produced it.",
|
|
7066
|
+
"7. Comment on the `req:review` issue with a summary of findings",
|
|
7067
|
+
" and links to the follow-up issues.",
|
|
7068
|
+
"",
|
|
7069
|
+
"---",
|
|
7070
|
+
"",
|
|
7071
|
+
"## Follow-Up Issues",
|
|
7072
|
+
"",
|
|
7073
|
+
"Open follow-up issues for **Critical** and **Warning** findings.",
|
|
7074
|
+
"Skip Info findings \u2014 they are guidance, not work items.",
|
|
7075
|
+
"",
|
|
7076
|
+
"Each follow-up issue:",
|
|
7077
|
+
"",
|
|
7078
|
+
"- Carries `type:requirement` (the type owned by the upstream",
|
|
7079
|
+
" `requirements-analyst` bundle)",
|
|
7080
|
+
"- Carries the appropriate phase label for the work needed:",
|
|
7081
|
+
" - Structural / content fixes that an existing document needs \u2192",
|
|
7082
|
+
" `req:write` (the `requirements-writer` agent picks it up to",
|
|
7083
|
+
" revise the document)",
|
|
7084
|
+
" - Missing or broken traceability links \u2192 `req:trace` (the",
|
|
7085
|
+
" `requirements-analyst` agent picks it up to backfill",
|
|
7086
|
+
" traceability)",
|
|
7087
|
+
" - A new requirement is needed (e.g., a `Proposed` ADR is missing",
|
|
7088
|
+
" for a deferred technology choice) \u2192 `req:scan` (the analyst",
|
|
7089
|
+
" runs a scoped scan to confirm the gap, then drafts the new",
|
|
7090
|
+
" requirement through the normal pipeline)",
|
|
7091
|
+
"- Sets priority based on finding severity: Critical \u2192",
|
|
7092
|
+
" `priority:high`; Warning \u2192 `priority:medium`",
|
|
7093
|
+
"- Includes the affected file path in the body and links back to",
|
|
7094
|
+
" the review report",
|
|
7095
|
+
"- Adds `status:ready` (or `status:blocked` when the finding",
|
|
7096
|
+
" declares a `Depends on: #N` on another open issue)",
|
|
7097
|
+
"",
|
|
7098
|
+
"**Do NOT create:**",
|
|
7099
|
+
"",
|
|
7100
|
+
"- `req:review` issues \u2014 that would be self-referential",
|
|
7101
|
+
"- `bcm:*`, `people:*`, `company:*`, `software:*`, `research:*`,",
|
|
7102
|
+
" or `industry:*` issues \u2014 those belong to their respective",
|
|
7103
|
+
" bundles. If the review surfaces work for one of those bundles,",
|
|
7104
|
+
" comment on the `req:review` issue with the suggested follow-up",
|
|
7105
|
+
" and let a human triage it",
|
|
7106
|
+
"",
|
|
7107
|
+
"---",
|
|
7108
|
+
"",
|
|
7109
|
+
"## Output Boundaries",
|
|
7110
|
+
"",
|
|
7111
|
+
"This agent writes **only** to:",
|
|
7112
|
+
"",
|
|
7113
|
+
"- `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md` \u2014 one",
|
|
7114
|
+
" review report per session",
|
|
7115
|
+
"- `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD-verify.py` \u2014",
|
|
7116
|
+
" the verification script for audits >10 documents (read-only,",
|
|
7117
|
+
" idempotent)",
|
|
7118
|
+
"- Follow-up GitHub issues (one per actionable finding)",
|
|
7119
|
+
"- A summary comment on the `req:review` issue",
|
|
7120
|
+
"",
|
|
7121
|
+
"**Do NOT write to:**",
|
|
7122
|
+
"",
|
|
7123
|
+
"- The requirement documents themselves under",
|
|
7124
|
+
" `<REQUIREMENTS_ROOT>` \u2014 those edits belong to the",
|
|
7125
|
+
" `requirements-writer` agent picking up a follow-up `req:write`",
|
|
7126
|
+
" issue",
|
|
7127
|
+
"- The category index files \u2014 those edits belong to the writer",
|
|
7128
|
+
"- The templates at `<TEMPLATES_ROOT>` \u2014 those are owned by the",
|
|
7129
|
+
" `requirements-writer` bundle source, not by per-project state",
|
|
7130
|
+
"",
|
|
7131
|
+
"---",
|
|
7132
|
+
"",
|
|
7133
|
+
"## Iterating on Reviews",
|
|
7134
|
+
"",
|
|
7135
|
+
"After the report is committed and follow-up issues are filed:",
|
|
7136
|
+
"",
|
|
7137
|
+
"1. Comment on the `req:review` issue with a one-paragraph summary,",
|
|
7138
|
+
" the severity counts, and links to the report and follow-up",
|
|
7139
|
+
" issues.",
|
|
7140
|
+
"2. If the user asked for re-review after fixes land, open a fresh",
|
|
7141
|
+
" `req:review` issue rather than reopening the original. Each",
|
|
7142
|
+
" review session produces a new dated report.",
|
|
7143
|
+
"",
|
|
7144
|
+
"---",
|
|
7145
|
+
"",
|
|
7146
|
+
"## Working Rules",
|
|
7147
|
+
"",
|
|
7148
|
+
"- **One review per session.** Stop after the report is written,",
|
|
7149
|
+
" follow-up issues are filed, and the summary comment is posted.",
|
|
7150
|
+
"- **Audit only.** Never edit requirement documents, category",
|
|
7151
|
+
" indexes, or templates. Findings flow through follow-up issues.",
|
|
7152
|
+
"- **Resolve, do not eyeball.** Cross-reference findings only count",
|
|
7153
|
+
" when the target path is verified missing on disk.",
|
|
7154
|
+
"- **Cite every finding.** Every entry in the report must cite the",
|
|
7155
|
+
" file path and the numbered check that produced it.",
|
|
7156
|
+
"- **Do not invent traceability rules.** Use the defaults documented",
|
|
7157
|
+
" above unless the project's `docs/project-context.md` declares a",
|
|
7158
|
+
" different traceability shape.",
|
|
7159
|
+
"- **Audits >10 documents must use a verification script.** Manual",
|
|
7160
|
+
" review of large sets always misses broken links."
|
|
7161
|
+
].join("\n")
|
|
7162
|
+
};
|
|
7163
|
+
var reviewRequirementsSkill = {
|
|
7164
|
+
name: "review-requirements",
|
|
7165
|
+
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.",
|
|
7166
|
+
disableModelInvocation: true,
|
|
7167
|
+
userInvocable: true,
|
|
7168
|
+
context: "fork",
|
|
7169
|
+
agent: "requirements-reviewer",
|
|
7170
|
+
platforms: { cursor: { exclude: true } },
|
|
7171
|
+
instructions: [
|
|
7172
|
+
"# Review Requirements",
|
|
7173
|
+
"",
|
|
7174
|
+
"Audit existing requirement documents for structural compliance,",
|
|
7175
|
+
"traceability, categorization, and content quality. Dispatches the",
|
|
7176
|
+
"`requirements-reviewer` agent.",
|
|
7177
|
+
"",
|
|
7178
|
+
"## Soft Dependency",
|
|
7179
|
+
"",
|
|
7180
|
+
"This skill reads requirement category templates from",
|
|
7181
|
+
"`.claude/skills/requirements-writer/_references/templates/`,",
|
|
7182
|
+
"which is shipped by the `requirements-writer` bundle. If your",
|
|
7183
|
+
"project does not use the `requirements-writer` bundle, supply",
|
|
7184
|
+
"equivalent templates at the same path before running a review.",
|
|
7185
|
+
"",
|
|
7186
|
+
"## Usage",
|
|
7187
|
+
"",
|
|
7188
|
+
"/review-requirements <scope>",
|
|
7189
|
+
"",
|
|
7190
|
+
"Where `<scope>` is one of:",
|
|
7191
|
+
"",
|
|
7192
|
+
"- `full` \u2014 audit every requirement document under",
|
|
7193
|
+
" `<REQUIREMENTS_ROOT>` across all categories",
|
|
7194
|
+
"- `category:<slug>` \u2014 audit one category directory (e.g.,",
|
|
7195
|
+
" `category:functional` audits every FR)",
|
|
7196
|
+
"- `doc:<path>` \u2014 audit one specific requirement file",
|
|
7197
|
+
"- `check:<n>[,<n>...]` \u2014 run one or more checks (1\u201311) across the",
|
|
7198
|
+
" documents in scope (e.g., `check:4` runs cross-reference",
|
|
7199
|
+
" integrity only)",
|
|
7200
|
+
"",
|
|
7201
|
+
"Optional extensions in the issue body:",
|
|
7202
|
+
"",
|
|
7203
|
+
"- `output: <path>` \u2014 override the default report path",
|
|
7204
|
+
"- `requirements-root: <path>` \u2014 override `<REQUIREMENTS_ROOT>`",
|
|
7205
|
+
"- `targets: <glob>` \u2014 restrict the document set with a glob",
|
|
7206
|
+
" pattern relative to `<REQUIREMENTS_ROOT>`",
|
|
7207
|
+
"",
|
|
7208
|
+
"## Default Paths",
|
|
7209
|
+
"",
|
|
7210
|
+
"If the project has no override in `docs/project-context.md` or",
|
|
7211
|
+
"`agentConfig.rules`, outputs land under:",
|
|
7212
|
+
"",
|
|
7213
|
+
"- `docs/research/reviews/review-<scope>-YYYY-MM-DD.md` \u2014 the",
|
|
7214
|
+
" review report",
|
|
7215
|
+
"- `docs/research/reviews/review-<scope>-YYYY-MM-DD-verify.py` \u2014",
|
|
7216
|
+
" the Python verification script (only for audits >10 documents)",
|
|
7217
|
+
"",
|
|
7218
|
+
"## Steps",
|
|
7219
|
+
"",
|
|
7220
|
+
"1. Create a `req:review` issue with `type:requirement`,",
|
|
7221
|
+
" `priority:medium`, and `status:ready`. Body must include the",
|
|
7222
|
+
" scope, the requirements root (or accept the default), and the",
|
|
7223
|
+
" output path.",
|
|
7224
|
+
"2. Execute the review phase of the requirements-reviewer agent.",
|
|
7225
|
+
"3. The agent runs the 11-check audit, writes a structured report",
|
|
7226
|
+
" grouped by Critical / Warning / Info, files follow-up issues",
|
|
7227
|
+
" for actionable findings, and comments on the `req:review`",
|
|
7228
|
+
" issue with the summary.",
|
|
7229
|
+
"",
|
|
7230
|
+
"## Audits >10 Documents",
|
|
7231
|
+
"",
|
|
7232
|
+
"For audits covering more than 10 documents, the agent writes a",
|
|
7233
|
+
"Python verification script alongside the report and uses its",
|
|
7234
|
+
"output as the basis for the audit. The script is read-only and",
|
|
7235
|
+
"idempotent \u2014 it can be re-run after fixes land to confirm",
|
|
7236
|
+
"remediation. The script is generated per-audit; it is not shipped",
|
|
7237
|
+
"as a static asset.",
|
|
7238
|
+
"",
|
|
7239
|
+
"## Output",
|
|
7240
|
+
"",
|
|
7241
|
+
"- One review report under `<REVIEW_REPORTS_ROOT>` grouped by",
|
|
7242
|
+
" Critical / Warning / Info severity",
|
|
7243
|
+
"- One verification script under `<REVIEW_REPORTS_ROOT>` (only",
|
|
7244
|
+
" for audits >10 documents)",
|
|
7245
|
+
"- Follow-up GitHub issues for every Critical and Warning finding,",
|
|
7246
|
+
" carrying the appropriate phase label (`req:write`, `req:trace`,",
|
|
7247
|
+
" or `req:scan`) for the downstream agent that should act",
|
|
7248
|
+
"- A summary comment on the originating `req:review` issue"
|
|
7249
|
+
].join("\n")
|
|
7250
|
+
};
|
|
7251
|
+
var requirementsReviewerBundle = {
|
|
7252
|
+
name: "requirements-reviewer",
|
|
7253
|
+
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.",
|
|
7254
|
+
appliesWhen: () => true,
|
|
7255
|
+
rules: [
|
|
7256
|
+
{
|
|
7257
|
+
name: "requirements-reviewer-workflow",
|
|
7258
|
+
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.",
|
|
7259
|
+
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
7260
|
+
content: [
|
|
7261
|
+
"# Requirements Reviewer Workflow",
|
|
7262
|
+
"",
|
|
7263
|
+
"Use `/review-requirements <scope>` to audit existing requirement",
|
|
7264
|
+
"documents. The reviewer runs in a single phase tracked by a",
|
|
7265
|
+
"GitHub issue labeled `req:review`. Issues also carry",
|
|
7266
|
+
"`type:requirement` (declared by the upstream",
|
|
7267
|
+
"`requirements-analyst` bundle).",
|
|
7268
|
+
"",
|
|
7269
|
+
"The pipeline produces **review reports and follow-up issues** \u2014",
|
|
7270
|
+
"it never edits requirement documents, capability models, or",
|
|
7271
|
+
"research notes. Authoring is the responsibility of the",
|
|
7272
|
+
"`requirements-writer` (requirement docs) and `bcm-writer`",
|
|
7273
|
+
"(capability models) bundles; gap discovery is the responsibility",
|
|
7274
|
+
"of the `requirements-analyst` bundle. The reviewer never opens",
|
|
7275
|
+
"`req:scan`, `req:draft`, `req:trace`, `req:write`, or `bcm:*`",
|
|
7276
|
+
"issues directly \u2014 instead it files follow-up issues with the",
|
|
7277
|
+
"appropriate phase label (`req:write`, `req:trace`, or",
|
|
7278
|
+
"`req:scan`) for the downstream agent to pick up.",
|
|
7279
|
+
"",
|
|
7280
|
+
"Four review scopes are supported: `full` (every document),",
|
|
7281
|
+
"`category:<slug>` (one category directory), `doc:<path>` (one",
|
|
7282
|
+
"specific document), and `check:<n>` (one or more of the 11",
|
|
7283
|
+
"checks across the documents in scope).",
|
|
7284
|
+
"",
|
|
7285
|
+
"**Soft dependency on the `requirements-writer` bundle.** The",
|
|
7286
|
+
"reviewer reads category templates from",
|
|
7287
|
+
"`.claude/skills/requirements-writer/_references/templates/`,",
|
|
7288
|
+
"which is shipped by the `requirements-writer` bundle. Projects",
|
|
7289
|
+
"that disable the writer bundle but keep the reviewer must",
|
|
7290
|
+
"supply equivalent templates at the same path.",
|
|
7291
|
+
"",
|
|
7292
|
+
"For audits covering more than 10 documents, the reviewer writes",
|
|
7293
|
+
"a read-only Python verification script alongside the report and",
|
|
7294
|
+
"uses its output as the basis for findings \u2014 manual review of",
|
|
7295
|
+
"large document sets always misses broken links.",
|
|
7296
|
+
"",
|
|
7297
|
+
"See the `requirements-reviewer` agent definition for full",
|
|
7298
|
+
"workflow details, configurable paths, the 11-check catalog, the",
|
|
7299
|
+
"severity ladder, and reporting format."
|
|
7300
|
+
].join("\n"),
|
|
7301
|
+
platforms: {
|
|
7302
|
+
cursor: { exclude: true }
|
|
7303
|
+
},
|
|
7304
|
+
tags: ["workflow"]
|
|
7305
|
+
}
|
|
7306
|
+
],
|
|
7307
|
+
skills: [reviewRequirementsSkill],
|
|
7308
|
+
subAgents: [requirementsReviewerSubAgent],
|
|
7309
|
+
labels: [
|
|
7310
|
+
{
|
|
7311
|
+
name: "req:review",
|
|
7312
|
+
color: "FBCA04",
|
|
7313
|
+
description: "Phase: audit existing requirement documents using the requirements-reviewer skill"
|
|
7314
|
+
}
|
|
7315
|
+
]
|
|
7316
|
+
};
|
|
7317
|
+
|
|
6494
7318
|
// src/agent/bundles/requirements-writer.ts
|
|
6495
7319
|
var TEMPLATE_BR = `---
|
|
6496
7320
|
title: "BR-NNN: [Business Requirement Title]"
|
|
@@ -11101,6 +11925,7 @@ var BUILT_IN_BUNDLES = [
|
|
|
11101
11925
|
prReviewBundle,
|
|
11102
11926
|
requirementsAnalystBundle,
|
|
11103
11927
|
requirementsWriterBundle,
|
|
11928
|
+
requirementsReviewerBundle,
|
|
11104
11929
|
researchPipelineBundle,
|
|
11105
11930
|
companyProfileBundle,
|
|
11106
11931
|
peopleProfileBundle,
|
|
@@ -14580,6 +15405,7 @@ var TypeScriptConfig = class extends import_projen22.Component {
|
|
|
14580
15405
|
prReviewBundle,
|
|
14581
15406
|
projenBundle,
|
|
14582
15407
|
requirementsAnalystBundle,
|
|
15408
|
+
requirementsReviewerBundle,
|
|
14583
15409
|
requirementsWriterBundle,
|
|
14584
15410
|
researchPipelineBundle,
|
|
14585
15411
|
resolveModelAlias,
|