@kudusov.takhir/ba-toolkit 3.2.0 → 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,14 @@ 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
+
14
22
  ## [3.2.0] — 2026-04-09
15
23
 
16
24
  ### Highlights
@@ -475,7 +483,8 @@ CI scripts that relied on the old behaviour (`init` creates files only, `install
475
483
 
476
484
  ---
477
485
 
478
- [Unreleased]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.2.0...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
479
488
  [3.2.0]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.1.1...v3.2.0
480
489
  [3.1.1]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.1.0...v3.1.1
481
490
  [3.1.0]: https://github.com/TakhirKudusov/ba-toolkit/compare/v3.0.0...v3.1.0
package/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  # 📋 BA Toolkit
4
4
 
5
- Structured BA pipeline for AI coding agents — concept to handoff, 23 skills, 9 domains, one-command Notion + Confluence publish.
5
+ Structured BA pipeline for AI coding agents — concept to handoff, 23 skills, 12 domains, one-command Notion + Confluence publish.
6
6
 
7
7
  <img src="https://img.shields.io/badge/skills-23-blue" alt="Skills">
8
- <img src="https://img.shields.io/badge/domains-9-green" alt="Domains">
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">
@@ -24,7 +24,7 @@ Structured BA pipeline for AI coding agents — concept to handoff, 23 skills, 9
24
24
 
25
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
 
@@ -243,6 +243,9 @@ The pipeline is domain-agnostic by default. At `ba-toolkit init` you pick a doma
243
243
  | **Social / Media** | Social networks, creator platforms, community forums, newsletters, short-video |
244
244
  | **Real Estate** | Property portals, agency CRM, rental management, property management, mortgage tools |
245
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 |
246
249
  | **Custom** | Any other domain — works with general interview questions |
247
250
 
248
251
  Adding a new domain = creating one Markdown file in `skills/references/domains/`. See [docs/DOMAINS.md](docs/DOMAINS.md).
package/bin/ba-toolkit.js CHANGED
@@ -80,6 +80,9 @@ const DOMAINS = [
80
80
  { id: 'social-media', name: 'Social/Media', desc: 'Social networks, creator platforms, community forums' },
81
81
  { id: 'real-estate', name: 'Real Estate', desc: 'Property portals, agency CRM, rental management' },
82
82
  { id: 'igaming', name: 'iGaming', desc: 'Slots, betting, casino, Telegram Mini Apps' },
83
+ { id: 'edtech', name: 'EdTech', desc: 'LMS, K-12, higher ed, MOOC, corporate L&D, language learning' },
84
+ { id: 'govtech', name: 'GovTech', desc: 'Citizen e-services, permits, tax, benefits, public records' },
85
+ { id: 'ai-ml', name: 'AI / ML', desc: 'LLM apps, RAG, agents, model serving, fine-tuning, MLOps' },
83
86
  { id: 'custom', name: 'Custom', desc: 'Any other domain — general interview questions' },
84
87
  ];
85
88
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kudusov.takhir/ba-toolkit",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "AI-powered Business Analyst pipeline — 23 skills from concept discovery to development handoff, with one-command Notion + Confluence publish. Works with Claude Code, Codex CLI, Gemini CLI, Cursor, and Windsurf.",
5
5
  "keywords": [
6
6
  "business-analyst",
@@ -10,7 +10,7 @@ Starting point of the BA Toolkit pipeline. Generates a structured Project Brief
10
10
 
11
11
  ## Loading domain reference
12
12
 
13
- Domain references are located in `references/domains/` relative to the `ba-toolkit` directory. Supported domains: `saas`, `fintech`, `ecommerce`, `healthcare`, `logistics`, `on-demand`, `social-media`, `real-estate`, `igaming`. For other domains, work without a reference file.
13
+ Domain references are located in `references/domains/` relative to the `ba-toolkit` directory. Supported domains: `saas`, `fintech`, `ecommerce`, `healthcare`, `logistics`, `on-demand`, `social-media`, `real-estate`, `igaming`, `edtech`, `govtech`, `ai-ml`. For other domains, work without a reference file.
14
14
 
15
15
  ## Workflow
16
16
 
@@ -28,7 +28,7 @@ If `00_principles_*.md` exists in the output directory, load it and apply its co
28
28
 
29
29
  ### 3. Domain selection
30
30
 
31
- Ask the user about the project domain. If a matching `references/domains/{domain}.md` file exists (currently: `saas`, `fintech`, `ecommerce`, `healthcare`, `logistics`, `on-demand`, `social-media`, `real-estate`, `igaming`), load it and use its domain-specific interview questions (section `1. /brief`), typical business goals, risks, and glossary.
31
+ Ask the user about the project domain. 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 use its domain-specific interview questions (section `1. /brief`), typical business goals, risks, and glossary.
32
32
 
33
33
  If the domain does not match any supported one, record it as `custom:{name}` and use general questions only.
34
34
 
@@ -62,7 +62,7 @@ If a domain reference is loaded, supplement general questions with domain-specif
62
62
  ```markdown
63
63
  # Project Brief: {Project Name}
64
64
 
65
- **Domain:** {saas | fintech | ecommerce | healthcare | logistics | on-demand | social-media | real-estate | igaming | custom:{name}}
65
+ **Domain:** {saas | fintech | ecommerce | healthcare | logistics | on-demand | social-media | real-estate | igaming | edtech | govtech | ai-ml | custom:{name}}
66
66
  **Date:** {date}
67
67
 
68
68
  ## 1. Project Summary
@@ -0,0 +1,262 @@
1
+ # Domain Reference: AI / ML
2
+
3
+ Domain-specific knowledge for AI / ML products: LLM-powered applications, conversational agents, RAG (retrieval-augmented generation) pipelines, agent frameworks, model-serving and inference platforms, fine-tuning and training pipelines, ML feature stores, model marketplaces, AI dev tools, vector databases, and embedded AI features inside non-AI products.
4
+
5
+ ---
6
+
7
+ ## 1. /brief — Project Brief
8
+
9
+ ### Domain-specific interview questions
10
+ - Product type: end-user LLM app (chat, copilot), RAG over a private corpus, autonomous agent / multi-agent system, model-serving platform, fine-tuning service, AI-feature embedded in an existing SaaS, AI dev tool, vector database, evals platform?
11
+ - Build vs. buy on the model: hosted API (OpenAI, Anthropic, Google), open-weights self-hosted (Llama, Mistral, Qwen), fine-tuned open-weights, in-house pre-trained, hybrid?
12
+ - User segment: consumer, prosumer, B2B knowledge worker, developer, internal (employee-facing), regulated enterprise?
13
+ - Modality: text only, multimodal (image, audio, video, code), voice-first, structured-output / function-calling?
14
+ - Monetization: per-message, per-token, subscription, per-seat, per-API-call, freemium with usage caps, marketplace take-rate?
15
+ - Latency budget: real-time chat (<2s), interactive completion (<200ms first token), batch processing (minutes), or async background?
16
+ - Determinism / reproducibility requirement: high (same input → same output, e.g. legal, healthcare, finance) vs. low (creative)?
17
+
18
+ ### Typical business goals
19
+ - Reach quality threshold for production launch (often the gating factor: an evals score, a human-preference win-rate vs. baseline, or an internal acceptance bar).
20
+ - Reduce cost-per-query (token costs, retrieval costs, fine-tuning amortisation).
21
+ - Reduce hallucination / unsafe-output rate to a specific target (e.g. <1% on the eval set).
22
+ - Improve task success rate (the AI version of feature success — does the user actually finish the task with help?).
23
+ - Increase active usage (DAU, messages per session, tasks completed).
24
+ - Build a moat through proprietary data, fine-tuned models, or workflow integration.
25
+ - Hit safety, bias, and compliance thresholds (especially in regulated sectors).
26
+
27
+ ### Typical risks
28
+ - Hallucinations and confident-sounding incorrect output.
29
+ - Prompt injection and jailbreaking (data exfiltration, role override, tool misuse).
30
+ - Cost runaway (one heavy user can burn months of margin).
31
+ - Latency unpredictability (P50 vs. P99 differs by an order of magnitude).
32
+ - Vendor / model deprecation (the underlying model API changes or sunsets).
33
+ - Data privacy: user inputs may contain PII, secrets, or proprietary code that the model provider then stores or trains on.
34
+ - Regulatory exposure: EU AI Act, sector-specific (FDA SaMD for medical, NYC bias audit for HR, NIST AI RMF, ISO 42001).
35
+ - Eval / quality regression: a model upgrade silently breaks a downstream task.
36
+ - Tool-use agents going off-policy (calling the wrong tool, making irreversible writes, looping).
37
+
38
+ ---
39
+
40
+ ## 2. /srs — Requirements Specification
41
+
42
+ ### Domain-specific interview questions
43
+ - Roles: end user, prompt / agent author, eval reviewer, ML engineer, MLOps / inference operator, safety / policy reviewer, billing admin?
44
+ - Multi-tenancy: shared model with per-tenant retrieval, per-tenant fine-tunes, per-tenant inference cluster?
45
+ - Model layer: which models (provider × name × version) are wired? Fallback / failover strategy when the primary model is down or rate-limited?
46
+ - Prompting / orchestration framework: in-house, LangChain, LlamaIndex, custom agent loop, OpenAI Agents SDK?
47
+ - RAG: which corpus? Which embedding model? Which vector database? Re-indexing schedule?
48
+ - Tool use / function calling: which tools are exposed to the model? Which side effects are allowed (read-only, idempotent, irreversible)?
49
+ - Evals: which datasets? Which scoring methods (LLM-as-judge, rubric, A/B human pref, reference-based metrics)?
50
+ - Safety: input filter, output filter, refusal policy, red-team coverage, prompt-injection defence (delimited / sandwiched / structured prompts, system-prompt leakage prevention)?
51
+ - Data handling: are user inputs logged? Used for fine-tuning? Sent to a third-party model provider (and under which DPA terms)?
52
+ - Compliance: EU AI Act risk classification, NIST AI RMF profile, ISO 42001 certification target, sector rules (FDA SaMD, HIPAA, GDPR Art. 22 automated-decision rights)?
53
+
54
+ ### Typical functional areas
55
+ - Conversation / completion API and UI.
56
+ - Prompt / template management with versioning.
57
+ - Model routing and fallback (provider × model × version).
58
+ - Tool / function-calling registry.
59
+ - RAG pipeline (ingest, chunk, embed, store, retrieve, rerank).
60
+ - Vector database / index management.
61
+ - Fine-tuning / dataset management.
62
+ - Inference serving (autoscaling, queueing, batching, GPU / accelerator management).
63
+ - Eval pipeline (datasets, scorers, regression detection, dashboards).
64
+ - Safety pipeline (input / output filters, red-team queue, refusal policies).
65
+ - Observability (token usage, latency, cost, quality, drift).
66
+ - Cost / usage metering and quotas.
67
+ - Feedback collection (thumbs up/down, structured rating, free-text).
68
+ - Admin console (model registry, prompt registry, tool registry, eval runs, safety dashboard).
69
+
70
+ ---
71
+
72
+ ## 3. /stories — User Stories
73
+
74
+ ### Domain-specific interview questions
75
+ - Critical end-user flows: ask a question, get a grounded answer with citations, refine the answer, take an action via a tool, share or export the result?
76
+ - Critical author / operator flows: write a new prompt, run it against an eval set, compare against a baseline, ship to production, monitor regressions?
77
+ - Critical safety flows: red-team a new prompt, review a flagged refusal, export an audit log for a regulator?
78
+ - Edge cases: model outage and fallback, rate-limit hit, user input contains PII, tool call fails halfway through a multi-step plan, hallucinated citation, prompt injection in retrieved context?
79
+ - Personas: end user, prompt / agent author, eval reviewer, ML engineer, MLOps operator, safety reviewer, regulator / auditor.
80
+
81
+ ### Typical epics
82
+ - Conversation and completion.
83
+ - Retrieval and citation.
84
+ - Tool / function calling.
85
+ - Prompt and template authoring.
86
+ - Eval running and regression detection.
87
+ - Safety review and red-teaming.
88
+ - Model routing and fallback.
89
+ - Cost metering and quotas.
90
+ - Feedback and improvement loop.
91
+ - Fine-tuning workflow.
92
+ - Observability and incident response.
93
+ - Admin (model registry, prompt registry, audit log).
94
+
95
+ ---
96
+
97
+ ## 4. /usecases — Use Cases
98
+
99
+ ### Domain-specific interview questions
100
+ - Critical alternative flows: model returns an unsafe output → safety filter rewrites or refuses; tool call fails → agent retries, escalates, or rolls back; retrieved context is empty → fall back to general knowledge with a clear disclaimer; quota hit → block with a soft message and upgrade prompt?
101
+ - System actors: model provider API, embedding API, vector database, tool / plugin APIs (search, code execution, browser, internal CRMs), safety classifier, eval scorer, observability backend, billing / metering system?
102
+
103
+ ### Typical exceptional flows
104
+ - Model API timeout / 5xx → fall back to a secondary model or queue for retry.
105
+ - Rate-limit hit (provider-side or per-tenant) → backoff, queue, or reject with a clear message.
106
+ - Output filter blocks an answer → safe completion or refusal with a reason code.
107
+ - Input filter detects prompt injection → strip / quote the suspicious content and warn.
108
+ - Retrieved context is empty → answer with a disclaimer or ask a clarifying question instead of hallucinating.
109
+ - Tool call fails after a partial side effect → compensate / roll back and report cleanly to the user.
110
+ - Eval regression detected after a prompt or model upgrade → auto-rollback and page on-call.
111
+ - User submits PII or a secret → mask in logs, do not forward to third-party providers without DPA coverage.
112
+ - Citation cannot be resolved to a real source → suppress the citation and downgrade confidence.
113
+
114
+ ---
115
+
116
+ ## 5. /ac — Acceptance Criteria
117
+
118
+ ### Domain-specific interview questions
119
+ - Quality bars: minimum eval score, minimum win-rate vs. baseline, max hallucination rate on the eval set, max unsafe-output rate?
120
+ - Latency bars: time to first token (p50, p95), full completion time, agent-step total budget?
121
+ - Cost bars: max average tokens per query, max average cost per query, hard per-tenant daily / monthly quota?
122
+ - Determinism / reproducibility: is `temperature = 0` required, with the same model version pinned? Is bit-for-bit reproducibility required (often impossible — replace with semantic-equivalence checks)?
123
+ - Boundary values: max prompt length, max context window utilisation, max conversation history retained, max retrieved documents per query, max tool-call depth, max agent steps per task?
124
+ - Safety AC: explicit list of disallowed outputs (PII leakage, prompt-injection echo, instructions for weapons / self-harm / etc.) with at least one positive and one negative test case each.
125
+
126
+ ---
127
+
128
+ ## 6. /nfr — Non-functional Requirements
129
+
130
+ ### Domain-specific interview questions
131
+ - Latency: TTFT (time to first token), full completion p50 / p95, end-to-end agent-task budget?
132
+ - Throughput: peak QPS, concurrent active sessions, peak fine-tune jobs, peak batch inference?
133
+ - Cost target: average and p95 cost per request, monthly budget per tenant, alerting threshold?
134
+ - Quality: target eval score, target win-rate vs. last release, hallucination rate ceiling, refusal rate ceiling?
135
+ - Reproducibility: pinned model versions, pinned prompt versions, deterministic decoding settings?
136
+ - Safety: red-team coverage frequency, mandatory categories (CSAM, weapons, self-harm, hate, prompt injection, PII leakage)?
137
+ - Observability: traces per request (prompt, retrieval, tool calls, scores, cost, latency)?
138
+ - Data residency: where do user inputs and embeddings live? Which cloud regions are allowed? Is the model API itself in a permitted region?
139
+
140
+ ### Mandatory NFR categories for AI / ML
141
+ - **Performance:** TTFT < 1s (p50) for chat; full completion < 5s (p95) for short-form; batch jobs scheduled to off-peak windows.
142
+ - **Scalability:** elastic inference (autoscaling on tokens-per-second, not just requests-per-second); rate limiting per tenant and global; queueing with backpressure.
143
+ - **Cost control:** per-request token cap, per-tenant daily and monthly budget, alerting at 50/80/100 % thresholds; cost dashboard mandatory.
144
+ - **Quality / evals:** eval set on every prompt or model change; regression detection on every release; rollback playbook documented.
145
+ - **Safety:** input + output filters; red-team coverage of mandatory categories; refusal-rate dashboard; incident playbook for jailbreaks; clear escalation path.
146
+ - **Security:** secrets never echoed; user inputs scrubbed before logging; mTLS or signed requests to the model provider; tool-call allow-list; sandboxed code execution if applicable; tenant isolation in the vector store.
147
+ - **Privacy:** explicit notice on what is logged and what is sent to third-party model providers; DPA in place with each provider; opt-out for training-data use; PII redaction before storage.
148
+ - **Compliance:** EU AI Act risk-class assessment on file; NIST AI RMF profile mapped; ISO 42001 controls if pursued; sector controls (HIPAA, FDA SaMD, NYC bias audit) where applicable.
149
+ - **Observability:** end-to-end trace per request (prompt rendered, context retrieved, tools called, model used, tokens, latency, cost, evals, safety verdict, user feedback).
150
+ - **Reproducibility:** every released prompt and model version is pinned and re-runnable on the eval set.
151
+ - **Resilience:** primary-model outage → automatic failover to a secondary; documented degraded-mode behaviour.
152
+
153
+ ---
154
+
155
+ ## 7. /datadict — Data Dictionary
156
+
157
+ ### Domain-specific interview questions
158
+ - Multi-tenancy: tenant_id on every entity, including prompts, evals, conversations, vector index partitions?
159
+ - Retention: how long are user conversations, prompts, evals, and traces retained? What is purged on opt-out?
160
+ - PII categorisation: which fields might contain user PII or secrets and how are they protected (redaction, encryption, masked in UI)?
161
+
162
+ ### Mandatory entities for AI / ML
163
+ - **Prompt** — versioned prompt template: id, version, body, variables, model binding, status (draft/published).
164
+ - **Model** — model registry entry: provider, name, version, endpoint, default params, status, deprecation date.
165
+ - **Conversation** — chat session: tenant, user, started_at, status, metadata.
166
+ - **Message** — single turn: conversation, role (user/assistant/system/tool), content, tokens, cost, latency, model used.
167
+ - **Trace** — full execution record per request: prompt id+version, retrieval results, tool calls, model id+version, final output, token counts, cost, latency, eval scores, safety verdict.
168
+ - **EvalSet** — labelled dataset: name, items, scoring method, owner.
169
+ - **EvalRun** — single run of a prompt or model against an eval set: scores, regression vs. baseline, run timestamp.
170
+ - **Tool** — tool / function registry entry: name, schema, side-effect class (read-only / idempotent / irreversible), allowed roles.
171
+ - **ToolCall** — log of an executed tool call: trace id, tool, arguments, result, status, latency.
172
+ - **Document** — RAG corpus item: source, ingest date, hash, chunk count, embedding model, retention class.
173
+ - **Chunk** — embedded chunk: document, position, text, embedding vector, metadata.
174
+ - **VectorIndex** — index partition: tenant, embedding model, dimensionality, count, last reindex.
175
+ - **Feedback** — user rating: trace id, rating, free-text reason, reviewer id.
176
+ - **SafetyEvent** — flagged input or output: trace id, category, action taken, reviewer status.
177
+ - **Quota** — per-tenant usage allowance: window, token cap, request cap, current usage.
178
+ - **AuditLog** — admin actions on prompts, models, tools, evals, safety policy.
179
+
180
+ ---
181
+
182
+ ## 8. /apicontract — API Contract
183
+
184
+ ### Domain-specific interview questions
185
+ - Streaming responses (server-sent events / chunked) vs. unary completions?
186
+ - Function-calling / structured-output schemas — JSON Schema published per tool?
187
+ - Public API for third-party integrators vs. internal-only?
188
+ - Webhooks for "eval regression detected", "safety event flagged", "fine-tune job complete"?
189
+ - Idempotency keys on completions (so a retried request does not double-charge)?
190
+
191
+ ### Typical endpoint groups
192
+ - Chat / completion (streaming and unary).
193
+ - Prompts (CRUD, versions, publish, rollback).
194
+ - Models (registry, route, fallback, deprecation).
195
+ - Tools (registry, schemas, allow-list per tenant).
196
+ - Conversations (list, read, delete, export).
197
+ - RAG ingest (upload, status, reindex, delete).
198
+ - Vector search (query, similarity, filter).
199
+ - Evals (sets, runs, compare, dashboards).
200
+ - Safety (flag, review, override, audit).
201
+ - Feedback (submit, list, aggregate).
202
+ - Quotas and billing (current usage, limits, top-ups).
203
+ - Fine-tuning (upload dataset, start job, status, deploy).
204
+ - Webhooks (regression, safety, job-complete events).
205
+ - Admin (audit log, model registry, tool registry).
206
+
207
+ ---
208
+
209
+ ## 9. /wireframes — Wireframe Descriptions
210
+
211
+ ### Domain-specific interview questions
212
+ - Key screens: chat / conversation surface, prompt editor with side-by-side diff and eval panel, eval dashboard, safety review queue, model registry, tool registry, cost / usage dashboard, RAG corpus management, fine-tune job page?
213
+ - Specific states: streaming response in progress, model fallback in effect, safety filter blocked an output, quota exhausted, rate-limited, regenerating, citation hover, tool call running, partial agent failure, eval regression alert, expensive query warning?
214
+
215
+ ### Typical screens
216
+ - Chat surface (streaming response, citations, "regenerate", "stop", thumbs up/down, copy).
217
+ - Prompt editor (template body, variables, model binding, side-by-side run, eval panel).
218
+ - Eval dashboard (runs over time, regression alerts, drill-down per item).
219
+ - Eval set editor (labelled examples, scorers, owner).
220
+ - Safety review queue (flagged inputs / outputs, decision form, audit trail).
221
+ - Model registry (providers, versions, deprecation calendar, fallback chains).
222
+ - Tool registry (schemas, side-effect class, allow-list per tenant).
223
+ - Cost / usage dashboard (per tenant, per prompt, per model; alerts at thresholds).
224
+ - RAG corpus management (sources, ingest status, reindex button, retention class).
225
+ - Fine-tune job page (dataset, base model, hyperparameters, status, evals, deploy).
226
+ - Trace viewer (per request: prompt → retrieval → tool calls → model → output → evals → safety → feedback).
227
+ - Admin console (audit log, quotas, policy editor, opt-out registry).
228
+
229
+ ---
230
+
231
+ ## Domain Glossary
232
+
233
+ | Term | Definition |
234
+ |------|-----------|
235
+ | LLM | Large Language Model |
236
+ | RAG | Retrieval-Augmented Generation — retrieve from a corpus, then generate grounded on it |
237
+ | Agent | LLM that can call tools and act over multiple steps |
238
+ | Tool / function calling | LLM produces a structured request to invoke an external function |
239
+ | Embedding | Dense vector representation of text (or other modality) for similarity search |
240
+ | Vector database | Storage and ANN search over embeddings |
241
+ | Chunk | A unit of text from a source document used for embedding and retrieval |
242
+ | Reranker | Second-stage model that reorders retrieved candidates by relevance |
243
+ | Hallucination | Confident, plausible-sounding output that is factually wrong |
244
+ | Prompt injection | Adversarial input that tries to override the system prompt or extract secrets |
245
+ | Jailbreak | Adversarial input that bypasses the safety filter |
246
+ | Eval | A measurement of model or prompt quality on a labelled dataset |
247
+ | LLM-as-judge | Using one LLM to score the outputs of another |
248
+ | TTFT | Time to first token — latency to the start of the streamed response |
249
+ | Token | The unit of text the model bills and processes (sub-word) |
250
+ | Context window | Maximum tokens the model can attend to per request |
251
+ | Fine-tuning | Continued training of a base model on a custom dataset |
252
+ | LoRA | Low-Rank Adaptation — a parameter-efficient fine-tuning technique |
253
+ | Inference | Running a trained model to produce output (vs. training) |
254
+ | MLOps | Operational discipline of running ML models in production |
255
+ | Drift | Production data or behaviour drifting away from the eval distribution |
256
+ | Refusal rate | % of requests the safety filter declines |
257
+ | Red-teaming | Systematic adversarial testing of a model or product for unsafe behaviour |
258
+ | Guardrails | Programmatic input / output filters around an LLM |
259
+ | Multi-modal | Model that handles more than one modality (text, image, audio, video) |
260
+ | EU AI Act | EU regulation classifying AI systems by risk and imposing obligations |
261
+ | NIST AI RMF | US NIST AI Risk Management Framework |
262
+ | ISO 42001 | International standard for AI management systems |
@@ -0,0 +1,223 @@
1
+ # Domain Reference: EdTech
2
+
3
+ Domain-specific knowledge for EdTech projects: K-12 platforms, higher-education tools, corporate learning (LXP/LMS), MOOC marketplaces, language learning, tutoring marketplaces, exam-prep apps, micro-credential and certification platforms.
4
+
5
+ ---
6
+
7
+ ## 1. /brief — Project Brief
8
+
9
+ ### Domain-specific interview questions
10
+ - Learner segment: K-12 students, university students, adult professionals, corporate employees, parents-of-learners?
11
+ - Product type: full LMS, lightweight LXP, MOOC marketplace, 1:1 tutoring marketplace, self-paced micro-courses, exam prep, language learning, simulation/lab environment?
12
+ - Buyer vs. user split: who pays (parent, school district, university, HR/L&D, employer, learner) vs. who uses?
13
+ - Monetization: per-seat institutional licensing, B2C subscription, freemium, certificate fees, marketplace take-rate, sponsored/free?
14
+ - Accreditation and certification: are completions recognised by an external body (universities, certifying organisations, ministries of education)?
15
+ - Geography and language coverage: single market or multi-region; what languages and reading directions are required at launch?
16
+
17
+ ### Typical business goals
18
+ - Improve learning outcomes (course completion, mastery scores, time-to-proficiency).
19
+ - Increase course completion rate (the perennial EdTech problem; benchmark <15% for free MOOCs).
20
+ - Grow institutional contracts (school districts, universities, corporate L&D).
21
+ - Reduce learner-acquisition cost; raise repeat enrolment.
22
+ - Build a credentialing economy (certificates that employers actually trust).
23
+ - Move learners up a value ladder: free → paid → certificate → cohort → degree.
24
+
25
+ ### Typical risks
26
+ - Low completion and engagement — the dominant EdTech failure mode.
27
+ - Child-safety / minor-data compliance: COPPA (US, under-13), GDPR-K (EU), age verification, parental consent.
28
+ - Procurement cycles for K-12 and higher-ed are long (6–18 months) and seasonal.
29
+ - Accessibility lawsuits (Section 508 / WCAG 2.1 AA / ADA) — high prevalence in US K-12.
30
+ - Cheating, plagiarism, and AI-generated submissions undermine assessment integrity.
31
+ - Content licensing — third-party textbook, video, and assessment item rights.
32
+
33
+ ---
34
+
35
+ ## 2. /srs — Requirements Specification
36
+
37
+ ### Domain-specific interview questions
38
+ - Roles: learner, instructor / teacher, teaching assistant, course author, parent / guardian, school admin, district admin, content reviewer, support agent?
39
+ - Multi-tenancy: per-district, per-school, per-cohort isolation?
40
+ - LTI / SCORM / xAPI integration: must the platform plug into existing LMS (Canvas, Moodle, Blackboard, D2L)?
41
+ - SIS (Student Information System) integration: rostering via OneRoster / Clever / ClassLink?
42
+ - Assessment types: multiple-choice, free-text, code submissions, file upload, peer review, oral exam, proctored exam?
43
+ - Live vs. self-paced: real-time classroom (video, whiteboard) or fully asynchronous?
44
+ - Compliance: FERPA (US), COPPA, GDPR-K, state student-data privacy laws (CSPC), accessibility (WCAG 2.1 AA, Section 508).
45
+
46
+ ### Typical functional areas
47
+ - Course catalog and enrolment.
48
+ - Course authoring (lesson editor, video upload, quiz builder, branching scenarios).
49
+ - Lesson player (video, reading, interactive widgets, transcript, captions).
50
+ - Assessment engine (item bank, randomisation, time limits, retakes, grading rubric).
51
+ - Gradebook and progress tracking.
52
+ - Discussion forums, peer review, group projects.
53
+ - Live classroom (video, whiteboard, breakout rooms, polls) — if synchronous.
54
+ - Certificates, badges, transcripts, micro-credentials.
55
+ - Reporting for instructors and admins (cohort progress, at-risk learners).
56
+ - Parent/guardian portal (K-12).
57
+ - Admin console (rostering, license management, content moderation).
58
+
59
+ ---
60
+
61
+ ## 3. /stories — User Stories
62
+
63
+ ### Domain-specific interview questions
64
+ - Critical learner flows: discovery, enrolment, first lesson, returning to where I left off, taking an assessment, getting feedback, earning a certificate?
65
+ - Critical instructor flows: creating a course, importing existing content, monitoring cohort progress, grading, intervening with at-risk learners?
66
+ - Edge cases: assessment timeout, network drop mid-exam, plagiarism detection, content review queue, refund / unenrol?
67
+ - Personas: motivated self-learner, struggling K-12 student, corporate compliance learner, university lecturer, district curriculum lead.
68
+
69
+ ### Typical epics
70
+ - Learner onboarding and FTUE.
71
+ - Course discovery and enrolment.
72
+ - Lesson playback and progress tracking.
73
+ - Assessment and grading.
74
+ - Instructor authoring and analytics.
75
+ - Cohort / classroom management.
76
+ - Certificates and credentials.
77
+ - Parent / guardian visibility (K-12).
78
+ - Admin console and rostering.
79
+ - Live classroom (if synchronous).
80
+
81
+ ---
82
+
83
+ ## 4. /usecases — Use Cases
84
+
85
+ ### Domain-specific interview questions
86
+ - Critical alternative flows: assessment timeout, lost connection during a proctored exam, peer reviewer drops out, plagiarism flag, accessibility-driven extended time?
87
+ - System actors: SIS provider, LTI consumer LMS, video CDN, proctoring service, payment provider, certificate-issuance service, content-moderation pipeline?
88
+
89
+ ### Typical exceptional flows
90
+ - Assessment timer expires while learner is still answering.
91
+ - Network drop during a high-stakes exam (recovery, replay, instructor escalation).
92
+ - Plagiarism / AI-generated content detected after submission.
93
+ - Learner under 13 with no parental consent on file.
94
+ - Instructor revokes a published course; enrolled learners affected.
95
+ - SIS roster sync fails mid-term; new students cannot log in.
96
+ - LTI launch from external LMS arrives with invalid signature.
97
+
98
+ ---
99
+
100
+ ## 5. /ac — Acceptance Criteria
101
+
102
+ ### Domain-specific interview questions
103
+ - Business rules: pass mark, max retakes, minimum time on task, prerequisite courses, certificate validity period, late-submission policy?
104
+ - Boundary values: max video length, max assessment duration, max file upload size (essays, code), max concurrent live-classroom participants, gradebook precision (0.01 vs. integer)?
105
+ - Accessibility AC: WCAG 2.1 AA conformance per screen, captions on every video, transcript on every audio, keyboard-only navigation, screen-reader announcements for timer changes?
106
+
107
+ ---
108
+
109
+ ## 6. /nfr — Non-functional Requirements
110
+
111
+ ### Domain-specific interview questions
112
+ - Concurrency: peak concurrent learners (start of term, exam day, MOOC launch); peak concurrent live-classroom participants?
113
+ - Video delivery: target start time (<2s), buffering ratio, supported bitrates, offline download for low-bandwidth?
114
+ - Data residency: per-country / per-district storage requirements (e.g. EU student data must stay in EU; some US states require in-state hosting)?
115
+ - Accessibility target: WCAG 2.1 AA mandatory; AAA aspirational?
116
+
117
+ ### Mandatory NFR categories for EdTech
118
+ - **Performance:** lesson load < 2s, video start < 2s, gradebook query < 500ms (p95), assessment submission ack < 1s.
119
+ - **Scalability:** handle the start-of-term spike (10–50× steady-state for 24–72h); support cohort sizes up to N learners simultaneously in live classroom.
120
+ - **Availability:** 99.9% during academic hours; planned maintenance windows must avoid exam periods. Status page mandatory for institutional buyers.
121
+ - **Security:** SSO via SAML / OIDC with rostering provider; RBAC by role and cohort; FERPA / COPPA / GDPR-K compliance; encryption at rest and in transit; audit log of grade changes.
122
+ - **Privacy:** explicit consent flows for under-13 learners; parental access portal; right to delete student data; minimal data collection from minors.
123
+ - **Accessibility:** WCAG 2.1 AA on all learner-facing surfaces; Section 508 conformance for US public-sector contracts; captions and transcripts on every multimedia asset.
124
+ - **Content delivery:** global CDN for video; adaptive bitrate; offline download for mobile.
125
+ - **Backup:** RPO < 1 hour, RTO < 4 hours; gradebook is critical — point-in-time recovery required.
126
+
127
+ ---
128
+
129
+ ## 7. /datadict — Data Dictionary
130
+
131
+ ### Domain-specific interview questions
132
+ - Multi-tenancy: tenant_id (school, district, organisation) on every entity?
133
+ - Soft delete: which entities (Course, Assessment, Submission) keep history for audit and grade-dispute resolution?
134
+ - PII categorisation: what fields are FERPA / COPPA / GDPR-K protected?
135
+
136
+ ### Mandatory entities for EdTech
137
+ - **Learner** — student account: profile, age, guardian link, accessibility prefs, locale.
138
+ - **Instructor** — teacher / course author: profile, qualifications, hosted courses.
139
+ - **Course** — course / module: title, description, prerequisites, learning objectives, status (draft/published).
140
+ - **Lesson** — lesson / unit: order, type (video, reading, quiz), content payload.
141
+ - **Enrolment** — learner ↔ course link: status (active, completed, dropped), start, end, progress %.
142
+ - **Assessment** — quiz / exam: item bank reference, time limit, attempts allowed, passing score.
143
+ - **Submission** — learner answer: content, score, attempt number, submitted_at, graded_by.
144
+ - **GradebookEntry** — gradebook row: learner, course, assessment, score, weight, late?
145
+ - **Certificate** — issued credential: learner, course, issue date, verification URL.
146
+ - **Cohort** — class / group: school, term, instructor, learners.
147
+ - **Guardian** — parent / guardian (K-12): link to learner, contact, consent status.
148
+ - **AuditLog** — grade change, content publish, roster sync events.
149
+
150
+ ---
151
+
152
+ ## 8. /apicontract — API Contract
153
+
154
+ ### Domain-specific interview questions
155
+ - LTI 1.3 / Deep Linking / Names and Roles support required?
156
+ - OneRoster / Clever / ClassLink rostering API as a sync source?
157
+ - xAPI / Caliper Analytics learning-record output for institutional analytics warehouses?
158
+ - Public API for third-party integrations (textbook publishers, exam proctoring, plagiarism detection)?
159
+ - Webhooks for "enrolment created", "assessment submitted", "certificate issued"?
160
+
161
+ ### Typical endpoint groups
162
+ - Auth (SSO via SAML/OIDC, LTI launch, API keys).
163
+ - Courses (CRUD, publish, version, prerequisites).
164
+ - Lessons (CRUD, ordering, media upload).
165
+ - Enrolments (enrol, unenrol, list, progress).
166
+ - Assessments (item bank, start attempt, submit, grade).
167
+ - Gradebook (read, override, audit).
168
+ - Rostering (sync, learner / cohort import).
169
+ - Certificates (issue, verify, list).
170
+ - Analytics (cohort progress, at-risk learners).
171
+ - Admin (tenants, license management, content moderation).
172
+ - Webhooks (outgoing learning events).
173
+
174
+ ---
175
+
176
+ ## 9. /wireframes — Wireframe Descriptions
177
+
178
+ ### Domain-specific interview questions
179
+ - Key screens: course catalog, course landing page, lesson player, assessment player, learner dashboard, instructor dashboard, gradebook, certificate page?
180
+ - Specific states: assessment in progress with countdown timer, network-drop recovery, content locked behind prerequisite, completion confetti, accessibility-large-text mode?
181
+
182
+ ### Typical screens
183
+ - Learner dashboard (continue learning, due assignments, recent grades).
184
+ - Course catalog and search.
185
+ - Course landing page (overview, syllabus, instructor, reviews, enrol button).
186
+ - Lesson player (video / reading / interactive, transcript, notes, navigation).
187
+ - Assessment player (timer, navigation, save-and-resume, submit confirmation).
188
+ - Gradebook (learner view: my grades; instructor view: cohort grades).
189
+ - Instructor course authoring (lesson editor, quiz builder, preview).
190
+ - Instructor cohort dashboard (progress, at-risk, intervention queue).
191
+ - Certificate page (verifiable URL, share to LinkedIn).
192
+ - Parent / guardian portal (K-12): child progress, upcoming work, communications.
193
+ - Admin console (rostering, licenses, content moderation).
194
+ - Live classroom (video grid, whiteboard, chat, polls, breakout rooms) — if synchronous.
195
+
196
+ ---
197
+
198
+ ## Domain Glossary
199
+
200
+ | Term | Definition |
201
+ |------|-----------|
202
+ | LMS | Learning Management System — institutional platform for course delivery and gradebook |
203
+ | LXP | Learning Experience Platform — learner-centric, recommendation-driven evolution of the LMS |
204
+ | MOOC | Massive Open Online Course |
205
+ | LTI | Learning Tools Interoperability — IMS Global standard for embedding tools in an LMS |
206
+ | SCORM | Sharable Content Object Reference Model — legacy standard for packaged learning content |
207
+ | xAPI | Experience API (Tin Can) — modern learning-record format successor to SCORM |
208
+ | Caliper Analytics | IMS Global learning-analytics standard |
209
+ | SIS | Student Information System — system of record for enrolment, schedule, and grades |
210
+ | OneRoster | IMS Global standard for SIS-to-application rostering |
211
+ | Clever / ClassLink | US K-12 rostering and SSO providers |
212
+ | FERPA | Family Educational Rights and Privacy Act (US) — student-record privacy law |
213
+ | COPPA | Children's Online Privacy Protection Act (US) — parental consent for under-13 |
214
+ | GDPR-K | GDPR provisions specific to children's data (EU) |
215
+ | Section 508 | US federal accessibility law for ICT |
216
+ | WCAG 2.1 AA | Web Content Accessibility Guidelines, level AA |
217
+ | Item bank | Pool of assessment questions, randomised per attempt |
218
+ | Cohort | A group of learners progressing through a course together |
219
+ | Proctoring | Identity verification and behaviour monitoring during high-stakes exams |
220
+ | Adaptive learning | Personalisation engine that adjusts difficulty / pace per learner |
221
+ | Micro-credential | Small, verifiable digital certificate (vs. full degree) |
222
+ | Completion rate | % of enrolled learners who finish a course — the canonical EdTech metric |
223
+ | Time on task | Total active time a learner spends on a unit of content |
@@ -0,0 +1,244 @@
1
+ # Domain Reference: GovTech
2
+
3
+ Domain-specific knowledge for GovTech projects: citizen-facing e-services, permits and licensing, public records and FOIA, tax and benefits, identity and digital wallet, public-procurement (eProcurement), municipal 311 and case management, court and justice systems, voter and elections services.
4
+
5
+ ---
6
+
7
+ ## 1. /brief — Project Brief
8
+
9
+ ### Domain-specific interview questions
10
+ - Service type: citizen-facing portal, permit / licence application, tax filing, benefits eligibility, public records request, 311 / non-emergency service request, court e-filing, vendor / procurement portal, internal case-management for caseworkers?
11
+ - Level of government: national / federal, state / regional, municipal / city, agency-internal?
12
+ - Buyer vs. user: who funds the project (agency, ministry, council) vs. who uses it (citizen, caseworker, vendor)?
13
+ - Identity scheme: national digital ID (e.g. Login.gov, BankID, ItsMe, Aadhaar, eIDAS-recognised national eID), agency-issued credential, or self-asserted account?
14
+ - Languages: which official languages must be supported at launch (often legally mandated)?
15
+ - Procurement vehicle: internal build, prime contractor, framework agreement, GovTech sandbox?
16
+
17
+ ### Typical business goals
18
+ - Reduce time-to-service for citizens (cut processing time from weeks to days/minutes).
19
+ - Reduce cost-per-transaction vs. paper / counter / phone channels.
20
+ - Increase digital channel adoption (move citizens off paper and counters).
21
+ - Reduce caseworker manual effort and processing backlog.
22
+ - Improve service satisfaction (customer-effort score, citizen NPS).
23
+ - Meet legislated digital-service targets (e.g. EU SDG single digital gateway, US 21st Century IDEA Act, UK GDS service standard).
24
+
25
+ ### Typical risks
26
+ - Legacy mainframe / system-of-record integration (COBOL, AS/400, custom XML over SOAP) — slow, expensive, fragile.
27
+ - Procurement and approval cycles measured in years, not months.
28
+ - Heightened press / political scrutiny on launch failures.
29
+ - Accessibility lawsuits (Section 508, WCAG 2.1 AA, EN 301 549) — strict and frequent in the public sector.
30
+ - Data residency and sovereignty: many jurisdictions ban sending citizen data abroad.
31
+ - Equity of access — must work on old phones, low bandwidth, with limited literacy, and on assistive tech.
32
+ - Audit, FOIA, and records-retention obligations apply to every transaction.
33
+
34
+ ---
35
+
36
+ ## 2. /srs — Requirements Specification
37
+
38
+ ### Domain-specific interview questions
39
+ - Roles: citizen, authenticated resident, business representative, caseworker, supervisor, agency administrator, auditor, FOIA officer, third-party API consumer?
40
+ - Identity proofing level: NIST IAL1 (self-asserted), IAL2 (remote identity-proofed), IAL3 (in-person verified)? Authentication assurance level (AAL1/2/3)?
41
+ - Multi-tenancy across agencies: shared platform, agency-isolated, cross-agency single sign-on?
42
+ - Legacy integration: which systems of record (tax, benefits, vital records, land registry, criminal-justice information system) must be read or written, and via which protocols (SOAP, REST, fixed-width batch, EDI)?
43
+ - Compliance: WCAG 2.1 AA / EN 301 549, FedRAMP, FISMA, StateRAMP, ISO 27001, SOC 2, NIST 800-53, sector-specific (CJIS for justice, IRS Pub 1075 for tax, HIPAA for health-related benefits)?
44
+ - Records retention: how long must form submissions, attachments, and audit trails be retained (often 7+ years, sometimes permanently)?
45
+
46
+ ### Typical functional areas
47
+ - Identity proofing and authentication (national digital ID broker).
48
+ - Citizen account / dashboard ("my services", "my correspondence", "my documents").
49
+ - Service catalog and eligibility check.
50
+ - Form intake (multi-step, save-and-resume, prefill from system of record).
51
+ - Document upload and verification.
52
+ - Payment of fees (card, ACH/SEPA, cash voucher at counter or post office).
53
+ - Caseworker queue and case management.
54
+ - Decision letters and outbound correspondence (digital + postal).
55
+ - Public records / FOIA request handling.
56
+ - Audit log and records retention.
57
+ - Reporting for agency leadership and oversight bodies.
58
+ - Notifications (email, SMS, postal letter for unbanked / unconnected citizens).
59
+
60
+ ---
61
+
62
+ ## 3. /stories — User Stories
63
+
64
+ ### Domain-specific interview questions
65
+ - Critical citizen flows: discover service, check eligibility, sign in, fill multi-step form, upload documents, pay fee, receive decision, appeal a decision?
66
+ - Critical caseworker flows: pick up case from queue, request more information, approve / deny, escalate to supervisor, archive?
67
+ - Edge cases: incomplete application after 30 days, expired identity proof, payment refund, lost decision letter, FOIA disclosure with redaction, citizen requests records about themselves?
68
+ - Personas: tech-confident citizen, citizen with low digital literacy, citizen using assistive tech, business representative filing on behalf of a company, caseworker, FOIA officer, auditor.
69
+
70
+ ### Typical epics
71
+ - Sign-in via national digital ID.
72
+ - Citizen dashboard ("my services").
73
+ - Service discovery and eligibility check.
74
+ - Application intake (multi-step form with save-and-resume).
75
+ - Document verification.
76
+ - Fee payment.
77
+ - Caseworker queue and decision-making.
78
+ - Outbound correspondence (digital + postal hybrid).
79
+ - Public records / FOIA.
80
+ - Appeals and grievances.
81
+ - Audit log and records retention.
82
+ - Reporting and oversight.
83
+
84
+ ---
85
+
86
+ ## 4. /usecases — Use Cases
87
+
88
+ ### Domain-specific interview questions
89
+ - Critical alternative flows: identity proof fails, payment declines, citizen abandons mid-form, caseworker requests extra documents, supervisor overrides denial, system-of-record write fails after fee was charged?
90
+ - System actors: national digital ID broker, payment processor, system of record (tax, benefits, vital records), postal hybrid mail provider, geocoder / address validator, document verification service, FOIA workflow system?
91
+
92
+ ### Typical exceptional flows
93
+ - Identity proofing fails (KBA / liveness / document check) — fallback to in-person counter.
94
+ - Citizen has no digital identity — alternative paper or phone channel must remain available.
95
+ - Payment declined — resume application in "fee due" status, do not lose form data.
96
+ - Save-and-resume token expires — citizen must re-authenticate but data is preserved.
97
+ - System of record returns an error after the fee is charged — automatic refund and incident ticket.
98
+ - Caseworker decision is appealed — case re-opens with new SLA clock.
99
+ - Records-retention period elapses — automated archival or destruction per schedule.
100
+ - FOIA disclosure with PII redaction — redaction queue + reviewer sign-off.
101
+
102
+ ---
103
+
104
+ ## 5. /ac — Acceptance Criteria
105
+
106
+ ### Domain-specific interview questions
107
+ - Business rules: eligibility criteria per service, document validity periods, fee schedules, statutory processing time limits, appeal windows?
108
+ - Boundary values: max attachment size, max number of attachments, session timeout (often regulated, e.g. 15-min idle for IRS Pub 1075), form completion deadline?
109
+ - Accessibility AC: WCAG 2.1 AA conformance per page, EN 301 549 conformance for EU public sector, screen-reader announcements for form errors, keyboard-only navigation, plain-language reading level (often grade 6–8 mandated)?
110
+
111
+ ---
112
+
113
+ ## 6. /nfr — Non-functional Requirements
114
+
115
+ ### Domain-specific interview questions
116
+ - Concurrency: peak load on tax-filing day, benefits-application opening day, election registration deadline (10–100× steady state)?
117
+ - Channel parity: any service offered online must remain available via paper / phone — what is the legal requirement?
118
+ - Data residency / sovereignty: must all citizen data stay within national borders? Cloud region restrictions?
119
+ - Disaster recovery: RTO/RPO targets dictated by statute or oversight body?
120
+ - Plain language: maximum reading-grade level (often 6–8) enforced by guideline?
121
+
122
+ ### Mandatory NFR categories for GovTech
123
+ - **Performance:** form pages < 2s on a 3G connection; system-of-record write < 5s (p95); search < 1s.
124
+ - **Scalability:** handle the deadline-day spike (e.g. tax day, FAFSA opening, election registration cutoff) without queueing citizens out.
125
+ - **Availability:** 99.9% during published service hours; planned maintenance restricted to off-hours; status page mandatory for citizen services; outage alerts via the agency comms channel.
126
+ - **Security:** FedRAMP Moderate (US federal) / StateRAMP / ISO 27001 / NIST 800-53 controls; encryption at rest and in transit; audit log of every form submission, decision, and access to PII; multi-factor authentication for caseworkers; sector controls (CJIS, IRS Pub 1075, HIPAA) where applicable.
127
+ - **Privacy:** Privacy Impact Assessment on file; minimal data collection; right of access and right of correction; explicit consent for any secondary use; PII is encrypted and logged on access.
128
+ - **Accessibility:** WCAG 2.1 AA mandatory; EN 301 549 for EU public sector; Section 508 conformance for US federal; tested with assistive tech (NVDA, JAWS, VoiceOver, Dragon).
129
+ - **Plain language:** target reading grade 6–8; multi-language coverage of all official languages; avoidance of jargon and acronyms.
130
+ - **Records retention:** retention schedule per record type (often 7+ years; permanent for some categories); legal hold flag freezes deletion; FOIA-ready export.
131
+ - **Data residency:** all citizen data stored in the relevant jurisdiction; cloud region locked.
132
+ - **Backup:** RPO < 15 min for transactional state, RTO < 4 hours; offsite backup; tested DR runbook.
133
+
134
+ ---
135
+
136
+ ## 7. /datadict — Data Dictionary
137
+
138
+ ### Domain-specific interview questions
139
+ - Multi-tenancy by agency: agency_id on every entity?
140
+ - PII categorisation: which fields are SSN / national ID / DOB / address — and how are they protected (encryption, tokenisation, masked in UI)?
141
+ - Records-retention metadata: every record has a retention class, retention start, scheduled disposal date?
142
+ - Audit trail: every read of PII is logged with actor, reason, timestamp?
143
+
144
+ ### Mandatory entities for GovTech
145
+ - **Citizen** — identity-proofed natural person: name, date of birth, national ID (encrypted), verified address.
146
+ - **Account** — login account: link to Citizen, identity assurance level, MFA enrolment, last sign-in.
147
+ - **Service** — service catalog entry: title, agency, eligibility criteria, fee schedule.
148
+ - **Application** — submitted form instance: service, citizen, status, submission timestamp, fee paid.
149
+ - **FormPage** — multi-step form state: application, page, answers (versioned for save-and-resume).
150
+ - **Document** — uploaded attachment: application, type, file hash, virus-scan status, retention class.
151
+ - **Payment** — fee transaction: application, amount, channel (card, ACH/SEPA, voucher), provider reference.
152
+ - **Case** — caseworker workflow item: application, assigned caseworker, status, SLA clock.
153
+ - **Decision** — outcome: case, decision (approve / deny / request more info), reason, decision date, appealable until.
154
+ - **Correspondence** — outbound message: case, channel (digital, postal, both), template, sent_at, delivery status.
155
+ - **Caseworker** — internal staff: agency, role, MFA status, security clearance level if applicable.
156
+ - **AuditLog** — append-only record: actor, action, target, timestamp, IP, reason (mandatory for PII reads).
157
+ - **RecordsHold** — legal hold marker: entity, hold reason, hold date, lifted_at.
158
+ - **FoiaRequest** — public records request: requester, scope, status, redacted disclosure document, decision date.
159
+
160
+ ---
161
+
162
+ ## 8. /apicontract — API Contract
163
+
164
+ ### Domain-specific interview questions
165
+ - Identity broker integration: SAML 2.0 / OIDC against the national digital ID provider — which assurance levels and claims?
166
+ - System-of-record APIs: SOAP / REST / batch — what authentication (mTLS, signed JWT, IP allow-list)?
167
+ - Public APIs for civic-tech developers: open by default vs. registered keys?
168
+ - Webhook outputs for status changes ("application submitted", "decision issued") to other agency systems?
169
+ - Open-data exports (CSV / JSON / GeoJSON) for transparency and oversight?
170
+
171
+ ### Typical endpoint groups
172
+ - Auth (national digital ID broker callback, MFA enrolment, session refresh).
173
+ - Citizen profile (read, update verified attributes, consent management).
174
+ - Services (catalog, eligibility check).
175
+ - Applications (start, save, submit, list mine, list mine in progress).
176
+ - Documents (upload, virus-scan status, redact, download).
177
+ - Payments (initiate, callback, refund, receipt).
178
+ - Cases (caseworker queue, assign, decide, escalate).
179
+ - Correspondence (templates, send, status).
180
+ - Audit (read by auditor / oversight role only).
181
+ - FOIA (intake, status, disclosure download).
182
+ - Open data (anonymised statistics, machine-readable).
183
+ - Webhooks (outgoing events to other agency systems).
184
+
185
+ ---
186
+
187
+ ## 9. /wireframes — Wireframe Descriptions
188
+
189
+ ### Domain-specific interview questions
190
+ - Key screens: service discovery, eligibility check, sign-in via national ID, multi-step form with save-and-resume, document upload, fee payment, application status, decision letter view, appeal form, caseworker queue, caseworker decision form?
191
+ - Specific states: identity proofing failed, save-and-resume token expired, payment failed, application incomplete after N days, decision pending appeal, redacted FOIA disclosure?
192
+ - Plain-language and accessibility states: large-text mode, high-contrast mode, screen-reader announcements for form errors, language switcher prominently placed?
193
+
194
+ ### Typical screens
195
+ - Service catalog (browse and search by life event: "having a baby", "moving house", "starting a business").
196
+ - Eligibility check (short pre-form to filter ineligible applicants out before identity proofing).
197
+ - Sign-in / identity proofing flow (national ID broker handoff, fallback to in-person).
198
+ - Citizen dashboard (in-progress applications, recent decisions, correspondence inbox).
199
+ - Multi-step form (progress indicator, save-and-resume, plain-language help, inline error messages).
200
+ - Document upload (drag-and-drop, list of accepted types, virus-scan progress).
201
+ - Fee payment (channel choice, receipt).
202
+ - Application status (timeline with statutory SLA clock).
203
+ - Decision letter (digital copy, postal copy mailed, appeal button if applicable).
204
+ - Appeal form (separate flow with its own SLA).
205
+ - Caseworker queue (filter by status, SLA, priority; bulk-assign).
206
+ - Caseworker decision form (read-only application, decision options, reason text, supervisor escalation).
207
+ - Audit screen (read-only, restricted to auditor role).
208
+ - FOIA intake (public form, no sign-in required).
209
+ - Public service status page.
210
+
211
+ ---
212
+
213
+ ## Domain Glossary
214
+
215
+ | Term | Definition |
216
+ |------|-----------|
217
+ | FedRAMP | US federal cloud-security authorisation programme |
218
+ | StateRAMP | US state-level analogue of FedRAMP |
219
+ | FISMA | Federal Information Security Modernization Act (US) |
220
+ | NIST 800-53 | US federal security and privacy controls catalog |
221
+ | CJIS | Criminal Justice Information Services security policy (FBI) |
222
+ | IRS Pub 1075 | US IRS rules for handling federal tax information |
223
+ | eIDAS | EU regulation on electronic identification and trust services |
224
+ | SDG | Single Digital Gateway (EU) — single point of access for cross-border services |
225
+ | GDS | UK Government Digital Service — sets the UK service standard |
226
+ | 21st Century IDEA Act | US law mandating digital service modernisation |
227
+ | EN 301 549 | EU public-sector accessibility standard |
228
+ | WCAG 2.1 AA | Web Content Accessibility Guidelines, level AA |
229
+ | Section 508 | US federal accessibility law for ICT |
230
+ | Login.gov | US federal shared sign-in service |
231
+ | BankID | Nordic national digital ID scheme |
232
+ | ItsMe | Belgian national digital ID |
233
+ | Aadhaar | Indian national digital ID |
234
+ | IAL / AAL | NIST identity-assurance and authentication-assurance levels |
235
+ | KBA | Knowledge-Based Authentication |
236
+ | FOIA | Freedom of Information Act — public records request regime |
237
+ | Privacy Impact Assessment (PIA) | Mandatory privacy review of any system that processes PII |
238
+ | Records retention schedule | Legally mandated table of how long each record class must be kept |
239
+ | Legal hold | Marker that freezes deletion of records subject to litigation or audit |
240
+ | Plain language | Mandated writing standard targeting reading grade 6–8 |
241
+ | Hybrid mail | Postal letter generated digitally and printed by a contracted provider |
242
+ | 311 | Non-emergency municipal service request channel (US) |
243
+ | eFiling | Electronic submission of court documents |
244
+ | eProcurement | Public-sector vendor and bid management |
@@ -15,7 +15,7 @@ Second step of the BA Toolkit pipeline. Generates an SRS adapted from IEEE 830.
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
17
  2. Extract: slug, domain, business goals, functionality, stakeholders, constraints, glossary.
18
- 3. If a matching `references/domains/{domain}.md` file exists (currently: `saas`, `fintech`, `ecommerce`, `healthcare`, `logistics`, `on-demand`, `social-media`, `real-estate`, `igaming`), load it and apply its section `2. /srs`.
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
21
21