@kudusov.takhir/ba-toolkit 4.0.0 → 4.0.2
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 +20 -1
- package/bin/ba-toolkit.js +6 -0
- package/package.json +1 -1
- package/skills/ac/SKILL.md +2 -0
- package/skills/analyze/SKILL.md +2 -0
- package/skills/apicontract/SKILL.md +2 -0
- package/skills/brief/SKILL.md +5 -3
- package/skills/datadict/SKILL.md +2 -0
- package/skills/discovery/SKILL.md +5 -3
- package/skills/estimate/SKILL.md +2 -0
- package/skills/export/SKILL.md +2 -0
- package/skills/glossary/SKILL.md +2 -0
- package/skills/handoff/SKILL.md +2 -0
- package/skills/implement-plan/SKILL.md +2 -0
- package/skills/nfr/SKILL.md +2 -0
- package/skills/principles/SKILL.md +5 -12
- package/skills/references/slug-source.md +30 -0
- package/skills/references/templates/principles-template.md +6 -14
- package/skills/research/SKILL.md +2 -0
- package/skills/risk/SKILL.md +2 -0
- package/skills/scenarios/SKILL.md +2 -0
- package/skills/sprint/SKILL.md +2 -0
- package/skills/srs/SKILL.md +3 -3
- package/skills/stories/SKILL.md +2 -0
- package/skills/trace/SKILL.md +2 -0
- package/skills/usecases/SKILL.md +2 -0
- package/skills/wireframes/SKILL.md +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,23 @@ Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
+
## [4.0.2] — 2026-04-12
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **Skills invented their own project slug instead of reading the one `ba-toolkit init` wrote to `AGENTS.md`.** Reproduction: `ba-toolkit init --name "New Test App"` produced `**Slug:** new-test-app` in `AGENTS.md`, but a follow-up `/brief` saved `01_brief_knitted-socks.md` — slug picked from conversation context, not from the scaffold. Root cause: pipeline skills carried v3.x-era wording (`/brief`: *"slug — kebab-case, fixed here for the entire pipeline"*; `/principles`: *"extract the slug from the brief, otherwise ask the user"*; `/discovery`: *"derive from the project name"*) and never read the canonical slug from the managed block of `AGENTS.md` that v4.0 `init` writes. Downstream skills inherited the wrong slug from the brief filename and the project silently desynchronised. Fixed by adding `skills/references/slug-source.md` (the single rule + fallbacks + rationale) and an explicit "Slug source" directive in every pipeline and utility skill that emits a `{slug}` filename: `/brief`, `/discovery`, `/principles`, `/srs`, `/stories`, `/usecases`, `/ac`, `/nfr`, `/datadict`, `/research`, `/apicontract`, `/wireframes`, `/scenarios`, `/handoff`, `/implement-plan`, `/analyze`, `/trace`, `/risk`, `/sprint`, `/glossary`, `/estimate`, `/export`. Each now reads `**Slug:**` from `AGENTS.md` verbatim and refuses to invent a new one. `/discovery` is the one exception — it may still derive a slug if `AGENTS.md` does not yet exist (the brain-storm-before-init flow), and otherwise honours the scaffold value instead of renaming the project.
|
|
19
|
+
- **`ba-toolkit init` crashed on second run with "Input stream closed before all prompts could be answered."** When an existing install was detected after the domain/agent arrow-key menus, the "Replace existing BA Toolkit install?" prompt rejected immediately. Root cause: the raw-mode menu closes the shared readline interface, which sets a sticky `inputClosed` flag that was never reset when `ensureReadline()` recreated the interface for the next `prompt()`. Fixed by clearing the flag on interface recreation.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## [4.0.1] — 2026-04-12
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- **Removed stale v3.x references from skill files.** `/principles` still offered an "Output folder structure" interview topic with a `{slug}/` subfolder option that no longer exists in v4.0 — removed, topics renumbered (8 → 7). `principles-template.md` subfolder section and Decision Authority rows renumbered to match. `/brief`, `/discovery`, `/srs` SKILL.md files still referenced "per-project AGENTS.md" and "legacy v3.0 single-project layouts" — updated to v4.0 wording (project root, flat output).
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
14
31
|
## [4.0.0] — 2026-04-11
|
|
15
32
|
|
|
16
33
|
### Changed
|
|
@@ -871,7 +888,9 @@ CI scripts that relied on the old behaviour (`init` creates files only, `install
|
|
|
871
888
|
|
|
872
889
|
---
|
|
873
890
|
|
|
874
|
-
[Unreleased]: https://github.com/TakhirKudusov/ba-toolkit/compare/
|
|
891
|
+
[Unreleased]: https://github.com/TakhirKudusov/ba-toolkit/compare/v4.0.2...HEAD
|
|
892
|
+
[4.0.2]: https://github.com/TakhirKudusov/ba-toolkit/compare/v4.0.1...v4.0.2
|
|
893
|
+
[4.0.1]: https://github.com/TakhirKudusov/ba-toolkit/compare/v4.0.0...v4.0.1
|
|
875
894
|
[4.0.0]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.13.1...v4.0.0
|
|
876
895
|
[3.13.1]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.13.0...v3.13.1
|
|
877
896
|
[3.13.0]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.12.0...v3.13.0
|
package/bin/ba-toolkit.js
CHANGED
|
@@ -193,6 +193,12 @@ let inputClosed = false;
|
|
|
193
193
|
|
|
194
194
|
function ensureReadline() {
|
|
195
195
|
if (sharedRl) return;
|
|
196
|
+
// Reset the sticky close flag — a previous interface may have been
|
|
197
|
+
// torn down by closeReadline() (e.g. before an arrow-key menu took
|
|
198
|
+
// over stdin in raw mode). Without this reset, the next prompt()
|
|
199
|
+
// after a menu would immediately reject with INPUT_CLOSED even
|
|
200
|
+
// though stdin is still perfectly usable.
|
|
201
|
+
inputClosed = false;
|
|
196
202
|
sharedRl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
197
203
|
sharedRl.on('line', (line) => {
|
|
198
204
|
if (waiters.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kudusov.takhir/ba-toolkit",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "AI-powered Business Analyst pipeline — 24 skills from concept discovery to a sequenced implementation plan an AI coding agent can execute, with one-command Notion + Confluence publish. Works with Claude Code, Codex CLI, Gemini CLI, Cursor, and Windsurf.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"business-analyst",
|
package/skills/ac/SKILL.md
CHANGED
|
@@ -42,6 +42,8 @@ Supplement with domain-specific questions from the reference.
|
|
|
42
42
|
|
|
43
43
|
## Generation
|
|
44
44
|
|
|
45
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
46
|
+
|
|
45
47
|
**File:** `05_ac_{slug}.md`
|
|
46
48
|
|
|
47
49
|
The full per-AC field set lives at `references/templates/ac-template.md` and is the single source of truth. Each AC carries: ID (`AC-NNN-NN`), Type (positive / negative / boundary / performance / security), Given / When / Then, Linked US, Linked UC, Linked FR, Linked NFR (for performance/security ACs), Source (which business rule from `02_srs_{slug}.md` drove this AC), and Verification method (automated test / manual test / observed in production). The artifact also carries a US → AC coverage matrix at the bottom.
|
package/skills/analyze/SKILL.md
CHANGED
|
@@ -86,6 +86,8 @@ The 8 canonical categories cover the IEEE 830 §4.3 SRS quality attributes (corr
|
|
|
86
86
|
|
|
87
87
|
## Generation
|
|
88
88
|
|
|
89
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
90
|
+
|
|
89
91
|
**File:** `00_analyze_{slug}.md`
|
|
90
92
|
|
|
91
93
|
The full report layout lives at `references/templates/analyze-template.md` and is the single source of truth. Each finding carries: ID, Severity, Category (one of the 8 above), Location (artifact + element ID), Description, Recommendation, and **Owner** (which role is accountable for fixing the finding — assigned by `00_principles_*.md` §4 Definition of Ready ownership where applicable, otherwise by domain default).
|
|
@@ -47,6 +47,8 @@ Supplement with domain-specific questions from the reference.
|
|
|
47
47
|
|
|
48
48
|
## Generation
|
|
49
49
|
|
|
50
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
51
|
+
|
|
50
52
|
**File:** `08_apicontract_{slug}.md`
|
|
51
53
|
|
|
52
54
|
```markdown
|
package/skills/brief/SKILL.md
CHANGED
|
@@ -61,7 +61,9 @@ If a domain reference is loaded, supplement general questions with domain-specif
|
|
|
61
61
|
|
|
62
62
|
### 5. Generation
|
|
63
63
|
|
|
64
|
-
**
|
|
64
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` at the project root (look in cwd first; if cwd is `output/`, check `../AGENTS.md`). Use that value verbatim — do not invent or re-derive a slug from the project name. `ba-toolkit init` is the single source of truth; see [`../references/slug-source.md`](../references/slug-source.md) for fallback rules and rationale.
|
|
65
|
+
|
|
66
|
+
**File:** `01_brief_{slug}.md`
|
|
65
67
|
|
|
66
68
|
```markdown
|
|
67
69
|
# Project Brief: {Project Name}
|
|
@@ -103,9 +105,9 @@ If a domain reference is loaded, supplement general questions with domain-specif
|
|
|
103
105
|
|
|
104
106
|
`ba-toolkit init` already created `AGENTS.md` at the project root. After saving `01_brief_{slug}.md` to `output/`, find the project's `AGENTS.md` (look in cwd first; if cwd is `output/`, check `../AGENTS.md`).
|
|
105
107
|
|
|
106
|
-
**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`.
|
|
108
|
+
**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`.
|
|
107
109
|
|
|
108
|
-
If you find no `AGENTS.md` at all
|
|
110
|
+
If you find no `AGENTS.md` at all, warn the user that the project was likely not scaffolded with `ba-toolkit init` and tell them to run it. Do not create one yourself with arbitrary structure.
|
|
109
111
|
|
|
110
112
|
### 7. Iterative refinement
|
|
111
113
|
|
package/skills/datadict/SKILL.md
CHANGED
|
@@ -45,6 +45,8 @@ Supplement with domain-specific questions and mandatory entities from the refere
|
|
|
45
45
|
|
|
46
46
|
## Generation
|
|
47
47
|
|
|
48
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
49
|
+
|
|
48
50
|
**File:** `07_datadict_{slug}.md`
|
|
49
51
|
|
|
50
52
|
The full per-entity field set lives at `references/templates/datadict-template.md` and is the single source of truth. Each entity carries: name, **Source** (which FR/US introduced this entity), **Owner** (which team / role curates it), **Sensitivity** (Public / Internal / Confidential / PII / PCI / PHI), description, attribute table (with logical types, not DBMS-specific), relationships with cascade rules, **state machine** (if applicable), indexes (logical, not physical), retention policy, and notes. The artifact carries an FR → Entity coverage matrix at the bottom.
|
|
@@ -54,7 +54,9 @@ If a topic was already covered by inline context or the lead-in answer, skip it
|
|
|
54
54
|
|
|
55
55
|
### 5. Generation
|
|
56
56
|
|
|
57
|
-
**
|
|
57
|
+
**Slug:** if `AGENTS.md` exists at the project root with a `**Slug:**` line in its managed block, read that value verbatim and use it as `{slug}` — `ba-toolkit init` is the single source of truth. Do **not** propose a new slug, and do **not** rename the project the user already scaffolded. Only when `AGENTS.md` is absent (the user is brain-storming before running `ba-toolkit init`) may you derive a kebab-case slug from the project name; if the user has not yet picked a name, propose 2–3 candidates and let them choose. See [`../references/slug-source.md`](../references/slug-source.md) for the full rule.
|
|
58
|
+
|
|
59
|
+
**File:** `00_discovery_{slug}.md`
|
|
58
60
|
|
|
59
61
|
```markdown
|
|
60
62
|
# Discovery: {Project Name}
|
|
@@ -127,11 +129,11 @@ Things we don't yet know and need to learn before committing real resources.
|
|
|
127
129
|
|
|
128
130
|
`ba-toolkit init` already created `AGENTS.md` at the project root. After saving `00_discovery_{slug}.md` to `output/`, find the project's `AGENTS.md` (look in cwd first; if cwd is `output/`, check `../AGENTS.md`).
|
|
129
131
|
|
|
130
|
-
**Update only the `## Pipeline Status` row for `/discovery`** — toggle its status from `⬜ Not started` to `✅ Done` and fill in the artifact filename in the `File` column. **Do not
|
|
132
|
+
**Update only the `## Pipeline Status` row for `/discovery`** — 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`.
|
|
131
133
|
|
|
132
134
|
**Domain field exception (managed block).** `/discovery` is the canonical source of truth for the project domain after `ba-toolkit init`. After saving `00_discovery_{slug}.md`, compare the recommended domain in §8 of the discovery artifact against the `**Domain:**` line inside the managed block of `AGENTS.md`. **If they differ, surgically update only that single line** to the new value — do not modify any other managed-block field (`**Project:**`, `**Slug:**`, `**Language:**`, `**Output folder:**`, the auto-generated date comment). Mention the change in the user-facing reply: "Updated the project domain in AGENTS.md from `<old>` to `<new>` based on the discovery recommendation." This is the only managed-block field `/discovery` may touch; everything else inside `<!-- ba-toolkit:begin managed -->` … `<!-- ba-toolkit:end managed -->` remains owned by `ba-toolkit init`.
|
|
133
135
|
|
|
134
|
-
If you find no `AGENTS.md` at all
|
|
136
|
+
If you find no `AGENTS.md` at all, warn the user that the project was likely not scaffolded with `ba-toolkit init` and tell them to run it. Do not create one yourself with arbitrary structure.
|
|
135
137
|
|
|
136
138
|
If the existing `AGENTS.md` predates v3.2 and has no `/discovery` row in its Pipeline Status table, prepend a new row at stage `0` (and renumber the existing `/principles` row to `0a`) — same convention used by `/research` at stage `7a`. Mention the migration in your reply so the user knows their AGENTS.md was updated.
|
|
137
139
|
|
package/skills/estimate/SKILL.md
CHANGED
|
@@ -87,6 +87,8 @@ This skill produces a **single-estimator analytical pass**. A senior BA running
|
|
|
87
87
|
|
|
88
88
|
## Output
|
|
89
89
|
|
|
90
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
91
|
+
|
|
90
92
|
### If scope ≤ 20 stories — update `03_stories_{slug}.md` in-place
|
|
91
93
|
|
|
92
94
|
Add a `**Estimate:**` field to each US block and append the Estimation Summary table at the end of the file.
|
package/skills/export/SKILL.md
CHANGED
|
@@ -197,6 +197,8 @@ Compatible with Jira CSV import, Trello, Asana, Monday.com, and Google Sheets. I
|
|
|
197
197
|
|
|
198
198
|
## Output
|
|
199
199
|
|
|
200
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
201
|
+
|
|
200
202
|
Save the export file to the output directory alongside the artifacts:
|
|
201
203
|
|
|
202
204
|
```
|
package/skills/glossary/SKILL.md
CHANGED
|
@@ -99,6 +99,8 @@ Identify terms used in requirements but not defined anywhere in the glossary or
|
|
|
99
99
|
|
|
100
100
|
## Generation
|
|
101
101
|
|
|
102
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
103
|
+
|
|
102
104
|
Save `00_glossary_{slug}.md` to the output directory.
|
|
103
105
|
|
|
104
106
|
```markdown
|
package/skills/handoff/SKILL.md
CHANGED
|
@@ -24,6 +24,8 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
24
24
|
|
|
25
25
|
No interview. All content is derived from the existing artifacts. The full template lives at `references/templates/handoff-template.md` and is the single source of truth — including the full inventory of pipeline-stage and cross-cutting artifacts (`/discovery`, `/principles`, `/implement-plan`, `/sprint`, `/risk`, `/glossary`, `/trace`, `/analyze`, `/estimate`), the Brief Goal → FR / FR → NFR / FR → API forward-traceability tables, the ADR summary, and the formal Sign-off section.
|
|
26
26
|
|
|
27
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
28
|
+
|
|
27
29
|
**File:** `11_handoff_{slug}.md`
|
|
28
30
|
|
|
29
31
|
```markdown
|
|
@@ -115,6 +115,8 @@ Within a phase, order tasks so each task's `dependsOn` list points only at tasks
|
|
|
115
115
|
|
|
116
116
|
### 7. Generation
|
|
117
117
|
|
|
118
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
119
|
+
|
|
118
120
|
**File:** `12_implplan_{slug}.md`
|
|
119
121
|
|
|
120
122
|
```markdown
|
package/skills/nfr/SKILL.md
CHANGED
|
@@ -48,6 +48,8 @@ Supplement with domain-specific questions and mandatory categories from the refe
|
|
|
48
48
|
|
|
49
49
|
## Generation
|
|
50
50
|
|
|
51
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
52
|
+
|
|
51
53
|
**File:** `06_nfr_{slug}.md`
|
|
52
54
|
|
|
53
55
|
The full per-NFR field set lives at `references/templates/nfr-template.md` and is the single source of truth. Each NFR carries: ID (`NFR-NNN`), ISO 25010 characteristic, sub-characteristic, description, measurable metric, **acceptance threshold** (the bar that says "we passed"), verification method, source (which stakeholder, regulation, or FR drove this NFR), rationale, priority, and linked FRs / USs / Brief constraints. The artifact carries an FR → NFR coverage matrix and a per-characteristic priority summary at the bottom.
|
|
@@ -23,7 +23,7 @@ If `00_principles_*.md` already exists, load it and offer to:
|
|
|
23
23
|
- Amend a specific section (`/revise [section]`).
|
|
24
24
|
- Regenerate from scratch.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
**Slug source.** Read the `**Slug:**` line from the managed block of `AGENTS.md` at the project root (cwd, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. `ba-toolkit init` is the single source of truth — do not invent or re-derive a slug. If `AGENTS.md` is missing, warn the user to run `ba-toolkit init` first. See [`../references/slug-source.md`](../references/slug-source.md) for the full rule and fallbacks. The domain comes from the same managed block; if `01_brief_*.md` already exists, prefer the brief's domain over the scaffold default.
|
|
27
27
|
|
|
28
28
|
### 3. Interview
|
|
29
29
|
|
|
@@ -40,10 +40,9 @@ If `01_brief_*.md` already exists, extract the slug and domain from it. Otherwis
|
|
|
40
40
|
2. NFR baseline — which **ISO/IEC 25010** quality characteristics are mandatory beyond the domain defaults? (Performance Efficiency / Reliability / Security / Compatibility / Usability / Maintainability / Portability / Functional Suitability — `/nfr` reads this list verbatim and treats it as a checklist).
|
|
41
41
|
3. Definition of Ready — any project-specific acceptance criteria for finalizing an artifact beyond the `v3.7.0+` baseline DoR per artifact type listed in §4 below? (e.g., stakeholder sign-off, specific review steps).
|
|
42
42
|
4. Quality gate — at what severity level should `/analyze` findings block `/done`? (default: CRITICAL only)
|
|
43
|
-
5.
|
|
44
|
-
6. **
|
|
45
|
-
7. **
|
|
46
|
-
8. **Code review and branching policy** — trunk-based / GitFlow / GitHub flow? Required reviewers per PR? `/implement-plan` and downstream skills assume one of these defaults but the principles file is the source of truth.
|
|
43
|
+
5. **Testing strategy** — TDD (tests before implementation), tests-after, integration-only, manual-only, none? Drives whether `/implement-plan` task templates embed "Tests to write first" blocks. **Recommended:** TDD for production-grade systems; tests-after for prototypes; manual-only or none for spike work. *(This is the principles-based approach to the testing-discipline question that batch 6 item 2 surfaced — the right place to declare a testing strategy is here, not as a separate skill.)*
|
|
44
|
+
6. **Stakeholder decision authority** — who has sign-off authority on changes to these principles? Captured by name and role. Without this, principle changes become contentious mid-project.
|
|
45
|
+
7. **Code review and branching policy** — trunk-based / GitFlow / GitHub flow? Required reviewers per PR? `/implement-plan` and downstream skills assume one of these defaults but the principles file is the source of truth.
|
|
47
46
|
|
|
48
47
|
**Note:** Artifact language is **not** an interview topic — it is detected automatically from the user's first message and recorded in `## 1. Artifact Language` of the generated file. The user can override it later by re-running `/principles`.
|
|
49
48
|
|
|
@@ -157,13 +156,7 @@ For `/analyze` findings — action required before `/done` at the current step:
|
|
|
157
156
|
- **MEDIUM:** documented and may be deferred.
|
|
158
157
|
- **LOW:** informational only.
|
|
159
158
|
|
|
160
|
-
## 7.
|
|
161
|
-
|
|
162
|
-
**Mode:** {flat | subfolder}
|
|
163
|
-
|
|
164
|
-
_(flat = all artifacts in the output directory root; subfolder = all artifacts under `{output_dir}/{slug}/`)_
|
|
165
|
-
|
|
166
|
-
## 8. Project-Specific Notes
|
|
159
|
+
## 7. Project-Specific Notes
|
|
167
160
|
|
|
168
161
|
{any_additional_conventions_from_interview}
|
|
169
162
|
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Slug source — single rule
|
|
2
|
+
|
|
3
|
+
`ba-toolkit init` is the **single source of truth** for the project slug. It writes the slug into the managed block of `AGENTS.md` at the project root:
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
<!-- ba-toolkit:begin managed -->
|
|
7
|
+
...
|
|
8
|
+
**Slug:** new-test-app
|
|
9
|
+
...
|
|
10
|
+
<!-- ba-toolkit:end managed -->
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Every skill that emits a file whose name contains `{slug}` (e.g. `01_brief_{slug}.md`, `02_srs_{slug}.md`, `00_analyze_{slug}.md`) **must read the slug from this line and use it verbatim**. Do not invent a slug, do not re-derive it from the project name, do not pick one based on conversation context.
|
|
14
|
+
|
|
15
|
+
## How to read the slug
|
|
16
|
+
|
|
17
|
+
1. Locate `AGENTS.md`. Look in `cwd` first; if `cwd` is `output/`, check `../AGENTS.md`.
|
|
18
|
+
2. Find the managed block delimited by `<!-- ba-toolkit:begin managed -->` and `<!-- ba-toolkit:end managed -->`.
|
|
19
|
+
3. Inside the block, parse the line that starts with `**Slug:**`. Strip whitespace. The remainder is the slug.
|
|
20
|
+
4. Use that exact string as `{slug}` in every output filename for this run.
|
|
21
|
+
|
|
22
|
+
## Fallbacks
|
|
23
|
+
|
|
24
|
+
- **No `AGENTS.md` at the project root.** The project was not scaffolded with `ba-toolkit init`. Stop and tell the user to run `ba-toolkit init` first. Do not invent a slug to keep going.
|
|
25
|
+
- **`AGENTS.md` exists but has no managed block** (legacy file the user authored manually). Look for `01_brief_*.md` in `output/`; the part between `01_brief_` and `.md` is the slug. If no brief file exists either, ask the user for the slug explicitly — do not invent one.
|
|
26
|
+
- **`AGENTS.md` managed block is present but the `**Slug:**` line is missing or empty.** Treat as a corrupted scaffold. Tell the user to re-run `ba-toolkit init` to repair `AGENTS.md`. Do not invent a slug.
|
|
27
|
+
|
|
28
|
+
## Why
|
|
29
|
+
|
|
30
|
+
Before v4.0, `/brief` was the entry point and decided the slug. In v4.0, `ba-toolkit init` runs first and fixes the slug at scaffold time, so that `AGENTS.md` and the file names in `output/` are guaranteed to agree from the very first artifact. Skills that still derive a slug locally (from the project name or from conversation context) silently desynchronise the project: `AGENTS.md` says one thing, the artifact filenames say another, downstream skills pick up the wrong slug, and the user sees `01_brief_knitted-socks.md` next to `**Slug:** new-test-app`.
|
|
@@ -165,14 +165,7 @@ For `/analyze` findings:
|
|
|
165
165
|
- **MEDIUM:** documented and may be deferred.
|
|
166
166
|
- **LOW:** informational only.
|
|
167
167
|
|
|
168
|
-
## 7.
|
|
169
|
-
|
|
170
|
-
**Mode:** [flat | subfolder]
|
|
171
|
-
|
|
172
|
-
- `flat` (default) — all artifacts saved directly in the output directory.
|
|
173
|
-
- `subfolder` — all artifacts saved under `{output_dir}/[SLUG]/`.
|
|
174
|
-
|
|
175
|
-
## 8. Testing Strategy
|
|
168
|
+
## 7. Testing Strategy
|
|
176
169
|
|
|
177
170
|
**Strategy:** TDD | Tests-after | Integration-only | Manual-only | None
|
|
178
171
|
|
|
@@ -186,13 +179,13 @@ For `/analyze` findings:
|
|
|
186
179
|
|
|
187
180
|
`/implement-plan` reads this section to decide whether to embed test specifications in each task. Default is **TDD** for production-grade systems.
|
|
188
181
|
|
|
189
|
-
##
|
|
182
|
+
## 8. Code Review and Branching
|
|
190
183
|
|
|
191
184
|
**Branching model:** trunk-based | GitHub flow | GitFlow | other
|
|
192
185
|
**Required reviewers per PR:** [N]
|
|
193
186
|
**Merge gate:** [CI green + N reviews / CODEOWNERS approval / specific reviewer]
|
|
194
187
|
|
|
195
|
-
##
|
|
188
|
+
## 9. Stakeholder Decision Authority
|
|
196
189
|
|
|
197
190
|
Who can approve a change to these principles, and to which sections.
|
|
198
191
|
|
|
@@ -204,11 +197,10 @@ Who can approve a change to these principles, and to which sections.
|
|
|
204
197
|
| §4 Definition of Ready | [Role] | |
|
|
205
198
|
| §5 NFR Baseline | [Role] | |
|
|
206
199
|
| §6 Quality Gates | [Role] | |
|
|
207
|
-
| §7
|
|
208
|
-
| §8
|
|
209
|
-
| §9 Branching | [Role] | |
|
|
200
|
+
| §7 Testing Strategy | [Role] | |
|
|
201
|
+
| §8 Branching | [Role] | |
|
|
210
202
|
|
|
211
|
-
##
|
|
203
|
+
## 10. Project-Specific Notes
|
|
212
204
|
|
|
213
205
|
[ADDITIONAL_CONVENTIONS]
|
|
214
206
|
|
package/skills/research/SKILL.md
CHANGED
|
@@ -53,6 +53,8 @@ Supplement with domain-specific typical integrations from the reference.
|
|
|
53
53
|
|
|
54
54
|
## Generation
|
|
55
55
|
|
|
56
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
57
|
+
|
|
56
58
|
**File:** `07a_research_{slug}.md`
|
|
57
59
|
|
|
58
60
|
```markdown
|
package/skills/risk/SKILL.md
CHANGED
|
@@ -115,6 +115,8 @@ Assign each risk one of the four canonical treatment strategies (PMBOK 7 / ISO 3
|
|
|
115
115
|
|
|
116
116
|
## Generation
|
|
117
117
|
|
|
118
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
119
|
+
|
|
118
120
|
Save `00_risks_{slug}.md` to the output directory.
|
|
119
121
|
|
|
120
122
|
```markdown
|
|
@@ -41,6 +41,8 @@ Read `references/environment.md` from the `ba-toolkit` directory to determine th
|
|
|
41
41
|
|
|
42
42
|
## Generation
|
|
43
43
|
|
|
44
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
45
|
+
|
|
44
46
|
**File:** `10_scenarios_{slug}.md`
|
|
45
47
|
|
|
46
48
|
The full per-scenario field set lives at `references/templates/scenarios-template.md` and is the single source of truth. Each scenario carries: ID (`SC-NNN`), Title, Persona (named with context), Type (happy / negative / edge / performance / security), Priority (P1 / P2 / P3), Entry point, Platform, **Source** (Linked US, Linked FR, Linked NFR), Linked AC, Steps table, Expected Outcome, Failure Conditions. The artifact carries a coverage matrix at the bottom showing US, AC scenario, FR, NFR, and WF coverage.
|
package/skills/sprint/SKILL.md
CHANGED
|
@@ -92,6 +92,8 @@ For each sprint, derive a one-sentence goal that describes the primary user-faci
|
|
|
92
92
|
|
|
93
93
|
## Generation
|
|
94
94
|
|
|
95
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
96
|
+
|
|
95
97
|
Save `00_sprint_{slug}.md` to the output directory. The full layout lives at `references/templates/sprint-template.md` and is the single source of truth — including the per-story Persona column (per v3.5.0+ stories template), the net-velocity header, and the sprint-level Definition of Done.
|
|
96
98
|
|
|
97
99
|
Sprint IDs are sequential (SP-00, SP-01, SP-02, …). SP-00 is reserved for setup/architecture sprint if requested.
|
package/skills/srs/SKILL.md
CHANGED
|
@@ -14,7 +14,7 @@ Second step of the BA Toolkit pipeline. Generates an SRS adapted from IEEE 830.
|
|
|
14
14
|
|
|
15
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
16
|
1. Read `01_brief_*.md` from the output directory. If missing, warn and suggest running `/brief`.
|
|
17
|
-
2. Extract:
|
|
17
|
+
2. Extract: domain, business goals, functionality, stakeholders, constraints, glossary. The slug comes from `AGENTS.md`, not from the brief filename — see [`../references/slug-source.md`](../references/slug-source.md).
|
|
18
18
|
3. If a matching `references/domains/{domain}.md` file exists (currently: `saas`, `fintech`, `ecommerce`, `healthcare`, `logistics`, `on-demand`, `social-media`, `real-estate`, `igaming`, `edtech`, `govtech`, `ai-ml`), load it and apply its section `2. /srs`.
|
|
19
19
|
|
|
20
20
|
## Environment
|
|
@@ -118,9 +118,9 @@ FR numbering: sequential within each feature area, three-digit, with reserved ra
|
|
|
118
118
|
|
|
119
119
|
## AGENTS.md update
|
|
120
120
|
|
|
121
|
-
After `/done`, find the project's `AGENTS.md` (look in cwd first;
|
|
121
|
+
After `/done`, find the project's `AGENTS.md` (look in cwd first; if cwd is `output/`, check `../AGENTS.md`). **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`.
|
|
122
122
|
|
|
123
|
-
If you find no `AGENTS.md` at all, warn the user that the project was likely
|
|
123
|
+
If you find no `AGENTS.md` at all, warn the user that the project was likely not scaffolded with `ba-toolkit init` and tell them to run it. Do not create one yourself with arbitrary structure.
|
|
124
124
|
|
|
125
125
|
## Iterative refinement
|
|
126
126
|
|
package/skills/stories/SKILL.md
CHANGED
|
@@ -38,6 +38,8 @@ Supplement with domain-specific questions and typical epics from the reference.
|
|
|
38
38
|
|
|
39
39
|
## Generation
|
|
40
40
|
|
|
41
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
42
|
+
|
|
41
43
|
**File:** `03_stories_{slug}.md`
|
|
42
44
|
|
|
43
45
|
The full template lives at `references/templates/stories-template.md` and is the single source of truth for the per-story field set. The fields are:
|
package/skills/trace/SKILL.md
CHANGED
|
@@ -33,6 +33,8 @@ If the user invokes `/trace` with no inline hint, ask the following short calibr
|
|
|
33
33
|
|
|
34
34
|
## Generation
|
|
35
35
|
|
|
36
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
37
|
+
|
|
36
38
|
**File:** `00_trace_{slug}.md`
|
|
37
39
|
|
|
38
40
|
The full per-axis matrix layout lives at `references/templates/trace-template.md` and is the single source of truth. The artifact carries: a Forward Traceability matrix (FR → all downstream artifacts), a Reverse Traceability matrix (US, UC, AC, NFR, Entity, API, WF, SC, Task → FR), Coverage Gaps grouped by severity (Critical / High / Medium / Low per the principles thresholds), Coverage Statistics per artifact pair, and Recommended Actions sorted by severity.
|
package/skills/usecases/SKILL.md
CHANGED
|
@@ -41,6 +41,8 @@ Supplement with domain-specific questions and typical exceptional flows from the
|
|
|
41
41
|
|
|
42
42
|
## Generation
|
|
43
43
|
|
|
44
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
45
|
+
|
|
44
46
|
**File:** `04_usecases_{slug}.md`
|
|
45
47
|
|
|
46
48
|
The full per-UC field set lives at `references/templates/usecases-template.md` and is the single source of truth. Each UC carries: Goal in Context, Scope, Level, Primary Actor, Supporting Actors, Stakeholders & Interests, Pre-conditions, Trigger, Main Success Scenario (numbered table), Extensions / Alternative Flows, Exception Flows, Post-conditions (success guarantees + minimal guarantees), Source (linked US/FR), Linked WF, Linked AC. The artifact also carries a US → UC coverage matrix at the bottom.
|
|
@@ -41,6 +41,8 @@ Supplement with domain-specific questions and typical screens from the reference
|
|
|
41
41
|
|
|
42
42
|
## Generation
|
|
43
43
|
|
|
44
|
+
**Slug:** read the `**Slug:**` line from the managed block of `AGENTS.md` (project root, or `../AGENTS.md` if cwd is `output/`) and use it verbatim. See [`../references/slug-source.md`](../references/slug-source.md).
|
|
45
|
+
|
|
44
46
|
**File:** `09_wireframes_{slug}.md`
|
|
45
47
|
|
|
46
48
|
```markdown
|