@kudusov.takhir/ba-toolkit 2.0.0 → 3.1.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 +93 -1
- package/COMMANDS.md +1 -1
- package/README.md +30 -20
- package/bin/ba-toolkit.js +488 -140
- package/package.json +2 -2
- package/skills/ac/SKILL.md +7 -3
- package/skills/apicontract/SKILL.md +7 -3
- package/skills/brief/SKILL.md +12 -25
- package/skills/datadict/SKILL.md +7 -3
- package/skills/nfr/SKILL.md +7 -3
- package/skills/principles/SKILL.md +9 -3
- package/skills/references/closing-message.md +60 -11
- package/skills/references/environment.md +31 -12
- package/skills/references/interview-protocol.md +68 -0
- package/skills/references/templates/agents-template.md +3 -1
- package/skills/research/SKILL.md +7 -3
- package/skills/scenarios/SKILL.md +5 -1
- package/skills/srs/SKILL.md +9 -20
- package/skills/stories/SKILL.md +7 -3
- package/skills/usecases/SKILL.md +7 -3
- package/skills/wireframes/SKILL.md +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kudusov.takhir/ba-toolkit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "AI-powered Business Analyst pipeline — 21 skills from project brief to development handoff. Works with Claude Code, Codex CLI, Gemini CLI, Cursor, and Windsurf.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"business-analyst",
|
|
@@ -43,6 +43,6 @@
|
|
|
43
43
|
"node": ">=18"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
|
-
"test": "node --test test/cli.test.js"
|
|
46
|
+
"test": "node --test test/cli.test.js test/cli.integration.test.js"
|
|
47
47
|
}
|
|
48
48
|
}
|
package/skills/ac/SKILL.md
CHANGED
|
@@ -21,7 +21,11 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
21
21
|
|
|
22
22
|
## Interview
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options, always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
25
|
+
>
|
|
26
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/ac` (e.g., `/ac focus on US-007 and US-011`), use it as a story-id filter for which acceptance criteria to draft first.
|
|
27
|
+
|
|
28
|
+
3–7 topics per round, 2–4 rounds.
|
|
25
29
|
|
|
26
30
|
**Required topics:**
|
|
27
31
|
1. Which business rules should be reflected in AC (limits, formulas, thresholds)?
|
|
@@ -79,9 +83,9 @@ After saving the artifact, present the following summary to the user (see `refer
|
|
|
79
83
|
- Count of user stories covered.
|
|
80
84
|
- Confirmation that back-references in `03_stories_{slug}.md` were updated.
|
|
81
85
|
|
|
82
|
-
Available commands: `/clarify [focus]` · `/revise [AC-NNN-NN]` · `/expand [US-NNN]` · `/split [AC-NNN-NN]` · `/validate` · `/done`
|
|
86
|
+
Available commands for this artifact: `/clarify [focus]` · `/revise [AC-NNN-NN]` · `/expand [US-NNN]` · `/split [AC-NNN-NN]` · `/validate` · `/done`
|
|
83
87
|
|
|
84
|
-
Next step
|
|
88
|
+
Build the `Next step:` block from the pipeline lookup table in `references/closing-message.md` (row `Current = /ac`). Do not hardcode `/nfr` here.
|
|
85
89
|
|
|
86
90
|
## Style
|
|
87
91
|
|
|
@@ -21,7 +21,11 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
21
21
|
|
|
22
22
|
## Interview
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options, always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
25
|
+
>
|
|
26
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/apicontract` (e.g., `/apicontract REST with JWT auth, OpenAPI 3.1`), use it as a style and protocol hint for the API design.
|
|
27
|
+
|
|
28
|
+
3–7 topics per round, 2–4 rounds.
|
|
25
29
|
|
|
26
30
|
**Required topics:**
|
|
27
31
|
1. Protocol — REST, WebSocket, GraphQL, combination?
|
|
@@ -104,9 +108,9 @@ After saving the artifact, present the following summary to the user (see `refer
|
|
|
104
108
|
- Protocol and authentication method confirmed.
|
|
105
109
|
- WebSocket events and Webhook contracts included (if applicable).
|
|
106
110
|
|
|
107
|
-
Available commands: `/clarify [focus]` · `/revise [endpoint]` · `/expand [endpoint]` · `/validate` · `/done`
|
|
111
|
+
Available commands for this artifact: `/clarify [focus]` · `/revise [endpoint]` · `/expand [endpoint]` · `/validate` · `/done`
|
|
108
112
|
|
|
109
|
-
Next step
|
|
113
|
+
Build the `Next step:` block from the pipeline lookup table in `references/closing-message.md` (row `Current = /apicontract`). Do not hardcode `/wireframes` here.
|
|
110
114
|
|
|
111
115
|
## Style
|
|
112
116
|
|
package/skills/brief/SKILL.md
CHANGED
|
@@ -34,7 +34,13 @@ The domain is written into the brief metadata and passed to all subsequent pipel
|
|
|
34
34
|
|
|
35
35
|
### 4. Interview
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options (load `references/domains/{domain}.md` for the ones that fit), always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
38
|
+
>
|
|
39
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/brief` (e.g., `/brief I want to build an online store for construction materials`), parse that as the lead-in answer, acknowledge it in one line, and skip directly to the first structured question that the inline text doesn't already cover.
|
|
40
|
+
>
|
|
41
|
+
> **Open-ended lead-in (protocol rule 8):** if there is NO inline text after `/brief`, your very first interview question is open-ended and free-text, not a table — `Tell me about the project in your own words: one or two sentences are enough. What are you building, who is it for, and what problem does it solve?`. After the user answers, switch to the structured table protocol for all subsequent questions and use the lead-in answer to pre-fill what you can.
|
|
42
|
+
|
|
43
|
+
Cover 3–7 topics per round, 2–4 rounds. Do not generate the artifact until sufficient information is collected.
|
|
38
44
|
|
|
39
45
|
**Required topics (all domains):**
|
|
40
46
|
1. Product type — what exactly is being built?
|
|
@@ -69,30 +75,11 @@ If a domain reference is loaded, supplement general questions with domain-specif
|
|
|
69
75
|
|
|
70
76
|
### 6. AGENTS.md update
|
|
71
77
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
```markdown
|
|
75
|
-
# BA Toolkit — Project Context
|
|
76
|
-
|
|
77
|
-
**Project:** {Project Name}
|
|
78
|
-
**Slug:** {slug}
|
|
79
|
-
**Domain:** {domain}
|
|
80
|
-
**Language:** {artifact language}
|
|
81
|
-
**Pipeline stage:** Brief complete
|
|
78
|
+
`ba-toolkit init` already created `AGENTS.md` next to where the artifact lives — typically in the current working directory (the user is expected to `cd output/<slug>` after running init). After saving `01_brief_{slug}.md`, find the project's `AGENTS.md` (look in cwd first; fall back to walking up the directory tree if cwd has none, for legacy v3.0 single-project layouts).
|
|
82
79
|
|
|
83
|
-
|
|
84
|
-
- `{output_dir}/01_brief_{slug}.md` — Project Brief
|
|
85
|
-
|
|
86
|
-
## Key context
|
|
87
|
-
- **Business goal:** {one-line summary}
|
|
88
|
-
- **Target audience:** {one-line summary}
|
|
89
|
-
- **Key constraints:** {comma-separated list}
|
|
90
|
-
|
|
91
|
-
## Next step
|
|
92
|
-
Run `/srs` to generate the Requirements Specification.
|
|
93
|
-
```
|
|
80
|
+
**Update only the `## Pipeline Status` row for `/brief`** — toggle its status from `⬜ Not started` to `✅ Done` and fill in the artifact filename in the `File` column. **Do not touch the managed block** (`<!-- ba-toolkit:begin managed -->` … `<!-- ba-toolkit:end managed -->`) — that's owned by `ba-toolkit init`. **Do not recreate the file at the repo root.** **Do not add `## Artifacts` / `## Key context` sections** — those are not part of the v3.1+ template and would be ignored by future runs.
|
|
94
81
|
|
|
95
|
-
If `AGENTS.md`
|
|
82
|
+
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.
|
|
96
83
|
|
|
97
84
|
### 8. Iterative refinement
|
|
98
85
|
|
|
@@ -111,9 +98,9 @@ After saving the artifact, present the following summary to the user (see `refer
|
|
|
111
98
|
- Count of business goals documented and key constraints captured.
|
|
112
99
|
- List of identified risks.
|
|
113
100
|
|
|
114
|
-
Available commands: `/clarify [focus]` · `/revise [section]` · `/expand [section]` · `/validate` · `/done`
|
|
101
|
+
Available commands for this artifact: `/clarify [focus]` · `/revise [section]` · `/expand [section]` · `/validate` · `/done`
|
|
115
102
|
|
|
116
|
-
Next step
|
|
103
|
+
Build the `Next step:` block from the pipeline lookup table in `references/closing-message.md` (look up the row where `Current` is `/brief`). Do not hardcode `/srs` here — that table is the single source of truth and includes the four `→` lines (what the next skill produces, output file, time estimate, what comes after).
|
|
117
104
|
|
|
118
105
|
## Style
|
|
119
106
|
|
package/skills/datadict/SKILL.md
CHANGED
|
@@ -21,7 +21,11 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
21
21
|
|
|
22
22
|
## Interview
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options, always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
25
|
+
>
|
|
26
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/datadict` (e.g., `/datadict the user and order entities are critical`), use it as a hint for which entities to model first.
|
|
27
|
+
|
|
28
|
+
3–7 topics per round, 2–4 rounds.
|
|
25
29
|
|
|
26
30
|
**Required topics:**
|
|
27
31
|
1. DBMS — MongoDB, PostgreSQL, MySQL, other?
|
|
@@ -89,9 +93,9 @@ After saving the artifact, present the following summary to the user (see `refer
|
|
|
89
93
|
- DBMS chosen and naming convention confirmed.
|
|
90
94
|
- Entities flagged for audit trail or versioning.
|
|
91
95
|
|
|
92
|
-
Available commands: `/clarify [focus]` · `/revise [entity]` · `/expand [entity]` · `/split [entity]` · `/validate` · `/done`
|
|
96
|
+
Available commands for this artifact: `/clarify [focus]` · `/revise [entity]` · `/expand [entity]` · `/split [entity]` · `/validate` · `/done`
|
|
93
97
|
|
|
94
|
-
Next step
|
|
98
|
+
Build the `Next step:` block from the pipeline lookup table in `references/closing-message.md` (row `Current = /datadict`). Do not hardcode `/research` (or `/apicontract` if research is skipped) here — the lookup table is the canonical source.
|
|
95
99
|
|
|
96
100
|
## Style
|
|
97
101
|
|
package/skills/nfr/SKILL.md
CHANGED
|
@@ -21,7 +21,11 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
21
21
|
|
|
22
22
|
## Interview
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options, always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
25
|
+
>
|
|
26
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/nfr` (e.g., `/nfr emphasise security and compliance`), use it as a category hint for which NFR areas to prioritise.
|
|
27
|
+
|
|
28
|
+
3–7 topics per round, 2–4 rounds.
|
|
25
29
|
|
|
26
30
|
**Required topics:**
|
|
27
31
|
1. Performance — target CCU (Concurrent Users), RPS (Requests Per Second), acceptable response time?
|
|
@@ -76,9 +80,9 @@ After saving the artifact, present the following summary to the user (see `refer
|
|
|
76
80
|
- Confirmation that section 5 of `02_srs_{slug}.md` was updated with NFR links.
|
|
77
81
|
- Any categories flagged as missing or lacking measurable metrics.
|
|
78
82
|
|
|
79
|
-
Available commands: `/clarify [focus]` · `/revise [NFR-NNN]` · `/expand [category]` · `/validate` · `/done`
|
|
83
|
+
Available commands for this artifact: `/clarify [focus]` · `/revise [NFR-NNN]` · `/expand [category]` · `/validate` · `/done`
|
|
80
84
|
|
|
81
|
-
Next step
|
|
85
|
+
Build the `Next step:` block from the pipeline lookup table in `references/closing-message.md` (row `Current = /nfr`). Do not hardcode `/datadict` here.
|
|
82
86
|
|
|
83
87
|
## Style
|
|
84
88
|
|
|
@@ -27,7 +27,13 @@ If `01_brief_*.md` already exists, extract the slug and domain from it. Otherwis
|
|
|
27
27
|
|
|
28
28
|
### 3. Interview
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options, always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
31
|
+
>
|
|
32
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/principles`, parse it as the lead-in answer and skip directly to the first structured question it doesn't already cover.
|
|
33
|
+
>
|
|
34
|
+
> **Open-ended lead-in (protocol rule 8):** if there is NO inline text and no prior `01_brief_*.md` exists, your very first interview question is open-ended free-text — `What kind of project is this and what conventions matter most to you?`. Otherwise jump straight to the structured questions.
|
|
35
|
+
|
|
36
|
+
1–2 rounds, 3–5 topics each. Do not ask about topics the user can accept as defaults.
|
|
31
37
|
|
|
32
38
|
**Required topics:**
|
|
33
39
|
1. Artifact language — which language should all artifacts be generated in? (default: the language of the user's first message)
|
|
@@ -173,9 +179,9 @@ After saving the artifact, present the following summary to the user (see `refer
|
|
|
173
179
|
- Quality gate threshold confirmed (which severity blocks `/done`).
|
|
174
180
|
- NFR baseline categories listed.
|
|
175
181
|
|
|
176
|
-
Available commands: `/revise [section]` · `/expand [section]`
|
|
182
|
+
Available commands for this artifact: `/revise [section]` · `/expand [section]`
|
|
177
183
|
|
|
178
|
-
Next step
|
|
184
|
+
Build the `Next step:` block from the pipeline lookup table in `references/closing-message.md` (row `Current = /principles`). The lookup table points at `/brief` as the typical next step. If the user has already started `/brief` for this project, instead suggest continuing from wherever the pipeline left off — all skills now load `00_principles_{slug}.md` automatically.
|
|
179
185
|
|
|
180
186
|
## Style
|
|
181
187
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Closing Message Template
|
|
2
2
|
|
|
3
|
-
After saving an artifact, every BA Toolkit skill presents a
|
|
3
|
+
After saving an artifact, every BA Toolkit skill presents a closing summary block to the user in the chat (not inside the saved file). The block ends the current step on a clear note: what was generated, what's available next, and why the next pipeline step matters.
|
|
4
4
|
|
|
5
5
|
## Format
|
|
6
6
|
|
|
@@ -14,20 +14,69 @@ Artifact saved: `{file_path}`
|
|
|
14
14
|
main decisions captured during the interview,
|
|
15
15
|
any back-references updated in prior artifacts.}
|
|
16
16
|
|
|
17
|
-
Available commands:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
Available commands for the current artifact:
|
|
18
|
+
|
|
19
|
+
| Command | When to use it |
|
|
20
|
+
|--------------------|-------------------------------------------------------------|
|
|
21
|
+
| /clarify [focus] | Pick up vague terms, missing metrics, conflicting rules |
|
|
22
|
+
| /revise [section] | Rewrite a specific section with new feedback |
|
|
23
|
+
| /expand [section] | Add more depth to an under-developed section |
|
|
24
|
+
| /validate | Check completeness and consistency across this artifact |
|
|
25
|
+
| /done | Lock this artifact and move on (skill marks it ✅ in AGENTS.md) |
|
|
23
26
|
|
|
24
27
|
Next step: /{next_command}
|
|
28
|
+
|
|
29
|
+
→ What it produces: {one-line description, e.g. "IEEE 830 SRS — scope, FRs, constraints"}
|
|
30
|
+
→ Output file: {NN}_{name}_{slug}.md
|
|
31
|
+
→ Time estimate: {min}–{max} minutes
|
|
32
|
+
→ After that: /{step_after_next} ({one-line of what it does})
|
|
33
|
+
|
|
34
|
+
If you're stuck on the next step:
|
|
35
|
+
- Run `/clarify` here first to surface ambiguities while context is fresh.
|
|
36
|
+
- Run `/validate` to confirm this artifact is internally consistent.
|
|
37
|
+
- The next skill reads this artifact automatically, so you don't need to paste anything.
|
|
25
38
|
```
|
|
26
39
|
|
|
40
|
+
## Pipeline next-step lookup table
|
|
41
|
+
|
|
42
|
+
Skills use this table as the single source of truth for the `Next step:` block. When a skill closes, look up its row by the `Current` column and copy the four `→` lines verbatim (substituting the slug). **Do not hardcode next-step text in individual SKILL.md files** — always reference this table so future pipeline reorganisations stay consistent.
|
|
43
|
+
|
|
44
|
+
| Current | Next | What it produces | Time | After that |
|
|
45
|
+
|--------------|-----------------|-----------------------------------------------------------------|--------------|-----------------------------------------------------|
|
|
46
|
+
| /principles | /brief | Project Brief — goals, audience, stakeholders, constraints | 20–35 min | /srs — Requirements Specification (IEEE 830) |
|
|
47
|
+
| /brief | /srs | Requirements Specification (IEEE 830) — scope, FRs, MoSCoW | 25–40 min | /stories — User Stories grouped by Epics |
|
|
48
|
+
| /srs | /stories | User Stories grouped by Epics, with priority and FR refs | 20–30 min | /usecases — Use Cases with main/alt/exception flows |
|
|
49
|
+
| /stories | /usecases | Use Cases with main, alternative, and exception flows | 20–35 min | /ac — Acceptance Criteria (Given / When / Then) |
|
|
50
|
+
| /usecases | /ac | Acceptance Criteria (Given / When / Then) linked to stories | 20–35 min | /nfr — Non-functional Requirements with metrics |
|
|
51
|
+
| /ac | /nfr | Non-functional Requirements with measurable metrics | 15–25 min | /datadict — Data Dictionary (entities, fields) |
|
|
52
|
+
| /nfr | /datadict | Data Dictionary — entities, fields, types, relationships | 15–30 min | /research — Technology Research (ADRs, integrations)|
|
|
53
|
+
| /datadict | /research | Technology Research — ADRs, integration map, storage decisions | 15–25 min | /apicontract — API Contract (endpoints, schemas) |
|
|
54
|
+
| /research | /apicontract | API Contract — endpoints, request/response schemas, errors | 20–35 min | /wireframes — Textual Wireframe Descriptions |
|
|
55
|
+
| /apicontract | /wireframes | Textual Wireframe Descriptions — screens, components, nav | 25–40 min | /scenarios — End-to-end Validation Scenarios |
|
|
56
|
+
| /wireframes | /scenarios | End-to-end Validation Scenarios linking US, AC, WF, API | 15–25 min | /trace + /analyze — coverage + cross-artifact QA |
|
|
57
|
+
| /scenarios | /handoff | Development Handoff Package — inventory, MVP scope, open items | 5–10 min | (pipeline complete) |
|
|
58
|
+
| /handoff | (none) | Pipeline complete | — | Run /trace and /analyze for final coverage check |
|
|
59
|
+
|
|
60
|
+
## Cross-cutting commands (no Next step line)
|
|
61
|
+
|
|
62
|
+
These skills do not advance the pipeline — they update or report on existing artifacts. Their closing block omits the `Next step:` block entirely (omit it cleanly — don't write "Next step: none"):
|
|
63
|
+
|
|
64
|
+
- `/trace` — coverage report (FR → US → UC → AC → NFR → API)
|
|
65
|
+
- `/clarify` — targeted ambiguity resolution; updates the artifact in place
|
|
66
|
+
- `/analyze` — cross-artifact quality report
|
|
67
|
+
- `/estimate` — effort estimation
|
|
68
|
+
- `/glossary` — glossary maintenance
|
|
69
|
+
- `/export` — export to Jira / GitHub Issues / Linear / CSV
|
|
70
|
+
- `/risk` — risk register
|
|
71
|
+
- `/sprint` — sprint plan
|
|
72
|
+
|
|
73
|
+
Their closing block ends after the "Available commands" table. Optionally, they can add a one-line "Re-run after fixes" hint (e.g., `/analyze` says "Re-run /analyze after each fix to track progress").
|
|
74
|
+
|
|
27
75
|
## Rules
|
|
28
76
|
|
|
29
|
-
- `{file_path}` is the full path where the artifact was saved.
|
|
30
|
-
- The summary is generated dynamically — do not repeat boilerplate; mention actual numbers and decisions.
|
|
31
|
-
- The "
|
|
32
|
-
-
|
|
77
|
+
- `{file_path}` is the full path where the artifact was saved (typically `output/<slug>/{NN}_{name}_{slug}.md`).
|
|
78
|
+
- The summary line is generated dynamically — do not repeat boilerplate; mention actual numbers and decisions ("18 FRs across 3 roles, 4 risks captured", not "the artifact was generated").
|
|
79
|
+
- The "Available commands" table is fixed (5 rows for pipeline skills). Cross-cutting skills omit `/done` from the table since they don't have a "finalize" state.
|
|
80
|
+
- The "Next step" block is built from the lookup table above. Do not hardcode it in individual SKILL.md files.
|
|
81
|
+
- The "If you're stuck" section is a 2–3-line nudge for users who don't know what to do next. Keep it short.
|
|
33
82
|
- The block is a chat message, not part of the saved Markdown file.
|
|
@@ -31,27 +31,46 @@ This file defines how skills determine the output directory. Each platform has i
|
|
|
31
31
|
|
|
32
32
|
Skills should not hardcode paths. They reference this file and apply the detection logic above.
|
|
33
33
|
|
|
34
|
-
## Output folder structure
|
|
34
|
+
## Output folder structure
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
**v3.1+ default — per-project subfolder.** `ba-toolkit init` creates `output/<slug>/` and writes the project's `AGENTS.md` inside it. All artifacts for that project also live there:
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
repo/
|
|
40
|
+
output/
|
|
41
|
+
my-app/ ← project A
|
|
42
|
+
AGENTS.md
|
|
43
|
+
00_principles_my-app.md
|
|
44
|
+
01_brief_my-app.md
|
|
45
|
+
02_srs_my-app.md
|
|
46
|
+
...
|
|
47
|
+
other-project/ ← project B
|
|
48
|
+
AGENTS.md
|
|
49
|
+
01_brief_other-project.md
|
|
50
|
+
...
|
|
44
51
|
```
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
The user opens their AI agent inside one of those subfolders (`cd output/my-app && claude` or equivalent for the agent of choice). With cwd set to the project subfolder, every skill — including those that look for prior artifacts via `01_brief_*.md` glob — sees only that project's files. Two agent windows in the same repo, each `cd`-ed into a different `output/<slug>/`, work on two completely independent projects with zero cross-talk.
|
|
54
|
+
|
|
55
|
+
**Legacy v3.0 single-project layout — still supported.** Projects scaffolded before v3.1 have a single `AGENTS.md` at the repo root and artifacts saved flat under `output/`:
|
|
47
56
|
|
|
48
57
|
```
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
58
|
+
repo/
|
|
59
|
+
AGENTS.md ← legacy single-project
|
|
60
|
+
output/
|
|
52
61
|
01_brief_my-app.md
|
|
53
62
|
02_srs_my-app.md
|
|
54
63
|
...
|
|
55
64
|
```
|
|
56
65
|
|
|
57
|
-
|
|
66
|
+
When a skill is run with cwd set to the repo root and finds no `AGENTS.md` next to the artifacts, it walks up the directory tree to find the legacy root `AGENTS.md`. New projects scaffolded with v3.1+ should always use the per-project subfolder layout.
|
|
67
|
+
|
|
68
|
+
## Detection rule for skills
|
|
69
|
+
|
|
70
|
+
When a skill needs to find the project's `AGENTS.md` (for example, to update its `## Pipeline Status` table after generating an artifact):
|
|
71
|
+
|
|
72
|
+
1. Check `cwd/AGENTS.md` first. If present, that's the project's file.
|
|
73
|
+
2. Otherwise walk up the directory tree until you find an `AGENTS.md` (legacy v3.0 fallback).
|
|
74
|
+
3. If neither exists, warn the user that the project was likely not scaffolded with `ba-toolkit init` and tell them to run it.
|
|
75
|
+
|
|
76
|
+
Never create `AGENTS.md` at the repo root from inside a skill — that file is owned by `ba-toolkit init`.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Interview Protocol
|
|
2
|
+
|
|
3
|
+
Every BA Toolkit skill that gathers information from the user MUST follow this protocol during its Interview phase. The goal is a conversation, not a questionnaire dump — users answer better when each question has focus and concrete options to react to.
|
|
4
|
+
|
|
5
|
+
## Rules
|
|
6
|
+
|
|
7
|
+
1. **One question at a time.** Never send a numbered list of 5+ questions in a single message. Ask one question, wait for the answer, acknowledge it in one line, then ask the next.
|
|
8
|
+
|
|
9
|
+
2. **Present options as a 2-column markdown table.** Every question carries a short table with columns `| ID | Variant |`. The IDs are lowercase letters starting at `a` (`a`, `b`, `c`, `d`, `e`, …). Tables render cleanly in every supported AI agent (Claude Code, Codex CLI, Gemini CLI, Cursor, Windsurf) and scan faster than a numbered list. Pull the variants from:
|
|
10
|
+
- The project domain (load `references/domains/{domain}.md` and reuse its vocabulary, typical entities, and business goals verbatim when they fit — do not invent domain-specific options when the reference file already lists them).
|
|
11
|
+
- What the user has already said earlier in the interview.
|
|
12
|
+
- Industry conventions for the artifact being built.
|
|
13
|
+
|
|
14
|
+
Variants should be **concrete**, not abstract — e.g. for "Who is your primary user?" in a SaaS project, offer "Product Manager at a 50–500-person SaaS startup", "Engineering Lead", "Ops/Support team", not "End user", "Customer", "User".
|
|
15
|
+
|
|
16
|
+
3. **3–5 variants per question, last row is always free-text.** Keep the table to 3–5 rows total. The last row is always something like `e | Other — type your own answer` (or whatever letter follows the last predefined variant). If the user picks the free-text row, accept arbitrary text. Never force the user into one of the predefined variants.
|
|
17
|
+
|
|
18
|
+
4. **Wait for the answer.** Do not generate the next question or any part of the artifact until the user has replied. A non-answer (e.g. "I don't know", "skip") is a valid answer — record it as "unknown" and move on. The user can respond with the letter ID (`a`, `b`, …), the verbatim variant text, or — for the free-text row — any text of their own.
|
|
19
|
+
|
|
20
|
+
5. **Acknowledge, then proceed.** After each answer, reflect it back in one line (e.g. "Got it — primary user is the Ops team at mid-size logistics companies.") before asking the next question. This catches misunderstandings early.
|
|
21
|
+
|
|
22
|
+
6. **Batch only when the user asks.** If the user explicitly says "just give me all the questions at once" or "I'll answer in one go", switch to a single numbered list. Otherwise stay one-at-a-time.
|
|
23
|
+
|
|
24
|
+
7. **Stop when you have enough.** Each skill specifies a required set of topics. Once every required topic has a recorded answer, stop asking and move to the Generation phase. Do not pad the interview with "nice-to-have" questions.
|
|
25
|
+
|
|
26
|
+
8. **Lead-in question for entry-point skills.** For the first skill in a fresh project (typically `/brief`), the very first interview question is **open-ended free-text**, not a structured options table — `Tell me about the project in your own words: one or two sentences are enough. What are you building, who is it for, and what problem does it solve?`. The user replies in free form. From that reply, extract whatever you can (product type, target audience, business goal, domain hints) and use it to pre-fill the structured questions that follow rule 2. Only ask the structured questions for topics the lead-in answer didn't cover. Non-entry-point skills (`/srs`, `/stories`, …) skip the lead-in and go straight to structured questions, because the prior artifacts already supply the project context.
|
|
27
|
+
|
|
28
|
+
9. **Inline command context.** If the user invokes the skill with text after the slash command — for example `/brief I want to build an online store for construction materials targeting B2B buyers in LATAM` or `/srs the SRS should focus on the payments module first` — parse that text as if it were the answer to the lead-in question (rule 8). Skip the open-ended lead-in and use the inline text to pre-fill any structured questions you can. Only ask the user for what's still missing. Acknowledge the inline context once at the start (`Got it — online store for construction materials, B2B buyers, LATAM market.`) so the user knows their context was understood, then jump straight into the first structured question that the inline text didn't already answer. This rule applies to **every** skill that has an Interview phase, not just entry-point skills.
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
Bad (old style — questionnaire dump):
|
|
33
|
+
|
|
34
|
+
> Please answer the following questions:
|
|
35
|
+
> 1. What is the product?
|
|
36
|
+
> 2. Who is the target user?
|
|
37
|
+
> 3. What problem does it solve?
|
|
38
|
+
> 4. What are the success metrics?
|
|
39
|
+
> 5. What are the key constraints?
|
|
40
|
+
|
|
41
|
+
Good (protocol style — one question, table of variants):
|
|
42
|
+
|
|
43
|
+
> Let's start with the product itself. What are you building?
|
|
44
|
+
>
|
|
45
|
+
> | ID | Variant |
|
|
46
|
+
> |----|---------------------------------------------------------------|
|
|
47
|
+
> | a | A B2B SaaS tool for internal teams (dashboards, automation) |
|
|
48
|
+
> | b | A customer-facing web application (marketplace, portal) |
|
|
49
|
+
> | c | A mobile app (consumer or B2B) |
|
|
50
|
+
> | d | An API / developer platform |
|
|
51
|
+
> | e | Other — type your own answer |
|
|
52
|
+
|
|
53
|
+
*User replies with `a`, types the verbatim variant text, or picks `e` and types their own description.*
|
|
54
|
+
|
|
55
|
+
> Got it — internal B2B SaaS tool. Who is the primary user?
|
|
56
|
+
>
|
|
57
|
+
> | ID | Variant |
|
|
58
|
+
> |----|---------------------------------------------------------------|
|
|
59
|
+
> | a | Product Manager at a 50–500-person SaaS startup |
|
|
60
|
+
> | b | Engineering Lead at a B2B company |
|
|
61
|
+
> | c | Operations / Support team at a mid-size SaaS |
|
|
62
|
+
> | d | Other — type your own answer |
|
|
63
|
+
|
|
64
|
+
*…and so on, one question at a time, until every required topic for the current skill has an answer.*
|
|
65
|
+
|
|
66
|
+
## When this protocol applies
|
|
67
|
+
|
|
68
|
+
This protocol applies to every skill that has an `### Interview` (or `## Interview`) section in its SKILL.md — currently: `brief`, `srs`, `stories`, `usecases`, `ac`, `nfr`, `datadict`, `apicontract`, `wireframes`, `scenarios`, `research`, `principles`. Each of those skills MUST link to this file from its Interview section and follow rules 1–7 + rule 9. Rule 8 (open-ended lead-in question) applies only to entry-point skills — currently `/brief` and `/principles` when no `01_brief_*.md` or `00_principles_*.md` is present in the output directory yet.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# BA Toolkit — Project Context
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- ba-toolkit:begin managed -->
|
|
4
|
+
> Auto-generated by `ba-toolkit init` on [DATE]. The Active Project block below is refreshed on every re-init. Everything outside this managed block is preserved — add your own notes, update the Pipeline Status, and edit the Key Constraints / Open Questions sections freely; `ba-toolkit init` will not touch them.
|
|
4
5
|
|
|
5
6
|
## Active Project
|
|
6
7
|
|
|
@@ -9,6 +10,7 @@
|
|
|
9
10
|
**Domain:** [DOMAIN]
|
|
10
11
|
**Language:** English
|
|
11
12
|
**Output folder:** output/[SLUG]/
|
|
13
|
+
<!-- ba-toolkit:end managed -->
|
|
12
14
|
|
|
13
15
|
## Pipeline Status
|
|
14
16
|
|
package/skills/research/SKILL.md
CHANGED
|
@@ -23,7 +23,11 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
23
23
|
|
|
24
24
|
## Interview
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options, always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
27
|
+
>
|
|
28
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/research` (e.g., `/research compare PostgreSQL vs DynamoDB for our event store`), use it as the focus question to research instead of asking for one.
|
|
29
|
+
|
|
30
|
+
1–2 rounds, 4–6 topics.
|
|
27
31
|
|
|
28
32
|
**Required topics:**
|
|
29
33
|
1. Existing infrastructure — is there a current backend, database, or API the new system must integrate with or extend?
|
|
@@ -127,9 +131,9 @@ After saving the artifact, present the following summary (see `references/closin
|
|
|
127
131
|
- Number of confirmed external integrations.
|
|
128
132
|
- Any open questions that must be resolved before `/apicontract`.
|
|
129
133
|
|
|
130
|
-
Available commands: `/clarify [focus]` · `/revise [ADR-NNN]` · `/expand [ADR-NNN]` · `/validate` · `/done`
|
|
134
|
+
Available commands for this artifact: `/clarify [focus]` · `/revise [ADR-NNN]` · `/expand [ADR-NNN]` · `/validate` · `/done`
|
|
131
135
|
|
|
132
|
-
Next step
|
|
136
|
+
Build the `Next step:` block from the pipeline lookup table in `references/closing-message.md` (row `Current = /research`). Do not hardcode `/apicontract` here.
|
|
133
137
|
|
|
134
138
|
## Style
|
|
135
139
|
|
|
@@ -23,7 +23,11 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
23
23
|
|
|
24
24
|
## Interview
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options, always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
27
|
+
>
|
|
28
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/scenarios` (e.g., `/scenarios focus on the new-user onboarding journey`), use it to scope which end-to-end scenarios to draft.
|
|
29
|
+
|
|
30
|
+
1 round, 3–5 topics.
|
|
27
31
|
|
|
28
32
|
**Required topics:**
|
|
29
33
|
1. Coverage priority — generate scenarios for Must-priority US only, or include Should as well?
|
package/skills/srs/SKILL.md
CHANGED
|
@@ -23,7 +23,11 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
23
23
|
|
|
24
24
|
## Interview
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options, always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
27
|
+
>
|
|
28
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/srs` (e.g., `/srs focus on the payments module first`), parse it as a scope hint and use it to prioritise which functional areas you ask about.
|
|
29
|
+
|
|
30
|
+
3–7 topics per round, 2–4 rounds. Do not re-ask information already known from the brief.
|
|
27
31
|
|
|
28
32
|
**Required topics:**
|
|
29
33
|
1. User roles — which roles interact with the system?
|
|
@@ -78,24 +82,9 @@ FR numbering: sequential, three-digit (FR-001, FR-002, ...).
|
|
|
78
82
|
|
|
79
83
|
## AGENTS.md update
|
|
80
84
|
|
|
81
|
-
After `/done`,
|
|
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
|
-
```
|
|
85
|
+
After `/done`, find the project's `AGENTS.md` (look in cwd first; fall back to walking up the directory tree for legacy v3.0 single-project layouts). **Update only the `## Pipeline Status` row for `/srs`** — toggle its status from `⬜ Not started` to `✅ Done` and fill in the artifact filename (`02_srs_{slug}.md`) in the `File` column. **Do not touch the managed block** (`<!-- ba-toolkit:begin managed -->` … `<!-- ba-toolkit:end managed -->`) — that's owned by `ba-toolkit init`. **Do not add `## Artifacts` / `## Key context` sections** — those are not part of the v3.1+ template.
|
|
97
86
|
|
|
98
|
-
|
|
87
|
+
If you find no `AGENTS.md` at all, 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 file. Do not create one yourself with arbitrary structure.
|
|
99
88
|
|
|
100
89
|
## Iterative refinement
|
|
101
90
|
|
|
@@ -115,9 +104,9 @@ After saving the artifact, present the following summary to the user (see `refer
|
|
|
115
104
|
- User roles identified.
|
|
116
105
|
- External integrations and regulatory requirements captured.
|
|
117
106
|
|
|
118
|
-
Available commands: `/clarify [focus]` · `/revise [section]` · `/expand [section]` · `/split [FR-NNN]` · `/validate` · `/done`
|
|
107
|
+
Available commands for this artifact: `/clarify [focus]` · `/revise [section]` · `/expand [section]` · `/split [FR-NNN]` · `/validate` · `/done`
|
|
119
108
|
|
|
120
|
-
Next step
|
|
109
|
+
Build the `Next step:` block from the pipeline lookup table in `references/closing-message.md` (look up the row where `Current` is `/srs`). Do not hardcode `/stories` here — copy the four `→` lines verbatim from the lookup table row.
|
|
121
110
|
|
|
122
111
|
## Style
|
|
123
112
|
|
package/skills/stories/SKILL.md
CHANGED
|
@@ -21,7 +21,11 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
21
21
|
|
|
22
22
|
## Interview
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options, always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
25
|
+
>
|
|
26
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/stories` (e.g., `/stories focus on the onboarding epic`), parse it as a scope hint and use it to narrow which areas you draft user stories for.
|
|
27
|
+
|
|
28
|
+
3–7 topics per round, 2–4 rounds.
|
|
25
29
|
|
|
26
30
|
**Required topics:**
|
|
27
31
|
1. Which user flows are most critical?
|
|
@@ -76,9 +80,9 @@ After saving the artifact, present the following summary to the user (see `refer
|
|
|
76
80
|
- Count of Must-priority FR covered.
|
|
77
81
|
- Any stories flagged for `/split` due to complexity.
|
|
78
82
|
|
|
79
|
-
Available commands: `/clarify [focus]` · `/revise [US-NNN]` · `/expand [US-NNN]` · `/split [US-NNN]` · `/validate` · `/done`
|
|
83
|
+
Available commands for this artifact: `/clarify [focus]` · `/revise [US-NNN]` · `/expand [US-NNN]` · `/split [US-NNN]` · `/validate` · `/done`
|
|
80
84
|
|
|
81
|
-
Next step
|
|
85
|
+
Build the `Next step:` block from the pipeline lookup table in `references/closing-message.md` (row `Current = /stories`). Do not hardcode `/usecases` here.
|
|
82
86
|
|
|
83
87
|
## Style
|
|
84
88
|
|
package/skills/usecases/SKILL.md
CHANGED
|
@@ -21,7 +21,11 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
21
21
|
|
|
22
22
|
## Interview
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options, always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
25
|
+
>
|
|
26
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/usecases` (e.g., `/usecases focus on admin flows`), use it as a scope hint for which use cases to draft.
|
|
27
|
+
|
|
28
|
+
3–7 topics per round, 2–4 rounds.
|
|
25
29
|
|
|
26
30
|
**Required topics:**
|
|
27
31
|
1. Detail level — summary, user-goal, subfunction?
|
|
@@ -82,9 +86,9 @@ After saving the artifact, present the following summary to the user (see `refer
|
|
|
82
86
|
- Count of alternative and exceptional flows documented.
|
|
83
87
|
- External system actors identified.
|
|
84
88
|
|
|
85
|
-
Available commands: `/clarify [focus]` · `/revise [UC-NNN]` · `/expand [UC-NNN]` · `/split [UC-NNN]` · `/validate` · `/done`
|
|
89
|
+
Available commands for this artifact: `/clarify [focus]` · `/revise [UC-NNN]` · `/expand [UC-NNN]` · `/split [UC-NNN]` · `/validate` · `/done`
|
|
86
90
|
|
|
87
|
-
Next step
|
|
91
|
+
Build the `Next step:` block from the pipeline lookup table in `references/closing-message.md` (row `Current = /usecases`). Do not hardcode `/ac` here.
|
|
88
92
|
|
|
89
93
|
## Style
|
|
90
94
|
|
|
@@ -21,7 +21,11 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
21
21
|
|
|
22
22
|
## Interview
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
> **Follow the [Interview Protocol](../references/interview-protocol.md):** ask one question at a time, present a 2-column `| ID | Variant |` markdown table of 3–5 domain-appropriate options, always include a free-text "Other" row as the last option, and wait for an answer before asking the next question.
|
|
25
|
+
>
|
|
26
|
+
> **Inline context (protocol rule 9):** if the user wrote text after `/wireframes` (e.g., `/wireframes mobile-first, focus on the checkout flow`), use it as a layout and scope hint for which screens to draft first.
|
|
27
|
+
|
|
28
|
+
3–7 topics per round, 2–4 rounds.
|
|
25
29
|
|
|
26
30
|
**Required topics:**
|
|
27
31
|
1. Platform — web (desktop, mobile responsive), native app, Telegram Mini App?
|