@kudusov.takhir/ba-toolkit 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/COMMANDS.md +69 -0
  3. package/LICENSE +21 -0
  4. package/README.md +842 -0
  5. package/README.ru.md +846 -0
  6. package/bin/ba-toolkit.js +468 -0
  7. package/package.json +49 -0
  8. package/skills/ac/SKILL.md +88 -0
  9. package/skills/analyze/SKILL.md +126 -0
  10. package/skills/apicontract/SKILL.md +113 -0
  11. package/skills/brief/SKILL.md +120 -0
  12. package/skills/clarify/SKILL.md +96 -0
  13. package/skills/datadict/SKILL.md +98 -0
  14. package/skills/estimate/SKILL.md +124 -0
  15. package/skills/export/SKILL.md +215 -0
  16. package/skills/glossary/SKILL.md +145 -0
  17. package/skills/handoff/SKILL.md +146 -0
  18. package/skills/nfr/SKILL.md +85 -0
  19. package/skills/principles/SKILL.md +182 -0
  20. package/skills/references/closing-message.md +33 -0
  21. package/skills/references/domains/ecommerce.md +209 -0
  22. package/skills/references/domains/fintech.md +180 -0
  23. package/skills/references/domains/healthcare.md +223 -0
  24. package/skills/references/domains/igaming.md +183 -0
  25. package/skills/references/domains/logistics.md +221 -0
  26. package/skills/references/domains/on-demand.md +231 -0
  27. package/skills/references/domains/real-estate.md +241 -0
  28. package/skills/references/domains/saas.md +185 -0
  29. package/skills/references/domains/social-media.md +234 -0
  30. package/skills/references/environment.md +57 -0
  31. package/skills/references/prerequisites.md +191 -0
  32. package/skills/references/templates/README.md +35 -0
  33. package/skills/references/templates/ac-template.md +58 -0
  34. package/skills/references/templates/analyze-template.md +65 -0
  35. package/skills/references/templates/apicontract-template.md +183 -0
  36. package/skills/references/templates/brief-template.md +51 -0
  37. package/skills/references/templates/datadict-template.md +75 -0
  38. package/skills/references/templates/export-template.md +112 -0
  39. package/skills/references/templates/handoff-template.md +102 -0
  40. package/skills/references/templates/nfr-template.md +97 -0
  41. package/skills/references/templates/principles-template.md +118 -0
  42. package/skills/references/templates/research-template.md +99 -0
  43. package/skills/references/templates/risk-template.md +188 -0
  44. package/skills/references/templates/scenarios-template.md +93 -0
  45. package/skills/references/templates/sprint-template.md +158 -0
  46. package/skills/references/templates/srs-template.md +90 -0
  47. package/skills/references/templates/stories-template.md +60 -0
  48. package/skills/references/templates/trace-template.md +59 -0
  49. package/skills/references/templates/usecases-template.md +51 -0
  50. package/skills/references/templates/wireframes-template.md +96 -0
  51. package/skills/research/SKILL.md +136 -0
  52. package/skills/risk/SKILL.md +163 -0
  53. package/skills/scenarios/SKILL.md +113 -0
  54. package/skills/sprint/SKILL.md +174 -0
  55. package/skills/srs/SKILL.md +124 -0
  56. package/skills/stories/SKILL.md +85 -0
  57. package/skills/trace/SKILL.md +85 -0
  58. package/skills/usecases/SKILL.md +91 -0
  59. package/skills/wireframes/SKILL.md +107 -0
@@ -0,0 +1,234 @@
1
+ # Domain Reference: Social / Media & Content Platforms
2
+
3
+ Domain-specific knowledge for social and media projects: social networks, content creator platforms, community forums, news and media platforms, newsletter tools, podcast directories, short-video apps, live streaming platforms, fan community products.
4
+
5
+ ---
6
+
7
+ ## 1. /brief — Project Brief
8
+
9
+ ### Domain-specific interview questions
10
+ - Platform type: social network (connections/friends), content creator platform (follow model), community forum (topic-based), news/media publisher, newsletter tool, short-video, podcast directory, live streaming?
11
+ - Content types: text posts, long-form articles, photos, short video, long video, audio, live streams, newsletters, polls?
12
+ - Monetisation: advertising, creator subscriptions, tipping/donations, paid communities, B2B SaaS (newsletter tool), data licensing?
13
+ - Moderation model: AI-first with human review, community reporting only, professional moderation team?
14
+ - Target audience scale: niche community (thousands), mid-scale (hundreds of thousands), or mass-market (millions)?
15
+
16
+ ### Typical business goals
17
+ - Grow DAU/MAU and session length.
18
+ - Increase content volume and creator retention (supply side).
19
+ - Drive monetisation: ad revenue, creator subscriptions, tipping.
20
+ - Build a safe, moderated environment to reduce churn.
21
+ - Enable content virality to reduce CAC through organic growth.
22
+
23
+ ### Typical risks
24
+ - Content moderation failures: harmful, illegal, or brand-unsafe content.
25
+ - Creator churn if monetisation or reach tools are insufficient.
26
+ - Algorithm changes reducing organic reach — creator backlash.
27
+ - Data privacy issues: GDPR, COPPA (if users may be under 13), data broker regulation.
28
+ - Platform dependency risk for creators — regulatory scrutiny if too dominant.
29
+ - Spam, bot accounts, and coordinated inauthentic behaviour.
30
+
31
+ ---
32
+
33
+ ## 2. /srs — Requirements Specification
34
+
35
+ ### Domain-specific interview questions
36
+ - Roles: casual consumer, active creator, community moderator, admin, advertiser, business account?
37
+ - Feed algorithm: chronological, ranked by engagement, interest-based recommendation, or hybrid?
38
+ - Creator tools: scheduling, analytics, monetisation dashboard, subscriber management?
39
+ - Moderation tools: automated content scoring, hash-matching for known illegal content, report queue, moderator actions?
40
+ - Notifications: push, email, in-app — granular per event type?
41
+ - Privacy settings: public profile, followers-only, private account?
42
+ - Age verification requirements?
43
+
44
+ ### Typical functional areas
45
+ - User registration and profile.
46
+ - Content creation (post, upload, scheduling).
47
+ - Feed and discovery (following feed, explore/trending, recommendations).
48
+ - Engagement (likes, reactions, comments, shares, saves, reposts).
49
+ - Following / subscription model.
50
+ - Notifications (in-app, push, email digests).
51
+ - Direct messaging (DMs).
52
+ - Search (users, hashtags, content).
53
+ - Moderation tools (report, review, action, appeal).
54
+ - Creator analytics (reach, impressions, engagement, follower growth).
55
+ - Monetisation (ads, subscriptions, tipping, paid posts).
56
+ - Admin panel (content queue, user management, platform analytics).
57
+
58
+ ---
59
+
60
+ ## 3. /stories — User Stories
61
+
62
+ ### Domain-specific interview questions
63
+ - Content creation flow: draft, preview, schedule, tag, publish — what steps are required?
64
+ - Discovery: how does a new user find accounts to follow at onboarding?
65
+ - Monetisation flows: how does a creator enable subscriptions? How does a consumer subscribe and pay?
66
+ - Moderation: what actions can a moderator take (warn, remove post, suspend account, ban)?
67
+
68
+ ### Typical epics
69
+ - Onboarding and Profile Setup.
70
+ - Content Creation and Publishing.
71
+ - Feed and Discovery.
72
+ - Engagement (Likes, Comments, Shares).
73
+ - Following and Subscriptions.
74
+ - Direct Messaging.
75
+ - Notifications.
76
+ - Search and Explore.
77
+ - Creator Analytics.
78
+ - Monetisation (Ads, Subscriptions, Tips).
79
+ - Content Moderation.
80
+ - Privacy and Safety Controls.
81
+ - Admin and Platform Management.
82
+
83
+ ---
84
+
85
+ ## 4. /usecases — Use Cases
86
+
87
+ ### Domain-specific interview questions
88
+ - Harmful content flow: who sees a reported post first — automated system or human moderator? What are the escalation levels?
89
+ - Copyright: what happens when a DMCA takedown is received?
90
+ - Account compromise: how does a user recover a hacked account?
91
+ - Creator going live: what happens if a live stream violates community guidelines mid-stream?
92
+
93
+ ### Typical exceptional flows
94
+ - Post flagged by automated moderation as potentially harmful — held for human review, creator notified.
95
+ - DMCA/copyright takedown request received — content removed within 24h, uploader notified, counter-notice process available.
96
+ - User reports a post — report queued for moderation, reporter anonymity preserved.
97
+ - Creator live stream flagged — stream paused, moderator review, resume or terminate.
98
+ - Account takeover detected (unusual login location/device) — session invalidated, email alert, identity challenge.
99
+ - Comment spam detected (bot pattern) — rate limiting applied, account flagged for review.
100
+ - Feed recommendation service unavailable — fallback to chronological feed.
101
+
102
+ ---
103
+
104
+ ## 5. /ac — Acceptance Criteria
105
+
106
+ ### Domain-specific interview questions
107
+ - Content moderation SLA: how quickly must a reported post be reviewed (for harassment, for illegal content, for copyright)?
108
+ - Feed latency: maximum acceptable time to load the first screen of feed content?
109
+ - Engagement consistency: what is the expected latency for a like/comment action to be reflected to the user?
110
+ - Push notification delivery SLA: what percentage of notifications must be delivered within N seconds?
111
+
112
+ ---
113
+
114
+ ## 6. /nfr — Non-functional Requirements
115
+
116
+ ### Domain-specific interview questions
117
+ - Media storage: where is user-uploaded media stored? CDN requirements for global delivery?
118
+ - Video transcoding: multiple resolutions (360p, 720p, 1080p)? Who provides transcoding (AWS Elemental, Mux, Cloudinary)?
119
+ - Scale: target MAU at launch, 6 months, 12 months?
120
+ - Content delivery: CDN for media — global or regional?
121
+
122
+ ### Mandatory NFR categories for Social / Media
123
+ - **Feed Performance:** First contentful paint of feed < 1.5s (desktop), < 2.5s (mobile). Feed API response < 200ms at the 95th percentile.
124
+ - **Media Delivery:** Images served via CDN with appropriate formats (WebP, AVIF). Video streams must start within 3s on standard connections. CDN cache-hit rate ≥ 90% for popular content.
125
+ - **Scalability:** System must handle viral content spikes (10× normal traffic on a single post) without degradation.
126
+ - **Content Moderation:** Known illegal content (CSAM, terrorist content) matched and removed automatically within 1 minute. General harmful content reported by users reviewed within 24 hours.
127
+ - **Privacy & Compliance:** GDPR-compliant data handling — consent for tracking, right to erasure, data portability. COPPA compliance if platform accessible to under-13s.
128
+ - **Availability:** Feed, post creation, and direct messaging: 99.9% SLA. Real-time features (live, DMs): 99.5%.
129
+ - **Notification Delivery:** Push notifications delivered to 95% of active devices within 30s of trigger.
130
+ - **Security:** All user-generated URLs must be sanitised. Media upload scanned for malware before serving. Rate limiting on all write endpoints.
131
+
132
+ ---
133
+
134
+ ## 7. /datadict — Data Dictionary
135
+
136
+ ### Domain-specific interview questions
137
+ - User vs. profile: is a user the auth entity and profile the public-facing entity (separate tables)?
138
+ - Feed generation: is feed pre-computed (fan-out on write) or computed on read?
139
+ - Engagement counters: are like/comment counts cached separately or computed on-the-fly?
140
+ - Soft delete: are posts soft-deleted (important for appeals), or hard-deleted?
141
+ - Content versioning: are edited posts versioned?
142
+
143
+ ### Mandatory entities for Social / Media
144
+ - **User** — auth record: email/phone, password hash, MFA settings, account status (active, suspended, banned).
145
+ - **Profile** — public identity: display name, username/handle, bio, avatar, verified badge, follower count, following count.
146
+ - **Post** — content item: type (text, image, video, link, poll, story), body, media references, visibility, status (draft, published, removed), publish timestamp.
147
+ - **Media** — uploaded asset: URL, CDN path, type (image, video, audio), dimensions, duration, transcoding status.
148
+ - **Comment** — reply to post or other comment: author, body, parent post/comment, status, like count.
149
+ - **Reaction / Like** — engagement event: user, target (post or comment), reaction type, timestamp.
150
+ - **Follow** — directed relationship: follower, followee, status (active, muted, blocked), created_at.
151
+ - **Notification** — in-app event: recipient, type (like, comment, new follower, mention, DM), read status, deep link.
152
+ - **DirectMessage** — private message: sender, conversation (DM thread), body, media, read status, sent_at.
153
+ - **Conversation** — DM thread: participants, last message, created_at.
154
+ - **Report** — content moderation report: reporter, target (post/comment/user), reason code, status, resolution.
155
+ - **ModerationAction** — moderator decision: target, action (warn, remove, suspend, ban), moderator, reason, timestamp.
156
+ - **Feed** — pre-computed feed entry (fan-out model): user, post, score, inserted_at.
157
+ - **Hashtag** — tag entity: name, post count, trending score.
158
+ - **CreatorAnalytics** — aggregated stats per creator per period: impressions, reach, engagement rate, follower change, top posts.
159
+ - **Subscription** _(paid model)_ — subscriber to creator: subscriber, creator, plan, amount, billing status.
160
+
161
+ ---
162
+
163
+ ## 8. /apicontract — API Contract
164
+
165
+ ### Domain-specific interview questions
166
+ - Real-time needs: live comments during streams, notification delivery, DM typing indicators — WebSocket or SSE?
167
+ - Media upload: direct upload to CDN/object storage (pre-signed URL pattern), or through the API?
168
+ - Feed API: infinite scroll with cursor pagination? Server-sent feed updates?
169
+
170
+ ### Typical endpoint groups
171
+ - **Auth** — register, login, refresh token, logout, password reset, MFA.
172
+ - **Profiles** — get profile, update profile, follow, unfollow, block, mute, followers list, following list.
173
+ - **Posts** — create, edit, delete, get detail, get comments, like, unlike, repost, bookmark.
174
+ - **Feed** — get home feed (following), get explore/trending, get creator's posts.
175
+ - **Comments** — add comment, delete comment, like comment, get thread.
176
+ - **Media** — get pre-signed upload URL, confirm upload, get transcoding status.
177
+ - **Search** — search users, search posts/hashtags.
178
+ - **Notifications** — get list, mark read, update preferences.
179
+ - **Direct Messages** — get conversations, get messages, send message, mark read (WebSocket channel).
180
+ - **Moderation** — submit report, get report status, moderator queue (admin), take action (admin).
181
+ - **Creator Analytics** — get analytics summary, get post performance, get follower demographics.
182
+ - **Monetisation** — get subscription plans, subscribe, get subscriber list, get earnings, process tip.
183
+ - **Admin** — user management, content queue, platform metrics.
184
+
185
+ ---
186
+
187
+ ## 9. /wireframes — Wireframe Descriptions
188
+
189
+ ### Domain-specific interview questions
190
+ - Core experience: feed-first or profile-first home screen?
191
+ - Navigation pattern: bottom tab bar (mobile), left sidebar (desktop), or both?
192
+ - Post creation: floating action button, dedicated create screen, or inline composer?
193
+ - Dark mode: required from day one or later iteration?
194
+
195
+ ### Typical screens
196
+ - **Home Feed** — post cards (author, content, engagement counts, actions), story bar (if applicable), infinite scroll.
197
+ - **Explore / Discover** — trending posts, trending hashtags, suggested creators, search bar.
198
+ - **Post Detail** — full post, comment thread, engagement actions, share options.
199
+ - **Create Post** — content composer (text, media upload, tag, location, schedule, visibility selector).
200
+ - **Profile Page** — avatar, bio, follower/following counts, follow button, post grid or list.
201
+ - **Notifications** — grouped notification list (today, this week), read/unread states.
202
+ - **Direct Messages — Inbox** — conversation list with last message preview, unread count.
203
+ - **Direct Messages — Thread** — message bubbles, media sharing, typing indicator.
204
+ - **Creator Studio / Analytics** — overview metrics, post performance table, follower chart, top content.
205
+ - **Moderation Queue** _(moderator)_ — reported content list, preview, action buttons.
206
+ - **Settings — Privacy** — account visibility, who can DM, block list, data export.
207
+ - **Subscriptions** _(paid model)_ — creator subscription page, subscriber-only content feed.
208
+
209
+ ---
210
+
211
+ ## Domain Glossary
212
+
213
+ | Term | Definition |
214
+ |------|-----------|
215
+ | DAU | Daily Active Users |
216
+ | MAU | Monthly Active Users |
217
+ | Engagement rate | (Likes + comments + shares) / impressions × 100% |
218
+ | Impressions | Number of times content was displayed (including repeats) |
219
+ | Reach | Number of unique accounts that saw content |
220
+ | UGC | User-Generated Content |
221
+ | Creator economy | Economic model where individuals monetise content and audiences directly |
222
+ | Fan-out on write | Feed architecture: new post written to each follower's feed at publish time |
223
+ | Fan-out on read | Feed architecture: feed assembled from followed accounts at request time |
224
+ | Viral coefficient | Average number of new users each existing user recruits |
225
+ | Shadowban | Limiting content visibility without notifying the user |
226
+ | Hashtag | Metadata tag (#keyword) enabling content discovery by topic |
227
+ | Story | Ephemeral content that disappears after 24 hours |
228
+ | Repost / Retweet | Sharing another user's post to one's own followers |
229
+ | CSAM | Child Sexual Abuse Material — illegal content requiring immediate removal |
230
+ | DMCA | Digital Millennium Copyright Act — US law governing online copyright takedowns |
231
+ | CDN | Content Delivery Network — distributed servers for fast media delivery |
232
+ | Transcoding | Converting uploaded video to multiple resolutions/formats for delivery |
233
+ | Chronological feed | Feed ordered by post time (newest first) without algorithmic ranking |
234
+ | Algorithmic feed | Feed ranked by predicted user interest score |
@@ -0,0 +1,57 @@
1
+ # Environment Detection
2
+
3
+ This file defines how skills determine the output directory. Each platform has its own conventions. Skills read this file at startup and apply the matching rule.
4
+
5
+ ## Platforms
6
+
7
+ ### Claude.ai (web / desktop)
8
+ - **Output directory:** `/mnt/user-data/outputs/`
9
+ - **File access:** uploads available at `/mnt/user-data/uploads/`
10
+
11
+ ### Claude Code CLI
12
+ - **Output directory:** current working directory or user-specified path.
13
+ - **File access:** full filesystem access.
14
+
15
+ ### OpenAI Codex CLI
16
+ - **Output directory:** current working directory.
17
+ - **File access:** project directory scope.
18
+
19
+ ### Gemini CLI
20
+ - **Output directory:** current working directory.
21
+ - **File access:** project directory scope.
22
+
23
+ ### Cursor / Windsurf / Aider / Other agents
24
+ - **Output directory:** current working directory or project root.
25
+ - **File access:** varies by platform; typically project-scoped.
26
+
27
+ ## Detection logic
28
+
29
+ 1. If `/mnt/user-data/outputs/` exists and is writable → Claude.ai environment. Save there.
30
+ 2. Otherwise → CLI or agent environment. Save to the current working directory or the path specified by the user.
31
+
32
+ Skills should not hardcode paths. They reference this file and apply the detection logic above.
33
+
34
+ ## Output folder structure (optional)
35
+
36
+ By default, all artifacts are saved flat in the output directory:
37
+
38
+ ```
39
+ output_dir/
40
+ 00_principles_dragon-fortune.md
41
+ 01_brief_dragon-fortune.md
42
+ 02_srs_dragon-fortune.md
43
+ ...
44
+ ```
45
+
46
+ If the user prefers a project-scoped subfolder (useful when managing multiple projects in the same directory), set `output_mode: subfolder` in `00_principles_{slug}.md` section 7. In this mode, all artifacts are saved under `output_dir/{slug}/`:
47
+
48
+ ```
49
+ output_dir/
50
+ dragon-fortune/
51
+ 00_principles_dragon-fortune.md
52
+ 01_brief_dragon-fortune.md
53
+ 02_srs_dragon-fortune.md
54
+ ...
55
+ ```
56
+
57
+ Skills check `00_principles_{slug}.md` for this setting. If principles do not exist or the setting is absent, the default (flat) layout is used.
@@ -0,0 +1,191 @@
1
+ # Pipeline Prerequisites
2
+
3
+ This file lists what must exist before each BA Toolkit skill can proceed. Skills check these prerequisites during context loading and warn the user if they are not met.
4
+
5
+ Prerequisites marked **Required** block execution — the skill should prompt the user to run the missing step first. Prerequisites marked **Recommended** allow execution with a warning.
6
+
7
+ ---
8
+
9
+ ## /principles (Step 0 — optional)
10
+
11
+ | Prerequisite | Status | Notes |
12
+ |-------------|--------|-------|
13
+ | None | — | Can be run at any time, even before /brief |
14
+
15
+ ---
16
+
17
+ ## /brief (Step 1)
18
+
19
+ | Prerequisite | Status | Notes |
20
+ |-------------|--------|-------|
21
+ | None | — | First required pipeline step |
22
+ | `00_principles_*.md` | Optional | If present, apply conventions |
23
+
24
+ ---
25
+
26
+ ## /srs (Step 2)
27
+
28
+ | Prerequisite | Status | Notes |
29
+ |-------------|--------|-------|
30
+ | `01_brief_*.md` | **Required** | Source of goals, domain, stakeholders, constraints |
31
+ | `00_principles_*.md` | Optional | If present, apply conventions |
32
+
33
+ ---
34
+
35
+ ## /stories (Step 3)
36
+
37
+ | Prerequisite | Status | Notes |
38
+ |-------------|--------|-------|
39
+ | `02_srs_*.md` | **Required** | Source of FR list, roles, priorities |
40
+ | `01_brief_*.md` | **Required** | Source of domain and slug |
41
+ | `00_principles_*.md` | Optional | |
42
+
43
+ ---
44
+
45
+ ## /usecases (Step 4)
46
+
47
+ | Prerequisite | Status | Notes |
48
+ |-------------|--------|-------|
49
+ | `03_stories_*.md` | **Required** | Source of US list and roles |
50
+ | `02_srs_*.md` | **Required** | Source of FR and business rules |
51
+ | `01_brief_*.md` | **Required** | Source of domain and slug |
52
+ | `00_principles_*.md` | Optional | |
53
+
54
+ ---
55
+
56
+ ## /ac (Step 5)
57
+
58
+ | Prerequisite | Status | Notes |
59
+ |-------------|--------|-------|
60
+ | `03_stories_*.md` | **Required** | Source of US list |
61
+ | `04_usecases_*.md` | Recommended | Needed for UC cross-references in AC |
62
+ | `02_srs_*.md` | **Required** | Source of business rules |
63
+ | `01_brief_*.md` | **Required** | Source of domain and slug |
64
+ | `00_principles_*.md` | Optional | |
65
+
66
+ ---
67
+
68
+ ## /nfr (Step 6)
69
+
70
+ | Prerequisite | Status | Notes |
71
+ |-------------|--------|-------|
72
+ | `02_srs_*.md` | **Required** | Source of integrations, roles, FR list |
73
+ | `01_brief_*.md` | **Required** | Source of domain, constraints, risks |
74
+ | `03_stories_*.md` | Recommended | Useful for linking NFR to specific stories |
75
+ | `00_principles_*.md` | Optional | Section 5 (NFR Baseline) defines mandatory categories |
76
+
77
+ ---
78
+
79
+ ## /datadict (Step 7)
80
+
81
+ | Prerequisite | Status | Notes |
82
+ |-------------|--------|-------|
83
+ | `02_srs_*.md` | **Required** | Source of entities mentioned in FR |
84
+ | `03_stories_*.md` | **Required** | Source of entities mentioned in US |
85
+ | `01_brief_*.md` | **Required** | Source of domain and slug |
86
+ | `00_principles_*.md` | Optional | Section 2 defines entity naming convention |
87
+
88
+ ---
89
+
90
+ ## /research (Step 7a — optional)
91
+
92
+ | Prerequisite | Status | Notes |
93
+ |-------------|--------|-------|
94
+ | `07_datadict_*.md` | **Required** | Entity model must be stable before tech decisions |
95
+ | `02_srs_*.md` | **Required** | Source of integrations and regulatory constraints |
96
+ | `01_brief_*.md` | **Required** | Source of domain, constraints, slug |
97
+ | `06_nfr_*.md` | Recommended | NFR drives many architecture decisions |
98
+ | `00_principles_*.md` | Optional | |
99
+
100
+ ---
101
+
102
+ ## /apicontract (Step 8)
103
+
104
+ | Prerequisite | Status | Notes |
105
+ |-------------|--------|-------|
106
+ | `07_datadict_*.md` | **Required** | API schemas must be consistent with the data model |
107
+ | `02_srs_*.md` | **Required** | Source of FR with interface requirements |
108
+ | `03_stories_*.md` | **Required** | Source of US for endpoint linking |
109
+ | `07a_research_*.md` | Recommended | ADRs inform protocol, auth, and versioning choices |
110
+ | `00_principles_*.md` | Optional | |
111
+
112
+ ---
113
+
114
+ ## /wireframes (Step 9)
115
+
116
+ | Prerequisite | Status | Notes |
117
+ |-------------|--------|-------|
118
+ | `03_stories_*.md` | **Required** | Source of US for screen linking |
119
+ | `02_srs_*.md` | **Required** | Source of roles, interface requirements |
120
+ | `01_brief_*.md` | **Required** | Source of domain, platform, slug |
121
+ | `08_apicontract_*.md` | Recommended | Enables API endpoint links in wireframe elements |
122
+ | `00_principles_*.md` | Optional | |
123
+
124
+ ---
125
+
126
+ ## /scenarios (Step 10 — optional)
127
+
128
+ | Prerequisite | Status | Notes |
129
+ |-------------|--------|-------|
130
+ | `03_stories_*.md` | **Required** | Source of US and personas |
131
+ | `05_ac_*.md` | **Required** | AC referenced in each scenario step |
132
+ | `09_wireframes_*.md` | Recommended | Needed to link WF screens to scenario steps |
133
+ | `08_apicontract_*.md` | Recommended | Needed to link API calls to scenario steps |
134
+ | `00_principles_*.md` | Optional | |
135
+
136
+ ---
137
+
138
+ ## /handoff (Step 11 — optional)
139
+
140
+ | Prerequisite | Status | Notes |
141
+ |-------------|--------|-------|
142
+ | `01_brief_*.md` | **Required** | Minimum viable context |
143
+ | `02_srs_*.md` | **Required** | FR inventory for MVP scope |
144
+ | `03_stories_*.md` | Recommended | US for MVP scope table |
145
+ | `00_trace_*.md` | Recommended | Use existing coverage stats if available |
146
+ | `00_analyze_*.md` | Recommended | Import open findings if available |
147
+ | `00_principles_*.md` | Optional | |
148
+
149
+ ---
150
+
151
+ ## /trace (Cross-cutting)
152
+
153
+ | Prerequisite | Status | Notes |
154
+ |-------------|--------|-------|
155
+ | `02_srs_*.md` | **Required** | Minimum for FR → US matrix |
156
+ | `03_stories_*.md` | **Required** | Minimum for FR → US matrix |
157
+ | `00_principles_*.md` | Optional | Section 3 defines CRITICAL/HIGH/MEDIUM severity thresholds |
158
+
159
+ ---
160
+
161
+ ## /clarify (Cross-cutting)
162
+
163
+ | Prerequisite | Status | Notes |
164
+ |-------------|--------|-------|
165
+ | At least one pipeline artifact | **Required** | Target artifact must exist |
166
+ | `00_principles_*.md` | Optional | Section 4 (DoR) used to identify missing mandatory fields |
167
+
168
+ ---
169
+
170
+ ## /analyze (Cross-cutting)
171
+
172
+ | Prerequisite | Status | Notes |
173
+ |-------------|--------|-------|
174
+ | `02_srs_*.md` | **Required** | Minimum for meaningful analysis |
175
+ | `00_principles_*.md` | Optional | Sections 3–6 used to calibrate severity thresholds |
176
+
177
+ ---
178
+
179
+ ## Quick reference: minimum viable pipeline
180
+
181
+ To reach a development-ready handoff with the smallest number of steps:
182
+
183
+ ```
184
+ /brief → /srs → /stories → /ac → /nfr → /datadict → /apicontract → /wireframes → /handoff
185
+ ```
186
+
187
+ To reach a fully traced, quality-checked handoff:
188
+
189
+ ```
190
+ /principles → /brief → /srs → /stories → /usecases → /ac → /nfr → /datadict → /research → /apicontract → /wireframes → /scenarios → /trace → /analyze → /handoff
191
+ ```
@@ -0,0 +1,35 @@
1
+ # Artifact Templates
2
+
3
+ This directory contains base templates for BA Toolkit artifacts. Templates use `[TOKEN]` placeholders in `UPPER_CASE` brackets.
4
+
5
+ Skills use these templates as the structural baseline when generating artifacts. They do not load templates directly — the token patterns are embedded in each skill's generation instructions. This directory serves as a **reference** for the expected structure of each artifact.
6
+
7
+ ## Available templates
8
+
9
+ | Template | Artifact file | Used by |
10
+ |----------|--------------|---------|
11
+ | `principles-template.md` | `00_principles_{slug}.md` | `/principles` |
12
+ | `brief-template.md` | `01_brief_{slug}.md` | `/brief` |
13
+ | `srs-template.md` | `02_srs_{slug}.md` | `/srs` |
14
+ | `stories-template.md` | `03_stories_{slug}.md` | `/stories` |
15
+ | `usecases-template.md` | `04_usecases_{slug}.md` | `/usecases` |
16
+ | `ac-template.md` | `05_ac_{slug}.md` | `/ac` |
17
+ | `nfr-template.md` | `06_nfr_{slug}.md` | `/nfr` |
18
+ | `datadict-template.md` | `07_datadict_{slug}.md` | `/datadict` |
19
+ | `research-template.md` | `07a_research_{slug}.md` | `/research` |
20
+ | `apicontract-template.md` | `08_apicontract_{slug}.md` | `/apicontract` |
21
+ | `wireframes-template.md` | `09_wireframes_{slug}.md` | `/wireframes` |
22
+ | `scenarios-template.md` | `10_scenarios_{slug}.md` | `/scenarios` |
23
+ | `trace-template.md` | _(inline in chat)_ | `/trace` |
24
+ | `analyze-template.md` | `00_analyze_{slug}.md` | `/analyze` |
25
+ | `handoff-template.md` | `11_handoff_{slug}.md` | `/handoff` |
26
+ | `risk-template.md` | `00_risks_{slug}.md` | `/risk` |
27
+ | `sprint-template.md` | `00_sprint_{slug}.md` | `/sprint` |
28
+
29
+ All templates use `[TOKEN]` placeholders in `UPPER_CASE` brackets for all variable content.
30
+
31
+ ## Adding a new template
32
+
33
+ 1. Create `{artifact}-template.md` in this directory.
34
+ 2. Use `[TOKEN_NAME]` placeholders for all variable content.
35
+ 3. Reference the token list in the skill's `## Generation` section.
@@ -0,0 +1,58 @@
1
+ # Acceptance Criteria: [PROJECT_NAME]
2
+
3
+ **Domain:** [DOMAIN]
4
+ **Date:** [DATE]
5
+ **Slug:** [SLUG]
6
+ **References:** `03_stories_[SLUG].md`, `04_usecases_[SLUG].md`
7
+
8
+ ---
9
+
10
+ ## US-001: [Story Title]
11
+
12
+ > As a [role], I want to [action], so that [benefit].
13
+
14
+ ### Scenario 1: [Happy path name]
15
+
16
+ **Given** [precondition]
17
+ **When** [action]
18
+ **Then** [expected result]
19
+
20
+ ### Scenario 2: [Alternative or edge case name]
21
+
22
+ **Given** [precondition]
23
+ **When** [action]
24
+ **Then** [expected result]
25
+
26
+ ### Scenario 3: [Negative / error case name]
27
+
28
+ **Given** [precondition]
29
+ **When** [action]
30
+ **Then** [expected result]
31
+
32
+ **Definition of Done:**
33
+ - [ ] All scenarios above pass
34
+ - [ ] Edge case [X] handled
35
+ - [ ] UI matches wireframe WF-[NNN]
36
+
37
+ ---
38
+
39
+ ## US-002: [Story Title]
40
+
41
+ > As a [role], I want to [action], so that [benefit].
42
+
43
+ ### Scenario 1: [Happy path name]
44
+
45
+ **Given** [precondition]
46
+ **When** [action]
47
+ **Then** [expected result]
48
+
49
+ ### Scenario 2: [Negative case name]
50
+
51
+ **Given** [precondition]
52
+ **When** [action]
53
+ **Then** [expected result]
54
+
55
+ **Definition of Done:**
56
+ - [ ] All scenarios above pass
57
+
58
+ <!-- Repeat AC block for each User Story. Each US-NNN section mirrors the stories artifact. -->
@@ -0,0 +1,65 @@
1
+ # Quality Analysis Report: [PROJECT_NAME]
2
+
3
+ **Domain:** [DOMAIN]
4
+ **Date:** [DATE]
5
+ **Slug:** [SLUG]
6
+ **Artifacts Analysed:** [List of artifact files included in this analysis]
7
+
8
+ ---
9
+
10
+ ## Finding Summary
11
+
12
+ | Severity | Count |
13
+ |---------|-------|
14
+ | 🔴 Critical | [N] |
15
+ | 🟠 High | [N] |
16
+ | 🟡 Medium | [N] |
17
+ | 🟢 Low | [N] |
18
+ | **Total** | **[N]** |
19
+
20
+ ---
21
+
22
+ ## Findings
23
+
24
+ | # | Severity | Category | Location | Description | Recommendation |
25
+ |---|---------|---------|---------|-------------|---------------|
26
+ | 1 | 🔴 Critical | [Duplication \| Ambiguity \| Coverage Gap \| Terminology Drift \| Invalid Reference] | [Artifact + section] | [What the issue is] | [How to fix it] |
27
+ | 2 | 🟠 High | [Category] | [Location] | [Description] | [Recommendation] |
28
+ | 3 | 🟡 Medium | [Category] | [Location] | [Description] | [Recommendation] |
29
+ | 4 | 🟢 Low | [Category] | [Location] | [Description] | [Recommendation] |
30
+
31
+ ### Finding Categories
32
+
33
+ - **Duplication** — same requirement, entity, or AC scenario defined in more than one artifact.
34
+ - **Ambiguity** — undefined terms, metrics-free adjectives ("fast", "user-friendly"), or unclear actors.
35
+ - **Coverage Gap** — FR with no US, US with no AC, or endpoint with no FR reference.
36
+ - **Terminology Drift** — same concept called different names across artifacts (e.g. "user" vs "customer" vs "account").
37
+ - **Invalid Reference** — cross-reference points to an ID that does not exist in the linked artifact.
38
+
39
+ ---
40
+
41
+ ## Coverage Summary
42
+
43
+ | Link | Coverage |
44
+ |------|---------|
45
+ | FR → US | [N] / [Total] FR covered |
46
+ | US → AC | [N] / [Total] US with AC |
47
+ | FR → NFR | [N] / [Total] FR with NFR reference |
48
+ | FR → API | [N] / [Total] FR with API endpoint |
49
+ | US → WF | [N] / [Total] US with wireframe |
50
+
51
+ ---
52
+
53
+ ## Priority Actions
54
+
55
+ 1. **[Action]** — addresses finding #[N] ([severity]). Estimated effort: [low / medium / high].
56
+ 2. **[Action]** — addresses findings #[N], #[N]. Estimated effort: [low / medium / high].
57
+ 3. **[Action]** — addresses finding #[N]. Estimated effort: [low / medium / high].
58
+
59
+ ---
60
+
61
+ ## Next Steps
62
+
63
+ - Run `/clarify [focus]` on artifacts with ambiguity findings.
64
+ - Run `/trace` to rebuild the traceability matrix after gaps are resolved.
65
+ - Re-run `/analyze` after fixes to verify resolution.