@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,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ba-scenarios
|
|
3
|
+
description: >
|
|
4
|
+
Generate end-to-end validation scenarios linking user stories, acceptance criteria, API endpoints, and wireframes into complete user journeys for acceptance testing. Use on /scenarios command, or when the user asks for "validation scenarios", "end-to-end scenarios", "user journeys", "acceptance test scenarios", "E2E scenarios", "test cases", "walkthrough scenarios", "happy path scenarios", "test the product", "QA scenarios". Optional step — run after /wireframes.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /scenarios — Validation Scenarios
|
|
8
|
+
|
|
9
|
+
Optional step after `/wireframes`. Generates end-to-end user journeys that can be used for acceptance testing, UX walkthroughs, and stakeholder demos. Each scenario traces a complete user path from entry point to outcome, linking US, AC, API endpoints, and wireframes.
|
|
10
|
+
|
|
11
|
+
Scenarios are not unit or integration tests — they describe observable behavior from the user's perspective.
|
|
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`, `03_stories_*.md`, `05_ac_*.md`, `09_wireframes_*.md`. Stories and AC are required; wireframes strongly recommended.
|
|
17
|
+
2. If `08_apicontract_*.md` exists, use it to link API calls within steps.
|
|
18
|
+
3. Extract: slug, domain, roles, Must-priority US list, AC per US, WF per US, API endpoints.
|
|
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 round, 3–5 questions.
|
|
27
|
+
|
|
28
|
+
**Required topics:**
|
|
29
|
+
1. Coverage priority — generate scenarios for Must-priority US only, or include Should as well?
|
|
30
|
+
2. Negative paths — include error and edge-case journeys alongside happy paths?
|
|
31
|
+
3. Persona depth — use generic role names (e.g., "Player") or named personas with context (e.g., "Andrei, a new player from Germany")?
|
|
32
|
+
4. Platform — which platform does the primary scenario run on (web / mobile / Telegram Mini App)?
|
|
33
|
+
5. Demo focus — are any scenarios intended for a stakeholder demo? If so, which flows should be highlighted?
|
|
34
|
+
|
|
35
|
+
## Generation
|
|
36
|
+
|
|
37
|
+
**File:** `10_scenarios_{slug}.md`
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# Validation Scenarios: {Project Name}
|
|
41
|
+
|
|
42
|
+
**Date:** {date}
|
|
43
|
+
**Coverage:** {Must / Must + Should} priority user stories
|
|
44
|
+
**Platform:** {web | mobile | Telegram Mini App | all}
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## SC-{NNN}: {Scenario Title}
|
|
49
|
+
|
|
50
|
+
**Persona:** {Role or named persona with brief context}
|
|
51
|
+
**Entry point:** {Where the journey starts — screen, URL, or trigger}
|
|
52
|
+
**Goal:** {What the user is trying to achieve}
|
|
53
|
+
**Linked US:** US-{NNN}, US-{NNN}
|
|
54
|
+
**Type:** {happy path | negative | edge case}
|
|
55
|
+
|
|
56
|
+
### Steps
|
|
57
|
+
|
|
58
|
+
| # | User action | System response | Screen (WF) | API call | AC verified |
|
|
59
|
+
|---|-------------|-----------------|-------------|----------|-------------|
|
|
60
|
+
| 1 | {what the user does} | {what the system shows/does} | WF-{NNN} | {METHOD /path} | AC-{NNN}-{NN} |
|
|
61
|
+
| 2 | … | … | … | … | … |
|
|
62
|
+
|
|
63
|
+
### Expected outcome
|
|
64
|
+
{Specific, observable result — what the user sees or receives at the end of the scenario.}
|
|
65
|
+
|
|
66
|
+
### Failure conditions
|
|
67
|
+
{Conditions under which this scenario fails and what the user should see instead.}
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
_(Repeat SC block for each scenario.)_
|
|
72
|
+
|
|
73
|
+
## Coverage Summary
|
|
74
|
+
|
|
75
|
+
| US | Scenario(s) | Happy path | Negative path |
|
|
76
|
+
|----|-------------|------------|---------------|
|
|
77
|
+
| US-001 | SC-001, SC-002 | ✓ | ✓ |
|
|
78
|
+
| US-002 | SC-003 | ✓ | — |
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Rules:**
|
|
82
|
+
- Numbering: SC-001, SC-002, ...
|
|
83
|
+
- Every Must-priority US must have at least one happy-path scenario.
|
|
84
|
+
- Each step must reference a WF screen if wireframes were generated.
|
|
85
|
+
- Each step must reference the AC it verifies (if applicable).
|
|
86
|
+
- API calls reference endpoints from `08_apicontract_{slug}.md` using the exact method and path.
|
|
87
|
+
- Failure conditions are mandatory for each scenario.
|
|
88
|
+
|
|
89
|
+
## Iterative refinement
|
|
90
|
+
|
|
91
|
+
- `/revise [SC-NNN]` — rewrite a scenario.
|
|
92
|
+
- `/expand [SC-NNN]` — add more steps or paths.
|
|
93
|
+
- `/split [SC-NNN]` — separate a long scenario into focused ones.
|
|
94
|
+
- `/clarify [focus]` — targeted ambiguity pass.
|
|
95
|
+
- `/validate` — all Must-US covered; AC links correct; WF references exist; API paths match contract.
|
|
96
|
+
- `/done` — finalize.
|
|
97
|
+
|
|
98
|
+
## Closing message
|
|
99
|
+
|
|
100
|
+
After saving the artifact, present the following summary (see `references/closing-message.md` for format):
|
|
101
|
+
|
|
102
|
+
- Saved file path.
|
|
103
|
+
- Total number of scenarios generated, broken down by type (happy path / negative / edge case).
|
|
104
|
+
- Count of Must-priority US covered.
|
|
105
|
+
- Any Must-priority US without a scenario.
|
|
106
|
+
|
|
107
|
+
Available commands: `/clarify [focus]` · `/revise [SC-NNN]` · `/expand [SC-NNN]` · `/split [SC-NNN]` · `/validate` · `/done`
|
|
108
|
+
|
|
109
|
+
Pipeline complete. Proceed to `/handoff` to package all artifacts for development.
|
|
110
|
+
|
|
111
|
+
## Style
|
|
112
|
+
|
|
113
|
+
Formal, neutral. No emoji, slang. Generate in the artifact language. Persona names, screen labels, and API paths remain in their original language/format.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ba-sprint
|
|
3
|
+
description: >
|
|
4
|
+
Sprint planning for BA Toolkit projects. Use on /sprint command, or when the user asks to "create a sprint plan", "plan sprints", "organise backlog into sprints", "sprint breakdown", "velocity planning", "release plan". Run after /estimate (required) and /risk (recommended). Generates 00_sprint_{slug}.md with sprint goals, story assignments, and capacity summary.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /sprint — Sprint Plan
|
|
8
|
+
|
|
9
|
+
Utility command. Reads estimated User Stories, applies team capacity and velocity constraints, groups stories into sprints by priority and risk weight, and produces `00_sprint_{slug}.md` with a complete sprint breakdown.
|
|
10
|
+
|
|
11
|
+
## Syntax
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
/sprint [optional: action]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Examples:
|
|
18
|
+
- `/sprint` — generate a full sprint plan using defaults or a calibration interview
|
|
19
|
+
- `/sprint 2` — re-plan sprint 2 only (e.g., after stories were added or re-estimated)
|
|
20
|
+
- `/sprint velocity 40` — override team velocity to 40 SP per sprint
|
|
21
|
+
- `/sprint add SP-01 US-007` — move a story to a specific sprint manually
|
|
22
|
+
|
|
23
|
+
## Context loading
|
|
24
|
+
|
|
25
|
+
0. If `00_principles_*.md` exists, load it — apply language convention (section 1) and ID naming convention (section 2).
|
|
26
|
+
1. Load `00_estimate_{slug}.md` or check `03_stories_{slug}.md` for inline `**Estimate:**` fields. **Required** — sprint planning cannot proceed without estimates.
|
|
27
|
+
2. Load `03_stories_{slug}.md` — source of story priority (MoSCoW or custom), epic grouping, and acceptance criteria count.
|
|
28
|
+
3. Load `00_risks_{slug}.md` if it exists — use risk scores to elevate priority of stories that mitigate 🔴 Critical or 🟡 High risks.
|
|
29
|
+
4. Load `02_srs_{slug}.md` — to extract any sequencing constraints (dependencies, technical prerequisites).
|
|
30
|
+
5. Load `00_sprint_{slug}.md` if it exists — merge mode: preserve confirmed sprints, re-plan only future ones.
|
|
31
|
+
|
|
32
|
+
## Environment
|
|
33
|
+
|
|
34
|
+
Read `references/environment.md` from the `ba-toolkit` directory to determine the output directory.
|
|
35
|
+
|
|
36
|
+
## Calibration interview
|
|
37
|
+
|
|
38
|
+
Ask the following before planning (skip questions already answered in context or via syntax flags):
|
|
39
|
+
|
|
40
|
+
1. **Sprint length:** How many weeks per sprint? _(default: 2 weeks)_
|
|
41
|
+
2. **Team velocity:** Estimated Story Points per sprint (or T-shirt / person-days equivalent)? _(if not given, estimate from story count: assume 30–40 SP for a 3–5 developer team)_
|
|
42
|
+
3. **Team size:** Number of developers contributing to this project? _(used to sanity-check velocity)_
|
|
43
|
+
4. **Sprint 0:** Does the team need a sprint 0 for setup, architecture, or environment? _(yes/no — if yes, add SP-00 with no user stories)_
|
|
44
|
+
5. **Hard deadline:** Is there a fixed release date or milestone? _(if yes, flag stories that will not fit before the deadline)_
|
|
45
|
+
6. **Parallel tracks:** Are frontend and backend worked on simultaneously, or sequentially? _(affects story ordering within a sprint)_
|
|
46
|
+
|
|
47
|
+
If the user types `/sprint` without additional input and prior context is sufficient, apply defaults and state assumptions explicitly in the output.
|
|
48
|
+
|
|
49
|
+
## Planning algorithm
|
|
50
|
+
|
|
51
|
+
### Step 1 — Priority ordering
|
|
52
|
+
|
|
53
|
+
Sort stories for assignment using this precedence:
|
|
54
|
+
|
|
55
|
+
1. **Must** stories first (MoSCoW: Must > Should > Could > Won't).
|
|
56
|
+
2. Within the same priority tier, elevate stories that mitigate 🔴 Critical or 🟡 High risks (from `00_risks_{slug}.md`).
|
|
57
|
+
3. Within the same priority and risk tier, order by dependencies: stories that are prerequisite to others go first.
|
|
58
|
+
4. Within the same tier with no dependencies, order by estimate ascending (smaller stories first — reduces WIP).
|
|
59
|
+
|
|
60
|
+
### Step 2 — Sprint assignment
|
|
61
|
+
|
|
62
|
+
Fill sprints greedily from the ordered list:
|
|
63
|
+
|
|
64
|
+
- Assign stories to the current sprint until adding the next story would exceed velocity.
|
|
65
|
+
- If a story alone exceeds velocity, flag it for splitting: `⚠️ US-NNN (N SP) exceeds sprint capacity — consider /split US-NNN`.
|
|
66
|
+
- If a story has an explicit prerequisite not yet assigned, defer it to the sprint after its prerequisite completes.
|
|
67
|
+
- When a hard deadline is provided, mark the sprint that contains it and flag any Must stories not scheduled before it as 🚨 **At risk**.
|
|
68
|
+
|
|
69
|
+
### Step 3 — Sprint goal derivation
|
|
70
|
+
|
|
71
|
+
For each sprint, derive a one-sentence goal that describes the primary user-facing outcome:
|
|
72
|
+
- Group stories by epic and pick the dominant epic in the sprint.
|
|
73
|
+
- Express the goal as a user outcome, not a task list: "Players can register, deposit, and spin for the first time."
|
|
74
|
+
|
|
75
|
+
## Generation
|
|
76
|
+
|
|
77
|
+
Save `00_sprint_{slug}.md` to the output directory.
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
# Sprint Plan: {PROJECT_NAME}
|
|
81
|
+
|
|
82
|
+
**Domain:** {DOMAIN}
|
|
83
|
+
**Date:** {DATE}
|
|
84
|
+
**Slug:** {SLUG}
|
|
85
|
+
**Sprint length:** {N} weeks
|
|
86
|
+
**Team velocity:** {N} SP per sprint
|
|
87
|
+
**Sources:** {list of artifacts used}
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Summary
|
|
92
|
+
|
|
93
|
+
| Sprint | Goal | Stories | Points | Capacity |
|
|
94
|
+
|--------|------|:-------:|:------:|:--------:|
|
|
95
|
+
| SP-00 | Setup and environment | — | — | — |
|
|
96
|
+
| SP-01 | [Goal] | N | N SP | N% |
|
|
97
|
+
| SP-02 | [Goal] | N | N SP | N% |
|
|
98
|
+
| **Total** | | **N** | **N SP** | |
|
|
99
|
+
|
|
100
|
+
**Planned:** N stories / N SP across N sprints
|
|
101
|
+
**Unplanned backlog:** N stories / N SP (scope exceeds capacity or marked Won't)
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Sprint Details
|
|
106
|
+
|
|
107
|
+
### SP-01 — [Sprint Goal]
|
|
108
|
+
|
|
109
|
+
**Duration:** Week 1–2
|
|
110
|
+
**Capacity:** {N} SP
|
|
111
|
+
|
|
112
|
+
| US | Title | Epic | Priority | Risk | Estimate |
|
|
113
|
+
|----|-------|------|---------|------|---------|
|
|
114
|
+
| US-001 | [Title] | E-01 | Must | RISK-02 ↑ | 5 SP |
|
|
115
|
+
| US-002 | [Title] | E-01 | Must | — | 3 SP |
|
|
116
|
+
| US-005 | [Title] | E-02 | Should | — | 8 SP |
|
|
117
|
+
|
|
118
|
+
**Sprint total:** N SP / {velocity} SP capacity (N%)
|
|
119
|
+
|
|
120
|
+
**Definition of Done for this sprint:**
|
|
121
|
+
- [ ] All stories pass their Acceptance Criteria.
|
|
122
|
+
- [ ] API endpoints for this sprint are integrated and tested.
|
|
123
|
+
- [ ] No 🔴 Critical open items in `/analyze` for completed stories.
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
### SP-02 — [Sprint Goal]
|
|
128
|
+
|
|
129
|
+
...
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Unplanned Backlog
|
|
134
|
+
|
|
135
|
+
Stories not assigned to any sprint (capacity exceeded, low priority, or deferred):
|
|
136
|
+
|
|
137
|
+
| US | Title | Epic | Priority | Estimate | Reason |
|
|
138
|
+
|----|-------|------|---------|---------|--------|
|
|
139
|
+
| US-018 | [Title] | E-04 | Could | 3 SP | Capacity exceeded |
|
|
140
|
+
| US-022 | [Title] | E-05 | Won't | 8 SP | Out of MVP scope |
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Assumptions
|
|
145
|
+
|
|
146
|
+
- Sprint velocity: {N} SP based on {source: user input / estimate from team size}.
|
|
147
|
+
- {Any other assumption made during planning.}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Sprint IDs are sequential (SP-00, SP-01, SP-02, …). SP-00 is reserved for setup/architecture sprint if requested.
|
|
151
|
+
|
|
152
|
+
### Merge behaviour
|
|
153
|
+
|
|
154
|
+
If `00_sprint_{slug}.md` already exists:
|
|
155
|
+
- Preserve sprints marked as **Done** or **In Progress** — do not re-plan them.
|
|
156
|
+
- Re-plan only **Planned** sprints that are in the future.
|
|
157
|
+
- Assign new IDs only to newly created sprints (do not renumber existing ones).
|
|
158
|
+
- Update Summary table and Assumptions.
|
|
159
|
+
|
|
160
|
+
## Closing message
|
|
161
|
+
|
|
162
|
+
After saving, present the following summary (see `references/closing-message.md` for format):
|
|
163
|
+
|
|
164
|
+
- Saved file: `00_sprint_{slug}.md`
|
|
165
|
+
- Number of sprints planned and total duration in weeks.
|
|
166
|
+
- Total stories and Story Points planned vs. unplanned backlog size.
|
|
167
|
+
- Any stories flagged 🚨 At risk (won't fit before the hard deadline).
|
|
168
|
+
- Any stories that exceed sprint capacity and need splitting (`/split`).
|
|
169
|
+
|
|
170
|
+
Available commands: `/sprint [SP-NN]` (re-plan a sprint) · `/split [US-NNN]` (split large story) · `/estimate` (re-estimate) · `/risk` (refresh risks) · `/done`
|
|
171
|
+
|
|
172
|
+
## Style
|
|
173
|
+
|
|
174
|
+
Be specific about sprint goals — one user-outcome sentence per sprint. Show capacity percentages to make overloading visible at a glance. Flag risks and deadline conflicts explicitly, do not bury them in footnotes. Generate output in the language of the artifact.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ba-srs
|
|
3
|
+
description: >
|
|
4
|
+
Generate a Software Requirements Specification (SRS) based on the Project Brief. Adapted IEEE 830 format. Use on /srs command, or when the user asks for "requirements specification", "SRS", "functional requirements", "system requirements", "describe requirements", "write a technical specification". Second step of the BA Toolkit pipeline.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /srs — Requirements Specification
|
|
8
|
+
|
|
9
|
+
Second step of the BA Toolkit pipeline. Generates an SRS adapted from IEEE 830.
|
|
10
|
+
|
|
11
|
+
**Scope boundary:** The SRS describes *what* the system must do and *why* — functional requirements, roles, business rules, and interface contracts at a logical level. It does not prescribe *how* to build it: technology stack, DBMS choice, cloud provider, infrastructure, and architecture decisions belong in `/research` (step 7a). If the user mentions specific technologies during the interview, note them as constraints or assumptions, not as requirements.
|
|
12
|
+
|
|
13
|
+
## Context loading
|
|
14
|
+
|
|
15
|
+
0. If `00_principles_*.md` exists in the output directory, load it and apply its conventions (artifact language, ID format, traceability requirements, Definition of Ready, quality gate threshold).
|
|
16
|
+
1. Read `01_brief_*.md` from the output directory. If missing, warn and suggest running `/brief`.
|
|
17
|
+
2. Extract: slug, domain, business goals, functionality, stakeholders, constraints, glossary.
|
|
18
|
+
3. If domain is `igaming`, `fintech`, or `saas`, load `references/domains/{domain}.md`, section `2. /srs`.
|
|
19
|
+
|
|
20
|
+
## Environment
|
|
21
|
+
|
|
22
|
+
Read `references/environment.md` from the `ba-toolkit` directory to determine the output directory for the current platform. If the file is unavailable, apply the default rule: if `/mnt/user-data/outputs/` exists and is writable, save there (Claude.ai); otherwise save to the current working directory.
|
|
23
|
+
|
|
24
|
+
## Interview
|
|
25
|
+
|
|
26
|
+
3–7 questions per round, 2–4 rounds. Do not re-ask information already known from the brief.
|
|
27
|
+
|
|
28
|
+
**Required topics:**
|
|
29
|
+
1. User roles — which roles interact with the system?
|
|
30
|
+
2. External integrations — which systems require connection?
|
|
31
|
+
3. Multi-language and multi-currency support — if applicable.
|
|
32
|
+
4. Regulatory requirements — which standards and laws apply?
|
|
33
|
+
5. Prioritization method — MoSCoW (Must, Should, Could, Won't) or other.
|
|
34
|
+
6. Key business rules — limits, thresholds, calculation formulas.
|
|
35
|
+
|
|
36
|
+
Supplement with domain-specific questions and typical functional areas from the reference.
|
|
37
|
+
|
|
38
|
+
## Generation
|
|
39
|
+
|
|
40
|
+
**File:** `02_srs_{slug}.md`
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
# Software Requirements Specification (SRS): {Name}
|
|
44
|
+
|
|
45
|
+
## 1. Introduction
|
|
46
|
+
### 1.1 Purpose
|
|
47
|
+
### 1.2 Scope
|
|
48
|
+
### 1.3 Definitions and Abbreviations
|
|
49
|
+
### 1.4 Document References
|
|
50
|
+
|
|
51
|
+
## 2. General Description
|
|
52
|
+
### 2.1 Product Context
|
|
53
|
+
### 2.2 User Roles
|
|
54
|
+
### 2.3 Constraints
|
|
55
|
+
### 2.4 Assumptions and Dependencies
|
|
56
|
+
|
|
57
|
+
## 3. Functional Requirements
|
|
58
|
+
### FR-{NNN}: {Title}
|
|
59
|
+
- **Description:** ...
|
|
60
|
+
- **Actor:** ...
|
|
61
|
+
- **Input:** ...
|
|
62
|
+
- **Output / Result:** ...
|
|
63
|
+
- **Business Rules:** ...
|
|
64
|
+
- **Priority:** Must | Should | Could | Won't
|
|
65
|
+
|
|
66
|
+
## 4. Interface Requirements
|
|
67
|
+
### 4.1 User Interfaces
|
|
68
|
+
### 4.2 Software Interfaces (API)
|
|
69
|
+
### 4.3 External System Interfaces
|
|
70
|
+
|
|
71
|
+
## 5. Non-functional Requirements
|
|
72
|
+
_(detailed in /nfr artifact)_
|
|
73
|
+
|
|
74
|
+
## 6. Priority Matrix (MoSCoW)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
FR numbering: sequential, three-digit (FR-001, FR-002, ...).
|
|
78
|
+
|
|
79
|
+
## AGENTS.md update
|
|
80
|
+
|
|
81
|
+
After `/done`, update `AGENTS.md` in the project root with SRS-level context:
|
|
82
|
+
|
|
83
|
+
```markdown
|
|
84
|
+
## Artifacts
|
|
85
|
+
...
|
|
86
|
+
- `{output_dir}/02_srs_{slug}.md` — SRS ({n} FR, MoSCoW breakdown)
|
|
87
|
+
|
|
88
|
+
## Key context
|
|
89
|
+
...
|
|
90
|
+
- **User roles:** {comma-separated list}
|
|
91
|
+
- **External integrations:** {comma-separated list}
|
|
92
|
+
- **Must-priority FR count:** {n}
|
|
93
|
+
|
|
94
|
+
## Next step
|
|
95
|
+
Run `/stories` to generate User Stories.
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Only update the "Pipeline stage", "Artifacts", and "Key context" sections. Preserve any custom content.
|
|
99
|
+
|
|
100
|
+
## Iterative refinement
|
|
101
|
+
|
|
102
|
+
- `/revise [section]` — rewrite.
|
|
103
|
+
- `/expand [section]` — add detail.
|
|
104
|
+
- `/split [FR-NNN]` — split a large requirement.
|
|
105
|
+
- `/clarify [focus]` — targeted ambiguity pass.
|
|
106
|
+
- `/validate` — all brief functions covered by FR; no duplicates; roles consistent.
|
|
107
|
+
- `/done` — finalize and update `AGENTS.md`. Next step: `/stories`.
|
|
108
|
+
|
|
109
|
+
## Closing message
|
|
110
|
+
|
|
111
|
+
After saving the artifact, present the following summary to the user (see `references/closing-message.md` for format):
|
|
112
|
+
|
|
113
|
+
- Saved file path.
|
|
114
|
+
- Total number of functional requirements (FR) generated, broken down by MoSCoW priority.
|
|
115
|
+
- User roles identified.
|
|
116
|
+
- External integrations and regulatory requirements captured.
|
|
117
|
+
|
|
118
|
+
Available commands: `/clarify [focus]` · `/revise [section]` · `/expand [section]` · `/split [FR-NNN]` · `/validate` · `/done`
|
|
119
|
+
|
|
120
|
+
Next step: `/stories`
|
|
121
|
+
|
|
122
|
+
## Style
|
|
123
|
+
|
|
124
|
+
Formal, neutral. No emoji, slang. Terms explained in parentheses on first use. Generate the artifact in the language of the user's request.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ba-stories
|
|
3
|
+
description: >
|
|
4
|
+
Generate User Stories based on the SRS. Format: "As a [role], I want [action], so that [value]". Use on /stories command, or when the user asks for "user stories", "create stories", "write user stories", "story decomposition", "epics and stories", "backlog", "break requirements into stories". Third step of the BA Toolkit pipeline.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /stories — User Stories
|
|
8
|
+
|
|
9
|
+
Third step of the BA Toolkit pipeline. Generates User Stories from functional requirements in the SRS.
|
|
10
|
+
|
|
11
|
+
## Context loading
|
|
12
|
+
|
|
13
|
+
0. If `00_principles_*.md` exists in the output directory, load it and apply its conventions (artifact language, ID format, traceability requirements, Definition of Ready, quality gate threshold).
|
|
14
|
+
1. Read `01_brief_*.md` and `02_srs_*.md`. If SRS is missing, warn and suggest `/srs`.
|
|
15
|
+
2. Extract: slug, domain, roles, FR list, business rules, priorities.
|
|
16
|
+
3. If domain is supported, load `references/domains/{domain}.md`, section `3. /stories`.
|
|
17
|
+
|
|
18
|
+
## Environment
|
|
19
|
+
|
|
20
|
+
Read `references/environment.md` from the `ba-toolkit` directory to determine the output directory for the current platform. If the file is unavailable, apply the default rule: if `/mnt/user-data/outputs/` exists and is writable, save there (Claude.ai); otherwise save to the current working directory.
|
|
21
|
+
|
|
22
|
+
## Interview
|
|
23
|
+
|
|
24
|
+
3–7 questions per round, 2–4 rounds.
|
|
25
|
+
|
|
26
|
+
**Required topics:**
|
|
27
|
+
1. Which user flows are most critical?
|
|
28
|
+
2. Are there edge cases requiring separate stories?
|
|
29
|
+
3. Is an Epic → Feature → Story hierarchy needed?
|
|
30
|
+
4. Are there specific personas for roles?
|
|
31
|
+
5. What is the Definition of Ready for a story?
|
|
32
|
+
|
|
33
|
+
Supplement with domain-specific questions and typical epics from the reference.
|
|
34
|
+
|
|
35
|
+
## Generation
|
|
36
|
+
|
|
37
|
+
**File:** `03_stories_{slug}.md`
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# User Stories: {Name}
|
|
41
|
+
|
|
42
|
+
## Epic: {Epic Name}
|
|
43
|
+
Brief description and business value.
|
|
44
|
+
|
|
45
|
+
### US-{NNN}: {Short Description}
|
|
46
|
+
- **Role:** {role from SRS}
|
|
47
|
+
- **Action:** {what they want to do}
|
|
48
|
+
- **Value:** {why, business outcome}
|
|
49
|
+
- **Priority:** {Must | Should | Could | Won't}
|
|
50
|
+
- **Linked FR:** FR-{NNN}
|
|
51
|
+
- **Acceptance Criteria:** _(filled at /ac stage)_
|
|
52
|
+
- **Notes:** {edge cases, additional context}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Rules:**
|
|
56
|
+
- Sequential numbering: US-001, US-002, ...
|
|
57
|
+
- One story = one atomic action by one role.
|
|
58
|
+
- All Must-priority FR from SRS must have at least one US.
|
|
59
|
+
- Story covering > 3 scenarios — suggest `/split`.
|
|
60
|
+
|
|
61
|
+
## Iterative refinement
|
|
62
|
+
|
|
63
|
+
- `/revise [US-NNN or section]` — rewrite.
|
|
64
|
+
- `/expand [US-NNN]` — add detail.
|
|
65
|
+
- `/split [US-NNN]` — split into smaller stories.
|
|
66
|
+
- `/clarify [focus]` — targeted ambiguity pass.
|
|
67
|
+
- `/validate` — all FR covered; no orphan stories; numbering correct; roles consistent.
|
|
68
|
+
- `/done` — finalize. Next step: `/usecases`.
|
|
69
|
+
|
|
70
|
+
## Closing message
|
|
71
|
+
|
|
72
|
+
After saving the artifact, present the following summary to the user (see `references/closing-message.md` for format):
|
|
73
|
+
|
|
74
|
+
- Saved file path.
|
|
75
|
+
- Total number of user stories generated, grouped by Epic and MoSCoW priority.
|
|
76
|
+
- Count of Must-priority FR covered.
|
|
77
|
+
- Any stories flagged for `/split` due to complexity.
|
|
78
|
+
|
|
79
|
+
Available commands: `/clarify [focus]` · `/revise [US-NNN]` · `/expand [US-NNN]` · `/split [US-NNN]` · `/validate` · `/done`
|
|
80
|
+
|
|
81
|
+
Next step: `/usecases`
|
|
82
|
+
|
|
83
|
+
## Style
|
|
84
|
+
|
|
85
|
+
Formal, neutral. No emoji, slang. Terms explained on first use. Generate the artifact in the language of the user's request.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ba-trace
|
|
3
|
+
description: >
|
|
4
|
+
Build and update the traceability matrix across all BA Toolkit pipeline artifacts: FR ↔ US ↔ UC ↔ AC ↔ NFR ↔ Data Entity ↔ API Endpoint ↔ Wireframe. Use on /trace command, or when the user asks for "traceability matrix", "requirements traceability", "coverage check", "uncovered requirements", "artifact links", "check coverage", "find missing requirements", "what is not covered". Cross-cutting command available at any stage after /stories.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /trace — Traceability Matrix
|
|
8
|
+
|
|
9
|
+
Cross-cutting command of the BA Toolkit pipeline. Available after `/stories` is complete. Builds a traceability matrix across all existing artifacts.
|
|
10
|
+
|
|
11
|
+
## Context loading
|
|
12
|
+
|
|
13
|
+
0. If `00_principles_*.md` exists in the output directory, load it. Use its traceability requirements (section 3) to determine which links are CRITICAL, HIGH, or MEDIUM severity when flagging gaps.
|
|
14
|
+
1. Read all pipeline artifacts from the output directory. Minimum required: `02_srs_*.md` and `03_stories_*.md`.
|
|
15
|
+
2. Determine which artifacts are available and adapt matrix columns accordingly.
|
|
16
|
+
3. Domain reference not needed for this skill — all information comes from the artifacts.
|
|
17
|
+
|
|
18
|
+
## Environment
|
|
19
|
+
|
|
20
|
+
Read `references/environment.md` from the `ba-toolkit` directory to determine the output directory for the current platform. If the file is unavailable, apply the default rule: if `/mnt/user-data/outputs/` exists and is writable, save there (Claude.ai); otherwise save to the current working directory.
|
|
21
|
+
|
|
22
|
+
## Generation
|
|
23
|
+
|
|
24
|
+
No interview needed. Information is extracted from existing artifacts automatically.
|
|
25
|
+
|
|
26
|
+
**File:** `00_trace_{slug}.md`
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
# Traceability Matrix: {Name}
|
|
30
|
+
|
|
31
|
+
**Date:** {date}
|
|
32
|
+
**Artifacts:** {list of found pipeline files}
|
|
33
|
+
|
|
34
|
+
## Matrix
|
|
35
|
+
|
|
36
|
+
| FR | US | UC | AC | NFR | Data Entity | API Endpoint | Wireframe |
|
|
37
|
+
|----|----|----|----|----|-------------|-------------|-----------|
|
|
38
|
+
| FR-001 | US-001, US-002 | UC-001 | AC-001-01 | NFR-003 | User, Bet | POST /bets | WF-005 |
|
|
39
|
+
|
|
40
|
+
## Coverage Statistics
|
|
41
|
+
|
|
42
|
+
| Artifact | Total | Covered | Uncovered | Coverage % |
|
|
43
|
+
|----------|-------|---------|-----------|------------|
|
|
44
|
+
|
|
45
|
+
## Uncovered Elements
|
|
46
|
+
|
|
47
|
+
### FR without linked US
|
|
48
|
+
### US without linked UC
|
|
49
|
+
### US without AC
|
|
50
|
+
### FR without NFR coverage
|
|
51
|
+
### Data entities without FR/US link
|
|
52
|
+
### API endpoints without FR/US link
|
|
53
|
+
### Wireframes without US link
|
|
54
|
+
|
|
55
|
+
## Recommendations
|
|
56
|
+
Specific actions to close coverage gaps.
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Rules:**
|
|
60
|
+
- Columns include only artifact types that have been created. Missing columns marked with `—`.
|
|
61
|
+
- Links extracted from "Linked FR/US" fields in each artifact.
|
|
62
|
+
- Inconsistency (link present in one artifact but missing in another) is flagged.
|
|
63
|
+
- Coverage: an element is covered if it has at least one link in the next matrix column.
|
|
64
|
+
|
|
65
|
+
## Iterative refinement
|
|
66
|
+
|
|
67
|
+
- `/revise` — regenerate (re-read all artifacts).
|
|
68
|
+
- `/validate` — extended check: nonexistent IDs, circular dependencies, duplicate links.
|
|
69
|
+
|
|
70
|
+
## Closing message
|
|
71
|
+
|
|
72
|
+
After saving the artifact, present the following summary to the user (see `references/closing-message.md` for format):
|
|
73
|
+
|
|
74
|
+
- Saved file path.
|
|
75
|
+
- Overall coverage percentage per artifact type.
|
|
76
|
+
- Count of uncovered FRs, orphan US, and US without AC.
|
|
77
|
+
- Specific recommendations to close the highest-severity gaps.
|
|
78
|
+
|
|
79
|
+
Available commands: `/revise` (regenerate) · `/validate` · `/analyze` (full quality report)
|
|
80
|
+
|
|
81
|
+
No further pipeline step — use `/analyze` for a detailed cross-artifact quality report.
|
|
82
|
+
|
|
83
|
+
## Style
|
|
84
|
+
|
|
85
|
+
Formal, neutral. No emoji, slang. Generate the artifact in the language of the user's request.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ba-usecases
|
|
3
|
+
description: >
|
|
4
|
+
Generate Use Cases (Cockburn format) based on User Stories. Use on /usecases command, or when the user asks for "use cases", "scenarios", "describe scenarios", "interaction flows", "main and alternative flows", "describe system behavior", "user interaction scenario". Fourth step of the BA Toolkit pipeline.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /usecases — Use Cases
|
|
8
|
+
|
|
9
|
+
Fourth step of the BA Toolkit pipeline. Generates Use Cases in simplified Cockburn format.
|
|
10
|
+
|
|
11
|
+
## Context loading
|
|
12
|
+
|
|
13
|
+
0. If `00_principles_*.md` exists in the output directory, load it and apply its conventions (artifact language, ID format, traceability requirements, Definition of Ready, quality gate threshold).
|
|
14
|
+
1. Read `01_brief_*.md`, `02_srs_*.md`, `03_stories_*.md`. If stories missing, warn and suggest `/stories`.
|
|
15
|
+
2. Extract: slug, domain, roles (actors), US list, FR list, business rules.
|
|
16
|
+
3. If domain supported, load `references/domains/{domain}.md`, section `4. /usecases`.
|
|
17
|
+
|
|
18
|
+
## Environment
|
|
19
|
+
|
|
20
|
+
Read `references/environment.md` from the `ba-toolkit` directory to determine the output directory for the current platform. If the file is unavailable, apply the default rule: if `/mnt/user-data/outputs/` exists and is writable, save there (Claude.ai); otherwise save to the current working directory.
|
|
21
|
+
|
|
22
|
+
## Interview
|
|
23
|
+
|
|
24
|
+
3–7 questions per round, 2–4 rounds.
|
|
25
|
+
|
|
26
|
+
**Required topics:**
|
|
27
|
+
1. Detail level — summary, user-goal, subfunction?
|
|
28
|
+
2. Which alternative flows are most critical?
|
|
29
|
+
3. Which exceptional flows (errors) must be formalized?
|
|
30
|
+
4. Which external systems act as actors?
|
|
31
|
+
5. Grouping — which US should be combined into a single UC?
|
|
32
|
+
|
|
33
|
+
Supplement with domain-specific questions and typical exceptional flows from the reference.
|
|
34
|
+
|
|
35
|
+
## Generation
|
|
36
|
+
|
|
37
|
+
**File:** `04_usecases_{slug}.md`
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# Use Cases: {Name}
|
|
41
|
+
|
|
42
|
+
## UC-{NNN}: {Title}
|
|
43
|
+
- **Actor:** {primary actor}
|
|
44
|
+
- **Level:** {user-goal | summary | subfunction}
|
|
45
|
+
- **Linked US:** US-{NNN}
|
|
46
|
+
- **Preconditions:**
|
|
47
|
+
1. {condition}
|
|
48
|
+
- **Trigger:** {event}
|
|
49
|
+
- **Main Flow:**
|
|
50
|
+
1. {Actor performs action.}
|
|
51
|
+
2. {System responds.}
|
|
52
|
+
- **Alternative Flows:**
|
|
53
|
+
- {N}a: {description}
|
|
54
|
+
- **Exceptional Flows:**
|
|
55
|
+
- {N}e: {description}
|
|
56
|
+
- **Postconditions:**
|
|
57
|
+
- Success: {result}
|
|
58
|
+
- Failure: {result}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Rules:**
|
|
62
|
+
- Numbering: UC-001, UC-002, ...
|
|
63
|
+
- Each UC linked to at least one US.
|
|
64
|
+
- Steps: "Actor does X" / "System does Y".
|
|
65
|
+
- Alternative flows reference main flow step numbers.
|
|
66
|
+
|
|
67
|
+
## Iterative refinement
|
|
68
|
+
|
|
69
|
+
- `/revise [UC-NNN]` — rewrite.
|
|
70
|
+
- `/expand [UC-NNN]` — add flows.
|
|
71
|
+
- `/split [UC-NNN]` — split.
|
|
72
|
+
- `/clarify [focus]` — targeted ambiguity pass.
|
|
73
|
+
- `/validate` — all Must-US covered; references correct; actors consistent.
|
|
74
|
+
- `/done` — finalize. Next step: `/ac`.
|
|
75
|
+
|
|
76
|
+
## Closing message
|
|
77
|
+
|
|
78
|
+
After saving the artifact, present the following summary to the user (see `references/closing-message.md` for format):
|
|
79
|
+
|
|
80
|
+
- Saved file path.
|
|
81
|
+
- Total number of use cases generated.
|
|
82
|
+
- Count of alternative and exceptional flows documented.
|
|
83
|
+
- External system actors identified.
|
|
84
|
+
|
|
85
|
+
Available commands: `/clarify [focus]` · `/revise [UC-NNN]` · `/expand [UC-NNN]` · `/split [UC-NNN]` · `/validate` · `/done`
|
|
86
|
+
|
|
87
|
+
Next step: `/ac`
|
|
88
|
+
|
|
89
|
+
## Style
|
|
90
|
+
|
|
91
|
+
Formal, neutral. No emoji, slang. Terms explained on first use. Generate the artifact in the language of the user's request.
|