@kudusov.takhir/ba-toolkit 3.4.1 → 3.5.0

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/CHANGELOG.md CHANGED
@@ -11,6 +11,36 @@ Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11
11
 
12
12
  ---
13
13
 
14
+ ## [3.5.0] — 2026-04-09
15
+
16
+ ### Highlights
17
+
18
+ - **Pilot skill audit pass on `/brief`, `/srs`, `/stories`** — 14 senior-BA findings (6 Critical + 8 High) applied. Three skills now match the rigour a 25-year BA from a top-tier consultancy would expect: `/brief` separates Constraints from Assumptions and forces an explicit Out of Scope section, `/srs` adds Source / Verification / Rationale per FR plus a Brief-Goal → FR traceability matrix, `/stories` makes INVEST a quality gate and adds Persona / Business Value / Dependencies fields.
19
+
20
+ ### Changed
21
+
22
+ - **`skills/brief/SKILL.md` and `skills/references/templates/brief-template.md`** — six findings applied:
23
+ - **Section numbering bug fixed** — workflow steps no longer jump from §6 to §8 (renumbered §8 → §7, §9 → §8). Was a sloppiness flag for any reviewer opening the file.
24
+ - **Out of Scope section is now mandatory** — added §4.2 to the artifact template. A brief is a contract; what is excluded matters as much as what is included. Without this, scope creep starts on the first standup.
25
+ - **Constraints and Assumptions split into two sections** (§6 and §7 in the new template). They have different change-management implications and BABOK v3 separates them. Constraints carry `Type / Source / Implication`; Assumptions carry `Statement / Owner / Validate by / Risk if false`.
26
+ - **Required-topics list extended from 7 to 11.** Added the four canonical brief inquiries every senior BA asks: buyer-vs-user separation, decision-making authority (who can sign off, by name and role), regulatory pre-screening (yes/no per regime: GDPR, HIPAA, FDA SaMD, SOC 2, PCI DSS, SOX, KYC/AML, FERPA, COPPA, EU AI Act, accessibility), and explicit failure criteria (asymmetric to success criteria — flushes out red lines).
27
+ - **Document control metadata added to the template** — `Version`, `Status` (Draft / In Review / Approved / Superseded), and an `Approvals` table at the bottom. A brief is a controlled document and needs to answer "which version did we agree to?" three months in.
28
+ - **Stakeholder table gains a "Sign-off authority" column** so the brief records not just who is interested but who has veto power.
29
+ - **`skills/srs/SKILL.md` and `skills/references/templates/srs-template.md`** — four findings applied:
30
+ - **FR template gains three IEEE 830-mandated fields:** `Source` (which stakeholder, brief goal, regulatory requirement, or parent FR drove this requirement — required for traceability), `Verification` (Test / Demo / Inspection / Analysis — without it an FR is a wish, not a contract), `Rationale` (*why* this requirement exists, not just *what* — helps future maintainers know what is safe to push back on).
31
+ - **New §7 "Traceability — Brief Goal → FR" table.** Forward traceability from `01_brief_<slug>.md` §2 business goals to the FRs that satisfy them. Every Brief goal must have at least one linked FR; uncovered goals are flagged so they cannot silently disappear from the project.
32
+ - **§3 Functional Requirements is now grouped by feature area** as `### 3.N [Area name]` subsections, each with a reserved FR-ID range (FR-001..099 for area 1, FR-100..199 for area 2, …). New FRs inserted later go into their area's free numbers, not the global tail — IDs stay stable. Was a flat list, which became unreadable for any non-trivial system.
33
+ - **Required-topics list extended from 6 to 11.** Added the five universal SRS inquiries that downstream skills (`/datadict`, `/nfr`, `/apicontract`) inherit gaps from when they're missing: authentication and authorisation model (SSO / SAML / OIDC / RBAC / ABAC / MFA), data ownership and stewardship, audit and logging requirements, data retention and deletion (GDPR right-to-erasure), reporting needs.
34
+ - **`skills/stories/SKILL.md` and `skills/references/templates/stories-template.md`** — five findings applied:
35
+ - **SKILL.md inline template removed in favour of a single source of truth at `references/templates/stories-template.md`.** Previously the inline template and the standalone file had drifted apart (the inline version had no `Size:` field and an inline AC reference; the standalone had `Size:` and a file-path AC reference). Two agents reading different parts produced different outputs. The SKILL.md now lists the field set and points at the standalone template; the standalone template is the only place that carries the per-story block layout.
36
+ - **INVEST is now an explicit quality gate.** The template has an `INVEST self-check:` line per story (Independent · Negotiable · Valuable · Estimable · Small · Testable). The `/validate` command description now requires every story to pass INVEST. The `/split` guidance references INVEST's "Small" / "Independent" criteria and Mike Cohn's nine story-splitting patterns instead of the previous arbitrary "more than 3 scenarios" rule.
37
+ - **Persona field replaces bare role.** Stories now use `**As** [Maria, ops supervisor at a 50-warehouse 3PL handling 200 returns/week]` instead of `**As an** admin`. Personas carry goals, frustrations, and context that drive UX decisions; bare job titles do not.
38
+ - **Business Value Score field added** (1–5 or High / Med / Low). Captures relative ranking *within* the same MoSCoW priority tier so a PM can sequence among 30 Must stories instead of treating them as interchangeable.
39
+ - **Depends on field added** so story-to-story dependencies are visible to `/sprint` and `/implement-plan`. A story that can't start until US-007 is done now says so in the template and won't get planned in the wrong sprint.
40
+ - **New "FR → Story coverage matrix" sub-table in the Coverage Summary.** Forward traceability from FR to US, with `(uncovered)` flag for any FR missing a linked story. Was previously a manual cross-reference task.
41
+
42
+ ---
43
+
14
44
  ## [3.4.1] — 2026-04-09
15
45
 
16
46
  ### Fixed
@@ -511,7 +541,8 @@ CI scripts that relied on the old behaviour (`init` creates files only, `install
511
541
 
512
542
  ---
513
543
 
514
- [Unreleased]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.4.1...HEAD
544
+ [Unreleased]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.5.0...HEAD
545
+ [3.5.0]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.4.1...v3.5.0
515
546
  [3.4.1]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.4.0...v3.4.1
516
547
  [3.4.0]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.3.0...v3.4.0
517
548
  [3.3.0]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.2.0...v3.3.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kudusov.takhir/ba-toolkit",
3
- "version": "3.4.1",
3
+ "version": "3.5.0",
4
4
  "description": "AI-powered Business Analyst pipeline — 24 skills from concept discovery to a sequenced implementation plan an AI coding agent can execute, with one-command Notion + Confluence publish. Works with Claude Code, Codex CLI, Gemini CLI, Cursor, and Windsurf.",
5
5
  "keywords": [
6
6
  "business-analyst",
@@ -48,10 +48,14 @@ Cover 3–7 topics per round, 2–4 rounds. Do not generate the artifact until s
48
48
  1. Product type — what exactly is being built?
49
49
  2. Business goal — what problem does the product solve?
50
50
  3. Target audience and geography.
51
- 4. Key stakeholders — who is interested, who makes decisions?
52
- 5. Known constraintsdeadlines, budget, regulatory requirements, mandatory integrations.
53
- 6. Competitive products or references.
54
- 7. Success criteriaspecific metrics or qualitative goals.
51
+ 4. **Buyer vs. user separation** — who pays for the product vs. who uses it day-to-day? In B2B SaaS, EdTech, healthcare and many other domains these are different people with different priorities. If they coincide, record "buyer = user".
52
+ 5. Key stakeholderswho is interested, who makes decisions?
53
+ 6. **Decision-making authority** who can sign off on the brief now, and who can sign off on changes later? Capture by name and role, not just by team.
54
+ 7. **Regulatory pre-screening**which of the following regimes apply: GDPR / UK GDPR, HIPAA, FDA SaMD, SOC 2, PCI DSS, SOX, KYC / AML, FERPA / COPPA, EU AI Act, accessibility (Section 508 / WCAG / EN 301 549)? Single yes/no per regime — gates the rest of the pipeline.
55
+ 8. Known constraints — deadlines, budget, technology mandates, mandatory integrations.
56
+ 9. Reference products and analogues — products in this space the user admires (and why), products that failed (and why). Anchors the project to real-world references and surfaces unstated requirements.
57
+ 10. Success criteria — specific metrics or qualitative goals.
58
+ 11. **Failure criteria** — what would make us call this project a failure? Asymmetric to success criteria; flushes out red lines that "what's success" never reveals.
55
59
 
56
60
  If a domain reference is loaded, supplement general questions with domain-specific ones. Formulate questions concretely, with example answers in parentheses.
57
61
 
@@ -62,17 +66,37 @@ If a domain reference is loaded, supplement general questions with domain-specif
62
66
  ```markdown
63
67
  # Project Brief: {Project Name}
64
68
 
69
+ **Version:** 0.1
70
+ **Status:** Draft | In Review | Approved | Superseded
65
71
  **Domain:** {saas | fintech | ecommerce | healthcare | logistics | on-demand | social-media | real-estate | igaming | edtech | govtech | ai-ml | custom:{name}}
66
72
  **Date:** {date}
73
+ **Slug:** {slug}
67
74
 
68
75
  ## 1. Project Summary
69
76
  ## 2. Business Goals and Success Metrics
70
77
  ## 3. Target Audience
78
+ ### 3.1 Buyer
79
+ ### 3.2 User (if different from Buyer)
71
80
  ## 4. High-Level Functionality Overview
72
- ## 5. Stakeholders and Roles
73
- ## 6. Constraints and Assumptions
74
- ## 7. Risks
75
- ## 8. Glossary
81
+ ### 4.1 In Scope
82
+ ### 4.2 Out of Scope
83
+ ## 5. Stakeholders and Decision-Making Authority
84
+ ## 6. Constraints
85
+ ## 7. Assumptions
86
+ ## 8. Risks
87
+ ## 9. Success and Failure Criteria
88
+ ### 9.1 Success Criteria
89
+ ### 9.2 Failure Criteria
90
+ ## 10. Reference Products and Analogues
91
+ ## 11. Glossary
92
+
93
+ ---
94
+
95
+ ## Approvals
96
+
97
+ | Name | Role | Approval Date | Notes |
98
+ |------|------|---------------|-------|
99
+ | {name} | {role} | {date} | {notes} |
76
100
  ```
77
101
 
78
102
  ### 6. AGENTS.md update
@@ -83,7 +107,7 @@ If a domain reference is loaded, supplement general questions with domain-specif
83
107
 
84
108
  If you find no `AGENTS.md` at all (neither in cwd nor up the tree), warn the user that the project was likely set up before v3.1 and tell them to run `ba-toolkit init --name "..." --slug {slug}` to scaffold the per-project `AGENTS.md`. Do not create one yourself with arbitrary structure.
85
109
 
86
- ### 8. Iterative refinement
110
+ ### 7. Iterative refinement
87
111
 
88
112
  - `/revise [section]` — rewrite a section.
89
113
  - `/expand [section]` — add detail.
@@ -91,7 +115,7 @@ If you find no `AGENTS.md` at all (neither in cwd nor up the tree), warn the use
91
115
  - `/validate` — check completeness and consistency.
92
116
  - `/done` — finalize and update `AGENTS.md`. Next step: `/srs`.
93
117
 
94
- ### 9. Closing message
118
+ ### 8. Closing message
95
119
 
96
120
  After saving the artifact, present the following summary to the user (see `references/closing-message.md` for format):
97
121
 
@@ -1,5 +1,7 @@
1
1
  # Project Brief: [PROJECT_NAME]
2
2
 
3
+ **Version:** 0.1
4
+ **Status:** Draft
3
5
  **Domain:** [DOMAIN]
4
6
  **Date:** [DATE]
5
7
  **Slug:** [SLUG]
@@ -11,41 +13,99 @@
11
13
  ## 2. Business Goals and Success Metrics
12
14
 
13
15
  | # | Goal | Success Metric |
14
- |---|------|---------------|
16
+ |---|------|----------------|
15
17
  | 1 | [goal] | [measurable metric] |
16
18
 
17
19
  ## 3. Target Audience
18
20
 
21
+ ### 3.1 Buyer
22
+
23
+ [Who pays for the product. Decision criteria, budget cycle, procurement constraints.]
24
+
25
+ | Segment | Description | Geography |
26
+ |---------|-------------|-----------|
27
+ | [segment] | [description] | [region] |
28
+
29
+ ### 3.2 User (if different from Buyer)
30
+
31
+ [Who actually uses the product day to day. Skip this section if buyer = user.]
32
+
19
33
  | Segment | Description | Geography |
20
34
  |---------|-------------|-----------|
21
35
  | [segment] | [description] | [region] |
22
36
 
23
37
  ## 4. High-Level Functionality Overview
24
38
 
25
- [2–4 paragraphs or bullet list of the main functional areas. No technical detail — what the system does, not how.]
39
+ ### 4.1 In Scope
40
+
41
+ [2–4 paragraphs or bullet list of the main functional areas that ARE part of the first release. No technical detail — what the system does, not how.]
42
+
43
+ ### 4.2 Out of Scope
44
+
45
+ [Explicit list of capabilities that are NOT in scope for this brief. A brief is a contract — what is excluded matters as much as what is included. Use this section to head off scope creep on day one.]
46
+
47
+ - [out-of-scope item with one-line reason]
48
+
49
+ ## 5. Stakeholders and Decision-Making Authority
50
+
51
+ | Role | Responsibility | Interest | Sign-off authority |
52
+ |------|----------------|----------|--------------------|
53
+ | [role] | [what they do] | [what they care about] | Yes / No / Veto only |
26
54
 
27
- ## 5. Stakeholders and Roles
55
+ ## 6. Constraints
28
56
 
29
- | Role | Responsibility | Interest |
30
- |------|---------------|---------|
31
- | [role] | [what they do] | [what they care about] |
57
+ Imposed facts that cannot be changed during the project. Each constraint has a source (regulatory, contractual, technical, organisational) and an implication.
32
58
 
33
- ## 6. Constraints and Assumptions
59
+ | # | Constraint | Type | Source | Implication |
60
+ |---|------------|------|--------|-------------|
61
+ | 1 | [constraint] | Regulatory / Contractual / Technical / Organisational | [source] | [what this forces or forbids] |
34
62
 
35
- **Constraints:**
36
- - [constraint]
63
+ ## 7. Assumptions
37
64
 
38
- **Assumptions:**
39
- - [assumption]
65
+ Beliefs we have made about the world that may turn out wrong. Each assumption has an owner and a validation date — if invalidated, the assumption becomes a risk and the owner must escalate.
40
66
 
41
- ## 7. Risks
67
+ | # | Assumption | Owner | Validate by | Risk if false |
68
+ |---|------------|-------|-------------|---------------|
69
+ | 1 | [assumption] | [name / role] | [date] | [what breaks if this turns out false] |
70
+
71
+ ## 8. Risks
42
72
 
43
73
  | # | Risk | Probability | Impact | Mitigation |
44
- |---|------|-------------|--------|-----------|
45
- | 1 | [risk] | High/Med/Low | High/Med/Low | [mitigation] |
74
+ |---|------|-------------|--------|------------|
75
+ | 1 | [risk] | High / Med / Low | High / Med / Low | [mitigation] |
76
+
77
+ ## 9. Success and Failure Criteria
78
+
79
+ ### 9.1 Success Criteria
80
+
81
+ [Specific, measurable conditions that, if met, mean the project succeeded. Reference business goals from §2 where applicable.]
82
+
83
+ - [criterion]
84
+
85
+ ### 9.2 Failure Criteria
86
+
87
+ [Specific conditions that, if met, mean the project should be paused or cancelled. Asymmetric to success criteria — these are red lines, not "less than success".]
46
88
 
47
- ## 8. Glossary
89
+ - [criterion]
90
+
91
+ ## 10. Reference Products and Analogues
92
+
93
+ | Product | What it does well | What it does badly / misses | Relevance |
94
+ |---------|-------------------|-----------------------------|-----------|
95
+ | [name] | [one line] | [one line] | [why it matters to this project] |
96
+
97
+ ## 11. Glossary
98
+
99
+ The project's source-of-truth glossary. Propagated to all subsequent artifacts (`/srs`, `/stories`, `/glossary`). Add a term here once and reuse the same definition everywhere downstream.
48
100
 
49
101
  | Term | Definition |
50
- |------|-----------|
102
+ |------|------------|
51
103
  | [term] | [definition] |
104
+
105
+ ---
106
+
107
+ ## Approvals
108
+
109
+ | Name | Role | Approval Date | Notes |
110
+ |------|------|---------------|-------|
111
+ | [name] | [role] | [YYYY-MM-DD] | [optional notes] |
@@ -1,9 +1,11 @@
1
1
  # Software Requirements Specification (SRS): [PROJECT_NAME]
2
2
 
3
+ **Version:** 0.1
4
+ **Status:** Draft
3
5
  **Domain:** [DOMAIN]
4
6
  **Date:** [DATE]
5
7
  **Slug:** [SLUG]
6
- **Reference:** [01_brief_SLUG.md]
8
+ **Reference:** `01_brief_[SLUG].md`
7
9
 
8
10
  ## 1. Introduction
9
11
 
@@ -18,7 +20,7 @@
18
20
  ### 1.3 Definitions and Abbreviations
19
21
 
20
22
  | Term | Definition |
21
- |------|-----------|
23
+ |------|------------|
22
24
  | [term] | [definition] |
23
25
 
24
26
  ### 1.4 Document References
@@ -34,7 +36,7 @@
34
36
  ### 2.2 User Roles
35
37
 
36
38
  | Role | Description | Permissions |
37
- |------|-------------|------------|
39
+ |------|-------------|-------------|
38
40
  | [role] | [description] | [what they can do] |
39
41
 
40
42
  ### 2.3 Constraints
@@ -47,16 +49,37 @@
47
49
 
48
50
  ## 3. Functional Requirements
49
51
 
50
- ### FR-001: [Title]
52
+ > **Grouping rule:** FRs are grouped by feature area as `### 3.N [Area name]` subsections. Each area gets a reserved numeric range (FR-001..099 for area 1, FR-100..199 for area 2, …). New FRs inserted later go into their area's free numbers, not the global tail — IDs stay stable.
53
+
54
+ ### 3.1 [Feature Area Name]
55
+
56
+ #### FR-001: [Title]
51
57
 
52
58
  - **Description:** [What the system must do.]
53
59
  - **Actor:** [Role that triggers or benefits from this requirement.]
54
60
  - **Input:** [What data or event initiates this.]
55
61
  - **Output / Result:** [What the system produces or changes.]
56
62
  - **Business Rules:** [Formulas, limits, conditions.]
63
+ - **Source:** [Stakeholder name, Brief goal G-N, regulatory requirement, or parent FR-NNN. Required for traceability.]
64
+ - **Verification:** Test | Demo | Inspection | Analysis
65
+ - **Rationale:** [Why this requirement exists. Not what — why. Helps future maintainers know what is safe to push back on.]
57
66
  - **Priority:** Must | Should | Could | Won't
58
67
 
59
- <!-- Repeat for each FR. Numbering: FR-001, FR-002, ... -->
68
+ <!-- Repeat #### FR block for each requirement in this area. Numbering: FR-001, FR-002, ... within the area's reserved range. -->
69
+
70
+ ### 3.2 [Next Feature Area Name]
71
+
72
+ #### FR-100: [Title]
73
+
74
+ - **Description:** ...
75
+ - **Actor:** ...
76
+ - **Input:** ...
77
+ - **Output / Result:** ...
78
+ - **Business Rules:** ...
79
+ - **Source:** ...
80
+ - **Verification:** Test | Demo | Inspection | Analysis
81
+ - **Rationale:** ...
82
+ - **Priority:** Must | Should | Could | Won't
60
83
 
61
84
  ## 4. Interface Requirements
62
85
 
@@ -83,8 +106,18 @@ _(Detailed in `/nfr` artifact — `06_nfr_[SLUG].md`)_
83
106
  ## 6. Priority Matrix (MoSCoW)
84
107
 
85
108
  | Priority | FR Count | FR IDs |
86
- |----------|---------|--------|
87
- | Must | [n] | FR-001, FR-002, … |
88
- | Should | [n] | … |
89
- | Could | [n] | … |
90
- | Won't | [n] | … |
109
+ |----------|----------|--------|
110
+ | Must | [n] | FR-001, FR-002, … |
111
+ | Should | [n] | … |
112
+ | Could | [n] | … |
113
+ | Won't | [n] | … |
114
+
115
+ ## 7. Traceability — Brief Goal → FR
116
+
117
+ Forward traceability from the Project Brief's business goals to the FRs that satisfy them. Every Brief goal listed in `01_brief_[SLUG].md` §2 must have at least one linked FR; uncovered goals are flagged here as `(uncovered)` so they cannot silently disappear from the project.
118
+
119
+ | Goal ID | Goal Description (from `01_brief_[SLUG].md` §2) | Linked FRs |
120
+ |---------|--------------------------------------------------|------------|
121
+ | G1 | [goal text] | FR-001, FR-007, FR-014 |
122
+ | G2 | [goal text] | FR-003 |
123
+ | G3 | [goal text] | (uncovered) |
@@ -8,7 +8,7 @@
8
8
  ## Epic Index
9
9
 
10
10
  | # | Epic | User Stories |
11
- |---|------|-------------|
11
+ |---|------|--------------|
12
12
  | E-01 | [Epic name] | US-001 – US-00N |
13
13
 
14
14
  ---
@@ -19,28 +19,38 @@
19
19
 
20
20
  ### US-001: [Story title]
21
21
 
22
- **As a** [role],
22
+ **As** [Persona — named persona with role and one-line context, e.g. "Maria, ops supervisor at a 50-warehouse 3PL handling 200 returns/week"],
23
23
  **I want to** [action],
24
24
  **so that** [benefit].
25
25
 
26
+ **Persona:** [name + role + context]
26
27
  **Acceptance Criteria:** → `05_ac_[SLUG].md` → US-001
27
28
  **FR Reference:** FR-[NNN]
28
29
  **Priority:** Must | Should | Could | Won't
30
+ **Business Value Score:** 1–5 *(captures relative ranking within the same MoSCoW tier)*
29
31
  **Size:** XS | S | M | L | XL
32
+ **Depends on:** US-[NNN], US-[NNN] *(or `—` if independent)*
33
+ **Definition of Ready:** [checklist or "see `00_principles_[SLUG].md` §4 / §6"]
34
+ **INVEST self-check:** Independent ✓ · Negotiable ✓ · Valuable ✓ · Estimable ✓ · Small ✓ · Testable ✓
30
35
  **Notes:** [Edge cases, out-of-scope clarifications.]
31
36
 
32
37
  ---
33
38
 
34
39
  ### US-002: [Story title]
35
40
 
36
- **As a** [role],
41
+ **As** [Persona],
37
42
  **I want to** [action],
38
43
  **so that** [benefit].
39
44
 
45
+ **Persona:** [name + role + context]
40
46
  **Acceptance Criteria:** → `05_ac_[SLUG].md` → US-002
41
47
  **FR Reference:** FR-[NNN]
42
48
  **Priority:** Must | Should | Could | Won't
49
+ **Business Value Score:** 1–5
43
50
  **Size:** XS | S | M | L | XL
51
+ **Depends on:** —
52
+ **Definition of Ready:** [checklist or reference]
53
+ **INVEST self-check:** Independent ✓ · Negotiable ✓ · Valuable ✓ · Estimable ✓ · Small ✓ · Testable ✓
44
54
  **Notes:** [Edge cases, out-of-scope clarifications.]
45
55
 
46
56
  <!-- Repeat US block for each story. Numbering: US-001, US-002, ... -->
@@ -49,12 +59,24 @@
49
59
 
50
60
  ## Coverage Summary
51
61
 
62
+ ### By priority
63
+
52
64
  | Priority | Story Count | Story IDs |
53
- |----------|------------|-----------|
65
+ |----------|-------------|-----------|
54
66
  | Must | [n] | US-001, … |
55
67
  | Should | [n] | … |
56
68
  | Could | [n] | … |
57
69
  | Won't | [n] | … |
58
70
 
71
+ ### FR → Story coverage matrix
72
+
73
+ Forward traceability from each Functional Requirement in `02_srs_[SLUG].md` to the User Stories that implement it. Every Must-priority FR must have at least one Must-priority story; uncovered FRs are flagged here as `(uncovered)`.
74
+
75
+ | FR ID | FR Title (from SRS) | Linked Stories | Coverage Status |
76
+ |-------|---------------------|----------------|-----------------|
77
+ | FR-001 | [title] | US-001, US-007 | ✓ |
78
+ | FR-002 | [title] | US-003 | ✓ |
79
+ | FR-003 | [title] | (uncovered) | ✗ |
80
+
59
81
  **Total stories:** [N]
60
82
  **Total epics:** [N]
@@ -31,11 +31,16 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
31
31
 
32
32
  **Required topics:**
33
33
  1. User roles — which roles interact with the system?
34
- 2. External integrationswhich systems require connection?
35
- 3. Multi-language and multi-currency support if applicable.
36
- 4. Regulatory requirements which standards and laws apply?
37
- 5. Prioritization methodMoSCoW (Must, Should, Could, Won't) or other.
38
- 6. Key business ruleslimits, thresholds, calculation formulas.
34
+ 2. **Authentication and authorisation model** how do users authenticate (password / SSO / SAML / OIDC / passwordless)? RBAC or ABAC? Preset roles or custom? Multi-factor for which roles?
35
+ 3. External integrations which systems require connection?
36
+ 4. Multi-language and multi-currency support if applicable.
37
+ 5. Regulatory requirementswhich standards and laws apply?
38
+ 6. **Data ownership and stewardship** who owns each data class? Who can read it? Who can correct it? Who is liable if it leaks?
39
+ 7. **Audit and logging** — which events must be logged for SOC 2 / SOX / regulatory audit? What is the log retention period?
40
+ 8. **Data retention and deletion** — how long is each data class retained? What is the deletion policy under GDPR right-to-erasure (and equivalent local laws)?
41
+ 9. **Reporting needs** — which reports must the system produce, for whom, on what cadence, in what format?
42
+ 10. Prioritization method — MoSCoW (Must, Should, Could, Won't) or other.
43
+ 11. Key business rules — limits, thresholds, calculation formulas.
39
44
 
40
45
  Supplement with domain-specific questions and typical functional areas from the reference.
41
46
 
@@ -46,6 +51,13 @@ Supplement with domain-specific questions and typical functional areas from the
46
51
  ```markdown
47
52
  # Software Requirements Specification (SRS): {Name}
48
53
 
54
+ **Version:** 0.1
55
+ **Status:** Draft | In Review | Approved
56
+ **Domain:** {domain}
57
+ **Date:** {date}
58
+ **Slug:** {slug}
59
+ **Reference:** 01_brief_{slug}.md
60
+
49
61
  ## 1. Introduction
50
62
  ### 1.1 Purpose
51
63
  ### 1.2 Scope
@@ -59,12 +71,20 @@ Supplement with domain-specific questions and typical functional areas from the
59
71
  ### 2.4 Assumptions and Dependencies
60
72
 
61
73
  ## 3. Functional Requirements
62
- ### FR-{NNN}: {Title}
63
- - **Description:** ...
64
- - **Actor:** ...
65
- - **Input:** ...
66
- - **Output / Result:** ...
67
- - **Business Rules:** ...
74
+
75
+ **Grouping rule:** FRs are grouped by feature area as `### 3.N [Area name]` subsections (e.g. `### 3.1 Authentication`, `### 3.2 Catalog`, `### 3.3 Checkout`). Each area gets a reserved numeric range (FR-001..099 for area 1, FR-100..199 for area 2, FR-200..299 for area 3, …). New FRs added later go into their area's free numbers, not the global tail — IDs stay stable.
76
+
77
+ ### 3.1 [Feature area]
78
+
79
+ #### FR-{NNN}: {Title}
80
+ - **Description:** [What the system must do.]
81
+ - **Actor:** [Role that triggers or benefits from this requirement.]
82
+ - **Input:** [What data or event initiates this.]
83
+ - **Output / Result:** [What the system produces or changes.]
84
+ - **Business Rules:** [Formulas, limits, conditions.]
85
+ - **Source:** [Which stakeholder, brief goal, regulatory requirement, or parent FR-NNN drove this requirement. Required for traceability.]
86
+ - **Verification:** Test | Demo | Inspection | Analysis
87
+ - **Rationale:** [Why this requirement exists. Not what — why. Helps future maintainers know what is safe to push back on.]
68
88
  - **Priority:** Must | Should | Could | Won't
69
89
 
70
90
  ## 4. Interface Requirements
@@ -76,9 +96,25 @@ Supplement with domain-specific questions and typical functional areas from the
76
96
  _(detailed in /nfr artifact)_
77
97
 
78
98
  ## 6. Priority Matrix (MoSCoW)
99
+
100
+ | Priority | FR Count | FR IDs |
101
+ |----------|----------|--------|
102
+ | Must | [n] | … |
103
+ | Should | [n] | … |
104
+ | Could | [n] | … |
105
+ | Won't | [n] | … |
106
+
107
+ ## 7. Traceability — Brief Goal → FR
108
+
109
+ Forward traceability from the Project Brief's business goals to the FRs that satisfy them. Every Brief goal must have at least one linked FR; uncovered goals are flagged.
110
+
111
+ | Goal ID | Goal Description (from 01_brief) | Linked FRs |
112
+ |---------|----------------------------------|------------|
113
+ | G1 | [goal from brief §2] | FR-001, FR-007, FR-014 |
114
+ | G2 | [goal from brief §2] | FR-003 |
79
115
  ```
80
116
 
81
- FR numbering: sequential, three-digit (FR-001, FR-002, ...).
117
+ FR numbering: sequential within each feature area, three-digit, with reserved ranges per area (FR-001..099 for area 1, FR-100..199 for area 2, ). New FRs inserted later use the next free number in their area's range, not the global tail — IDs stay stable.
82
118
 
83
119
  ## AGENTS.md update
84
120
 
@@ -40,27 +40,26 @@ Supplement with domain-specific questions and typical epics from the reference.
40
40
 
41
41
  **File:** `03_stories_{slug}.md`
42
42
 
43
- ```markdown
44
- # User Stories: {Name}
45
-
46
- ## Epic: {Epic Name}
47
- Brief description and business value.
48
-
49
- ### US-{NNN}: {Short Description}
50
- - **Role:** {role from SRS}
51
- - **Action:** {what they want to do}
52
- - **Value:** {why, business outcome}
53
- - **Priority:** {Must | Should | Could | Won't}
54
- - **Linked FR:** FR-{NNN}
55
- - **Acceptance Criteria:** _(filled at /ac stage)_
56
- - **Notes:** {edge cases, additional context}
57
- ```
43
+ The full template lives at `references/templates/stories-template.md` and is the single source of truth for the per-story field set. The fields are:
44
+
45
+ - **Persona** — named persona with role and one-line context (e.g. "Maria, ops supervisor at a 50-warehouse 3PL handling 200 returns/week"). Personas, not bare job titles.
46
+ - **Action** the atomic capability the persona wants.
47
+ - **Value** the business outcome the persona gets.
48
+ - **Business Value Score** — 1–5 (or High / Med / Low). Captures relative ranking *within* the same MoSCoW priority tier so PMs can sequence inside a tier.
49
+ - **Priority** — MoSCoW (Must | Should | Could | Won't).
50
+ - **Size** XS | S | M | L | XL.
51
+ - **Linked FR** FR-NNN (cross-reference to `02_srs_{slug}.md`).
52
+ - **Depends on** — US-NNN list of stories that must complete before this one can start, or `—` if independent. Critical for sprint planning.
53
+ - **Acceptance Criteria** — `→ 05_ac_{slug}.md US-NNN` (detailed in `/ac`).
54
+ - **Definition of Ready** — checklist or "see `00_principles_{slug}.md`".
55
+ - **INVEST self-check** one line confirming the story passes Independent / Negotiable / Valuable / Estimable / Small / Testable.
56
+ - **Notes** edge cases, out-of-scope clarifications.
58
57
 
59
58
  **Rules:**
60
59
  - Sequential numbering: US-001, US-002, ...
61
- - One story = one atomic action by one role.
60
+ - One story = one atomic action by one persona.
62
61
  - All Must-priority FR from SRS must have at least one US.
63
- - Story covering > 3 scenarios suggest `/split`.
62
+ - **INVEST is the quality gate.** A story that fails any of the six INVEST criteria must be revised or split. `/split` should be used when a story violates **Small** or **Independent**, or when it matches one of Mike Cohn's nine story-splitting patterns (workflow steps, business-rule variations, happy / unhappy paths, data variations, simple-vs-complex, deferred performance, CRUD operations, input options, or break-out a spike).
64
63
 
65
64
  ## Iterative refinement
66
65
 
@@ -68,7 +67,7 @@ Brief description and business value.
68
67
  - `/expand [US-NNN]` — add detail.
69
68
  - `/split [US-NNN]` — split into smaller stories.
70
69
  - `/clarify [focus]` — targeted ambiguity pass.
71
- - `/validate` — all FR covered; no orphan stories; numbering correct; roles consistent.
70
+ - `/validate` — all FR covered; no orphan stories; numbering correct; personas consistent; **every story passes the INVEST checklist** (Independent, Negotiable, Valuable, Estimable, Small, Testable).
72
71
  - `/done` — finalize. Next step: `/usecases`.
73
72
 
74
73
  ## Closing message