@codedrifters/configulator 0.0.217 → 0.0.218
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 +21 -1
- package/lib/index.d.ts +21 -1
- package/lib/index.js +2648 -12
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +2647 -12
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -236,6 +236,7 @@ __export(index_exports, {
|
|
|
236
236
|
prReviewBundle: () => prReviewBundle,
|
|
237
237
|
projenBundle: () => projenBundle,
|
|
238
238
|
requirementsAnalystBundle: () => requirementsAnalystBundle,
|
|
239
|
+
requirementsWriterBundle: () => requirementsWriterBundle,
|
|
239
240
|
researchPipelineBundle: () => researchPipelineBundle,
|
|
240
241
|
resolveModelAlias: () => resolveModelAlias,
|
|
241
242
|
resolveTemplateVariables: () => resolveTemplateVariables,
|
|
@@ -6026,8 +6027,8 @@ var requirementsAnalystSubAgent = {
|
|
|
6026
6027
|
"Dedicated agent loop for discovering requirement gaps from BCM (Business",
|
|
6027
6028
|
"Capability Model) documents, product docs, and competitive analysis \u2014 then",
|
|
6028
6029
|
"creating well-formed requirement issues for the downstream",
|
|
6029
|
-
"requirements-writer
|
|
6030
|
-
"
|
|
6030
|
+
"`requirements-writer` agent to draft. Designed for scheduled execution",
|
|
6031
|
+
"downstream of the BCM writer and company research agents.",
|
|
6031
6032
|
"",
|
|
6032
6033
|
"Follow your project's shared agent conventions (`AGENTS.md`,",
|
|
6033
6034
|
"`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
|
|
@@ -6038,8 +6039,9 @@ var requirementsAnalystSubAgent = {
|
|
|
6038
6039
|
"## Design Principles",
|
|
6039
6040
|
"",
|
|
6040
6041
|
"1. **Discover, don't write.** This agent identifies *what requirements are",
|
|
6041
|
-
" missing*. The requirements-writer
|
|
6042
|
-
" boundary keeps this agent fast and the requirements-writer
|
|
6042
|
+
" missing*. The `requirements-writer` agent writes the actual documents.",
|
|
6043
|
+
" The boundary keeps this agent fast and the `requirements-writer`",
|
|
6044
|
+
" authoritative.",
|
|
6043
6045
|
"2. **Trace everything.** Every discovered gap links to the source that",
|
|
6044
6046
|
" revealed it (a BCM model doc, competitive analysis, product doc, or",
|
|
6045
6047
|
" meeting extract).",
|
|
@@ -6297,12 +6299,14 @@ var requirementsAnalystSubAgent = {
|
|
|
6297
6299
|
"2. **Create requirement issues.** For each proposal:",
|
|
6298
6300
|
"",
|
|
6299
6301
|
" All `type:requirement` issues default to `priority:medium` (override",
|
|
6300
|
-
" only if the proposal's priority was explicitly High or Low).",
|
|
6302
|
+
" only if the proposal's priority was explicitly High or Low). Each",
|
|
6303
|
+
" issue must also carry the `req:write` phase label so the downstream",
|
|
6304
|
+
" `requirements-writer` bundle picks it up.",
|
|
6301
6305
|
"",
|
|
6302
6306
|
" ```bash",
|
|
6303
6307
|
" gh issue create \\",
|
|
6304
6308
|
' --title "docs(<category>): <PREFIX>-<NNN> \u2014 <title>" \\',
|
|
6305
|
-
' --label "type:requirement" --label "status:ready" --label "priority:medium" \\',
|
|
6309
|
+
' --label "type:requirement" --label "req:write" --label "status:ready" --label "priority:medium" \\',
|
|
6306
6310
|
' --body "## Objective',
|
|
6307
6311
|
" Write <PREFIX>-<NNN> \u2014 <title>.",
|
|
6308
6312
|
"",
|
|
@@ -6351,7 +6355,7 @@ var requirementsAnalystSubAgent = {
|
|
|
6351
6355
|
"| Upstream | BCM Writer | Scans capability-model docs for project-relevance gaps (judged against `docs/project-context.md`) |",
|
|
6352
6356
|
"| Upstream | Company Research | Scans competitive analysis for feature comparison gaps |",
|
|
6353
6357
|
"| Upstream | Meeting Analyst | Scans meeting extracts for requirement proposals |",
|
|
6354
|
-
"| Downstream |
|
|
6358
|
+
"| Downstream | `requirements-writer` | Picks up the `type:requirement` + `req:write` issues this agent creates and drafts the actual requirement document |",
|
|
6355
6359
|
"",
|
|
6356
6360
|
"**File boundaries:** Writes to `<RESEARCH_REQUIREMENTS_ROOT>/req-*.md` and",
|
|
6357
6361
|
"minor traceability edits to `<BCM_DOCS_ROOT>` and `<COMPETITIVE_ROOT>`.",
|
|
@@ -6372,7 +6376,8 @@ var requirementsAnalystSubAgent = {
|
|
|
6372
6376
|
"## Rules",
|
|
6373
6377
|
"",
|
|
6374
6378
|
"- **Discover, don't write requirements.** Create issues for the",
|
|
6375
|
-
" requirements-writer \u2014 don't write requirement documents
|
|
6379
|
+
" `requirements-writer` agent \u2014 don't write requirement documents",
|
|
6380
|
+
" directly.",
|
|
6376
6381
|
"- **Deduplicate rigorously.** Check both existing docs and open issues",
|
|
6377
6382
|
" before flagging a gap.",
|
|
6378
6383
|
"- **Respect decision authority.** Mark ADR/TR proposals as needing human",
|
|
@@ -6444,10 +6449,12 @@ var requirementsAnalystBundle = {
|
|
|
6444
6449
|
"or `req:trace`. All issues carry `type:requirement`.",
|
|
6445
6450
|
"",
|
|
6446
6451
|
"The requirements-analyst *discovers gaps and drafts proposals*; it",
|
|
6447
|
-
"does **not** write final requirement documents. Writing is the job
|
|
6448
|
-
"the downstream requirements-writer (
|
|
6449
|
-
"boundary clean: proposals land under the research
|
|
6450
|
-
"directory, not under the authoritative requirements
|
|
6452
|
+
"does **not** write final requirement documents. Writing is the job",
|
|
6453
|
+
"of the downstream `requirements-writer` agent (a separate bundle).",
|
|
6454
|
+
"Keep that boundary clean: proposals land under the research",
|
|
6455
|
+
"requirements directory, not under the authoritative requirements",
|
|
6456
|
+
"tree. The trace phase tags new issues with `req:write` so the",
|
|
6457
|
+
"writer bundle picks them up automatically.",
|
|
6451
6458
|
"",
|
|
6452
6459
|
"See the `requirements-analyst` agent definition for full workflow",
|
|
6453
6460
|
"details and phase-by-phase instructions."
|
|
@@ -6484,6 +6491,2633 @@ var requirementsAnalystBundle = {
|
|
|
6484
6491
|
]
|
|
6485
6492
|
};
|
|
6486
6493
|
|
|
6494
|
+
// src/agent/bundles/requirements-writer.ts
|
|
6495
|
+
var TEMPLATE_BR = `---
|
|
6496
|
+
title: "BR-NNN: [Business Requirement Title]"
|
|
6497
|
+
---
|
|
6498
|
+
|
|
6499
|
+
# BR-NNN: [Business Requirement Title]
|
|
6500
|
+
|
|
6501
|
+
## Metadata
|
|
6502
|
+
|
|
6503
|
+
| Field | Value |
|
|
6504
|
+
|---|---|
|
|
6505
|
+
| **ID** | BR-NNN |
|
|
6506
|
+
| **Status** | Draft |
|
|
6507
|
+
| **Tier** | [Platform \xB7 Industry \xB7 Customer Workflow \xB7 Consumer Application] |
|
|
6508
|
+
| **Implementor** | [Consortium Member \xB7 Customer \xB7 TBD \u2014 required for Customer Workflow and Consumer Application tiers. When Consortium Member, link to org profile] |
|
|
6509
|
+
| **Customer** | [Link to customer org profile if this requirement originated from or applies to a specific customer. Optional for Platform/Industry tiers, expected for Customer Workflow/Consumer Application tiers] |
|
|
6510
|
+
| **Priority** | [Critical / High / Medium / Low] |
|
|
6511
|
+
| **Owner** | [Name or role responsible for this requirement] |
|
|
6512
|
+
| **Created** | YYYY-MM-DD |
|
|
6513
|
+
| **Last Updated** | YYYY-MM-DD |
|
|
6514
|
+
|
|
6515
|
+
## Business Need
|
|
6516
|
+
|
|
6517
|
+
A clear statement of the business problem or opportunity this requirement addresses. Focus on the "why" \u2014 what pain point exists, what opportunity we're capturing, or what strategic goal this supports.
|
|
6518
|
+
|
|
6519
|
+
## Stakeholders
|
|
6520
|
+
|
|
6521
|
+
| Stakeholder | Role | Interest |
|
|
6522
|
+
|---|---|---|
|
|
6523
|
+
| [Name/Group] | [Their role] | [What they care about regarding this requirement] |
|
|
6524
|
+
|
|
6525
|
+
## Success Metrics
|
|
6526
|
+
|
|
6527
|
+
Define how we'll know this requirement has been successfully met. Metrics should be specific and measurable.
|
|
6528
|
+
|
|
6529
|
+
| Metric | Target | Measurement Method |
|
|
6530
|
+
|---|---|---|
|
|
6531
|
+
| [e.g., Onboarding completion rate] | [e.g., > 80% within 7 days] | [e.g., Analytics funnel tracking] |
|
|
6532
|
+
|
|
6533
|
+
## Scope
|
|
6534
|
+
|
|
6535
|
+
### In Scope
|
|
6536
|
+
|
|
6537
|
+
What is explicitly included in this business requirement.
|
|
6538
|
+
|
|
6539
|
+
### Out of Scope
|
|
6540
|
+
|
|
6541
|
+
What is explicitly excluded \u2014 important for preventing scope creep and setting expectations.
|
|
6542
|
+
|
|
6543
|
+
## Assumptions
|
|
6544
|
+
|
|
6545
|
+
List assumptions that underpin this requirement. Flag any that carry risk if they turn out to be wrong.
|
|
6546
|
+
|
|
6547
|
+
- [Assumption 1]
|
|
6548
|
+
- [Assumption 2]
|
|
6549
|
+
|
|
6550
|
+
## Constraints
|
|
6551
|
+
|
|
6552
|
+
Business-level constraints that bound this requirement (budget, timeline, regulatory, organizational).
|
|
6553
|
+
|
|
6554
|
+
- [Constraint 1]
|
|
6555
|
+
- [Constraint 2]
|
|
6556
|
+
|
|
6557
|
+
## Dependencies
|
|
6558
|
+
|
|
6559
|
+
Other business requirements, external factors, or organizational decisions this requirement depends on.
|
|
6560
|
+
|
|
6561
|
+
- [Dependency 1]
|
|
6562
|
+
- [Dependency 2]
|
|
6563
|
+
|
|
6564
|
+
## Traceability
|
|
6565
|
+
|
|
6566
|
+
- **Decomposes into:** [FR-NNN](../functional/FR-NNN-slug.md), [FR-NNN](../functional/FR-NNN-slug.md)
|
|
6567
|
+
- **Constrained by:** [NFR-NNN](../non-functional/NFR-NNN-slug.md)
|
|
6568
|
+
- **Related:** [SEC-NNN](../security/SEC-NNN-slug.md)
|
|
6569
|
+
- **Depends on (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [platform/industry requirement this depends on]
|
|
6570
|
+
- **Enables (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [customer-workflow/consumer-app requirement this enables]
|
|
6571
|
+
|
|
6572
|
+
## Open Items
|
|
6573
|
+
|
|
6574
|
+
### Identified Gaps
|
|
6575
|
+
|
|
6576
|
+
[Document any missing functionality, unhandled edge cases, or incomplete aspects. Number each item and assign a priority (P0/P1/P2/P3). Call out interdependencies with other open items. If none, write "None identified."]
|
|
6577
|
+
|
|
6578
|
+
1. **[Gap title]** \`[P0-P3]\`
|
|
6579
|
+
[Description of what's missing and why it matters.]
|
|
6580
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6581
|
+
|
|
6582
|
+
### Follow-up Questions
|
|
6583
|
+
|
|
6584
|
+
[Document anything ambiguous or where the motivation/reasoning cannot be confidently inferred. Number each item and assign a priority. If none, write "None identified."]
|
|
6585
|
+
|
|
6586
|
+
1. **[Question title]** \`[P0-P3]\`
|
|
6587
|
+
[The question, with context on why the answer matters.]
|
|
6588
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6589
|
+
|
|
6590
|
+
### Contradictions & Inconsistencies
|
|
6591
|
+
|
|
6592
|
+
[Document any conflicts with other requirements, code behavior, or documentation. Number each item and assign a priority. If none, write "None identified."]
|
|
6593
|
+
|
|
6594
|
+
1. **[Contradiction title]** \`[P0-P3]\`
|
|
6595
|
+
[Description of the conflict and what needs to be resolved.]
|
|
6596
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6597
|
+
|
|
6598
|
+
## Revision History
|
|
6599
|
+
|
|
6600
|
+
| Date | Author | Change |
|
|
6601
|
+
|---|---|---|
|
|
6602
|
+
| YYYY-MM-DD | [Name] | Initial draft |
|
|
6603
|
+
`;
|
|
6604
|
+
var TEMPLATE_FR = `---
|
|
6605
|
+
title: "FR-NNN: [Functional Requirement Title]"
|
|
6606
|
+
---
|
|
6607
|
+
|
|
6608
|
+
# FR-NNN: [Functional Requirement Title]
|
|
6609
|
+
|
|
6610
|
+
## Metadata
|
|
6611
|
+
|
|
6612
|
+
| Field | Value |
|
|
6613
|
+
|---|---|
|
|
6614
|
+
| **ID** | FR-NNN |
|
|
6615
|
+
| **Status** | Draft |
|
|
6616
|
+
| **Tier** | [Platform \xB7 Industry \xB7 Customer Workflow \xB7 Consumer Application] |
|
|
6617
|
+
| **Implementor** | [Consortium Member \xB7 Customer \xB7 TBD \u2014 required for Customer Workflow and Consumer Application tiers. When Consortium Member, link to org profile] |
|
|
6618
|
+
| **Customer** | [Link to customer org profile if this requirement originated from or applies to a specific customer. Optional for Platform/Industry tiers, expected for Customer Workflow/Consumer Application tiers] |
|
|
6619
|
+
| **Priority** | [Must Have / Should Have / Could Have / Won't Have] |
|
|
6620
|
+
| **Owner** | [Name or role] |
|
|
6621
|
+
| **Created** | YYYY-MM-DD |
|
|
6622
|
+
| **Last Updated** | YYYY-MM-DD |
|
|
6623
|
+
|
|
6624
|
+
## User Story
|
|
6625
|
+
|
|
6626
|
+
**As a** [actor/role],
|
|
6627
|
+
**I want to** [action/capability],
|
|
6628
|
+
**So that** [business value/outcome].
|
|
6629
|
+
|
|
6630
|
+
## Description
|
|
6631
|
+
|
|
6632
|
+
A narrative description of this feature or behavior. Include enough context that someone unfamiliar with the project can understand what the system does and why it matters.
|
|
6633
|
+
|
|
6634
|
+
## Actors
|
|
6635
|
+
|
|
6636
|
+
| Actor | Description |
|
|
6637
|
+
|---|---|
|
|
6638
|
+
| [e.g., Registered User] | [Who they are and what access level they have] |
|
|
6639
|
+
|
|
6640
|
+
## Preconditions
|
|
6641
|
+
|
|
6642
|
+
Conditions that must be true before this functionality can be used.
|
|
6643
|
+
|
|
6644
|
+
- [Precondition 1]
|
|
6645
|
+
- [Precondition 2]
|
|
6646
|
+
|
|
6647
|
+
## Main Flow
|
|
6648
|
+
|
|
6649
|
+
The primary happy-path sequence of interactions.
|
|
6650
|
+
|
|
6651
|
+
1. [Step 1]
|
|
6652
|
+
2. [Step 2]
|
|
6653
|
+
3. [Step 3]
|
|
6654
|
+
|
|
6655
|
+
## Alternative Flows
|
|
6656
|
+
|
|
6657
|
+
### AF-1: [Alternative Flow Name]
|
|
6658
|
+
|
|
6659
|
+
**Trigger:** [What causes this alternative path]
|
|
6660
|
+
|
|
6661
|
+
1. [Step 1]
|
|
6662
|
+
2. [Step 2]
|
|
6663
|
+
|
|
6664
|
+
### AF-2: [Alternative Flow Name]
|
|
6665
|
+
|
|
6666
|
+
**Trigger:** [What causes this alternative path]
|
|
6667
|
+
|
|
6668
|
+
1. [Step 1]
|
|
6669
|
+
2. [Step 2]
|
|
6670
|
+
|
|
6671
|
+
## Exception Flows
|
|
6672
|
+
|
|
6673
|
+
### EF-1: [Exception Flow Name]
|
|
6674
|
+
|
|
6675
|
+
**Trigger:** [What error condition causes this]
|
|
6676
|
+
|
|
6677
|
+
1. [Step 1 \u2014 how the system responds]
|
|
6678
|
+
2. [Step 2]
|
|
6679
|
+
|
|
6680
|
+
## Acceptance Criteria
|
|
6681
|
+
|
|
6682
|
+
Specific, testable conditions that must be met for this requirement to be considered complete.
|
|
6683
|
+
|
|
6684
|
+
- [ ] [Criterion 1 \u2014 stated as a concrete, verifiable condition]
|
|
6685
|
+
- [ ] [Criterion 2]
|
|
6686
|
+
- [ ] [Criterion 3]
|
|
6687
|
+
|
|
6688
|
+
## Business Rules
|
|
6689
|
+
|
|
6690
|
+
Rules that govern the behavior described in this requirement.
|
|
6691
|
+
|
|
6692
|
+
| Rule ID | Description |
|
|
6693
|
+
|---|---|
|
|
6694
|
+
| BIZ-01 | [e.g., Email addresses must be unique across the system] |
|
|
6695
|
+
| BIZ-02 | [e.g., Passwords must be at least 12 characters] |
|
|
6696
|
+
|
|
6697
|
+
## UI/UX Considerations
|
|
6698
|
+
|
|
6699
|
+
Notes on how this feature should present to the user. Reference UX requirements where applicable.
|
|
6700
|
+
|
|
6701
|
+
## Data Requirements
|
|
6702
|
+
|
|
6703
|
+
What data is created, read, updated, or deleted by this feature. Reference DR documents where applicable.
|
|
6704
|
+
|
|
6705
|
+
## Traceability
|
|
6706
|
+
|
|
6707
|
+
- **Implements:** [BR-NNN](../business/BR-NNN-slug.md)
|
|
6708
|
+
- **Constrained by:** [NFR-NNN](../non-functional/NFR-NNN-slug.md)
|
|
6709
|
+
- **Related:** [INT-NNN](../integration/INT-NNN-slug.md)
|
|
6710
|
+
- **Depends on (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [platform/industry requirement this depends on]
|
|
6711
|
+
- **Enables (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [customer-workflow/consumer-app requirement this enables]
|
|
6712
|
+
|
|
6713
|
+
## Open Items
|
|
6714
|
+
|
|
6715
|
+
### Identified Gaps
|
|
6716
|
+
|
|
6717
|
+
[Document any missing functionality, unhandled edge cases, or incomplete aspects. Number each item and assign a priority (P0/P1/P2/P3). Call out interdependencies with other open items. If none, write "None identified."]
|
|
6718
|
+
|
|
6719
|
+
1. **[Gap title]** \`[P0-P3]\`
|
|
6720
|
+
[Description of what's missing and why it matters.]
|
|
6721
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6722
|
+
|
|
6723
|
+
### Follow-up Questions
|
|
6724
|
+
|
|
6725
|
+
[Document anything ambiguous or where the motivation/reasoning cannot be confidently inferred. Number each item and assign a priority. If none, write "None identified."]
|
|
6726
|
+
|
|
6727
|
+
1. **[Question title]** \`[P0-P3]\`
|
|
6728
|
+
[The question, with context on why the answer matters.]
|
|
6729
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6730
|
+
|
|
6731
|
+
### Contradictions & Inconsistencies
|
|
6732
|
+
|
|
6733
|
+
[Document any conflicts with other requirements, code behavior, or documentation. Number each item and assign a priority. If none, write "None identified."]
|
|
6734
|
+
|
|
6735
|
+
1. **[Contradiction title]** \`[P0-P3]\`
|
|
6736
|
+
[Description of the conflict and what needs to be resolved.]
|
|
6737
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6738
|
+
|
|
6739
|
+
## Revision History
|
|
6740
|
+
|
|
6741
|
+
| Date | Author | Change |
|
|
6742
|
+
|---|---|---|
|
|
6743
|
+
| YYYY-MM-DD | [Name] | Initial draft |
|
|
6744
|
+
`;
|
|
6745
|
+
var TEMPLATE_NFR = `---
|
|
6746
|
+
title: "NFR-NNN: [Non-Functional Requirement Title]"
|
|
6747
|
+
---
|
|
6748
|
+
|
|
6749
|
+
# NFR-NNN: [Non-Functional Requirement Title]
|
|
6750
|
+
|
|
6751
|
+
## Metadata
|
|
6752
|
+
|
|
6753
|
+
| Field | Value |
|
|
6754
|
+
|---|---|
|
|
6755
|
+
| **ID** | NFR-NNN |
|
|
6756
|
+
| **Status** | Draft |
|
|
6757
|
+
| **Tier** | [Platform \xB7 Industry \xB7 Customer Workflow \xB7 Consumer Application] |
|
|
6758
|
+
| **Implementor** | [Consortium Member \xB7 Customer \xB7 TBD \u2014 required for Customer Workflow and Consumer Application tiers. When Consortium Member, link to org profile] |
|
|
6759
|
+
| **Customer** | [Link to customer org profile if this requirement originated from or applies to a specific customer. Optional for Platform/Industry tiers, expected for Customer Workflow/Consumer Application tiers] |
|
|
6760
|
+
| **Quality Attribute** | [Performance / Reliability / Scalability / Maintainability / Portability / Availability] |
|
|
6761
|
+
| **Priority** | [Critical / High / Medium / Low] |
|
|
6762
|
+
| **Owner** | [Name or role] |
|
|
6763
|
+
| **Created** | YYYY-MM-DD |
|
|
6764
|
+
| **Last Updated** | YYYY-MM-DD |
|
|
6765
|
+
|
|
6766
|
+
## Description
|
|
6767
|
+
|
|
6768
|
+
What quality attribute this requirement addresses and why it matters for the system.
|
|
6769
|
+
|
|
6770
|
+
## Measurable Targets
|
|
6771
|
+
|
|
6772
|
+
Non-functional requirements must have numeric, measurable targets \u2014 vague statements like "the system should be fast" are not acceptable.
|
|
6773
|
+
|
|
6774
|
+
| Metric | Target | Measurement Method | Measurement Frequency |
|
|
6775
|
+
|---|---|---|---|
|
|
6776
|
+
| [e.g., API response time (p99)] | [e.g., < 200ms] | [e.g., Datadog APM percentile tracking] | [e.g., Continuous] |
|
|
6777
|
+
| [e.g., System availability] | [e.g., 99.9% monthly] | [e.g., Uptime monitoring (Pingdom/UptimeRobot)] | [e.g., Monthly] |
|
|
6778
|
+
|
|
6779
|
+
## Current Baseline
|
|
6780
|
+
|
|
6781
|
+
If this is being applied to an existing system, document the current measured values so improvement can be tracked.
|
|
6782
|
+
|
|
6783
|
+
| Metric | Current Value | Date Measured |
|
|
6784
|
+
|---|---|---|
|
|
6785
|
+
| [Metric] | [Current value or "Not yet measured"] | [Date] |
|
|
6786
|
+
|
|
6787
|
+
## Rationale
|
|
6788
|
+
|
|
6789
|
+
Why this target was chosen. What business need or user expectation drives this number? What are the consequences of not meeting it?
|
|
6790
|
+
|
|
6791
|
+
## Applicable Scope
|
|
6792
|
+
|
|
6793
|
+
Which parts of the system does this requirement apply to? Be specific \u2014 "all API endpoints" or "the checkout flow" rather than "the system."
|
|
6794
|
+
|
|
6795
|
+
## Approach
|
|
6796
|
+
|
|
6797
|
+
High-level approach for meeting this target. Reference ADRs and TRs for implementation details.
|
|
6798
|
+
|
|
6799
|
+
## Monitoring & Alerting
|
|
6800
|
+
|
|
6801
|
+
How compliance with this requirement will be monitored in production. Reference OPS requirements where applicable.
|
|
6802
|
+
|
|
6803
|
+
| Alert Condition | Threshold | Action |
|
|
6804
|
+
|---|---|---|
|
|
6805
|
+
| [e.g., p99 latency exceeds target] | [e.g., > 200ms for 5 minutes] | [e.g., Page on-call engineer] |
|
|
6806
|
+
|
|
6807
|
+
## Traceability
|
|
6808
|
+
|
|
6809
|
+
- **Supports:** [BR-NNN](../business/BR-NNN-slug.md)
|
|
6810
|
+
- **Constrains:** [FR-NNN](../functional/FR-NNN-slug.md)
|
|
6811
|
+
- **Monitored by:** [OPS-NNN](../operational/OPS-NNN-slug.md)
|
|
6812
|
+
- **Depends on (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [platform/industry requirement this depends on]
|
|
6813
|
+
- **Enables (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [customer-workflow/consumer-app requirement this enables]
|
|
6814
|
+
|
|
6815
|
+
## Open Items
|
|
6816
|
+
|
|
6817
|
+
### Identified Gaps
|
|
6818
|
+
|
|
6819
|
+
[Document any missing functionality, unhandled edge cases, or incomplete aspects. Number each item and assign a priority (P0/P1/P2/P3). Call out interdependencies with other open items. If none, write "None identified."]
|
|
6820
|
+
|
|
6821
|
+
1. **[Gap title]** \`[P0-P3]\`
|
|
6822
|
+
[Description of what's missing and why it matters.]
|
|
6823
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6824
|
+
|
|
6825
|
+
### Follow-up Questions
|
|
6826
|
+
|
|
6827
|
+
[Document anything ambiguous or where the motivation/reasoning cannot be confidently inferred. Number each item and assign a priority. If none, write "None identified."]
|
|
6828
|
+
|
|
6829
|
+
1. **[Question title]** \`[P0-P3]\`
|
|
6830
|
+
[The question, with context on why the answer matters.]
|
|
6831
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6832
|
+
|
|
6833
|
+
### Contradictions & Inconsistencies
|
|
6834
|
+
|
|
6835
|
+
[Document any conflicts with other requirements, code behavior, or documentation. Number each item and assign a priority. If none, write "None identified."]
|
|
6836
|
+
|
|
6837
|
+
1. **[Contradiction title]** \`[P0-P3]\`
|
|
6838
|
+
[Description of the conflict and what needs to be resolved.]
|
|
6839
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6840
|
+
|
|
6841
|
+
## Revision History
|
|
6842
|
+
|
|
6843
|
+
| Date | Author | Change |
|
|
6844
|
+
|---|---|---|
|
|
6845
|
+
| YYYY-MM-DD | [Name] | Initial draft |
|
|
6846
|
+
`;
|
|
6847
|
+
var TEMPLATE_TR = `---
|
|
6848
|
+
title: "TR-NNN: [Technical Requirement Title]"
|
|
6849
|
+
---
|
|
6850
|
+
|
|
6851
|
+
# TR-NNN: [Technical Requirement Title]
|
|
6852
|
+
|
|
6853
|
+
## Metadata
|
|
6854
|
+
|
|
6855
|
+
| Field | Value |
|
|
6856
|
+
|---|---|
|
|
6857
|
+
| **ID** | TR-NNN |
|
|
6858
|
+
| **Status** | Draft |
|
|
6859
|
+
| **Tier** | [Platform \xB7 Industry \xB7 Customer Workflow \xB7 Consumer Application] |
|
|
6860
|
+
| **Implementor** | [Consortium Member \xB7 Customer \xB7 TBD \u2014 required for Customer Workflow and Consumer Application tiers. When Consortium Member, link to org profile] |
|
|
6861
|
+
| **Customer** | [Link to customer org profile if this requirement originated from or applies to a specific customer. Optional for Platform/Industry tiers, expected for Customer Workflow/Consumer Application tiers] |
|
|
6862
|
+
| **Category** | [Language / Framework / Database / Infrastructure / Library / Tool] |
|
|
6863
|
+
| **Owner** | [Name or role] |
|
|
6864
|
+
| **Created** | YYYY-MM-DD |
|
|
6865
|
+
| **Last Updated** | YYYY-MM-DD |
|
|
6866
|
+
|
|
6867
|
+
## Technology Choice
|
|
6868
|
+
|
|
6869
|
+
When **Accepted**: Fill in the selected technology.
|
|
6870
|
+
|
|
6871
|
+
When **Proposed**: Write "Pending human review. See Recommendation below." and leave Version/License/Vendor as TBD.
|
|
6872
|
+
|
|
6873
|
+
| Field | Value |
|
|
6874
|
+
|---|---|
|
|
6875
|
+
| **Technology** | [e.g., PostgreSQL] |
|
|
6876
|
+
| **Version** | [e.g., 16+ (observed: 16-alpine at time of documentation). Version will naturally drift upward through routine maintenance.] |
|
|
6877
|
+
| **License** | [e.g., PostgreSQL License (permissive, OSI-approved)] |
|
|
6878
|
+
| **Vendor/Maintainer** | [e.g., PostgreSQL Global Development Group] |
|
|
6879
|
+
|
|
6880
|
+
## Alternatives Considered
|
|
6881
|
+
|
|
6882
|
+
List every viable technology option, including the recommended one. Each alternative gets the same level of analysis.
|
|
6883
|
+
|
|
6884
|
+
### Option 1: [Technology Name]
|
|
6885
|
+
|
|
6886
|
+
**Description:** [What this technology is and how it would be used]
|
|
6887
|
+
|
|
6888
|
+
**Pros:**
|
|
6889
|
+
- [Pro 1]
|
|
6890
|
+
- [Pro 2]
|
|
6891
|
+
|
|
6892
|
+
**Cons:**
|
|
6893
|
+
- [Con 1]
|
|
6894
|
+
- [Con 2]
|
|
6895
|
+
|
|
6896
|
+
**License:** [License type]
|
|
6897
|
+
**Maturity:** [Established / Growing / Emerging]
|
|
6898
|
+
|
|
6899
|
+
### Option 2: [Technology Name]
|
|
6900
|
+
|
|
6901
|
+
**Description:** [What this technology is and how it would be used]
|
|
6902
|
+
|
|
6903
|
+
**Pros:**
|
|
6904
|
+
- [Pro 1]
|
|
6905
|
+
|
|
6906
|
+
**Cons:**
|
|
6907
|
+
- [Con 1]
|
|
6908
|
+
|
|
6909
|
+
**License:** [License type]
|
|
6910
|
+
**Maturity:** [Established / Growing / Emerging]
|
|
6911
|
+
|
|
6912
|
+
## Recommendation
|
|
6913
|
+
|
|
6914
|
+
**Recommended option:** [Name of the recommended technology]
|
|
6915
|
+
|
|
6916
|
+
**Why this option:** [A well-reasoned explanation of why this technology best fits the context, constraints, and goals. Address the key trade-offs honestly \u2014 explain why the cons are acceptable and why other options were not preferred.]
|
|
6917
|
+
|
|
6918
|
+
**Key trade-offs accepted:** [What you're giving up by choosing this option over others]
|
|
6919
|
+
|
|
6920
|
+
When the status is \`Proposed\`, this section frames the decision for the human reviewer. When \`Accepted\`, this section documents the reasoning behind the choice.
|
|
6921
|
+
|
|
6922
|
+
## Rationale
|
|
6923
|
+
|
|
6924
|
+
When **Accepted**: Summarize why this technology was selected. Reference the ADR that records the decision process if one exists.
|
|
6925
|
+
|
|
6926
|
+
When **Proposed**: Write "See Recommendation above. Awaiting human decision."
|
|
6927
|
+
|
|
6928
|
+
## Usage Context
|
|
6929
|
+
|
|
6930
|
+
How and where this technology is used in the system. Be specific about which components or layers depend on it.
|
|
6931
|
+
|
|
6932
|
+
## Version Constraints
|
|
6933
|
+
|
|
6934
|
+
Any version pinning, upgrade policies, or compatibility requirements. Assume versions will drift upward over time through routine maintenance unless there is a specific reason to pin.
|
|
6935
|
+
|
|
6936
|
+
- **Minimum version:** [version \u2014 the floor below which compatibility is not guaranteed]
|
|
6937
|
+
- **Observed version:** [version at time of documentation]
|
|
6938
|
+
- **Maximum version:** [version or "latest stable" \u2014 only specify if there's a known ceiling]
|
|
6939
|
+
- **Upgrade policy:** [e.g., "Track latest minor releases within 30 days; major version upgrades require ADR"]
|
|
6940
|
+
- **Version-sensitive notes:** [Any specific features or APIs used that depend on this version floor \u2014 helps future developers understand what might break if they don't meet the minimum]
|
|
6941
|
+
|
|
6942
|
+
## Configuration Standards
|
|
6943
|
+
|
|
6944
|
+
Key configuration decisions, defaults, or standards that apply to this technology across the project.
|
|
6945
|
+
|
|
6946
|
+
## Dependencies & Compatibility
|
|
6947
|
+
|
|
6948
|
+
Other technologies this choice interacts with, and any known compatibility constraints.
|
|
6949
|
+
|
|
6950
|
+
| Dependency | Relationship | Constraint |
|
|
6951
|
+
|---|---|---|
|
|
6952
|
+
| [e.g., Node.js runtime] | [Required by] | [e.g., v18 LTS or later] |
|
|
6953
|
+
|
|
6954
|
+
## Risks & Mitigations
|
|
6955
|
+
|
|
6956
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
6957
|
+
|---|---|---|---|
|
|
6958
|
+
| [e.g., Vendor discontinues support] | [Low/Medium/High] | [Low/Medium/High] | [e.g., Open-source, community-maintained] |
|
|
6959
|
+
|
|
6960
|
+
## Traceability
|
|
6961
|
+
|
|
6962
|
+
- **Justified by:** [ADR-NNN](../architectural-decisions/ADR-NNN-slug.md)
|
|
6963
|
+
- **Supports:** [FR-NNN](../functional/FR-NNN-slug.md)
|
|
6964
|
+
- **Constrained by:** [NFR-NNN](../non-functional/NFR-NNN-slug.md)
|
|
6965
|
+
- **Depends on (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [platform/industry requirement this depends on]
|
|
6966
|
+
- **Enables (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [customer-workflow/consumer-app requirement this enables]
|
|
6967
|
+
|
|
6968
|
+
## Open Items
|
|
6969
|
+
|
|
6970
|
+
### Identified Gaps
|
|
6971
|
+
|
|
6972
|
+
[Document any missing functionality, unhandled edge cases, or incomplete aspects. Number each item and assign a priority (P0/P1/P2/P3). Call out interdependencies with other open items. If none, write "None identified."]
|
|
6973
|
+
|
|
6974
|
+
1. **[Gap title]** \`[P0-P3]\`
|
|
6975
|
+
[Description of what's missing and why it matters.]
|
|
6976
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6977
|
+
|
|
6978
|
+
### Follow-up Questions
|
|
6979
|
+
|
|
6980
|
+
[Document anything ambiguous or where the motivation/reasoning cannot be confidently inferred. Number each item and assign a priority. If none, write "None identified."]
|
|
6981
|
+
|
|
6982
|
+
1. **[Question title]** \`[P0-P3]\`
|
|
6983
|
+
[The question, with context on why the answer matters.]
|
|
6984
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6985
|
+
|
|
6986
|
+
### Contradictions & Inconsistencies
|
|
6987
|
+
|
|
6988
|
+
[Document any conflicts with other requirements, code behavior, or documentation. Number each item and assign a priority. If none, write "None identified."]
|
|
6989
|
+
|
|
6990
|
+
1. **[Contradiction title]** \`[P0-P3]\`
|
|
6991
|
+
[Description of the conflict and what needs to be resolved.]
|
|
6992
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
6993
|
+
|
|
6994
|
+
## Revision History
|
|
6995
|
+
|
|
6996
|
+
| Date | Author | Change |
|
|
6997
|
+
|---|---|---|
|
|
6998
|
+
| YYYY-MM-DD | [Name] | Initial draft |
|
|
6999
|
+
`;
|
|
7000
|
+
var TEMPLATE_ADR = `---
|
|
7001
|
+
title: "ADR-NNN: [Decision Title]"
|
|
7002
|
+
---
|
|
7003
|
+
|
|
7004
|
+
# ADR-NNN: [Decision Title]
|
|
7005
|
+
|
|
7006
|
+
## Metadata
|
|
7007
|
+
|
|
7008
|
+
| Field | Value |
|
|
7009
|
+
|---|---|
|
|
7010
|
+
| **ID** | ADR-NNN |
|
|
7011
|
+
| **Status** | Draft |
|
|
7012
|
+
| **Tier** | [Platform \xB7 Industry \xB7 Customer Workflow \xB7 Consumer Application] |
|
|
7013
|
+
| **Implementor** | [Consortium Member \xB7 Customer \xB7 TBD \u2014 required for Customer Workflow and Consumer Application tiers. When Consortium Member, link to org profile] |
|
|
7014
|
+
| **Customer** | [Link to customer org profile if this requirement originated from or applies to a specific customer. Optional for Platform/Industry tiers, expected for Customer Workflow/Consumer Application tiers] |
|
|
7015
|
+
| **Decision Date** | YYYY-MM-DD |
|
|
7016
|
+
| **Decision Makers** | [Names or roles involved in the decision] |
|
|
7017
|
+
| **Created** | YYYY-MM-DD |
|
|
7018
|
+
| **Last Updated** | YYYY-MM-DD |
|
|
7019
|
+
|
|
7020
|
+
## Context
|
|
7021
|
+
|
|
7022
|
+
What is the issue that we're seeing that motivates this decision or change? What forces are at play \u2014 technical constraints, business pressures, team capabilities, timeline?
|
|
7023
|
+
|
|
7024
|
+
## Decision
|
|
7025
|
+
|
|
7026
|
+
When **Accepted**: State the architectural decision clearly and concisely. Start with "We will..." or "We have decided to..."
|
|
7027
|
+
|
|
7028
|
+
When **Proposed**: Write "Pending human review. See Recommendation below." Do not make the decision \u2014 present the analysis so a human can decide.
|
|
7029
|
+
|
|
7030
|
+
## Alternatives Considered
|
|
7031
|
+
|
|
7032
|
+
List every viable option, including the recommended one. Each alternative gets the same level of analysis \u2014 do not shortchange options you don't prefer.
|
|
7033
|
+
|
|
7034
|
+
### Alternative 1: [Name]
|
|
7035
|
+
|
|
7036
|
+
**Description:** [What this alternative entails \u2014 enough detail to evaluate it]
|
|
7037
|
+
|
|
7038
|
+
**Pros:**
|
|
7039
|
+
- [Pro 1]
|
|
7040
|
+
- [Pro 2]
|
|
7041
|
+
|
|
7042
|
+
**Cons:**
|
|
7043
|
+
- [Con 1]
|
|
7044
|
+
- [Con 2]
|
|
7045
|
+
|
|
7046
|
+
### Alternative 2: [Name]
|
|
7047
|
+
|
|
7048
|
+
**Description:** [What this alternative entails]
|
|
7049
|
+
|
|
7050
|
+
**Pros:**
|
|
7051
|
+
- [Pro 1]
|
|
7052
|
+
|
|
7053
|
+
**Cons:**
|
|
7054
|
+
- [Con 1]
|
|
7055
|
+
|
|
7056
|
+
## Recommendation
|
|
7057
|
+
|
|
7058
|
+
**Recommended option:** [Name of the recommended alternative]
|
|
7059
|
+
|
|
7060
|
+
**Why this option:** [A well-reasoned explanation of why this alternative best fits the context, constraints, and goals. Address the key trade-offs honestly \u2014 explain why the cons of the recommended option are acceptable and why the pros of rejected alternatives don't outweigh their cons in this context.]
|
|
7061
|
+
|
|
7062
|
+
**Key trade-offs accepted:** [What you're giving up by choosing this option over others]
|
|
7063
|
+
|
|
7064
|
+
When the status is \`Proposed\`, this section frames the decision for the human reviewer. When \`Accepted\`, this section documents the reasoning behind the choice.
|
|
7065
|
+
|
|
7066
|
+
## Consequences
|
|
7067
|
+
|
|
7068
|
+
### Positive
|
|
7069
|
+
|
|
7070
|
+
- [Positive consequence 1]
|
|
7071
|
+
- [Positive consequence 2]
|
|
7072
|
+
|
|
7073
|
+
### Negative
|
|
7074
|
+
|
|
7075
|
+
- [Negative consequence 1 \u2014 every decision has trade-offs; document them honestly]
|
|
7076
|
+
- [Negative consequence 2]
|
|
7077
|
+
|
|
7078
|
+
### Neutral
|
|
7079
|
+
|
|
7080
|
+
- [Neutral observation about what changes as a result of this decision]
|
|
7081
|
+
|
|
7082
|
+
## Compliance & Constraints
|
|
7083
|
+
|
|
7084
|
+
Any regulatory, security, or organizational constraints that influenced this decision.
|
|
7085
|
+
|
|
7086
|
+
## Implementation Notes
|
|
7087
|
+
|
|
7088
|
+
High-level guidance for implementing this decision. Detailed implementation goes in TR and FR documents.
|
|
7089
|
+
|
|
7090
|
+
## Traceability
|
|
7091
|
+
|
|
7092
|
+
- **Supports:** [BR-NNN](../business/BR-NNN-slug.md)
|
|
7093
|
+
- **Implemented by:** [TR-NNN](../technical/TR-NNN-slug.md)
|
|
7094
|
+
- **Related:** [ADR-NNN](ADR-NNN-slug.md)
|
|
7095
|
+
- **Depends on (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [platform/industry requirement this depends on]
|
|
7096
|
+
- **Enables (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [customer-workflow/consumer-app requirement this enables]
|
|
7097
|
+
|
|
7098
|
+
## Open Items
|
|
7099
|
+
|
|
7100
|
+
### Identified Gaps
|
|
7101
|
+
|
|
7102
|
+
[Document any missing functionality, unhandled edge cases, or incomplete aspects. Number each item and assign a priority (P0/P1/P2/P3). Call out interdependencies with other open items. If none, write "None identified."]
|
|
7103
|
+
|
|
7104
|
+
1. **[Gap title]** \`[P0-P3]\`
|
|
7105
|
+
[Description of what's missing and why it matters.]
|
|
7106
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7107
|
+
|
|
7108
|
+
### Follow-up Questions
|
|
7109
|
+
|
|
7110
|
+
[Document anything ambiguous or where the motivation/reasoning cannot be confidently inferred. Number each item and assign a priority. If none, write "None identified."]
|
|
7111
|
+
|
|
7112
|
+
1. **[Question title]** \`[P0-P3]\`
|
|
7113
|
+
[The question, with context on why the answer matters.]
|
|
7114
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7115
|
+
|
|
7116
|
+
### Contradictions & Inconsistencies
|
|
7117
|
+
|
|
7118
|
+
[Document any conflicts with other requirements, code behavior, or documentation. Number each item and assign a priority. If none, write "None identified."]
|
|
7119
|
+
|
|
7120
|
+
1. **[Contradiction title]** \`[P0-P3]\`
|
|
7121
|
+
[Description of the conflict and what needs to be resolved.]
|
|
7122
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7123
|
+
|
|
7124
|
+
## Revision History
|
|
7125
|
+
|
|
7126
|
+
| Date | Author | Change |
|
|
7127
|
+
|---|---|---|
|
|
7128
|
+
| YYYY-MM-DD | [Name] | Initial draft |
|
|
7129
|
+
`;
|
|
7130
|
+
var TEMPLATE_SEC = `---
|
|
7131
|
+
title: "SEC-NNN: [Security Requirement Title]"
|
|
7132
|
+
---
|
|
7133
|
+
|
|
7134
|
+
# SEC-NNN: [Security Requirement Title]
|
|
7135
|
+
|
|
7136
|
+
## Metadata
|
|
7137
|
+
|
|
7138
|
+
| Field | Value |
|
|
7139
|
+
|---|---|
|
|
7140
|
+
| **ID** | SEC-NNN |
|
|
7141
|
+
| **Status** | Draft |
|
|
7142
|
+
| **Tier** | [Platform \xB7 Industry \xB7 Customer Workflow \xB7 Consumer Application] |
|
|
7143
|
+
| **Implementor** | [Consortium Member \xB7 Customer \xB7 TBD \u2014 required for Customer Workflow and Consumer Application tiers. When Consortium Member, link to org profile] |
|
|
7144
|
+
| **Customer** | [Link to customer org profile if this requirement originated from or applies to a specific customer. Optional for Platform/Industry tiers, expected for Customer Workflow/Consumer Application tiers] |
|
|
7145
|
+
| **Security Domain** | [Authentication / Authorization / Data Protection / Audit / Compliance / Network / Input Validation] |
|
|
7146
|
+
| **Priority** | [Critical / High / Medium / Low] |
|
|
7147
|
+
| **Owner** | [Name or role] |
|
|
7148
|
+
| **Created** | YYYY-MM-DD |
|
|
7149
|
+
| **Last Updated** | YYYY-MM-DD |
|
|
7150
|
+
|
|
7151
|
+
## Description
|
|
7152
|
+
|
|
7153
|
+
What security concern this requirement addresses and why it matters.
|
|
7154
|
+
|
|
7155
|
+
## Threat Model Reference
|
|
7156
|
+
|
|
7157
|
+
What threats does this requirement mitigate? Reference any formal threat modeling artifacts if they exist.
|
|
7158
|
+
|
|
7159
|
+
| Threat | STRIDE Category | Severity | This Requirement Mitigates |
|
|
7160
|
+
|---|---|---|---|
|
|
7161
|
+
| [e.g., Unauthorized access to tenant data] | [e.g., Elevation of Privilege] | [Critical/High/Medium/Low] | [How] |
|
|
7162
|
+
|
|
7163
|
+
## Requirements
|
|
7164
|
+
|
|
7165
|
+
### Controls
|
|
7166
|
+
|
|
7167
|
+
Specific security controls that must be implemented.
|
|
7168
|
+
|
|
7169
|
+
| Control ID | Description | OWASP ASVS Ref | NIST 800-53 Ref |
|
|
7170
|
+
|---|---|---|---|
|
|
7171
|
+
| [e.g., SEC-001-C1] | [e.g., All passwords hashed with bcrypt, cost factor \u2265 12] | [e.g., V2.4.1] | [e.g., IA-5(1)] |
|
|
7172
|
+
|
|
7173
|
+
### Policies
|
|
7174
|
+
|
|
7175
|
+
Organizational or procedural security policies this requirement enforces.
|
|
7176
|
+
|
|
7177
|
+
- [Policy 1]
|
|
7178
|
+
- [Policy 2]
|
|
7179
|
+
|
|
7180
|
+
## Applicable Regulations
|
|
7181
|
+
|
|
7182
|
+
| Regulation | Requirement | How We Comply |
|
|
7183
|
+
|---|---|---|
|
|
7184
|
+
| [e.g., SOC 2 Type II] | [e.g., Access controls and audit logging] | [e.g., RBAC + immutable audit log] |
|
|
7185
|
+
| [e.g., GDPR] | [e.g., Data encryption at rest] | [e.g., AES-256 via AWS KMS] |
|
|
7186
|
+
|
|
7187
|
+
## Validation Approach
|
|
7188
|
+
|
|
7189
|
+
How compliance with this security requirement will be verified.
|
|
7190
|
+
|
|
7191
|
+
| Method | Frequency | Responsible Party |
|
|
7192
|
+
|---|---|---|
|
|
7193
|
+
| [e.g., Automated security scan] | [e.g., Every CI build] | [e.g., DevOps] |
|
|
7194
|
+
| [e.g., Penetration test] | [e.g., Annually] | [e.g., External vendor] |
|
|
7195
|
+
|
|
7196
|
+
## Acceptance Criteria
|
|
7197
|
+
|
|
7198
|
+
- [ ] [Specific, verifiable security condition]
|
|
7199
|
+
- [ ] [e.g., No passwords stored in plaintext anywhere in the system]
|
|
7200
|
+
- [ ] [e.g., All API endpoints require authentication except explicitly whitelisted public routes]
|
|
7201
|
+
|
|
7202
|
+
## Traceability
|
|
7203
|
+
|
|
7204
|
+
- **Protects:** [FR-NNN](../functional/FR-NNN-slug.md)
|
|
7205
|
+
- **Constrained by:** [NFR-NNN](../non-functional/NFR-NNN-slug.md)
|
|
7206
|
+
- **Implements:** [BR-NNN](../business/BR-NNN-slug.md)
|
|
7207
|
+
- **Related data:** [DR-NNN](../data/DR-NNN-slug.md)
|
|
7208
|
+
- **Depends on (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [platform/industry requirement this depends on]
|
|
7209
|
+
- **Enables (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [customer-workflow/consumer-app requirement this enables]
|
|
7210
|
+
|
|
7211
|
+
## Open Items
|
|
7212
|
+
|
|
7213
|
+
### Identified Gaps
|
|
7214
|
+
|
|
7215
|
+
[Document any missing functionality, unhandled edge cases, or incomplete aspects. Number each item and assign a priority (P0/P1/P2/P3). Call out interdependencies with other open items. If none, write "None identified."]
|
|
7216
|
+
|
|
7217
|
+
1. **[Gap title]** \`[P0-P3]\`
|
|
7218
|
+
[Description of what's missing and why it matters.]
|
|
7219
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7220
|
+
|
|
7221
|
+
### Follow-up Questions
|
|
7222
|
+
|
|
7223
|
+
[Document anything ambiguous or where the motivation/reasoning cannot be confidently inferred. Number each item and assign a priority. If none, write "None identified."]
|
|
7224
|
+
|
|
7225
|
+
1. **[Question title]** \`[P0-P3]\`
|
|
7226
|
+
[The question, with context on why the answer matters.]
|
|
7227
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7228
|
+
|
|
7229
|
+
### Contradictions & Inconsistencies
|
|
7230
|
+
|
|
7231
|
+
[Document any conflicts with other requirements, code behavior, or documentation. Number each item and assign a priority. If none, write "None identified."]
|
|
7232
|
+
|
|
7233
|
+
1. **[Contradiction title]** \`[P0-P3]\`
|
|
7234
|
+
[Description of the conflict and what needs to be resolved.]
|
|
7235
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7236
|
+
|
|
7237
|
+
## Revision History
|
|
7238
|
+
|
|
7239
|
+
| Date | Author | Change |
|
|
7240
|
+
|---|---|---|
|
|
7241
|
+
| YYYY-MM-DD | [Name] | Initial draft |
|
|
7242
|
+
`;
|
|
7243
|
+
var TEMPLATE_DR = `---
|
|
7244
|
+
title: "DR-NNN: [Data Requirement Title]"
|
|
7245
|
+
---
|
|
7246
|
+
|
|
7247
|
+
# DR-NNN: [Data Requirement Title]
|
|
7248
|
+
|
|
7249
|
+
## Metadata
|
|
7250
|
+
|
|
7251
|
+
| Field | Value |
|
|
7252
|
+
|---|---|
|
|
7253
|
+
| **ID** | DR-NNN |
|
|
7254
|
+
| **Status** | Draft |
|
|
7255
|
+
| **Tier** | [Platform \xB7 Industry \xB7 Customer Workflow \xB7 Consumer Application] |
|
|
7256
|
+
| **Implementor** | [Consortium Member \xB7 Customer \xB7 TBD \u2014 required for Customer Workflow and Consumer Application tiers. When Consortium Member, link to org profile] |
|
|
7257
|
+
| **Customer** | [Link to customer org profile if this requirement originated from or applies to a specific customer. Optional for Platform/Industry tiers, expected for Customer Workflow/Consumer Application tiers] |
|
|
7258
|
+
| **Data Domain** | [e.g., User Data / Transaction Data / Configuration / Audit Logs / Media Assets] |
|
|
7259
|
+
| **Classification** | [Public / Internal / Confidential / Restricted] |
|
|
7260
|
+
| **Owner** | [Name or role] |
|
|
7261
|
+
| **Created** | YYYY-MM-DD |
|
|
7262
|
+
| **Last Updated** | YYYY-MM-DD |
|
|
7263
|
+
|
|
7264
|
+
## Description
|
|
7265
|
+
|
|
7266
|
+
What data this requirement governs, why it exists, and its significance to the system.
|
|
7267
|
+
|
|
7268
|
+
## Data Model
|
|
7269
|
+
|
|
7270
|
+
Describe the key entities, their attributes, and relationships. Include an entity-relationship summary or reference a diagram.
|
|
7271
|
+
|
|
7272
|
+
| Entity | Key Attributes | Relationships |
|
|
7273
|
+
|---|---|---|
|
|
7274
|
+
| [e.g., User] | [e.g., id, email, name, created_at] | [e.g., Has many Organizations (via membership)] |
|
|
7275
|
+
|
|
7276
|
+
## Data Lifecycle
|
|
7277
|
+
|
|
7278
|
+
| Phase | Description | Duration |
|
|
7279
|
+
|---|---|---|
|
|
7280
|
+
| Creation | [How and when this data is created] | \u2014 |
|
|
7281
|
+
| Active Use | [How this data is used during normal operations] | [e.g., Indefinite while account active] |
|
|
7282
|
+
| Archival | [If/how data is archived after active use] | [e.g., After 12 months of inactivity] |
|
|
7283
|
+
| Deletion | [When and how data is permanently removed] | [e.g., 90 days after account closure] |
|
|
7284
|
+
|
|
7285
|
+
## Retention Policy
|
|
7286
|
+
|
|
7287
|
+
| Data Type | Retention Period | Legal Basis | Deletion Method |
|
|
7288
|
+
|---|---|---|---|
|
|
7289
|
+
| [e.g., User profile data] | [e.g., Account lifetime + 90 days] | [e.g., Contractual obligation] | [e.g., Soft delete \u2192 hard delete after retention] |
|
|
7290
|
+
| [e.g., Audit logs] | [e.g., 7 years] | [e.g., SOC 2 compliance] | [e.g., Automated purge] |
|
|
7291
|
+
|
|
7292
|
+
## Backup & Recovery
|
|
7293
|
+
|
|
7294
|
+
| Parameter | Value |
|
|
7295
|
+
|---|---|
|
|
7296
|
+
| **RPO (Recovery Point Objective)** | [e.g., < 1 hour \u2014 maximum acceptable data loss] |
|
|
7297
|
+
| **RTO (Recovery Time Objective)** | [e.g., < 4 hours \u2014 maximum acceptable downtime] |
|
|
7298
|
+
| **Backup Frequency** | [e.g., Continuous WAL archiving + daily snapshots] |
|
|
7299
|
+
| **Backup Location** | [e.g., Cross-region S3 with encryption] |
|
|
7300
|
+
| **Recovery Testing** | [e.g., Quarterly restore test] |
|
|
7301
|
+
|
|
7302
|
+
## Data Quality Rules
|
|
7303
|
+
|
|
7304
|
+
| Rule | Description | Enforcement |
|
|
7305
|
+
|---|---|---|
|
|
7306
|
+
| [e.g., Email uniqueness] | [e.g., No two active users may share an email] | [e.g., Database unique constraint] |
|
|
7307
|
+
|
|
7308
|
+
## Privacy & Classification
|
|
7309
|
+
|
|
7310
|
+
How this data is classified and what handling rules apply based on that classification.
|
|
7311
|
+
|
|
7312
|
+
| Classification Level | Handling Rules |
|
|
7313
|
+
|---|---|
|
|
7314
|
+
| Public | No restrictions |
|
|
7315
|
+
| Internal | Access controlled, not shared externally |
|
|
7316
|
+
| Confidential | Encrypted at rest, access logged, need-to-know basis |
|
|
7317
|
+
| Restricted | All of Confidential + additional controls per regulation |
|
|
7318
|
+
|
|
7319
|
+
## Traceability
|
|
7320
|
+
|
|
7321
|
+
- **Supports:** [FR-NNN](../functional/FR-NNN-slug.md)
|
|
7322
|
+
- **Protected by:** [SEC-NNN](../security/SEC-NNN-slug.md)
|
|
7323
|
+
- **Stored per:** [TR-NNN](../technical/TR-NNN-slug.md)
|
|
7324
|
+
- **Depends on (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [platform/industry requirement this depends on]
|
|
7325
|
+
- **Enables (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [customer-workflow/consumer-app requirement this enables]
|
|
7326
|
+
|
|
7327
|
+
## Open Items
|
|
7328
|
+
|
|
7329
|
+
### Identified Gaps
|
|
7330
|
+
|
|
7331
|
+
[Document any missing functionality, unhandled edge cases, or incomplete aspects. Number each item and assign a priority (P0/P1/P2/P3). Call out interdependencies with other open items. If none, write "None identified."]
|
|
7332
|
+
|
|
7333
|
+
1. **[Gap title]** \`[P0-P3]\`
|
|
7334
|
+
[Description of what's missing and why it matters.]
|
|
7335
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7336
|
+
|
|
7337
|
+
### Follow-up Questions
|
|
7338
|
+
|
|
7339
|
+
[Document anything ambiguous or where the motivation/reasoning cannot be confidently inferred. Number each item and assign a priority. If none, write "None identified."]
|
|
7340
|
+
|
|
7341
|
+
1. **[Question title]** \`[P0-P3]\`
|
|
7342
|
+
[The question, with context on why the answer matters.]
|
|
7343
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7344
|
+
|
|
7345
|
+
### Contradictions & Inconsistencies
|
|
7346
|
+
|
|
7347
|
+
[Document any conflicts with other requirements, code behavior, or documentation. Number each item and assign a priority. If none, write "None identified."]
|
|
7348
|
+
|
|
7349
|
+
1. **[Contradiction title]** \`[P0-P3]\`
|
|
7350
|
+
[Description of the conflict and what needs to be resolved.]
|
|
7351
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7352
|
+
|
|
7353
|
+
## Revision History
|
|
7354
|
+
|
|
7355
|
+
| Date | Author | Change |
|
|
7356
|
+
|---|---|---|
|
|
7357
|
+
| YYYY-MM-DD | [Name] | Initial draft |
|
|
7358
|
+
`;
|
|
7359
|
+
var TEMPLATE_INT = `---
|
|
7360
|
+
title: "INT-NNN: [Integration Requirement Title]"
|
|
7361
|
+
---
|
|
7362
|
+
|
|
7363
|
+
# INT-NNN: [Integration Requirement Title]
|
|
7364
|
+
|
|
7365
|
+
## Metadata
|
|
7366
|
+
|
|
7367
|
+
| Field | Value |
|
|
7368
|
+
|---|---|
|
|
7369
|
+
| **ID** | INT-NNN |
|
|
7370
|
+
| **Status** | Draft |
|
|
7371
|
+
| **Tier** | [Platform \xB7 Industry \xB7 Customer Workflow \xB7 Consumer Application] |
|
|
7372
|
+
| **Implementor** | [Consortium Member \xB7 Customer \xB7 TBD \u2014 required for Customer Workflow and Consumer Application tiers. When Consortium Member, link to org profile] |
|
|
7373
|
+
| **Customer** | [Link to customer org profile if this requirement originated from or applies to a specific customer. Optional for Platform/Industry tiers, expected for Customer Workflow/Consumer Application tiers] |
|
|
7374
|
+
| **Integration Type** | [REST API / GraphQL / Webhook / Message Queue / File Transfer / SDK] |
|
|
7375
|
+
| **Direction** | [Inbound / Outbound / Bidirectional] |
|
|
7376
|
+
| **External System** | [Name of the third-party or internal system] |
|
|
7377
|
+
| **Owner** | [Name or role] |
|
|
7378
|
+
| **Created** | YYYY-MM-DD |
|
|
7379
|
+
| **Last Updated** | YYYY-MM-DD |
|
|
7380
|
+
|
|
7381
|
+
## Description
|
|
7382
|
+
|
|
7383
|
+
What this integration does, why it's needed, and what business capability it enables.
|
|
7384
|
+
|
|
7385
|
+
## External System Overview
|
|
7386
|
+
|
|
7387
|
+
| Field | Value |
|
|
7388
|
+
|---|---|
|
|
7389
|
+
| **System** | [e.g., Stripe] |
|
|
7390
|
+
| **Purpose** | [e.g., Payment processing and subscription management] |
|
|
7391
|
+
| **API Documentation** | [URL to official docs] |
|
|
7392
|
+
| **API Version** | [e.g., 2023-10-16] |
|
|
7393
|
+
| **Authentication** | [e.g., API key (secret key in header)] |
|
|
7394
|
+
|
|
7395
|
+
## Integration Points
|
|
7396
|
+
|
|
7397
|
+
### [Endpoint/Event 1]: [Name]
|
|
7398
|
+
|
|
7399
|
+
| Field | Value |
|
|
7400
|
+
|---|---|
|
|
7401
|
+
| **Direction** | [Inbound/Outbound] |
|
|
7402
|
+
| **Protocol** | [e.g., HTTPS REST] |
|
|
7403
|
+
| **Endpoint** | [e.g., POST /v1/customers] |
|
|
7404
|
+
| **Authentication** | [e.g., Bearer token] |
|
|
7405
|
+
| **Rate Limit** | [e.g., 100 requests/second] |
|
|
7406
|
+
|
|
7407
|
+
**Request/Payload:**
|
|
7408
|
+
\`\`\`
|
|
7409
|
+
[Brief description or schema reference]
|
|
7410
|
+
\`\`\`
|
|
7411
|
+
|
|
7412
|
+
**Response/Output:**
|
|
7413
|
+
\`\`\`
|
|
7414
|
+
[Brief description or schema reference]
|
|
7415
|
+
\`\`\`
|
|
7416
|
+
|
|
7417
|
+
## Error Handling
|
|
7418
|
+
|
|
7419
|
+
| Error Scenario | Strategy | Retry Policy |
|
|
7420
|
+
|---|---|---|
|
|
7421
|
+
| [e.g., 429 Rate Limited] | [e.g., Exponential backoff] | [e.g., 3 retries, max 30s] |
|
|
7422
|
+
| [e.g., 500 Server Error] | [e.g., Retry with circuit breaker] | [e.g., 3 retries, then circuit open for 60s] |
|
|
7423
|
+
| [e.g., Timeout] | [e.g., Retry once, then dead letter queue] | [e.g., 30s timeout, 1 retry] |
|
|
7424
|
+
|
|
7425
|
+
## Data Mapping
|
|
7426
|
+
|
|
7427
|
+
How data maps between our system and the external system.
|
|
7428
|
+
|
|
7429
|
+
| Our Field | External Field | Transformation |
|
|
7430
|
+
|---|---|---|
|
|
7431
|
+
| [e.g., user.email] | [e.g., customer.email] | [e.g., Direct mapping] |
|
|
7432
|
+
|
|
7433
|
+
## SLA & Availability
|
|
7434
|
+
|
|
7435
|
+
| Parameter | Our Expectation | External System's Published SLA |
|
|
7436
|
+
|---|---|---|
|
|
7437
|
+
| Availability | [e.g., 99.9%] | [e.g., 99.99%] |
|
|
7438
|
+
| Response Time | [e.g., < 500ms p99] | [e.g., < 200ms typical] |
|
|
7439
|
+
|
|
7440
|
+
## Fallback Behavior
|
|
7441
|
+
|
|
7442
|
+
What happens when this integration is unavailable. How does the system degrade gracefully?
|
|
7443
|
+
|
|
7444
|
+
## Testing Strategy
|
|
7445
|
+
|
|
7446
|
+
| Environment | Approach |
|
|
7447
|
+
|---|---|
|
|
7448
|
+
| Development | [e.g., Mock server / sandbox environment] |
|
|
7449
|
+
| Staging | [e.g., Sandbox API with test credentials] |
|
|
7450
|
+
| Production | [e.g., Live API with monitoring] |
|
|
7451
|
+
|
|
7452
|
+
## Traceability
|
|
7453
|
+
|
|
7454
|
+
- **Enables:** [FR-NNN](../functional/FR-NNN-slug.md)
|
|
7455
|
+
- **Constrained by:** [NFR-NNN](../non-functional/NFR-NNN-slug.md)
|
|
7456
|
+
- **Secured by:** [SEC-NNN](../security/SEC-NNN-slug.md)
|
|
7457
|
+
- **Depends on (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [platform/industry requirement this depends on]
|
|
7458
|
+
- **Enables (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [customer-workflow/consumer-app requirement this enables]
|
|
7459
|
+
|
|
7460
|
+
## Open Items
|
|
7461
|
+
|
|
7462
|
+
### Identified Gaps
|
|
7463
|
+
|
|
7464
|
+
[Document any missing functionality, unhandled edge cases, or incomplete aspects. Number each item and assign a priority (P0/P1/P2/P3). Call out interdependencies with other open items. If none, write "None identified."]
|
|
7465
|
+
|
|
7466
|
+
1. **[Gap title]** \`[P0-P3]\`
|
|
7467
|
+
[Description of what's missing and why it matters.]
|
|
7468
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7469
|
+
|
|
7470
|
+
### Follow-up Questions
|
|
7471
|
+
|
|
7472
|
+
[Document anything ambiguous or where the motivation/reasoning cannot be confidently inferred. Number each item and assign a priority. If none, write "None identified."]
|
|
7473
|
+
|
|
7474
|
+
1. **[Question title]** \`[P0-P3]\`
|
|
7475
|
+
[The question, with context on why the answer matters.]
|
|
7476
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7477
|
+
|
|
7478
|
+
### Contradictions & Inconsistencies
|
|
7479
|
+
|
|
7480
|
+
[Document any conflicts with other requirements, code behavior, or documentation. Number each item and assign a priority. If none, write "None identified."]
|
|
7481
|
+
|
|
7482
|
+
1. **[Contradiction title]** \`[P0-P3]\`
|
|
7483
|
+
[Description of the conflict and what needs to be resolved.]
|
|
7484
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7485
|
+
|
|
7486
|
+
## Revision History
|
|
7487
|
+
|
|
7488
|
+
| Date | Author | Change |
|
|
7489
|
+
|---|---|---|
|
|
7490
|
+
| YYYY-MM-DD | [Name] | Initial draft |
|
|
7491
|
+
`;
|
|
7492
|
+
var TEMPLATE_OPS = `---
|
|
7493
|
+
title: "OPS-NNN: [Operational Requirement Title]"
|
|
7494
|
+
---
|
|
7495
|
+
|
|
7496
|
+
# OPS-NNN: [Operational Requirement Title]
|
|
7497
|
+
|
|
7498
|
+
## Metadata
|
|
7499
|
+
|
|
7500
|
+
| Field | Value |
|
|
7501
|
+
|---|---|
|
|
7502
|
+
| **ID** | OPS-NNN |
|
|
7503
|
+
| **Status** | Draft |
|
|
7504
|
+
| **Tier** | [Platform \xB7 Industry \xB7 Customer Workflow \xB7 Consumer Application] |
|
|
7505
|
+
| **Implementor** | [Consortium Member \xB7 Customer \xB7 TBD \u2014 required for Customer Workflow and Consumer Application tiers. When Consortium Member, link to org profile] |
|
|
7506
|
+
| **Customer** | [Link to customer org profile if this requirement originated from or applies to a specific customer. Optional for Platform/Industry tiers, expected for Customer Workflow/Consumer Application tiers] |
|
|
7507
|
+
| **Operations Domain** | [Deployment / Monitoring / Alerting / Logging / Incident Response / Backup] |
|
|
7508
|
+
| **Owner** | [Name or role] |
|
|
7509
|
+
| **Created** | YYYY-MM-DD |
|
|
7510
|
+
| **Last Updated** | YYYY-MM-DD |
|
|
7511
|
+
|
|
7512
|
+
## Description
|
|
7513
|
+
|
|
7514
|
+
What operational concern this requirement addresses and why it matters for system reliability.
|
|
7515
|
+
|
|
7516
|
+
## Current State
|
|
7517
|
+
|
|
7518
|
+
If this applies to an existing system, document the current operational posture.
|
|
7519
|
+
|
|
7520
|
+
## Requirements
|
|
7521
|
+
|
|
7522
|
+
### Deployment
|
|
7523
|
+
|
|
7524
|
+
| Parameter | Requirement |
|
|
7525
|
+
|---|---|
|
|
7526
|
+
| **Strategy** | [e.g., Blue-green / Rolling / Canary] |
|
|
7527
|
+
| **Frequency** | [e.g., On-demand, multiple times per day] |
|
|
7528
|
+
| **Rollback** | [e.g., Automated rollback on health check failure within 5 minutes] |
|
|
7529
|
+
| **Downtime** | [e.g., Zero-downtime required] |
|
|
7530
|
+
|
|
7531
|
+
### Monitoring & Observability
|
|
7532
|
+
|
|
7533
|
+
| Signal Type | What to Monitor | Tool | Retention |
|
|
7534
|
+
|---|---|---|---|
|
|
7535
|
+
| **Metrics** | [e.g., Request rate, error rate, latency p50/p95/p99] | [e.g., Datadog] | [e.g., 15 months] |
|
|
7536
|
+
| **Logs** | [e.g., Application logs, access logs, audit logs] | [e.g., CloudWatch \u2192 S3] | [e.g., 90 days hot, 1 year cold] |
|
|
7537
|
+
| **Traces** | [e.g., Distributed request traces] | [e.g., Datadog APM] | [e.g., 30 days] |
|
|
7538
|
+
|
|
7539
|
+
### Alerting
|
|
7540
|
+
|
|
7541
|
+
| Alert | Condition | Severity | Notification Channel | Escalation |
|
|
7542
|
+
|---|---|---|---|---|
|
|
7543
|
+
| [e.g., High error rate] | [e.g., 5xx rate > 1% for 5 min] | [e.g., P1 / Critical] | [e.g., PagerDuty \u2192 on-call] | [e.g., If unack'd in 15 min \u2192 engineering lead] |
|
|
7544
|
+
|
|
7545
|
+
### Incident Response
|
|
7546
|
+
|
|
7547
|
+
| Severity | Response Time | Resolution Target | Communication |
|
|
7548
|
+
|---|---|---|---|
|
|
7549
|
+
| P1 (Critical) | [e.g., 15 minutes] | [e.g., 1 hour] | [e.g., Status page + stakeholder notification] |
|
|
7550
|
+
| P2 (Major) | [e.g., 30 minutes] | [e.g., 4 hours] | [e.g., Status page if customer-facing] |
|
|
7551
|
+
| P3 (Minor) | [e.g., Next business day] | [e.g., 5 business days] | [e.g., Internal tracking only] |
|
|
7552
|
+
|
|
7553
|
+
## Runbook References
|
|
7554
|
+
|
|
7555
|
+
| Scenario | Runbook Location |
|
|
7556
|
+
|---|---|
|
|
7557
|
+
| [e.g., Database failover] | [Link or path] |
|
|
7558
|
+
| [e.g., High memory usage] | [Link or path] |
|
|
7559
|
+
|
|
7560
|
+
## Environments
|
|
7561
|
+
|
|
7562
|
+
| Environment | Purpose | Infrastructure | Access |
|
|
7563
|
+
|---|---|---|---|
|
|
7564
|
+
| Development | [Local development] | [e.g., Docker Compose] | [e.g., All developers] |
|
|
7565
|
+
| Staging | [Pre-production testing] | [e.g., AWS, scaled down] | [e.g., Engineering team] |
|
|
7566
|
+
| Production | [Live system] | [e.g., AWS, full scale] | [e.g., Restricted, via bastion] |
|
|
7567
|
+
|
|
7568
|
+
## Traceability
|
|
7569
|
+
|
|
7570
|
+
- **Monitors:** [NFR-NNN](../non-functional/NFR-NNN-slug.md)
|
|
7571
|
+
- **Supports:** [BR-NNN](../business/BR-NNN-slug.md)
|
|
7572
|
+
- **Uses:** [TR-NNN](../technical/TR-NNN-slug.md)
|
|
7573
|
+
- **Depends on (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [platform/industry requirement this depends on]
|
|
7574
|
+
- **Enables (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [customer-workflow/consumer-app requirement this enables]
|
|
7575
|
+
|
|
7576
|
+
## Open Items
|
|
7577
|
+
|
|
7578
|
+
### Identified Gaps
|
|
7579
|
+
|
|
7580
|
+
[Document any missing functionality, unhandled edge cases, or incomplete aspects. Number each item and assign a priority (P0/P1/P2/P3). Call out interdependencies with other open items. If none, write "None identified."]
|
|
7581
|
+
|
|
7582
|
+
1. **[Gap title]** \`[P0-P3]\`
|
|
7583
|
+
[Description of what's missing and why it matters.]
|
|
7584
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7585
|
+
|
|
7586
|
+
### Follow-up Questions
|
|
7587
|
+
|
|
7588
|
+
[Document anything ambiguous or where the motivation/reasoning cannot be confidently inferred. Number each item and assign a priority. If none, write "None identified."]
|
|
7589
|
+
|
|
7590
|
+
1. **[Question title]** \`[P0-P3]\`
|
|
7591
|
+
[The question, with context on why the answer matters.]
|
|
7592
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7593
|
+
|
|
7594
|
+
### Contradictions & Inconsistencies
|
|
7595
|
+
|
|
7596
|
+
[Document any conflicts with other requirements, code behavior, or documentation. Number each item and assign a priority. If none, write "None identified."]
|
|
7597
|
+
|
|
7598
|
+
1. **[Contradiction title]** \`[P0-P3]\`
|
|
7599
|
+
[Description of the conflict and what needs to be resolved.]
|
|
7600
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7601
|
+
|
|
7602
|
+
## Revision History
|
|
7603
|
+
|
|
7604
|
+
| Date | Author | Change |
|
|
7605
|
+
|---|---|---|
|
|
7606
|
+
| YYYY-MM-DD | [Name] | Initial draft |
|
|
7607
|
+
`;
|
|
7608
|
+
var TEMPLATE_UX = `---
|
|
7609
|
+
title: "UX-NNN: [UX Requirement Title]"
|
|
7610
|
+
---
|
|
7611
|
+
|
|
7612
|
+
# UX-NNN: [UX Requirement Title]
|
|
7613
|
+
|
|
7614
|
+
## Metadata
|
|
7615
|
+
|
|
7616
|
+
| Field | Value |
|
|
7617
|
+
|---|---|
|
|
7618
|
+
| **ID** | UX-NNN |
|
|
7619
|
+
| **Status** | Draft |
|
|
7620
|
+
| **Tier** | [Platform \xB7 Industry \xB7 Customer Workflow \xB7 Consumer Application] |
|
|
7621
|
+
| **Implementor** | [Consortium Member \xB7 Customer \xB7 TBD \u2014 required for Customer Workflow and Consumer Application tiers. When Consortium Member, link to org profile] |
|
|
7622
|
+
| **Customer** | [Link to customer org profile if this requirement originated from or applies to a specific customer. Optional for Platform/Industry tiers, expected for Customer Workflow/Consumer Application tiers] |
|
|
7623
|
+
| **UX Domain** | [Accessibility / Responsiveness / Internationalization / Interaction Design / Information Architecture] |
|
|
7624
|
+
| **Priority** | [Critical / High / Medium / Low] |
|
|
7625
|
+
| **Owner** | [Name or role] |
|
|
7626
|
+
| **Created** | YYYY-MM-DD |
|
|
7627
|
+
| **Last Updated** | YYYY-MM-DD |
|
|
7628
|
+
|
|
7629
|
+
## Description
|
|
7630
|
+
|
|
7631
|
+
What user experience concern this requirement addresses and why it matters.
|
|
7632
|
+
|
|
7633
|
+
## Target Users
|
|
7634
|
+
|
|
7635
|
+
| User Segment | Characteristics | Key Needs |
|
|
7636
|
+
|---|---|---|
|
|
7637
|
+
| [e.g., Power users] | [e.g., Daily usage, keyboard-heavy workflow] | [e.g., Keyboard shortcuts, bulk actions] |
|
|
7638
|
+
|
|
7639
|
+
## Accessibility
|
|
7640
|
+
|
|
7641
|
+
| Parameter | Requirement |
|
|
7642
|
+
|---|---|
|
|
7643
|
+
| **WCAG Level** | [e.g., 2.1 Level AA] |
|
|
7644
|
+
| **Screen Reader Support** | [e.g., ARIA labels on all interactive elements] |
|
|
7645
|
+
| **Keyboard Navigation** | [e.g., All functionality accessible via keyboard] |
|
|
7646
|
+
| **Color Contrast** | [e.g., Minimum 4.5:1 for normal text, 3:1 for large text] |
|
|
7647
|
+
| **Motion** | [e.g., Respect prefers-reduced-motion; no auto-playing animations] |
|
|
7648
|
+
|
|
7649
|
+
## Responsive Design
|
|
7650
|
+
|
|
7651
|
+
| Breakpoint | Target Devices | Layout Behavior |
|
|
7652
|
+
|---|---|---|
|
|
7653
|
+
| [e.g., < 375px] | [e.g., Small phones] | [e.g., Single column, stacked navigation] |
|
|
7654
|
+
| [e.g., 375\u2013768px] | [e.g., Phones, small tablets] | [e.g., Single column, hamburger menu] |
|
|
7655
|
+
| [e.g., 768\u20131024px] | [e.g., Tablets] | [e.g., Two-column where appropriate] |
|
|
7656
|
+
| [e.g., > 1024px] | [e.g., Desktop] | [e.g., Full layout with sidebar navigation] |
|
|
7657
|
+
|
|
7658
|
+
## Internationalization (i18n)
|
|
7659
|
+
|
|
7660
|
+
| Parameter | Requirement |
|
|
7661
|
+
|---|---|
|
|
7662
|
+
| **Supported Languages** | [e.g., English (launch), Spanish, French (Phase 2)] |
|
|
7663
|
+
| **Text Direction** | [e.g., LTR only at launch; RTL support in backlog] |
|
|
7664
|
+
| **Date/Time Formats** | [e.g., Locale-aware formatting] |
|
|
7665
|
+
| **Currency** | [e.g., Display in user's locale, store in USD] |
|
|
7666
|
+
|
|
7667
|
+
## Interaction Patterns
|
|
7668
|
+
|
|
7669
|
+
Key interaction patterns and principles that apply to this requirement.
|
|
7670
|
+
|
|
7671
|
+
| Pattern | Standard | Notes |
|
|
7672
|
+
|---|---|---|
|
|
7673
|
+
| [e.g., Form validation] | [e.g., Inline validation on blur, summary on submit] | [e.g., Error messages adjacent to field] |
|
|
7674
|
+
| [e.g., Loading states] | [e.g., Skeleton screens for content, spinners for actions] | [e.g., No blank screens during loads] |
|
|
7675
|
+
|
|
7676
|
+
## Design System Reference
|
|
7677
|
+
|
|
7678
|
+
Reference to the project's design system, component library, or style guide if one exists.
|
|
7679
|
+
|
|
7680
|
+
## Acceptance Criteria
|
|
7681
|
+
|
|
7682
|
+
- [ ] [Specific, verifiable UX condition]
|
|
7683
|
+
- [ ] [e.g., All pages score \u2265 90 on Lighthouse accessibility audit]
|
|
7684
|
+
- [ ] [e.g., All interactive elements have visible focus indicators]
|
|
7685
|
+
|
|
7686
|
+
## Traceability
|
|
7687
|
+
|
|
7688
|
+
- **Enhances:** [FR-NNN](../functional/FR-NNN-slug.md)
|
|
7689
|
+
- **Constrained by:** [NFR-NNN](../non-functional/NFR-NNN-slug.md)
|
|
7690
|
+
- **Supports:** [BR-NNN](../business/BR-NNN-slug.md)
|
|
7691
|
+
- **Depends on (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [platform/industry requirement this depends on]
|
|
7692
|
+
- **Enables (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [customer-workflow/consumer-app requirement this enables]
|
|
7693
|
+
|
|
7694
|
+
## Open Items
|
|
7695
|
+
|
|
7696
|
+
### Identified Gaps
|
|
7697
|
+
|
|
7698
|
+
[Document any missing functionality, unhandled edge cases, or incomplete aspects. Number each item and assign a priority (P0/P1/P2/P3). Call out interdependencies with other open items. If none, write "None identified."]
|
|
7699
|
+
|
|
7700
|
+
1. **[Gap title]** \`[P0-P3]\`
|
|
7701
|
+
[Description of what's missing and why it matters.]
|
|
7702
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7703
|
+
|
|
7704
|
+
### Follow-up Questions
|
|
7705
|
+
|
|
7706
|
+
[Document anything ambiguous or where the motivation/reasoning cannot be confidently inferred. Number each item and assign a priority. If none, write "None identified."]
|
|
7707
|
+
|
|
7708
|
+
1. **[Question title]** \`[P0-P3]\`
|
|
7709
|
+
[The question, with context on why the answer matters.]
|
|
7710
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7711
|
+
|
|
7712
|
+
### Contradictions & Inconsistencies
|
|
7713
|
+
|
|
7714
|
+
[Document any conflicts with other requirements, code behavior, or documentation. Number each item and assign a priority. If none, write "None identified."]
|
|
7715
|
+
|
|
7716
|
+
1. **[Contradiction title]** \`[P0-P3]\`
|
|
7717
|
+
[Description of the conflict and what needs to be resolved.]
|
|
7718
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7719
|
+
|
|
7720
|
+
## Revision History
|
|
7721
|
+
|
|
7722
|
+
| Date | Author | Change |
|
|
7723
|
+
|---|---|---|
|
|
7724
|
+
| YYYY-MM-DD | [Name] | Initial draft |
|
|
7725
|
+
`;
|
|
7726
|
+
var TEMPLATE_MT = `---
|
|
7727
|
+
title: "MT-NNN: [Multi-Tenancy Requirement Title]"
|
|
7728
|
+
---
|
|
7729
|
+
|
|
7730
|
+
# MT-NNN: [Multi-Tenancy Requirement Title]
|
|
7731
|
+
|
|
7732
|
+
## Metadata
|
|
7733
|
+
|
|
7734
|
+
| Field | Value |
|
|
7735
|
+
|---|---|
|
|
7736
|
+
| **ID** | MT-NNN |
|
|
7737
|
+
| **Status** | Draft |
|
|
7738
|
+
| **Tier** | [Platform \xB7 Industry \xB7 Customer Workflow \xB7 Consumer Application] |
|
|
7739
|
+
| **Implementor** | [Consortium Member \xB7 Customer \xB7 TBD \u2014 required for Customer Workflow and Consumer Application tiers. When Consortium Member, link to org profile] |
|
|
7740
|
+
| **Customer** | [Link to customer org profile if this requirement originated from or applies to a specific customer. Optional for Platform/Industry tiers, expected for Customer Workflow/Consumer Application tiers] |
|
|
7741
|
+
| **MT Domain** | [Tenant Isolation / Feature Gating / Usage Metering / Billing / Provisioning / Licensing] |
|
|
7742
|
+
| **Priority** | [Critical / High / Medium / Low] |
|
|
7743
|
+
| **Owner** | [Name or role] |
|
|
7744
|
+
| **Created** | YYYY-MM-DD |
|
|
7745
|
+
| **Last Updated** | YYYY-MM-DD |
|
|
7746
|
+
|
|
7747
|
+
## Description
|
|
7748
|
+
|
|
7749
|
+
What multi-tenancy concern this requirement addresses and why it matters for the SaaS product.
|
|
7750
|
+
|
|
7751
|
+
## Tenant Isolation Model
|
|
7752
|
+
|
|
7753
|
+
| Layer | Isolation Strategy | Details |
|
|
7754
|
+
|---|---|---|
|
|
7755
|
+
| **Database** | [e.g., Row-level / Schema-per-tenant / Database-per-tenant] | [e.g., tenant_id column on all tenant-scoped tables, enforced by RLS] |
|
|
7756
|
+
| **Application** | [e.g., Shared application, tenant context from auth token] | [e.g., Middleware extracts tenant from JWT, injects into query context] |
|
|
7757
|
+
| **Infrastructure** | [e.g., Shared infrastructure / Dedicated compute per tenant] | [e.g., Shared at launch, dedicated option for enterprise tier] |
|
|
7758
|
+
| **Storage** | [e.g., Shared bucket with tenant prefix / Separate buckets] | [e.g., S3 bucket with tenant-id/ prefix, IAM policies per tenant] |
|
|
7759
|
+
|
|
7760
|
+
## Feature Gating
|
|
7761
|
+
|
|
7762
|
+
| Feature | Free Tier | Pro Tier | Enterprise Tier |
|
|
7763
|
+
|---|---|---|---|
|
|
7764
|
+
| [e.g., Number of users] | [e.g., Up to 5] | [e.g., Up to 50] | [e.g., Unlimited] |
|
|
7765
|
+
| [e.g., API access] | [e.g., No] | [e.g., Yes, 1000 calls/day] | [e.g., Yes, unlimited] |
|
|
7766
|
+
|
|
7767
|
+
### Gating Mechanism
|
|
7768
|
+
|
|
7769
|
+
How feature gates are implemented and managed (e.g., feature flag service, plan-based checks, entitlement system).
|
|
7770
|
+
|
|
7771
|
+
## Usage Metering
|
|
7772
|
+
|
|
7773
|
+
| Dimension | Unit | Collection Method | Billing Cycle |
|
|
7774
|
+
|---|---|---|---|
|
|
7775
|
+
| [e.g., API calls] | [e.g., Per request] | [e.g., API gateway counter] | [e.g., Monthly] |
|
|
7776
|
+
| [e.g., Storage] | [e.g., GB-month] | [e.g., Nightly calculation] | [e.g., Monthly] |
|
|
7777
|
+
|
|
7778
|
+
## Tenant Provisioning
|
|
7779
|
+
|
|
7780
|
+
| Step | Action | Duration | Automated? |
|
|
7781
|
+
|---|---|---|---|
|
|
7782
|
+
| 1 | [e.g., Create tenant record] | [e.g., < 1s] | [e.g., Yes] |
|
|
7783
|
+
| 2 | [e.g., Provision database schema/rows] | [e.g., < 5s] | [e.g., Yes] |
|
|
7784
|
+
| 3 | [e.g., Configure DNS/subdomain] | [e.g., < 1 min] | [e.g., Yes] |
|
|
7785
|
+
|
|
7786
|
+
## Tenant Offboarding
|
|
7787
|
+
|
|
7788
|
+
What happens when a tenant leaves \u2014 data retention, export, cleanup procedures.
|
|
7789
|
+
|
|
7790
|
+
## Noisy Neighbor Prevention
|
|
7791
|
+
|
|
7792
|
+
How the system prevents one tenant from degrading the experience of others.
|
|
7793
|
+
|
|
7794
|
+
| Strategy | Implementation |
|
|
7795
|
+
|---|---|
|
|
7796
|
+
| [e.g., Rate limiting] | [e.g., Per-tenant rate limits at API gateway] |
|
|
7797
|
+
| [e.g., Resource quotas] | [e.g., Max storage per tenant per tier] |
|
|
7798
|
+
|
|
7799
|
+
## Acceptance Criteria
|
|
7800
|
+
|
|
7801
|
+
- [ ] [e.g., Tenant A cannot access Tenant B's data under any circumstances]
|
|
7802
|
+
- [ ] [e.g., Feature gate changes take effect within 60 seconds]
|
|
7803
|
+
- [ ] [e.g., New tenant provisioning completes in under 30 seconds]
|
|
7804
|
+
|
|
7805
|
+
## Traceability
|
|
7806
|
+
|
|
7807
|
+
- **Implements:** [BR-NNN](../business/BR-NNN-slug.md)
|
|
7808
|
+
- **Secured by:** [SEC-NNN](../security/SEC-NNN-slug.md)
|
|
7809
|
+
- **Constrained by:** [NFR-NNN](../non-functional/NFR-NNN-slug.md)
|
|
7810
|
+
- **Depends on (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [platform/industry requirement this depends on]
|
|
7811
|
+
- **Enables (cross-tier):** [XX-NNN](../category/XX-NNN-slug.md) \u2014 [customer-workflow/consumer-app requirement this enables]
|
|
7812
|
+
|
|
7813
|
+
## Open Items
|
|
7814
|
+
|
|
7815
|
+
### Identified Gaps
|
|
7816
|
+
|
|
7817
|
+
[Document any missing functionality, unhandled edge cases, or incomplete aspects. Number each item and assign a priority (P0/P1/P2/P3). Call out interdependencies with other open items. If none, write "None identified."]
|
|
7818
|
+
|
|
7819
|
+
1. **[Gap title]** \`[P0-P3]\`
|
|
7820
|
+
[Description of what's missing and why it matters.]
|
|
7821
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7822
|
+
|
|
7823
|
+
### Follow-up Questions
|
|
7824
|
+
|
|
7825
|
+
[Document anything ambiguous or where the motivation/reasoning cannot be confidently inferred. Number each item and assign a priority. If none, write "None identified."]
|
|
7826
|
+
|
|
7827
|
+
1. **[Question title]** \`[P0-P3]\`
|
|
7828
|
+
[The question, with context on why the answer matters.]
|
|
7829
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7830
|
+
|
|
7831
|
+
### Contradictions & Inconsistencies
|
|
7832
|
+
|
|
7833
|
+
[Document any conflicts with other requirements, code behavior, or documentation. Number each item and assign a priority. If none, write "None identified."]
|
|
7834
|
+
|
|
7835
|
+
1. **[Contradiction title]** \`[P0-P3]\`
|
|
7836
|
+
[Description of the conflict and what needs to be resolved.]
|
|
7837
|
+
\u2192 [Depends on / Blocks]: [XX-NNN Open Item #N](../category/XX-NNN-slug.md#open-items) (if applicable)
|
|
7838
|
+
|
|
7839
|
+
## Revision History
|
|
7840
|
+
|
|
7841
|
+
| Date | Author | Change |
|
|
7842
|
+
|---|---|---|
|
|
7843
|
+
| YYYY-MM-DD | [Name] | Initial draft |
|
|
7844
|
+
`;
|
|
7845
|
+
var TEMPLATE_CATEGORY_README = `# [Category Name] Requirements
|
|
7846
|
+
|
|
7847
|
+
## Purpose
|
|
7848
|
+
|
|
7849
|
+
[One-paragraph description of what belongs in this category and the question it answers.]
|
|
7850
|
+
|
|
7851
|
+
## What Belongs Here
|
|
7852
|
+
|
|
7853
|
+
- [Type of requirement 1]
|
|
7854
|
+
- [Type of requirement 2]
|
|
7855
|
+
- [Type of requirement 3]
|
|
7856
|
+
|
|
7857
|
+
## What Does NOT Belong Here
|
|
7858
|
+
|
|
7859
|
+
| If your requirement looks like... | It probably belongs in... | Why |
|
|
7860
|
+
|---|---|---|
|
|
7861
|
+
| [e.g., "The system must respond in < 200ms"] | [e.g., NFR (Non-Functional)] | [e.g., That's a quality/performance target, not a feature description] |
|
|
7862
|
+
|
|
7863
|
+
## Template
|
|
7864
|
+
|
|
7865
|
+
Use [\`_template-{PREFIX}.md\`](../templates/_template-{PREFIX}.md) for all new documents in this category.
|
|
7866
|
+
|
|
7867
|
+
## Current Documents
|
|
7868
|
+
|
|
7869
|
+
| ID | Title | Status | Last Updated |
|
|
7870
|
+
|---|---|---|---|
|
|
7871
|
+
| [{PREFIX}-001](/{PREFIX}-001-slug.md) | [Title] | [Status] | [Date] |
|
|
7872
|
+
|
|
7873
|
+
## Conventions
|
|
7874
|
+
|
|
7875
|
+
- File naming: \`{PREFIX}-NNN-descriptive-slug.md\`
|
|
7876
|
+
- Number sequentially \u2014 check the table above for the next available number
|
|
7877
|
+
- Every document must include YAML frontmatter with a \`title\` field
|
|
7878
|
+
- Every document must include a \`## Traceability\` section
|
|
7879
|
+
`;
|
|
7880
|
+
var TEMPLATE_REQUIREMENTS_README = `---
|
|
7881
|
+
title: "[Project Name] \u2014 Requirements Documentation"
|
|
7882
|
+
---
|
|
7883
|
+
|
|
7884
|
+
# [Project Name] \u2014 Requirements Documentation
|
|
7885
|
+
|
|
7886
|
+
This directory contains the structured requirements taxonomy for [Project Name]. It covers the full lifecycle from business intent through operational concerns, providing traceability between strategic goals and implementation work.
|
|
7887
|
+
|
|
7888
|
+
## Taxonomy Overview
|
|
7889
|
+
|
|
7890
|
+
| Category | Prefix | Directory | Purpose |
|
|
7891
|
+
|---|---|---|---|
|
|
7892
|
+
| Business Requirements | BR | [\`business/\`](business/README.md) | Strategic intent, stakeholders, success metrics |
|
|
7893
|
+
| Functional Requirements | FR | [\`functional/\`](functional/README.md) | User stories, flows, acceptance criteria |
|
|
7894
|
+
| Non-Functional Requirements | NFR | [\`non-functional/\`](non-functional/README.md) | Performance, scalability, availability targets |
|
|
7895
|
+
| Technical Requirements | TR | [\`technical/\`](technical/README.md) | Technology choices, framework decisions |
|
|
7896
|
+
| Architectural Decisions | ADR | [\`architectural-decisions/\`](architectural-decisions/README.md) | Context, decision, consequences (standard ADR format) |
|
|
7897
|
+
| Security & Compliance | SEC | [\`security/\`](security/README.md) | Auth, encryption, audit, regulatory |
|
|
7898
|
+
| Data Requirements | DR | [\`data/\`](data/README.md) | Data models, retention, classification, RPO/RTO |
|
|
7899
|
+
| Integration Requirements | INT | [\`integration/\`](integration/README.md) | APIs, third-party systems, protocols |
|
|
7900
|
+
| Operational Requirements | OPS | [\`operational/\`](operational/README.md) | Deployment, monitoring, alerting, logging |
|
|
7901
|
+
| UX Requirements | UX | [\`ux/\`](ux/README.md) | Accessibility, responsiveness, i18n |
|
|
7902
|
+
| Multi-Tenancy & Licensing | MT | [\`multi-tenancy/\`](multi-tenancy/README.md) | Tenant isolation, feature gating, billing |
|
|
7903
|
+
|
|
7904
|
+
Each directory contains a \`README.md\` with detailed guidance on what belongs in that category (and what doesn't), common disambiguation tips, and project-specific context. When unsure where a requirement belongs, start with the category README.
|
|
7905
|
+
|
|
7906
|
+
## Which Category Do I Use?
|
|
7907
|
+
|
|
7908
|
+
When capturing or decomposing a requirement, use the question it answers to determine the correct category:
|
|
7909
|
+
|
|
7910
|
+
| Question | Category | Example |
|
|
7911
|
+
|---|---|---|
|
|
7912
|
+
| **Why** do we need this? What business value does it deliver? | BR | "We need self-service registration to reduce sales-assisted onboarding costs" |
|
|
7913
|
+
| **What** does the system do? What is the user-visible behavior? | FR | "A user can register with email and password and receive a verification link" |
|
|
7914
|
+
| **How well** must the system perform? What quality bar must it meet? | NFR | "Registration API must respond within 200ms at p99" |
|
|
7915
|
+
| **What technology** are we choosing, and why that one? | TR | "PostgreSQL 16+ for the primary datastore" |
|
|
7916
|
+
| **What structural decision** are we making, and what are the trade-offs? | ADR | "Use row-level tenant isolation rather than schema-per-tenant" |
|
|
7917
|
+
| **What must we protect**, and what rules govern that protection? | SEC | "All PII must be encrypted at rest; SOC 2 Type II compliance required" |
|
|
7918
|
+
| **What data** do we store, for how long, and how do we recover it? | DR | "Tenant data retained for 90 days after account closure, RPO < 1 hour" |
|
|
7919
|
+
| **What external systems** do we connect to, and how? | INT | "Stripe Billing API for subscription management via REST" |
|
|
7920
|
+
| **How do we deploy, monitor, and respond** to incidents? | OPS | "Blue-green deployments with PagerDuty alerting on error rate > 1%" |
|
|
7921
|
+
| **How must the interface look, feel, and behave** for users? | UX | "WCAG 2.1 AA compliance; responsive down to 375px width" |
|
|
7922
|
+
| **How do we isolate tenants, gate features, and meter usage?** | MT | "Logical tenant isolation at row level; API call metering per plan tier" |
|
|
7923
|
+
|
|
7924
|
+
### Common Disambiguation
|
|
7925
|
+
|
|
7926
|
+
- **SEC vs NFR:** If it's about protecting data, enforcing access control, or meeting a regulation \u2192 SEC. If it's about system performance, uptime, or scalability \u2192 NFR. A requirement like "99.9% uptime" is an NFR; "audit logs for all admin actions" is SEC.
|
|
7927
|
+
- **TR vs ADR:** A TR specifies a concrete technology choice ("use PostgreSQL"). An ADR records a structural decision with context, trade-offs, and alternatives considered ("why row-level isolation over schema-per-tenant"). TRs often follow from ADRs.
|
|
7928
|
+
- **FR vs INT:** If it describes what the user experiences \u2192 FR. If it describes how two systems communicate \u2192 INT. "User can pay with a credit card" is FR; "Stripe Checkout API integration for payment processing" is INT.
|
|
7929
|
+
- **DR vs SEC:** If it's about what data exists, how long we keep it, and how we recover it \u2192 DR. If it's about who can access it and how it's protected \u2192 SEC. These often cross-reference each other.
|
|
7930
|
+
- **NFR vs OPS:** If it's a measurable target the system must meet \u2192 NFR. If it's about the tooling and processes to run the system \u2192 OPS. "p99 latency < 200ms" is NFR; "Datadog APM for latency monitoring" is OPS.
|
|
7931
|
+
|
|
7932
|
+
## File Naming Convention
|
|
7933
|
+
|
|
7934
|
+
\`\`\`
|
|
7935
|
+
{PREFIX}-{NNN}-{slug}.md
|
|
7936
|
+
\`\`\`
|
|
7937
|
+
|
|
7938
|
+
- **PREFIX** \u2014 category abbreviation from the table above
|
|
7939
|
+
- **NNN** \u2014 three-digit sequential number (e.g., \`001\`, \`012\`)
|
|
7940
|
+
- **slug** \u2014 lowercase kebab-case descriptive name
|
|
7941
|
+
|
|
7942
|
+
Examples:
|
|
7943
|
+
- \`FR-001-user-registration.md\`
|
|
7944
|
+
- \`SEC-001-multi-tenant-auth.md\`
|
|
7945
|
+
- \`ADR-001-database-selection.md\`
|
|
7946
|
+
|
|
7947
|
+
## Status Definitions
|
|
7948
|
+
|
|
7949
|
+
All requirements use a universal status lifecycle:
|
|
7950
|
+
|
|
7951
|
+
| Status | Meaning |
|
|
7952
|
+
|---|---|
|
|
7953
|
+
| \`Draft\` | Initial capture, under discussion |
|
|
7954
|
+
| \`Proposed\` | Formally proposed, awaiting review |
|
|
7955
|
+
| \`Accepted\` | Approved and active |
|
|
7956
|
+
| \`Implemented\` | Fully delivered |
|
|
7957
|
+
| \`Deprecated\` | No longer applicable |
|
|
7958
|
+
| \`Superseded\` | Replaced by another requirement (link to successor) |
|
|
7959
|
+
|
|
7960
|
+
## Cross-Referencing Guide
|
|
7961
|
+
|
|
7962
|
+
Every requirement document should include a \`## Traceability\` section. Use relative markdown links with the requirement ID as link text.
|
|
7963
|
+
|
|
7964
|
+
Example:
|
|
7965
|
+
\`\`\`markdown
|
|
7966
|
+
## Traceability
|
|
7967
|
+
|
|
7968
|
+
- **Implements:** [FR-001](../functional/FR-001-user-registration.md)
|
|
7969
|
+
- **Constrained by:** [NFR-001](../non-functional/NFR-001-uptime-sla.md)
|
|
7970
|
+
- **Related:** [SEC-001](../security/SEC-001-multi-tenant-auth.md)
|
|
7971
|
+
\`\`\`
|
|
7972
|
+
|
|
7973
|
+
### Link Types
|
|
7974
|
+
|
|
7975
|
+
| Link Type | Meaning |
|
|
7976
|
+
|---|---|
|
|
7977
|
+
| **Implements** | This requirement realizes a higher-level requirement |
|
|
7978
|
+
| **Constrained by** | This requirement is bounded by another requirement |
|
|
7979
|
+
| **Supports** | This requirement contributes to but does not fully realize another |
|
|
7980
|
+
| **Supersedes** | This requirement replaces a deprecated one |
|
|
7981
|
+
| **Related** | Informational relationship |
|
|
7982
|
+
|
|
7983
|
+
## Connecting Requirements to Code
|
|
7984
|
+
|
|
7985
|
+
- **GitHub issues:** Use the Requirements Traceability section of the issue template to reference requirement IDs
|
|
7986
|
+
- **PR descriptions:** Include a Requirements section with links to relevant requirement documents
|
|
7987
|
+
- **Commit footers:** Optionally add \`Implements BR-001\` or \`Supports NFR-003\` lines
|
|
7988
|
+
|
|
7989
|
+
## Dependency Flow
|
|
7990
|
+
|
|
7991
|
+
Requirements relate to each other in a layered hierarchy:
|
|
7992
|
+
|
|
7993
|
+
\`\`\`
|
|
7994
|
+
Business Requirements (BR)
|
|
7995
|
+
\u2192 justify epics and initiatives
|
|
7996
|
+
|
|
7997
|
+
Functional (FR), Integration (INT), Multi-Tenancy (MT)
|
|
7998
|
+
\u2192 decompose into feature issues
|
|
7999
|
+
|
|
8000
|
+
NFRs, Security (SEC), UX
|
|
8001
|
+
\u2192 appear as acceptance criteria AND as standalone issues
|
|
8002
|
+
|
|
8003
|
+
Architectural Decisions (ADR)
|
|
8004
|
+
\u2192 spawn implementation issues and serve as context
|
|
8005
|
+
|
|
8006
|
+
Technical (TR), Data (DR), Operational (OPS)
|
|
8007
|
+
\u2192 drive infrastructure and platform issues
|
|
8008
|
+
\`\`\`
|
|
8009
|
+
`;
|
|
8010
|
+
var STANDARDS_AND_FRAMEWORKS = `# Standards & Frameworks Reference
|
|
8011
|
+
|
|
8012
|
+
This reference provides detailed guidance on the standards and frameworks that inform each requirement category. Consult this when you're uncertain about how to structure a requirement, what level of detail is appropriate, or how to handle an edge case within a specific category.
|
|
8013
|
+
|
|
8014
|
+
## Table of Contents
|
|
8015
|
+
|
|
8016
|
+
1. [BR \u2014 BABOK Guide v3](#br--babok-guide-v3)
|
|
8017
|
+
2. [FR \u2014 BABOK v3 + IEEE 830](#fr--babok-v3--ieee-830)
|
|
8018
|
+
3. [NFR \u2014 ISO/IEC 25010:2023](#nfr--isoiec-250102023)
|
|
8019
|
+
4. [ADR \u2014 Nygard ADR + MADR](#adr--nygard-adr--madr)
|
|
8020
|
+
5. [TR \u2014 BABOK v3 Transition Requirements](#tr--babok-v3-transition-requirements)
|
|
8021
|
+
6. [SEC \u2014 OWASP ASVS + NIST SP 800-53](#sec--owasp-asvs--nist-sp-800-53)
|
|
8022
|
+
7. [DR \u2014 DAMA-DMBOK](#dr--dama-dmbok)
|
|
8023
|
+
8. [INT \u2014 Enterprise Integration Patterns + OpenAPI](#int--enterprise-integration-patterns--openapi)
|
|
8024
|
+
9. [OPS \u2014 Google SRE Book + ITIL 4](#ops--google-sre-book--itil-4)
|
|
8025
|
+
10. [UX \u2014 WCAG 2.1 + Nielsen Norman Heuristics](#ux--wcag-21--nielsen-norman-heuristics)
|
|
8026
|
+
11. [MT \u2014 Azure Well-Architected Framework](#mt--azure-well-architected-framework)
|
|
8027
|
+
12. [Cross-Cutting References](#cross-cutting-references)
|
|
8028
|
+
|
|
8029
|
+
---
|
|
8030
|
+
|
|
8031
|
+
## BR \u2014 BABOK Guide v3
|
|
8032
|
+
|
|
8033
|
+
**Standard:** [BABOK Guide v3 \u2014 Requirements Classification Schema](https://www.iiba.org/business-analysis-certifications/iiba-certifications/ecba-certification/babok-guide-v3/)
|
|
8034
|
+
|
|
8035
|
+
**What it is:** The International Institute of Business Analysis (IIBA) defines business requirements as the highest level of the requirements hierarchy \u2014 statements of goals, objectives, and outcomes that describe why a change is being undertaken.
|
|
8036
|
+
|
|
8037
|
+
**How it informs BR documents:**
|
|
8038
|
+
- Business requirements sit at the top of the requirements hierarchy. Every other requirement should eventually trace back to one.
|
|
8039
|
+
- Stakeholder identification follows BABOK's guidance: identify who cares about this requirement, what their role is, and what their interest is.
|
|
8040
|
+
- Success metrics should be specific and measurable \u2014 BABOK emphasizes that business requirements without measurable success criteria are aspirational statements, not requirements.
|
|
8041
|
+
- Traceability: BABOK's model flows from Business Requirements \u2192 Stakeholder Requirements \u2192 Solution Requirements (functional + non-functional) \u2192 Transition Requirements. Our taxonomy maps to this: BR \u2192 FR/NFR \u2192 TR.
|
|
8042
|
+
|
|
8043
|
+
**When to consult this:** When you're struggling to articulate *why* something is being built (especially when reverse-engineering from code), when defining stakeholders, or when writing success metrics.
|
|
8044
|
+
|
|
8045
|
+
---
|
|
8046
|
+
|
|
8047
|
+
## FR \u2014 BABOK v3 + IEEE 830
|
|
8048
|
+
|
|
8049
|
+
**Standards:**
|
|
8050
|
+
- [BABOK Guide v3 \u2014 Solution Requirements](https://www.iiba.org/business-analysis-certifications/iiba-certifications/ecba-certification/babok-guide-v3/)
|
|
8051
|
+
- [IEEE 830 (SRS) \u2014 Recommended Practice for Software Requirements Specifications](https://standards.ieee.org/ieee/830/1222/)
|
|
8052
|
+
|
|
8053
|
+
**What they are:** BABOK defines functional requirements as "solution requirements" that describe user-visible behavior. IEEE 830 provides the classic structure for Software Requirements Specifications, including the concept of structured flows.
|
|
8054
|
+
|
|
8055
|
+
**How they inform FR documents:**
|
|
8056
|
+
- The user story format ("As a... I want... so that...") captures the actor, action, and business value in a single sentence. This comes from agile practice but aligns with BABOK's emphasis on stakeholder-centric requirements.
|
|
8057
|
+
- Structured flows (main flow, alternative flows, exception flows) come from IEEE 830's recommended practices. The main flow is the happy path. Alternative flows are valid variations. Exception flows handle errors.
|
|
8058
|
+
- MoSCoW prioritization (Must Have / Should Have / Could Have / Won't Have) comes from the DSDM Agile Project Framework and is used for the Priority field in FR documents.
|
|
8059
|
+
- Acceptance criteria should be specific, testable, and binary (pass/fail). Each criterion describes one verifiable condition.
|
|
8060
|
+
|
|
8061
|
+
**When to consult this:** When structuring a complex feature into flows, when deciding how to decompose a large feature into multiple FRs, when writing acceptance criteria, or when prioritizing requirements.
|
|
8062
|
+
|
|
8063
|
+
---
|
|
8064
|
+
|
|
8065
|
+
## NFR \u2014 ISO/IEC 25010:2023
|
|
8066
|
+
|
|
8067
|
+
**Standard:** [ISO/IEC 25010:2023 \u2014 Systems and Software Quality Requirements and Evaluation](https://www.iso.org/standard/35733.html)
|
|
8068
|
+
|
|
8069
|
+
**What it is:** ISO 25010 defines a product quality model with characteristics and sub-characteristics. It's the international standard for thinking about software quality attributes.
|
|
8070
|
+
|
|
8071
|
+
**Quality characteristics defined by ISO 25010:**
|
|
8072
|
+
- **Functional suitability** \u2014 Does it do what it's supposed to? (correctness, completeness, appropriateness)
|
|
8073
|
+
- **Performance efficiency** \u2014 Time behavior, resource utilization, capacity
|
|
8074
|
+
- **Compatibility** \u2014 Co-existence, interoperability
|
|
8075
|
+
- **Usability** \u2014 Recognizability, learnability, operability, error protection, aesthetics, accessibility
|
|
8076
|
+
- **Reliability** \u2014 Maturity, availability, fault tolerance, recoverability
|
|
8077
|
+
- **Security** \u2014 Confidentiality, integrity, non-repudiation, accountability, authenticity (note: in our taxonomy, security gets its own SEC category)
|
|
8078
|
+
- **Maintainability** \u2014 Modularity, reusability, analysability, modifiability, testability
|
|
8079
|
+
- **Portability** \u2014 Adaptability, installability, replaceability
|
|
8080
|
+
|
|
8081
|
+
**How it informs NFR documents:**
|
|
8082
|
+
- Every NFR must have a numeric, measurable target. "The system should be fast" is not an NFR. "API response time must be < 200ms at p99" is.
|
|
8083
|
+
- The Quality Attribute field in the NFR template maps to ISO 25010's characteristics. Use this to categorize what kind of quality the NFR addresses.
|
|
8084
|
+
- Measurement methods must be specified \u2014 how will you know if the target is being met?
|
|
8085
|
+
|
|
8086
|
+
**When to consult this:** When you're not sure if something is an NFR (use the quality characteristics as a checklist), when a stated quality target is vague and needs to be made measurable, or when you need to categorize what type of quality attribute an NFR addresses.
|
|
8087
|
+
|
|
8088
|
+
---
|
|
8089
|
+
|
|
8090
|
+
## ADR \u2014 Nygard ADR + MADR
|
|
8091
|
+
|
|
8092
|
+
**Standards:**
|
|
8093
|
+
- [Nygard ADR Format](https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions) \u2014 The original lightweight ADR format
|
|
8094
|
+
- [MADR \u2014 Markdown Architectural Decision Records](https://adr.github.io/madr/) \u2014 Extended format with structured alternatives
|
|
8095
|
+
|
|
8096
|
+
**What they are:** Michael Nygard's original ADR format (Context \u2192 Decision \u2192 Consequences) established the standard for documenting architecture decisions as lightweight, immutable records. MADR extends this with explicit alternatives and structured consequences.
|
|
8097
|
+
|
|
8098
|
+
**How they inform ADR documents:**
|
|
8099
|
+
- **Context:** What forces are at play? Technical constraints, business pressures, team capabilities, timeline. This is the "why now" of the decision.
|
|
8100
|
+
- **Decision:** State it clearly: "We will use X." Not "We are considering X."
|
|
8101
|
+
- **Alternatives considered:** For each alternative, document what it is, its pros and cons, and why it was rejected. This is crucial \u2014 future readers need to know not just what was decided, but what was considered and why other options lost.
|
|
8102
|
+
- **Consequences:** Every decision has positive, negative, and neutral consequences. Documenting negative consequences honestly is essential \u2014 it prevents future developers from relitigating decisions without understanding the trade-offs.
|
|
8103
|
+
- **Immutability:** ADRs are not edited once accepted \u2014 they are superseded by new ADRs. This preserves the decision history.
|
|
8104
|
+
|
|
8105
|
+
**When to consult this:** When deciding whether something is an ADR vs. a TR (ADR = structural decision with trade-offs; TR = specific technology choice), when structuring the alternatives section, or when documenting consequences honestly (resist the temptation to only list positives).
|
|
8106
|
+
|
|
8107
|
+
---
|
|
8108
|
+
|
|
8109
|
+
## TR \u2014 BABOK v3 Transition Requirements
|
|
8110
|
+
|
|
8111
|
+
**Standard:** [BABOK Guide v3 \u2014 Transition Requirements](https://www.iiba.org/business-analysis-certifications/iiba-certifications/ecba-certification/babok-guide-v3/)
|
|
8112
|
+
|
|
8113
|
+
**What it is:** BABOK defines transition requirements as capabilities the solution must have to facilitate the transition from the current state to the desired state. In our taxonomy, TRs pin down specific technology, framework, and version choices.
|
|
8114
|
+
|
|
8115
|
+
**How it informs TR documents:**
|
|
8116
|
+
- TRs are concrete and specific: "PostgreSQL 16+", "Express 4.x", "Redis 7". Not "a relational database" (that's an ADR-level decision).
|
|
8117
|
+
- Every TR should be traceable to an ADR that justifies the choice. If no ADR exists, the rationale should be included in the TR itself.
|
|
8118
|
+
- Version constraints, licensing, and vendor/maintainer information help with long-term planning and risk assessment.
|
|
8119
|
+
- Remember the version drift principle: cite observed versions but treat them as floors, not pins.
|
|
8120
|
+
|
|
8121
|
+
**When to consult this:** When deciding the granularity of a TR (one per technology, not one per library), when linking TRs to their justifying ADRs, or when documenting version constraints.
|
|
8122
|
+
|
|
8123
|
+
---
|
|
8124
|
+
|
|
8125
|
+
## SEC \u2014 OWASP ASVS + NIST SP 800-53
|
|
8126
|
+
|
|
8127
|
+
**Standards:**
|
|
8128
|
+
- [OWASP Application Security Verification Standard (ASVS)](https://owasp.org/www-project-application-security-verification-standard/) \u2014 A framework of security requirements organized by domain
|
|
8129
|
+
- [NIST SP 800-53 Rev 5](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final) \u2014 Security and Privacy Controls for Information Systems
|
|
8130
|
+
|
|
8131
|
+
**What they are:** OWASP ASVS provides a practical, developer-friendly framework for security requirements organized into chapters: authentication, session management, access control, validation, cryptography, error handling, data protection, communications, malicious code, business logic, files, and API security. NIST 800-53 provides a comprehensive control catalog used for compliance frameworks like FedRAMP and SOC 2.
|
|
8132
|
+
|
|
8133
|
+
**How they inform SEC documents:**
|
|
8134
|
+
- OWASP ASVS chapter references help categorize security requirements. For example:
|
|
8135
|
+
- V2: Authentication (password policies, multi-factor, credential storage)
|
|
8136
|
+
- V3: Session Management (token generation, timeout, revocation)
|
|
8137
|
+
- V4: Access Control (RBAC, least privilege, path traversal)
|
|
8138
|
+
- V5: Validation, Sanitization, and Encoding
|
|
8139
|
+
- V6: Stored Cryptography
|
|
8140
|
+
- V7: Error Handling and Logging
|
|
8141
|
+
- V8: Data Protection
|
|
8142
|
+
- V13: API and Web Service Security
|
|
8143
|
+
- NIST 800-53 control families map to compliance requirements (e.g., AC = Access Control, AU = Audit and Accountability, IA = Identification and Authentication)
|
|
8144
|
+
- STRIDE threat categories (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege) help structure threat model references
|
|
8145
|
+
- Validation approaches should include both automated (CI security scans, SAST, DAST) and manual (penetration testing, code review) methods
|
|
8146
|
+
|
|
8147
|
+
**When to consult this:** When categorizing a security requirement, when linking to specific OWASP ASVS or NIST 800-53 controls, when writing threat model references, when distinguishing between SEC and NFR (security protects; NFR measures quality), or when specifying validation approaches.
|
|
8148
|
+
|
|
8149
|
+
---
|
|
8150
|
+
|
|
8151
|
+
## DR \u2014 DAMA-DMBOK
|
|
8152
|
+
|
|
8153
|
+
**Standard:** [DAMA-DMBOK \u2014 Data Management Body of Knowledge](https://www.dama.org/cpages/body-of-knowledge)
|
|
8154
|
+
|
|
8155
|
+
**What it is:** DAMA-DMBOK covers data governance, data quality, data lifecycle management, data architecture, and related disciplines. It provides frameworks for thinking about data classification, retention, and recovery.
|
|
8156
|
+
|
|
8157
|
+
**How it informs DR documents:**
|
|
8158
|
+
- **Data classification levels:** Public \u2192 Internal \u2192 Confidential \u2192 Restricted. Each level has corresponding handling rules (encryption, access logging, need-to-know).
|
|
8159
|
+
- **Retention policies:** Every data type needs a retention period, legal basis for retention, and deletion method. DAMA emphasizes that retention is not just "how long" but also "why that long" and "what triggers deletion."
|
|
8160
|
+
- **RPO/RTO framework:**
|
|
8161
|
+
- RPO (Recovery Point Objective): Maximum acceptable data loss measured in time. RPO < 1 hour means you can't lose more than 1 hour of data.
|
|
8162
|
+
- RTO (Recovery Time Objective): Maximum acceptable downtime. RTO < 4 hours means the system must be back up within 4 hours.
|
|
8163
|
+
- **Data lifecycle:** Creation \u2192 Active Use \u2192 Archival \u2192 Deletion. Each phase has different storage, access, and protection requirements.
|
|
8164
|
+
|
|
8165
|
+
**When to consult this:** When classifying data sensitivity, when defining retention policies (especially the legal basis), when setting RPO/RTO targets, or when documenting the data lifecycle for a new entity.
|
|
8166
|
+
|
|
8167
|
+
---
|
|
8168
|
+
|
|
8169
|
+
## INT \u2014 Enterprise Integration Patterns + OpenAPI
|
|
8170
|
+
|
|
8171
|
+
**Standards:**
|
|
8172
|
+
- [Enterprise Integration Patterns (Hohpe & Woolf)](https://www.enterpriseintegrationpatterns.com/) \u2014 Canonical patterns for system integration
|
|
8173
|
+
- [OpenAPI Specification](https://www.openapis.org/) \u2014 Standard for describing REST APIs
|
|
8174
|
+
|
|
8175
|
+
**What they are:** Hohpe & Woolf's Enterprise Integration Patterns define the vocabulary for how systems communicate: messaging, routing, transformation, endpoints. OpenAPI provides the standard for documenting REST API contracts.
|
|
8176
|
+
|
|
8177
|
+
**How they inform INT documents:**
|
|
8178
|
+
- **Direction labels:** Inbound (external system calls us), Outbound (we call external system), Bidirectional
|
|
8179
|
+
- **Error handling strategies from EIP:**
|
|
8180
|
+
- Retry with exponential backoff \u2014 for transient failures
|
|
8181
|
+
- Circuit breaker \u2014 stop calling a failing service to prevent cascade failures
|
|
8182
|
+
- Dead letter queue (DLQ) \u2014 capture messages that can't be processed for later investigation
|
|
8183
|
+
- Idempotency \u2014 ensure repeated calls don't cause duplicate effects
|
|
8184
|
+
- **SLA expectations:** Document both what we expect from the external system and what they expect from us. Include availability, response time, and rate limits.
|
|
8185
|
+
- **API contracts:** Follow OpenAPI conventions for documenting endpoints, request/response schemas, authentication methods, and error codes.
|
|
8186
|
+
|
|
8187
|
+
**When to consult this:** When documenting error handling for an integration (use the EIP vocabulary), when specifying fallback behavior, when distinguishing between FR (what the user experiences) and INT (how systems communicate), or when documenting API contracts.
|
|
8188
|
+
|
|
8189
|
+
---
|
|
8190
|
+
|
|
8191
|
+
## OPS \u2014 Google SRE Book + ITIL 4
|
|
8192
|
+
|
|
8193
|
+
**Standards:**
|
|
8194
|
+
- [Google SRE Book \u2014 Site Reliability Engineering](https://sre.google/sre-book/table-of-contents/) \u2014 Engineering approach to operations
|
|
8195
|
+
- [ITIL 4](https://www.axelos.com/certifications/itil-service-management) \u2014 IT service management framework
|
|
8196
|
+
|
|
8197
|
+
**What they are:** The Google SRE book defines principles for running reliable production systems: SLIs, SLOs, error budgets, toil reduction, incident response. ITIL 4 provides the broader service management framework for change management, incident management, and service operations.
|
|
8198
|
+
|
|
8199
|
+
**How they inform OPS documents:**
|
|
8200
|
+
- **SLIs (Service Level Indicators):** The metrics that measure service health. Examples: request latency, error rate, throughput, availability.
|
|
8201
|
+
- **SLOs (Service Level Objectives):** Targets for SLIs. Example: "99.9% of requests complete within 200ms." SLOs belong in NFR documents, but OPS documents describe how they're monitored.
|
|
8202
|
+
- **Observability:** The three pillars \u2014 metrics, logs, traces. OPS documents should specify all three: what metrics are collected, what's logged, and whether distributed tracing is in place.
|
|
8203
|
+
- **Incident response:** Severity levels, response times, escalation paths, communication plans. The SRE book emphasizes blameless postmortems and clear runbooks.
|
|
8204
|
+
- **Deployment strategies:** Blue-green, canary, rolling, feature flags. Each has different rollback characteristics and risk profiles.
|
|
8205
|
+
|
|
8206
|
+
**When to consult this:** When defining monitoring and alerting rules, when structuring incident response procedures, when choosing deployment strategies, or when distinguishing between NFR (the target) and OPS (the machinery that monitors and maintains the target).
|
|
8207
|
+
|
|
8208
|
+
---
|
|
8209
|
+
|
|
8210
|
+
## UX \u2014 WCAG 2.1 + Nielsen Norman Heuristics
|
|
8211
|
+
|
|
8212
|
+
**Standards:**
|
|
8213
|
+
- [WCAG 2.1 \u2014 Web Content Accessibility Guidelines](https://www.w3.org/WAI/standards-guidelines/wcag/) \u2014 W3C accessibility standard
|
|
8214
|
+
- [Nielsen Norman Group \u2014 10 Usability Heuristics](https://www.nngroup.com/articles/ten-usability-heuristics/) \u2014 Foundational usability principles
|
|
8215
|
+
|
|
8216
|
+
**What they are:** WCAG 2.1 defines three levels of accessibility conformance (A, AA, AAA) across four principles: Perceivable, Operable, Understandable, Robust (POUR). Nielsen's heuristics provide a framework for evaluating usability beyond accessibility.
|
|
8217
|
+
|
|
8218
|
+
**How they inform UX documents:**
|
|
8219
|
+
- **WCAG conformance levels:**
|
|
8220
|
+
- Level A: Minimum accessibility. Removes the most serious barriers.
|
|
8221
|
+
- Level AA: The accepted standard for most applications. Addresses the majority of barriers.
|
|
8222
|
+
- Level AAA: The highest level. Often impractical for entire sites but useful for specific features.
|
|
8223
|
+
- **POUR principles:**
|
|
8224
|
+
- Perceivable: Can users perceive the content? (text alternatives, captions, contrast)
|
|
8225
|
+
- Operable: Can users operate the interface? (keyboard navigation, timing, seizure prevention)
|
|
8226
|
+
- Understandable: Can users understand the content and interface? (readability, predictability, error prevention)
|
|
8227
|
+
- Robust: Can the content be interpreted by assistive technologies? (valid markup, ARIA)
|
|
8228
|
+
- **Nielsen's 10 heuristics:**
|
|
8229
|
+
1. Visibility of system status
|
|
8230
|
+
2. Match between system and the real world
|
|
8231
|
+
3. User control and freedom
|
|
8232
|
+
4. Consistency and standards
|
|
8233
|
+
5. Error prevention
|
|
8234
|
+
6. Recognition rather than recall
|
|
8235
|
+
7. Flexibility and efficiency of use
|
|
8236
|
+
8. Aesthetic and minimalist design
|
|
8237
|
+
9. Help users recognize, diagnose, and recover from errors
|
|
8238
|
+
10. Help and documentation
|
|
8239
|
+
- **Responsive design:** Document specific breakpoints and layout behavior changes, not just "it should be responsive."
|
|
8240
|
+
|
|
8241
|
+
**When to consult this:** When specifying accessibility requirements (use WCAG success criteria references like "WCAG 2.1 SC 1.4.3 \u2014 Contrast Minimum"), when evaluating an interface against usability heuristics, or when defining responsive breakpoints.
|
|
8242
|
+
|
|
8243
|
+
---
|
|
8244
|
+
|
|
8245
|
+
## MT \u2014 Azure Well-Architected Framework
|
|
8246
|
+
|
|
8247
|
+
**Standard:** [Azure Well-Architected Framework \u2014 Multi-Tenancy](https://learn.microsoft.com/en-us/azure/architecture/guide/multitenant/overview)
|
|
8248
|
+
|
|
8249
|
+
**What it is:** Microsoft's comprehensive guidance on building multi-tenant SaaS applications, covering tenant isolation models, feature gating, metering, billing, and provisioning. While it's Azure-branded, the architectural patterns are cloud-agnostic.
|
|
8250
|
+
|
|
8251
|
+
**How it informs MT documents:**
|
|
8252
|
+
- **Isolation models:**
|
|
8253
|
+
- Row-level isolation: Single database, tenant_id column, enforced by RLS policies. Cheapest, hardest to guarantee isolation.
|
|
8254
|
+
- Schema-per-tenant: Single database, separate schema per tenant. Middle ground.
|
|
8255
|
+
- Database-per-tenant: Full isolation. Most expensive, easiest to guarantee.
|
|
8256
|
+
- The framework helps evaluate trade-offs between cost, isolation guarantees, and operational complexity.
|
|
8257
|
+
- **Feature gating:** Mechanisms for enabling/disabling features per tenant or plan tier. Consider: feature flags, entitlement systems, plan-based checks.
|
|
8258
|
+
- **Metering dimensions:** What to meter (API calls, storage, users, compute), how to collect (real-time counters, batch aggregation), and how to bill (per-unit, tiered, flat-rate).
|
|
8259
|
+
- **Provisioning:** Tenant onboarding workflow \u2014 creating the tenant record, provisioning resources, configuring DNS/routing. Speed matters for self-service.
|
|
8260
|
+
- **Noisy neighbor prevention:** Rate limiting, resource quotas, fair scheduling \u2014 how to prevent one tenant from degrading the experience of others.
|
|
8261
|
+
|
|
8262
|
+
**When to consult this:** When choosing a tenant isolation model, when designing feature gating, when defining metering and billing dimensions, when planning tenant provisioning flows, or when addressing noisy-neighbor concerns.
|
|
8263
|
+
|
|
8264
|
+
---
|
|
8265
|
+
|
|
8266
|
+
## Tier-Specific Standards Guidance
|
|
8267
|
+
|
|
8268
|
+
The four architectural tiers (Platform, Industry, Customer Workflow, Consumer Application) influence which standards are most relevant when writing requirements. The tier names below are the bundle defaults \u2014 consuming projects may rename or reduce the tier set in their own \`docs/project-context.md\`.
|
|
8269
|
+
|
|
8270
|
+
### Platform Tier
|
|
8271
|
+
All category-specific standards apply at their full depth. Platform requirements define the core infrastructure that all other tiers depend on. Pay particular attention to:
|
|
8272
|
+
- **INT** \u2014 Enterprise Integration Patterns and OpenAPI for the headless API surface
|
|
8273
|
+
- **MT** \u2014 Azure Well-Architected Framework for tenant isolation (this is inherently platform-tier)
|
|
8274
|
+
- **SEC** \u2014 OWASP ASVS for the authentication/authorization framework
|
|
8275
|
+
- **NFR** \u2014 ISO 25010 quality targets for the shared infrastructure
|
|
8276
|
+
|
|
8277
|
+
### Industry Tier
|
|
8278
|
+
Regulatory and compliance standards dominate. Industry requirements translate external mandates into platform capabilities:
|
|
8279
|
+
- **SEC** \u2014 NIST SP 800-53 controls mapped to industry-specific regulations
|
|
8280
|
+
- **INT** \u2014 Industry-specific interoperability standards
|
|
8281
|
+
- **DR** \u2014 DAMA-DMBOK data classification applied to industry-specific data sensitivity levels
|
|
8282
|
+
|
|
8283
|
+
### Customer Workflow Tier
|
|
8284
|
+
Focus on configurability and business rules. Standards inform what the platform's workflow engine must support:
|
|
8285
|
+
- **FR** \u2014 BABOK/IEEE 830 for capturing the configurable business logic \u2014 emphasis on parameterization (what can the tenant change?) vs. fixed behavior
|
|
8286
|
+
- **BR** \u2014 BABOK stakeholder analysis, noting that the stakeholder is the tenant administrator who configures the workflow, not the end user
|
|
8287
|
+
|
|
8288
|
+
### Consumer Application Tier
|
|
8289
|
+
Front-end and UX standards become primary. These requirements describe what consortium members or customers build on top of the platform:
|
|
8290
|
+
- **UX** \u2014 WCAG 2.1 accessibility requirements, Nielsen Norman heuristics for front-end usability
|
|
8291
|
+
- **FR** \u2014 IEEE 830 structured flows for user-facing interactions in the consuming application
|
|
8292
|
+
- **INT** \u2014 OpenAPI specifications for the API contracts the consumer application consumes (trace back to Platform INT requirements)
|
|
8293
|
+
|
|
8294
|
+
Note: Consumer Application requirements follow the same rigor as Platform requirements. The tier distinction is architectural, not qualitative.
|
|
8295
|
+
|
|
8296
|
+
---
|
|
8297
|
+
|
|
8298
|
+
## Cross-Cutting References
|
|
8299
|
+
|
|
8300
|
+
These resources inform the overall taxonomy structure, traceability approach, and cross-referencing conventions across all categories:
|
|
8301
|
+
|
|
8302
|
+
### BABOK Guide v3
|
|
8303
|
+
[IIBA BABOK Guide v3](https://www.iiba.org/business-analysis-certifications/iiba-certifications/ecba-certification/babok-guide-v3/)
|
|
8304
|
+
|
|
8305
|
+
The requirements classification schema (Business \u2192 Stakeholder \u2192 Solution \u2192 Transition) is the backbone of the taxonomy hierarchy. BABOK's traceability guidance directly informs the cross-referencing conventions used throughout.
|
|
8306
|
+
|
|
8307
|
+
### IEEE 29148:2018
|
|
8308
|
+
[IEEE 29148:2018 \u2014 Systems and Software Engineering \u2014 Life Cycle Processes \u2014 Requirements Engineering](https://standards.ieee.org/ieee/29148/6937/)
|
|
8309
|
+
|
|
8310
|
+
The international standard for requirements engineering processes, covering elicitation, analysis, specification, and validation. Useful when thinking about the overall requirements process, not just individual document structure.
|
|
8311
|
+
|
|
8312
|
+
### arc42
|
|
8313
|
+
[arc42 \u2014 Software Architecture Documentation](https://arc42.org/overview)
|
|
8314
|
+
|
|
8315
|
+
A practical template for software architecture documentation. Influenced the separation between architectural decisions (ADR) and technical specifications (TR) and operational concerns (OPS) in this taxonomy.
|
|
8316
|
+
|
|
8317
|
+
### C4 Model
|
|
8318
|
+
[C4 Model \u2014 Software Architecture Visualization](https://c4model.com/)
|
|
8319
|
+
|
|
8320
|
+
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.
|
|
8321
|
+
`;
|
|
8322
|
+
var REQUIREMENTS_WRITER_REFERENCE_FILES = [
|
|
8323
|
+
{ path: "_references/templates/_template-BR.md", content: TEMPLATE_BR },
|
|
8324
|
+
{ path: "_references/templates/_template-FR.md", content: TEMPLATE_FR },
|
|
8325
|
+
{ path: "_references/templates/_template-NFR.md", content: TEMPLATE_NFR },
|
|
8326
|
+
{ path: "_references/templates/_template-TR.md", content: TEMPLATE_TR },
|
|
8327
|
+
{ path: "_references/templates/_template-ADR.md", content: TEMPLATE_ADR },
|
|
8328
|
+
{ path: "_references/templates/_template-SEC.md", content: TEMPLATE_SEC },
|
|
8329
|
+
{ path: "_references/templates/_template-DR.md", content: TEMPLATE_DR },
|
|
8330
|
+
{ path: "_references/templates/_template-INT.md", content: TEMPLATE_INT },
|
|
8331
|
+
{ path: "_references/templates/_template-OPS.md", content: TEMPLATE_OPS },
|
|
8332
|
+
{ path: "_references/templates/_template-UX.md", content: TEMPLATE_UX },
|
|
8333
|
+
{ path: "_references/templates/_template-MT.md", content: TEMPLATE_MT },
|
|
8334
|
+
{
|
|
8335
|
+
path: "_references/templates/_template-category-README.md",
|
|
8336
|
+
content: TEMPLATE_CATEGORY_README
|
|
8337
|
+
},
|
|
8338
|
+
{
|
|
8339
|
+
path: "_references/templates/_template-requirements-README.md",
|
|
8340
|
+
content: TEMPLATE_REQUIREMENTS_README
|
|
8341
|
+
},
|
|
8342
|
+
{
|
|
8343
|
+
path: "_references/standards-and-frameworks.md",
|
|
8344
|
+
content: STANDARDS_AND_FRAMEWORKS
|
|
8345
|
+
}
|
|
8346
|
+
];
|
|
8347
|
+
var requirementsWriterSubAgent = {
|
|
8348
|
+
name: "requirements-writer",
|
|
8349
|
+
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.",
|
|
8350
|
+
model: AGENT_MODEL.POWERFUL,
|
|
8351
|
+
maxTurns: 80,
|
|
8352
|
+
platforms: { cursor: { exclude: true } },
|
|
8353
|
+
prompt: [
|
|
8354
|
+
"# Requirements Writer Agent",
|
|
8355
|
+
"",
|
|
8356
|
+
"You author formal requirement documents using the 11-category",
|
|
8357
|
+
"taxonomy (BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT) and the",
|
|
8358
|
+
"four-tier architectural classification (Platform, Industry, Customer",
|
|
8359
|
+
"Workflow, Consumer Application). Each session handles exactly **one**",
|
|
8360
|
+
"`req:write` issue and writes exactly **one** requirement document.",
|
|
8361
|
+
"",
|
|
8362
|
+
"This agent produces **requirement documents only** \u2014 capability",
|
|
8363
|
+
"models are written by the `bcm-writer` agent and requirement-gap",
|
|
8364
|
+
"discovery is the responsibility of the `requirements-analyst` agent.",
|
|
8365
|
+
"Keep this boundary clean: never open `req:scan`, `req:draft`, or",
|
|
8366
|
+
"`bcm:*` issues from this pipeline.",
|
|
8367
|
+
"",
|
|
8368
|
+
"Follow your project's shared agent conventions (`AGENTS.md`,",
|
|
8369
|
+
"`CLAUDE.md`, or equivalent) for all commit, branch, and PR rules.",
|
|
8370
|
+
"",
|
|
8371
|
+
"---",
|
|
8372
|
+
"",
|
|
8373
|
+
...PROJECT_CONTEXT_READER_SECTION,
|
|
8374
|
+
"## Design Principles",
|
|
8375
|
+
"",
|
|
8376
|
+
"1. **One requirement per session.** Each `req:write` issue maps to a",
|
|
8377
|
+
" single requirement document. Never write two documents in one",
|
|
8378
|
+
" session and never start a second issue.",
|
|
8379
|
+
"2. **Templates are authoritative.** Every category has a template",
|
|
8380
|
+
" under `<TEMPLATES_ROOT>`. Use it verbatim \u2014 do not invent new",
|
|
8381
|
+
" sections or reorder existing ones. A section that does not apply",
|
|
8382
|
+
" gets `Not applicable \u2014 <reason>` rather than being omitted.",
|
|
8383
|
+
"3. **Decision authority is non-negotiable.** Direct-write categories",
|
|
8384
|
+
" ship as `Status: Draft`. ADR and TR documents ship as",
|
|
8385
|
+
" `Status: Proposed` with a Recommendation that frames a human",
|
|
8386
|
+
" decision \u2014 never decide for the human.",
|
|
8387
|
+
"4. **Trace upstream.** Every requirement links back to the proposal",
|
|
8388
|
+
" that produced it, the source document(s) cited in that proposal,",
|
|
8389
|
+
" and the upstream BCM capability or business need it serves.",
|
|
8390
|
+
"5. **Cite, don't invent.** When the proposal does not supply a",
|
|
8391
|
+
" stakeholder, metric, threat model entry, or technology option,",
|
|
8392
|
+
" write `TODO:` and flag the issue with `status:needs-attention`",
|
|
8393
|
+
" rather than fabricating content.",
|
|
8394
|
+
"",
|
|
8395
|
+
"---",
|
|
8396
|
+
"",
|
|
8397
|
+
"## Configurable Paths",
|
|
8398
|
+
"",
|
|
8399
|
+
"The pipeline uses these placeholders. Consuming projects override the",
|
|
8400
|
+
"defaults by passing paths in the `/write-requirement` skill",
|
|
8401
|
+
"invocation, by recording overrides in `docs/project-context.md`, or",
|
|
8402
|
+
"by extending this rule in their own `agentConfig.rules`.",
|
|
8403
|
+
"",
|
|
8404
|
+
"| Placeholder | Meaning | Default |",
|
|
8405
|
+
"|-------------|---------|---------|",
|
|
8406
|
+
"| `<REQUIREMENTS_ROOT>` | Root folder for final requirement documents | `docs/requirements/` |",
|
|
8407
|
+
"| `<RESEARCH_REQUIREMENTS_ROOT>` | Where the upstream `requirements-analyst` writes proposals | `docs/research/requirements/` |",
|
|
8408
|
+
"| `<TEMPLATES_ROOT>` | Where the category templates ship (set automatically by this bundle) | `.claude/skills/write-requirement/_references/templates/` |",
|
|
8409
|
+
"| `<STANDARDS_REF>` | Standards & frameworks reference document | `.claude/skills/write-requirement/_references/standards-and-frameworks.md` |",
|
|
8410
|
+
"| `<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 |",
|
|
8411
|
+
"",
|
|
8412
|
+
"If `docs/project-context.md` specifies a different requirements tree,",
|
|
8413
|
+
"prefer that. Otherwise fall back to the defaults above.",
|
|
8414
|
+
"",
|
|
8415
|
+
"---",
|
|
8416
|
+
"",
|
|
8417
|
+
"## The 11-Category Taxonomy",
|
|
8418
|
+
"",
|
|
8419
|
+
"All requirements follow the BIZBOK-aligned 11-category taxonomy",
|
|
8420
|
+
"below. Getting requirements into the right category matters because",
|
|
8421
|
+
"it determines which template applies, which standards inform it, and",
|
|
8422
|
+
"how it traces to other requirements.",
|
|
8423
|
+
"",
|
|
8424
|
+
"| Category | Prefix | Directory (default) | Question it answers |",
|
|
8425
|
+
"|----------|--------|---------------------|---------------------|",
|
|
8426
|
+
"| Business Requirements | BR | `business/` | **Why** are we building this? What business value does it deliver? |",
|
|
8427
|
+
"| Functional Requirements | FR | `functional/` | **What** does the system do? What is the user-visible behavior? |",
|
|
8428
|
+
"| Non-Functional Requirements | NFR | `non-functional/` | **How well** must the system perform? What quality bar must it meet? |",
|
|
8429
|
+
"| Technical Requirements | TR | `technical/` | **What technology** are we using, and why that one? |",
|
|
8430
|
+
"| Architectural Decisions | ADR | `architectural-decisions/` | **What structural decision** are we making, and what are the trade-offs? |",
|
|
8431
|
+
"| Security & Compliance | SEC | `security/` | **What must we protect**, and what rules govern that protection? |",
|
|
8432
|
+
"| Data Requirements | DR | `data/` | **What data** do we store, how long, and how do we recover it? |",
|
|
8433
|
+
"| Integration Requirements | INT | `integration/` | **What external systems** do we connect to, and how? |",
|
|
8434
|
+
"| Operational Requirements | OPS | `operational/` | **How do we deploy, monitor, and respond** to incidents? |",
|
|
8435
|
+
"| UX Requirements | UX | `ux/` | **How must the interface look, feel, and behave** for users? |",
|
|
8436
|
+
"| Multi-Tenancy & Licensing | MT | `multi-tenancy/` | **How do we isolate tenants, gate features, and meter usage?** |",
|
|
8437
|
+
"",
|
|
8438
|
+
"All requirement documents live under `<REQUIREMENTS_ROOT>` in the",
|
|
8439
|
+
"category directory shown above. Directory names are defaults \u2014",
|
|
8440
|
+
"consuming projects may rename them, but the prefixes are universal.",
|
|
8441
|
+
"",
|
|
8442
|
+
"### Disambiguation Rules",
|
|
8443
|
+
"",
|
|
8444
|
+
"Apply these rules when deciding where a requirement belongs:",
|
|
8445
|
+
"",
|
|
8446
|
+
"- **SEC vs NFR:** Protecting data, enforcing access control, or",
|
|
8447
|
+
" meeting a regulation \u2192 SEC. System performance, uptime, or",
|
|
8448
|
+
' scalability \u2192 NFR. "99.9% uptime" is NFR; "audit logs for all',
|
|
8449
|
+
' admin actions" is SEC.',
|
|
8450
|
+
'- **TR vs ADR:** A TR pins down a specific technology choice ("use',
|
|
8451
|
+
' PostgreSQL 16+"). An ADR records a structural decision with',
|
|
8452
|
+
' context, trade-offs, and alternatives ("why row-level isolation',
|
|
8453
|
+
' over schema-per-tenant"). TRs often follow from ADRs.',
|
|
8454
|
+
"- **FR vs INT:** What the user experiences \u2192 FR. How two systems",
|
|
8455
|
+
' communicate \u2192 INT. "User can pay with a credit card" is FR;',
|
|
8456
|
+
' "Stripe Checkout API integration for payment processing" is INT.',
|
|
8457
|
+
"- **DR vs SEC:** What data exists, how long we keep it, and how we",
|
|
8458
|
+
" recover it \u2192 DR. Who can access it and how it's protected \u2192 SEC.",
|
|
8459
|
+
" These often cross-reference each other.",
|
|
8460
|
+
"- **NFR vs OPS:** A measurable target the system must meet \u2192 NFR.",
|
|
8461
|
+
' The tooling and processes to run the system \u2192 OPS. "p99 latency',
|
|
8462
|
+
' < 200ms" is NFR; "Datadog APM for latency monitoring" is OPS.',
|
|
8463
|
+
"",
|
|
8464
|
+
"---",
|
|
8465
|
+
"",
|
|
8466
|
+
"## Architectural Tiers",
|
|
8467
|
+
"",
|
|
8468
|
+
"Every requirement also belongs to one of four architectural tiers.",
|
|
8469
|
+
'Tier is **orthogonal** to category \u2014 category answers "what kind"',
|
|
8470
|
+
'while tier answers "where in the architecture." The tier names below',
|
|
8471
|
+
"are the bundle defaults; consuming projects may rename or reduce the",
|
|
8472
|
+
"tier set in their own `docs/project-context.md`.",
|
|
8473
|
+
"",
|
|
8474
|
+
"| Tier | Slug | When to use |",
|
|
8475
|
+
"|------|------|-------------|",
|
|
8476
|
+
"| **Platform** | `platform` | Core platform services \u2014 APIs, tenant isolation, auth, event bus, shared infrastructure |",
|
|
8477
|
+
"| **Industry** | `industry` | Vertical-specific capabilities not every tenant needs |",
|
|
8478
|
+
"| **Customer Workflow** | `customer-workflow` | Business logic tenants configure within the platform \u2014 approval chains, notification rules, intake processes |",
|
|
8479
|
+
"| **Consumer Application** | `consumer-app` | UI/UX and integrations in external front-ends/systems consuming the platform's APIs |",
|
|
8480
|
+
"",
|
|
8481
|
+
"Tier is a **required metadata field**. Set it in the Metadata table",
|
|
8482
|
+
"of every requirement document and apply the matching `tier:*` issue",
|
|
8483
|
+
"label (`tier:platform`, `tier:industry`, `tier:customer-workflow`,",
|
|
8484
|
+
"or `tier:consumer-app`).",
|
|
8485
|
+
"",
|
|
8486
|
+
"**Customer field (optional).** When the proposal originated from or",
|
|
8487
|
+
"applies to a specific customer, set the `Customer` field in the",
|
|
8488
|
+
"Metadata table. Optional for Platform/Industry tiers, expected for",
|
|
8489
|
+
"Customer Workflow / Consumer Application tiers when the project",
|
|
8490
|
+
"tracks customer profiles.",
|
|
8491
|
+
"",
|
|
8492
|
+
"**Implementor field (tier-specific).** For Customer Workflow and",
|
|
8493
|
+
"Consumer Application tiers, set the `Implementor` field (Consortium",
|
|
8494
|
+
"Member / Customer / TBD) when the project tracks that distinction.",
|
|
8495
|
+
"Skip the field entirely if it does not apply to your project.",
|
|
8496
|
+
"",
|
|
8497
|
+
"**Cross-tier traceability.** Higher-tier requirements must link to",
|
|
8498
|
+
"lower-tier requirements they depend on using `Depends on (cross-tier)`",
|
|
8499
|
+
"links in the Traceability section. For example, a Consumer",
|
|
8500
|
+
"Application FR for an intake portal must trace to the Platform INT",
|
|
8501
|
+
"for the API it consumes.",
|
|
8502
|
+
"",
|
|
8503
|
+
"---",
|
|
8504
|
+
"",
|
|
8505
|
+
"## Decision Authority Rules",
|
|
8506
|
+
"",
|
|
8507
|
+
"**This is the most important section.** Not all categories are",
|
|
8508
|
+
"treated equally. The core principle is: **requirements that describe",
|
|
8509
|
+
"*what* and *why* get written directly; decisions about *how* and",
|
|
8510
|
+
"*with what* are deferred to humans.**",
|
|
8511
|
+
"",
|
|
8512
|
+
"### Write Directly (status: `Draft`)",
|
|
8513
|
+
"",
|
|
8514
|
+
"These categories describe business needs, user behavior, quality",
|
|
8515
|
+
"targets, security posture, and user experience. The writer has full",
|
|
8516
|
+
"authority to produce these documents:",
|
|
8517
|
+
"",
|
|
8518
|
+
"- **BR** \u2014 Business Requirements",
|
|
8519
|
+
"- **FR** \u2014 Functional Requirements",
|
|
8520
|
+
"- **NFR** \u2014 Non-Functional Requirements",
|
|
8521
|
+
"- **SEC** \u2014 Security & Compliance",
|
|
8522
|
+
"- **UX** \u2014 UX Requirements",
|
|
8523
|
+
"",
|
|
8524
|
+
"### Write with Partial Deferral",
|
|
8525
|
+
"",
|
|
8526
|
+
"These categories contain a mix of *what* (write directly) and *how*",
|
|
8527
|
+
"(defer). Write the requirement portions directly but defer",
|
|
8528
|
+
"technology/tooling selections:",
|
|
8529
|
+
"",
|
|
8530
|
+
"- **DR** \u2014 Write data models, retention policies, and classification",
|
|
8531
|
+
" directly. When backup strategy or storage technology must be",
|
|
8532
|
+
" specified, create a `Proposed` ADR or TR instead of choosing.",
|
|
8533
|
+
"- **MT** \u2014 Write tenant isolation requirements and metering",
|
|
8534
|
+
" dimensions directly. When the isolation *model* must be chosen",
|
|
8535
|
+
" (row-level vs schema-per-tenant vs database-per-tenant), create a",
|
|
8536
|
+
" `Proposed` ADR instead of choosing.",
|
|
8537
|
+
"- **INT** \u2014 Write the integration shape, direction, error handling",
|
|
8538
|
+
" strategy, and SLA expectations directly. When the specific",
|
|
8539
|
+
" provider must be selected, create a `Proposed` TR/ADR instead.",
|
|
8540
|
+
"- **OPS** \u2014 Write operational requirements (monitoring needs,",
|
|
8541
|
+
" incident response, deployment strategy) directly. When specific",
|
|
8542
|
+
" tooling must be selected, create a `Proposed` TR/ADR instead.",
|
|
8543
|
+
"",
|
|
8544
|
+
"### Propose Only (status: `Proposed`, pending human decision)",
|
|
8545
|
+
"",
|
|
8546
|
+
"These categories represent technology and architecture decisions",
|
|
8547
|
+
"that humans must make. Produce complete documents with all the",
|
|
8548
|
+
"information needed for the decision, but **do not make the decision",
|
|
8549
|
+
"itself**.",
|
|
8550
|
+
"",
|
|
8551
|
+
"- **ADR** \u2014 Write the full document following the ADR template:",
|
|
8552
|
+
" 1. **Context** \u2014 forces at play, constraints, what prompted the",
|
|
8553
|
+
" decision",
|
|
8554
|
+
' 2. **Decision** \u2014 set to: *"Pending human review. See',
|
|
8555
|
+
' Recommendation below."*',
|
|
8556
|
+
" 3. **Alternatives Considered** \u2014 every viable option with",
|
|
8557
|
+
" equal-depth analysis. Each gets a description, pros, and cons.",
|
|
8558
|
+
" Do not shortchange options you don't prefer.",
|
|
8559
|
+
" 4. **Recommendation** \u2014 state which option you recommend, *why*",
|
|
8560
|
+
" it's the best fit for the context, and what trade-offs are",
|
|
8561
|
+
" accepted. The reasoning must be specific to this project's",
|
|
8562
|
+
" situation \u2014 not generic.",
|
|
8563
|
+
" 5. **Consequences** \u2014 positive, negative, and neutral consequences",
|
|
8564
|
+
" of the recommended option",
|
|
8565
|
+
" 6. Set status to `Proposed`. Add an open item flagging that a",
|
|
8566
|
+
" human decision is required before dependent requirements can",
|
|
8567
|
+
" proceed.",
|
|
8568
|
+
"",
|
|
8569
|
+
"- **TR** \u2014 Write the full document following the TR template:",
|
|
8570
|
+
' 1. **Technology Choice** \u2014 set to: *"Pending human review. See',
|
|
8571
|
+
' Recommendation below."*',
|
|
8572
|
+
" 2. **Alternatives Considered** \u2014 every viable technology option",
|
|
8573
|
+
" with description, pros, cons, license, and maturity assessment",
|
|
8574
|
+
" for each",
|
|
8575
|
+
" 3. **Recommendation** \u2014 state which technology you recommend,",
|
|
8576
|
+
" *why*, and what trade-offs are accepted",
|
|
8577
|
+
' 4. **Rationale** \u2014 set to: *"See Recommendation above. Awaiting',
|
|
8578
|
+
' human decision."*',
|
|
8579
|
+
" 5. Set status to `Proposed`. Add an open item flagging that a",
|
|
8580
|
+
" human decision is required.",
|
|
8581
|
+
"",
|
|
8582
|
+
"### How Deferral Works in Practice",
|
|
8583
|
+
"",
|
|
8584
|
+
"When writing a requirement that implies a technology choice:",
|
|
8585
|
+
"",
|
|
8586
|
+
"1. Write the requirement itself (FR, DR, INT, OPS, etc.) with full",
|
|
8587
|
+
" detail.",
|
|
8588
|
+
"2. Where the requirement needs a technology decision, add a note:",
|
|
8589
|
+
' *"Technology selection pending \u2014 see [ADR-NNN](../architectural-decisions/ADR-NNN-slug.md)"*.',
|
|
8590
|
+
"3. Create the corresponding ADR or TR as `Proposed` with options,",
|
|
8591
|
+
" pros/cons, and recommendation.",
|
|
8592
|
+
'4. In the ADR/TR open items, add: *"Human decision required.',
|
|
8593
|
+
' Dependent requirements: [list]"*.',
|
|
8594
|
+
"5. In the original requirement's open items, add a cross-reference:",
|
|
8595
|
+
' *"Blocked by [ADR-NNN](../architectural-decisions/ADR-NNN-slug.md) \u2014',
|
|
8596
|
+
' technology selection pending human review."*',
|
|
8597
|
+
"",
|
|
8598
|
+
"This creates a clear chain: the requirement is understood, the",
|
|
8599
|
+
"decision is framed with all necessary information, and the",
|
|
8600
|
+
"dependency is tracked in both directions.",
|
|
8601
|
+
"",
|
|
8602
|
+
"---",
|
|
8603
|
+
"",
|
|
8604
|
+
"## File Naming Convention",
|
|
8605
|
+
"",
|
|
8606
|
+
"Every requirement file follows this pattern:",
|
|
8607
|
+
"",
|
|
8608
|
+
"```",
|
|
8609
|
+
"{PREFIX}-{NNN}-{slug}.md",
|
|
8610
|
+
"```",
|
|
8611
|
+
"",
|
|
8612
|
+
"- **PREFIX** \u2014 category abbreviation (`BR`, `FR`, `NFR`, `TR`,",
|
|
8613
|
+
" `ADR`, `SEC`, `DR`, `INT`, `OPS`, `UX`, `MT`). If the project",
|
|
8614
|
+
" declares a project-wide prefix in `docs/project-context.md`, use",
|
|
8615
|
+
" it instead.",
|
|
8616
|
+
"- **NNN** \u2014 three-digit sequential number (001, 002, 012). Always",
|
|
8617
|
+
" check the target category directory under `<REQUIREMENTS_ROOT>`",
|
|
8618
|
+
" for the next available number before writing.",
|
|
8619
|
+
"- **slug** \u2014 lowercase kebab-case descriptive name.",
|
|
8620
|
+
"",
|
|
8621
|
+
"Examples: `FR-001-user-registration.md`,",
|
|
8622
|
+
"`ADR-003-database-selection.md`,",
|
|
8623
|
+
"`SEC-001-authentication-framework.md`.",
|
|
8624
|
+
"",
|
|
8625
|
+
"---",
|
|
8626
|
+
"",
|
|
8627
|
+
"## Frontmatter",
|
|
8628
|
+
"",
|
|
8629
|
+
"Every `.md` requirement file must begin with a YAML frontmatter",
|
|
8630
|
+
"block. The minimum required fields are `title` and `description`:",
|
|
8631
|
+
"",
|
|
8632
|
+
"```markdown",
|
|
8633
|
+
"---",
|
|
8634
|
+
'title: "FR-001: User Registration"',
|
|
8635
|
+
'description: "Functional requirement for the user registration workflow."',
|
|
8636
|
+
"tier: platform",
|
|
8637
|
+
"---",
|
|
8638
|
+
"",
|
|
8639
|
+
"# FR-001: User Registration",
|
|
8640
|
+
"",
|
|
8641
|
+
"...",
|
|
8642
|
+
"```",
|
|
8643
|
+
"",
|
|
8644
|
+
"The `title` value must match the document's `# Heading` line.",
|
|
8645
|
+
"Titles containing colons must be wrapped in double quotes. The",
|
|
8646
|
+
"`tier` field must be one of `platform`, `industry`,",
|
|
8647
|
+
"`customer-workflow`, or `consumer-app` (use whatever tier slugs the",
|
|
8648
|
+
"project declares).",
|
|
8649
|
+
"",
|
|
8650
|
+
"### Optional traceability extensions",
|
|
8651
|
+
"",
|
|
8652
|
+
"Projects that publish requirements through Starlight, Astro, or a",
|
|
8653
|
+
"similar static-site generator may add structured traceability fields",
|
|
8654
|
+
"to frontmatter. One example: a `referencedIn.meetings[]` block that",
|
|
8655
|
+
"links the requirement back to a meeting transcript that informed it.",
|
|
8656
|
+
"These conventions are **optional** \u2014 adopt them only if your project",
|
|
8657
|
+
"already maintains the matching reverse-link structures.",
|
|
8658
|
+
"",
|
|
8659
|
+
"---",
|
|
8660
|
+
"",
|
|
8661
|
+
"## Status Lifecycle",
|
|
8662
|
+
"",
|
|
8663
|
+
"Every requirement has a status that tracks where it is in its",
|
|
8664
|
+
"lifecycle:",
|
|
8665
|
+
"",
|
|
8666
|
+
"| Status | Meaning |",
|
|
8667
|
+
"|---|---|",
|
|
8668
|
+
"| `Draft` | Initial capture, under discussion |",
|
|
8669
|
+
"| `Proposed` | Formally proposed, awaiting review \u2014 **used for ADR and TR documents pending human decision** |",
|
|
8670
|
+
"| `Accepted` | Approved and active |",
|
|
8671
|
+
"| `Implemented` | Fully delivered |",
|
|
8672
|
+
"| `Deprecated` | No longer applicable |",
|
|
8673
|
+
"| `Superseded` | Replaced by another requirement (link to successor) |",
|
|
8674
|
+
"",
|
|
8675
|
+
"---",
|
|
8676
|
+
"",
|
|
8677
|
+
"## Traceability",
|
|
8678
|
+
"",
|
|
8679
|
+
"Every requirement document must include a `## Traceability` section.",
|
|
8680
|
+
"Use relative markdown links with the requirement ID as link text.",
|
|
8681
|
+
"",
|
|
8682
|
+
"```markdown",
|
|
8683
|
+
"## Traceability",
|
|
8684
|
+
"",
|
|
8685
|
+
"- **Implements:** [BR-001](../business/BR-001-self-service-onboarding.md)",
|
|
8686
|
+
"- **Constrained by:** [NFR-001](../non-functional/NFR-001-api-response-times.md)",
|
|
8687
|
+
"- **Related:** [SEC-001](../security/SEC-001-authentication-framework.md)",
|
|
8688
|
+
"```",
|
|
8689
|
+
"",
|
|
8690
|
+
"### Link Types",
|
|
8691
|
+
"",
|
|
8692
|
+
"| Link Type | Meaning |",
|
|
8693
|
+
"|---|---|",
|
|
8694
|
+
"| **Implements** | This requirement realizes a higher-level requirement |",
|
|
8695
|
+
"| **Constrained by** | This requirement is bounded by another requirement |",
|
|
8696
|
+
"| **Supports** | This requirement contributes to but does not fully realize another |",
|
|
8697
|
+
"| **Supersedes** | This requirement replaces a deprecated one |",
|
|
8698
|
+
"| **Related** | Informational relationship |",
|
|
8699
|
+
"",
|
|
8700
|
+
"### Dependency Flow",
|
|
8701
|
+
"",
|
|
8702
|
+
"```",
|
|
8703
|
+
"Business Requirements (BR)",
|
|
8704
|
+
" -> justify epics and initiatives",
|
|
8705
|
+
"",
|
|
8706
|
+
"Functional (FR), Integration (INT), Multi-Tenancy (MT)",
|
|
8707
|
+
" -> decompose into feature work",
|
|
8708
|
+
"",
|
|
8709
|
+
"NFRs, Security (SEC), UX",
|
|
8710
|
+
" -> appear as acceptance criteria AND as standalone requirements",
|
|
8711
|
+
"",
|
|
8712
|
+
"Architectural Decisions (ADR)",
|
|
8713
|
+
" -> spawn implementation tasks and serve as context for TRs",
|
|
8714
|
+
"",
|
|
8715
|
+
"Technical (TR), Data (DR), Operational (OPS)",
|
|
8716
|
+
" -> drive infrastructure and platform work",
|
|
8717
|
+
"```",
|
|
8718
|
+
"",
|
|
8719
|
+
"---",
|
|
8720
|
+
"",
|
|
8721
|
+
"## Open Items",
|
|
8722
|
+
"",
|
|
8723
|
+
"Every requirement document must end with a `## Open Items` section",
|
|
8724
|
+
"(placed just above `## Revision History`). This section surfaces",
|
|
8725
|
+
"things that need human attention.",
|
|
8726
|
+
"",
|
|
8727
|
+
"### Priority Levels",
|
|
8728
|
+
"",
|
|
8729
|
+
"| Priority | Meaning |",
|
|
8730
|
+
"|---|---|",
|
|
8731
|
+
"| **P0 \u2014 Blocker** | Cannot proceed with implementation until resolved |",
|
|
8732
|
+
"| **P1 \u2014 High** | Significantly affects scope, security, or architecture |",
|
|
8733
|
+
"| **P2 \u2014 Medium** | Affects quality or completeness but doesn't block progress |",
|
|
8734
|
+
"| **P3 \u2014 Low** | Minor clarification, can be resolved asynchronously |",
|
|
8735
|
+
"",
|
|
8736
|
+
"### Subsection Types",
|
|
8737
|
+
"",
|
|
8738
|
+
"- **Identified Gaps** \u2014 Missing functionality, unhandled edge cases,",
|
|
8739
|
+
" incomplete aspects",
|
|
8740
|
+
"- **Follow-up Questions** \u2014 Ambiguities where intent cannot be",
|
|
8741
|
+
" confidently inferred",
|
|
8742
|
+
"- **Contradictions & Inconsistencies** \u2014 Conflicts between",
|
|
8743
|
+
" requirements, documentation, or stated goals",
|
|
8744
|
+
"",
|
|
8745
|
+
"Number each item within its subsection. Assign a priority. Call out",
|
|
8746
|
+
"interdependencies with open items in other documents using the",
|
|
8747
|
+
"format: `-> Depends on: [FR-001 Open Item #2](../functional/FR-001-slug.md#open-items)`.",
|
|
8748
|
+
"",
|
|
8749
|
+
"The `## Open Items` section is **not optional** \u2014 it appears in every",
|
|
8750
|
+
'document, even if a subsection is empty (write "None identified.").',
|
|
8751
|
+
"",
|
|
8752
|
+
"---",
|
|
8753
|
+
"",
|
|
8754
|
+
"## Reading the Templates and Standards Reference",
|
|
8755
|
+
"",
|
|
8756
|
+
"Before writing any requirement document:",
|
|
8757
|
+
"",
|
|
8758
|
+
"1. **Read the matching template** under `<TEMPLATES_ROOT>` for the",
|
|
8759
|
+
" category specified in the issue (`_template-FR.md`,",
|
|
8760
|
+
" `_template-ADR.md`, etc.). Templates are named",
|
|
8761
|
+
" `_template-{PREFIX}.md`. Every section in the template must",
|
|
8762
|
+
" appear in the final document.",
|
|
8763
|
+
"",
|
|
8764
|
+
"2. **Read `<STANDARDS_REF>`** if the category requires it (especially",
|
|
8765
|
+
" SEC, NFR, INT, ADR, TR). The reference covers OWASP ASVS, ISO",
|
|
8766
|
+
" 25010, BABOK, MADR, Enterprise Integration Patterns, WCAG, and",
|
|
8767
|
+
" related standards that ground the templates.",
|
|
8768
|
+
"",
|
|
8769
|
+
"Templates and the standards reference ship with this skill \u2014 they",
|
|
8770
|
+
"are the same files for every project that adopts the bundle.",
|
|
8771
|
+
"",
|
|
8772
|
+
"---",
|
|
8773
|
+
"",
|
|
8774
|
+
"## Maintaining the Registry Index",
|
|
8775
|
+
"",
|
|
8776
|
+
"Each category directory contains a `README.md` (or `_index.md`,",
|
|
8777
|
+
"depending on project convention) that lists every requirement in",
|
|
8778
|
+
"that category. **After writing any new requirement document, update",
|
|
8779
|
+
"the category index:**",
|
|
8780
|
+
"",
|
|
8781
|
+
"1. Read the index file in the same directory as the new requirement.",
|
|
8782
|
+
"2. Add a row to the requirements table with: ID (linked to the",
|
|
8783
|
+
" file), Title, Status, Priority, Last Updated date.",
|
|
8784
|
+
"3. Insert the row in sequence-number order.",
|
|
8785
|
+
"4. If the index contains a placeholder message, remove it.",
|
|
8786
|
+
"",
|
|
8787
|
+
"If the project has not seeded category READMEs yet, generate one",
|
|
8788
|
+
"from `_template-category-README.md` (shipped with this skill) and",
|
|
8789
|
+
"commit it alongside the requirement document.",
|
|
8790
|
+
"",
|
|
8791
|
+
"---",
|
|
8792
|
+
"",
|
|
8793
|
+
"## Agent Loop",
|
|
8794
|
+
"",
|
|
8795
|
+
"Run this loop exactly once per session. Never start a second issue.",
|
|
8796
|
+
"",
|
|
8797
|
+
"1. Claim one open `req:write` issue (also carries `type:requirement`",
|
|
8798
|
+
" and a `tier:*` label).",
|
|
8799
|
+
"2. Transition `status:ready` \u2192 `status:in-progress` and create the",
|
|
8800
|
+
" branch per your project's branch-naming convention.",
|
|
8801
|
+
"3. Execute the write phase below.",
|
|
8802
|
+
"4. Commit, push, open a PR, and close the issue per your project's",
|
|
8803
|
+
" PR workflow. Closing the PR transitions the issue to",
|
|
8804
|
+
" `status:done` per the standard label conventions.",
|
|
8805
|
+
"",
|
|
8806
|
+
"---",
|
|
8807
|
+
"",
|
|
8808
|
+
"## The `req:write` Phase",
|
|
8809
|
+
"",
|
|
8810
|
+
"**Goal:** Read the proposal that produced this issue, write a single",
|
|
8811
|
+
"requirement document under `<REQUIREMENTS_ROOT>`, and update the",
|
|
8812
|
+
"category index.",
|
|
8813
|
+
"",
|
|
8814
|
+
"**Budget:** Read the issue body, the named proposal file under",
|
|
8815
|
+
"`<RESEARCH_REQUIREMENTS_ROOT>`, the matching category template under",
|
|
8816
|
+
"`<TEMPLATES_ROOT>`, and `<STANDARDS_REF>` if the category needs it.",
|
|
8817
|
+
"Write one requirement document and one category-index update. No web",
|
|
8818
|
+
"searches.",
|
|
8819
|
+
"",
|
|
8820
|
+
"### Steps",
|
|
8821
|
+
"",
|
|
8822
|
+
"1. **Parse the issue.** The `req:write` issue body must include:",
|
|
8823
|
+
" - **Category** (`BR`/`FR`/`NFR`/`TR`/`ADR`/`SEC`/`DR`/`INT`/`OPS`/`UX`/`MT`)",
|
|
8824
|
+
" - **Tier** (`platform`/`industry`/`customer-workflow`/`consumer-app`)",
|
|
8825
|
+
" - **Output Path** under `<REQUIREMENTS_ROOT>/<category-dir>/<PREFIX>-<NNN>-<slug>.md`",
|
|
8826
|
+
" - **Inputs / Read** \u2014 the upstream proposals file and any source",
|
|
8827
|
+
" documents",
|
|
8828
|
+
" If any of these are missing or contradictory, comment on the",
|
|
8829
|
+
" issue, add `status:needs-attention`, and stop without writing.",
|
|
8830
|
+
"",
|
|
8831
|
+
"2. **Read the proposal.** Open the proposals file referenced in the",
|
|
8832
|
+
" issue inputs (under `<RESEARCH_REQUIREMENTS_ROOT>`). Find the",
|
|
8833
|
+
" specific proposal entry that matches this requirement's title and",
|
|
8834
|
+
" category. Treat the proposal as the authoritative source \u2014 do not",
|
|
8835
|
+
" invent fields it omits.",
|
|
8836
|
+
"",
|
|
8837
|
+
"3. **Read the matching template** under `<TEMPLATES_ROOT>` for the",
|
|
8838
|
+
" category. Read `<STANDARDS_REF>` if the category is SEC, NFR,",
|
|
8839
|
+
" INT, ADR, or TR \u2014 these depend on the standards reference for",
|
|
8840
|
+
" correct framing.",
|
|
8841
|
+
"",
|
|
8842
|
+
"4. **Pick the next sequence number.** Scan the target category",
|
|
8843
|
+
" directory under `<REQUIREMENTS_ROOT>` for existing files matching",
|
|
8844
|
+
" `{PREFIX}-NNN-*.md`. Use the next unused three-digit number.",
|
|
8845
|
+
"",
|
|
8846
|
+
"5. **Apply the decision-authority rules.** Default to `Status:",
|
|
8847
|
+
" Draft` for direct-write categories (BR, FR, NFR, SEC, UX). Set",
|
|
8848
|
+
" `Status: Proposed` for ADR and TR documents and frame the",
|
|
8849
|
+
" Recommendation section as a human decision. For DR/MT/INT/OPS",
|
|
8850
|
+
" categories that imply a technology choice, write the requirement",
|
|
8851
|
+
" directly but spin the technology decision off into a separate",
|
|
8852
|
+
" `Proposed` ADR or TR \u2014 record the cross-link in the Open Items",
|
|
8853
|
+
" section of both documents.",
|
|
8854
|
+
"",
|
|
8855
|
+
"6. **Write the document.** Fill every section in the template. For",
|
|
8856
|
+
" sections the proposal does not supply, write `TODO:` plus a brief",
|
|
8857
|
+
" note describing what input is needed, and add a corresponding",
|
|
8858
|
+
" `## Open Items` entry. Never leave a template section out.",
|
|
8859
|
+
"",
|
|
8860
|
+
"7. **Set frontmatter.** At minimum: `title`, `description`, `tier`.",
|
|
8861
|
+
" If the project declares optional frontmatter conventions in",
|
|
8862
|
+
" `docs/project-context.md` (such as `referencedIn.meetings[]`),",
|
|
8863
|
+
" honor them. Otherwise stop at the minimum.",
|
|
8864
|
+
"",
|
|
8865
|
+
"8. **Update the category index.** If the category directory has a",
|
|
8866
|
+
" `README.md` or `_index.md` registry, add a row for the new",
|
|
8867
|
+
" document in sequence order. If no index exists yet, generate one",
|
|
8868
|
+
" from `_template-category-README.md`.",
|
|
8869
|
+
"",
|
|
8870
|
+
"9. **Cross-link upstream.** Add `## Traceability` entries pointing",
|
|
8871
|
+
" to the proposals file (under `<RESEARCH_REQUIREMENTS_ROOT>`),",
|
|
8872
|
+
" the source documents the proposal cited, and any BCM capability",
|
|
8873
|
+
" the requirement supports.",
|
|
8874
|
+
"",
|
|
8875
|
+
"10. **Quality checks.** Before committing, verify:",
|
|
8876
|
+
" - [ ] Frontmatter has `title` and `description` (and `tier` if",
|
|
8877
|
+
" the project uses tier classification)",
|
|
8878
|
+
" - [ ] Title matches the `# Heading` line",
|
|
8879
|
+
" - [ ] File name follows `{PREFIX}-{NNN}-{slug}.md`",
|
|
8880
|
+
" - [ ] Status is `Draft` for direct-write categories or `Proposed`",
|
|
8881
|
+
" for ADR/TR",
|
|
8882
|
+
" - [ ] Every template section is present (use `TODO:` or `Not",
|
|
8883
|
+
" applicable \u2014 <reason>` for unfilled sections)",
|
|
8884
|
+
" - [ ] `## Traceability` exists with at least one upstream link",
|
|
8885
|
+
" - [ ] No technology decisions made in direct-write categories \u2014",
|
|
8886
|
+
" deferred to `Proposed` ADR/TR with cross-links in Open",
|
|
8887
|
+
" Items",
|
|
8888
|
+
" - [ ] `## Open Items` is present with Identified Gaps,",
|
|
8889
|
+
" Follow-up Questions, and Contradictions subsections",
|
|
8890
|
+
" - [ ] ADR/TR documents include a Recommendation section and an",
|
|
8891
|
+
" Open Item flagging the human decision required",
|
|
8892
|
+
" - [ ] Category index updated with a row for the new document",
|
|
8893
|
+
" - [ ] Tier value matches the issue's `tier:*` label",
|
|
8894
|
+
" - [ ] Cross-tier traceability entries exist where the document",
|
|
8895
|
+
" depends on or enables a different tier",
|
|
8896
|
+
"",
|
|
8897
|
+
"11. **Commit and push.** Use a `docs(<category>):` conventional",
|
|
8898
|
+
" commit message. The PR closes the `req:write` issue.",
|
|
8899
|
+
"",
|
|
8900
|
+
"---",
|
|
8901
|
+
"",
|
|
8902
|
+
"## Output Boundaries",
|
|
8903
|
+
"",
|
|
8904
|
+
"This agent writes **only** to:",
|
|
8905
|
+
"",
|
|
8906
|
+
"- `<REQUIREMENTS_ROOT>/<category-dir>/<PREFIX>-<NNN>-<slug>.md` \u2014 one",
|
|
8907
|
+
" requirement document per session",
|
|
8908
|
+
"- `<REQUIREMENTS_ROOT>/<category-dir>/README.md` (or `_index.md`) \u2014",
|
|
8909
|
+
" category index, one row appended per session",
|
|
8910
|
+
"- `<REQUIREMENTS_ROOT>/README.md` (or `_index.md`) \u2014 only if the",
|
|
8911
|
+
" top-level requirements README does not yet exist; generate from",
|
|
8912
|
+
" `_template-requirements-README.md` and stop",
|
|
8913
|
+
"",
|
|
8914
|
+
"The pipeline produces **requirement documents**. It does not write",
|
|
8915
|
+
"BCM capability models, people profiles, company profiles, software",
|
|
8916
|
+
"profiles, scan reports, or proposal files \u2014 those belong to",
|
|
8917
|
+
"specialized upstream/downstream agents.",
|
|
8918
|
+
"",
|
|
8919
|
+
"**Do NOT create:**",
|
|
8920
|
+
"- `req:scan`, `req:draft`, or `req:trace` issues \u2014 those belong to",
|
|
8921
|
+
" the `requirements-analyst` bundle",
|
|
8922
|
+
"- `bcm:*` issues \u2014 those belong to the `bcm-writer` bundle",
|
|
8923
|
+
"- `people:*`, `company:*`, `software:*`, `research:*`, or",
|
|
8924
|
+
" `industry:*` issues \u2014 those belong to their respective bundles",
|
|
8925
|
+
"",
|
|
8926
|
+
"If the proposal surfaces work that needs one of the above, comment",
|
|
8927
|
+
"on the `req:write` issue with the suggested follow-up and let a",
|
|
8928
|
+
"human route it.",
|
|
8929
|
+
"",
|
|
8930
|
+
"---",
|
|
8931
|
+
"",
|
|
8932
|
+
"## Coordination with Other Agents",
|
|
8933
|
+
"",
|
|
8934
|
+
"| Direction | Agent | What |",
|
|
8935
|
+
"|-----------|-------|------|",
|
|
8936
|
+
"| Upstream | `requirements-analyst` | Discovers gaps, drafts proposals, and creates `req:write` issues that this agent picks up |",
|
|
8937
|
+
"| Upstream | `bcm-writer` | Provides BCM capability documents that requirements trace back to via `## Traceability` links |",
|
|
8938
|
+
"| Peer | `meeting-analyst` | Provides meeting transcripts that may inform a requirement's traceability extensions (optional) |",
|
|
8939
|
+
"",
|
|
8940
|
+
"**File boundaries:** Reads `<RESEARCH_REQUIREMENTS_ROOT>` (proposals)",
|
|
8941
|
+
"and the source documents the proposals cite. Writes",
|
|
8942
|
+
"`<REQUIREMENTS_ROOT>` and the category index files. Never edits",
|
|
8943
|
+
"proposals, scan reports, BCM documents, or profiles.",
|
|
8944
|
+
"",
|
|
8945
|
+
"---",
|
|
8946
|
+
"",
|
|
8947
|
+
"## Rules",
|
|
8948
|
+
"",
|
|
8949
|
+
"- **One requirement per session.** Never write two documents in one",
|
|
8950
|
+
" session and never start a second issue.",
|
|
8951
|
+
"- **Templates are authoritative.** Use the shipped template verbatim",
|
|
8952
|
+
" for the category. Every template section must appear in the final",
|
|
8953
|
+
" document.",
|
|
8954
|
+
"- **Decision authority is non-negotiable.** Direct-write categories",
|
|
8955
|
+
" ship as `Draft`. ADR and TR ship as `Proposed` with a Recommendation",
|
|
8956
|
+
" framed for human decision. Mixed-deferral categories spin",
|
|
8957
|
+
" technology choices off into separate `Proposed` documents.",
|
|
8958
|
+
"- **Cite, don't invent.** When the proposal omits a stakeholder,",
|
|
8959
|
+
" metric, threat model entry, or technology option, write `TODO:` and",
|
|
8960
|
+
" flag the issue with `status:needs-attention`.",
|
|
8961
|
+
"- **Trace upstream.** Every requirement links back to its proposal,",
|
|
8962
|
+
" the source documents the proposal cited, and the BCM capability",
|
|
8963
|
+
" it supports (when applicable).",
|
|
8964
|
+
"- **Update the category index every time.** A requirement that",
|
|
8965
|
+
" exists as a file but is missing from its category index is",
|
|
8966
|
+
" invisible to anyone browsing the documentation tree.",
|
|
8967
|
+
"- **Write requirements, not capability models or gap reports.**",
|
|
8968
|
+
" Never open `req:scan`, `req:draft`, `req:trace`, or `bcm:*` issues",
|
|
8969
|
+
" from this pipeline."
|
|
8970
|
+
].join("\n")
|
|
8971
|
+
};
|
|
8972
|
+
var writeRequirementSkill = {
|
|
8973
|
+
name: "write-requirement",
|
|
8974
|
+
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.",
|
|
8975
|
+
disableModelInvocation: true,
|
|
8976
|
+
userInvocable: true,
|
|
8977
|
+
context: "fork",
|
|
8978
|
+
agent: "requirements-writer",
|
|
8979
|
+
platforms: { cursor: { exclude: true } },
|
|
8980
|
+
referenceFiles: REQUIREMENTS_WRITER_REFERENCE_FILES,
|
|
8981
|
+
instructions: [
|
|
8982
|
+
"# Write Requirement",
|
|
8983
|
+
"",
|
|
8984
|
+
"Write one formal requirement document using the 11-category taxonomy",
|
|
8985
|
+
"(BR, FR, NFR, TR, ADR, SEC, DR, INT, OPS, UX, MT) and the",
|
|
8986
|
+
"decision-authority rules (direct-write vs. propose-only ADR/TR).",
|
|
8987
|
+
"Dispatches the `requirements-writer` agent.",
|
|
8988
|
+
"",
|
|
8989
|
+
"## Usage",
|
|
8990
|
+
"",
|
|
8991
|
+
"/write-requirement <category> <short-title>",
|
|
8992
|
+
"",
|
|
8993
|
+
"Where `<category>` is one of `BR`, `FR`, `NFR`, `TR`, `ADR`, `SEC`,",
|
|
8994
|
+
"`DR`, `INT`, `OPS`, `UX`, `MT`.",
|
|
8995
|
+
"",
|
|
8996
|
+
"Optional extensions in the issue body:",
|
|
8997
|
+
"- `tier: platform | industry | customer-workflow | consumer-app` \u2014",
|
|
8998
|
+
" the architectural tier (default: `platform`)",
|
|
8999
|
+
"- `prefix: <PROJECT_PREFIX>` \u2014 override the default category prefix",
|
|
9000
|
+
" with a project-specific one declared in `docs/project-context.md`",
|
|
9001
|
+
"- `customer: <link-or-slug>` \u2014 link the requirement to a customer",
|
|
9002
|
+
" profile (expected for Customer Workflow / Consumer Application",
|
|
9003
|
+
" tiers in projects that track customer profiles)",
|
|
9004
|
+
"- `proposal: <path>` \u2014 pin the upstream proposal file under",
|
|
9005
|
+
" `<RESEARCH_REQUIREMENTS_ROOT>` (default: derived from the issue",
|
|
9006
|
+
" context)",
|
|
9007
|
+
"- `output: <path>` \u2014 override the default Output Path",
|
|
9008
|
+
"",
|
|
9009
|
+
"## Default Paths",
|
|
9010
|
+
"",
|
|
9011
|
+
"If the project has no override in `docs/project-context.md` or",
|
|
9012
|
+
"`agentConfig.rules`, outputs land under:",
|
|
9013
|
+
"",
|
|
9014
|
+
"- `docs/requirements/<category-dir>/<PREFIX>-<NNN>-<slug>.md`",
|
|
9015
|
+
"- `docs/requirements/<category-dir>/README.md` (registry update)",
|
|
9016
|
+
"- `docs/requirements/README.md` (top-level README, generated on",
|
|
9017
|
+
" first use only)",
|
|
9018
|
+
"",
|
|
9019
|
+
"Templates and the standards reference ship with this skill under",
|
|
9020
|
+
"`_references/templates/` and `_references/standards-and-frameworks.md`.",
|
|
9021
|
+
"",
|
|
9022
|
+
"## Steps",
|
|
9023
|
+
"",
|
|
9024
|
+
"1. Create a `req:write` issue with `type:requirement`,",
|
|
9025
|
+
" `priority:medium`, `status:ready`, and the matching `tier:*` label.",
|
|
9026
|
+
" Body must include the category, tier, output path, and a pointer",
|
|
9027
|
+
" to the upstream proposal (or a direct user description if no",
|
|
9028
|
+
" proposals file exists).",
|
|
9029
|
+
"2. Execute the write phase of the requirements-writer agent.",
|
|
9030
|
+
"3. The agent writes one requirement document, updates the category",
|
|
9031
|
+
" index, opens a PR, and closes the issue.",
|
|
9032
|
+
"",
|
|
9033
|
+
"## Output",
|
|
9034
|
+
"",
|
|
9035
|
+
"- One requirement document under `<REQUIREMENTS_ROOT>` following the",
|
|
9036
|
+
" shipped category template, with `Status: Draft` for direct-write",
|
|
9037
|
+
" categories or `Status: Proposed` for ADR/TR",
|
|
9038
|
+
"- A category-index row pointing at the new document",
|
|
9039
|
+
"- (First-time only) a top-level requirements README derived from",
|
|
9040
|
+
" `_template-requirements-README.md`"
|
|
9041
|
+
].join("\n")
|
|
9042
|
+
};
|
|
9043
|
+
var requirementsWriterBundle = {
|
|
9044
|
+
name: "requirements-writer",
|
|
9045
|
+
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.",
|
|
9046
|
+
appliesWhen: () => true,
|
|
9047
|
+
rules: [
|
|
9048
|
+
{
|
|
9049
|
+
name: "requirements-writer-workflow",
|
|
9050
|
+
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.",
|
|
9051
|
+
scope: AGENT_RULE_SCOPE.ALWAYS,
|
|
9052
|
+
content: [
|
|
9053
|
+
"# Requirements Writer Workflow",
|
|
9054
|
+
"",
|
|
9055
|
+
"Use `/write-requirement <category> <short-title>` to author one",
|
|
9056
|
+
"formal requirement document. The writer runs in a single phase",
|
|
9057
|
+
"tracked by a GitHub issue labeled `req:write` plus the matching",
|
|
9058
|
+
"`tier:*` label. Issues also carry `type:requirement` (declared",
|
|
9059
|
+
"by the upstream `requirements-analyst` bundle).",
|
|
9060
|
+
"",
|
|
9061
|
+
"The pipeline produces **requirement documents only** \u2014 capability",
|
|
9062
|
+
"models are written by the `bcm-writer` agent and gap discovery is",
|
|
9063
|
+
"the responsibility of the `requirements-analyst` agent. The",
|
|
9064
|
+
"writer never opens `req:scan`, `req:draft`, `req:trace`, or",
|
|
9065
|
+
"`bcm:*` issues.",
|
|
9066
|
+
"",
|
|
9067
|
+
"Documents follow the 11-category taxonomy (BR, FR, NFR, TR, ADR,",
|
|
9068
|
+
"SEC, DR, INT, OPS, UX, MT) and the four-tier classification",
|
|
9069
|
+
"(Platform, Industry, Customer Workflow, Consumer Application).",
|
|
9070
|
+
"Templates and a standards-and-frameworks reference ship with the",
|
|
9071
|
+
"skill \u2014 they are the same files for every project that adopts",
|
|
9072
|
+
"the bundle.",
|
|
9073
|
+
"",
|
|
9074
|
+
"Decision-authority rules are non-negotiable: BR / FR / NFR /",
|
|
9075
|
+
"SEC / UX ship as `Status: Draft`; ADR and TR ship as",
|
|
9076
|
+
"`Status: Proposed` with a Recommendation framed for human",
|
|
9077
|
+
"decision; DR / MT / INT / OPS spin technology choices off into",
|
|
9078
|
+
"separate `Proposed` ADR or TR documents.",
|
|
9079
|
+
"",
|
|
9080
|
+
"See the `requirements-writer` agent definition for full workflow",
|
|
9081
|
+
"details, configurable paths, decision-authority rules, and",
|
|
9082
|
+
"phase-by-phase instructions."
|
|
9083
|
+
].join("\n"),
|
|
9084
|
+
platforms: {
|
|
9085
|
+
cursor: { exclude: true }
|
|
9086
|
+
},
|
|
9087
|
+
tags: ["workflow"]
|
|
9088
|
+
}
|
|
9089
|
+
],
|
|
9090
|
+
skills: [writeRequirementSkill],
|
|
9091
|
+
subAgents: [requirementsWriterSubAgent],
|
|
9092
|
+
labels: [
|
|
9093
|
+
{
|
|
9094
|
+
name: "req:write",
|
|
9095
|
+
color: "FEF2C0",
|
|
9096
|
+
description: "Phase: write a formal requirement document using the requirements-writer skill"
|
|
9097
|
+
},
|
|
9098
|
+
{
|
|
9099
|
+
name: "tier:platform",
|
|
9100
|
+
color: "EDEDED",
|
|
9101
|
+
description: "Architectural tier: core platform (shared infrastructure, APIs, auth, tenant isolation)"
|
|
9102
|
+
},
|
|
9103
|
+
{
|
|
9104
|
+
name: "tier:industry",
|
|
9105
|
+
color: "EDEDED",
|
|
9106
|
+
description: "Architectural tier: industry vertical (capabilities not every tenant needs)"
|
|
9107
|
+
},
|
|
9108
|
+
{
|
|
9109
|
+
name: "tier:customer-workflow",
|
|
9110
|
+
color: "EDEDED",
|
|
9111
|
+
description: "Architectural tier: customer-configured workflow (business logic tenants configure within the platform)"
|
|
9112
|
+
},
|
|
9113
|
+
{
|
|
9114
|
+
name: "tier:consumer-app",
|
|
9115
|
+
color: "EDEDED",
|
|
9116
|
+
description: "Architectural tier: consumer application (UI/UX and integrations in external front-ends/systems)"
|
|
9117
|
+
}
|
|
9118
|
+
]
|
|
9119
|
+
};
|
|
9120
|
+
|
|
6487
9121
|
// src/agent/bundles/research-pipeline.ts
|
|
6488
9122
|
var researchAnalystSubAgent = {
|
|
6489
9123
|
name: "research-analyst",
|
|
@@ -8326,6 +10960,7 @@ var BUILT_IN_BUNDLES = [
|
|
|
8326
10960
|
orchestratorBundle,
|
|
8327
10961
|
prReviewBundle,
|
|
8328
10962
|
requirementsAnalystBundle,
|
|
10963
|
+
requirementsWriterBundle,
|
|
8329
10964
|
researchPipelineBundle,
|
|
8330
10965
|
companyProfileBundle,
|
|
8331
10966
|
peopleProfileBundle,
|
|
@@ -11805,6 +14440,7 @@ var TypeScriptConfig = class extends import_projen22.Component {
|
|
|
11805
14440
|
prReviewBundle,
|
|
11806
14441
|
projenBundle,
|
|
11807
14442
|
requirementsAnalystBundle,
|
|
14443
|
+
requirementsWriterBundle,
|
|
11808
14444
|
researchPipelineBundle,
|
|
11809
14445
|
resolveModelAlias,
|
|
11810
14446
|
resolveTemplateVariables,
|