@keber/qa-framework 1.0.4

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 (51) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +233 -0
  3. package/agent-instructions/00-module-analysis.md +263 -0
  4. package/agent-instructions/01-spec-generation.md +278 -0
  5. package/agent-instructions/02-test-plan-generation.md +202 -0
  6. package/agent-instructions/03-test-case-generation.md +147 -0
  7. package/agent-instructions/04-automation-generation.md +310 -0
  8. package/agent-instructions/04b-test-stabilization.md +306 -0
  9. package/agent-instructions/05-ado-integration.md +244 -0
  10. package/agent-instructions/06-maintenance.md +125 -0
  11. package/docs/architecture.md +227 -0
  12. package/docs/comparison-matrix.md +131 -0
  13. package/docs/final-report.md +279 -0
  14. package/docs/folder-structure-guide.md +291 -0
  15. package/docs/generalization-decisions.md +203 -0
  16. package/docs/installation.md +239 -0
  17. package/docs/spec-driven-philosophy.md +170 -0
  18. package/docs/usage-with-agent.md +203 -0
  19. package/examples/module-example/README.md +34 -0
  20. package/examples/module-example/suppliers/00-inventory.md +56 -0
  21. package/examples/module-example/suppliers/suppliers-create.spec.ts +148 -0
  22. package/integrations/ado-powershell/README.md +75 -0
  23. package/integrations/ado-powershell/pipelines/azure-pipeline-qa.yml +133 -0
  24. package/integrations/ado-powershell/scripts/create-testplan-from-mapping.ps1 +114 -0
  25. package/integrations/ado-powershell/scripts/inject-ado-ids.ps1 +96 -0
  26. package/integrations/ado-powershell/scripts/sync-ado-titles.ps1 +93 -0
  27. package/integrations/playwright/README.md +68 -0
  28. package/integrations/playwright-azure-reporter/README.md +88 -0
  29. package/package.json +57 -0
  30. package/qa-framework.config.json +87 -0
  31. package/scripts/cli.js +74 -0
  32. package/scripts/generate.js +92 -0
  33. package/scripts/init.js +322 -0
  34. package/scripts/validate.js +184 -0
  35. package/templates/automation-scaffold/.env.example +56 -0
  36. package/templates/automation-scaffold/fixtures/auth.ts +77 -0
  37. package/templates/automation-scaffold/fixtures/test-helpers.ts +85 -0
  38. package/templates/automation-scaffold/global-setup.ts +106 -0
  39. package/templates/automation-scaffold/package.json +24 -0
  40. package/templates/automation-scaffold/playwright.config.ts +85 -0
  41. package/templates/defect-report.md +101 -0
  42. package/templates/execution-report.md +116 -0
  43. package/templates/session-summary.md +73 -0
  44. package/templates/specification/00-inventory.md +81 -0
  45. package/templates/specification/01-business-rules.md +90 -0
  46. package/templates/specification/02-workflows.md +114 -0
  47. package/templates/specification/03-roles-permissions.md +49 -0
  48. package/templates/specification/04-test-data.md +104 -0
  49. package/templates/specification/05-test-scenarios.md +226 -0
  50. package/templates/test-case.md +81 -0
  51. package/templates/test-plan.md +130 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,53 @@
1
+ # Changelog
2
+
3
+ All notable changes to `qa-framework` will be documented in this file.
4
+
5
+ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
+ Versioning follows [Semantic Versioning](https://semver.org/).
7
+
8
+ ---
9
+
10
+ ## [1.0.0] - 2026-03-04
11
+
12
+ ### Added
13
+
14
+ - **Framework scaffold** — initial `qa/` directory tree with 9 numbered folders (00–08)
15
+ - **6-file submodule template set** — `00-inventory` through `05-test-scenarios`
16
+ - **Agent instructions** — 7 purpose-specific Markdown instruction files for IDE agents
17
+ - **Standards** — naming conventions, bug report template, test case template, test data guidelines
18
+ - **Automation scaffold** — generalized Playwright `playwright.config.ts`, `global-setup.ts`, `.env.example`, `fixtures/auth.ts`
19
+ - **Optional integrations** — stubs and READMEs for Playwright, `playwright-azure-reporter`, and ADO PowerShell
20
+ - **CLI entry point** — `qa-framework init`, `generate`, `validate` commands
21
+ - **Documentation** — architecture, comparison matrix, generalization decisions, installation guide, usage-with-agent guide, spec-driven philosophy, folder structure guide
22
+ - **Migration notes** — `MIGRATION-NOTES.md` for projects moving from embedded to package-based framework
23
+
24
+ ### Source repositories
25
+
26
+ This version was bootstrapped from analysis of two existing embedded QA implementations:
27
+
28
+ - `redacted-repo` (Repo A) — ASP.NET MVC 5 + jQuery + toastr + Sprint-based E2E
29
+ - `redacted-repo` (Repo B) — Blazor WebAssembly + Radzen + full ADO pipeline integration
30
+
31
+ All project-specific content (URLs, ADO IDs, user credentials, module names, form selectors)
32
+ has been removed or parameterized. See `docs/comparison-matrix.md` and `docs/generalization-decisions.md`.
33
+
34
+ ---
35
+
36
+ ## [Unreleased]
37
+
38
+ ### Added
39
+
40
+ - **Stage 3.5 — Test Stabilization** (`agent-instructions/04b-test-stabilization.md`) — new agent
41
+ instruction file for exhaustively reviewing and stabilizing generated Playwright tests before
42
+ ADO integration. Covers baseline collection, failure classification (9 categories), false-positive
43
+ validation, confidence scoring (≥90% exit threshold), `STABILIZATION-REPORT.md` schema, and
44
+ upstream artifact update rules. Sits between Stage 4 (Automation Generation) and Stage 5
45
+ (ADO Integration) and is mandatory before any CI pipeline registration.
46
+
47
+ ### Planned
48
+
49
+ - `qa-framework generate spec <module-name>` — scaffold a full spec set from CLI
50
+ - `qa-framework validate` — check `qa/` structure for compliance with conventions
51
+ - `qa-framework upgrade` — migrate old embedded structure to package-based layout
52
+ - Integration: `jest` support alongside Playwright
53
+ - Integration: GitHub Actions pipeline template (alongside existing Azure Pipelines template)
package/README.md ADDED
@@ -0,0 +1,233 @@
1
+ # qa-framework
2
+
3
+ > Reusable, installable, agent-oriented QA framework for spec-driven automated testing.
4
+
5
+ ---
6
+
7
+ ## What is this?
8
+
9
+ `qa-framework` is a methodology package that provides:
10
+
11
+ - **A standardized `qa/` directory structure** for any project
12
+ - **Reusable templates** for specifications, test plans, test cases, defect reports, and execution reports
13
+ - **Agent instructions** (for GitHub Copilot and equivalent IDE agents) that enable AI-assisted QA work
14
+ - **Optional integrations** for Playwright and Azure DevOps
15
+ - **Bootstrap commands** to scaffold the structure into any project in seconds
16
+
17
+ This framework was designed to be:
18
+
19
+ | Property | Description |
20
+ |---|---|
21
+ | **Reusable** | Not tied to any specific project, domain, or tech stack |
22
+ | **Decoupled** | Core is independent from Azure DevOps, Playwright, or any other tool |
23
+ | **Agent-oriented** | Instructions are written for IDE agents (Copilot, etc.) to consume |
24
+ | **Spec-driven** | Every automation artifact traces back to a specification |
25
+ | **Extensible** | Adapters/plugins for optional integrations are well-separated |
26
+
27
+ ---
28
+
29
+ ## Quick Start
30
+
31
+ ### Option A: Install from npm (recommended)
32
+
33
+ ```bash
34
+ npm install --save-dev github:keber/qa-framework
35
+ npx qa-framework init
36
+ ```
37
+
38
+ ### Option B: Clone directly (during early adoption)
39
+
40
+ ```bash
41
+ # Clone into your project's tools directory or as a submodule
42
+ git clone <this-repo> tools/qa-framework
43
+ node tools/qa-framework/scripts/cli.js init
44
+ ```
45
+
46
+ The `init` command will:
47
+
48
+ 1. Create the `qa/` directory tree in your project root
49
+ 2. Copy all base templates into place
50
+ 3. Create `qa/qa-framework.config.json` for project-specific settings
51
+ 4. Optionally set up Playwright and Azure DevOps integrations
52
+
53
+ ---
54
+
55
+ ## Repository Structure (this package)
56
+
57
+ ```
58
+ qa-framework/
59
+ ├── README.md ← This file
60
+ ├── CHANGELOG.md ← Version history
61
+ ├── MIGRATION-NOTES.md ← How to migrate from embedded to package
62
+ ├── package.json ← npm descriptor
63
+ ├── qa-framework.config.json ← Example config (copy to project)
64
+
65
+ ├── docs/ ← Framework documentation
66
+ │ ├── architecture.md ← Design decisions and component map
67
+ │ ├── comparison-matrix.md ← Source-repo analysis (Phase 1 artifact)
68
+ │ ├── generalization-decisions.md ← What was abstracted and why (Phase 2 artifact)
69
+ │ ├── installation.md ← Detailed installation guide
70
+ │ ├── usage-with-agent.md ← How to use the framework with an IDE agent
71
+ │ ├── spec-driven-philosophy.md ← Core QA methodology
72
+ │ └── folder-structure-guide.md ← Explanation of every qa/ folder
73
+
74
+ ├── agent-instructions/ ← Instructions for AI agents, per task
75
+ │ ├── 00-module-analysis.md
76
+ │ ├── 01-spec-generation.md
77
+ │ ├── 02-test-plan-generation.md
78
+ │ ├── 03-test-case-generation.md
79
+ │ ├── 04-automation-generation.md
80
+ │ ├── 04b-test-stabilization.md
81
+ │ ├── 05-ado-integration.md
82
+ │ └── 06-maintenance.md
83
+
84
+ ├── templates/ ← Reusable file templates
85
+ │ ├── specification/ ← 6-file submodule set
86
+ │ │ ├── 00-inventory.md
87
+ │ │ ├── 01-business-rules.md
88
+ │ │ ├── 02-workflows.md
89
+ │ │ ├── 03-roles-permissions.md
90
+ │ │ ├── 04-test-data.md
91
+ │ │ └── 05-test-scenarios.md
92
+ │ ├── test-plan.md
93
+ │ ├── test-case.md
94
+ │ ├── execution-report.md
95
+ │ ├── defect-report.md
96
+ │ ├── session-summary.md
97
+ │ └── automation-scaffold/ ← Files to bootstrap a Playwright E2E project
98
+ │ ├── package.json
99
+ │ ├── playwright.config.ts
100
+ │ ├── global-setup.ts
101
+ │ ├── .env.example
102
+ │ └── fixtures/
103
+ │ └── auth.ts
104
+
105
+ ├── integrations/ ← Optional integration adapters
106
+ │ ├── playwright/
107
+ │ │ └── README.md
108
+ │ ├── playwright-azure-reporter/
109
+ │ │ └── README.md
110
+ │ └── ado-powershell/
111
+ │ ├── README.md
112
+ │ └── scripts/
113
+ │ ├── inject-ado-ids.ps1
114
+ │ ├── create-testplan-from-mapping.ps1
115
+ │ └── sync-ado-titles.ps1
116
+
117
+ ├── examples/ ← Reference examples (non-project-specific)
118
+ │ └── module-example/
119
+ │ ├── README.md
120
+ │ └── submodule-example/ ← Full 6-file spec example
121
+
122
+ └── scripts/ ← CLI commands
123
+ ├── cli.js ← Entry point (qa-framework <command>)
124
+ ├── init.js ← Scaffold qa/ tree
125
+ ├── generate.js ← Generate individual artifact
126
+ └── validate.js ← Check structure compliance
127
+ ```
128
+
129
+ ---
130
+
131
+ ## The `qa/` Directory Structure
132
+
133
+ When you run `qa-framework init`, this structure is created inside your project:
134
+
135
+ ```
136
+ qa/
137
+ ├── README.md ← Living index of all QA artifacts
138
+ ├── QA-STRUCTURE-GUIDE.md ← Local copy of the structure guide
139
+
140
+ ├── 00-guides/ ← Process guides and agent instructions
141
+ ├── 00-standards/ ← Naming conventions, templates, data policies
142
+ ├── 01-specifications/ ← Functional specs by module/submodule
143
+ ├── 02-test-plans/ ← Test plans (automated + manual)
144
+ ├── 03-test-cases/ ← Explicit test case documents
145
+ ├── 04-test-data/ ← Test data, fixtures, factories
146
+ ├── 05-test-execution/ ← Execution reports and results
147
+ ├── 06-defects/ ← Defect tracking (optional)
148
+ ├── 07-automation/ ← Automation code and config
149
+ └── 08-azure-integration/ ← Azure DevOps integration (optional)
150
+ ```
151
+
152
+ See [docs/folder-structure-guide.md](docs/folder-structure-guide.md) for a full explanation of every folder.
153
+
154
+ ---
155
+
156
+ ## Agent Instructions
157
+
158
+ The `agent-instructions/` folder contains Markdown documents designed for IDE agents
159
+ (such as GitHub Copilot in VS Code). Each file covers one specific task:
160
+
161
+ | File | Agent Task |
162
+ |---|---|
163
+ | `00-module-analysis.md` | Analyze a module and produce the 6-file spec set |
164
+ | `01-spec-generation.md` | Generate functional specifications |
165
+ | `02-test-plan-generation.md` | Create a test plan for a module |
166
+ | `03-test-case-generation.md` | Generate detailed test cases |
167
+ | `04-automation-generation.md` | Write Playwright E2E tests |
168
+ | `04b-test-stabilization.md` | Exhaustively review and stabilize generated tests (Stage 3.5) |
169
+ | `05-ado-integration.md` | Sync with Azure DevOps Test Plans |
170
+ | `06-maintenance.md` | Update QA artifacts after code changes |
171
+
172
+ To use: copy the relevant instruction into a Copilot/agent chat, or reference it from a
173
+ `.github/copilot-instructions.md` or equivalent workspace instruction file.
174
+
175
+ ---
176
+
177
+ ## Configuration
178
+
179
+ `qa-framework init` now bootstraps a default config automatically at `qa/qa-framework.config.json` if none exists.
180
+
181
+ You can then edit that file, or place a config in your project root (`qa-framework.config.json`) and run `init` again. You can also pass a specific file with `--config <path>`.
182
+
183
+ Example config:
184
+
185
+ ```json
186
+ {
187
+ "project": {
188
+ "name": "my-project",
189
+ "qaBaseUrl": "https://your-qa-env.example.com"
190
+ },
191
+ "modules": [],
192
+ "integrations": {
193
+ "playwright": { "enabled": false },
194
+ "azureDevOps": { "enabled": false }
195
+ }
196
+ }
197
+ ```
198
+
199
+ See [docs/installation.md](docs/installation.md) for full config documentation.
200
+
201
+ ---
202
+
203
+ ## Design Principles
204
+
205
+ 1. **UI is the source of truth.** Test cases are defined from what is observable in the running QA environment, not from source code or requirements docs alone.
206
+ 2. **Spec before automation.** Every automated test traces back to a written specification (TC-ID → spec file).
207
+ 3. **Credentials never in documentation.** All credentials are handled via environment variables and sanitized from markdown with `<PLACEHOLDER>`.
208
+ 4. **Agent-readable conventions.** File names, folder names, and IDs follow strict, predictable patterns so agents can navigate without guessing.
209
+ 5. **Optional integrations don't pollute the core.** Azure DevOps and Playwright configuration live in separate, opt-in sections.
210
+
211
+ ---
212
+
213
+ ## Versioning
214
+
215
+ This framework follows [Semantic Versioning](https://semver.org/):
216
+
217
+ - **MAJOR**: breaking changes to the `qa/` directory structure or agent instruction APIs
218
+ - **MINOR**: new templates, new optional integrations, new agent instruction files
219
+ - **PATCH**: bug fixes in CLI scripts, documentation corrections
220
+
221
+ See [CHANGELOG.md](CHANGELOG.md) for detailed history.
222
+
223
+ ---
224
+
225
+ ## Contributing / Adapting
226
+
227
+ This framework is designed to be forked and adapted. If you need a project-specific adapter:
228
+
229
+ 1. Create a new `integrations/<adapter-name>/` folder
230
+ 2. Place your adapter config and scripts there
231
+ 3. Reference it from `qa-framework.config.json` under `integrations`
232
+
233
+ Do **not** put project-specific configuration inside `agent-instructions/` or `templates/`. Those must remain generic.
@@ -0,0 +1,263 @@
1
+ # Agent Instructions: Module Analysis
2
+
3
+ **File**: `agent-instructions/00-module-analysis.md`
4
+ **Purpose**: Instructions for an AI agent to perform complete functional analysis of an application module and produce the 6-file specification set.
5
+
6
+ ---
7
+
8
+ ## When to use these instructions
9
+
10
+ Use this instruction set when:
11
+ - Analyzing a new module for the first time
12
+ - A module has been updated and its spec needs to be refreshed
13
+ - Building the initial `01-specifications/` tree for a project
14
+
15
+ ---
16
+
17
+ ## Prerequisites (Agent must verify before starting)
18
+
19
+ 1. Confirm that `qa-framework.config.json` exists and contains `project.qaBaseUrl`
20
+ 2. Confirm that `qa/00-standards/naming-conventions.md` is available
21
+ 3. Confirm that the Playwright CLI (playwright-mcp or equivalent) is available for browser interaction
22
+ 4. Ask the user for:
23
+ - The module name and URL (or route prefix) to analyze
24
+ - The submodules to analyze (if known; otherwise discover from the UI)
25
+ - QA user credentials (handle via env vars — never store in markdown)
26
+
27
+ **⚠️ SECURITY**: Never write real credentials to any file. If credentials appear in any output, replace immediately with `<PLACEHOLDER>`.
28
+
29
+ ---
30
+
31
+ ## Phase 1 — Preparation
32
+
33
+ ### 1.1 Review existing specs
34
+
35
+ Check if a `qa/01-specifications/module-{name}/` directory already exists.
36
+
37
+ - If it does: read all existing files to understand what is already documented. Only re-analyze what has changed.
38
+ - If it does not: create the directory structure.
39
+
40
+ ### 1.2 Generate module code
41
+
42
+ If no module code exists yet, allocate a unique 2–6 uppercase letter code for the module.
43
+ Check `qa/00-standards/naming-conventions.md` for existing codes to avoid conflicts.
44
+
45
+ Example: module "Operación" → code `OPER`; submodule "Catálogos" → code `CAT`
46
+
47
+ ### 1.3 Plan the session
48
+
49
+ Identify all submodules in scope. A submodule typically corresponds to:
50
+ - A distinct menu item or section in the application
51
+ - A distinct CRUD entity (users, products, orders, etc.)
52
+ - A distinct workflow (approval, registration, reporting)
53
+
54
+ Document the planned submodules in `qa/01-specifications/module-{name}/README.md` before analysis begins.
55
+
56
+ ---
57
+
58
+ ## Phase 2 — Exploration
59
+
60
+ For each submodule, perform the following exploration using browser automation (Playwright CLI):
61
+
62
+ ### 2.1 Navigation and route mapping
63
+
64
+ ```
65
+ Navigate to {{QA_BASE_URL}} and log in with the appropriate role
66
+ Navigate to the submodule URL
67
+ Record:
68
+ - Full URL of each page/view
69
+ - Page title
70
+ - Navigation breadcrumb
71
+ ```
72
+
73
+ ### 2.2 UI inventory
74
+
75
+ For each screen in the submodule:
76
+
77
+ ```
78
+ Record all:
79
+ - Input fields (name, type, required/optional, validation rules visible in UI)
80
+ - Dropdowns (static or dynamic/AJAX, options if static)
81
+ - Buttons (action, what they trigger)
82
+ - Tables/grids (columns, default sorting, pagination)
83
+ - Modals (trigger condition, fields, confirmation behavior)
84
+ - Status indicators / badges / alerts
85
+ - File upload / download controls
86
+ ```
87
+
88
+ ### 2.3 API endpoint discovery
89
+
90
+ ```
91
+ Observe network requests during key interactions (create, read, update, delete)
92
+ Record:
93
+ - Endpoint path (e.g., /api/GetUsers, api/CreateUser)
94
+ - HTTP method
95
+ - Request payload shape (field names)
96
+ - Response shape (key fields)
97
+ ```
98
+
99
+ ### 2.4 Role-based access testing
100
+
101
+ ```
102
+ For each configured test user role:
103
+ Log in as that role
104
+ Navigate to the submodule
105
+ Record: can access? (YES / NO / PERMISSION_ERROR)
106
+ Record: which actions are available vs hidden
107
+ ```
108
+
109
+ ### 2.5 Workflow discovery
110
+
111
+ ```
112
+ Execute the primary happy path with appropriate test data
113
+ Record each step
114
+ Identify branch points (e.g., approve vs reject)
115
+ Record state transitions
116
+ ```
117
+
118
+ ### 2.6 Business rule discovery
119
+
120
+ ```
121
+ Attempt invalid inputs for each validation
122
+ Record: validation message text, field that shows the error
123
+ Attempt boundary conditions (empty, max length, duplicate, etc.)
124
+ Record: system behavior
125
+ ```
126
+
127
+ ---
128
+
129
+ ## Phase 3 — Documentation (6-file output)
130
+
131
+ Produce the following files for each submodule. Use the templates in `qa/00-standards/` and `templates/specification/`.
132
+
133
+ ### File 00: `00-inventory.md`
134
+
135
+ Contents:
136
+ - Module header (name, code, URL, deployment date if known)
137
+ - Submodule header (name, code, routes)
138
+ - UI element inventory table
139
+ - Element name | Type | Required | Notes
140
+ - API endpoint table
141
+ - Method | Path | Purpose
142
+ - Key identifiers and selectors observed in the UI
143
+
144
+ ### File 01: `01-business-rules.md`
145
+
146
+ Contents:
147
+ - Each rule as `RN-{MODULE}-{NNN}`: Description
148
+ - Rule type: Validation / Access Control / State Machine / Calculation / Integration
149
+ - Trigger: what user action triggers this rule
150
+ - Error message: exact text shown when rule is violated (if applicable)
151
+
152
+ Aim for 5–15 business rules per submodule.
153
+
154
+ ### File 02: `02-workflows.md`
155
+
156
+ Contents:
157
+ - Each major workflow as `FL-{MODULE}-{NNN}`: Title
158
+ - Use ASCII flowchart or Mermaid block diagram
159
+ - Cover: happy path + main alternative paths + error paths
160
+
161
+ ### File 03: `03-roles-permissions.md`
162
+
163
+ Contents:
164
+ - Role × Feature matrix table
165
+ - Row: test user role
166
+ - Column: feature/action (view, create, edit, delete, approve, export, etc.)
167
+ - Cell: ✅ / ❌ / ⚠️ (limited)
168
+ - Notes on role inheritance or conditional access
169
+
170
+ ### File 04: `04-test-data.md`
171
+
172
+ Contents:
173
+ - Prerequisites: what data must exist before tests run
174
+ - Data shapes: for each key test scenario, what data is needed
175
+ - DO NOT include real user credentials
176
+ - Use env var references for any credential: `process.env.QA_USER_EMAIL`
177
+ - Data dependencies between submodules (if any)
178
+
179
+ ### File 05: `05-test-scenarios.md`
180
+
181
+ Contents:
182
+ - Summary table at top: total TCs, by priority, by type
183
+ - For each TC:
184
+ - ID: `TC-{MODULE}-{SUBMODULE}-{NNN}`
185
+ - Title: brief action description
186
+ - Priority: P0 / P1 / P2 / P3
187
+ - Type: Functional / Regression / Security / Negative / Integration
188
+ - Origin: `UI-OBSERVED` / `PENDING-CODE` / `BLOCKED-PERMISSIONS`
189
+ - Preconditions
190
+ - Steps (numbered)
191
+ - Expected result
192
+ - Automation feasibility: Yes / Partial / No
193
+
194
+ Target: **50–85 TCs per submodule** is a well-analyzed submodule.
195
+
196
+ #### TC coverage must include:
197
+ - ✅ Access control (each role: can access / cannot access)
198
+ - ✅ Happy path (primary workflow end-to-end)
199
+ - ✅ Negative scenarios (required field empty, invalid format, duplicate, etc.)
200
+ - ✅ State transitions (create → edit → delete; pending → approved → rejected)
201
+ - ✅ Cross-module dependencies (if any)
202
+ - ✅ Export/download (if feature exists)
203
+ - ✅ Pagination/search (if feature exists)
204
+
205
+ TC origin rules:
206
+ - Only write `UI-OBSERVED` if you directly observed the behavior in the QA environment
207
+ - If a feature is documented but not visible in the QA environment: `PENDING-CODE`
208
+ - If you couldn't test it due to permission restrictions: `BLOCKED-PERMISSIONS`
209
+
210
+ ---
211
+
212
+ ## Phase 4 — Review and Session Summary
213
+
214
+ ### 4.1 Completeness checklist
215
+
216
+ After completing all submodule files, verify:
217
+
218
+ - [ ] All menu items in the module have a corresponding submodule folder
219
+ - [ ] All TCs marked `UI-OBSERVED` were actually observed in this session
220
+ - [ ] `01-business-rules.md` covers all visible validation behaviors
221
+ - [ ] `03-roles-permissions.md` reflects the access observed for each role
222
+ - [ ] No credentials appear in any file
223
+ - [ ] All TC IDs are unique across the module
224
+ - [ ] Module README lists all submodules with their codes and TC counts
225
+
226
+ ### 4.2 Write session summary
227
+
228
+ Create `qa/SESSION-SUMMARY-{YYYY-MM-DD}.md` with:
229
+
230
+ ```markdown
231
+ # Session Summary — {YYYY-MM-DD}
232
+
233
+ ## Module analyzed
234
+ {module-name} ({module-code})
235
+
236
+ ## Submodules documented
237
+ | Submodule | Code | TC count | Notes |
238
+ |-----------|------|----------|-------|
239
+ | {name} | {code} | {N} | {any notable blocking issues} |
240
+
241
+ ## Files created
242
+ - {list of all files created with their paths}
243
+
244
+ ## Blockers
245
+ - {any features that couldn't be analyzed and why}
246
+
247
+ ## Observations for next session
248
+ - {what to tackle next}
249
+ ```
250
+
251
+ ---
252
+
253
+ ## Quality Standards
254
+
255
+ A well-executed module analysis session:
256
+
257
+ 1. Takes between 2-6 hours depending on module complexity
258
+ 2. Produces 6 files per submodule (not more, not less)
259
+ 3. Has no hardcoded credentials in any file
260
+ 4. Has TC IDs that follow the `TC-{MODULE}-{SUBMODULE}-{NNN}` pattern
261
+ 5. Has business rules that are verifiable in automated tests
262
+ 6. Has at least 1 P0 TC per submodule (the primary happy path)
263
+ 7. Does not invent TCs for behavior that wasn't observed in the QA environment