@kudusov.takhir/ba-toolkit 1.2.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 +125 -0
- package/COMMANDS.md +69 -0
- package/LICENSE +21 -0
- package/README.md +842 -0
- package/README.ru.md +846 -0
- package/bin/ba-toolkit.js +468 -0
- package/package.json +49 -0
- package/skills/ac/SKILL.md +88 -0
- package/skills/analyze/SKILL.md +126 -0
- package/skills/apicontract/SKILL.md +113 -0
- package/skills/brief/SKILL.md +120 -0
- package/skills/clarify/SKILL.md +96 -0
- package/skills/datadict/SKILL.md +98 -0
- package/skills/estimate/SKILL.md +124 -0
- package/skills/export/SKILL.md +215 -0
- package/skills/glossary/SKILL.md +145 -0
- package/skills/handoff/SKILL.md +146 -0
- package/skills/nfr/SKILL.md +85 -0
- package/skills/principles/SKILL.md +182 -0
- package/skills/references/closing-message.md +33 -0
- package/skills/references/domains/ecommerce.md +209 -0
- package/skills/references/domains/fintech.md +180 -0
- package/skills/references/domains/healthcare.md +223 -0
- package/skills/references/domains/igaming.md +183 -0
- package/skills/references/domains/logistics.md +221 -0
- package/skills/references/domains/on-demand.md +231 -0
- package/skills/references/domains/real-estate.md +241 -0
- package/skills/references/domains/saas.md +185 -0
- package/skills/references/domains/social-media.md +234 -0
- package/skills/references/environment.md +57 -0
- package/skills/references/prerequisites.md +191 -0
- package/skills/references/templates/README.md +35 -0
- package/skills/references/templates/ac-template.md +58 -0
- package/skills/references/templates/analyze-template.md +65 -0
- package/skills/references/templates/apicontract-template.md +183 -0
- package/skills/references/templates/brief-template.md +51 -0
- package/skills/references/templates/datadict-template.md +75 -0
- package/skills/references/templates/export-template.md +112 -0
- package/skills/references/templates/handoff-template.md +102 -0
- package/skills/references/templates/nfr-template.md +97 -0
- package/skills/references/templates/principles-template.md +118 -0
- package/skills/references/templates/research-template.md +99 -0
- package/skills/references/templates/risk-template.md +188 -0
- package/skills/references/templates/scenarios-template.md +93 -0
- package/skills/references/templates/sprint-template.md +158 -0
- package/skills/references/templates/srs-template.md +90 -0
- package/skills/references/templates/stories-template.md +60 -0
- package/skills/references/templates/trace-template.md +59 -0
- package/skills/references/templates/usecases-template.md +51 -0
- package/skills/references/templates/wireframes-template.md +96 -0
- package/skills/research/SKILL.md +136 -0
- package/skills/risk/SKILL.md +163 -0
- package/skills/scenarios/SKILL.md +113 -0
- package/skills/sprint/SKILL.md +174 -0
- package/skills/srs/SKILL.md +124 -0
- package/skills/stories/SKILL.md +85 -0
- package/skills/trace/SKILL.md +85 -0
- package/skills/usecases/SKILL.md +91 -0
- package/skills/wireframes/SKILL.md +107 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Software Requirements Specification (SRS): [PROJECT_NAME]
|
|
2
|
+
|
|
3
|
+
**Domain:** [DOMAIN]
|
|
4
|
+
**Date:** [DATE]
|
|
5
|
+
**Slug:** [SLUG]
|
|
6
|
+
**Reference:** [01_brief_SLUG.md]
|
|
7
|
+
|
|
8
|
+
## 1. Introduction
|
|
9
|
+
|
|
10
|
+
### 1.1 Purpose
|
|
11
|
+
|
|
12
|
+
[What this document describes and who it is for.]
|
|
13
|
+
|
|
14
|
+
### 1.2 Scope
|
|
15
|
+
|
|
16
|
+
[System boundaries — what is in scope and what is explicitly out of scope.]
|
|
17
|
+
|
|
18
|
+
### 1.3 Definitions and Abbreviations
|
|
19
|
+
|
|
20
|
+
| Term | Definition |
|
|
21
|
+
|------|-----------|
|
|
22
|
+
| [term] | [definition] |
|
|
23
|
+
|
|
24
|
+
### 1.4 Document References
|
|
25
|
+
|
|
26
|
+
- Project Brief: `01_brief_[SLUG].md`
|
|
27
|
+
|
|
28
|
+
## 2. General Description
|
|
29
|
+
|
|
30
|
+
### 2.1 Product Context
|
|
31
|
+
|
|
32
|
+
[How the system fits into the broader ecosystem — users, external systems, platform.]
|
|
33
|
+
|
|
34
|
+
### 2.2 User Roles
|
|
35
|
+
|
|
36
|
+
| Role | Description | Permissions |
|
|
37
|
+
|------|-------------|------------|
|
|
38
|
+
| [role] | [description] | [what they can do] |
|
|
39
|
+
|
|
40
|
+
### 2.3 Constraints
|
|
41
|
+
|
|
42
|
+
[Technical, legal, regulatory, and business constraints.]
|
|
43
|
+
|
|
44
|
+
### 2.4 Assumptions and Dependencies
|
|
45
|
+
|
|
46
|
+
[What is assumed to be true; what external systems or services are depended upon.]
|
|
47
|
+
|
|
48
|
+
## 3. Functional Requirements
|
|
49
|
+
|
|
50
|
+
### FR-001: [Title]
|
|
51
|
+
|
|
52
|
+
- **Description:** [What the system must do.]
|
|
53
|
+
- **Actor:** [Role that triggers or benefits from this requirement.]
|
|
54
|
+
- **Input:** [What data or event initiates this.]
|
|
55
|
+
- **Output / Result:** [What the system produces or changes.]
|
|
56
|
+
- **Business Rules:** [Formulas, limits, conditions.]
|
|
57
|
+
- **Priority:** Must | Should | Could | Won't
|
|
58
|
+
|
|
59
|
+
<!-- Repeat for each FR. Numbering: FR-001, FR-002, ... -->
|
|
60
|
+
|
|
61
|
+
## 4. Interface Requirements
|
|
62
|
+
|
|
63
|
+
### 4.1 User Interfaces
|
|
64
|
+
|
|
65
|
+
[Description of UI requirements at a system level — not screen layouts.]
|
|
66
|
+
|
|
67
|
+
### 4.2 Software Interfaces (API)
|
|
68
|
+
|
|
69
|
+
[External APIs the system must call or expose.]
|
|
70
|
+
|
|
71
|
+
### 4.3 External System Interfaces
|
|
72
|
+
|
|
73
|
+
[Integrations with third-party systems.]
|
|
74
|
+
|
|
75
|
+
## 5. Non-functional Requirements
|
|
76
|
+
|
|
77
|
+
_(Detailed in `/nfr` artifact — `06_nfr_[SLUG].md`)_
|
|
78
|
+
|
|
79
|
+
| Category | Summary | NFR Reference |
|
|
80
|
+
|----------|---------|---------------|
|
|
81
|
+
| [category] | [brief description] | NFR-[NNN] |
|
|
82
|
+
|
|
83
|
+
## 6. Priority Matrix (MoSCoW)
|
|
84
|
+
|
|
85
|
+
| Priority | FR Count | FR IDs |
|
|
86
|
+
|----------|---------|--------|
|
|
87
|
+
| Must | [n] | FR-001, FR-002, … |
|
|
88
|
+
| Should | [n] | … |
|
|
89
|
+
| Could | [n] | … |
|
|
90
|
+
| Won't | [n] | … |
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# User Stories: [PROJECT_NAME]
|
|
2
|
+
|
|
3
|
+
**Domain:** [DOMAIN]
|
|
4
|
+
**Date:** [DATE]
|
|
5
|
+
**Slug:** [SLUG]
|
|
6
|
+
**References:** `01_brief_[SLUG].md`, `02_srs_[SLUG].md`
|
|
7
|
+
|
|
8
|
+
## Epic Index
|
|
9
|
+
|
|
10
|
+
| # | Epic | User Stories |
|
|
11
|
+
|---|------|-------------|
|
|
12
|
+
| E-01 | [Epic name] | US-001 – US-00N |
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## E-01: [Epic Name]
|
|
17
|
+
|
|
18
|
+
> [One-sentence description of the epic's goal.]
|
|
19
|
+
|
|
20
|
+
### US-001: [Story title]
|
|
21
|
+
|
|
22
|
+
**As a** [role],
|
|
23
|
+
**I want to** [action],
|
|
24
|
+
**so that** [benefit].
|
|
25
|
+
|
|
26
|
+
**Acceptance Criteria:** → `05_ac_[SLUG].md` → US-001
|
|
27
|
+
**FR Reference:** FR-[NNN]
|
|
28
|
+
**Priority:** Must | Should | Could | Won't
|
|
29
|
+
**Size:** XS | S | M | L | XL
|
|
30
|
+
**Notes:** [Edge cases, out-of-scope clarifications.]
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### US-002: [Story title]
|
|
35
|
+
|
|
36
|
+
**As a** [role],
|
|
37
|
+
**I want to** [action],
|
|
38
|
+
**so that** [benefit].
|
|
39
|
+
|
|
40
|
+
**Acceptance Criteria:** → `05_ac_[SLUG].md` → US-002
|
|
41
|
+
**FR Reference:** FR-[NNN]
|
|
42
|
+
**Priority:** Must | Should | Could | Won't
|
|
43
|
+
**Size:** XS | S | M | L | XL
|
|
44
|
+
**Notes:** [Edge cases, out-of-scope clarifications.]
|
|
45
|
+
|
|
46
|
+
<!-- Repeat US block for each story. Numbering: US-001, US-002, ... -->
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Coverage Summary
|
|
51
|
+
|
|
52
|
+
| Priority | Story Count | Story IDs |
|
|
53
|
+
|----------|------------|-----------|
|
|
54
|
+
| Must | [n] | US-001, … |
|
|
55
|
+
| Should | [n] | … |
|
|
56
|
+
| Could | [n] | … |
|
|
57
|
+
| Won't | [n] | … |
|
|
58
|
+
|
|
59
|
+
**Total stories:** [N]
|
|
60
|
+
**Total epics:** [N]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Traceability Matrix: [PROJECT_NAME]
|
|
2
|
+
|
|
3
|
+
**Domain:** [DOMAIN]
|
|
4
|
+
**Date:** [DATE]
|
|
5
|
+
**Slug:** [SLUG]
|
|
6
|
+
**References:** All artifacts `01_brief_[SLUG].md` → `10_scenarios_[SLUG].md`
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Forward Traceability: FR → Downstream Artifacts
|
|
11
|
+
|
|
12
|
+
| FR | Title | US | UC | AC | NFR | Entity | ADR | API | WF | SC |
|
|
13
|
+
|----|-------|----|----|----|-----|--------|-----|-----|----|----|
|
|
14
|
+
| FR-001 | [Title] | US-[NNN] | UC-[NNN] | US-[NNN] S[N] | NFR-[NNN] | [Entity] | ADR-[NNN] | `POST /[ep]` | WF-[NNN] | SC-[NNN] |
|
|
15
|
+
| FR-002 | [Title] | US-[NNN] | — | US-[NNN] S[N] | — | [Entity] | — | `GET /[ep]` | WF-[NNN] | — |
|
|
16
|
+
|
|
17
|
+
_Legend: `—` = not applicable or not yet linked_
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Reverse Traceability: User Stories → FR
|
|
22
|
+
|
|
23
|
+
| US | Title | FR | Priority |
|
|
24
|
+
|----|-------|----|---------|
|
|
25
|
+
| US-001 | [Title] | FR-[NNN] | Must |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Coverage Gaps
|
|
30
|
+
|
|
31
|
+
| Artifact | Orphaned Items | Note |
|
|
32
|
+
|---------|---------------|------|
|
|
33
|
+
| FR | FR-[NNN] | No US linked |
|
|
34
|
+
| US | US-[NNN] | No AC defined |
|
|
35
|
+
| UC | UC-[NNN] | No FR reference |
|
|
36
|
+
| NFR | NFR-[NNN] | No FR or US linked |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Coverage Statistics
|
|
41
|
+
|
|
42
|
+
| Artifact | Total | Linked | Coverage % |
|
|
43
|
+
|---------|-------|--------|-----------|
|
|
44
|
+
| Functional Requirements | [N] | [N] | [N]% |
|
|
45
|
+
| User Stories | [N] | [N] | [N]% |
|
|
46
|
+
| Use Cases | [N] | [N] | [N]% |
|
|
47
|
+
| Acceptance Criteria (scenarios) | [N] | [N] | [N]% |
|
|
48
|
+
| NFR items | [N] | [N] | [N]% |
|
|
49
|
+
| API Endpoints | [N] | [N] | [N]% |
|
|
50
|
+
| Wireframe Screens | [N] | [N] | [N]% |
|
|
51
|
+
|
|
52
|
+
**Overall traceability score:** [N]%
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Recommended Actions
|
|
57
|
+
|
|
58
|
+
1. [Action to close gap — e.g. "Add AC for US-NNN"]
|
|
59
|
+
2. [Action — e.g. "Link FR-NNN to an API endpoint"]
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Use Cases: [PROJECT_NAME]
|
|
2
|
+
|
|
3
|
+
**Domain:** [DOMAIN]
|
|
4
|
+
**Date:** [DATE]
|
|
5
|
+
**Slug:** [SLUG]
|
|
6
|
+
**References:** `01_brief_[SLUG].md`, `02_srs_[SLUG].md`, `03_stories_[SLUG].md`
|
|
7
|
+
|
|
8
|
+
## Use Case Index
|
|
9
|
+
|
|
10
|
+
| ID | Title | Primary Actor | Linked Stories |
|
|
11
|
+
|----|-------|--------------|---------------|
|
|
12
|
+
| UC-001 | [Title] | [Actor] | US-[NNN] |
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## UC-001: [Use Case Title]
|
|
17
|
+
|
|
18
|
+
**ID:** UC-001
|
|
19
|
+
**Primary Actor:** [Role]
|
|
20
|
+
**Supporting Actors:** [Other roles or external systems]
|
|
21
|
+
**Trigger:** [What event or action initiates this use case]
|
|
22
|
+
**Pre-conditions:**
|
|
23
|
+
- [Condition that must be true before the use case starts]
|
|
24
|
+
|
|
25
|
+
**Post-conditions (Success):**
|
|
26
|
+
- [System state after successful completion]
|
|
27
|
+
|
|
28
|
+
**Post-conditions (Failure):**
|
|
29
|
+
- [System state after failure or cancellation]
|
|
30
|
+
|
|
31
|
+
### Main Success Scenario
|
|
32
|
+
|
|
33
|
+
| Step | Actor | Action / System Response |
|
|
34
|
+
|------|-------|--------------------------|
|
|
35
|
+
| 1 | [Actor] | [Does something] |
|
|
36
|
+
| 2 | System | [Responds with something] |
|
|
37
|
+
| 3 | [Actor] | [Continues] |
|
|
38
|
+
|
|
39
|
+
### Alternative Flows
|
|
40
|
+
|
|
41
|
+
**Alt 1 — [Name]:** At step [N], if [condition], then [action]. Resume at step [M].
|
|
42
|
+
|
|
43
|
+
### Exception Flows
|
|
44
|
+
|
|
45
|
+
**Exc 1 — [Name]:** At step [N], if [error condition], then [system response and outcome].
|
|
46
|
+
|
|
47
|
+
**Linked Stories:** US-[NNN], US-[NNN]
|
|
48
|
+
**Linked FR:** FR-[NNN]
|
|
49
|
+
**Linked Wireframe:** WF-[NNN]
|
|
50
|
+
|
|
51
|
+
<!-- Repeat UC block for each use case. Numbering: UC-001, UC-002, ... -->
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Wireframe Descriptions: [PROJECT_NAME]
|
|
2
|
+
|
|
3
|
+
**Domain:** [DOMAIN]
|
|
4
|
+
**Date:** [DATE]
|
|
5
|
+
**Slug:** [SLUG]
|
|
6
|
+
**References:** `03_stories_[SLUG].md`, `04_usecases_[SLUG].md`, `05_ac_[SLUG].md`
|
|
7
|
+
|
|
8
|
+
> These are textual wireframe descriptions, not visual diagrams. Each screen is described with sufficient detail for a designer to produce a high-fidelity mockup.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Screen Index
|
|
13
|
+
|
|
14
|
+
| ID | Screen Name | Platform | Linked Stories |
|
|
15
|
+
|----|------------|----------|---------------|
|
|
16
|
+
| WF-001 | [Screen name] | Web / iOS / Android / All | US-[NNN] |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## WF-001: [Screen Name]
|
|
21
|
+
|
|
22
|
+
**Platform:** Web | iOS | Android | All
|
|
23
|
+
**Route / Deep link:** `[/path or app://screen]`
|
|
24
|
+
**Entry points:** [Where the user comes from — e.g. Home → tap "Browse"]
|
|
25
|
+
**Linked Stories:** US-[NNN], US-[NNN]
|
|
26
|
+
**Linked UC:** UC-[NNN]
|
|
27
|
+
|
|
28
|
+
### Layout
|
|
29
|
+
|
|
30
|
+
**Header / Navigation:**
|
|
31
|
+
[Describe top bar — back button, title, right-side actions.]
|
|
32
|
+
|
|
33
|
+
**Body:**
|
|
34
|
+
[Describe the main content area top to bottom. Mention each UI element: headings, lists, cards, images, form fields, buttons, empty states.]
|
|
35
|
+
|
|
36
|
+
**Footer / Bottom navigation:**
|
|
37
|
+
[Describe persistent navigation or action bar if present.]
|
|
38
|
+
|
|
39
|
+
### States
|
|
40
|
+
|
|
41
|
+
| State | Description |
|
|
42
|
+
|-------|-------------|
|
|
43
|
+
| Loading | [Skeleton screen / spinner / progress bar] |
|
|
44
|
+
| Empty | [Empty state message and CTA] |
|
|
45
|
+
| Error | [Error message and recovery action] |
|
|
46
|
+
| [Feature state] | [Description, e.g. "item added to cart — badge updates"] |
|
|
47
|
+
|
|
48
|
+
### Interactions
|
|
49
|
+
|
|
50
|
+
| Trigger | Action |
|
|
51
|
+
|---------|--------|
|
|
52
|
+
| Tap [element] | [Navigation or action] |
|
|
53
|
+
| Scroll to bottom | [Pagination load / sticky header behaviour] |
|
|
54
|
+
| [Other gesture] | [Result] |
|
|
55
|
+
|
|
56
|
+
### Design Notes
|
|
57
|
+
|
|
58
|
+
- [Specific UX note, e.g. "Confirmation dialog before destructive action"]
|
|
59
|
+
- [Accessibility note, e.g. "Form labels must be visible, not only placeholder text"]
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## WF-002: [Screen Name]
|
|
64
|
+
|
|
65
|
+
**Platform:** Web | iOS | Android | All
|
|
66
|
+
**Route / Deep link:** `[/path]`
|
|
67
|
+
**Entry points:** [Entry points]
|
|
68
|
+
**Linked Stories:** US-[NNN]
|
|
69
|
+
|
|
70
|
+
### Layout
|
|
71
|
+
|
|
72
|
+
**Header / Navigation:** [Description]
|
|
73
|
+
|
|
74
|
+
**Body:** [Description]
|
|
75
|
+
|
|
76
|
+
**Footer:** [Description]
|
|
77
|
+
|
|
78
|
+
### States
|
|
79
|
+
|
|
80
|
+
| State | Description |
|
|
81
|
+
|-------|-------------|
|
|
82
|
+
| Loading | [Description] |
|
|
83
|
+
| Empty | [Description] |
|
|
84
|
+
| Error | [Description] |
|
|
85
|
+
|
|
86
|
+
### Interactions
|
|
87
|
+
|
|
88
|
+
| Trigger | Action |
|
|
89
|
+
|---------|--------|
|
|
90
|
+
| [Trigger] | [Action] |
|
|
91
|
+
|
|
92
|
+
### Design Notes
|
|
93
|
+
|
|
94
|
+
- [Note]
|
|
95
|
+
|
|
96
|
+
<!-- Repeat WF block for each screen. Numbering: WF-001, WF-002, ... -->
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ba-research
|
|
3
|
+
description: >
|
|
4
|
+
Generate a technology and constraints research document before committing to API and data design. Covers integration options, API style choices, data storage alternatives, regulatory constraints, and ADR (Architecture Decision Records) with rationale. Use on /research command, or when the user asks for "technology research", "tech decisions", "architecture options", "integration research", "compare options", "what stack to use", "ADR", "architecture decision", "research constraints". Optional step — run after /datadict and before /apicontract.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /research — Technology Research and Constraints
|
|
8
|
+
|
|
9
|
+
Optional step between `/datadict` and `/apicontract`. Documents technology decisions, integration options, and architectural constraints before the API contract is committed. Generates Architecture Decision Records (ADR) with rationale for each key choice.
|
|
10
|
+
|
|
11
|
+
Running this step prevents "beautiful but impractical" API contracts by surfacing constraints early.
|
|
12
|
+
|
|
13
|
+
## Context loading
|
|
14
|
+
|
|
15
|
+
0. If `00_principles_*.md` exists in the output directory, load it and apply its conventions.
|
|
16
|
+
1. Read `01_brief_*.md`, `02_srs_*.md`, `07_datadict_*.md`. SRS and Data Dictionary are required.
|
|
17
|
+
2. Extract: domain, integrations listed in SRS, regulatory requirements, entities and their relationships from the Data Dictionary, non-functional requirements (if `06_nfr_*.md` exists).
|
|
18
|
+
3. If domain is supported, load `references/domains/{domain}.md` for domain-typical integration patterns.
|
|
19
|
+
|
|
20
|
+
## Environment
|
|
21
|
+
|
|
22
|
+
Read `references/environment.md` from the `ba-toolkit` directory to determine the output directory. If unavailable, apply the default rule.
|
|
23
|
+
|
|
24
|
+
## Interview
|
|
25
|
+
|
|
26
|
+
1–2 rounds, 4–6 questions.
|
|
27
|
+
|
|
28
|
+
**Required topics:**
|
|
29
|
+
1. Existing infrastructure — is there a current backend, database, or API the new system must integrate with or extend?
|
|
30
|
+
2. API style preference — REST, GraphQL, gRPC, or a combination? Any existing API gateway or BFF?
|
|
31
|
+
3. Real-time requirements — do any user stories require live updates (WebSocket, SSE, polling)?
|
|
32
|
+
4. Third-party integrations — which external services are confirmed (payment gateway, auth provider, analytics, CDN)?
|
|
33
|
+
5. Data storage constraints — any vendor lock-in restrictions, cloud provider preferences, on-premise requirements?
|
|
34
|
+
6. Compliance constraints — any restrictions on where data can be stored (jurisdiction, residency)?
|
|
35
|
+
|
|
36
|
+
Supplement with domain-specific typical integrations from the reference.
|
|
37
|
+
|
|
38
|
+
## Generation
|
|
39
|
+
|
|
40
|
+
**File:** `07a_research_{slug}.md`
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
# Technology Research: {Project Name}
|
|
44
|
+
|
|
45
|
+
**Date:** {date}
|
|
46
|
+
**Scope:** Decisions informing /apicontract and /datadict
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 1. Context Summary
|
|
51
|
+
|
|
52
|
+
Brief summary of the system from the brief and SRS: what it does, who uses it, key integrations, and non-functional constraints relevant to technical decisions.
|
|
53
|
+
|
|
54
|
+
## 2. Architecture Decision Records (ADR)
|
|
55
|
+
|
|
56
|
+
### ADR-001: {Decision Title}
|
|
57
|
+
|
|
58
|
+
| | |
|
|
59
|
+
|--|--|
|
|
60
|
+
| **Status** | Accepted |
|
|
61
|
+
| **Date** | {date} |
|
|
62
|
+
| **Linked FR/NFR** | {references} |
|
|
63
|
+
|
|
64
|
+
**Context:** {Why this decision is needed — the problem being solved.}
|
|
65
|
+
|
|
66
|
+
**Options considered:**
|
|
67
|
+
|
|
68
|
+
| Option | Pros | Cons |
|
|
69
|
+
|--------|------|------|
|
|
70
|
+
| {Option A} | {pros} | {cons} |
|
|
71
|
+
| {Option B} | {pros} | {cons} |
|
|
72
|
+
|
|
73
|
+
**Decision:** {Chosen option and rationale.}
|
|
74
|
+
|
|
75
|
+
**Consequences:** {What becomes easier or harder as a result.}
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
_(Repeat ADR block for each key decision.)_
|
|
80
|
+
|
|
81
|
+
## 3. Integration Map
|
|
82
|
+
|
|
83
|
+
| System | Type | Direction | Protocol | Auth | Notes |
|
|
84
|
+
|--------|------|-----------|----------|------|-------|
|
|
85
|
+
| {Name} | {internal/external} | {in/out/bidirectional} | {REST/WS/…} | {JWT/API Key/…} | {notes} |
|
|
86
|
+
|
|
87
|
+
## 4. Data Storage Decisions
|
|
88
|
+
|
|
89
|
+
| Entity group | Storage type | Rationale |
|
|
90
|
+
|--------------|-------------|-----------|
|
|
91
|
+
| {e.g., Transactional data} | {e.g., PostgreSQL} | {reason} |
|
|
92
|
+
| {e.g., Session data} | {e.g., Redis} | {reason} |
|
|
93
|
+
|
|
94
|
+
## 5. Real-time Strategy
|
|
95
|
+
|
|
96
|
+
{Describe approach for any real-time requirements: WebSocket, SSE, polling interval, or none. Reference the US/FR that require it.}
|
|
97
|
+
|
|
98
|
+
## 6. Regulatory and Compliance Constraints
|
|
99
|
+
|
|
100
|
+
{List constraints affecting API design: data residency, PII handling, audit log requirements, encryption standards. Cross-reference NFR where applicable.}
|
|
101
|
+
|
|
102
|
+
## 7. Open Questions
|
|
103
|
+
|
|
104
|
+
{Any decisions deferred or requiring external input before /apicontract can proceed.}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Rules:**
|
|
108
|
+
- ADR numbering: ADR-001, ADR-002, ...
|
|
109
|
+
- Every ADR must include at least two options compared.
|
|
110
|
+
- Decisions must reference FR or NFR that drove the choice.
|
|
111
|
+
- Open Questions section is mandatory — even if empty (write "None").
|
|
112
|
+
|
|
113
|
+
## Iterative refinement
|
|
114
|
+
|
|
115
|
+
- `/revise [ADR-NNN]` — update a decision.
|
|
116
|
+
- `/expand [ADR-NNN]` — add more options or consequences.
|
|
117
|
+
- `/clarify [focus]` — targeted ambiguity pass.
|
|
118
|
+
- `/validate` — all integrations from SRS covered; every ADR has a decision; no open questions without an owner.
|
|
119
|
+
- `/done` — finalize. Next step: `/apicontract`.
|
|
120
|
+
|
|
121
|
+
## Closing message
|
|
122
|
+
|
|
123
|
+
After saving the artifact, present the following summary (see `references/closing-message.md` for format):
|
|
124
|
+
|
|
125
|
+
- Saved file path.
|
|
126
|
+
- Total number of ADRs documented.
|
|
127
|
+
- Number of confirmed external integrations.
|
|
128
|
+
- Any open questions that must be resolved before `/apicontract`.
|
|
129
|
+
|
|
130
|
+
Available commands: `/clarify [focus]` · `/revise [ADR-NNN]` · `/expand [ADR-NNN]` · `/validate` · `/done`
|
|
131
|
+
|
|
132
|
+
Next step: `/apicontract`
|
|
133
|
+
|
|
134
|
+
## Style
|
|
135
|
+
|
|
136
|
+
Formal, neutral. No emoji, slang. Generate in the artifact language. Technical terms (ADR, REST, WebSocket, JWT) remain in English. Architecture option names remain in English.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ba-risk
|
|
3
|
+
description: >
|
|
4
|
+
Dedicated risk register for BA Toolkit projects. Use on /risk command, or when the user asks to "identify risks", "create a risk register", "assess project risks", "list risks", "risk matrix". Cross-cutting command — can run at any pipeline stage once Brief or SRS exists. Re-run after Research to capture technical risks.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /risk — Risk Register
|
|
8
|
+
|
|
9
|
+
Cross-cutting command. Extracts risks from existing artifacts, classifies them by category, scores them by probability × impact, and produces or updates `00_risks_{slug}.md` with a full risk register.
|
|
10
|
+
|
|
11
|
+
## Syntax
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/risk [optional: action]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Examples:
|
|
18
|
+
- `/risk` — build or refresh the full risk register
|
|
19
|
+
- `/risk add [description]` — manually add a risk and score it interactively
|
|
20
|
+
- `/risk update RISK-03` — update status or mitigation for a specific risk
|
|
21
|
+
|
|
22
|
+
## Context loading
|
|
23
|
+
|
|
24
|
+
0. If `00_principles_*.md` exists, load it — apply language convention (section 1) and ID naming convention (section 2).
|
|
25
|
+
1. Load artifacts in order, extracting risk signals from each:
|
|
26
|
+
- `01_brief_{slug}.md` — Risks and Constraints sections (primary source)
|
|
27
|
+
- `02_srs_{slug}.md` — Assumptions, Constraints, out-of-scope items
|
|
28
|
+
- `06_nfr_{slug}.md` — NFR targets that are aggressive or uncertain (performance, security, availability)
|
|
29
|
+
- `07a_research_{slug}.md` — ADR alternatives rejected, integration unknowns, technology risks
|
|
30
|
+
- `08_apicontract_{slug}.md` — third-party API dependencies, rate limits, SLA gaps
|
|
31
|
+
2. Load `skills/references/domains/{domain}.md` — note any domain-specific compliance or regulatory risk categories.
|
|
32
|
+
3. If `00_risks_{slug}.md` already exists, load it to merge rather than replace.
|
|
33
|
+
|
|
34
|
+
## Environment
|
|
35
|
+
|
|
36
|
+
Read `references/environment.md` from the `ba-toolkit` directory to determine the output directory.
|
|
37
|
+
|
|
38
|
+
## Analysis pass
|
|
39
|
+
|
|
40
|
+
### Step 1 — Risk extraction
|
|
41
|
+
|
|
42
|
+
For each artifact, extract explicit and implicit risks:
|
|
43
|
+
|
|
44
|
+
- **Explicit:** statements containing "risk", "concern", "unknown", "assumption", "dependency", "TBD", "to be confirmed", "may", "might", "could fail".
|
|
45
|
+
- **Implicit:**
|
|
46
|
+
- NFR targets with no stated baseline → measurement risk.
|
|
47
|
+
- Third-party integrations with no documented SLA → dependency risk.
|
|
48
|
+
- Features marked out of scope that may be expected by stakeholders → scope creep risk.
|
|
49
|
+
- ADR alternatives rejected due to uncertainty → technical risk.
|
|
50
|
+
|
|
51
|
+
### Step 2 — Classification
|
|
52
|
+
|
|
53
|
+
Assign each risk to one category:
|
|
54
|
+
|
|
55
|
+
| Category | Examples |
|
|
56
|
+
|----------|---------|
|
|
57
|
+
| **Technical** | Architecture unknowns, integration failures, performance uncertainty, security gaps |
|
|
58
|
+
| **Business** | Market assumptions, stakeholder misalignment, budget or timeline pressure |
|
|
59
|
+
| **Compliance** | Regulatory requirements, data privacy (GDPR, HIPAA), licensing constraints |
|
|
60
|
+
| **External** | Third-party API availability, vendor lock-in, geopolitical or infrastructure factors |
|
|
61
|
+
|
|
62
|
+
### Step 3 — Scoring
|
|
63
|
+
|
|
64
|
+
Score each risk on two axes (1–5):
|
|
65
|
+
|
|
66
|
+
| Score | Probability | Impact |
|
|
67
|
+
|-------|------------|--------|
|
|
68
|
+
| 1 | Very unlikely | Negligible — no effect on delivery |
|
|
69
|
+
| 2 | Unlikely | Minor — small rework or delay |
|
|
70
|
+
| 3 | Possible | Moderate — scope or timeline affected |
|
|
71
|
+
| 4 | Likely | Major — milestone at risk |
|
|
72
|
+
| 5 | Very likely | Critical — project viability threatened |
|
|
73
|
+
|
|
74
|
+
**Risk Score = Probability × Impact** (range 1–25).
|
|
75
|
+
|
|
76
|
+
Priority thresholds:
|
|
77
|
+
- 🔴 **Critical:** score ≥ 15
|
|
78
|
+
- 🟡 **High:** score 8–14
|
|
79
|
+
- 🟢 **Medium:** score 4–7
|
|
80
|
+
- ⚪ **Low:** score 1–3
|
|
81
|
+
|
|
82
|
+
## Generation
|
|
83
|
+
|
|
84
|
+
Save `00_risks_{slug}.md` to the output directory.
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
# Risk Register: {PROJECT_NAME}
|
|
88
|
+
|
|
89
|
+
**Domain:** {DOMAIN}
|
|
90
|
+
**Date:** {DATE}
|
|
91
|
+
**Slug:** {SLUG}
|
|
92
|
+
**Sources:** {list of artifacts scanned}
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Summary
|
|
97
|
+
|
|
98
|
+
| Priority | Count |
|
|
99
|
+
|---------|-------|
|
|
100
|
+
| 🔴 Critical | N |
|
|
101
|
+
| 🟡 High | N |
|
|
102
|
+
| 🟢 Medium | N |
|
|
103
|
+
| ⚪ Low | N |
|
|
104
|
+
| **Total** | **N** |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Risk Register
|
|
109
|
+
|
|
110
|
+
| ID | Title | Category | Probability | Impact | Score | Priority | Status |
|
|
111
|
+
|----|-------|----------|:-----------:|:------:|:-----:|---------|--------|
|
|
112
|
+
| RISK-01 | [Short title] | Technical | 4 | 5 | 20 | 🔴 Critical | Open |
|
|
113
|
+
| RISK-02 | [Short title] | Business | 3 | 3 | 9 | 🟡 High | Open |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Risk Details
|
|
118
|
+
|
|
119
|
+
### RISK-01 — [Short title]
|
|
120
|
+
|
|
121
|
+
**Category:** Technical
|
|
122
|
+
**Probability:** 4 / 5 — Likely
|
|
123
|
+
**Impact:** 5 / 5 — Critical
|
|
124
|
+
**Score:** 20 🔴 Critical
|
|
125
|
+
**Status:** Open
|
|
126
|
+
**Source:** `07a_research_{slug}.md`
|
|
127
|
+
|
|
128
|
+
**Description:**
|
|
129
|
+
[Full description of the risk and the conditions under which it materialises.]
|
|
130
|
+
|
|
131
|
+
**Mitigation:**
|
|
132
|
+
[Steps to reduce the probability or impact before the risk occurs.]
|
|
133
|
+
|
|
134
|
+
**Contingency:**
|
|
135
|
+
[Steps to take if the risk materialises despite mitigation.]
|
|
136
|
+
|
|
137
|
+
**Owner:** [Role responsible — e.g., Tech Lead, Product Manager]
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Risks are sorted by Score descending within each section. IDs are sequential (RISK-01, RISK-02, …) assigned in order of discovery, not severity.
|
|
141
|
+
|
|
142
|
+
### Merge behaviour
|
|
143
|
+
|
|
144
|
+
If `00_risks_{slug}.md` already exists:
|
|
145
|
+
- Preserve existing risks, their IDs, and manually set statuses.
|
|
146
|
+
- Add new risks found since last run with new sequential IDs.
|
|
147
|
+
- Re-score existing risks only if new information changes the assessment; note the change.
|
|
148
|
+
- Update the Sources and Date fields.
|
|
149
|
+
|
|
150
|
+
## Closing message
|
|
151
|
+
|
|
152
|
+
After saving, present the following summary (see `references/closing-message.md` for format):
|
|
153
|
+
|
|
154
|
+
- Saved file: `00_risks_{slug}.md`
|
|
155
|
+
- Total risks identified: N (N critical, N high, N medium, N low).
|
|
156
|
+
- Top 2–3 critical or high risks by name.
|
|
157
|
+
- If any risks have no mitigation defined: flag them for `/risk update`.
|
|
158
|
+
|
|
159
|
+
Available commands: `/risk add [description]` · `/risk update RISK-NN` · `/clarify [artifact]` · `/analyze`
|
|
160
|
+
|
|
161
|
+
## Style
|
|
162
|
+
|
|
163
|
+
Concise, factual. Risk descriptions state the condition and consequence ("If X happens, then Y will occur"). Do not inflate severity — score based on evidence from artifacts, not speculation. Use the artifact language set in `00_principles_{slug}.md`.
|