@kudusov.takhir/ba-toolkit 3.1.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -11,6 +11,38 @@ Versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
11
11
 
12
12
  ---
13
13
 
14
+ ## [3.3.0] — 2026-04-09
15
+
16
+ ### Added
17
+
18
+ - **Three new domain references — EdTech, GovTech, AI / ML.** The shipped domain catalog grows from 9 to 12 first-class industries, in addition to the `custom` fallback. Each new file (`skills/references/domains/edtech.md`, `govtech.md`, `ai-ml.md`) follows the established 9-section structure (one section per pipeline interview-phase skill: `/brief`, `/srs`, `/stories`, `/usecases`, `/ac`, `/nfr`, `/datadict`, `/apicontract`, `/wireframes`) plus a domain-specific glossary, and matches the depth of the existing references (~250 lines each). New entries appear in the `DOMAINS` array in `bin/ba-toolkit.js`, the `currently:` enumeration in `skills/brief/SKILL.md` and `skills/srs/SKILL.md`, the brief artifact-template `Domain:` line, the README intro / domain-table / badge, and the canonical domain-order rule in `CLAUDE.md` §5. **EdTech** covers K-12 platforms, higher-ed tools, MOOC marketplaces, corporate L&D, language learning, exam prep, and micro-credential platforms — with FERPA / COPPA / GDPR-K / Section 508 / WCAG, LTI / SCORM / xAPI / OneRoster / Clever rostering, and cohort-management mechanics baked in. **GovTech** covers citizen-facing e-services, permits and licensing, tax filing, benefits, public records / FOIA, court e-filing, and 311 — with national-digital-ID brokering (Login.gov / BankID / ItsMe / eIDAS), FedRAMP / StateRAMP / FISMA / CJIS / IRS Pub 1075 / Section 508 / EN 301 549 / plain-language and records-retention obligations. **AI / ML** covers LLM-powered apps, RAG pipelines, agent frameworks, model-serving and inference, fine-tuning, evals, and embedded AI features — with prompt-injection defence, hallucination metrics, eval regressions, model fallback, EU AI Act / NIST AI RMF / ISO 42001 risk classification, cost / token quotas, and RAG / vector-store data modelling. Skills are auto-discovered, so no CLI registration changes are needed beyond the `DOMAINS` array entry.
19
+
20
+ ---
21
+
22
+ ## [3.2.0] — 2026-04-09
23
+
24
+ ### Highlights
25
+
26
+ - **New `/discovery` skill — concept brain-storm before `/brief`** for users who don't yet know what to build.
27
+ - **`ba-toolkit publish` CLI subcommand + `/publish` skill** — one-command Notion (Markdown) and Confluence (HTML) import-ready bundles, zero deps, zero tokens, zero network.
28
+
29
+ ### Added
30
+
31
+ - **New `ba-toolkit publish` CLI subcommand + `/publish` skill — Notion / Confluence bundle export.** Bundles every BA Toolkit artifact in the current `output/<slug>/` folder into import-ready files for two destinations: a clean Markdown bundle (`publish/notion/`) for Notion's bulk **Import → Markdown & CSV** dialog, and an HTML bundle with an `index.html` entry point (`publish/confluence/`) for Confluence's **Space settings → Content tools → Import → HTML** tool. **Zero API calls, zero tokens, zero network** — the conversion happens entirely on disk and the user does the upload manually using each tool's native importer. Cross-references between artifacts (`[FR-001](02_srs_<slug>.md#fr-001)`) are rewritten per target: Notion gets `./02_srs_<slug>.md#fr-001`, Confluence gets `02_srs_<slug>.html#fr-001`, and external HTTP/HTTPS links pass through unchanged. `AGENTS.md` (if present) is included as the first page in both bundles, with the `<!-- ba-toolkit:begin managed -->` block stripped so the management markers don't render as visible text. Surface: `ba-toolkit publish [--format notion|confluence|both] [--out PATH] [--dry-run]`. Default format is `both`, default output is `./publish/`. Comes with a thin `skills/publish/SKILL.md` discoverability layer that the AI agent invokes via the Bash tool when the user types `/publish` in any supported agent (Claude Code, Codex, Gemini, Cursor, Windsurf).
32
+ - **In-tree `markdownToHtml` helper in `bin/ba-toolkit.js`.** Pure function, ~190 lines, handles the bounded Markdown surface used by every shipped artifact template: ATX headings (with auto-generated GitHub-style anchor IDs), paragraphs, bold / italic / inline code with placeholder-based stashing so emphasis inside link labels and code spans round-trips correctly, links, single-level unordered and ordered lists, GFM tables with thead/tbody, fenced code blocks (language hint preserved), blockquotes, horizontal rules, and HTML special-character escaping. Out of scope by design: nested lists, images, footnotes, math, raw HTML pass-through. Exported alongside `htmlEscape`, `slugifyHeading`, `rewriteLinks`, `stripManagedBlock`, `compareArtifactFilenames`, and `ARTIFACT_FILE_RE` so the test suite can cover each piece in isolation.
33
+ - **23 new tests covering the publish flow.** 14 unit tests in `test/cli.test.js` for the converter and supporting helpers (one per supported Markdown element class plus link rewriting, managed-block stripping, the `7 < 7a < 8` filename sort, and the artifact-filename regex). 7 integration tests in `test/cli.integration.test.js` that spawn the real CLI against fixture markdown files inside a temp dir and assert the bundle layout, link rewriting in both modes, the Confluence `index.html` ordering, the AGENTS.md-as-first-page rule, the empty-directory error path, the invalid-format error path, and the `--dry-run` no-write contract. The skill-folder-count assertion bumps from `>= 22` to `>= 23` and the existing protocol-link / closing-message / Recommended-marker / 5-rows-cap regression tests auto-cover `skills/publish/SKILL.md`.
34
+
35
+ - **New `/discovery` skill — concept brain-storm before `/brief`.** For users who arrive with only a vague hunch and no fixed domain or feature list, `/discovery` runs a structured concept-discovery interview (problem space, target audience hypotheses, candidate domains, reference products, MVP feature ideas, differentiation angle, open validation questions) and writes a hypothesis document to `00_discovery_{slug}.md`. The artifact ends with a concrete recommendation (chosen domain, project name, slug, scope hint) that flows directly into `/brief` as inline context. Modeled on `/principles` (the only other optional pre-brief skill) — same workflow phases, same closing-message contract, same interview-protocol rules (5-row cap, Recommended marker, user-language variants). Lives at `skills/discovery/SKILL.md` with a matching artifact template at `skills/references/templates/discovery-template.md`. Pipeline lookup table in `closing-message.md` gains a new row `/discovery → /brief`. The `agents-template.md` Pipeline Status table inserts `/discovery` at stage `0` and demotes `/principles` to stage `0a` (mirror of how `/research` sits at stage `7a`) — `/brief` stays at stage `1`, no downstream renumbering, no risk of breaking existing AGENTS.md files for projects that already started. Skill is auto-discovered by the CLI from the `skills/` directory — no `bin/ba-toolkit.js` registration needed.
36
+ - **`/brief` consumes `00_discovery_*.md` if present.** `skills/brief/SKILL.md` Pipeline check phase now loads any existing discovery artifact, extracts the problem space, audience hypotheses, recommended domain, MVP feature hypotheses, and scope hint, and uses them to pre-fill the structured interview per protocol rule 9 — skipping any required topic the discovery already answered. The handoff is real, not a hint to copy-paste context manually.
37
+ - **`example/lumen-goods/00_discovery_lumen-goods.md`** — full concept-discovery walkthrough for the Lumen Goods example project. 8 sections matching the new template, length comparable to `00_principles_lumen-goods.md`. Keeps the lumen-goods example end-to-end consistent with the new pipeline entry point.
38
+
39
+ ### Changed
40
+
41
+ - **Skill count bumped from 22 to 23** in every place that enumerated skills: `package.json` description, `README.md` (badge, intro, install sections, utility table, minimum-viable-pipeline section), `COMMANDS.md` Utility skills table, `CLAUDE.md` §1 and §4, `docs/USAGE.md` (interview-phase skill list, time-estimate appendix, new "Sharing artifacts with stakeholders" section), `docs/FAQ.md` (new Q/A: "How do I share the artifacts with non-developer stakeholders?"), `bin/ba-toolkit.js` stale comment, `skills/references/templates/agents-template.md` Cross-cutting Tools table (new `/publish [format]` row), `skills/references/closing-message.md` Cross-cutting commands list, and the `test/cli.test.js` skill-folder-count assertion (raised from `>= 22` to `>= 23`).
42
+ - **Skill count bumped from 21 to 22** in every place that enumerated skills: `package.json` description, `README.md` (badge, intro, install sections, example table, pipeline table, minimum-viable-pipeline section now lists three paths instead of two), `COMMANDS.md`, `CLAUDE.md` §1 and §4, `docs/USAGE.md` (interview-phase skill list, AGENTS.md sample, time-estimate appendix), `docs/FAQ.md` (new Q/A: "What if I don't know what to build yet?"), `bin/ba-toolkit.js` two stale comments, and the `test/cli.test.js` skill-folder-count assertion (raised from `>= 20` with stale "~21" comment to `>= 22`).
43
+
44
+ ---
45
+
14
46
  ## [3.1.1] — 2026-04-09
15
47
 
16
48
  ### Changed
@@ -451,7 +483,9 @@ CI scripts that relied on the old behaviour (`init` creates files only, `install
451
483
 
452
484
  ---
453
485
 
454
- [Unreleased]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.1.1...HEAD
486
+ [Unreleased]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.3.0...HEAD
487
+ [3.3.0]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.2.0...v3.3.0
488
+ [3.2.0]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.1.1...v3.2.0
455
489
  [3.1.1]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.1.0...v3.1.1
456
490
  [3.1.0]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.0.0...v3.1.0
457
491
  [3.0.0]: https://github.com/TakhirKudusov/ba-toolkit/compare/v2.0.0...v3.0.0
package/COMMANDS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # BA Toolkit — Command Reference
2
2
 
3
- Quick reference for all 21 skills and subcommands.
3
+ Quick reference for all 23 skills and subcommands.
4
4
 
5
5
  ---
6
6
 
@@ -10,7 +10,8 @@ Run these in order. Each skill reads the output of all previous steps.
10
10
 
11
11
  | # | Command | Output file | What it generates |
12
12
  |:---:|---------|-------------|-------------------|
13
- | 0 | `/principles` | `00_principles_{slug}.md` | Project constitution: language, ID conventions, DoR, traceability rules, NFR baseline |
13
+ | 0 | `/discovery` | `00_discovery_{slug}.md` | Concept Discovery: problem space, audience hypotheses, candidate domains, MVP feature ideas, validation questions. Use when you don't yet know what to build — feeds the chosen domain, name, and scope hint into `/brief` |
14
+ | 0a | `/principles` | `00_principles_{slug}.md` | Project constitution: language, ID conventions, DoR, traceability rules, NFR baseline |
14
15
  | 1 | `/brief` | `01_brief_{slug}.md` | Project Brief: goals, audience, stakeholders, constraints, risks. Updates the `AGENTS.md` Pipeline Status table (which `ba-toolkit init` already created) |
15
16
  | 2 | `/srs` | `02_srs_{slug}.md` | Requirements Specification (IEEE 830): scope, FRs, constraints, assumptions |
16
17
  | 3 | `/stories` | `03_stories_{slug}.md` | User Stories grouped by Epics, with priority and FR references |
@@ -38,6 +39,7 @@ Available at any pipeline stage.
38
39
  | `/estimate` | `00_estimate_{slug}.md` | Effort estimation for User Stories: Fibonacci SP, T-shirt sizes, or person-days |
39
40
  | `/glossary` | `00_glossary_{slug}.md` | Unified project glossary: scans all artifacts, detects terminology drift, undefined terms |
40
41
  | `/export [format]` | `export_{slug}_{format}.json` / `.csv` | Export User Stories to Jira, GitHub Issues, Linear, or CSV |
42
+ | `/publish [format]` | `publish/notion/`, `publish/confluence/` | Bundle artifacts for Notion (Markdown bundle) and Confluence (HTML bundle) — drag-and-drop import, no API tokens. Wraps the `ba-toolkit publish` CLI subcommand |
41
43
  | `/risk` | `00_risks_{slug}.md` | Risk register: probability × impact matrix, mitigation and contingency per risk |
42
44
  | `/sprint` | `00_sprint_{slug}.md` | Sprint plan: stories grouped into sprints by velocity, capacity, and risk priority |
43
45
 
package/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  # 📋 BA Toolkit
4
4
 
5
- Structured BA pipeline for AI coding agents — brief to handoff, 21 skills, 9 domains.
5
+ Structured BA pipeline for AI coding agents — concept to handoff, 23 skills, 12 domains, one-command Notion + Confluence publish.
6
6
 
7
- <img src="https://img.shields.io/badge/skills-21-blue" alt="Skills">
8
- <img src="https://img.shields.io/badge/domains-9-green" alt="Domains">
7
+ <img src="https://img.shields.io/badge/skills-23-blue" alt="Skills">
8
+ <img src="https://img.shields.io/badge/domains-12-green" alt="Domains">
9
9
  <img src="https://img.shields.io/badge/format-Markdown-orange" alt="Format">
10
10
  <img src="https://img.shields.io/badge/language-auto--detect-purple" alt="Language">
11
11
  <img src="https://img.shields.io/badge/license-MIT-lightgrey" alt="License">
@@ -22,9 +22,9 @@ Structured BA pipeline for AI coding agents — brief to handoff, 21 skills, 9 d
22
22
 
23
23
  ## What is this
24
24
 
25
- BA Toolkit is a set of 21 interconnected skills that run a full business-analysis pipeline inside your AI coding agent. You go from a rough project brief to a development handoff package, and each skill reads the output of the previous ones — maintaining cross-references between artifacts along the chain `FR → US → UC → AC → NFR → Entity → ADR → API → WF → Scenario`.
25
+ BA Toolkit is a set of 23 interconnected skills that run a full business-analysis pipeline inside your AI coding agent. You can start as early as `/discovery` (a brain-storm step for users who don't yet know what to build) or jump straight to `/brief` if you already have a project in mind, then work all the way through to a development handoff package. Each skill reads the output of the previous ones — maintaining cross-references between artifacts along the chain `FR → US → UC → AC → NFR → Entity → ADR → API → WF → Scenario`. When you're ready to share with non-developer stakeholders, `/publish` (or `ba-toolkit publish`) bundles every artifact into import-ready folders for Notion and Confluence — drag-and-drop, no API tokens.
26
26
 
27
- Unlike one-shot prompting, every artifact is written to disk as Markdown, every ID links back to its source, and `/trace` verifies coverage across the whole pipeline. `/clarify` and `/analyze` catch ambiguities and quality gaps with CRITICAL/HIGH severity ratings. Domain references for 9 industries (SaaS, Fintech, E-commerce, Healthcare, Logistics, On-demand, Social/Media, Real Estate, iGaming) plug in automatically at `/brief`.
27
+ Unlike one-shot prompting, every artifact is written to disk as Markdown, every ID links back to its source, and `/trace` verifies coverage across the whole pipeline. `/clarify` and `/analyze` catch ambiguities and quality gaps with CRITICAL/HIGH severity ratings. Domain references for 12 industries (SaaS, Fintech, E-commerce, Healthcare, Logistics, On-demand, Social/Media, Real Estate, iGaming, EdTech, GovTech, AI/ML) plug in automatically at `/brief`.
28
28
 
29
29
  Artifacts are generated in whatever language you write in — ask in English, get English docs; ask in any other language, the output follows.
30
30
 
@@ -114,11 +114,11 @@ Reload the CLI after copying.
114
114
 
115
115
  ### Cursor
116
116
 
117
- Cursor has two separate features — Rules (`.cursor/rules/*.mdc`) and [Agent Skills](https://cursor.com/docs/skills) (`.cursor/skills/<skill>/SKILL.md`). BA Toolkit is a set of skills, not rules, so `ba-toolkit install --for cursor` drops the 21 skills directly into `.cursor/skills/` using the native folder-per-skill `SKILL.md` format — no conversion needed. Reload the Cursor window to pick them up.
117
+ Cursor has two separate features — Rules (`.cursor/rules/*.mdc`) and [Agent Skills](https://cursor.com/docs/skills) (`.cursor/skills/<skill>/SKILL.md`). BA Toolkit is a set of skills, not rules, so `ba-toolkit install --for cursor` drops the 23 skills directly into `.cursor/skills/` using the native folder-per-skill `SKILL.md` format — no conversion needed. Reload the Cursor window to pick them up.
118
118
 
119
119
  ### Windsurf
120
120
 
121
- Windsurf's [Agent Skills](https://docs.windsurf.com/windsurf/cascade/skills) feature loads skills from `.windsurf/skills/<skill>/SKILL.md`, the same folder-per-skill layout as Claude Code and Cursor. `ba-toolkit install --for windsurf` writes the 21 skills there natively. Reload the Windsurf window to pick them up.
121
+ Windsurf's [Agent Skills](https://docs.windsurf.com/windsurf/cascade/skills) feature loads skills from `.windsurf/skills/<skill>/SKILL.md`, the same folder-per-skill layout as Claude Code and Cursor. `ba-toolkit install --for windsurf` writes the 23 skills there natively. Reload the Windsurf window to pick them up.
122
122
 
123
123
  ### Aider
124
124
 
@@ -152,10 +152,11 @@ Your generated artifacts (`01_brief_*.md`, `02_srs_*.md`, …) are untouched by
152
152
 
153
153
  ## Example output
154
154
 
155
- A complete example project — **Lumen Goods** (sustainable home-goods D2C online store) — lives in [`example/lumen-goods/`](example/lumen-goods/). All 15 artifacts are realistic, cross-referenced, and generated by running the full BA Toolkit pipeline.
155
+ A complete example project — **Lumen Goods** (sustainable home-goods D2C online store) — lives in [`example/lumen-goods/`](example/lumen-goods/). All 16 artifacts are realistic, cross-referenced, and generated by running the full BA Toolkit pipeline.
156
156
 
157
157
  | Artifact | File |
158
158
  |---------|------|
159
+ | Concept Discovery | [`00_discovery_lumen-goods.md`](example/lumen-goods/00_discovery_lumen-goods.md) |
159
160
  | Project Principles | [`00_principles_lumen-goods.md`](example/lumen-goods/00_principles_lumen-goods.md) |
160
161
  | Project Brief | [`01_brief_lumen-goods.md`](example/lumen-goods/01_brief_lumen-goods.md) |
161
162
  | Requirements (SRS) | [`02_srs_lumen-goods.md`](example/lumen-goods/02_srs_lumen-goods.md) |
@@ -180,7 +181,8 @@ Full traceability: FR → US → UC → AC → NFR → Entity → ADR → API
180
181
 
181
182
  | # | Command | What it generates | Output file |
182
183
  |:---:|---------|-------------------|-------------|
183
- | 0 | `/principles` | Project Principleslanguage, ID conventions, DoR, traceability rules, NFR baseline | `00_principles_{slug}.md` |
184
+ | 0 | `/discovery` | Concept Discoveryproblem space, audience hypotheses, candidate domains, MVP feature ideas, validation questions | `00_discovery_{slug}.md` |
185
+ | 0a | `/principles` | Project Principles — language, ID conventions, DoR, traceability rules, NFR baseline | `00_principles_{slug}.md` |
184
186
  | 1 | `/brief` | Project Brief — goals, audience, stakeholders, risks | `01_brief_{slug}.md` |
185
187
  | 2 | `/srs` | Requirements Specification (IEEE 830) | `02_srs_{slug}.md` |
186
188
  | 3 | `/stories` | User Stories grouped by Epics | `03_stories_{slug}.md` |
@@ -199,6 +201,7 @@ Full traceability: FR → US → UC → AC → NFR → Entity → ADR → API
199
201
  | — | `/estimate` | Effort estimation — Fibonacci SP, T-shirt sizes, or person-days | `00_estimate_{slug}.md` |
200
202
  | — | `/glossary` | Unified project glossary with terminology drift detection | `00_glossary_{slug}.md` |
201
203
  | — | `/export [format]` | Export User Stories to Jira / GitHub Issues / Linear / CSV | `export_{slug}_{format}.json` / `.csv` |
204
+ | — | `/publish [format]` | Bundle artifacts for Notion (Markdown) and Confluence (HTML) — drag-and-drop import, no API tokens | `publish/notion/`, `publish/confluence/` |
202
205
  | — | `/risk` | Risk register — probability × impact matrix, mitigation per risk | `00_risks_{slug}.md` |
203
206
  | — | `/sprint` | Sprint plan — stories grouped by velocity and capacity with sprint goals | `00_sprint_{slug}.md` |
204
207
 
@@ -240,6 +243,9 @@ The pipeline is domain-agnostic by default. At `ba-toolkit init` you pick a doma
240
243
  | **Social / Media** | Social networks, creator platforms, community forums, newsletters, short-video |
241
244
  | **Real Estate** | Property portals, agency CRM, rental management, property management, mortgage tools |
242
245
  | **iGaming** | Online slots, sports betting, casino lobbies, Telegram Mini Apps, promo mechanics |
246
+ | **EdTech** | LMS, K-12, higher ed, MOOC, corporate L&D, language learning, exam prep |
247
+ | **GovTech** | Citizen e-services, permits, tax filing, benefits, public records, court e-filing |
248
+ | **AI / ML** | LLM apps, RAG pipelines, agents, model serving, fine-tuning, MLOps platforms |
243
249
  | **Custom** | Any other domain — works with general interview questions |
244
250
 
245
251
  Adding a new domain = creating one Markdown file in `skills/references/domains/`. See [docs/DOMAINS.md](docs/DOMAINS.md).
@@ -268,18 +274,23 @@ Every artifact links back to its predecessors, forming the chain `FR → US →
268
274
 
269
275
  ## Minimum viable pipeline
270
276
 
271
- Not every project needs all 21 skills. Two common paths:
277
+ Not every project needs all 23 skills. Three common paths:
272
278
 
273
- **Lean** (fastest path to handoff 9 steps):
279
+ **Concept-first** (when you don't yet know what to build):
280
+ ```
281
+ /discovery → /brief → /srs → /stories → /ac → /nfr → /datadict → /apicontract → /wireframes → /handoff
282
+ ```
283
+
284
+ **Lean** (fastest path to handoff when you already have a project in mind — 9 steps):
274
285
  ```
275
286
  /brief → /srs → /stories → /ac → /nfr → /datadict → /apicontract → /wireframes → /handoff
276
287
  ```
277
288
 
278
- **Full** (complete traceability and quality gates — 15 steps):
289
+ **Full** (complete traceability and quality gates — 16 steps):
279
290
  ```
280
- /principles → /brief → /srs → /stories → /usecases → /ac → /nfr → /datadict
281
- → /research → /apicontract → /wireframes → /scenarios
282
- → /trace → /analyze → /handoff
291
+ /discovery → /principles → /brief → /srs → /stories → /usecases → /ac → /nfr → /datadict
292
+ → /research → /apicontract → /wireframes → /scenarios
293
+ → /trace → /analyze → /handoff
283
294
  ```
284
295
 
285
296
  Use `/clarify` at any step to resolve ambiguities before moving on. Approximate time per step is in [docs/USAGE.md#appendix-time-estimates](docs/USAGE.md#appendix-time-estimates).