@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,182 @@
1
+ ---
2
+ name: ba-principles
3
+ description: >
4
+ Define project-level principles that govern the entire BA Toolkit pipeline: artifact language, ID conventions, traceability requirements, Definition of Ready per artifact type, mandatory NFR categories, and quality gates. Use on /principles command, or when the user asks to "set project standards", "define conventions", "establish principles", "set up pipeline rules", "configure traceability requirements", "define definition of ready". Optional step — run before /brief or immediately after it. All subsequent skills load and apply these principles automatically.
5
+ ---
6
+
7
+ # /principles — Project Principles
8
+
9
+ Optional first step of the BA Toolkit pipeline. Defines project-level conventions used by all subsequent skills to generate, validate, and analyze artifacts. If this step is skipped, all skills use built-in defaults.
10
+
11
+ The generated file acts as the project's analytical constitution: a single source of truth for what "correct" and "complete" means across the pipeline.
12
+
13
+ ## Workflow
14
+
15
+ ### 1. Environment detection
16
+
17
+ Read `references/environment.md` from the `ba-toolkit` directory to determine the output directory. If unavailable, apply the default rule: if `/mnt/user-data/outputs/` exists and is writable, save there (Claude.ai); otherwise save to the current working directory.
18
+
19
+ ### 2. Pipeline check
20
+
21
+ If `00_principles_*.md` already exists, load it and offer to:
22
+ - View current principles.
23
+ - Amend a specific section (`/revise [section]`).
24
+ - Regenerate from scratch.
25
+
26
+ If `01_brief_*.md` already exists, extract the slug and domain from it. Otherwise, ask the user for the project name (to derive the slug) and domain.
27
+
28
+ ### 3. Interview
29
+
30
+ 1–2 rounds, 3–5 questions each. Do not ask about topics the user can accept as defaults.
31
+
32
+ **Required topics:**
33
+ 1. Artifact language — which language should all artifacts be generated in? (default: the language of the user's first message)
34
+ 2. Traceability strictness — should every Must-priority US require a Use Case, or only US with complex flows? (default: only complex flows)
35
+ 3. NFR baseline — which additional NFR categories are always required beyond the domain defaults? (e.g., GDPR compliance, WCAG accessibility)
36
+ 4. Definition of Ready — any project-specific acceptance criteria for finalizing an artifact? (e.g., stakeholder sign-off, specific review steps)
37
+ 5. Quality gate — at what severity level should `/analyze` findings block `/done`? (default: CRITICAL only)
38
+ 6. Output folder structure — save all artifacts flat in the output directory (default), or inside a `{slug}/` subfolder? (useful when managing multiple projects side by side)
39
+
40
+ ### 4. Generation
41
+
42
+ **File:** `00_principles_{slug}.md`
43
+
44
+ ```markdown
45
+ # Project Principles: {Project Name}
46
+
47
+ **Version:** 1.0
48
+ **Date:** {date}
49
+ **Domain:** {domain}
50
+
51
+ ## 1. Artifact Language
52
+
53
+ All artifacts are generated in: {language}
54
+
55
+ ## 2. ID Conventions
56
+
57
+ | Artifact | Format | Example |
58
+ |----------|--------|---------|
59
+ | Functional Requirements | FR-NNN | FR-001 |
60
+ | User Stories | US-NNN | US-001 |
61
+ | Use Cases | UC-NNN | UC-001 |
62
+ | Acceptance Criteria | AC-NNN-NN | AC-001-01 |
63
+ | Non-functional Requirements | NFR-NNN | NFR-001 |
64
+ | Data Entities | PascalCase (English) | UserAccount |
65
+ | API Endpoints | REST path | POST /users |
66
+ | Wireframes | WF-NNN | WF-001 |
67
+
68
+ ## 3. Traceability Requirements
69
+
70
+ Mandatory links — violations flagged as **CRITICAL** by `/analyze` and `/trace`:
71
+
72
+ - Every FR must have at least one linked US (after `/stories`).
73
+ - Every Must-priority US must have at least one AC (after `/ac`).
74
+ - Every NFR must have a measurable metric.
75
+ - Every WF must link to at least one US.
76
+
77
+ Recommended links — violations flagged as **HIGH**:
78
+
79
+ - Must-priority US should have a linked UC (or documented exception).
80
+ - Every Data Entity should link to at least one FR or US.
81
+ - Every API endpoint should link to at least one FR or US.
82
+
83
+ Optional links — violations flagged as **MEDIUM**:
84
+
85
+ - Should-priority US may skip UC.
86
+ - Could/Won't items may be undocumented in later artifacts.
87
+
88
+ ## 4. Definition of Ready
89
+
90
+ An artifact is ready to `/done` when all of the following are true:
91
+
92
+ ### Functional Requirement (FR)
93
+ - [ ] Description present and unambiguous.
94
+ - [ ] Actor identified (not "the system" or "the user" without role).
95
+ - [ ] Priority assigned (MoSCoW).
96
+ - [ ] Input/Output specified.
97
+
98
+ ### User Story (US)
99
+ - [ ] Role, Action, and Value filled.
100
+ - [ ] Priority assigned.
101
+ - [ ] Linked FR reference present.
102
+
103
+ ### Use Case (UC)
104
+ - [ ] Actor, Preconditions, Main Flow, and at least one Exceptional Flow present.
105
+ - [ ] Linked US reference present.
106
+
107
+ ### Acceptance Criterion (AC)
108
+ - [ ] Given / When / Then all present and specific.
109
+ - [ ] Type specified (positive / negative / boundary).
110
+ - [ ] Linked US reference present.
111
+
112
+ ### NFR
113
+ - [ ] Category specified.
114
+ - [ ] Measurable metric present (numeric target, not adjective).
115
+ - [ ] Verification method specified.
116
+
117
+ ### Data Entity
118
+ - [ ] All attributes have types and constraints.
119
+ - [ ] FK references point to existing entities.
120
+
121
+ ### API Endpoint
122
+ - [ ] Request and Response schemas present.
123
+ - [ ] At least one error code documented.
124
+ - [ ] Linked FR/US present.
125
+
126
+ ### Wireframe (WF)
127
+ - [ ] All four states present: default, loading, empty, error.
128
+ - [ ] Navigation links (from / to) specified.
129
+ - [ ] Linked US present.
130
+
131
+ ## 5. NFR Baseline
132
+
133
+ The following NFR categories are required regardless of domain. They must appear in `06_nfr_{slug}.md`:
134
+
135
+ - **Security:** authentication method, data encryption at rest and in transit.
136
+ - **Availability:** uptime SLA with a numeric target.
137
+ - **Compliance:** applicable laws and data retention policy.
138
+
139
+ {additional_categories_if_specified}
140
+
141
+ ## 6. Quality Gates
142
+
143
+ For `/analyze` findings — action required before `/done` at the current step:
144
+
145
+ - **CRITICAL:** must be resolved. `/done` is blocked.
146
+ - **HIGH:** {block | warn only} — {project decision}.
147
+ - **MEDIUM:** documented and may be deferred.
148
+ - **LOW:** informational only.
149
+
150
+ ## 7. Output Folder Structure
151
+
152
+ **Mode:** {flat | subfolder}
153
+
154
+ _(flat = all artifacts in the output directory root; subfolder = all artifacts under `{output_dir}/{slug}/`)_
155
+
156
+ ## 8. Project-Specific Notes
157
+
158
+ {any_additional_conventions_from_interview}
159
+ ```
160
+
161
+ ### 5. Iterative refinement
162
+
163
+ - `/revise [section]` — rewrite a section.
164
+ - `/expand [section]` — add detail.
165
+
166
+ ### 6. Closing message
167
+
168
+ After saving the artifact, present the following summary to the user (see `references/closing-message.md` for format):
169
+
170
+ - Saved file path.
171
+ - Language confirmed for all artifacts.
172
+ - Traceability strictness level set.
173
+ - Quality gate threshold confirmed (which severity blocks `/done`).
174
+ - NFR baseline categories listed.
175
+
176
+ Available commands: `/revise [section]` · `/expand [section]`
177
+
178
+ Next step: `/brief` (if not yet started) or continue from where the pipeline left off — all skills now load `00_principles_{slug}.md` automatically.
179
+
180
+ ## Style
181
+
182
+ Formal, neutral. No emoji, slang. The principles file itself is generated in the artifact language defined in section 1. Section headings and table column headers remain in that language.
@@ -0,0 +1,33 @@
1
+ # Closing Message Template
2
+
3
+ After saving an artifact, every BA Toolkit skill presents a short summary block to the user in the chat (not inside the saved file). This ensures a consistent pipeline experience across all steps.
4
+
5
+ ## Format
6
+
7
+ Present the block in the same language as the artifact.
8
+
9
+ ```
10
+ Artifact saved: `{file_path}`
11
+
12
+ {Brief summary — 2–4 sentences or bullets covering:
13
+ total count of key elements generated (e.g., "18 FRs across 3 roles"),
14
+ main decisions captured during the interview,
15
+ any back-references updated in prior artifacts.}
16
+
17
+ Available commands:
18
+ /clarify [focus] — targeted ambiguity pass: vague terms, missing metrics, conflicting rules
19
+ /revise [section] — rewrite a section with your feedback
20
+ /expand [section] — add more detail to a section
21
+ /validate — check completeness and cross-artifact consistency
22
+ /done — finalize this artifact
23
+
24
+ Next step: /{next_command}
25
+ ```
26
+
27
+ ## Rules
28
+
29
+ - `{file_path}` is the full path where the artifact was saved.
30
+ - The summary is generated dynamically — do not repeat boilerplate; mention actual numbers and decisions.
31
+ - The "Next step" line is omitted for cross-cutting commands (/trace, /clarify, /analyze) that do not advance the pipeline.
32
+ - For `/wireframes` (last pipeline step), replace "Next step" with: `Pipeline complete. Run /trace to check full coverage.`
33
+ - The block is a chat message, not part of the saved Markdown file.
@@ -0,0 +1,209 @@
1
+ # Domain Reference: E-commerce
2
+
3
+ Domain-specific knowledge for e-commerce projects: B2C online stores, B2B catalogs, multi-vendor marketplaces, D2C brands, subscription box services, digital goods platforms.
4
+
5
+ ---
6
+
7
+ ## 1. /brief — Project Brief
8
+
9
+ ### Domain-specific interview questions
10
+ - Product type: B2C store, B2B catalog, multi-vendor marketplace, D2C brand, subscription service, digital goods?
11
+ - Catalog scale: number of SKUs, product variants, categories?
12
+ - Fulfillment model: own warehouse, dropshipping, third-party fulfillment (3PL), seller-ships?
13
+ - Monetization: product sales margin, seller commission (marketplace), subscription fee, advertising?
14
+ - Existing systems to integrate or replace: ERP, PIM, WMS, accounting?
15
+
16
+ ### Typical business goals
17
+ - Increase online revenue and GMV (Gross Merchandise Value).
18
+ - Reduce cart abandonment rate.
19
+ - Grow repeat purchase rate and customer LTV.
20
+ - Expand to new markets or channels (mobile app, social commerce).
21
+ - Automate order processing and reduce operational costs.
22
+
23
+ ### Typical risks
24
+ - High cart abandonment at checkout.
25
+ - Inventory sync failures across channels.
26
+ - Payment processing downtime during peak sales events.
27
+ - Seller fraud or counterfeit products (marketplace).
28
+ - Regulatory requirements: consumer protection laws, VAT/tax compliance by geography.
29
+
30
+ ---
31
+
32
+ ## 2. /srs — Requirements Specification
33
+
34
+ ### Domain-specific interview questions
35
+ - Roles: guest shopper, registered customer, seller/vendor (if marketplace), warehouse operator, admin, support agent, marketing manager?
36
+ - Payment methods: card (Stripe, Braintree), PayPal, BNPL (Klarna, Afterpay), crypto, local methods?
37
+ - Shipping: own couriers, third-party carriers (FedEx, UPS, DHL), real-time shipping rates?
38
+ - Inventory management: single warehouse, multi-warehouse, real-time stock reservation?
39
+ - Promotions: discount codes, bundle pricing, flash sales, loyalty points, gift cards?
40
+ - Multi-currency and multi-language support?
41
+ - Tax calculation: VAT by country, US sales tax, tax-exempt B2B customers?
42
+
43
+ ### Typical functional areas
44
+ - Product catalog (browsing, search, filtering, sorting).
45
+ - Product detail page (images, variants, stock status, reviews).
46
+ - Cart and wishlist.
47
+ - Checkout (address, shipping method, payment, order summary).
48
+ - Order management (tracking, history, cancellation, returns/refunds).
49
+ - Seller portal (marketplace): product listing, order management, payouts.
50
+ - Admin panel: catalog management, order processing, customer management, promotions, reports.
51
+ - Customer account: profile, address book, order history, loyalty points.
52
+
53
+ ---
54
+
55
+ ## 3. /stories — User Stories
56
+
57
+ ### Domain-specific interview questions
58
+ - Critical flows: product search, add to cart, guest checkout vs. registered checkout?
59
+ - Edge cases: out-of-stock during checkout, payment failure, partial shipment, return request?
60
+ - Personas: one-time buyer, returning customer, B2B bulk buyer, marketplace seller?
61
+
62
+ ### Typical epics
63
+ - Product Discovery (search, browse, filter, recommendations).
64
+ - Cart and Wishlist.
65
+ - Checkout and Payment.
66
+ - Order Management and Tracking.
67
+ - Returns and Refunds.
68
+ - Customer Account.
69
+ - Seller Portal (marketplace).
70
+ - Promotions and Loyalty.
71
+ - Admin and Reporting.
72
+
73
+ ---
74
+
75
+ ## 4. /usecases — Use Cases
76
+
77
+ ### Domain-specific interview questions
78
+ - Critical alternative flows: item goes out of stock during checkout, payment declined, address validation fails, coupon code invalid?
79
+ - External system actors: payment gateway, shipping carrier API, tax calculation service, fraud detection service?
80
+
81
+ ### Typical exceptional flows
82
+ - Payment gateway timeout — retry or alternative payment method offered.
83
+ - Item out of stock after cart reservation — notification and substitution or removal.
84
+ - Shipping carrier API unavailable — fallback to flat-rate shipping estimate.
85
+ - Fraud detection flag — order held for manual review.
86
+ - Return request after return window closed — escalate to support.
87
+
88
+ ---
89
+
90
+ ## 5. /ac — Acceptance Criteria
91
+
92
+ ### Domain-specific interview questions
93
+ - Inventory reservation: when is stock reserved — on add to cart, on checkout start, or on payment confirmation?
94
+ - Return policy: return window (days), restocking fee, refund method (original payment, store credit)?
95
+ - Partial fulfillment: can an order ship in multiple parcels? Is partial refund supported?
96
+ - Price rules: are prices inclusive or exclusive of tax? Flash sale price — when does it expire?
97
+ - Cart behaviour: does the cart persist across sessions? Across devices?
98
+
99
+ ---
100
+
101
+ ## 6. /nfr — Non-functional Requirements
102
+
103
+ ### Domain-specific interview questions
104
+ - Peak load: expected traffic during flash sales, Black Friday, seasonal peaks (CCU, RPS)?
105
+ - Page performance: target Core Web Vitals — LCP, FID, CLS?
106
+ - PCI DSS compliance level required (depends on payment handling model)?
107
+ - Search: full-text search with typo tolerance, faceted filtering — Elasticsearch, Algolia, or native DB?
108
+
109
+ ### Mandatory NFR categories for E-commerce
110
+ - **Performance:** Product listing page load < 2s (LCP). Search results < 500ms. Checkout page < 1.5s. Cart update < 300ms.
111
+ - **Scalability:** System must handle 10× normal traffic during peak sales events without degradation.
112
+ - **Security:** PCI DSS compliance for cardholder data. HTTPS everywhere. CSRF protection on checkout. Fraud scoring on orders.
113
+ - **Availability:** SLA 99.9% uptime. Checkout flow prioritised for zero-downtime deployments.
114
+ - **SEO:** Server-side rendering or static generation for product and category pages. Canonical URLs. Structured data (Schema.org Product).
115
+ - **Accessibility:** WCAG 2.1 AA for checkout and product pages.
116
+
117
+ ---
118
+
119
+ ## 7. /datadict — Data Dictionary
120
+
121
+ ### Domain-specific interview questions
122
+ - Product variants: how are they modelled — attribute matrix (size × colour) or flat SKU list?
123
+ - Prices: stored with or without tax? Multiple price tiers (retail, wholesale, member)?
124
+ - Order states: what is the full lifecycle (pending → confirmed → processing → shipped → delivered → returned)?
125
+ - Soft delete: are products and orders soft-deleted or hard-deleted?
126
+ - Amounts: stored in minor currency units (cents)?
127
+
128
+ ### Mandatory entities for E-commerce
129
+ - **Product** — master product record: name, description, brand, category, status.
130
+ - **ProductVariant** — SKU-level record: size, colour, price, stock quantity, barcode.
131
+ - **Category** — hierarchical product taxonomy.
132
+ - **Cart** — session or user cart: items, applied coupons, shipping estimate.
133
+ - **CartItem** — line item in cart: variant, quantity, price snapshot.
134
+ - **Order** — placed order: status lifecycle, totals, shipping and billing addresses.
135
+ - **OrderItem** — line item in order: variant, quantity, unit price, discount.
136
+ - **Customer** — registered user: profile, address book, loyalty balance.
137
+ - **Address** — shipping or billing address linked to customer or order.
138
+ - **Payment** — payment attempt: method, status, gateway transaction ID, amount.
139
+ - **Shipment** — shipment: carrier, tracking number, status, items shipped.
140
+ - **Return** — return request: items, reason, status, refund amount.
141
+ - **Coupon** — discount code: type (percentage, fixed, free shipping), usage limits, validity.
142
+ - **Review** — product review: rating, text, verified purchase flag.
143
+ - **Seller** _(marketplace)_ — vendor account: profile, commission rate, payout details.
144
+
145
+ ---
146
+
147
+ ## 8. /apicontract — API Contract
148
+
149
+ ### Domain-specific interview questions
150
+ - Webhook needs: order status updates to seller, payment gateway callbacks, inventory webhooks from ERP?
151
+ - Real-time: stock level updates on product page, order status notifications — WebSocket or polling?
152
+ - Pagination: cursor-based or offset for product listing and order history?
153
+
154
+ ### Typical endpoint groups
155
+ - **Catalog** — products list, product detail, search, categories, reviews.
156
+ - **Cart** — get cart, add item, update quantity, remove item, apply coupon.
157
+ - **Checkout** — calculate shipping, validate address, place order, payment initiation.
158
+ - **Orders** — order history, order detail, cancel order, track shipment.
159
+ - **Returns** — create return request, return status, refund status.
160
+ - **Account** — register, login, profile, address book, loyalty balance.
161
+ - **Seller** _(marketplace)_ — product management, order management, payout history.
162
+ - **Admin** — catalog management, order management, customer management, promotions, reports.
163
+ - **Webhooks** — payment gateway callback, carrier tracking update, inventory sync.
164
+
165
+ ---
166
+
167
+ ## 9. /wireframes — Wireframe Descriptions
168
+
169
+ ### Domain-specific interview questions
170
+ - Key screens: homepage, category page, product detail, cart, checkout (single-page or multi-step), order confirmation?
171
+ - Mobile-first or responsive desktop design?
172
+ - Guest checkout allowed, or registration required?
173
+ - Specific states: out of stock, pre-order, flash sale countdown, product with multiple variants?
174
+
175
+ ### Typical screens
176
+ - **Homepage** — hero banner, featured categories, promotional items, recently viewed.
177
+ - **Category / PLP (Product Listing Page)** — product grid/list, filter panel, sort, pagination, active filters.
178
+ - **Product Detail / PDP** — images gallery, variant selector, price, stock status, add to cart, reviews.
179
+ - **Cart** — line items, quantity controls, coupon input, order summary, proceed to checkout.
180
+ - **Checkout** — address step, shipping method step, payment step, order review.
181
+ - **Order Confirmation** — order number, summary, estimated delivery, next steps.
182
+ - **Order History** — list of orders with status, link to tracking.
183
+ - **Order Detail** — items, tracking, return option, invoice download.
184
+ - **Customer Account** — profile, addresses, orders, wishlist, loyalty points.
185
+ - **Seller Dashboard** _(marketplace)_ — orders pending, revenue, listings, payouts.
186
+
187
+ ---
188
+
189
+ ## Domain Glossary
190
+
191
+ | Term | Definition |
192
+ |------|-----------|
193
+ | SKU | Stock Keeping Unit — unique identifier for a product variant |
194
+ | GMV | Gross Merchandise Value — total sales volume before deductions |
195
+ | AOV | Average Order Value |
196
+ | PDP | Product Detail Page |
197
+ | PLP | Product Listing Page |
198
+ | PIM | Product Information Management — system for managing product data |
199
+ | WMS | Warehouse Management System |
200
+ | 3PL | Third-Party Logistics — outsourced fulfillment provider |
201
+ | Dropshipping | Fulfillment model where the seller does not hold inventory |
202
+ | BNPL | Buy Now Pay Later — deferred payment option |
203
+ | LTV | Customer Lifetime Value |
204
+ | CAC | Customer Acquisition Cost |
205
+ | Cart abandonment | When a shopper adds items to cart but does not complete checkout |
206
+ | Chargeback | Payment reversal initiated by the customer's bank |
207
+ | PCI DSS | Payment Card Industry Data Security Standard |
208
+ | Faceted search | Search with multiple simultaneous filter dimensions |
209
+ | UGC | User-Generated Content (reviews, photos) |
@@ -0,0 +1,180 @@
1
+ # Domain Reference: Fintech
2
+
3
+ Domain-specific knowledge for Fintech projects: neobanks, payment systems, crypto exchanges, investment platforms, P2P lending, insurance tech, PFM (Personal Finance Management).
4
+
5
+ ---
6
+
7
+ ## 1. /brief — Project Brief
8
+
9
+ ### Domain-specific interview questions
10
+ - Product type: neobank, payment gateway, crypto exchange, investment platform, PFM app, P2P lending, insurance aggregator?
11
+ - Licenses and regulators: central bank, FCA (UK), BaFin (DE), SEC/FINRA (US), MAS (Singapore)?
12
+ - Integrations: card processing (Visa/Mastercard), SWIFT, Open Banking API, exchanges, credit scoring?
13
+
14
+ ### Typical business goals
15
+ - Reduce cost-to-serve per transaction.
16
+ - Grow MAU (Monthly Active Users) and engagement.
17
+ - Enter a new regulatory market.
18
+ - Increase AUM (Assets Under Management).
19
+ - Launch a new financial product (card, loan, investments).
20
+
21
+ ### Typical risks
22
+ - License denial or regulatory restrictions.
23
+ - Customer financial data breach.
24
+ - Processing rule changes (PCI DSS, PSD2).
25
+ - Operational losses due to calculation errors.
26
+
27
+ ---
28
+
29
+ ## 2. /srs — Requirements Specification
30
+
31
+ ### Domain-specific interview questions
32
+ - Roles: individual customer, corporate customer, operator, compliance officer, risk manager, support agent?
33
+ - External integrations: processing center, SWIFT/SEPA, Open Banking (PSD2), credit bureaus, KYC/AML provider, market data feeds?
34
+ - Multi-currency: fiat currencies, crypto, conversion?
35
+ - Regulatory requirements: PCI DSS, PSD2 (Strong Customer Authentication), GDPR, SOX, Basel III?
36
+
37
+ ### Typical functional areas
38
+ - Onboarding and verification (KYC/KYB).
39
+ - Account and balance management.
40
+ - Transfers and payments (P2P, C2B, B2B, international).
41
+ - Card products (issuance, management, limits).
42
+ - Investments / trading (portfolio, orders, market data).
43
+ - Lending (scoring, application, servicing).
44
+ - Reporting (regulatory, management, customer).
45
+
46
+ ---
47
+
48
+ ## 3. /stories — User Stories
49
+
50
+ ### Domain-specific interview questions
51
+ - Critical user flows: onboarding, first transfer, card top-up, investment trade, loan application?
52
+ - Edge cases: double charge, transaction reversal, sanctions check, AML block, daily limit exceeded?
53
+ - Personas: individual customer, sole proprietor, corporate treasurer, beginner investor, active trader?
54
+
55
+ ### Typical epics
56
+ - Onboarding and KYC/KYB.
57
+ - Accounts and balances.
58
+ - Payments and transfers.
59
+ - Cards.
60
+ - Investments / trading.
61
+ - Loans.
62
+ - Notifications and alerts.
63
+ - Administration and compliance.
64
+
65
+ ---
66
+
67
+ ## 4. /usecases — Use Cases
68
+
69
+ ### Domain-specific interview questions
70
+ - Critical alternative flows: insufficient funds, processing rejection, SCA challenge (Strong Customer Authentication), sanctions stop-list?
71
+ - System actors: processing center, SWIFT gateway, credit bureau, market data provider, AML service?
72
+
73
+ ### Typical exceptional flows
74
+ - Transaction declined by processor.
75
+ - Counterparty on sanctions list.
76
+ - SWIFT/SEPA connection failure.
77
+ - Market data feed unavailable.
78
+ - Credit limit exceeded.
79
+
80
+ ---
81
+
82
+ ## 5. /ac — Acceptance Criteria
83
+
84
+ ### Domain-specific interview questions
85
+ - Business rules: daily/monthly transfer limits, fees (fixed, percentage, tiered), minimum investment amount, interest rates?
86
+ - Boundary values: minimum transfer, maximum balance, SCA timeout, trade holding period?
87
+ - Precision: currency — 2 decimal places, crypto — up to 8, interest rates — up to 4?
88
+
89
+ ---
90
+
91
+ ## 6. /nfr — Non-functional Requirements
92
+
93
+ ### Domain-specific interview questions
94
+ - Target TPS (Transactions Per Second) and payment processing time (p95)?
95
+ - PCI DSS: which level (Level 1–4)? Certification or SAQ (Self-Assessment Questionnaire)?
96
+ - Encryption: HSM (Hardware Security Module) for keys? Card tokenization?
97
+
98
+ ### Mandatory NFR categories for Fintech
99
+ - **Performance:** payment processing time < 3s (p95), TPS for peak loads.
100
+ - **Security:** PCI DSS compliance, HSM for cryptographic keys, PAN (Primary Account Number) tokenization, encryption at-rest and in-transit.
101
+ - **Compliance:** regulatory reporting, transaction data retention 5–10 years, AML monitoring, PSD2 SCA.
102
+ - **Availability:** SLA 99.99% for payment processing, RPO (Recovery Point Objective) < 1 min.
103
+ - **Audit:** full audit trail for all financial operations, immutable logs.
104
+
105
+ ---
106
+
107
+ ## 7. /datadict — Data Dictionary
108
+
109
+ ### Domain-specific interview questions
110
+ - Audit: which operations require immutable log (transfers, limit changes, logins)?
111
+ - Amount precision: stored in minor units (cents) or fixed precision (decimal)?
112
+
113
+ ### Mandatory entities for Fintech
114
+ - **User / Customer** — customer, KYC status, verification level, risk rating.
115
+ - **Account** — account: type, currency, balance, status.
116
+ - **Transaction** — transaction: type, amount, currency, status, fee, counterparty.
117
+ - **Card** — card: tokenized PAN, status, limits, expiry.
118
+ - **KYCRecord** — verification results: documents, check status, provider.
119
+ - **AMLCheck** — AML check results: score, decision, timestamp.
120
+ - **AuditLog** — audit log: action, actor, IP, timestamp, payload.
121
+ - **Fee** — fee: type, calculation, applicability.
122
+ - **ExchangeRate** — exchange rates: pair, rate, timestamp, source.
123
+
124
+ ---
125
+
126
+ ## 8. /apicontract — API Contract
127
+
128
+ ### Domain-specific interview questions
129
+ - Webhook contracts: processing callback (payment status), AML service notifications, Open Banking events?
130
+ - Authentication: OAuth2 + SCA, mTLS for service-to-service?
131
+
132
+ ### Typical endpoint groups
133
+ - Auth (registration, login, SCA, refresh).
134
+ - Accounts (creation, balance, statement).
135
+ - Transfers (P2P, SEPA, SWIFT, internal).
136
+ - Cards (issuance, blocking, limits, PIN).
137
+ - Investments (portfolio, orders, quotes).
138
+ - KYC (document upload, status).
139
+ - Admin (customer management, AML review, reports).
140
+ - Webhooks (payment status, AML alerts, card events).
141
+
142
+ ---
143
+
144
+ ## 9. /wireframes — Wireframe Descriptions
145
+
146
+ ### Domain-specific interview questions
147
+ - Key screens: dashboard, account list, transfer, card, investments, transaction history?
148
+ - Specific states: pending verification, card frozen, insufficient funds, SCA required?
149
+
150
+ ### Typical screens
151
+ - Dashboard (account summary, recent transactions, quick actions).
152
+ - Account (balance, statement, period and type filters).
153
+ - Transfer (recipient selection, amount, confirmation, SCA).
154
+ - Card (visualization, limits, block/unblock, PIN).
155
+ - Investments (portfolio, charts, order placement).
156
+ - Profile (data, KYC status, security settings).
157
+ - Admin panel: customers, transactions, AML alerts, reports.
158
+
159
+ ---
160
+
161
+ ## Domain Glossary
162
+
163
+ | Term | Definition |
164
+ |------|-----------|
165
+ | PCI DSS | Payment Card Industry Data Security Standard |
166
+ | PSD2 | Payment Services Directive 2 — EU payment services directive |
167
+ | SCA | Strong Customer Authentication — enhanced customer authentication (PSD2 requirement) |
168
+ | KYC | Know Your Customer — customer identification |
169
+ | KYB | Know Your Business — business entity identification |
170
+ | AML | Anti-Money Laundering |
171
+ | HSM | Hardware Security Module — hardware module for key storage |
172
+ | PAN | Primary Account Number — payment card number |
173
+ | SWIFT | Society for Worldwide Interbank Financial Telecommunication |
174
+ | SEPA | Single Euro Payments Area |
175
+ | TPS | Transactions Per Second |
176
+ | RPO | Recovery Point Objective — acceptable data loss on failure |
177
+ | RTO | Recovery Time Objective — acceptable recovery time after failure |
178
+ | AUM | Assets Under Management |
179
+ | MAU | Monthly Active Users |
180
+ | SAQ | Self-Assessment Questionnaire — PCI DSS self-assessment |