@codedrifters/configulator 0.0.230 → 0.0.232
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 +20 -4
- package/lib/index.d.ts +20 -4
- package/lib/index.js +1367 -1348
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +1366 -1348
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -203,6 +203,7 @@ __export(index_exports, {
|
|
|
203
203
|
PROD_DEPLOY_NAME: () => PROD_DEPLOY_NAME,
|
|
204
204
|
PnpmWorkspace: () => PnpmWorkspace,
|
|
205
205
|
ProjectMetadata: () => ProjectMetadata,
|
|
206
|
+
REQUIREMENTS_WRITER_PATHS: () => REQUIREMENTS_WRITER_PATHS,
|
|
206
207
|
ROOT_CI_TASK_NAME: () => ROOT_CI_TASK_NAME,
|
|
207
208
|
ROOT_TURBO_TASK_NAME: () => ROOT_TURBO_TASK_NAME,
|
|
208
209
|
ResetTask: () => ResetTask,
|
|
@@ -7374,7 +7375,10 @@ var requirementsAnalystSubAgent = {
|
|
|
7374
7375
|
" meeting extract).",
|
|
7375
7376
|
"3. **Respect the taxonomy.** Route every discovered requirement to the",
|
|
7376
7377
|
" correct BCM category (FR, BR, NFR, SEC, DR, INT, OPS, UX, MT, ADR, TR)",
|
|
7377
|
-
" using the disambiguation rules
|
|
7378
|
+
" using the shared disambiguation rules \u2014 the same taxonomy the",
|
|
7379
|
+
" `requirements-writer` and `requirements-reviewer` load. The",
|
|
7380
|
+
" canonical source lives in `requirements-taxonomy.ts` and is",
|
|
7381
|
+
" embedded verbatim in both downstream agents' prompts.",
|
|
7378
7382
|
"4. **Deduplicate.** Before creating an issue, check whether a requirement",
|
|
7379
7383
|
" already exists or an issue is already open for it.",
|
|
7380
7384
|
"",
|
|
@@ -7477,7 +7481,9 @@ var requirementsAnalystSubAgent = {
|
|
|
7477
7481
|
"2. **Identify potential gaps.** For each potential missing requirement:",
|
|
7478
7482
|
" - Classify into the correct BCM category (FR, BR, NFR, SEC, DR, INT,",
|
|
7479
7483
|
" OPS, UX, MT, ADR, TR)",
|
|
7480
|
-
" - Apply the disambiguation rules from
|
|
7484
|
+
" - Apply the shared disambiguation rules (from `requirements-taxonomy.ts`,",
|
|
7485
|
+
" also embedded in the requirements-writer and requirements-reviewer",
|
|
7486
|
+
" prompts)",
|
|
7481
7487
|
" - Note the source that revealed the gap",
|
|
7482
7488
|
" - Estimate priority based on the source context",
|
|
7483
7489
|
"",
|
|
@@ -7818,772 +7824,60 @@ var requirementsAnalystBundle = {
|
|
|
7818
7824
|
]
|
|
7819
7825
|
};
|
|
7820
7826
|
|
|
7821
|
-
// src/agent/bundles/requirements-
|
|
7822
|
-
var
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
"",
|
|
7876
|
-
"## Design Principles",
|
|
7877
|
-
"",
|
|
7878
|
-
"1. **One review per session.** Each `req:review` issue maps to a",
|
|
7879
|
-
" single review report. Never review two scopes in one session and",
|
|
7880
|
-
" never start a second issue.",
|
|
7881
|
-
"2. **Audit only \u2014 do not edit.** Findings are reported in the review",
|
|
7882
|
-
" report and as follow-up issues. Direct edits to requirement",
|
|
7883
|
-
" documents belong to the `requirements-writer` agent picking up a",
|
|
7884
|
-
" follow-up `req:write` issue.",
|
|
7885
|
-
"3. **Templates are authoritative.** When a document is missing a",
|
|
7886
|
-
" section that the matching category template requires, that is a",
|
|
7887
|
-
" structural finding \u2014 not a stylistic choice.",
|
|
7888
|
-
"4. **Resolve every link against the filesystem.** Cross-reference",
|
|
7889
|
-
" integrity findings only count when the target path is actually",
|
|
7890
|
-
" missing from disk. Do not eyeball \u2014 resolve relative paths and",
|
|
7891
|
-
" verify the file exists.",
|
|
7892
|
-
"5. **Cite, don't invent.** Every finding cites the file path, line",
|
|
7893
|
-
" range (when available), and the specific check that failed.",
|
|
7894
|
-
" Never speculate about author intent.",
|
|
7895
|
-
"",
|
|
7896
|
-
"---",
|
|
7897
|
-
"",
|
|
7898
|
-
"## Configurable Paths",
|
|
7899
|
-
"",
|
|
7900
|
-
"The pipeline uses these placeholders. Consuming projects override",
|
|
7901
|
-
"the defaults by passing paths in the `/review-requirements` skill",
|
|
7902
|
-
"invocation, by recording overrides in `docs/project-context.md`, or",
|
|
7903
|
-
"by extending this rule in their own `agentConfig.rules`.",
|
|
7904
|
-
"",
|
|
7905
|
-
"| Placeholder | Meaning | Default |",
|
|
7906
|
-
"|-------------|---------|---------|",
|
|
7907
|
-
"| `<REQUIREMENTS_ROOT>` | Root folder for final requirement documents | `docs/requirements/` |",
|
|
7908
|
-
"| `<REVIEW_REPORTS_ROOT>` | Where review reports are written | `docs/research/reviews/` |",
|
|
7909
|
-
"| `<TEMPLATES_ROOT>` | Where the writer bundle ships category templates (read-only for this agent) | `.claude/skills/write-requirement/_references/templates/` |",
|
|
7910
|
-
"| `<STANDARDS_REF>` | Standards & frameworks reference shipped by the writer bundle | `.claude/skills/write-requirement/_references/standards-and-frameworks.md` |",
|
|
7911
|
-
"",
|
|
7912
|
-
"If `docs/project-context.md` specifies a different requirements",
|
|
7913
|
-
"tree, prefer that. Otherwise fall back to the defaults above.",
|
|
7914
|
-
"",
|
|
7915
|
-
"---",
|
|
7916
|
-
"",
|
|
7917
|
-
"## Review Scope",
|
|
7918
|
-
"",
|
|
7919
|
-
"Read the `req:review` issue body to determine the scope. The skill",
|
|
7920
|
-
"supports four scopes \u2014 clarify with the issue author or in a",
|
|
7921
|
-
"follow-up comment if the scope is not stated:",
|
|
7922
|
-
"",
|
|
7923
|
-
"1. **Full audit** \u2014 every requirement document under",
|
|
7924
|
-
" `<REQUIREMENTS_ROOT>` across all categories",
|
|
7925
|
-
"2. **Category audit** \u2014 every document in one category directory",
|
|
7926
|
-
" (e.g., all FRs under `<REQUIREMENTS_ROOT>/functional/`)",
|
|
7927
|
-
"3. **Single document** \u2014 one specific requirement file",
|
|
7928
|
-
"4. **Targeted check** \u2014 one or more checks from the catalog below,",
|
|
7929
|
-
' run across the documents in scope (e.g., "check all traceability',
|
|
7930
|
-
' links" or "verify tier classification only")',
|
|
7931
|
-
"",
|
|
7932
|
-
"A full audit on a large document set can be extensive. If the issue",
|
|
7933
|
-
"does not state a scope, comment on the issue requesting one and",
|
|
7934
|
-
"leave the issue in `status:needs-attention` rather than guessing.",
|
|
7935
|
-
"",
|
|
7936
|
-
"---",
|
|
7937
|
-
"",
|
|
7938
|
-
"## Review Checklist",
|
|
7939
|
-
"",
|
|
7940
|
-
"Apply the following 11 checks. Each check produces zero or more",
|
|
7941
|
-
"findings. Findings are graded Critical / Warning / Info using the",
|
|
7942
|
-
"severity ladder in the next section.",
|
|
7943
|
-
"",
|
|
7944
|
-
"### 1. Structural Compliance",
|
|
7945
|
-
"",
|
|
7946
|
-
"For each document in scope, verify:",
|
|
7947
|
-
"",
|
|
7948
|
-
"- YAML frontmatter present with `title` and `description` fields",
|
|
7949
|
-
"- Title in frontmatter matches the `# Heading` line",
|
|
7950
|
-
"- File name follows `{PREFIX}-{NNN}-{slug}.md` (or the project",
|
|
7951
|
-
" prefix declared in `docs/project-context.md`)",
|
|
7952
|
-
"- File is in the correct category directory under",
|
|
7953
|
-
" `<REQUIREMENTS_ROOT>`",
|
|
7954
|
-
"- `Status` field is set to one of the valid values: `Draft`,",
|
|
7955
|
-
" `Proposed`, `Accepted`, `Implemented`, `Deprecated`, `Superseded`",
|
|
7956
|
-
"- All sections from the matching category template at",
|
|
7957
|
-
" `<TEMPLATES_ROOT>` are present (sections that do not apply must",
|
|
7958
|
-
" carry `Not applicable \u2014 <reason>` rather than being silently",
|
|
7959
|
-
" omitted)",
|
|
7960
|
-
"- `## Open Items` section exists with all three subsections",
|
|
7961
|
-
" (Identified Gaps, Follow-up Questions, Contradictions &",
|
|
7962
|
-
" Inconsistencies)",
|
|
7963
|
-
"- `## Revision History` section exists",
|
|
7964
|
-
"- `## Traceability` section exists",
|
|
7965
|
-
"",
|
|
7966
|
-
"### 2. Categorization Accuracy",
|
|
7967
|
-
"",
|
|
7968
|
-
"Verify each document is in the right category by applying the",
|
|
7969
|
-
"disambiguation rules from the `requirements-writer` taxonomy:",
|
|
7970
|
-
"",
|
|
7971
|
-
"- **SEC vs NFR:** Protecting data, enforcing access control, or",
|
|
7972
|
-
" meeting a regulation \u2192 SEC. System performance, uptime, or",
|
|
7973
|
-
" scalability \u2192 NFR.",
|
|
7974
|
-
"- **TR vs ADR:** A specific technology choice \u2192 TR. A structural",
|
|
7975
|
-
" decision with trade-offs \u2192 ADR.",
|
|
7976
|
-
"- **FR vs INT:** User-visible behavior \u2192 FR. System-to-system",
|
|
7977
|
-
" communication \u2192 INT.",
|
|
7978
|
-
"- **DR vs SEC:** Data lifecycle / retention / recovery \u2192 DR. Data",
|
|
7979
|
-
" access / protection \u2192 SEC.",
|
|
7980
|
-
"- **NFR vs OPS:** Measurable system quality target \u2192 NFR. Tooling",
|
|
7981
|
-
" and processes to operate the system \u2192 OPS.",
|
|
7982
|
-
"",
|
|
7983
|
-
"Flag any documents that appear miscategorized. Explain where they",
|
|
7984
|
-
"should live and why.",
|
|
7985
|
-
"",
|
|
7986
|
-
"### 3. Traceability Completeness",
|
|
7987
|
-
"",
|
|
7988
|
-
"Check that the requirement dependency graph is connected. Apply",
|
|
7989
|
-
"these expectations as defaults; override them when the project's",
|
|
7990
|
-
"`docs/project-context.md` defines a different traceability shape:",
|
|
7991
|
-
"",
|
|
7992
|
-
"- Every FR should trace back to at least one BR (via",
|
|
7993
|
-
' "Implements")',
|
|
7994
|
-
'- Every TR should trace to at least one ADR (via "Justified by")',
|
|
7995
|
-
"- Every ADR should trace to at least one BR or FR (via",
|
|
7996
|
-
' "Supports")',
|
|
7997
|
-
"- Every SEC, NFR, UX should appear as a constraint or",
|
|
7998
|
-
" cross-reference on the FRs they affect",
|
|
7999
|
-
"- Every INT should trace to at least one FR that depends on it",
|
|
8000
|
-
"- Every DR should be referenced by SEC documents that govern its",
|
|
8001
|
-
" protection",
|
|
8002
|
-
"- Every OPS should reference the NFR targets it monitors",
|
|
8003
|
-
"",
|
|
8004
|
-
"Identify orphaned requirements (documents with no inbound or",
|
|
8005
|
-
"outbound traceability links) and flag them.",
|
|
8006
|
-
"",
|
|
8007
|
-
"### 4. Cross-Reference Integrity",
|
|
8008
|
-
"",
|
|
8009
|
-
"Check **every markdown link to a `.md` file in the entire",
|
|
8010
|
-
"document** \u2014 not just links inside the Traceability section.",
|
|
8011
|
-
"Broken links frequently appear in body text (Description, Main",
|
|
8012
|
-
"Flow, Acceptance Criteria, etc.) where documents reference other",
|
|
8013
|
-
"requirements inline.",
|
|
8014
|
-
"",
|
|
8015
|
-
"For every link in every document:",
|
|
8016
|
-
"",
|
|
8017
|
-
"- The target file exists at the referenced path \u2014 **resolve the",
|
|
8018
|
-
" relative path against the filesystem**, do not eyeball it",
|
|
8019
|
-
"- The target file's ID matches the link text",
|
|
8020
|
-
"- Relative paths are correct (cross-category uses `../`,",
|
|
8021
|
-
" same-category is direct)",
|
|
8022
|
-
"- All links include the `.md` extension",
|
|
8023
|
-
"- Bidirectional links exist where expected (if A references B in",
|
|
8024
|
-
" Traceability, B should reference A)",
|
|
8025
|
-
"",
|
|
8026
|
-
"### 5. Sequence Number Integrity",
|
|
8027
|
-
"",
|
|
8028
|
-
"Within each category directory under `<REQUIREMENTS_ROOT>`:",
|
|
8029
|
-
"",
|
|
8030
|
-
"- No duplicate sequence numbers",
|
|
8031
|
-
"- No gaps in the sequence (gaps may be intentional from deleted",
|
|
8032
|
-
" docs but should be noted as Info)",
|
|
8033
|
-
"- Sequence numbers are zero-padded to three digits (`001`, `012`,",
|
|
8034
|
-
" `127`)",
|
|
8035
|
-
"",
|
|
8036
|
-
"### 6. Content Quality",
|
|
8037
|
-
"",
|
|
8038
|
-
"For each document, evaluate:",
|
|
8039
|
-
"",
|
|
8040
|
-
"- **Completeness** \u2014 Are all template sections filled in",
|
|
8041
|
-
" meaningfully, or are there unexplained TBDs?",
|
|
8042
|
-
"- **Specificity** \u2014 Are acceptance criteria testable? Are NFR",
|
|
8043
|
-
" targets numeric and measurable? Are success metrics concrete?",
|
|
8044
|
-
"- **Consistency** \u2014 Do related documents agree with each other?",
|
|
8045
|
-
" (e.g., does an FR's description match the corresponding INT's",
|
|
8046
|
-
" integration shape?)",
|
|
8047
|
-
"- **Staleness** \u2014 Are statuses up to date? Are there `Draft`",
|
|
8048
|
-
" documents that should have progressed?",
|
|
8049
|
-
"- **Naming consistency** \u2014 When `docs/project-context.md` declares",
|
|
8050
|
-
" a project name or product name, verify it is used consistently",
|
|
8051
|
-
" across documents.",
|
|
8052
|
-
"",
|
|
8053
|
-
"### 7. Open Items Review",
|
|
8054
|
-
"",
|
|
8055
|
-
"Across all documents in scope:",
|
|
8056
|
-
"",
|
|
8057
|
-
"- Are open items prioritized (P0\u2013P3)?",
|
|
8058
|
-
"- Are interdependencies between open items documented with",
|
|
8059
|
-
" cross-references?",
|
|
8060
|
-
"- Are there P0 (Blocker) items that have not been resolved?",
|
|
8061
|
-
"- Are there stale open items that should have been addressed?",
|
|
8062
|
-
"",
|
|
8063
|
-
"### 8. Registry Index Sync",
|
|
8064
|
-
"",
|
|
8065
|
-
"Each category directory has a `README.md` (or `index.md`) file",
|
|
8066
|
-
"that serves as a registry table listing all requirements in that",
|
|
8067
|
-
"category. Check that these are in sync:",
|
|
8068
|
-
"",
|
|
8069
|
-
"- Every requirement file in the directory has a corresponding row",
|
|
8070
|
-
" in the index",
|
|
8071
|
-
"- No rows in the index reference files that do not exist (stale",
|
|
8072
|
-
" entries from deleted docs)",
|
|
8073
|
-
"- Rows are in sequence number order",
|
|
8074
|
-
"- The ID, Title, Status, and Priority in each row match the",
|
|
8075
|
-
" document's metadata",
|
|
8076
|
-
"- No placeholder message remains when requirements exist",
|
|
8077
|
-
"",
|
|
8078
|
-
"Flag missing entries as **Warning** and stale or incorrect entries",
|
|
8079
|
-
"as **Warning**.",
|
|
8080
|
-
"",
|
|
8081
|
-
"### 9. Decision Authority Compliance",
|
|
8082
|
-
"",
|
|
8083
|
-
"Verify that the `requirements-writer` decision-authority rules",
|
|
8084
|
-
"were followed:",
|
|
8085
|
-
"",
|
|
8086
|
-
"- ADR and TR documents should be in `Proposed` status if they",
|
|
8087
|
-
" have not been explicitly accepted by a human",
|
|
8088
|
-
"- Direct-write categories (BR, FR, NFR, SEC, UX) should not",
|
|
8089
|
-
" contain technology-specific decisions \u2014 those should be deferred",
|
|
8090
|
-
" to ADR/TR documents",
|
|
8091
|
-
"- Partial-deferral categories (DR, MT, INT, OPS) should defer",
|
|
8092
|
-
" technology/tooling choices to `Proposed` ADR/TR documents",
|
|
8093
|
-
" rather than embedding them inline",
|
|
8094
|
-
"",
|
|
8095
|
-
"For `Proposed` ADR and TR documents, additionally verify the",
|
|
8096
|
-
"comparison and recommendation structure:",
|
|
8097
|
-
"",
|
|
8098
|
-
"- **Alternatives Considered** section exists with at least 2",
|
|
8099
|
-
" options",
|
|
8100
|
-
"- Each alternative has a description, pros, and cons \u2014 no option",
|
|
8101
|
-
" is given cursory treatment",
|
|
8102
|
-
"- **Recommendation** section exists with a named recommended",
|
|
8103
|
-
" option",
|
|
8104
|
-
"- Recommendation includes a reasoned explanation specific to this",
|
|
8105
|
-
" project's context (not generic)",
|
|
8106
|
-
"- Recommendation identifies key trade-offs being accepted",
|
|
8107
|
-
'- Decision section says "Pending human review" (not "We',
|
|
8108
|
-
' will..." or "We decided...")',
|
|
8109
|
-
"- Open Items include an item flagging that human decision is",
|
|
8110
|
-
" required, with references to dependent requirements blocked on",
|
|
8111
|
-
" this decision",
|
|
8112
|
-
"",
|
|
8113
|
-
"### 10. Tier Classification Compliance",
|
|
8114
|
-
"",
|
|
8115
|
-
"Verify that every document has a valid tier classification. The",
|
|
8116
|
-
"default tier set is `platform`, `industry`, `customer-workflow`,",
|
|
8117
|
-
"`consumer-app`; consuming projects may rename or reduce the tier",
|
|
8118
|
-
"set in their own `docs/project-context.md`.",
|
|
8119
|
-
"",
|
|
8120
|
-
"- `tier` field is set in YAML frontmatter (one of the project's",
|
|
8121
|
-
" declared tier slugs)",
|
|
8122
|
-
"- `Tier` row is set in the Metadata table with a matching value",
|
|
8123
|
-
"- `Implementor` field is set for Customer Workflow and Consumer",
|
|
8124
|
-
" Application tiers when the project tracks that distinction",
|
|
8125
|
-
" (Consortium Member / Customer / TBD)",
|
|
8126
|
-
"- `Implementor` field is absent or N/A for Platform and Industry",
|
|
8127
|
-
" tiers",
|
|
8128
|
-
'- When `Implementor` is "Consortium Member", it links to a',
|
|
8129
|
-
" valid org profile",
|
|
8130
|
-
"- `Customer` field is set for Customer Workflow and Consumer",
|
|
8131
|
-
" Application tiers when the project tracks customer profiles,",
|
|
8132
|
-
" linking to a valid customer org profile",
|
|
8133
|
-
"- `Customer` field in YAML frontmatter (if present) matches the",
|
|
8134
|
-
" Customer row in the Metadata table",
|
|
8135
|
-
"- `customer:<slug>` label exists on the corresponding GitHub issue",
|
|
8136
|
-
" (when traceable)",
|
|
8137
|
-
"- Industry-tier requirements specify which industry/vertical they",
|
|
8138
|
-
" apply to",
|
|
8139
|
-
"- Platform-tier requirements do not contain industry-specific",
|
|
8140
|
-
" concerns that should be scoped to the Industry tier",
|
|
8141
|
-
"- Cross-tier traceability links exist where expected:",
|
|
8142
|
-
" - Consumer Application requirements have `Depends on",
|
|
8143
|
-
" (cross-tier)` links to Platform requirements (the APIs they",
|
|
8144
|
-
" consume)",
|
|
8145
|
-
" - Customer Workflow requirements have `Depends on (cross-tier)`",
|
|
8146
|
-
" links to Platform requirements (the configuration capabilities",
|
|
8147
|
-
" they use)",
|
|
8148
|
-
" - Industry requirements have `Depends on (cross-tier)` links to",
|
|
8149
|
-
" Platform requirements (the core services they extend)",
|
|
8150
|
-
" - Platform requirements that enable higher-tier work have",
|
|
8151
|
-
" `Enables (cross-tier)` links",
|
|
8152
|
-
"- Multi-tier decompositions are complete \u2014 if a customer need was",
|
|
8153
|
-
" decomposed across tiers, all expected tiers have corresponding",
|
|
8154
|
-
" requirements linked together",
|
|
8155
|
-
"",
|
|
8156
|
-
"Flag as **Critical**: missing tier field; platform requirements",
|
|
8157
|
-
"containing industry-specific logic.",
|
|
8158
|
-
"Flag as **Warning**: missing cross-tier traceability; missing",
|
|
8159
|
-
"Implementor field on Customer Workflow / Consumer Application",
|
|
8160
|
-
"requirements when the project tracks that field; missing Customer",
|
|
8161
|
-
"field on Customer Workflow / Consumer Application requirements;",
|
|
8162
|
-
'Implementor claiming "Consortium Member" without a linked org',
|
|
8163
|
-
"profile.",
|
|
8164
|
-
"",
|
|
8165
|
-
"### 11. Cross-Referencing Convention Compliance",
|
|
8166
|
-
"",
|
|
8167
|
-
"Verify alignment with the project's cross-referencing conventions",
|
|
8168
|
-
"(usually documented in `docs/project-context.md` or a profile",
|
|
8169
|
-
"registry index):",
|
|
8170
|
-
"",
|
|
8171
|
-
"- Requirements that reference profiled organizations use the",
|
|
8172
|
-
" project's profile-link convention (e.g., `profilePath`",
|
|
8173
|
-
" frontmatter, or relative links into the profiles tree)",
|
|
8174
|
-
"- Requirements that trace to research output link to the correct",
|
|
8175
|
-
" paths under the project's research tree",
|
|
8176
|
-
"- Optional convention: meeting-sourced requirements may reference",
|
|
8177
|
-
" the meeting transcript or insight document. This is **optional** \u2014",
|
|
8178
|
-
" only flag missing meeting links when the project documents the",
|
|
8179
|
-
" reverse-link structure (e.g., a `referencedIn.meetings[]`",
|
|
8180
|
-
" frontmatter block) and that structure is in active use.",
|
|
8181
|
-
"",
|
|
8182
|
-
"---",
|
|
8183
|
-
"",
|
|
8184
|
-
"## Severity Ladder",
|
|
8185
|
-
"",
|
|
8186
|
-
"Group every finding by severity:",
|
|
8187
|
-
"",
|
|
8188
|
-
"### Critical (Must Fix)",
|
|
8189
|
-
"",
|
|
8190
|
-
"Issues that undermine the integrity of the requirements",
|
|
8191
|
-
"documentation:",
|
|
8192
|
-
"",
|
|
8193
|
-
"- Miscategorized requirements",
|
|
8194
|
-
"- Broken cross-references (target file does not exist on disk)",
|
|
8195
|
-
"- Missing mandatory template sections",
|
|
8196
|
-
"- Technology decisions embedded in direct-write categories without",
|
|
8197
|
-
" a corresponding `Proposed` ADR/TR",
|
|
8198
|
-
"- P0 open items that are unresolved",
|
|
8199
|
-
"- Missing `tier` field; platform requirements containing",
|
|
8200
|
-
" industry-specific logic",
|
|
8201
|
-
"",
|
|
8202
|
-
"### Warning (Should Fix)",
|
|
8203
|
-
"",
|
|
8204
|
-
"Issues that reduce quality but do not break the documentation:",
|
|
8205
|
-
"",
|
|
8206
|
-
"- Missing traceability links (orphaned requirements)",
|
|
8207
|
-
"- Unidirectional cross-references (A links to B, but B does not",
|
|
8208
|
-
" link to A)",
|
|
8209
|
-
"- Vague acceptance criteria or unmeasurable NFR targets",
|
|
8210
|
-
"- Stale statuses or unaddressed open items",
|
|
8211
|
-
"- Sequence number gaps",
|
|
8212
|
-
"- Registry index out of sync with actual files (missing entries,",
|
|
8213
|
-
" stale rows, incorrect metadata)",
|
|
8214
|
-
"- Missing cross-tier traceability; missing Implementor / Customer",
|
|
8215
|
-
" fields on Customer Workflow / Consumer Application requirements",
|
|
8216
|
-
" when the project tracks those fields",
|
|
8217
|
-
"",
|
|
8218
|
-
"### Info (Consider)",
|
|
8219
|
-
"",
|
|
8220
|
-
"Observations and suggestions:",
|
|
8221
|
-
"",
|
|
8222
|
-
"- Opportunities to add cross-references between related",
|
|
8223
|
-
" requirements",
|
|
8224
|
-
"- TBD sections that could be filled in with available information",
|
|
8225
|
-
"- Style inconsistencies across documents",
|
|
8226
|
-
"- Sequence number gaps that appear intentional from deleted docs",
|
|
8227
|
-
"",
|
|
8228
|
-
"---",
|
|
8229
|
-
"",
|
|
8230
|
-
"## Reporting Format",
|
|
8231
|
-
"",
|
|
8232
|
-
"Write the review report to",
|
|
8233
|
-
"`<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md` (substitute",
|
|
8234
|
-
"the date and a short scope slug). Structure the report as:",
|
|
8235
|
-
"",
|
|
8236
|
-
"```markdown",
|
|
8237
|
-
"# Requirements Review: <scope>",
|
|
8238
|
-
"",
|
|
8239
|
-
"**Date:** YYYY-MM-DD",
|
|
8240
|
-
"**Scope:** <full audit | category | single document | targeted",
|
|
8241
|
-
"check>",
|
|
8242
|
-
"**Source issue:** #NNN",
|
|
8243
|
-
"",
|
|
8244
|
-
"## Critical (Must Fix)",
|
|
8245
|
-
"",
|
|
8246
|
-
"1. **[<file path>] <short title>** `Critical`",
|
|
8247
|
-
" <one-paragraph description, citing the specific check that",
|
|
8248
|
-
" failed>",
|
|
8249
|
-
"",
|
|
8250
|
-
"## Warning (Should Fix)",
|
|
8251
|
-
"",
|
|
8252
|
-
"1. **[<file path>] <short title>** `Warning`",
|
|
8253
|
-
" ...",
|
|
8254
|
-
"",
|
|
8255
|
-
"## Info (Consider)",
|
|
8256
|
-
"",
|
|
8257
|
-
"1. **[<file path>] <short title>** `Info`",
|
|
8258
|
-
" ...",
|
|
8259
|
-
"",
|
|
8260
|
-
"## Review Summary",
|
|
8261
|
-
"",
|
|
8262
|
-
"| Severity | Count |",
|
|
8263
|
-
"|---|---|",
|
|
8264
|
-
"| Critical | N |",
|
|
8265
|
-
"| Warning | N |",
|
|
8266
|
-
"| Info | N |",
|
|
8267
|
-
"",
|
|
8268
|
-
"**Categories reviewed:** [list]",
|
|
8269
|
-
"**Documents reviewed:** N",
|
|
8270
|
-
"**Overall assessment:** [Brief 1-2 sentence assessment]",
|
|
8271
|
-
"```",
|
|
8272
|
-
"",
|
|
8273
|
-
"Each finding must cite the file path and the specific check that",
|
|
8274
|
-
'produced it (e.g., "Check 4: Cross-Reference Integrity \u2014 target',
|
|
8275
|
-
"file `../security/SEC-007-audit-logs.md` does not exist on",
|
|
8276
|
-
'disk").',
|
|
8277
|
-
"",
|
|
8278
|
-
"---",
|
|
8279
|
-
"",
|
|
8280
|
-
"## Automated Verification (>10 documents)",
|
|
8281
|
-
"",
|
|
8282
|
-
"For audits covering more than 10 documents, **write a Python",
|
|
8283
|
-
"verification script** rather than reading files one by one.",
|
|
8284
|
-
"Manual review of large document sets always misses things \u2014",
|
|
8285
|
-
"especially broken links where the filename is plausible but wrong.",
|
|
8286
|
-
"",
|
|
8287
|
-
"Save the script alongside the review report at",
|
|
8288
|
-
"`<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD-verify.py` so",
|
|
8289
|
-
"future reviews can re-run it. The script must be idempotent and",
|
|
8290
|
-
"read-only \u2014 it inspects files, it does not mutate them.",
|
|
8291
|
-
"",
|
|
8292
|
-
"At minimum, the script must:",
|
|
8293
|
-
"",
|
|
8294
|
-
"1. **Resolve every markdown link.** For each `[text](path.md)`",
|
|
8295
|
-
" link in every document in scope, resolve the relative path",
|
|
8296
|
-
" against the filesystem and verify the target file exists.",
|
|
8297
|
-
" Do not skip links outside Traceability sections.",
|
|
8298
|
-
"2. **Extract traceability links.** Parse the `## Traceability`",
|
|
8299
|
-
" section of each document, collect all `[PREFIX-NNN](path)`",
|
|
8300
|
-
" references, and build a directed link graph.",
|
|
8301
|
-
"3. **Check bidirectionality.** For every (A \u2192 B) link in the",
|
|
8302
|
-
" graph, verify (B \u2192 A) exists.",
|
|
8303
|
-
"4. **Verify structural sections.** Check for required section",
|
|
8304
|
-
" headings (`## Open Items`, `## Revision History`,",
|
|
8305
|
-
" `## Traceability`, etc.) using string matching.",
|
|
8306
|
-
"5. **Check registry sync.** Compare files on disk in each",
|
|
8307
|
-
" category directory against entries in the directory's",
|
|
8308
|
-
" `README.md` / `index.md`.",
|
|
8309
|
-
"",
|
|
8310
|
-
"Present the script's output as the basis for the audit report.",
|
|
8311
|
-
"This ensures reproducible, complete results.",
|
|
8312
|
-
"",
|
|
8313
|
-
"---",
|
|
8314
|
-
"",
|
|
8315
|
-
"## Filesystem Durability and Issue-Graph Sequencing",
|
|
8316
|
-
"",
|
|
8317
|
-
"Write the review report to disk **before** opening any follow-up",
|
|
8318
|
-
"issues. The report is the durable record; the issues are pointers",
|
|
8319
|
-
"into it. If the session is interrupted after issues are filed but",
|
|
8320
|
-
"before the report is committed, future runs cannot reconstruct the",
|
|
8321
|
-
"context.",
|
|
8322
|
-
"",
|
|
8323
|
-
"Sequence:",
|
|
8324
|
-
"",
|
|
8325
|
-
"1. Read scope from the `req:review` issue.",
|
|
8326
|
-
"2. Read the matching templates from `<TEMPLATES_ROOT>` for every",
|
|
8327
|
-
" category in scope.",
|
|
8328
|
-
"3. Run the 11 checks. For audits >10 documents, write the",
|
|
8329
|
-
" verification script to disk first and run it.",
|
|
8330
|
-
"4. Write the report to",
|
|
8331
|
-
" `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md`.",
|
|
8332
|
-
"5. Commit the report (and verification script, if written).",
|
|
8333
|
-
"6. Open one follow-up issue per actionable finding (Critical or",
|
|
8334
|
-
" Warning). Every follow-up issue includes the file path, a link",
|
|
8335
|
-
" to the report, and the specific check that produced it.",
|
|
8336
|
-
"7. Comment on the `req:review` issue with a summary of findings",
|
|
8337
|
-
" and links to the follow-up issues.",
|
|
8338
|
-
"",
|
|
8339
|
-
"---",
|
|
8340
|
-
"",
|
|
8341
|
-
"## Follow-Up Issues",
|
|
8342
|
-
"",
|
|
8343
|
-
"Open follow-up issues for **Critical** and **Warning** findings.",
|
|
8344
|
-
"Skip Info findings \u2014 they are guidance, not work items.",
|
|
8345
|
-
"",
|
|
8346
|
-
"Each follow-up issue:",
|
|
8347
|
-
"",
|
|
8348
|
-
"- Carries `type:requirement` (the type owned by the upstream",
|
|
8349
|
-
" `requirements-analyst` bundle)",
|
|
8350
|
-
"- Carries the appropriate phase label for the work needed:",
|
|
8351
|
-
" - Structural / content fixes that an existing document needs \u2192",
|
|
8352
|
-
" `req:write` (the `requirements-writer` agent picks it up to",
|
|
8353
|
-
" revise the document)",
|
|
8354
|
-
" - Missing or broken traceability links \u2192 `req:trace` (the",
|
|
8355
|
-
" `requirements-analyst` agent picks it up to backfill",
|
|
8356
|
-
" traceability)",
|
|
8357
|
-
" - A new requirement is needed (e.g., a `Proposed` ADR is missing",
|
|
8358
|
-
" for a deferred technology choice) \u2192 `req:scan` (the analyst",
|
|
8359
|
-
" runs a scoped scan to confirm the gap, then drafts the new",
|
|
8360
|
-
" requirement through the normal pipeline)",
|
|
8361
|
-
"- Sets priority based on finding severity: Critical \u2192",
|
|
8362
|
-
" `priority:high`; Warning \u2192 `priority:medium`",
|
|
8363
|
-
"- Includes the affected file path in the body and links back to",
|
|
8364
|
-
" the review report",
|
|
8365
|
-
"- Adds `status:ready` (or `status:blocked` when the finding",
|
|
8366
|
-
" declares a `Depends on: #N` on another open issue)",
|
|
8367
|
-
"",
|
|
8368
|
-
"**Do NOT create:**",
|
|
8369
|
-
"",
|
|
8370
|
-
"- `req:review` issues \u2014 that would be self-referential",
|
|
8371
|
-
"- `bcm:*`, `people:*`, `company:*`, `software:*`, `research:*`,",
|
|
8372
|
-
" or `industry:*` issues \u2014 those belong to their respective",
|
|
8373
|
-
" bundles. If the review surfaces work for one of those bundles,",
|
|
8374
|
-
" comment on the `req:review` issue with the suggested follow-up",
|
|
8375
|
-
" and let a human triage it",
|
|
8376
|
-
"",
|
|
8377
|
-
"---",
|
|
8378
|
-
"",
|
|
8379
|
-
"## Output Boundaries",
|
|
8380
|
-
"",
|
|
8381
|
-
"This agent writes **only** to:",
|
|
8382
|
-
"",
|
|
8383
|
-
"- `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md` \u2014 one",
|
|
8384
|
-
" review report per session",
|
|
8385
|
-
"- `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD-verify.py` \u2014",
|
|
8386
|
-
" the verification script for audits >10 documents (read-only,",
|
|
8387
|
-
" idempotent)",
|
|
8388
|
-
"- Follow-up GitHub issues (one per actionable finding)",
|
|
8389
|
-
"- A summary comment on the `req:review` issue",
|
|
8390
|
-
"",
|
|
8391
|
-
"**Do NOT write to:**",
|
|
8392
|
-
"",
|
|
8393
|
-
"- The requirement documents themselves under",
|
|
8394
|
-
" `<REQUIREMENTS_ROOT>` \u2014 those edits belong to the",
|
|
8395
|
-
" `requirements-writer` agent picking up a follow-up `req:write`",
|
|
8396
|
-
" issue",
|
|
8397
|
-
"- The category index files \u2014 those edits belong to the writer",
|
|
8398
|
-
"- The templates at `<TEMPLATES_ROOT>` \u2014 those are owned by the",
|
|
8399
|
-
" `requirements-writer` bundle source, not by per-project state",
|
|
8400
|
-
"",
|
|
8401
|
-
"---",
|
|
8402
|
-
"",
|
|
8403
|
-
"## Iterating on Reviews",
|
|
8404
|
-
"",
|
|
8405
|
-
"After the report is committed and follow-up issues are filed:",
|
|
8406
|
-
"",
|
|
8407
|
-
"1. Comment on the `req:review` issue with a one-paragraph summary,",
|
|
8408
|
-
" the severity counts, and links to the report and follow-up",
|
|
8409
|
-
" issues.",
|
|
8410
|
-
"2. If the user asked for re-review after fixes land, open a fresh",
|
|
8411
|
-
" `req:review` issue rather than reopening the original. Each",
|
|
8412
|
-
" review session produces a new dated report.",
|
|
8413
|
-
"",
|
|
8414
|
-
"---",
|
|
8415
|
-
"",
|
|
8416
|
-
"## Working Rules",
|
|
8417
|
-
"",
|
|
8418
|
-
"- **One review per session.** Stop after the report is written,",
|
|
8419
|
-
" follow-up issues are filed, and the summary comment is posted.",
|
|
8420
|
-
"- **Audit only.** Never edit requirement documents, category",
|
|
8421
|
-
" indexes, or templates. Findings flow through follow-up issues.",
|
|
8422
|
-
"- **Resolve, do not eyeball.** Cross-reference findings only count",
|
|
8423
|
-
" when the target path is verified missing on disk.",
|
|
8424
|
-
"- **Cite every finding.** Every entry in the report must cite the",
|
|
8425
|
-
" file path and the numbered check that produced it.",
|
|
8426
|
-
"- **Do not invent traceability rules.** Use the defaults documented",
|
|
8427
|
-
" above unless the project's `docs/project-context.md` declares a",
|
|
8428
|
-
" different traceability shape.",
|
|
8429
|
-
"- **Audits >10 documents must use a verification script.** Manual",
|
|
8430
|
-
" review of large sets always misses broken links."
|
|
8431
|
-
].join("\n")
|
|
8432
|
-
};
|
|
8433
|
-
var reviewRequirementsSkill = {
|
|
8434
|
-
name: "review-requirements",
|
|
8435
|
-
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/write-requirement/_references/templates/`, shipped by the requirements-writer bundle.",
|
|
8436
|
-
disableModelInvocation: true,
|
|
8437
|
-
userInvocable: true,
|
|
8438
|
-
context: "fork",
|
|
8439
|
-
agent: "requirements-reviewer",
|
|
8440
|
-
platforms: { cursor: { exclude: true } },
|
|
8441
|
-
instructions: [
|
|
8442
|
-
"# Review Requirements",
|
|
8443
|
-
"",
|
|
8444
|
-
"Audit existing requirement documents for structural compliance,",
|
|
8445
|
-
"traceability, categorization, and content quality. Dispatches the",
|
|
8446
|
-
"`requirements-reviewer` agent.",
|
|
8447
|
-
"",
|
|
8448
|
-
"## Soft Dependency",
|
|
8449
|
-
"",
|
|
8450
|
-
"This skill reads requirement category templates from",
|
|
8451
|
-
"`.claude/skills/write-requirement/_references/templates/`,",
|
|
8452
|
-
"which is shipped by the `requirements-writer` bundle. If your",
|
|
8453
|
-
"project does not use the `requirements-writer` bundle, supply",
|
|
8454
|
-
"equivalent templates at the same path before running a review.",
|
|
8455
|
-
"",
|
|
8456
|
-
"## Usage",
|
|
8457
|
-
"",
|
|
8458
|
-
"/review-requirements <scope>",
|
|
8459
|
-
"",
|
|
8460
|
-
"Where `<scope>` is one of:",
|
|
8461
|
-
"",
|
|
8462
|
-
"- `full` \u2014 audit every requirement document under",
|
|
8463
|
-
" `<REQUIREMENTS_ROOT>` across all categories",
|
|
8464
|
-
"- `category:<slug>` \u2014 audit one category directory (e.g.,",
|
|
8465
|
-
" `category:functional` audits every FR)",
|
|
8466
|
-
"- `doc:<path>` \u2014 audit one specific requirement file",
|
|
8467
|
-
"- `check:<n>[,<n>...]` \u2014 run one or more checks (1\u201311) across the",
|
|
8468
|
-
" documents in scope (e.g., `check:4` runs cross-reference",
|
|
8469
|
-
" integrity only)",
|
|
8470
|
-
"",
|
|
8471
|
-
"Optional extensions in the issue body:",
|
|
8472
|
-
"",
|
|
8473
|
-
"- `output: <path>` \u2014 override the default report path",
|
|
8474
|
-
"- `requirements-root: <path>` \u2014 override `<REQUIREMENTS_ROOT>`",
|
|
8475
|
-
"- `targets: <glob>` \u2014 restrict the document set with a glob",
|
|
8476
|
-
" pattern relative to `<REQUIREMENTS_ROOT>`",
|
|
8477
|
-
"",
|
|
8478
|
-
"## Default Paths",
|
|
8479
|
-
"",
|
|
8480
|
-
"If the project has no override in `docs/project-context.md` or",
|
|
8481
|
-
"`agentConfig.rules`, outputs land under:",
|
|
8482
|
-
"",
|
|
8483
|
-
"- `docs/research/reviews/review-<scope>-YYYY-MM-DD.md` \u2014 the",
|
|
8484
|
-
" review report",
|
|
8485
|
-
"- `docs/research/reviews/review-<scope>-YYYY-MM-DD-verify.py` \u2014",
|
|
8486
|
-
" the Python verification script (only for audits >10 documents)",
|
|
8487
|
-
"",
|
|
8488
|
-
"## Steps",
|
|
8489
|
-
"",
|
|
8490
|
-
"1. Create a `req:review` issue with `type:requirement`,",
|
|
8491
|
-
" `priority:medium`, and `status:ready`. Body must include the",
|
|
8492
|
-
" scope, the requirements root (or accept the default), and the",
|
|
8493
|
-
" output path.",
|
|
8494
|
-
"2. Execute the review phase of the requirements-reviewer agent.",
|
|
8495
|
-
"3. The agent runs the 11-check audit, writes a structured report",
|
|
8496
|
-
" grouped by Critical / Warning / Info, files follow-up issues",
|
|
8497
|
-
" for actionable findings, and comments on the `req:review`",
|
|
8498
|
-
" issue with the summary.",
|
|
8499
|
-
"",
|
|
8500
|
-
"## Audits >10 Documents",
|
|
8501
|
-
"",
|
|
8502
|
-
"For audits covering more than 10 documents, the agent writes a",
|
|
8503
|
-
"Python verification script alongside the report and uses its",
|
|
8504
|
-
"output as the basis for the audit. The script is read-only and",
|
|
8505
|
-
"idempotent \u2014 it can be re-run after fixes land to confirm",
|
|
8506
|
-
"remediation. The script is generated per-audit; it is not shipped",
|
|
8507
|
-
"as a static asset.",
|
|
8508
|
-
"",
|
|
8509
|
-
"## Output",
|
|
8510
|
-
"",
|
|
8511
|
-
"- One review report under `<REVIEW_REPORTS_ROOT>` grouped by",
|
|
8512
|
-
" Critical / Warning / Info severity",
|
|
8513
|
-
"- One verification script under `<REVIEW_REPORTS_ROOT>` (only",
|
|
8514
|
-
" for audits >10 documents)",
|
|
8515
|
-
"- Follow-up GitHub issues for every Critical and Warning finding,",
|
|
8516
|
-
" carrying the appropriate phase label (`req:write`, `req:trace`,",
|
|
8517
|
-
" or `req:scan`) for the downstream agent that should act",
|
|
8518
|
-
"- A summary comment on the originating `req:review` issue"
|
|
8519
|
-
].join("\n")
|
|
8520
|
-
};
|
|
8521
|
-
var requirementsReviewerBundle = {
|
|
8522
|
-
name: "requirements-reviewer",
|
|
8523
|
-
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.",
|
|
8524
|
-
appliesWhen: () => true,
|
|
8525
|
-
rules: [
|
|
8526
|
-
{
|
|
8527
|
-
name: "requirements-reviewer-workflow",
|
|
8528
|
-
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.",
|
|
8529
|
-
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
8530
|
-
content: [
|
|
8531
|
-
"# Requirements Reviewer Workflow",
|
|
8532
|
-
"",
|
|
8533
|
-
"Use `/review-requirements <scope>` to audit existing requirement",
|
|
8534
|
-
"documents. The reviewer runs in a single phase tracked by a",
|
|
8535
|
-
"GitHub issue labeled `req:review`. Issues also carry",
|
|
8536
|
-
"`type:requirement` (declared by the upstream",
|
|
8537
|
-
"`requirements-analyst` bundle).",
|
|
8538
|
-
"",
|
|
8539
|
-
"The pipeline produces **review reports and follow-up issues** \u2014",
|
|
8540
|
-
"it never edits requirement documents, capability models, or",
|
|
8541
|
-
"research notes. Authoring is the responsibility of the",
|
|
8542
|
-
"`requirements-writer` (requirement docs) and `bcm-writer`",
|
|
8543
|
-
"(capability models) bundles; gap discovery is the responsibility",
|
|
8544
|
-
"of the `requirements-analyst` bundle. The reviewer never opens",
|
|
8545
|
-
"`req:scan`, `req:draft`, `req:trace`, `req:write`, or `bcm:*`",
|
|
8546
|
-
"issues directly \u2014 instead it files follow-up issues with the",
|
|
8547
|
-
"appropriate phase label (`req:write`, `req:trace`, or",
|
|
8548
|
-
"`req:scan`) for the downstream agent to pick up.",
|
|
8549
|
-
"",
|
|
8550
|
-
"Four review scopes are supported: `full` (every document),",
|
|
8551
|
-
"`category:<slug>` (one category directory), `doc:<path>` (one",
|
|
8552
|
-
"specific document), and `check:<n>` (one or more of the 11",
|
|
8553
|
-
"checks across the documents in scope).",
|
|
8554
|
-
"",
|
|
8555
|
-
"**Soft dependency on the `requirements-writer` bundle.** The",
|
|
8556
|
-
"reviewer reads category templates from",
|
|
8557
|
-
"`.claude/skills/write-requirement/_references/templates/`,",
|
|
8558
|
-
"which is shipped by the `requirements-writer` bundle. Projects",
|
|
8559
|
-
"that disable the writer bundle but keep the reviewer must",
|
|
8560
|
-
"supply equivalent templates at the same path.",
|
|
8561
|
-
"",
|
|
8562
|
-
"For audits covering more than 10 documents, the reviewer writes",
|
|
8563
|
-
"a read-only Python verification script alongside the report and",
|
|
8564
|
-
"uses its output as the basis for findings \u2014 manual review of",
|
|
8565
|
-
"large document sets always misses broken links.",
|
|
8566
|
-
"",
|
|
8567
|
-
"See the `requirements-reviewer` agent definition for full",
|
|
8568
|
-
"workflow details, configurable paths, the 11-check catalog, the",
|
|
8569
|
-
"severity ladder, and reporting format."
|
|
8570
|
-
].join("\n"),
|
|
8571
|
-
platforms: {
|
|
8572
|
-
cursor: { exclude: true }
|
|
8573
|
-
},
|
|
8574
|
-
tags: ["workflow"]
|
|
8575
|
-
}
|
|
8576
|
-
],
|
|
8577
|
-
skills: [reviewRequirementsSkill],
|
|
8578
|
-
subAgents: [requirementsReviewerSubAgent],
|
|
8579
|
-
labels: [
|
|
8580
|
-
{
|
|
8581
|
-
name: "req:review",
|
|
8582
|
-
color: "FBCA04",
|
|
8583
|
-
description: "Phase: audit existing requirement documents using the requirements-reviewer skill"
|
|
8584
|
-
}
|
|
8585
|
-
]
|
|
8586
|
-
};
|
|
7827
|
+
// src/agent/bundles/requirements-taxonomy.ts
|
|
7828
|
+
var REQUIREMENTS_TAXONOMY_TABLE_SECTION = [
|
|
7829
|
+
"## The 11-Category Taxonomy",
|
|
7830
|
+
"",
|
|
7831
|
+
"All requirements follow the BIZBOK-aligned 11-category taxonomy",
|
|
7832
|
+
"below. Getting requirements into the right category matters because",
|
|
7833
|
+
"it determines which template applies, which standards inform it, and",
|
|
7834
|
+
"how it traces to other requirements.",
|
|
7835
|
+
"",
|
|
7836
|
+
"| Category | Prefix | Directory (default) | Question it answers |",
|
|
7837
|
+
"|----------|--------|---------------------|---------------------|",
|
|
7838
|
+
"| Business Requirements | BR | `business/` | **Why** are we building this? What business value does it deliver? |",
|
|
7839
|
+
"| Functional Requirements | FR | `functional/` | **What** does the system do? What is the user-visible behavior? |",
|
|
7840
|
+
"| Non-Functional Requirements | NFR | `non-functional/` | **How well** must the system perform? What quality bar must it meet? |",
|
|
7841
|
+
"| Technical Requirements | TR | `technical/` | **What technology** are we using, and why that one? |",
|
|
7842
|
+
"| Architectural Decisions | ADR | `architectural-decisions/` | **What structural decision** are we making, and what are the trade-offs? |",
|
|
7843
|
+
"| Security & Compliance | SEC | `security/` | **What must we protect**, and what rules govern that protection? |",
|
|
7844
|
+
"| Data Requirements | DR | `data/` | **What data** do we store, how long, and how do we recover it? |",
|
|
7845
|
+
"| Integration Requirements | INT | `integration/` | **What external systems** do we connect to, and how? |",
|
|
7846
|
+
"| Operational Requirements | OPS | `operational/` | **How do we deploy, monitor, and respond** to incidents? |",
|
|
7847
|
+
"| UX Requirements | UX | `ux/` | **How must the interface look, feel, and behave** for users? |",
|
|
7848
|
+
"| Multi-Tenancy & Licensing | MT | `multi-tenancy/` | **How do we isolate tenants, gate features, and meter usage?** |",
|
|
7849
|
+
"",
|
|
7850
|
+
"All requirement documents live under `<REQUIREMENTS_ROOT>` in the",
|
|
7851
|
+
"category directory shown above. Directory names are defaults \u2014",
|
|
7852
|
+
"consuming projects may rename them, but the prefixes are universal."
|
|
7853
|
+
];
|
|
7854
|
+
var REQUIREMENTS_TAXONOMY_DISAMBIGUATION_SECTION = [
|
|
7855
|
+
"- **SEC vs NFR:** Protecting data, enforcing access control, or",
|
|
7856
|
+
" meeting a regulation \u2192 SEC. System performance, uptime, or",
|
|
7857
|
+
' scalability \u2192 NFR. "99.9% uptime" is NFR; "audit logs for all',
|
|
7858
|
+
' admin actions" is SEC.',
|
|
7859
|
+
'- **TR vs ADR:** A TR pins down a specific technology choice ("use',
|
|
7860
|
+
' PostgreSQL 16+"). An ADR records a structural decision with',
|
|
7861
|
+
' context, trade-offs, and alternatives ("why row-level isolation',
|
|
7862
|
+
' over schema-per-tenant"). TRs often follow from ADRs.',
|
|
7863
|
+
"- **FR vs INT:** What the user experiences \u2192 FR. How two systems",
|
|
7864
|
+
' communicate \u2192 INT. "User can pay with a credit card" is FR;',
|
|
7865
|
+
' "Stripe Checkout API integration for payment processing" is INT.',
|
|
7866
|
+
"- **DR vs SEC:** What data exists, how long we keep it, and how we",
|
|
7867
|
+
" recover it \u2192 DR. Who can access it and how it's protected \u2192 SEC.",
|
|
7868
|
+
" These often cross-reference each other.",
|
|
7869
|
+
"- **NFR vs OPS:** A measurable target the system must meet \u2192 NFR.",
|
|
7870
|
+
' The tooling and processes to run the system \u2192 OPS. "p99 latency',
|
|
7871
|
+
' < 200ms" is NFR; "Datadog APM for latency monitoring" is OPS.'
|
|
7872
|
+
];
|
|
7873
|
+
var REQUIREMENTS_TIER_TABLE_SECTION = [
|
|
7874
|
+
"| Tier | Slug | When to use |",
|
|
7875
|
+
"|------|------|-------------|",
|
|
7876
|
+
"| **Platform** | `platform` | Core platform services \u2014 APIs, tenant isolation, auth, event bus, shared infrastructure |",
|
|
7877
|
+
"| **Industry** | `industry` | Vertical-specific capabilities not every tenant needs |",
|
|
7878
|
+
"| **Customer Workflow** | `customer-workflow` | Business logic tenants configure within the platform \u2014 approval chains, notification rules, intake processes |",
|
|
7879
|
+
"| **Consumer Application** | `consumer-app` | UI/UX and integrations in external front-ends/systems consuming the platform's APIs |"
|
|
7880
|
+
];
|
|
8587
7881
|
|
|
8588
7882
|
// src/agent/bundles/requirements-writer.ts
|
|
8589
7883
|
var TEMPLATE_BR = `---
|
|
@@ -10413,6 +9707,14 @@ A practical template for software architecture documentation. Influenced the sep
|
|
|
10413
9707
|
|
|
10414
9708
|
Simon Brown's approach to visualizing software architecture at four levels of abstraction: Context, Container, Component, Code. Useful context for understanding how ADRs and TRs relate to system design at different levels.
|
|
10415
9709
|
`;
|
|
9710
|
+
var WRITE_REQUIREMENT_SKILL_NAME = "write-requirement";
|
|
9711
|
+
var WRITE_REQUIREMENT_REFERENCES_ROOT = `.claude/skills/${WRITE_REQUIREMENT_SKILL_NAME}/_references`;
|
|
9712
|
+
var REQUIREMENTS_WRITER_PATHS = {
|
|
9713
|
+
/** Directory containing the 13 category templates (trailing slash). */
|
|
9714
|
+
templatesRoot: `${WRITE_REQUIREMENT_REFERENCES_ROOT}/templates/`,
|
|
9715
|
+
/** The standards-and-frameworks reference document. */
|
|
9716
|
+
standardsRef: `${WRITE_REQUIREMENT_REFERENCES_ROOT}/standards-and-frameworks.md`
|
|
9717
|
+
};
|
|
10416
9718
|
var REQUIREMENTS_WRITER_REFERENCE_FILES = [
|
|
10417
9719
|
{ path: "_references/templates/_template-BR.md", content: TEMPLATE_BR },
|
|
10418
9720
|
{ path: "_references/templates/_template-FR.md", content: TEMPLATE_FR },
|
|
@@ -10440,24 +9742,757 @@ var REQUIREMENTS_WRITER_REFERENCE_FILES = [
|
|
|
10440
9742
|
];
|
|
10441
9743
|
var requirementsWriterSubAgent = {
|
|
10442
9744
|
name: "requirements-writer",
|
|
10443
|
-
description: "Writes formal requirement documents (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT) from upstream proposals using the 11-category taxonomy, the four-tier classification, and the decision-authority rules (direct-write vs. propose-only ADR/TR). Handles one req:write issue per session. Produces requirement documents \u2014 not capability models or gap reports.",
|
|
9745
|
+
description: "Writes formal requirement documents (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT) from upstream proposals using the 11-category taxonomy, the four-tier classification, and the decision-authority rules (direct-write vs. propose-only ADR/TR). Handles one req:write issue per session. Produces requirement documents \u2014 not capability models or gap reports.",
|
|
9746
|
+
model: AGENT_MODEL.POWERFUL,
|
|
9747
|
+
maxTurns: 80,
|
|
9748
|
+
platforms: { cursor: { exclude: true } },
|
|
9749
|
+
prompt: [
|
|
9750
|
+
"# Requirements Writer Agent",
|
|
9751
|
+
"",
|
|
9752
|
+
"You author formal requirement documents using the 11-category",
|
|
9753
|
+
"taxonomy (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT) and the",
|
|
9754
|
+
"four-tier architectural classification (Platform, Industry, Customer",
|
|
9755
|
+
"Workflow, Consumer Application). Each session handles exactly **one**",
|
|
9756
|
+
"`req:write` issue and writes exactly **one** requirement document.",
|
|
9757
|
+
"",
|
|
9758
|
+
"This agent produces **requirement documents only** \u2014 capability",
|
|
9759
|
+
"models are written by the `bcm-writer` agent and requirement-gap",
|
|
9760
|
+
"discovery is the responsibility of the `requirements-analyst` agent.",
|
|
9761
|
+
"Keep this boundary clean: never open `req:scan`, `req:draft`, or",
|
|
9762
|
+
"`bcm:*` issues from this pipeline.",
|
|
9763
|
+
"",
|
|
9764
|
+
"Follow your project's shared agent conventions (`AGENTS.md`,",
|
|
9765
|
+
"`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
|
|
9766
|
+
"",
|
|
9767
|
+
"---",
|
|
9768
|
+
"",
|
|
9769
|
+
...PROJECT_CONTEXT_READER_SECTION,
|
|
9770
|
+
"## Design Principles",
|
|
9771
|
+
"",
|
|
9772
|
+
"1. **One requirement per session.** Each `req:write` issue maps to a",
|
|
9773
|
+
" single requirement document. Never write two documents in one",
|
|
9774
|
+
" session and never start a second issue.",
|
|
9775
|
+
"2. **Templates are authoritative.** Every category has a template",
|
|
9776
|
+
" under `<TEMPLATES_ROOT>`. Use it verbatim \u2014 do not invent new",
|
|
9777
|
+
" sections or reorder existing ones. A section that does not apply",
|
|
9778
|
+
" gets `Not applicable \u2014 <reason>` rather than being omitted.",
|
|
9779
|
+
"3. **Decision authority is non-negotiable.** Direct-write categories",
|
|
9780
|
+
" ship as `Status: Draft`. ADR and TR documents ship as",
|
|
9781
|
+
" `Status: Proposed` with a Recommendation that frames a human",
|
|
9782
|
+
" decision \u2014 never decide for the human.",
|
|
9783
|
+
"4. **Trace upstream.** Every requirement links back to the proposal",
|
|
9784
|
+
" that produced it, the source document(s) cited in that proposal,",
|
|
9785
|
+
" and the upstream BCM capability or business need it serves.",
|
|
9786
|
+
"5. **Cite, don't invent.** When the proposal does not supply a",
|
|
9787
|
+
" stakeholder, metric, threat model entry, or technology option,",
|
|
9788
|
+
" write `TODO:` and flag the issue with `status:needs-attention`",
|
|
9789
|
+
" rather than fabricating content.",
|
|
9790
|
+
"",
|
|
9791
|
+
"---",
|
|
9792
|
+
"",
|
|
9793
|
+
"## Configurable Paths",
|
|
9794
|
+
"",
|
|
9795
|
+
"The pipeline uses these placeholders. Consuming projects override the",
|
|
9796
|
+
"defaults by passing paths in the `/write-requirement` skill",
|
|
9797
|
+
"invocation, by recording overrides in `docs/project-context.md`, or",
|
|
9798
|
+
"by extending this rule in their own `agentConfig.rules`.",
|
|
9799
|
+
"",
|
|
9800
|
+
"| Placeholder | Meaning | Default |",
|
|
9801
|
+
"|-------------|---------|---------|",
|
|
9802
|
+
"| `<REQUIREMENTS_ROOT>` | Root folder for final requirement documents | `docs/requirements/` |",
|
|
9803
|
+
"| `<RESEARCH_REQUIREMENTS_ROOT>` | Where the upstream `requirements-analyst` writes proposals | `docs/research/requirements/` |",
|
|
9804
|
+
`| \`<TEMPLATES_ROOT>\` | Where the category templates ship (set automatically by this bundle) | \`${REQUIREMENTS_WRITER_PATHS.templatesRoot}\` |`,
|
|
9805
|
+
`| \`<STANDARDS_REF>\` | Standards & frameworks reference document | \`${REQUIREMENTS_WRITER_PATHS.standardsRef}\` |`,
|
|
9806
|
+
"| `<PREFIX>` | Project-specific requirement ID prefix | none \u2014 requirement IDs use the category prefix (`BR`, `FR`, \u2026) unless `docs/project-context.md` defines a project prefix |",
|
|
9807
|
+
"",
|
|
9808
|
+
"If `docs/project-context.md` specifies a different requirements tree,",
|
|
9809
|
+
"prefer that. Otherwise fall back to the defaults above.",
|
|
9810
|
+
"",
|
|
9811
|
+
"---",
|
|
9812
|
+
"",
|
|
9813
|
+
...REQUIREMENTS_TAXONOMY_TABLE_SECTION,
|
|
9814
|
+
"",
|
|
9815
|
+
"### Disambiguation Rules",
|
|
9816
|
+
"",
|
|
9817
|
+
"Apply these rules when deciding where a requirement belongs:",
|
|
9818
|
+
"",
|
|
9819
|
+
...REQUIREMENTS_TAXONOMY_DISAMBIGUATION_SECTION,
|
|
9820
|
+
"",
|
|
9821
|
+
"---",
|
|
9822
|
+
"",
|
|
9823
|
+
"## Architectural Tiers",
|
|
9824
|
+
"",
|
|
9825
|
+
"Every requirement also belongs to one of four architectural tiers.",
|
|
9826
|
+
'Tier is **orthogonal** to category \u2014 category answers "what kind"',
|
|
9827
|
+
'while tier answers "where in the architecture." The tier names below',
|
|
9828
|
+
"are the bundle defaults; consuming projects may rename or reduce the",
|
|
9829
|
+
"tier set in their own `docs/project-context.md`.",
|
|
9830
|
+
"",
|
|
9831
|
+
...REQUIREMENTS_TIER_TABLE_SECTION,
|
|
9832
|
+
"",
|
|
9833
|
+
"Tier is a **required metadata field**. Set it in the Metadata table",
|
|
9834
|
+
"of every requirement document and apply the matching `tier:*` issue",
|
|
9835
|
+
"label (`tier:platform`, `tier:industry`, `tier:customer-workflow`,",
|
|
9836
|
+
"or `tier:consumer-app`).",
|
|
9837
|
+
"",
|
|
9838
|
+
"**Customer field (optional).** When the proposal originated from or",
|
|
9839
|
+
"applies to a specific customer, set the `Customer` field in the",
|
|
9840
|
+
"Metadata table. Optional for Platform/Industry tiers, expected for",
|
|
9841
|
+
"Customer Workflow / Consumer Application tiers when the project",
|
|
9842
|
+
"tracks customer profiles.",
|
|
9843
|
+
"",
|
|
9844
|
+
"**Implementor field (tier-specific).** For Customer Workflow and",
|
|
9845
|
+
"Consumer Application tiers, set the `Implementor` field (Consortium",
|
|
9846
|
+
"Member / Customer / TBD) when the project tracks that distinction.",
|
|
9847
|
+
"Skip the field entirely if it does not apply to your project.",
|
|
9848
|
+
"",
|
|
9849
|
+
"**Cross-tier traceability.** Higher-tier requirements must link to",
|
|
9850
|
+
"lower-tier requirements they depend on using `Depends on (cross-tier)`",
|
|
9851
|
+
"links in the Traceability section. For example, a Consumer",
|
|
9852
|
+
"Application FR for an intake portal must trace to the Platform INT",
|
|
9853
|
+
"for the API it consumes.",
|
|
9854
|
+
"",
|
|
9855
|
+
"---",
|
|
9856
|
+
"",
|
|
9857
|
+
"## Decision Authority Rules",
|
|
9858
|
+
"",
|
|
9859
|
+
"**This is the most important section.** Not all categories are",
|
|
9860
|
+
"treated equally. The core principle is: **requirements that describe",
|
|
9861
|
+
"*what* and *why* get written directly; decisions about *how* and",
|
|
9862
|
+
"*with what* are deferred to humans.**",
|
|
9863
|
+
"",
|
|
9864
|
+
"### Write Directly (status: `Draft`)",
|
|
9865
|
+
"",
|
|
9866
|
+
"These categories describe business needs, user behavior, quality",
|
|
9867
|
+
"targets, security posture, and user experience. The writer has full",
|
|
9868
|
+
"authority to produce these documents:",
|
|
9869
|
+
"",
|
|
9870
|
+
"- **BR** \u2014 Business Requirements",
|
|
9871
|
+
"- **FR** \u2014 Functional Requirements",
|
|
9872
|
+
"- **NFR** \u2014 Non-Functional Requirements",
|
|
9873
|
+
"- **SEC** \u2014 Security & Compliance",
|
|
9874
|
+
"- **UX** \u2014 UX Requirements",
|
|
9875
|
+
"",
|
|
9876
|
+
"### Write with Partial Deferral",
|
|
9877
|
+
"",
|
|
9878
|
+
"These categories contain a mix of *what* (write directly) and *how*",
|
|
9879
|
+
"(defer). Write the requirement portions directly but defer",
|
|
9880
|
+
"technology/tooling selections:",
|
|
9881
|
+
"",
|
|
9882
|
+
"- **DR** \u2014 Write data models, retention policies, and classification",
|
|
9883
|
+
" directly. When backup strategy or storage technology must be",
|
|
9884
|
+
" specified, create a `Proposed` ADR or TR instead of choosing.",
|
|
9885
|
+
"- **MT** \u2014 Write tenant isolation requirements and metering",
|
|
9886
|
+
" dimensions directly. When the isolation *model* must be chosen",
|
|
9887
|
+
" (row-level vs schema-per-tenant vs database-per-tenant), create a",
|
|
9888
|
+
" `Proposed` ADR instead of choosing.",
|
|
9889
|
+
"- **INT** \u2014 Write the integration shape, direction, error handling",
|
|
9890
|
+
" strategy, and SLA expectations directly. When the specific",
|
|
9891
|
+
" provider must be selected, create a `Proposed` TR/ADR instead.",
|
|
9892
|
+
"- **OPS** \u2014 Write operational requirements (monitoring needs,",
|
|
9893
|
+
" incident response, deployment strategy) directly. When specific",
|
|
9894
|
+
" tooling must be selected, create a `Proposed` TR/ADR instead.",
|
|
9895
|
+
"",
|
|
9896
|
+
"### Propose Only (status: `Proposed`, pending human decision)",
|
|
9897
|
+
"",
|
|
9898
|
+
"These categories represent technology and architecture decisions",
|
|
9899
|
+
"that humans must make. Produce complete documents with all the",
|
|
9900
|
+
"information needed for the decision, but **do not make the decision",
|
|
9901
|
+
"itself**.",
|
|
9902
|
+
"",
|
|
9903
|
+
"- **ADR** \u2014 Write the full document following the ADR template:",
|
|
9904
|
+
" 1. **Context** \u2014 forces at play, constraints, what prompted the",
|
|
9905
|
+
" decision",
|
|
9906
|
+
' 2. **Decision** \u2014 set to: *"Pending human review. See',
|
|
9907
|
+
' Recommendation below."*',
|
|
9908
|
+
" 3. **Alternatives Considered** \u2014 every viable option with",
|
|
9909
|
+
" equal-depth analysis. Each gets a description, pros, and cons.",
|
|
9910
|
+
" Do not shortchange options you don't prefer.",
|
|
9911
|
+
" 4. **Recommendation** \u2014 state which option you recommend, *why*",
|
|
9912
|
+
" it's the best fit for the context, and what trade-offs are",
|
|
9913
|
+
" accepted. The reasoning must be specific to this project's",
|
|
9914
|
+
" situation \u2014 not generic.",
|
|
9915
|
+
" 5. **Consequences** \u2014 positive, negative, and neutral consequences",
|
|
9916
|
+
" of the recommended option",
|
|
9917
|
+
" 6. Set status to `Proposed`. Add an open item flagging that a",
|
|
9918
|
+
" human decision is required before dependent requirements can",
|
|
9919
|
+
" proceed.",
|
|
9920
|
+
"",
|
|
9921
|
+
"- **TR** \u2014 Write the full document following the TR template:",
|
|
9922
|
+
' 1. **Technology Choice** \u2014 set to: *"Pending human review. See',
|
|
9923
|
+
' Recommendation below."*',
|
|
9924
|
+
" 2. **Alternatives Considered** \u2014 every viable technology option",
|
|
9925
|
+
" with description, pros, cons, license, and maturity assessment",
|
|
9926
|
+
" for each",
|
|
9927
|
+
" 3. **Recommendation** \u2014 state which technology you recommend,",
|
|
9928
|
+
" *why*, and what trade-offs are accepted",
|
|
9929
|
+
' 4. **Rationale** \u2014 set to: *"See Recommendation above. Awaiting',
|
|
9930
|
+
' human decision."*',
|
|
9931
|
+
" 5. Set status to `Proposed`. Add an open item flagging that a",
|
|
9932
|
+
" human decision is required.",
|
|
9933
|
+
"",
|
|
9934
|
+
"### How Deferral Works in Practice",
|
|
9935
|
+
"",
|
|
9936
|
+
"When writing a requirement that implies a technology choice:",
|
|
9937
|
+
"",
|
|
9938
|
+
"1. Write the requirement itself (FR, DR, INT, OPS, etc.) with full",
|
|
9939
|
+
" detail.",
|
|
9940
|
+
"2. Where the requirement needs a technology decision, add a note:",
|
|
9941
|
+
' *"Technology selection pending \u2014 see [ADR-NNN](../architectural-decisions/ADR-NNN-slug.md)"*.',
|
|
9942
|
+
"3. Create the corresponding ADR or TR as `Proposed` with options,",
|
|
9943
|
+
" pros/cons, and recommendation.",
|
|
9944
|
+
'4. In the ADR/TR open items, add: *"Human decision required.',
|
|
9945
|
+
' Dependent requirements: [list]"*.',
|
|
9946
|
+
"5. In the original requirement's open items, add a cross-reference:",
|
|
9947
|
+
' *"Blocked by [ADR-NNN](../architectural-decisions/ADR-NNN-slug.md) \u2014',
|
|
9948
|
+
' technology selection pending human review."*',
|
|
9949
|
+
"",
|
|
9950
|
+
"This creates a clear chain: the requirement is understood, the",
|
|
9951
|
+
"decision is framed with all necessary information, and the",
|
|
9952
|
+
"dependency is tracked in both directions.",
|
|
9953
|
+
"",
|
|
9954
|
+
"---",
|
|
9955
|
+
"",
|
|
9956
|
+
"## File Naming Convention",
|
|
9957
|
+
"",
|
|
9958
|
+
"Every requirement file follows this pattern:",
|
|
9959
|
+
"",
|
|
9960
|
+
"```",
|
|
9961
|
+
"{PREFIX}-{NNN}-{slug}.md",
|
|
9962
|
+
"```",
|
|
9963
|
+
"",
|
|
9964
|
+
"- **PREFIX** \u2014 category abbreviation (`BR`, `FR`, `NFR`, `TR`,",
|
|
9965
|
+
" `ADR`, `SEC`, `DR`, `INT`, `OPS`, `UX`, `MT`). If the project",
|
|
9966
|
+
" declares a project-wide prefix in `docs/project-context.md`, use",
|
|
9967
|
+
" it instead.",
|
|
9968
|
+
"- **NNN** \u2014 three-digit sequential number (001, 002, 012). Always",
|
|
9969
|
+
" check the target category directory under `<REQUIREMENTS_ROOT>`",
|
|
9970
|
+
" for the next available number before writing.",
|
|
9971
|
+
"- **slug** \u2014 lowercase kebab-case descriptive name.",
|
|
9972
|
+
"",
|
|
9973
|
+
"Examples: `FR-001-user-registration.md`,",
|
|
9974
|
+
"`ADR-003-database-selection.md`,",
|
|
9975
|
+
"`SEC-001-authentication-framework.md`.",
|
|
9976
|
+
"",
|
|
9977
|
+
"---",
|
|
9978
|
+
"",
|
|
9979
|
+
"## Frontmatter",
|
|
9980
|
+
"",
|
|
9981
|
+
"Every `.md` requirement file must begin with a YAML frontmatter",
|
|
9982
|
+
"block. The minimum required fields are `title` and `description`:",
|
|
9983
|
+
"",
|
|
9984
|
+
"```markdown",
|
|
9985
|
+
"---",
|
|
9986
|
+
'title: "FR-001: User Registration"',
|
|
9987
|
+
'description: "Functional requirement for the user registration workflow."',
|
|
9988
|
+
"tier: platform",
|
|
9989
|
+
"---",
|
|
9990
|
+
"",
|
|
9991
|
+
"# FR-001: User Registration",
|
|
9992
|
+
"",
|
|
9993
|
+
"...",
|
|
9994
|
+
"```",
|
|
9995
|
+
"",
|
|
9996
|
+
"The `title` value must match the document's `# Heading` line.",
|
|
9997
|
+
"Titles containing colons must be wrapped in double quotes. The",
|
|
9998
|
+
"`tier` field must be one of `platform`, `industry`,",
|
|
9999
|
+
"`customer-workflow`, or `consumer-app` (use whatever tier slugs the",
|
|
10000
|
+
"project declares).",
|
|
10001
|
+
"",
|
|
10002
|
+
"### Optional traceability extensions",
|
|
10003
|
+
"",
|
|
10004
|
+
"Projects that publish requirements through Starlight, Astro, or a",
|
|
10005
|
+
"similar static-site generator may add structured traceability fields",
|
|
10006
|
+
"to frontmatter. One example: a `referencedIn.meetings[]` block that",
|
|
10007
|
+
"links the requirement back to a meeting transcript that informed it.",
|
|
10008
|
+
"These conventions are **optional** \u2014 adopt them only if your project",
|
|
10009
|
+
"already maintains the matching reverse-link structures.",
|
|
10010
|
+
"",
|
|
10011
|
+
"---",
|
|
10012
|
+
"",
|
|
10013
|
+
"## Status Lifecycle",
|
|
10014
|
+
"",
|
|
10015
|
+
"Every requirement has a status that tracks where it is in its",
|
|
10016
|
+
"lifecycle:",
|
|
10017
|
+
"",
|
|
10018
|
+
"| Status | Meaning |",
|
|
10019
|
+
"|---|---|",
|
|
10020
|
+
"| `Draft` | Initial capture, under discussion |",
|
|
10021
|
+
"| `Proposed` | Formally proposed, awaiting review \u2014 **used for ADR and TR documents pending human decision** |",
|
|
10022
|
+
"| `Accepted` | Approved and active |",
|
|
10023
|
+
"| `Implemented` | Fully delivered |",
|
|
10024
|
+
"| `Deprecated` | No longer applicable |",
|
|
10025
|
+
"| `Superseded` | Replaced by another requirement (link to successor) |",
|
|
10026
|
+
"",
|
|
10027
|
+
"---",
|
|
10028
|
+
"",
|
|
10029
|
+
"## Traceability",
|
|
10030
|
+
"",
|
|
10031
|
+
"Every requirement document must include a `## Traceability` section.",
|
|
10032
|
+
"Use relative markdown links with the requirement ID as link text.",
|
|
10033
|
+
"",
|
|
10034
|
+
"```markdown",
|
|
10035
|
+
"## Traceability",
|
|
10036
|
+
"",
|
|
10037
|
+
"- **Implements:** [BR-001](../business/BR-001-self-service-onboarding.md)",
|
|
10038
|
+
"- **Constrained by:** [NFR-001](../non-functional/NFR-001-api-response-times.md)",
|
|
10039
|
+
"- **Related:** [SEC-001](../security/SEC-001-authentication-framework.md)",
|
|
10040
|
+
"```",
|
|
10041
|
+
"",
|
|
10042
|
+
"### Link Types",
|
|
10043
|
+
"",
|
|
10044
|
+
"| Link Type | Meaning |",
|
|
10045
|
+
"|---|---|",
|
|
10046
|
+
"| **Implements** | This requirement realizes a higher-level requirement |",
|
|
10047
|
+
"| **Constrained by** | This requirement is bounded by another requirement |",
|
|
10048
|
+
"| **Supports** | This requirement contributes to but does not fully realize another |",
|
|
10049
|
+
"| **Supersedes** | This requirement replaces a deprecated one |",
|
|
10050
|
+
"| **Related** | Informational relationship |",
|
|
10051
|
+
"",
|
|
10052
|
+
"### Dependency Flow",
|
|
10053
|
+
"",
|
|
10054
|
+
"```",
|
|
10055
|
+
"Business Requirements (BR)",
|
|
10056
|
+
" -> justify epics and initiatives",
|
|
10057
|
+
"",
|
|
10058
|
+
"Functional (FR), Integration (INT), Multi-Tenancy (MT)",
|
|
10059
|
+
" -> decompose into feature work",
|
|
10060
|
+
"",
|
|
10061
|
+
"NFRs, Security (SEC), UX",
|
|
10062
|
+
" -> appear as acceptance criteria AND as standalone requirements",
|
|
10063
|
+
"",
|
|
10064
|
+
"Architectural Decisions (ADR)",
|
|
10065
|
+
" -> spawn implementation tasks and serve as context for TRs",
|
|
10066
|
+
"",
|
|
10067
|
+
"Technical (TR), Data (DR), Operational (OPS)",
|
|
10068
|
+
" -> drive infrastructure and platform work",
|
|
10069
|
+
"```",
|
|
10070
|
+
"",
|
|
10071
|
+
"---",
|
|
10072
|
+
"",
|
|
10073
|
+
"## Open Items",
|
|
10074
|
+
"",
|
|
10075
|
+
"Every requirement document must end with a `## Open Items` section",
|
|
10076
|
+
"(placed just above `## Revision History`). This section surfaces",
|
|
10077
|
+
"things that need human attention.",
|
|
10078
|
+
"",
|
|
10079
|
+
"### Priority Levels",
|
|
10080
|
+
"",
|
|
10081
|
+
"| Priority | Meaning |",
|
|
10082
|
+
"|---|---|",
|
|
10083
|
+
"| **P0 \u2014 Blocker** | Cannot proceed with implementation until resolved |",
|
|
10084
|
+
"| **P1 \u2014 High** | Significantly affects scope, security, or architecture |",
|
|
10085
|
+
"| **P2 \u2014 Medium** | Affects quality or completeness but doesn't block progress |",
|
|
10086
|
+
"| **P3 \u2014 Low** | Minor clarification, can be resolved asynchronously |",
|
|
10087
|
+
"",
|
|
10088
|
+
"### Subsection Types",
|
|
10089
|
+
"",
|
|
10090
|
+
"- **Identified Gaps** \u2014 Missing functionality, unhandled edge cases,",
|
|
10091
|
+
" incomplete aspects",
|
|
10092
|
+
"- **Follow-up Questions** \u2014 Ambiguities where intent cannot be",
|
|
10093
|
+
" confidently inferred",
|
|
10094
|
+
"- **Contradictions & Inconsistencies** \u2014 Conflicts between",
|
|
10095
|
+
" requirements, documentation, or stated goals",
|
|
10096
|
+
"",
|
|
10097
|
+
"Number each item within its subsection. Assign a priority. Call out",
|
|
10098
|
+
"interdependencies with open items in other documents using the",
|
|
10099
|
+
"format: `-> Depends on: [FR-001 Open Item #2](../functional/FR-001-slug.md#open-items)`.",
|
|
10100
|
+
"",
|
|
10101
|
+
"The `## Open Items` section is **not optional** \u2014 it appears in every",
|
|
10102
|
+
'document, even if a subsection is empty (write "None identified.").',
|
|
10103
|
+
"",
|
|
10104
|
+
"---",
|
|
10105
|
+
"",
|
|
10106
|
+
"## Reading the Templates and Standards Reference",
|
|
10107
|
+
"",
|
|
10108
|
+
"Before writing any requirement document:",
|
|
10109
|
+
"",
|
|
10110
|
+
"1. **Read the matching template** under `<TEMPLATES_ROOT>` for the",
|
|
10111
|
+
" category specified in the issue (`_template-FR.md`,",
|
|
10112
|
+
" `_template-ADR.md`, etc.). Templates are named",
|
|
10113
|
+
" `_template-{PREFIX}.md`. Every section in the template must",
|
|
10114
|
+
" appear in the final document.",
|
|
10115
|
+
"",
|
|
10116
|
+
"2. **Read `<STANDARDS_REF>`** if the category requires it (especially",
|
|
10117
|
+
" SEC, NFR, INT, ADR, TR). The reference covers OWASP ASVS, ISO",
|
|
10118
|
+
" 25010, BABOK, MADR, Enterprise Integration Patterns, WCAG, and",
|
|
10119
|
+
" related standards that ground the templates.",
|
|
10120
|
+
"",
|
|
10121
|
+
"Templates and the standards reference ship with this skill \u2014 they",
|
|
10122
|
+
"are the same files for every project that adopts the bundle.",
|
|
10123
|
+
"",
|
|
10124
|
+
"---",
|
|
10125
|
+
"",
|
|
10126
|
+
"## Maintaining the Registry Index",
|
|
10127
|
+
"",
|
|
10128
|
+
"Each category directory contains a `README.md` (or `_index.md`,",
|
|
10129
|
+
"depending on project convention) that lists every requirement in",
|
|
10130
|
+
"that category. **After writing any new requirement document, update",
|
|
10131
|
+
"the category index:**",
|
|
10132
|
+
"",
|
|
10133
|
+
"1. Read the index file in the same directory as the new requirement.",
|
|
10134
|
+
"2. Add a row to the requirements table with: ID (linked to the",
|
|
10135
|
+
" file), Title, Status, Priority, Last Updated date.",
|
|
10136
|
+
"3. Insert the row in sequence-number order.",
|
|
10137
|
+
"4. If the index contains a placeholder message, remove it.",
|
|
10138
|
+
"",
|
|
10139
|
+
"If the project has not seeded category READMEs yet, generate one",
|
|
10140
|
+
"from `_template-category-README.md` (shipped with this skill) and",
|
|
10141
|
+
"commit it alongside the requirement document.",
|
|
10142
|
+
"",
|
|
10143
|
+
"---",
|
|
10144
|
+
"",
|
|
10145
|
+
"## Agent Loop",
|
|
10146
|
+
"",
|
|
10147
|
+
"Run this loop exactly once per session. Never start a second issue.",
|
|
10148
|
+
"",
|
|
10149
|
+
"1. Claim one open `req:write` issue (also carries `type:requirement`",
|
|
10150
|
+
" and a `tier:*` label).",
|
|
10151
|
+
"2. Transition `status:ready` \u2192 `status:in-progress` and create the",
|
|
10152
|
+
" branch per your project's branch-naming convention.",
|
|
10153
|
+
"3. Execute the write phase below.",
|
|
10154
|
+
"4. Commit, push, open a PR, and close the issue per your project's",
|
|
10155
|
+
" PR workflow. Closing the PR transitions the issue to",
|
|
10156
|
+
" `status:done` per the standard label conventions.",
|
|
10157
|
+
"",
|
|
10158
|
+
"---",
|
|
10159
|
+
"",
|
|
10160
|
+
"## The `req:write` Phase",
|
|
10161
|
+
"",
|
|
10162
|
+
"**Goal:** Read the proposal that produced this issue, write a single",
|
|
10163
|
+
"requirement document under `<REQUIREMENTS_ROOT>`, and update the",
|
|
10164
|
+
"category index.",
|
|
10165
|
+
"",
|
|
10166
|
+
"**Budget:** Read the issue body, the named proposal file under",
|
|
10167
|
+
"`<RESEARCH_REQUIREMENTS_ROOT>`, the matching category template under",
|
|
10168
|
+
"`<TEMPLATES_ROOT>`, and `<STANDARDS_REF>` if the category needs it.",
|
|
10169
|
+
"Write one requirement document and one category-index update. No web",
|
|
10170
|
+
"searches.",
|
|
10171
|
+
"",
|
|
10172
|
+
"### Steps",
|
|
10173
|
+
"",
|
|
10174
|
+
"1. **Parse the issue.** The `req:write` issue body must include:",
|
|
10175
|
+
" - **Category** (`BR`/`FR`/`NFR`/`TR`/`ADR`/`SEC`/`DR`/`INT`/`OPS`/`UX`/`MT`)",
|
|
10176
|
+
" - **Tier** (`platform`/`industry`/`customer-workflow`/`consumer-app`)",
|
|
10177
|
+
" - **Output Path** under `<REQUIREMENTS_ROOT>/<category-dir>/<PREFIX>-<NNN>-<slug>.md`",
|
|
10178
|
+
" - **Inputs / Read** \u2014 the upstream proposals file and any source",
|
|
10179
|
+
" documents",
|
|
10180
|
+
" If any of these are missing or contradictory, comment on the",
|
|
10181
|
+
" issue, add `status:needs-attention`, and stop without writing.",
|
|
10182
|
+
"",
|
|
10183
|
+
"2. **Read the proposal.** Open the proposals file referenced in the",
|
|
10184
|
+
" issue inputs (under `<RESEARCH_REQUIREMENTS_ROOT>`). Find the",
|
|
10185
|
+
" specific proposal entry that matches this requirement's title and",
|
|
10186
|
+
" category. Treat the proposal as the authoritative source \u2014 do not",
|
|
10187
|
+
" invent fields it omits.",
|
|
10188
|
+
"",
|
|
10189
|
+
"3. **Read the matching template** under `<TEMPLATES_ROOT>` for the",
|
|
10190
|
+
" category. Read `<STANDARDS_REF>` if the category is SEC, NFR,",
|
|
10191
|
+
" INT, ADR, or TR \u2014 these depend on the standards reference for",
|
|
10192
|
+
" correct framing.",
|
|
10193
|
+
"",
|
|
10194
|
+
"4. **Pick the next sequence number.** Scan the target category",
|
|
10195
|
+
" directory under `<REQUIREMENTS_ROOT>` for existing files matching",
|
|
10196
|
+
" `{PREFIX}-NNN-*.md`. Use the next unused three-digit number.",
|
|
10197
|
+
"",
|
|
10198
|
+
"5. **Apply the decision-authority rules.** Default to `Status:",
|
|
10199
|
+
" Draft` for direct-write categories (BR, FR, NFR, SEC, UX). Set",
|
|
10200
|
+
" `Status: Proposed` for ADR and TR documents and frame the",
|
|
10201
|
+
" Recommendation section as a human decision. For DR/MT/INT/OPS",
|
|
10202
|
+
" categories that imply a technology choice, write the requirement",
|
|
10203
|
+
" directly but spin the technology decision off into a separate",
|
|
10204
|
+
" `Proposed` ADR or TR \u2014 record the cross-link in the Open Items",
|
|
10205
|
+
" section of both documents.",
|
|
10206
|
+
"",
|
|
10207
|
+
"6. **Write the document.** Fill every section in the template. For",
|
|
10208
|
+
" sections the proposal does not supply, write `TODO:` plus a brief",
|
|
10209
|
+
" note describing what input is needed, and add a corresponding",
|
|
10210
|
+
" `## Open Items` entry. Never leave a template section out.",
|
|
10211
|
+
"",
|
|
10212
|
+
"7. **Set frontmatter.** At minimum: `title`, `description`, `tier`.",
|
|
10213
|
+
" If the project declares optional frontmatter conventions in",
|
|
10214
|
+
" `docs/project-context.md` (such as `referencedIn.meetings[]`),",
|
|
10215
|
+
" honor them. Otherwise stop at the minimum.",
|
|
10216
|
+
"",
|
|
10217
|
+
"8. **Update the category index.** If the category directory has a",
|
|
10218
|
+
" `README.md` or `_index.md` registry, add a row for the new",
|
|
10219
|
+
" document in sequence order. If no index exists yet, generate one",
|
|
10220
|
+
" from `_template-category-README.md`.",
|
|
10221
|
+
"",
|
|
10222
|
+
"9. **Cross-link upstream.** Add `## Traceability` entries pointing",
|
|
10223
|
+
" to the proposals file (under `<RESEARCH_REQUIREMENTS_ROOT>`),",
|
|
10224
|
+
" the source documents the proposal cited, and any BCM capability",
|
|
10225
|
+
" the requirement supports.",
|
|
10226
|
+
"",
|
|
10227
|
+
"10. **Quality checks.** Before committing, verify:",
|
|
10228
|
+
" - [ ] Frontmatter has `title` and `description` (and `tier` if",
|
|
10229
|
+
" the project uses tier classification)",
|
|
10230
|
+
" - [ ] Title matches the `# Heading` line",
|
|
10231
|
+
" - [ ] File name follows `{PREFIX}-{NNN}-{slug}.md`",
|
|
10232
|
+
" - [ ] Status is `Draft` for direct-write categories or `Proposed`",
|
|
10233
|
+
" for ADR/TR",
|
|
10234
|
+
" - [ ] Every template section is present (use `TODO:` or `Not",
|
|
10235
|
+
" applicable \u2014 <reason>` for unfilled sections)",
|
|
10236
|
+
" - [ ] `## Traceability` exists with at least one upstream link",
|
|
10237
|
+
" - [ ] No technology decisions made in direct-write categories \u2014",
|
|
10238
|
+
" deferred to `Proposed` ADR/TR with cross-links in Open",
|
|
10239
|
+
" Items",
|
|
10240
|
+
" - [ ] `## Open Items` is present with Identified Gaps,",
|
|
10241
|
+
" Follow-up Questions, and Contradictions subsections",
|
|
10242
|
+
" - [ ] ADR/TR documents include a Recommendation section and an",
|
|
10243
|
+
" Open Item flagging the human decision required",
|
|
10244
|
+
" - [ ] Category index updated with a row for the new document",
|
|
10245
|
+
" - [ ] Tier value matches the issue's `tier:*` label",
|
|
10246
|
+
" - [ ] Cross-tier traceability entries exist where the document",
|
|
10247
|
+
" depends on or enables a different tier",
|
|
10248
|
+
"",
|
|
10249
|
+
"11. **Commit and push.** Use a `docs(<category>):` conventional",
|
|
10250
|
+
" commit message. The PR closes the `req:write` issue.",
|
|
10251
|
+
"",
|
|
10252
|
+
"---",
|
|
10253
|
+
"",
|
|
10254
|
+
"## Output Boundaries",
|
|
10255
|
+
"",
|
|
10256
|
+
"This agent writes **only** to:",
|
|
10257
|
+
"",
|
|
10258
|
+
"- `<REQUIREMENTS_ROOT>/<category-dir>/<PREFIX>-<NNN>-<slug>.md` \u2014 one",
|
|
10259
|
+
" requirement document per session",
|
|
10260
|
+
"- `<REQUIREMENTS_ROOT>/<category-dir>/README.md` (or `_index.md`) \u2014",
|
|
10261
|
+
" category index, one row appended per session",
|
|
10262
|
+
"- `<REQUIREMENTS_ROOT>/README.md` (or `_index.md`) \u2014 only if the",
|
|
10263
|
+
" top-level requirements README does not yet exist; generate from",
|
|
10264
|
+
" `_template-requirements-README.md` and stop",
|
|
10265
|
+
"",
|
|
10266
|
+
"The pipeline produces **requirement documents**. It does not write",
|
|
10267
|
+
"BCM capability models, people profiles, company profiles, software",
|
|
10268
|
+
"profiles, scan reports, or proposal files \u2014 those belong to",
|
|
10269
|
+
"specialized upstream/downstream agents.",
|
|
10270
|
+
"",
|
|
10271
|
+
"**Do NOT create:**",
|
|
10272
|
+
"- `req:scan`, `req:draft`, or `req:trace` issues \u2014 those belong to",
|
|
10273
|
+
" the `requirements-analyst` bundle",
|
|
10274
|
+
"- `bcm:*` issues \u2014 those belong to the `bcm-writer` bundle",
|
|
10275
|
+
"- `people:*`, `company:*`, `software:*`, `research:*`, or",
|
|
10276
|
+
" `industry:*` issues \u2014 those belong to their respective bundles",
|
|
10277
|
+
"",
|
|
10278
|
+
"If the proposal surfaces work that needs one of the above, comment",
|
|
10279
|
+
"on the `req:write` issue with the suggested follow-up and let a",
|
|
10280
|
+
"human route it.",
|
|
10281
|
+
"",
|
|
10282
|
+
"---",
|
|
10283
|
+
"",
|
|
10284
|
+
"## Coordination with Other Agents",
|
|
10285
|
+
"",
|
|
10286
|
+
"| Direction | Agent | What |",
|
|
10287
|
+
"|-----------|-------|------|",
|
|
10288
|
+
"| Upstream | `requirements-analyst` | Discovers gaps, drafts proposals, and creates `req:write` issues that this agent picks up |",
|
|
10289
|
+
"| Upstream | `bcm-writer` | Provides BCM capability documents that requirements trace back to via `## Traceability` links |",
|
|
10290
|
+
"| Peer | `meeting-analyst` | Provides meeting transcripts that may inform a requirement's traceability extensions (optional) |",
|
|
10291
|
+
"",
|
|
10292
|
+
"**File boundaries:** Reads `<RESEARCH_REQUIREMENTS_ROOT>` (proposals)",
|
|
10293
|
+
"and the source documents the proposals cite. Writes",
|
|
10294
|
+
"`<REQUIREMENTS_ROOT>` and the category index files. Never edits",
|
|
10295
|
+
"proposals, scan reports, BCM documents, or profiles.",
|
|
10296
|
+
"",
|
|
10297
|
+
"---",
|
|
10298
|
+
"",
|
|
10299
|
+
"## Rules",
|
|
10300
|
+
"",
|
|
10301
|
+
"- **One requirement per session.** Never write two documents in one",
|
|
10302
|
+
" session and never start a second issue.",
|
|
10303
|
+
"- **Templates are authoritative.** Use the shipped template verbatim",
|
|
10304
|
+
" for the category. Every template section must appear in the final",
|
|
10305
|
+
" document.",
|
|
10306
|
+
"- **Decision authority is non-negotiable.** Direct-write categories",
|
|
10307
|
+
" ship as `Draft`. ADR and TR ship as `Proposed` with a Recommendation",
|
|
10308
|
+
" framed for human decision. Mixed-deferral categories spin",
|
|
10309
|
+
" technology choices off into separate `Proposed` documents.",
|
|
10310
|
+
"- **Cite, don't invent.** When the proposal omits a stakeholder,",
|
|
10311
|
+
" metric, threat model entry, or technology option, write `TODO:` and",
|
|
10312
|
+
" flag the issue with `status:needs-attention`.",
|
|
10313
|
+
"- **Trace upstream.** Every requirement links back to its proposal,",
|
|
10314
|
+
" the source documents the proposal cited, and the BCM capability",
|
|
10315
|
+
" it supports (when applicable).",
|
|
10316
|
+
"- **Update the category index every time.** A requirement that",
|
|
10317
|
+
" exists as a file but is missing from its category index is",
|
|
10318
|
+
" invisible to anyone browsing the documentation tree.",
|
|
10319
|
+
"- **Write requirements, not capability models or gap reports.**",
|
|
10320
|
+
" Never open `req:scan`, `req:draft`, `req:trace`, or `bcm:*` issues",
|
|
10321
|
+
" from this pipeline."
|
|
10322
|
+
].join("\n")
|
|
10323
|
+
};
|
|
10324
|
+
var writeRequirementSkill = {
|
|
10325
|
+
name: WRITE_REQUIREMENT_SKILL_NAME,
|
|
10326
|
+
description: "Write one formal requirement document (BR / FR / NFR / TR / ADR / SEC / DR / INT / OPS / UX / MT) using the shipped category template and decision-authority rules. Picks up a req:write issue created by the upstream requirements-analyst pipeline (or kicked off ad hoc) and dispatches the requirements-writer agent.",
|
|
10327
|
+
disableModelInvocation: true,
|
|
10328
|
+
userInvocable: true,
|
|
10329
|
+
context: "fork",
|
|
10330
|
+
agent: "requirements-writer",
|
|
10331
|
+
platforms: { cursor: { exclude: true } },
|
|
10332
|
+
referenceFiles: REQUIREMENTS_WRITER_REFERENCE_FILES,
|
|
10333
|
+
instructions: [
|
|
10334
|
+
"# Write Requirement",
|
|
10335
|
+
"",
|
|
10336
|
+
"Write one formal requirement document using the 11-category taxonomy",
|
|
10337
|
+
"(BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT) and the",
|
|
10338
|
+
"decision-authority rules (direct-write vs. propose-only ADR/TR).",
|
|
10339
|
+
"Dispatches the `requirements-writer` agent.",
|
|
10340
|
+
"",
|
|
10341
|
+
"## Usage",
|
|
10342
|
+
"",
|
|
10343
|
+
"/write-requirement <category> <short-title>",
|
|
10344
|
+
"",
|
|
10345
|
+
"Where `<category>` is one of `BR`, `FR`, `NFR`, `TR`, `ADR`, `SEC`,",
|
|
10346
|
+
"`DR`, `INT`, `OPS`, `UX`, `MT`.",
|
|
10347
|
+
"",
|
|
10348
|
+
"Optional extensions in the issue body:",
|
|
10349
|
+
"- `tier: platform | industry | customer-workflow | consumer-app` \u2014",
|
|
10350
|
+
" the architectural tier (default: `platform`)",
|
|
10351
|
+
"- `prefix: <PROJECT_PREFIX>` \u2014 override the default category prefix",
|
|
10352
|
+
" with a project-specific one declared in `docs/project-context.md`",
|
|
10353
|
+
"- `customer: <link-or-slug>` \u2014 link the requirement to a customer",
|
|
10354
|
+
" profile (expected for Customer Workflow / Consumer Application",
|
|
10355
|
+
" tiers in projects that track customer profiles)",
|
|
10356
|
+
"- `proposal: <path>` \u2014 pin the upstream proposal file under",
|
|
10357
|
+
" `<RESEARCH_REQUIREMENTS_ROOT>` (default: derived from the issue",
|
|
10358
|
+
" context)",
|
|
10359
|
+
"- `output: <path>` \u2014 override the default Output Path",
|
|
10360
|
+
"",
|
|
10361
|
+
"## Default Paths",
|
|
10362
|
+
"",
|
|
10363
|
+
"If the project has no override in `docs/project-context.md` or",
|
|
10364
|
+
"`agentConfig.rules`, outputs land under:",
|
|
10365
|
+
"",
|
|
10366
|
+
"- `docs/requirements/<category-dir>/<PREFIX>-<NNN>-<slug>.md`",
|
|
10367
|
+
"- `docs/requirements/<category-dir>/README.md` (registry update)",
|
|
10368
|
+
"- `docs/requirements/README.md` (top-level README, generated on",
|
|
10369
|
+
" first use only)",
|
|
10370
|
+
"",
|
|
10371
|
+
"Templates and the standards reference ship with this skill under",
|
|
10372
|
+
"`_references/templates/` and `_references/standards-and-frameworks.md`.",
|
|
10373
|
+
"",
|
|
10374
|
+
"## Steps",
|
|
10375
|
+
"",
|
|
10376
|
+
"1. Create a `req:write` issue with `type:requirement`,",
|
|
10377
|
+
" `priority:medium`, `status:ready`, and the matching `tier:*` label.",
|
|
10378
|
+
" Body must include the category, tier, output path, and a pointer",
|
|
10379
|
+
" to the upstream proposal (or a direct user description if no",
|
|
10380
|
+
" proposals file exists).",
|
|
10381
|
+
"2. Execute the write phase of the requirements-writer agent.",
|
|
10382
|
+
"3. The agent writes one requirement document, updates the category",
|
|
10383
|
+
" index, opens a PR, and closes the issue.",
|
|
10384
|
+
"",
|
|
10385
|
+
"## Output",
|
|
10386
|
+
"",
|
|
10387
|
+
"- One requirement document under `<REQUIREMENTS_ROOT>` following the",
|
|
10388
|
+
" shipped category template, with `Status: Draft` for direct-write",
|
|
10389
|
+
" categories or `Status: Proposed` for ADR/TR",
|
|
10390
|
+
"- A category-index row pointing at the new document",
|
|
10391
|
+
"- (First-time only) a top-level requirements README derived from",
|
|
10392
|
+
" `_template-requirements-README.md`"
|
|
10393
|
+
].join("\n")
|
|
10394
|
+
};
|
|
10395
|
+
var requirementsWriterBundle = {
|
|
10396
|
+
name: "requirements-writer",
|
|
10397
|
+
description: "Requirements writer agent bundle. Authors formal requirement documents from upstream proposals using the 11-category taxonomy (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT), the four-tier classification, and decision-authority rules (direct-write vs. propose-only). Ships 13 templates plus a standards-and-frameworks reference.",
|
|
10398
|
+
appliesWhen: () => true,
|
|
10399
|
+
rules: [
|
|
10400
|
+
{
|
|
10401
|
+
name: "requirements-writer-workflow",
|
|
10402
|
+
description: "Describes the requirements-writer pipeline, the req:write phase label, the four tier:* labels, and the boundary with the upstream requirements-analyst and bcm-writer bundles.",
|
|
10403
|
+
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
10404
|
+
content: [
|
|
10405
|
+
"# Requirements Writer Workflow",
|
|
10406
|
+
"",
|
|
10407
|
+
"Use `/write-requirement <category> <short-title>` to author one",
|
|
10408
|
+
"formal requirement document. The writer runs in a single phase",
|
|
10409
|
+
"tracked by a GitHub issue labeled `req:write` plus the matching",
|
|
10410
|
+
"`tier:*` label. Issues also carry `type:requirement` (declared",
|
|
10411
|
+
"by the upstream `requirements-analyst` bundle).",
|
|
10412
|
+
"",
|
|
10413
|
+
"The pipeline produces **requirement documents only** \u2014 capability",
|
|
10414
|
+
"models are written by the `bcm-writer` agent and gap discovery is",
|
|
10415
|
+
"the responsibility of the `requirements-analyst` agent. The",
|
|
10416
|
+
"writer never opens `req:scan`, `req:draft`, `req:trace`, or",
|
|
10417
|
+
"`bcm:*` issues.",
|
|
10418
|
+
"",
|
|
10419
|
+
"Documents follow the 11-category taxonomy (BR, FR, NFR, TR, ADR,",
|
|
10420
|
+
"SEC, DR, INT, OPS, UX, MT) and the four-tier classification",
|
|
10421
|
+
"(Platform, Industry, Customer Workflow, Consumer Application).",
|
|
10422
|
+
"Templates and a standards-and-frameworks reference ship with the",
|
|
10423
|
+
"skill \u2014 they are the same files for every project that adopts",
|
|
10424
|
+
"the bundle.",
|
|
10425
|
+
"",
|
|
10426
|
+
"Decision-authority rules are non-negotiable: BR / FR / NFR /",
|
|
10427
|
+
"SEC / UX ship as `Status: Draft`; ADR and TR ship as",
|
|
10428
|
+
"`Status: Proposed` with a Recommendation framed for human",
|
|
10429
|
+
"decision; DR / MT / INT / OPS spin technology choices off into",
|
|
10430
|
+
"separate `Proposed` ADR or TR documents.",
|
|
10431
|
+
"",
|
|
10432
|
+
"See the `requirements-writer` agent definition for full workflow",
|
|
10433
|
+
"details, configurable paths, decision-authority rules, and",
|
|
10434
|
+
"phase-by-phase instructions."
|
|
10435
|
+
].join("\n"),
|
|
10436
|
+
platforms: {
|
|
10437
|
+
cursor: { exclude: true }
|
|
10438
|
+
},
|
|
10439
|
+
tags: ["workflow"]
|
|
10440
|
+
}
|
|
10441
|
+
],
|
|
10442
|
+
skills: [writeRequirementSkill],
|
|
10443
|
+
subAgents: [requirementsWriterSubAgent],
|
|
10444
|
+
labels: [
|
|
10445
|
+
{
|
|
10446
|
+
name: "req:write",
|
|
10447
|
+
color: "FEF2C0",
|
|
10448
|
+
description: "Phase: write a formal requirement document using the requirements-writer skill"
|
|
10449
|
+
},
|
|
10450
|
+
{
|
|
10451
|
+
name: "tier:platform",
|
|
10452
|
+
color: "EDEDED",
|
|
10453
|
+
description: "Architectural tier: core platform (shared infrastructure, APIs, auth, tenant isolation)"
|
|
10454
|
+
},
|
|
10455
|
+
{
|
|
10456
|
+
name: "tier:industry",
|
|
10457
|
+
color: "EDEDED",
|
|
10458
|
+
description: "Architectural tier: industry vertical (capabilities not every tenant needs)"
|
|
10459
|
+
},
|
|
10460
|
+
{
|
|
10461
|
+
name: "tier:customer-workflow",
|
|
10462
|
+
color: "EDEDED",
|
|
10463
|
+
description: "Architectural tier: customer-configured workflow (business logic tenants configure within the platform)"
|
|
10464
|
+
},
|
|
10465
|
+
{
|
|
10466
|
+
name: "tier:consumer-app",
|
|
10467
|
+
color: "EDEDED",
|
|
10468
|
+
description: "Architectural tier: consumer application (UI/UX and integrations in external front-ends/systems)"
|
|
10469
|
+
}
|
|
10470
|
+
]
|
|
10471
|
+
};
|
|
10472
|
+
|
|
10473
|
+
// src/agent/bundles/requirements-reviewer.ts
|
|
10474
|
+
var requirementsReviewerSubAgent = {
|
|
10475
|
+
name: "requirements-reviewer",
|
|
10476
|
+
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.",
|
|
10444
10477
|
model: AGENT_MODEL.POWERFUL,
|
|
10445
10478
|
maxTurns: 80,
|
|
10446
10479
|
platforms: { cursor: { exclude: true } },
|
|
10447
10480
|
prompt: [
|
|
10448
|
-
"# Requirements
|
|
10481
|
+
"# Requirements Reviewer Agent",
|
|
10449
10482
|
"",
|
|
10450
|
-
"You
|
|
10451
|
-
"
|
|
10452
|
-
"
|
|
10453
|
-
"
|
|
10454
|
-
"`req:write` issue and writes exactly **one** requirement document.",
|
|
10483
|
+
"You audit existing requirement documents for quality, completeness,",
|
|
10484
|
+
"consistency, and structural compliance. Each session handles exactly",
|
|
10485
|
+
"**one** `req:review` issue and produces exactly **one** review",
|
|
10486
|
+
"report.",
|
|
10455
10487
|
"",
|
|
10456
|
-
"This agent
|
|
10457
|
-
"
|
|
10458
|
-
"
|
|
10459
|
-
"
|
|
10460
|
-
"
|
|
10488
|
+
"This agent **only audits** existing documents \u2014 it never writes",
|
|
10489
|
+
"requirement documents, capability models, gap reports, or research",
|
|
10490
|
+
"notes. Authoring is the responsibility of the `requirements-writer`",
|
|
10491
|
+
"bundle (requirement docs) and `bcm-writer` bundle (capability",
|
|
10492
|
+
"models). Gap discovery is the responsibility of the",
|
|
10493
|
+
"`requirements-analyst` bundle. Keep this boundary clean: never open",
|
|
10494
|
+
"`req:scan`, `req:draft`, `req:trace`, `req:write`, or `bcm:*`",
|
|
10495
|
+
"issues from this pipeline. Findings are reported, not authored.",
|
|
10461
10496
|
"",
|
|
10462
10497
|
"Follow your project's shared agent conventions (`AGENTS.md`,",
|
|
10463
10498
|
"`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
|
|
@@ -10465,531 +10500,524 @@ var requirementsWriterSubAgent = {
|
|
|
10465
10500
|
"---",
|
|
10466
10501
|
"",
|
|
10467
10502
|
...PROJECT_CONTEXT_READER_SECTION,
|
|
10468
|
-
"##
|
|
10503
|
+
"## Soft Dependency on the Requirements Writer Bundle",
|
|
10469
10504
|
"",
|
|
10470
|
-
"
|
|
10471
|
-
"
|
|
10472
|
-
"
|
|
10473
|
-
"
|
|
10474
|
-
|
|
10475
|
-
"
|
|
10476
|
-
"
|
|
10477
|
-
"
|
|
10478
|
-
"
|
|
10479
|
-
"
|
|
10480
|
-
"
|
|
10481
|
-
"
|
|
10482
|
-
"
|
|
10483
|
-
"
|
|
10484
|
-
"
|
|
10485
|
-
"
|
|
10486
|
-
|
|
10487
|
-
"
|
|
10505
|
+
"This reviewer expects the requirement category templates to be",
|
|
10506
|
+
"available at:",
|
|
10507
|
+
"",
|
|
10508
|
+
"```",
|
|
10509
|
+
REQUIREMENTS_WRITER_PATHS.templatesRoot,
|
|
10510
|
+
"```",
|
|
10511
|
+
"",
|
|
10512
|
+
"Those templates are shipped by the `requirements-writer` bundle \u2014",
|
|
10513
|
+
"this bundle does **not** ship its own copy. If the templates are",
|
|
10514
|
+
"missing, either add the `requirements-writer` bundle to your project",
|
|
10515
|
+
"(via `includeBundles: ['requirements-writer']` or by removing it",
|
|
10516
|
+
"from `excludeBundles`) or supply equivalent templates at the same",
|
|
10517
|
+
"path before running a review.",
|
|
10518
|
+
"",
|
|
10519
|
+
"Read the templates before reviewing each document so you know which",
|
|
10520
|
+
"sections are required for that category. The standards reference at",
|
|
10521
|
+
`\`${REQUIREMENTS_WRITER_PATHS.standardsRef}\``,
|
|
10522
|
+
"(also shipped by the writer bundle) is useful when evaluating",
|
|
10523
|
+
"whether a SEC/NFR/INT requirement meets the depth expected by its",
|
|
10524
|
+
"governing standard.",
|
|
10525
|
+
"",
|
|
10526
|
+
"---",
|
|
10527
|
+
"",
|
|
10528
|
+
"## Design Principles",
|
|
10529
|
+
"",
|
|
10530
|
+
"1. **One review per session.** Each `req:review` issue maps to a",
|
|
10531
|
+
" single review report. Never review two scopes in one session and",
|
|
10532
|
+
" never start a second issue.",
|
|
10533
|
+
"2. **Audit only \u2014 do not edit.** Findings are reported in the review",
|
|
10534
|
+
" report and as follow-up issues. Direct edits to requirement",
|
|
10535
|
+
" documents belong to the `requirements-writer` agent picking up a",
|
|
10536
|
+
" follow-up `req:write` issue.",
|
|
10537
|
+
"3. **Templates are authoritative.** When a document is missing a",
|
|
10538
|
+
" section that the matching category template requires, that is a",
|
|
10539
|
+
" structural finding \u2014 not a stylistic choice.",
|
|
10540
|
+
"4. **Resolve every link against the filesystem.** Cross-reference",
|
|
10541
|
+
" integrity findings only count when the target path is actually",
|
|
10542
|
+
" missing from disk. Do not eyeball \u2014 resolve relative paths and",
|
|
10543
|
+
" verify the file exists.",
|
|
10544
|
+
"5. **Cite, don't invent.** Every finding cites the file path, line",
|
|
10545
|
+
" range (when available), and the specific check that failed.",
|
|
10546
|
+
" Never speculate about author intent.",
|
|
10488
10547
|
"",
|
|
10489
10548
|
"---",
|
|
10490
10549
|
"",
|
|
10491
10550
|
"## Configurable Paths",
|
|
10492
10551
|
"",
|
|
10493
|
-
"The pipeline uses these placeholders. Consuming projects override
|
|
10494
|
-
"defaults by passing paths in the `/
|
|
10552
|
+
"The pipeline uses these placeholders. Consuming projects override",
|
|
10553
|
+
"the defaults by passing paths in the `/review-requirements` skill",
|
|
10495
10554
|
"invocation, by recording overrides in `docs/project-context.md`, or",
|
|
10496
10555
|
"by extending this rule in their own `agentConfig.rules`.",
|
|
10497
10556
|
"",
|
|
10498
10557
|
"| Placeholder | Meaning | Default |",
|
|
10499
10558
|
"|-------------|---------|---------|",
|
|
10500
10559
|
"| `<REQUIREMENTS_ROOT>` | Root folder for final requirement documents | `docs/requirements/` |",
|
|
10501
|
-
"| `<
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
"| `<PREFIX>` | Project-specific requirement ID prefix | none \u2014 requirement IDs use the category prefix (`BR`, `FR`, \u2026) unless `docs/project-context.md` defines a project prefix |",
|
|
10560
|
+
"| `<REVIEW_REPORTS_ROOT>` | Where review reports are written | `docs/research/reviews/` |",
|
|
10561
|
+
`| \`<TEMPLATES_ROOT>\` | Where the writer bundle ships category templates (read-only for this agent) | \`${REQUIREMENTS_WRITER_PATHS.templatesRoot}\` |`,
|
|
10562
|
+
`| \`<STANDARDS_REF>\` | Standards & frameworks reference shipped by the writer bundle | \`${REQUIREMENTS_WRITER_PATHS.standardsRef}\` |`,
|
|
10505
10563
|
"",
|
|
10506
|
-
"If `docs/project-context.md` specifies a different requirements
|
|
10507
|
-
"prefer that. Otherwise fall back to the defaults above.",
|
|
10564
|
+
"If `docs/project-context.md` specifies a different requirements",
|
|
10565
|
+
"tree, prefer that. Otherwise fall back to the defaults above.",
|
|
10508
10566
|
"",
|
|
10509
10567
|
"---",
|
|
10510
10568
|
"",
|
|
10511
|
-
"##
|
|
10512
|
-
"",
|
|
10513
|
-
"All requirements follow the BIZBOK-aligned 11-category taxonomy",
|
|
10514
|
-
"below. Getting requirements into the right category matters because",
|
|
10515
|
-
"it determines which template applies, which standards inform it, and",
|
|
10516
|
-
"how it traces to other requirements.",
|
|
10517
|
-
"",
|
|
10518
|
-
"| Category | Prefix | Directory (default) | Question it answers |",
|
|
10519
|
-
"|----------|--------|---------------------|---------------------|",
|
|
10520
|
-
"| Business Requirements | BR | `business/` | **Why** are we building this? What business value does it deliver? |",
|
|
10521
|
-
"| Functional Requirements | FR | `functional/` | **What** does the system do? What is the user-visible behavior? |",
|
|
10522
|
-
"| Non-Functional Requirements | NFR | `non-functional/` | **How well** must the system perform? What quality bar must it meet? |",
|
|
10523
|
-
"| Technical Requirements | TR | `technical/` | **What technology** are we using, and why that one? |",
|
|
10524
|
-
"| Architectural Decisions | ADR | `architectural-decisions/` | **What structural decision** are we making, and what are the trade-offs? |",
|
|
10525
|
-
"| Security & Compliance | SEC | `security/` | **What must we protect**, and what rules govern that protection? |",
|
|
10526
|
-
"| Data Requirements | DR | `data/` | **What data** do we store, how long, and how do we recover it? |",
|
|
10527
|
-
"| Integration Requirements | INT | `integration/` | **What external systems** do we connect to, and how? |",
|
|
10528
|
-
"| Operational Requirements | OPS | `operational/` | **How do we deploy, monitor, and respond** to incidents? |",
|
|
10529
|
-
"| UX Requirements | UX | `ux/` | **How must the interface look, feel, and behave** for users? |",
|
|
10530
|
-
"| Multi-Tenancy & Licensing | MT | `multi-tenancy/` | **How do we isolate tenants, gate features, and meter usage?** |",
|
|
10531
|
-
"",
|
|
10532
|
-
"All requirement documents live under `<REQUIREMENTS_ROOT>` in the",
|
|
10533
|
-
"category directory shown above. Directory names are defaults \u2014",
|
|
10534
|
-
"consuming projects may rename them, but the prefixes are universal.",
|
|
10569
|
+
"## Review Scope",
|
|
10535
10570
|
"",
|
|
10536
|
-
"
|
|
10571
|
+
"Read the `req:review` issue body to determine the scope. The skill",
|
|
10572
|
+
"supports four scopes \u2014 clarify with the issue author or in a",
|
|
10573
|
+
"follow-up comment if the scope is not stated:",
|
|
10537
10574
|
"",
|
|
10538
|
-
"
|
|
10575
|
+
"1. **Full audit** \u2014 every requirement document under",
|
|
10576
|
+
" `<REQUIREMENTS_ROOT>` across all categories",
|
|
10577
|
+
"2. **Category audit** \u2014 every document in one category directory",
|
|
10578
|
+
" (e.g., all FRs under `<REQUIREMENTS_ROOT>/functional/`)",
|
|
10579
|
+
"3. **Single document** \u2014 one specific requirement file",
|
|
10580
|
+
"4. **Targeted check** \u2014 one or more checks from the catalog below,",
|
|
10581
|
+
' run across the documents in scope (e.g., "check all traceability',
|
|
10582
|
+
' links" or "verify tier classification only")',
|
|
10539
10583
|
"",
|
|
10540
|
-
"
|
|
10541
|
-
"
|
|
10542
|
-
|
|
10543
|
-
' admin actions" is SEC.',
|
|
10544
|
-
'- **TR vs ADR:** A TR pins down a specific technology choice ("use',
|
|
10545
|
-
' PostgreSQL 16+"). An ADR records a structural decision with',
|
|
10546
|
-
' context, trade-offs, and alternatives ("why row-level isolation',
|
|
10547
|
-
' over schema-per-tenant"). TRs often follow from ADRs.',
|
|
10548
|
-
"- **FR vs INT:** What the user experiences \u2192 FR. How two systems",
|
|
10549
|
-
' communicate \u2192 INT. "User can pay with a credit card" is FR;',
|
|
10550
|
-
' "Stripe Checkout API integration for payment processing" is INT.',
|
|
10551
|
-
"- **DR vs SEC:** What data exists, how long we keep it, and how we",
|
|
10552
|
-
" recover it \u2192 DR. Who can access it and how it's protected \u2192 SEC.",
|
|
10553
|
-
" These often cross-reference each other.",
|
|
10554
|
-
"- **NFR vs OPS:** A measurable target the system must meet \u2192 NFR.",
|
|
10555
|
-
' The tooling and processes to run the system \u2192 OPS. "p99 latency',
|
|
10556
|
-
' < 200ms" is NFR; "Datadog APM for latency monitoring" is OPS.',
|
|
10584
|
+
"A full audit on a large document set can be extensive. If the issue",
|
|
10585
|
+
"does not state a scope, comment on the issue requesting one and",
|
|
10586
|
+
"leave the issue in `status:needs-attention` rather than guessing.",
|
|
10557
10587
|
"",
|
|
10558
10588
|
"---",
|
|
10559
10589
|
"",
|
|
10560
|
-
"##
|
|
10561
|
-
"",
|
|
10562
|
-
"Every requirement also belongs to one of four architectural tiers.",
|
|
10563
|
-
'Tier is **orthogonal** to category \u2014 category answers "what kind"',
|
|
10564
|
-
'while tier answers "where in the architecture." The tier names below',
|
|
10565
|
-
"are the bundle defaults; consuming projects may rename or reduce the",
|
|
10566
|
-
"tier set in their own `docs/project-context.md`.",
|
|
10567
|
-
"",
|
|
10568
|
-
"| Tier | Slug | When to use |",
|
|
10569
|
-
"|------|------|-------------|",
|
|
10570
|
-
"| **Platform** | `platform` | Core platform services \u2014 APIs, tenant isolation, auth, event bus, shared infrastructure |",
|
|
10571
|
-
"| **Industry** | `industry` | Vertical-specific capabilities not every tenant needs |",
|
|
10572
|
-
"| **Customer Workflow** | `customer-workflow` | Business logic tenants configure within the platform \u2014 approval chains, notification rules, intake processes |",
|
|
10573
|
-
"| **Consumer Application** | `consumer-app` | UI/UX and integrations in external front-ends/systems consuming the platform's APIs |",
|
|
10574
|
-
"",
|
|
10575
|
-
"Tier is a **required metadata field**. Set it in the Metadata table",
|
|
10576
|
-
"of every requirement document and apply the matching `tier:*` issue",
|
|
10577
|
-
"label (`tier:platform`, `tier:industry`, `tier:customer-workflow`,",
|
|
10578
|
-
"or `tier:consumer-app`).",
|
|
10579
|
-
"",
|
|
10580
|
-
"**Customer field (optional).** When the proposal originated from or",
|
|
10581
|
-
"applies to a specific customer, set the `Customer` field in the",
|
|
10582
|
-
"Metadata table. Optional for Platform/Industry tiers, expected for",
|
|
10583
|
-
"Customer Workflow / Consumer Application tiers when the project",
|
|
10584
|
-
"tracks customer profiles.",
|
|
10585
|
-
"",
|
|
10586
|
-
"**Implementor field (tier-specific).** For Customer Workflow and",
|
|
10587
|
-
"Consumer Application tiers, set the `Implementor` field (Consortium",
|
|
10588
|
-
"Member / Customer / TBD) when the project tracks that distinction.",
|
|
10589
|
-
"Skip the field entirely if it does not apply to your project.",
|
|
10590
|
-
"",
|
|
10591
|
-
"**Cross-tier traceability.** Higher-tier requirements must link to",
|
|
10592
|
-
"lower-tier requirements they depend on using `Depends on (cross-tier)`",
|
|
10593
|
-
"links in the Traceability section. For example, a Consumer",
|
|
10594
|
-
"Application FR for an intake portal must trace to the Platform INT",
|
|
10595
|
-
"for the API it consumes.",
|
|
10596
|
-
"",
|
|
10597
|
-
"---",
|
|
10590
|
+
"## Review Checklist",
|
|
10598
10591
|
"",
|
|
10599
|
-
"
|
|
10592
|
+
"Apply the following 11 checks. Each check produces zero or more",
|
|
10593
|
+
"findings. Findings are graded Critical / Warning / Info using the",
|
|
10594
|
+
"severity ladder in the next section.",
|
|
10600
10595
|
"",
|
|
10601
|
-
"
|
|
10602
|
-
"treated equally. The core principle is: **requirements that describe",
|
|
10603
|
-
"*what* and *why* get written directly; decisions about *how* and",
|
|
10604
|
-
"*with what* are deferred to humans.**",
|
|
10596
|
+
"### 1. Structural Compliance",
|
|
10605
10597
|
"",
|
|
10606
|
-
"
|
|
10598
|
+
"For each document in scope, verify:",
|
|
10607
10599
|
"",
|
|
10608
|
-
"
|
|
10609
|
-
"
|
|
10610
|
-
"
|
|
10600
|
+
"- YAML frontmatter present with `title` and `description` fields",
|
|
10601
|
+
"- Title in frontmatter matches the `# Heading` line",
|
|
10602
|
+
"- File name follows `{PREFIX}-{NNN}-{slug}.md` (or the project",
|
|
10603
|
+
" prefix declared in `docs/project-context.md`)",
|
|
10604
|
+
"- File is in the correct category directory under",
|
|
10605
|
+
" `<REQUIREMENTS_ROOT>`",
|
|
10606
|
+
"- `Status` field is set to one of the valid values: `Draft`,",
|
|
10607
|
+
" `Proposed`, `Accepted`, `Implemented`, `Deprecated`, `Superseded`",
|
|
10608
|
+
"- All sections from the matching category template at",
|
|
10609
|
+
" `<TEMPLATES_ROOT>` are present (sections that do not apply must",
|
|
10610
|
+
" carry `Not applicable \u2014 <reason>` rather than being silently",
|
|
10611
|
+
" omitted)",
|
|
10612
|
+
"- `## Open Items` section exists with all three subsections",
|
|
10613
|
+
" (Identified Gaps, Follow-up Questions, Contradictions &",
|
|
10614
|
+
" Inconsistencies)",
|
|
10615
|
+
"- `## Revision History` section exists",
|
|
10616
|
+
"- `## Traceability` section exists",
|
|
10611
10617
|
"",
|
|
10612
|
-
"
|
|
10613
|
-
"- **FR** \u2014 Functional Requirements",
|
|
10614
|
-
"- **NFR** \u2014 Non-Functional Requirements",
|
|
10615
|
-
"- **SEC** \u2014 Security & Compliance",
|
|
10616
|
-
"- **UX** \u2014 UX Requirements",
|
|
10618
|
+
"### 2. Categorization Accuracy",
|
|
10617
10619
|
"",
|
|
10618
|
-
"
|
|
10620
|
+
"Verify each document is in the right category by applying the",
|
|
10621
|
+
"shared taxonomy disambiguation rules. The reviewer and the",
|
|
10622
|
+
"`requirements-writer` load the **same** rules from",
|
|
10623
|
+
"`requirements-taxonomy.ts` so the reviewer never flags a",
|
|
10624
|
+
"correctly-categorized document as wrong:",
|
|
10619
10625
|
"",
|
|
10620
|
-
|
|
10621
|
-
"(defer). Write the requirement portions directly but defer",
|
|
10622
|
-
"technology/tooling selections:",
|
|
10626
|
+
...REQUIREMENTS_TAXONOMY_DISAMBIGUATION_SECTION,
|
|
10623
10627
|
"",
|
|
10624
|
-
"
|
|
10625
|
-
"
|
|
10626
|
-
" specified, create a `Proposed` ADR or TR instead of choosing.",
|
|
10627
|
-
"- **MT** \u2014 Write tenant isolation requirements and metering",
|
|
10628
|
-
" dimensions directly. When the isolation *model* must be chosen",
|
|
10629
|
-
" (row-level vs schema-per-tenant vs database-per-tenant), create a",
|
|
10630
|
-
" `Proposed` ADR instead of choosing.",
|
|
10631
|
-
"- **INT** \u2014 Write the integration shape, direction, error handling",
|
|
10632
|
-
" strategy, and SLA expectations directly. When the specific",
|
|
10633
|
-
" provider must be selected, create a `Proposed` TR/ADR instead.",
|
|
10634
|
-
"- **OPS** \u2014 Write operational requirements (monitoring needs,",
|
|
10635
|
-
" incident response, deployment strategy) directly. When specific",
|
|
10636
|
-
" tooling must be selected, create a `Proposed` TR/ADR instead.",
|
|
10628
|
+
"Flag any documents that appear miscategorized. Explain where they",
|
|
10629
|
+
"should live and why.",
|
|
10637
10630
|
"",
|
|
10638
|
-
"###
|
|
10631
|
+
"### 3. Traceability Completeness",
|
|
10639
10632
|
"",
|
|
10640
|
-
"
|
|
10641
|
-
"
|
|
10642
|
-
"
|
|
10643
|
-
"itself**.",
|
|
10633
|
+
"Check that the requirement dependency graph is connected. Apply",
|
|
10634
|
+
"these expectations as defaults; override them when the project's",
|
|
10635
|
+
"`docs/project-context.md` defines a different traceability shape:",
|
|
10644
10636
|
"",
|
|
10645
|
-
"-
|
|
10646
|
-
|
|
10647
|
-
"
|
|
10648
|
-
|
|
10649
|
-
'
|
|
10650
|
-
"
|
|
10651
|
-
"
|
|
10652
|
-
"
|
|
10653
|
-
"
|
|
10654
|
-
"
|
|
10655
|
-
"
|
|
10656
|
-
" situation \u2014 not generic.",
|
|
10657
|
-
" 5. **Consequences** \u2014 positive, negative, and neutral consequences",
|
|
10658
|
-
" of the recommended option",
|
|
10659
|
-
" 6. Set status to `Proposed`. Add an open item flagging that a",
|
|
10660
|
-
" human decision is required before dependent requirements can",
|
|
10661
|
-
" proceed.",
|
|
10637
|
+
"- Every FR should trace back to at least one BR (via",
|
|
10638
|
+
' "Implements")',
|
|
10639
|
+
'- Every TR should trace to at least one ADR (via "Justified by")',
|
|
10640
|
+
"- Every ADR should trace to at least one BR or FR (via",
|
|
10641
|
+
' "Supports")',
|
|
10642
|
+
"- Every SEC, NFR, UX should appear as a constraint or",
|
|
10643
|
+
" cross-reference on the FRs they affect",
|
|
10644
|
+
"- Every INT should trace to at least one FR that depends on it",
|
|
10645
|
+
"- Every DR should be referenced by SEC documents that govern its",
|
|
10646
|
+
" protection",
|
|
10647
|
+
"- Every OPS should reference the NFR targets it monitors",
|
|
10662
10648
|
"",
|
|
10663
|
-
"
|
|
10664
|
-
|
|
10665
|
-
' Recommendation below."*',
|
|
10666
|
-
" 2. **Alternatives Considered** \u2014 every viable technology option",
|
|
10667
|
-
" with description, pros, cons, license, and maturity assessment",
|
|
10668
|
-
" for each",
|
|
10669
|
-
" 3. **Recommendation** \u2014 state which technology you recommend,",
|
|
10670
|
-
" *why*, and what trade-offs are accepted",
|
|
10671
|
-
' 4. **Rationale** \u2014 set to: *"See Recommendation above. Awaiting',
|
|
10672
|
-
' human decision."*',
|
|
10673
|
-
" 5. Set status to `Proposed`. Add an open item flagging that a",
|
|
10674
|
-
" human decision is required.",
|
|
10649
|
+
"Identify orphaned requirements (documents with no inbound or",
|
|
10650
|
+
"outbound traceability links) and flag them.",
|
|
10675
10651
|
"",
|
|
10676
|
-
"###
|
|
10652
|
+
"### 4. Cross-Reference Integrity",
|
|
10677
10653
|
"",
|
|
10678
|
-
"
|
|
10654
|
+
"Check **every markdown link to a `.md` file in the entire",
|
|
10655
|
+
"document** \u2014 not just links inside the Traceability section.",
|
|
10656
|
+
"Broken links frequently appear in body text (Description, Main",
|
|
10657
|
+
"Flow, Acceptance Criteria, etc.) where documents reference other",
|
|
10658
|
+
"requirements inline.",
|
|
10679
10659
|
"",
|
|
10680
|
-
"
|
|
10681
|
-
" detail.",
|
|
10682
|
-
"2. Where the requirement needs a technology decision, add a note:",
|
|
10683
|
-
' *"Technology selection pending \u2014 see [ADR-NNN](../architectural-decisions/ADR-NNN-slug.md)"*.',
|
|
10684
|
-
"3. Create the corresponding ADR or TR as `Proposed` with options,",
|
|
10685
|
-
" pros/cons, and recommendation.",
|
|
10686
|
-
'4. In the ADR/TR open items, add: *"Human decision required.',
|
|
10687
|
-
' Dependent requirements: [list]"*.',
|
|
10688
|
-
"5. In the original requirement's open items, add a cross-reference:",
|
|
10689
|
-
' *"Blocked by [ADR-NNN](../architectural-decisions/ADR-NNN-slug.md) \u2014',
|
|
10690
|
-
' technology selection pending human review."*',
|
|
10660
|
+
"For every link in every document:",
|
|
10691
10661
|
"",
|
|
10692
|
-
"
|
|
10693
|
-
"
|
|
10694
|
-
"
|
|
10662
|
+
"- The target file exists at the referenced path \u2014 **resolve the",
|
|
10663
|
+
" relative path against the filesystem**, do not eyeball it",
|
|
10664
|
+
"- The target file's ID matches the link text",
|
|
10665
|
+
"- Relative paths are correct (cross-category uses `../`,",
|
|
10666
|
+
" same-category is direct)",
|
|
10667
|
+
"- All links include the `.md` extension",
|
|
10668
|
+
"- Bidirectional links exist where expected (if A references B in",
|
|
10669
|
+
" Traceability, B should reference A)",
|
|
10695
10670
|
"",
|
|
10696
|
-
"
|
|
10671
|
+
"### 5. Sequence Number Integrity",
|
|
10697
10672
|
"",
|
|
10698
|
-
"
|
|
10673
|
+
"Within each category directory under `<REQUIREMENTS_ROOT>`:",
|
|
10699
10674
|
"",
|
|
10700
|
-
"
|
|
10675
|
+
"- No duplicate sequence numbers",
|
|
10676
|
+
"- No gaps in the sequence (gaps may be intentional from deleted",
|
|
10677
|
+
" docs but should be noted as Info)",
|
|
10678
|
+
"- Sequence numbers are zero-padded to three digits (`001`, `012`,",
|
|
10679
|
+
" `127`)",
|
|
10701
10680
|
"",
|
|
10702
|
-
"
|
|
10703
|
-
"{PREFIX}-{NNN}-{slug}.md",
|
|
10704
|
-
"```",
|
|
10681
|
+
"### 6. Content Quality",
|
|
10705
10682
|
"",
|
|
10706
|
-
"
|
|
10707
|
-
" `ADR`, `SEC`, `DR`, `INT`, `OPS`, `UX`, `MT`). If the project",
|
|
10708
|
-
" declares a project-wide prefix in `docs/project-context.md`, use",
|
|
10709
|
-
" it instead.",
|
|
10710
|
-
"- **NNN** \u2014 three-digit sequential number (001, 002, 012). Always",
|
|
10711
|
-
" check the target category directory under `<REQUIREMENTS_ROOT>`",
|
|
10712
|
-
" for the next available number before writing.",
|
|
10713
|
-
"- **slug** \u2014 lowercase kebab-case descriptive name.",
|
|
10683
|
+
"For each document, evaluate:",
|
|
10714
10684
|
"",
|
|
10715
|
-
"
|
|
10716
|
-
"
|
|
10717
|
-
"
|
|
10685
|
+
"- **Completeness** \u2014 Are all template sections filled in",
|
|
10686
|
+
" meaningfully, or are there unexplained TBDs?",
|
|
10687
|
+
"- **Specificity** \u2014 Are acceptance criteria testable? Are NFR",
|
|
10688
|
+
" targets numeric and measurable? Are success metrics concrete?",
|
|
10689
|
+
"- **Consistency** \u2014 Do related documents agree with each other?",
|
|
10690
|
+
" (e.g., does an FR's description match the corresponding INT's",
|
|
10691
|
+
" integration shape?)",
|
|
10692
|
+
"- **Staleness** \u2014 Are statuses up to date? Are there `Draft`",
|
|
10693
|
+
" documents that should have progressed?",
|
|
10694
|
+
"- **Naming consistency** \u2014 When `docs/project-context.md` declares",
|
|
10695
|
+
" a project name or product name, verify it is used consistently",
|
|
10696
|
+
" across documents.",
|
|
10718
10697
|
"",
|
|
10719
|
-
"
|
|
10698
|
+
"### 7. Open Items Review",
|
|
10720
10699
|
"",
|
|
10721
|
-
"
|
|
10700
|
+
"Across all documents in scope:",
|
|
10722
10701
|
"",
|
|
10723
|
-
"
|
|
10724
|
-
"
|
|
10702
|
+
"- Are open items prioritized (P0\u2013P3)?",
|
|
10703
|
+
"- Are interdependencies between open items documented with",
|
|
10704
|
+
" cross-references?",
|
|
10705
|
+
"- Are there P0 (Blocker) items that have not been resolved?",
|
|
10706
|
+
"- Are there stale open items that should have been addressed?",
|
|
10725
10707
|
"",
|
|
10726
|
-
"
|
|
10727
|
-
"---",
|
|
10728
|
-
'title: "FR-001: User Registration"',
|
|
10729
|
-
'description: "Functional requirement for the user registration workflow."',
|
|
10730
|
-
"tier: platform",
|
|
10731
|
-
"---",
|
|
10708
|
+
"### 8. Registry Index Sync",
|
|
10732
10709
|
"",
|
|
10733
|
-
"
|
|
10710
|
+
"Each category directory has a `README.md` (or `index.md`) file",
|
|
10711
|
+
"that serves as a registry table listing all requirements in that",
|
|
10712
|
+
"category. Check that these are in sync:",
|
|
10734
10713
|
"",
|
|
10735
|
-
"
|
|
10736
|
-
"
|
|
10714
|
+
"- Every requirement file in the directory has a corresponding row",
|
|
10715
|
+
" in the index",
|
|
10716
|
+
"- No rows in the index reference files that do not exist (stale",
|
|
10717
|
+
" entries from deleted docs)",
|
|
10718
|
+
"- Rows are in sequence number order",
|
|
10719
|
+
"- The ID, Title, Status, and Priority in each row match the",
|
|
10720
|
+
" document's metadata",
|
|
10721
|
+
"- No placeholder message remains when requirements exist",
|
|
10737
10722
|
"",
|
|
10738
|
-
"
|
|
10739
|
-
"
|
|
10740
|
-
"`tier` field must be one of `platform`, `industry`,",
|
|
10741
|
-
"`customer-workflow`, or `consumer-app` (use whatever tier slugs the",
|
|
10742
|
-
"project declares).",
|
|
10723
|
+
"Flag missing entries as **Warning** and stale or incorrect entries",
|
|
10724
|
+
"as **Warning**.",
|
|
10743
10725
|
"",
|
|
10744
|
-
"###
|
|
10726
|
+
"### 9. Decision Authority Compliance",
|
|
10745
10727
|
"",
|
|
10746
|
-
"
|
|
10747
|
-
"
|
|
10748
|
-
"to frontmatter. One example: a `referencedIn.meetings[]` block that",
|
|
10749
|
-
"links the requirement back to a meeting transcript that informed it.",
|
|
10750
|
-
"These conventions are **optional** \u2014 adopt them only if your project",
|
|
10751
|
-
"already maintains the matching reverse-link structures.",
|
|
10728
|
+
"Verify that the `requirements-writer` decision-authority rules",
|
|
10729
|
+
"were followed:",
|
|
10752
10730
|
"",
|
|
10753
|
-
"
|
|
10731
|
+
"- ADR and TR documents should be in `Proposed` status if they",
|
|
10732
|
+
" have not been explicitly accepted by a human",
|
|
10733
|
+
"- Direct-write categories (BR, FR, NFR, SEC, UX) should not",
|
|
10734
|
+
" contain technology-specific decisions \u2014 those should be deferred",
|
|
10735
|
+
" to ADR/TR documents",
|
|
10736
|
+
"- Partial-deferral categories (DR, MT, INT, OPS) should defer",
|
|
10737
|
+
" technology/tooling choices to `Proposed` ADR/TR documents",
|
|
10738
|
+
" rather than embedding them inline",
|
|
10754
10739
|
"",
|
|
10755
|
-
"
|
|
10740
|
+
"For `Proposed` ADR and TR documents, additionally verify the",
|
|
10741
|
+
"comparison and recommendation structure:",
|
|
10756
10742
|
"",
|
|
10757
|
-
"
|
|
10758
|
-
"
|
|
10743
|
+
"- **Alternatives Considered** section exists with at least 2",
|
|
10744
|
+
" options",
|
|
10745
|
+
"- Each alternative has a description, pros, and cons \u2014 no option",
|
|
10746
|
+
" is given cursory treatment",
|
|
10747
|
+
"- **Recommendation** section exists with a named recommended",
|
|
10748
|
+
" option",
|
|
10749
|
+
"- Recommendation includes a reasoned explanation specific to this",
|
|
10750
|
+
" project's context (not generic)",
|
|
10751
|
+
"- Recommendation identifies key trade-offs being accepted",
|
|
10752
|
+
'- Decision section says "Pending human review" (not "We',
|
|
10753
|
+
' will..." or "We decided...")',
|
|
10754
|
+
"- Open Items include an item flagging that human decision is",
|
|
10755
|
+
" required, with references to dependent requirements blocked on",
|
|
10756
|
+
" this decision",
|
|
10759
10757
|
"",
|
|
10760
|
-
"
|
|
10761
|
-
"|---|---|",
|
|
10762
|
-
"| `Draft` | Initial capture, under discussion |",
|
|
10763
|
-
"| `Proposed` | Formally proposed, awaiting review \u2014 **used for ADR and TR documents pending human decision** |",
|
|
10764
|
-
"| `Accepted` | Approved and active |",
|
|
10765
|
-
"| `Implemented` | Fully delivered |",
|
|
10766
|
-
"| `Deprecated` | No longer applicable |",
|
|
10767
|
-
"| `Superseded` | Replaced by another requirement (link to successor) |",
|
|
10758
|
+
"### 10. Tier Classification Compliance",
|
|
10768
10759
|
"",
|
|
10769
|
-
"
|
|
10760
|
+
"Verify that every document has a valid tier classification. The",
|
|
10761
|
+
"default tier set is `platform`, `industry`, `customer-workflow`,",
|
|
10762
|
+
"`consumer-app`; consuming projects may rename or reduce the tier",
|
|
10763
|
+
"set in their own `docs/project-context.md`.",
|
|
10770
10764
|
"",
|
|
10771
|
-
"
|
|
10765
|
+
"- `tier` field is set in YAML frontmatter (one of the project's",
|
|
10766
|
+
" declared tier slugs)",
|
|
10767
|
+
"- `Tier` row is set in the Metadata table with a matching value",
|
|
10768
|
+
"- `Implementor` field is set for Customer Workflow and Consumer",
|
|
10769
|
+
" Application tiers when the project tracks that distinction",
|
|
10770
|
+
" (Consortium Member / Customer / TBD)",
|
|
10771
|
+
"- `Implementor` field is absent or N/A for Platform and Industry",
|
|
10772
|
+
" tiers",
|
|
10773
|
+
'- When `Implementor` is "Consortium Member", it links to a',
|
|
10774
|
+
" valid org profile",
|
|
10775
|
+
"- `Customer` field is set for Customer Workflow and Consumer",
|
|
10776
|
+
" Application tiers when the project tracks customer profiles,",
|
|
10777
|
+
" linking to a valid customer org profile",
|
|
10778
|
+
"- `Customer` field in YAML frontmatter (if present) matches the",
|
|
10779
|
+
" Customer row in the Metadata table",
|
|
10780
|
+
"- `customer:<slug>` label exists on the corresponding GitHub issue",
|
|
10781
|
+
" (when traceable)",
|
|
10782
|
+
"- Industry-tier requirements specify which industry/vertical they",
|
|
10783
|
+
" apply to",
|
|
10784
|
+
"- Platform-tier requirements do not contain industry-specific",
|
|
10785
|
+
" concerns that should be scoped to the Industry tier",
|
|
10786
|
+
"- Cross-tier traceability links exist where expected:",
|
|
10787
|
+
" - Consumer Application requirements have `Depends on",
|
|
10788
|
+
" (cross-tier)` links to Platform requirements (the APIs they",
|
|
10789
|
+
" consume)",
|
|
10790
|
+
" - Customer Workflow requirements have `Depends on (cross-tier)`",
|
|
10791
|
+
" links to Platform requirements (the configuration capabilities",
|
|
10792
|
+
" they use)",
|
|
10793
|
+
" - Industry requirements have `Depends on (cross-tier)` links to",
|
|
10794
|
+
" Platform requirements (the core services they extend)",
|
|
10795
|
+
" - Platform requirements that enable higher-tier work have",
|
|
10796
|
+
" `Enables (cross-tier)` links",
|
|
10797
|
+
"- Multi-tier decompositions are complete \u2014 if a customer need was",
|
|
10798
|
+
" decomposed across tiers, all expected tiers have corresponding",
|
|
10799
|
+
" requirements linked together",
|
|
10772
10800
|
"",
|
|
10773
|
-
"
|
|
10774
|
-
"
|
|
10801
|
+
"Flag as **Critical**: missing tier field; platform requirements",
|
|
10802
|
+
"containing industry-specific logic.",
|
|
10803
|
+
"Flag as **Warning**: missing cross-tier traceability; missing",
|
|
10804
|
+
"Implementor field on Customer Workflow / Consumer Application",
|
|
10805
|
+
"requirements when the project tracks that field; missing Customer",
|
|
10806
|
+
"field on Customer Workflow / Consumer Application requirements;",
|
|
10807
|
+
'Implementor claiming "Consortium Member" without a linked org',
|
|
10808
|
+
"profile.",
|
|
10775
10809
|
"",
|
|
10776
|
-
"
|
|
10777
|
-
"## Traceability",
|
|
10810
|
+
"### 11. Cross-Referencing Convention Compliance",
|
|
10778
10811
|
"",
|
|
10779
|
-
"
|
|
10780
|
-
"
|
|
10781
|
-
"
|
|
10782
|
-
"```",
|
|
10812
|
+
"Verify alignment with the project's cross-referencing conventions",
|
|
10813
|
+
"(usually documented in `docs/project-context.md` or a profile",
|
|
10814
|
+
"registry index):",
|
|
10783
10815
|
"",
|
|
10784
|
-
"
|
|
10816
|
+
"- Requirements that reference profiled organizations use the",
|
|
10817
|
+
" project's profile-link convention (e.g., `profilePath`",
|
|
10818
|
+
" frontmatter, or relative links into the profiles tree)",
|
|
10819
|
+
"- Requirements that trace to research output link to the correct",
|
|
10820
|
+
" paths under the project's research tree",
|
|
10821
|
+
"- Optional convention: meeting-sourced requirements may reference",
|
|
10822
|
+
" the meeting transcript or insight document. This is **optional** \u2014",
|
|
10823
|
+
" only flag missing meeting links when the project documents the",
|
|
10824
|
+
" reverse-link structure (e.g., a `referencedIn.meetings[]`",
|
|
10825
|
+
" frontmatter block) and that structure is in active use.",
|
|
10785
10826
|
"",
|
|
10786
|
-
"
|
|
10787
|
-
"|---|---|",
|
|
10788
|
-
"| **Implements** | This requirement realizes a higher-level requirement |",
|
|
10789
|
-
"| **Constrained by** | This requirement is bounded by another requirement |",
|
|
10790
|
-
"| **Supports** | This requirement contributes to but does not fully realize another |",
|
|
10791
|
-
"| **Supersedes** | This requirement replaces a deprecated one |",
|
|
10792
|
-
"| **Related** | Informational relationship |",
|
|
10827
|
+
"---",
|
|
10793
10828
|
"",
|
|
10794
|
-
"
|
|
10829
|
+
"## Severity Ladder",
|
|
10795
10830
|
"",
|
|
10796
|
-
"
|
|
10797
|
-
"Business Requirements (BR)",
|
|
10798
|
-
" -> justify epics and initiatives",
|
|
10831
|
+
"Group every finding by severity:",
|
|
10799
10832
|
"",
|
|
10800
|
-
"
|
|
10801
|
-
" -> decompose into feature work",
|
|
10833
|
+
"### Critical (Must Fix)",
|
|
10802
10834
|
"",
|
|
10803
|
-
"
|
|
10804
|
-
"
|
|
10835
|
+
"Issues that undermine the integrity of the requirements",
|
|
10836
|
+
"documentation:",
|
|
10805
10837
|
"",
|
|
10806
|
-
"
|
|
10807
|
-
"
|
|
10838
|
+
"- Miscategorized requirements",
|
|
10839
|
+
"- Broken cross-references (target file does not exist on disk)",
|
|
10840
|
+
"- Missing mandatory template sections",
|
|
10841
|
+
"- Technology decisions embedded in direct-write categories without",
|
|
10842
|
+
" a corresponding `Proposed` ADR/TR",
|
|
10843
|
+
"- P0 open items that are unresolved",
|
|
10844
|
+
"- Missing `tier` field; platform requirements containing",
|
|
10845
|
+
" industry-specific logic",
|
|
10808
10846
|
"",
|
|
10809
|
-
"
|
|
10810
|
-
" -> drive infrastructure and platform work",
|
|
10811
|
-
"```",
|
|
10847
|
+
"### Warning (Should Fix)",
|
|
10812
10848
|
"",
|
|
10813
|
-
"
|
|
10849
|
+
"Issues that reduce quality but do not break the documentation:",
|
|
10814
10850
|
"",
|
|
10815
|
-
"
|
|
10851
|
+
"- Missing traceability links (orphaned requirements)",
|
|
10852
|
+
"- Unidirectional cross-references (A links to B, but B does not",
|
|
10853
|
+
" link to A)",
|
|
10854
|
+
"- Vague acceptance criteria or unmeasurable NFR targets",
|
|
10855
|
+
"- Stale statuses or unaddressed open items",
|
|
10856
|
+
"- Sequence number gaps",
|
|
10857
|
+
"- Registry index out of sync with actual files (missing entries,",
|
|
10858
|
+
" stale rows, incorrect metadata)",
|
|
10859
|
+
"- Missing cross-tier traceability; missing Implementor / Customer",
|
|
10860
|
+
" fields on Customer Workflow / Consumer Application requirements",
|
|
10861
|
+
" when the project tracks those fields",
|
|
10816
10862
|
"",
|
|
10817
|
-
"
|
|
10818
|
-
"(placed just above `## Revision History`). This section surfaces",
|
|
10819
|
-
"things that need human attention.",
|
|
10863
|
+
"### Info (Consider)",
|
|
10820
10864
|
"",
|
|
10821
|
-
"
|
|
10865
|
+
"Observations and suggestions:",
|
|
10822
10866
|
"",
|
|
10823
|
-
"
|
|
10824
|
-
"
|
|
10825
|
-
"
|
|
10826
|
-
"
|
|
10827
|
-
"
|
|
10828
|
-
"| **P3 \u2014 Low** | Minor clarification, can be resolved asynchronously |",
|
|
10867
|
+
"- Opportunities to add cross-references between related",
|
|
10868
|
+
" requirements",
|
|
10869
|
+
"- TBD sections that could be filled in with available information",
|
|
10870
|
+
"- Style inconsistencies across documents",
|
|
10871
|
+
"- Sequence number gaps that appear intentional from deleted docs",
|
|
10829
10872
|
"",
|
|
10830
|
-
"
|
|
10873
|
+
"---",
|
|
10831
10874
|
"",
|
|
10832
|
-
"
|
|
10833
|
-
" incomplete aspects",
|
|
10834
|
-
"- **Follow-up Questions** \u2014 Ambiguities where intent cannot be",
|
|
10835
|
-
" confidently inferred",
|
|
10836
|
-
"- **Contradictions & Inconsistencies** \u2014 Conflicts between",
|
|
10837
|
-
" requirements, documentation, or stated goals",
|
|
10875
|
+
"## Reporting Format",
|
|
10838
10876
|
"",
|
|
10839
|
-
"
|
|
10840
|
-
"
|
|
10841
|
-
"
|
|
10877
|
+
"Write the review report to",
|
|
10878
|
+
"`<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md` (substitute",
|
|
10879
|
+
"the date and a short scope slug). Structure the report as:",
|
|
10842
10880
|
"",
|
|
10843
|
-
"
|
|
10844
|
-
|
|
10881
|
+
"```markdown",
|
|
10882
|
+
"# Requirements Review: <scope>",
|
|
10845
10883
|
"",
|
|
10846
|
-
"
|
|
10884
|
+
"**Date:** YYYY-MM-DD",
|
|
10885
|
+
"**Scope:** <full audit | category | single document | targeted",
|
|
10886
|
+
"check>",
|
|
10887
|
+
"**Source issue:** #NNN",
|
|
10847
10888
|
"",
|
|
10848
|
-
"##
|
|
10889
|
+
"## Critical (Must Fix)",
|
|
10849
10890
|
"",
|
|
10850
|
-
"
|
|
10891
|
+
"1. **[<file path>] <short title>** `Critical`",
|
|
10892
|
+
" <one-paragraph description, citing the specific check that",
|
|
10893
|
+
" failed>",
|
|
10851
10894
|
"",
|
|
10852
|
-
"
|
|
10853
|
-
" category specified in the issue (`_template-FR.md`,",
|
|
10854
|
-
" `_template-ADR.md`, etc.). Templates are named",
|
|
10855
|
-
" `_template-{PREFIX}.md`. Every section in the template must",
|
|
10856
|
-
" appear in the final document.",
|
|
10895
|
+
"## Warning (Should Fix)",
|
|
10857
10896
|
"",
|
|
10858
|
-
"
|
|
10859
|
-
"
|
|
10860
|
-
" 25010, BABOK, MADR, Enterprise Integration Patterns, WCAG, and",
|
|
10861
|
-
" related standards that ground the templates.",
|
|
10897
|
+
"1. **[<file path>] <short title>** `Warning`",
|
|
10898
|
+
" ...",
|
|
10862
10899
|
"",
|
|
10863
|
-
"
|
|
10864
|
-
"are the same files for every project that adopts the bundle.",
|
|
10900
|
+
"## Info (Consider)",
|
|
10865
10901
|
"",
|
|
10866
|
-
"
|
|
10902
|
+
"1. **[<file path>] <short title>** `Info`",
|
|
10903
|
+
" ...",
|
|
10867
10904
|
"",
|
|
10868
|
-
"##
|
|
10905
|
+
"## Review Summary",
|
|
10869
10906
|
"",
|
|
10870
|
-
"
|
|
10871
|
-
"
|
|
10872
|
-
"
|
|
10873
|
-
"
|
|
10907
|
+
"| Severity | Count |",
|
|
10908
|
+
"|---|---|",
|
|
10909
|
+
"| Critical | N |",
|
|
10910
|
+
"| Warning | N |",
|
|
10911
|
+
"| Info | N |",
|
|
10874
10912
|
"",
|
|
10875
|
-
"
|
|
10876
|
-
"
|
|
10877
|
-
"
|
|
10878
|
-
"
|
|
10879
|
-
"4. If the index contains a placeholder message, remove it.",
|
|
10913
|
+
"**Categories reviewed:** [list]",
|
|
10914
|
+
"**Documents reviewed:** N",
|
|
10915
|
+
"**Overall assessment:** [Brief 1-2 sentence assessment]",
|
|
10916
|
+
"```",
|
|
10880
10917
|
"",
|
|
10881
|
-
"
|
|
10882
|
-
|
|
10883
|
-
"
|
|
10918
|
+
"Each finding must cite the file path and the specific check that",
|
|
10919
|
+
'produced it (e.g., "Check 4: Cross-Reference Integrity \u2014 target',
|
|
10920
|
+
"file `../security/SEC-007-audit-logs.md` does not exist on",
|
|
10921
|
+
'disk").',
|
|
10884
10922
|
"",
|
|
10885
10923
|
"---",
|
|
10886
10924
|
"",
|
|
10887
|
-
"##
|
|
10888
|
-
"",
|
|
10889
|
-
"Run this loop exactly once per session. Never start a second issue.",
|
|
10925
|
+
"## Automated Verification (>10 documents)",
|
|
10890
10926
|
"",
|
|
10891
|
-
"
|
|
10892
|
-
"
|
|
10893
|
-
"
|
|
10894
|
-
"
|
|
10895
|
-
"3. Execute the write phase below.",
|
|
10896
|
-
"4. Commit, push, open a PR, and close the issue per your project's",
|
|
10897
|
-
" PR workflow. Closing the PR transitions the issue to",
|
|
10898
|
-
" `status:done` per the standard label conventions.",
|
|
10927
|
+
"For audits covering more than 10 documents, **write a Python",
|
|
10928
|
+
"verification script** rather than reading files one by one.",
|
|
10929
|
+
"Manual review of large document sets always misses things \u2014",
|
|
10930
|
+
"especially broken links where the filename is plausible but wrong.",
|
|
10899
10931
|
"",
|
|
10900
|
-
"
|
|
10932
|
+
"Save the script alongside the review report at",
|
|
10933
|
+
"`<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD-verify.py` so",
|
|
10934
|
+
"future reviews can re-run it. The script must be idempotent and",
|
|
10935
|
+
"read-only \u2014 it inspects files, it does not mutate them.",
|
|
10901
10936
|
"",
|
|
10902
|
-
"
|
|
10937
|
+
"At minimum, the script must:",
|
|
10903
10938
|
"",
|
|
10904
|
-
"**
|
|
10905
|
-
"
|
|
10906
|
-
"
|
|
10939
|
+
"1. **Resolve every markdown link.** For each `[text](path.md)`",
|
|
10940
|
+
" link in every document in scope, resolve the relative path",
|
|
10941
|
+
" against the filesystem and verify the target file exists.",
|
|
10942
|
+
" Do not skip links outside Traceability sections.",
|
|
10943
|
+
"2. **Extract traceability links.** Parse the `## Traceability`",
|
|
10944
|
+
" section of each document, collect all `[PREFIX-NNN](path)`",
|
|
10945
|
+
" references, and build a directed link graph.",
|
|
10946
|
+
"3. **Check bidirectionality.** For every (A \u2192 B) link in the",
|
|
10947
|
+
" graph, verify (B \u2192 A) exists.",
|
|
10948
|
+
"4. **Verify structural sections.** Check for required section",
|
|
10949
|
+
" headings (`## Open Items`, `## Revision History`,",
|
|
10950
|
+
" `## Traceability`, etc.) using string matching.",
|
|
10951
|
+
"5. **Check registry sync.** Compare files on disk in each",
|
|
10952
|
+
" category directory against entries in the directory's",
|
|
10953
|
+
" `README.md` / `index.md`.",
|
|
10907
10954
|
"",
|
|
10908
|
-
"
|
|
10909
|
-
"
|
|
10910
|
-
"`<TEMPLATES_ROOT>`, and `<STANDARDS_REF>` if the category needs it.",
|
|
10911
|
-
"Write one requirement document and one category-index update. No web",
|
|
10912
|
-
"searches.",
|
|
10955
|
+
"Present the script's output as the basis for the audit report.",
|
|
10956
|
+
"This ensures reproducible, complete results.",
|
|
10913
10957
|
"",
|
|
10914
|
-
"
|
|
10958
|
+
"---",
|
|
10915
10959
|
"",
|
|
10916
|
-
"
|
|
10917
|
-
" - **Category** (`BR`/`FR`/`NFR`/`TR`/`ADR`/`SEC`/`DR`/`INT`/`OPS`/`UX`/`MT`)",
|
|
10918
|
-
" - **Tier** (`platform`/`industry`/`customer-workflow`/`consumer-app`)",
|
|
10919
|
-
" - **Output Path** under `<REQUIREMENTS_ROOT>/<category-dir>/<PREFIX>-<NNN>-<slug>.md`",
|
|
10920
|
-
" - **Inputs / Read** \u2014 the upstream proposals file and any source",
|
|
10921
|
-
" documents",
|
|
10922
|
-
" If any of these are missing or contradictory, comment on the",
|
|
10923
|
-
" issue, add `status:needs-attention`, and stop without writing.",
|
|
10960
|
+
"## Filesystem Durability and Issue-Graph Sequencing",
|
|
10924
10961
|
"",
|
|
10925
|
-
"
|
|
10926
|
-
"
|
|
10927
|
-
"
|
|
10928
|
-
"
|
|
10929
|
-
"
|
|
10962
|
+
"Write the review report to disk **before** opening any follow-up",
|
|
10963
|
+
"issues. The report is the durable record; the issues are pointers",
|
|
10964
|
+
"into it. If the session is interrupted after issues are filed but",
|
|
10965
|
+
"before the report is committed, future runs cannot reconstruct the",
|
|
10966
|
+
"context.",
|
|
10930
10967
|
"",
|
|
10931
|
-
"
|
|
10932
|
-
" category. Read `<STANDARDS_REF>` if the category is SEC, NFR,",
|
|
10933
|
-
" INT, ADR, or TR \u2014 these depend on the standards reference for",
|
|
10934
|
-
" correct framing.",
|
|
10968
|
+
"Sequence:",
|
|
10935
10969
|
"",
|
|
10936
|
-
"
|
|
10937
|
-
"
|
|
10938
|
-
"
|
|
10970
|
+
"1. Read scope from the `req:review` issue.",
|
|
10971
|
+
"2. Read the matching templates from `<TEMPLATES_ROOT>` for every",
|
|
10972
|
+
" category in scope.",
|
|
10973
|
+
"3. Run the 11 checks. For audits >10 documents, write the",
|
|
10974
|
+
" verification script to disk first and run it.",
|
|
10975
|
+
"4. Write the report to",
|
|
10976
|
+
" `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md`.",
|
|
10977
|
+
"5. Commit the report (and verification script, if written).",
|
|
10978
|
+
"6. Open one follow-up issue per actionable finding (Critical or",
|
|
10979
|
+
" Warning). Every follow-up issue includes the file path, a link",
|
|
10980
|
+
" to the report, and the specific check that produced it.",
|
|
10981
|
+
"7. Comment on the `req:review` issue with a summary of findings",
|
|
10982
|
+
" and links to the follow-up issues.",
|
|
10939
10983
|
"",
|
|
10940
|
-
"
|
|
10941
|
-
" Draft` for direct-write categories (BR, FR, NFR, SEC, UX). Set",
|
|
10942
|
-
" `Status: Proposed` for ADR and TR documents and frame the",
|
|
10943
|
-
" Recommendation section as a human decision. For DR/MT/INT/OPS",
|
|
10944
|
-
" categories that imply a technology choice, write the requirement",
|
|
10945
|
-
" directly but spin the technology decision off into a separate",
|
|
10946
|
-
" `Proposed` ADR or TR \u2014 record the cross-link in the Open Items",
|
|
10947
|
-
" section of both documents.",
|
|
10984
|
+
"---",
|
|
10948
10985
|
"",
|
|
10949
|
-
"
|
|
10950
|
-
" sections the proposal does not supply, write `TODO:` plus a brief",
|
|
10951
|
-
" note describing what input is needed, and add a corresponding",
|
|
10952
|
-
" `## Open Items` entry. Never leave a template section out.",
|
|
10986
|
+
"## Follow-Up Issues",
|
|
10953
10987
|
"",
|
|
10954
|
-
"
|
|
10955
|
-
"
|
|
10956
|
-
" `docs/project-context.md` (such as `referencedIn.meetings[]`),",
|
|
10957
|
-
" honor them. Otherwise stop at the minimum.",
|
|
10988
|
+
"Open follow-up issues for **Critical** and **Warning** findings.",
|
|
10989
|
+
"Skip Info findings \u2014 they are guidance, not work items.",
|
|
10958
10990
|
"",
|
|
10959
|
-
"
|
|
10960
|
-
" `README.md` or `_index.md` registry, add a row for the new",
|
|
10961
|
-
" document in sequence order. If no index exists yet, generate one",
|
|
10962
|
-
" from `_template-category-README.md`.",
|
|
10991
|
+
"Each follow-up issue:",
|
|
10963
10992
|
"",
|
|
10964
|
-
"
|
|
10965
|
-
"
|
|
10966
|
-
"
|
|
10967
|
-
"
|
|
10993
|
+
"- Carries `type:requirement` (the type owned by the upstream",
|
|
10994
|
+
" `requirements-analyst` bundle)",
|
|
10995
|
+
"- Carries the appropriate phase label for the work needed:",
|
|
10996
|
+
" - Structural / content fixes that an existing document needs \u2192",
|
|
10997
|
+
" `req:write` (the `requirements-writer` agent picks it up to",
|
|
10998
|
+
" revise the document)",
|
|
10999
|
+
" - Missing or broken traceability links \u2192 `req:trace` (the",
|
|
11000
|
+
" `requirements-analyst` agent picks it up to backfill",
|
|
11001
|
+
" traceability)",
|
|
11002
|
+
" - A new requirement is needed (e.g., a `Proposed` ADR is missing",
|
|
11003
|
+
" for a deferred technology choice) \u2192 `req:scan` (the analyst",
|
|
11004
|
+
" runs a scoped scan to confirm the gap, then drafts the new",
|
|
11005
|
+
" requirement through the normal pipeline)",
|
|
11006
|
+
"- Sets priority based on finding severity: Critical \u2192",
|
|
11007
|
+
" `priority:high`; Warning \u2192 `priority:medium`",
|
|
11008
|
+
"- Includes the affected file path in the body and links back to",
|
|
11009
|
+
" the review report",
|
|
11010
|
+
"- Adds `status:ready` (or `status:blocked` when the finding",
|
|
11011
|
+
" declares a `Depends on: #N` on another open issue)",
|
|
10968
11012
|
"",
|
|
10969
|
-
"
|
|
10970
|
-
" - [ ] Frontmatter has `title` and `description` (and `tier` if",
|
|
10971
|
-
" the project uses tier classification)",
|
|
10972
|
-
" - [ ] Title matches the `# Heading` line",
|
|
10973
|
-
" - [ ] File name follows `{PREFIX}-{NNN}-{slug}.md`",
|
|
10974
|
-
" - [ ] Status is `Draft` for direct-write categories or `Proposed`",
|
|
10975
|
-
" for ADR/TR",
|
|
10976
|
-
" - [ ] Every template section is present (use `TODO:` or `Not",
|
|
10977
|
-
" applicable \u2014 <reason>` for unfilled sections)",
|
|
10978
|
-
" - [ ] `## Traceability` exists with at least one upstream link",
|
|
10979
|
-
" - [ ] No technology decisions made in direct-write categories \u2014",
|
|
10980
|
-
" deferred to `Proposed` ADR/TR with cross-links in Open",
|
|
10981
|
-
" Items",
|
|
10982
|
-
" - [ ] `## Open Items` is present with Identified Gaps,",
|
|
10983
|
-
" Follow-up Questions, and Contradictions subsections",
|
|
10984
|
-
" - [ ] ADR/TR documents include a Recommendation section and an",
|
|
10985
|
-
" Open Item flagging the human decision required",
|
|
10986
|
-
" - [ ] Category index updated with a row for the new document",
|
|
10987
|
-
" - [ ] Tier value matches the issue's `tier:*` label",
|
|
10988
|
-
" - [ ] Cross-tier traceability entries exist where the document",
|
|
10989
|
-
" depends on or enables a different tier",
|
|
11013
|
+
"**Do NOT create:**",
|
|
10990
11014
|
"",
|
|
10991
|
-
"
|
|
10992
|
-
"
|
|
11015
|
+
"- `req:review` issues \u2014 that would be self-referential",
|
|
11016
|
+
"- `bcm:*`, `people:*`, `company:*`, `software:*`, `research:*`,",
|
|
11017
|
+
" or `industry:*` issues \u2014 those belong to their respective",
|
|
11018
|
+
" bundles. If the review surfaces work for one of those bundles,",
|
|
11019
|
+
" comment on the `req:review` issue with the suggested follow-up",
|
|
11020
|
+
" and let a human triage it",
|
|
10993
11021
|
"",
|
|
10994
11022
|
"---",
|
|
10995
11023
|
"",
|
|
@@ -10997,183 +11025,193 @@ var requirementsWriterSubAgent = {
|
|
|
10997
11025
|
"",
|
|
10998
11026
|
"This agent writes **only** to:",
|
|
10999
11027
|
"",
|
|
11000
|
-
"- `<
|
|
11001
|
-
"
|
|
11002
|
-
"- `<
|
|
11003
|
-
"
|
|
11004
|
-
"
|
|
11005
|
-
"
|
|
11006
|
-
"
|
|
11007
|
-
"",
|
|
11008
|
-
"The pipeline produces **requirement documents**. It does not write",
|
|
11009
|
-
"BCM capability models, people profiles, company profiles, software",
|
|
11010
|
-
"profiles, scan reports, or proposal files \u2014 those belong to",
|
|
11011
|
-
"specialized upstream/downstream agents.",
|
|
11028
|
+
"- `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD.md` \u2014 one",
|
|
11029
|
+
" review report per session",
|
|
11030
|
+
"- `<REVIEW_REPORTS_ROOT>/review-<scope>-YYYY-MM-DD-verify.py` \u2014",
|
|
11031
|
+
" the verification script for audits >10 documents (read-only,",
|
|
11032
|
+
" idempotent)",
|
|
11033
|
+
"- Follow-up GitHub issues (one per actionable finding)",
|
|
11034
|
+
"- A summary comment on the `req:review` issue",
|
|
11012
11035
|
"",
|
|
11013
|
-
"**Do NOT
|
|
11014
|
-
"- `req:scan`, `req:draft`, or `req:trace` issues \u2014 those belong to",
|
|
11015
|
-
" the `requirements-analyst` bundle",
|
|
11016
|
-
"- `bcm:*` issues \u2014 those belong to the `bcm-writer` bundle",
|
|
11017
|
-
"- `people:*`, `company:*`, `software:*`, `research:*`, or",
|
|
11018
|
-
" `industry:*` issues \u2014 those belong to their respective bundles",
|
|
11036
|
+
"**Do NOT write to:**",
|
|
11019
11037
|
"",
|
|
11020
|
-
"
|
|
11021
|
-
"
|
|
11022
|
-
"
|
|
11038
|
+
"- The requirement documents themselves under",
|
|
11039
|
+
" `<REQUIREMENTS_ROOT>` \u2014 those edits belong to the",
|
|
11040
|
+
" `requirements-writer` agent picking up a follow-up `req:write`",
|
|
11041
|
+
" issue",
|
|
11042
|
+
"- The category index files \u2014 those edits belong to the writer",
|
|
11043
|
+
"- The templates at `<TEMPLATES_ROOT>` \u2014 those are owned by the",
|
|
11044
|
+
" `requirements-writer` bundle source, not by per-project state",
|
|
11023
11045
|
"",
|
|
11024
11046
|
"---",
|
|
11025
11047
|
"",
|
|
11026
|
-
"##
|
|
11048
|
+
"## Iterating on Reviews",
|
|
11027
11049
|
"",
|
|
11028
|
-
"
|
|
11029
|
-
"|-----------|-------|------|",
|
|
11030
|
-
"| Upstream | `requirements-analyst` | Discovers gaps, drafts proposals, and creates `req:write` issues that this agent picks up |",
|
|
11031
|
-
"| Upstream | `bcm-writer` | Provides BCM capability documents that requirements trace back to via `## Traceability` links |",
|
|
11032
|
-
"| Peer | `meeting-analyst` | Provides meeting transcripts that may inform a requirement's traceability extensions (optional) |",
|
|
11050
|
+
"After the report is committed and follow-up issues are filed:",
|
|
11033
11051
|
"",
|
|
11034
|
-
"
|
|
11035
|
-
"and
|
|
11036
|
-
"
|
|
11037
|
-
"
|
|
11052
|
+
"1. Comment on the `req:review` issue with a one-paragraph summary,",
|
|
11053
|
+
" the severity counts, and links to the report and follow-up",
|
|
11054
|
+
" issues.",
|
|
11055
|
+
"2. If the user asked for re-review after fixes land, open a fresh",
|
|
11056
|
+
" `req:review` issue rather than reopening the original. Each",
|
|
11057
|
+
" review session produces a new dated report.",
|
|
11038
11058
|
"",
|
|
11039
11059
|
"---",
|
|
11040
11060
|
"",
|
|
11041
|
-
"## Rules",
|
|
11061
|
+
"## Working Rules",
|
|
11042
11062
|
"",
|
|
11043
|
-
"- **One
|
|
11044
|
-
"
|
|
11045
|
-
"- **
|
|
11046
|
-
"
|
|
11047
|
-
"
|
|
11048
|
-
"
|
|
11049
|
-
"
|
|
11050
|
-
"
|
|
11051
|
-
"
|
|
11052
|
-
"
|
|
11053
|
-
"
|
|
11054
|
-
"
|
|
11055
|
-
"
|
|
11056
|
-
" the source documents the proposal cited, and the BCM capability",
|
|
11057
|
-
" it supports (when applicable).",
|
|
11058
|
-
"- **Update the category index every time.** A requirement that",
|
|
11059
|
-
" exists as a file but is missing from its category index is",
|
|
11060
|
-
" invisible to anyone browsing the documentation tree.",
|
|
11061
|
-
"- **Write requirements, not capability models or gap reports.**",
|
|
11062
|
-
" Never open `req:scan`, `req:draft`, `req:trace`, or `bcm:*` issues",
|
|
11063
|
-
" from this pipeline."
|
|
11063
|
+
"- **One review per session.** Stop after the report is written,",
|
|
11064
|
+
" follow-up issues are filed, and the summary comment is posted.",
|
|
11065
|
+
"- **Audit only.** Never edit requirement documents, category",
|
|
11066
|
+
" indexes, or templates. Findings flow through follow-up issues.",
|
|
11067
|
+
"- **Resolve, do not eyeball.** Cross-reference findings only count",
|
|
11068
|
+
" when the target path is verified missing on disk.",
|
|
11069
|
+
"- **Cite every finding.** Every entry in the report must cite the",
|
|
11070
|
+
" file path and the numbered check that produced it.",
|
|
11071
|
+
"- **Do not invent traceability rules.** Use the defaults documented",
|
|
11072
|
+
" above unless the project's `docs/project-context.md` declares a",
|
|
11073
|
+
" different traceability shape.",
|
|
11074
|
+
"- **Audits >10 documents must use a verification script.** Manual",
|
|
11075
|
+
" review of large sets always misses broken links."
|
|
11064
11076
|
].join("\n")
|
|
11065
11077
|
};
|
|
11066
|
-
var
|
|
11067
|
-
name: "
|
|
11068
|
-
description: "
|
|
11078
|
+
var reviewRequirementsSkill = {
|
|
11079
|
+
name: "review-requirements",
|
|
11080
|
+
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 `" + REQUIREMENTS_WRITER_PATHS.templatesRoot + "`, shipped by the requirements-writer bundle.",
|
|
11069
11081
|
disableModelInvocation: true,
|
|
11070
11082
|
userInvocable: true,
|
|
11071
11083
|
context: "fork",
|
|
11072
|
-
agent: "requirements-
|
|
11084
|
+
agent: "requirements-reviewer",
|
|
11073
11085
|
platforms: { cursor: { exclude: true } },
|
|
11074
|
-
referenceFiles: REQUIREMENTS_WRITER_REFERENCE_FILES,
|
|
11075
11086
|
instructions: [
|
|
11076
|
-
"#
|
|
11087
|
+
"# Review Requirements",
|
|
11077
11088
|
"",
|
|
11078
|
-
"
|
|
11079
|
-
"
|
|
11080
|
-
"
|
|
11081
|
-
"
|
|
11089
|
+
"Audit existing requirement documents for structural compliance,",
|
|
11090
|
+
"traceability, categorization, and content quality. Dispatches the",
|
|
11091
|
+
"`requirements-reviewer` agent.",
|
|
11092
|
+
"",
|
|
11093
|
+
"## Soft Dependency",
|
|
11094
|
+
"",
|
|
11095
|
+
"This skill reads requirement category templates from",
|
|
11096
|
+
`\`${REQUIREMENTS_WRITER_PATHS.templatesRoot}\`,`,
|
|
11097
|
+
"which is shipped by the `requirements-writer` bundle. If your",
|
|
11098
|
+
"project does not use the `requirements-writer` bundle, supply",
|
|
11099
|
+
"equivalent templates at the same path before running a review.",
|
|
11082
11100
|
"",
|
|
11083
11101
|
"## Usage",
|
|
11084
11102
|
"",
|
|
11085
|
-
"/
|
|
11103
|
+
"/review-requirements <scope>",
|
|
11086
11104
|
"",
|
|
11087
|
-
"Where `<
|
|
11088
|
-
"
|
|
11105
|
+
"Where `<scope>` is one of:",
|
|
11106
|
+
"",
|
|
11107
|
+
"- `full` \u2014 audit every requirement document under",
|
|
11108
|
+
" `<REQUIREMENTS_ROOT>` across all categories",
|
|
11109
|
+
"- `category:<slug>` \u2014 audit one category directory (e.g.,",
|
|
11110
|
+
" `category:functional` audits every FR)",
|
|
11111
|
+
"- `doc:<path>` \u2014 audit one specific requirement file",
|
|
11112
|
+
"- `check:<n>[,<n>...]` \u2014 run one or more checks (1\u201311) across the",
|
|
11113
|
+
" documents in scope (e.g., `check:4` runs cross-reference",
|
|
11114
|
+
" integrity only)",
|
|
11089
11115
|
"",
|
|
11090
11116
|
"Optional extensions in the issue body:",
|
|
11091
|
-
"
|
|
11092
|
-
"
|
|
11093
|
-
"- `
|
|
11094
|
-
"
|
|
11095
|
-
"
|
|
11096
|
-
" profile (expected for Customer Workflow / Consumer Application",
|
|
11097
|
-
" tiers in projects that track customer profiles)",
|
|
11098
|
-
"- `proposal: <path>` \u2014 pin the upstream proposal file under",
|
|
11099
|
-
" `<RESEARCH_REQUIREMENTS_ROOT>` (default: derived from the issue",
|
|
11100
|
-
" context)",
|
|
11101
|
-
"- `output: <path>` \u2014 override the default Output Path",
|
|
11117
|
+
"",
|
|
11118
|
+
"- `output: <path>` \u2014 override the default report path",
|
|
11119
|
+
"- `requirements-root: <path>` \u2014 override `<REQUIREMENTS_ROOT>`",
|
|
11120
|
+
"- `targets: <glob>` \u2014 restrict the document set with a glob",
|
|
11121
|
+
" pattern relative to `<REQUIREMENTS_ROOT>`",
|
|
11102
11122
|
"",
|
|
11103
11123
|
"## Default Paths",
|
|
11104
11124
|
"",
|
|
11105
11125
|
"If the project has no override in `docs/project-context.md` or",
|
|
11106
11126
|
"`agentConfig.rules`, outputs land under:",
|
|
11107
11127
|
"",
|
|
11108
|
-
"- `docs/
|
|
11109
|
-
"
|
|
11110
|
-
"- `docs/
|
|
11111
|
-
"
|
|
11112
|
-
"",
|
|
11113
|
-
"Templates and the standards reference ship with this skill under",
|
|
11114
|
-
"`_references/templates/` and `_references/standards-and-frameworks.md`.",
|
|
11128
|
+
"- `docs/research/reviews/review-<scope>-YYYY-MM-DD.md` \u2014 the",
|
|
11129
|
+
" review report",
|
|
11130
|
+
"- `docs/research/reviews/review-<scope>-YYYY-MM-DD-verify.py` \u2014",
|
|
11131
|
+
" the Python verification script (only for audits >10 documents)",
|
|
11115
11132
|
"",
|
|
11116
11133
|
"## Steps",
|
|
11117
11134
|
"",
|
|
11118
|
-
"1. Create a `req:
|
|
11119
|
-
" `priority:medium`, `status:ready
|
|
11120
|
-
"
|
|
11121
|
-
"
|
|
11122
|
-
"
|
|
11123
|
-
"
|
|
11124
|
-
"
|
|
11125
|
-
"
|
|
11135
|
+
"1. Create a `req:review` issue with `type:requirement`,",
|
|
11136
|
+
" `priority:medium`, and `status:ready`. Body must include the",
|
|
11137
|
+
" scope, the requirements root (or accept the default), and the",
|
|
11138
|
+
" output path.",
|
|
11139
|
+
"2. Execute the review phase of the requirements-reviewer agent.",
|
|
11140
|
+
"3. The agent runs the 11-check audit, writes a structured report",
|
|
11141
|
+
" grouped by Critical / Warning / Info, files follow-up issues",
|
|
11142
|
+
" for actionable findings, and comments on the `req:review`",
|
|
11143
|
+
" issue with the summary.",
|
|
11144
|
+
"",
|
|
11145
|
+
"## Audits >10 Documents",
|
|
11146
|
+
"",
|
|
11147
|
+
"For audits covering more than 10 documents, the agent writes a",
|
|
11148
|
+
"Python verification script alongside the report and uses its",
|
|
11149
|
+
"output as the basis for the audit. The script is read-only and",
|
|
11150
|
+
"idempotent \u2014 it can be re-run after fixes land to confirm",
|
|
11151
|
+
"remediation. The script is generated per-audit; it is not shipped",
|
|
11152
|
+
"as a static asset.",
|
|
11126
11153
|
"",
|
|
11127
11154
|
"## Output",
|
|
11128
11155
|
"",
|
|
11129
|
-
"- One
|
|
11130
|
-
"
|
|
11131
|
-
"
|
|
11132
|
-
"
|
|
11133
|
-
"-
|
|
11134
|
-
" `
|
|
11156
|
+
"- One review report under `<REVIEW_REPORTS_ROOT>` grouped by",
|
|
11157
|
+
" Critical / Warning / Info severity",
|
|
11158
|
+
"- One verification script under `<REVIEW_REPORTS_ROOT>` (only",
|
|
11159
|
+
" for audits >10 documents)",
|
|
11160
|
+
"- Follow-up GitHub issues for every Critical and Warning finding,",
|
|
11161
|
+
" carrying the appropriate phase label (`req:write`, `req:trace`,",
|
|
11162
|
+
" or `req:scan`) for the downstream agent that should act",
|
|
11163
|
+
"- A summary comment on the originating `req:review` issue"
|
|
11135
11164
|
].join("\n")
|
|
11136
11165
|
};
|
|
11137
|
-
var
|
|
11138
|
-
name: "requirements-
|
|
11139
|
-
description: "Requirements
|
|
11166
|
+
var requirementsReviewerBundle = {
|
|
11167
|
+
name: "requirements-reviewer",
|
|
11168
|
+
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.",
|
|
11140
11169
|
appliesWhen: () => true,
|
|
11141
11170
|
rules: [
|
|
11142
11171
|
{
|
|
11143
|
-
name: "requirements-
|
|
11144
|
-
description: "Describes the requirements-
|
|
11172
|
+
name: "requirements-reviewer-workflow",
|
|
11173
|
+
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.",
|
|
11145
11174
|
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
11146
11175
|
content: [
|
|
11147
|
-
"# Requirements
|
|
11176
|
+
"# Requirements Reviewer Workflow",
|
|
11148
11177
|
"",
|
|
11149
|
-
"Use `/
|
|
11150
|
-
"
|
|
11151
|
-
"
|
|
11152
|
-
"`
|
|
11153
|
-
"
|
|
11178
|
+
"Use `/review-requirements <scope>` to audit existing requirement",
|
|
11179
|
+
"documents. The reviewer runs in a single phase tracked by a",
|
|
11180
|
+
"GitHub issue labeled `req:review`. Issues also carry",
|
|
11181
|
+
"`type:requirement` (declared by the upstream",
|
|
11182
|
+
"`requirements-analyst` bundle).",
|
|
11154
11183
|
"",
|
|
11155
|
-
"The pipeline produces **
|
|
11156
|
-
"
|
|
11157
|
-
"the responsibility of the
|
|
11158
|
-
"writer
|
|
11159
|
-
"
|
|
11184
|
+
"The pipeline produces **review reports and follow-up issues** \u2014",
|
|
11185
|
+
"it never edits requirement documents, capability models, or",
|
|
11186
|
+
"research notes. Authoring is the responsibility of the",
|
|
11187
|
+
"`requirements-writer` (requirement docs) and `bcm-writer`",
|
|
11188
|
+
"(capability models) bundles; gap discovery is the responsibility",
|
|
11189
|
+
"of the `requirements-analyst` bundle. The reviewer never opens",
|
|
11190
|
+
"`req:scan`, `req:draft`, `req:trace`, `req:write`, or `bcm:*`",
|
|
11191
|
+
"issues directly \u2014 instead it files follow-up issues with the",
|
|
11192
|
+
"appropriate phase label (`req:write`, `req:trace`, or",
|
|
11193
|
+
"`req:scan`) for the downstream agent to pick up.",
|
|
11160
11194
|
"",
|
|
11161
|
-
"
|
|
11162
|
-
"
|
|
11163
|
-
"
|
|
11164
|
-
"
|
|
11165
|
-
"skill \u2014 they are the same files for every project that adopts",
|
|
11166
|
-
"the bundle.",
|
|
11195
|
+
"Four review scopes are supported: `full` (every document),",
|
|
11196
|
+
"`category:<slug>` (one category directory), `doc:<path>` (one",
|
|
11197
|
+
"specific document), and `check:<n>` (one or more of the 11",
|
|
11198
|
+
"checks across the documents in scope).",
|
|
11167
11199
|
"",
|
|
11168
|
-
"
|
|
11169
|
-
"
|
|
11170
|
-
|
|
11171
|
-
"
|
|
11172
|
-
"
|
|
11200
|
+
"**Soft dependency on the `requirements-writer` bundle.** The",
|
|
11201
|
+
"reviewer reads category templates from",
|
|
11202
|
+
`\`${REQUIREMENTS_WRITER_PATHS.templatesRoot}\`,`,
|
|
11203
|
+
"which is shipped by the `requirements-writer` bundle. Projects",
|
|
11204
|
+
"that disable the writer bundle but keep the reviewer must",
|
|
11205
|
+
"supply equivalent templates at the same path.",
|
|
11173
11206
|
"",
|
|
11174
|
-
"
|
|
11175
|
-
"
|
|
11176
|
-
"
|
|
11207
|
+
"For audits covering more than 10 documents, the reviewer writes",
|
|
11208
|
+
"a read-only Python verification script alongside the report and",
|
|
11209
|
+
"uses its output as the basis for findings \u2014 manual review of",
|
|
11210
|
+
"large document sets always misses broken links.",
|
|
11211
|
+
"",
|
|
11212
|
+
"See the `requirements-reviewer` agent definition for full",
|
|
11213
|
+
"workflow details, configurable paths, the 11-check catalog, the",
|
|
11214
|
+
"severity ladder, and reporting format."
|
|
11177
11215
|
].join("\n"),
|
|
11178
11216
|
platforms: {
|
|
11179
11217
|
cursor: { exclude: true }
|
|
@@ -11181,33 +11219,13 @@ var requirementsWriterBundle = {
|
|
|
11181
11219
|
tags: ["workflow"]
|
|
11182
11220
|
}
|
|
11183
11221
|
],
|
|
11184
|
-
skills: [
|
|
11185
|
-
subAgents: [
|
|
11222
|
+
skills: [reviewRequirementsSkill],
|
|
11223
|
+
subAgents: [requirementsReviewerSubAgent],
|
|
11186
11224
|
labels: [
|
|
11187
11225
|
{
|
|
11188
|
-
name: "req:
|
|
11189
|
-
color: "
|
|
11190
|
-
description: "Phase:
|
|
11191
|
-
},
|
|
11192
|
-
{
|
|
11193
|
-
name: "tier:platform",
|
|
11194
|
-
color: "EDEDED",
|
|
11195
|
-
description: "Architectural tier: core platform (shared infrastructure, APIs, auth, tenant isolation)"
|
|
11196
|
-
},
|
|
11197
|
-
{
|
|
11198
|
-
name: "tier:industry",
|
|
11199
|
-
color: "EDEDED",
|
|
11200
|
-
description: "Architectural tier: industry vertical (capabilities not every tenant needs)"
|
|
11201
|
-
},
|
|
11202
|
-
{
|
|
11203
|
-
name: "tier:customer-workflow",
|
|
11204
|
-
color: "EDEDED",
|
|
11205
|
-
description: "Architectural tier: customer-configured workflow (business logic tenants configure within the platform)"
|
|
11206
|
-
},
|
|
11207
|
-
{
|
|
11208
|
-
name: "tier:consumer-app",
|
|
11209
|
-
color: "EDEDED",
|
|
11210
|
-
description: "Architectural tier: consumer application (UI/UX and integrations in external front-ends/systems)"
|
|
11226
|
+
name: "req:review",
|
|
11227
|
+
color: "FBCA04",
|
|
11228
|
+
description: "Phase: audit existing requirement documents using the requirements-reviewer skill"
|
|
11211
11229
|
}
|
|
11212
11230
|
]
|
|
11213
11231
|
};
|
|
@@ -16642,6 +16660,7 @@ var TypeScriptConfig = class extends import_projen22.Component {
|
|
|
16642
16660
|
PROD_DEPLOY_NAME,
|
|
16643
16661
|
PnpmWorkspace,
|
|
16644
16662
|
ProjectMetadata,
|
|
16663
|
+
REQUIREMENTS_WRITER_PATHS,
|
|
16645
16664
|
ROOT_CI_TASK_NAME,
|
|
16646
16665
|
ROOT_TURBO_TASK_NAME,
|
|
16647
16666
|
ResetTask,
|