@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
@@ -0,0 +1,291 @@
1
+ # docs/folder-structure-guide.md
2
+
3
+ ## `qa/` Directory Structure — Full Reference Guide
4
+
5
+ This document explains the purpose, contents, and conventions for every folder in the `qa/` directory.
6
+
7
+ ---
8
+
9
+ ## Overview
10
+
11
+ ```
12
+ qa/
13
+ ├── README.md ← Living master index (project-maintained)
14
+ ├── QA-STRUCTURE-GUIDE.md ← Copy of this guide (installed by framework)
15
+ ├── qa-framework.config.json ← Project configuration
16
+
17
+ ├── 00-guides/ ← Process guides and agent instructions
18
+ ├── 00-standards/ ← Naming conventions and artifact templates
19
+ ├── 01-specifications/ ← Functional specifications per module
20
+ ├── 02-test-plans/ ← Test plans (scope + priority decisions)
21
+ ├── 03-test-cases/ ← Standalone test case documents
22
+ ├── 04-test-data/ ← Test data definitions and factories
23
+ ├── 05-test-execution/ ← Execution reports and results
24
+ ├── 06-defects/ ← Defect tracking (optional)
25
+ ├── 07-automation/ ← Automation code (Playwright, etc.)
26
+ └── 08-azure-integration/ ← Azure DevOps integration (optional)
27
+ ```
28
+
29
+ ---
30
+
31
+ ## 00-guides/
32
+
33
+ **Purpose**: Process guides and operating instructions for both humans and agents.
34
+
35
+ **Installed by framework** (not project-maintained):
36
+
37
+ | File | Contents |
38
+ |---|---|
39
+ | `README.md` | Index with reading order by persona |
40
+ | `AGENT-INSTRUCTIONS-MODULE-ANALYSIS.md` | How to analyze a module (4-phase process) |
41
+ | `AGENT-INSTRUCTIONS-SPEC-GENERATION.md` | How to produce the 6-file spec set |
42
+ | `AGENT-INSTRUCTIONS-TEST-CASES.md` | How to write test case tables |
43
+ | `AGENT-INSTRUCTIONS-AUTOMATION.md` | How to write Playwright E2E tests |
44
+ | `AGENT-INSTRUCTIONS-ADO-INTEGRATION.md` | How to sync results with Azure DevOps |
45
+ | `AGENT-INSTRUCTIONS-MAINTENANCE.md` | How to update QA artifacts after code changes |
46
+
47
+ **Project-maintained** (added over time):
48
+ - `DEBUG-ARTIFACTS-POLICY.md` — where to save screenshots and debug output
49
+ - `NOTAS-TECNICAS-PLAYWRIGHT.md` — project-specific Playwright gotchas
50
+ - `RETROSPECTIVA-*.md` — session debug chronicles (optional, high value)
51
+
52
+ ---
53
+
54
+ ## 00-standards/
55
+
56
+ **Purpose**: Non-negotiable naming conventions and artifact format standards.
57
+
58
+ **Installed by framework**:
59
+
60
+ | File | Contents |
61
+ |---|---|
62
+ | `naming-conventions.md` | All ID patterns (TC-*, RN-*, FL-*, DEF-*, folder names) |
63
+ | `test-case-template.md` | Full TC document template |
64
+ | `bug-report-template.md` | Full defect document template |
65
+ | `test-data-guidelines.md` | How to structure test data, credential policy |
66
+ | `execution-report-template.md` | How to write an execution report |
67
+
68
+ ---
69
+
70
+ ## 01-specifications/
71
+
72
+ **Purpose**: Functional specifications — the primary source of truth for what the application does and what must be tested.
73
+
74
+ **Structure**:
75
+ ```
76
+ 01-specifications/
77
+ ├── README.md ← Index of all modules
78
+ ├── shared/ ← Shared artifacts (sitemap, shared templates)
79
+ │ ├── ui-menu-map.md ← Auto-generated from playwright session
80
+ │ └── Instrucciones-analisis.md ← Checklist template for module analysis
81
+
82
+ └── module-{module-name}/
83
+ ├── README.md ← Module index (submodule table + E2E flow)
84
+ └── submodule-{name}/
85
+ ├── 00-inventory.md ← UI elements, routes, APIs, fields
86
+ ├── 01-business-rules.md ← RN-* rules the system enforces
87
+ ├── 02-workflows.md ← FL-* user flow diagrams (Mermaid/ASCII)
88
+ ├── 03-roles-permissions.md ← Role matrix
89
+ ├── 04-test-data.md ← Data shapes and prerequisites
90
+ └── 05-test-scenarios.md ← TC-* test cases with priority and steps
91
+ ```
92
+
93
+ **Naming rules**:
94
+ - Module directory: `module-{kebab-name}` (e.g., `module-operacion`)
95
+ - Submodule directory: `submodule-{kebab-name}` (e.g., `submodule-aprobacion`)
96
+ - Module code: 2-6 uppercase letters (e.g., `OPER`, `PERS`, `ARCF`)
97
+ - TC ID: `TC-{MODULE}-{SUBMODULE}-{3-digit}` (e.g., `TC-OPER-CAT-001`)
98
+
99
+ **TC target per submodule**: 50–85 test cases is considered a well-analyzed submodule.
100
+
101
+ ---
102
+
103
+ ## 02-test-plans/
104
+
105
+ **Purpose**: Documents that define the scope, priorities, and approach for testing a module or sprint.
106
+
107
+ ```
108
+ 02-test-plans/
109
+ ├── README.md
110
+ ├── automated/
111
+ │ └── {module}-automated-test-plan.md
112
+ └── manual/
113
+ ├── {module}-manual-test-plan.md
114
+ └── exploratory/
115
+ └── {module}-exploratory-session.md
116
+ ```
117
+
118
+ A test plan specifies:
119
+ - Which TCs from `01-specifications/` are in scope
120
+ - Priority assignment (P0/P1/P2/P3)
121
+ - Which TCs will be automated vs manual
122
+ - Estimated automation feasibility (fully/partially/not automatable)
123
+ - ADO Test Suite mapping (if ADO is enabled)
124
+
125
+ ---
126
+
127
+ ## 03-test-cases/
128
+
129
+ **Purpose**: Standalone, detailed test case documents when more depth is needed than `05-test-scenarios.md` provides.
130
+
131
+ Most projects will have sparse content here — the 05-test-scenarios.md files inside specs contain the TC tables. This folder is for cases that are too complex to fit in a table row.
132
+
133
+ ```
134
+ 03-test-cases/
135
+ ├── README.md
136
+ ├── automated/
137
+ │ └── TC-{ID}-{title}.md
138
+ └── manual/
139
+ └── TC-{ID}-{title}.md
140
+ ```
141
+
142
+ ---
143
+
144
+ ## 04-test-data/
145
+
146
+ **Purpose**: All test data definitions, no credentials.
147
+
148
+ ```
149
+ 04-test-data/
150
+ ├── README.md
151
+ ├── users.md ← Test user definitions (roles, env var references, NOT passwords)
152
+ ├── fixtures/ ← Static data files (JSON/Markdown)
153
+ ├── factories/ ← Dynamic data generation patterns (Markdown or TS files)
154
+ └── seeders/ ← DB/API seed scripts for complex test setup
155
+ ```
156
+
157
+ **Critical rules**:
158
+ - Never put real passwords in this folder
159
+ - User tables list roles + env var names, not actual credentials
160
+ - Use `process.env.QA_USER_EMAIL` style references throughout
161
+ - For test data that requires unique values per run, document the `EXEC_IDX` pattern
162
+
163
+ ---
164
+
165
+ ## 05-test-execution/
166
+
167
+ **Purpose**: Evidence of test runs — reports, results, and screenshots.
168
+
169
+ ```
170
+ 05-test-execution/
171
+ ├── README.md
172
+ ├── automated/
173
+ │ ├── {YYYY-MM-DD_HH-MM-SS_desc}.md ← Execution report (human-readable summary)
174
+ │ └── test-results/ ← Playwright output (gitignored if large)
175
+ │ └── .last-run.json
176
+ └── manual/
177
+ ├── exploratory/
178
+ │ └── {YYYY-MM-DD_desc}.md
179
+ └── regression/
180
+ ```
181
+
182
+ **Execution report format** (see `00-standards/execution-report-template.md`):
183
+ - Summary table: total/pass/skip/fail + duration
184
+ - Per-test table with individual times
185
+ - Defect links for any skipped tests
186
+ - Env var commands sanitized with `<PLACEHOLDER>`
187
+
188
+ ---
189
+
190
+ ## 06-defects/
191
+
192
+ **Purpose**: Defect tracking. Optional when Azure DevOps is used.
193
+
194
+ ```
195
+ 06-defects/
196
+ ├── README.md
197
+ ├── active/
198
+ │ └── DEF-{NNN}-{slug}.md
199
+ └── resolved/
200
+ └── DEF-{NNN}-{slug}.md
201
+ ```
202
+
203
+ **Decision guide**:
204
+ - ADO enabled → use ADO Work Items. `06-defects/` contains lightweight references only
205
+ - ADO disabled → use this folder as primary defect tracker
206
+ - Either way: `test.skip()` references a defect ID so the skip is traceable
207
+
208
+ See `docs/generalization-decisions.md §7` for the full evaluation of this folder.
209
+
210
+ ---
211
+
212
+ ## 07-automation/
213
+
214
+ **Purpose**: All automation code, configuration, and related tooling.
215
+
216
+ ```
217
+ 07-automation/
218
+ ├── README.md ← How to run, where reports go, worker config
219
+ ├── e2e/ ← Playwright E2E tests
220
+ │ ├── package.json
221
+ │ ├── playwright.config.ts
222
+ │ ├── global-setup.ts ← Pre-suite login + storageState save
223
+ │ ├── .env ← Local credentials (NEVER commit)
224
+ │ ├── .env.example ← Template (always commit)
225
+ │ ├── .auth/ ← storageState files (gitignored)
226
+ │ ├── fixtures/
227
+ │ │ ├── auth.ts ← loginAs(page, role) helper
228
+ │ │ └── test-helpers.ts ← EXEC_IDX, date helpers, etc.
229
+ │ ├── page-objects/ ← Page Object Model classes
230
+ │ ├── tests/
231
+ │ │ ├── {module}/ ← Tests by module
232
+ │ │ ├── helpers/debug/ ← Diagnostic scripts (not part of suite)
233
+ │ │ └── seeds/ ← Data seeding specs (excluded from runs)
234
+ │ ├── diagnosis/ ← Screenshots and debug output (gitignored)
235
+ │ └── scripts/ ← One-off utility scripts
236
+ └── integration/ ← API-level tests (if applicable)
237
+ ```
238
+
239
+ **Important rules**:
240
+ - Always run Playwright from the **repo root**, not from inside `qa/07-automation/e2e/`
241
+ - Seeds are excluded from normal test runs via `testIgnore` in `playwright.config.ts`
242
+ - Debug artifacts go into `diagnosis/` — never into the repo root
243
+ - `.auth/` is always gitignored
244
+
245
+ ---
246
+
247
+ ## 08-azure-integration/
248
+
249
+ **Purpose**: Azure DevOps integration configuration and scripts. Only present when ADO is enabled.
250
+
251
+ ```
252
+ 08-azure-integration/
253
+ ├── README.md
254
+ ├── AGENT-ADO-INTEGRATION.md ← Agent instructions for ADO operations
255
+ ├── PLAYWRIGHT-AZURE-REPORTER-PLAN.md ← Reporter setup and migration log
256
+ ├── module-registry.json ← Module → spec path → ADO plan/suite IDs
257
+ ├── ado-ids-mapping-{project}.json ← Complete TC → ADO WI ID registry
258
+ ├── pipelines/
259
+ │ └── azure-pipeline-qa.yml ← CI/CD pipeline definition
260
+ └── scripts/
261
+ ├── inject-ado-ids.ps1 ← Injects [ID] prefix into spec files
262
+ ├── create-testplan-from-mapping.ps1 ← Creates ADO plan from mapping JSON
263
+ └── sync-ado-titles.ps1 ← Syncs spec titles with ADO TC titles
264
+ ```
265
+
266
+ ---
267
+
268
+ ## `qa/README.md` — The Living Index
269
+
270
+ The `qa/README.md` is the **only project-maintained file at the root of `qa/`**. It should be updated whenever:
271
+ - A new module is analyzed
272
+ - A new test execution is completed
273
+ - A blocker is identified or resolved
274
+ - A major milestone is reached
275
+
276
+ Minimum contents:
277
+ - Module status table (name, TCs documented, TCs automated, ADO plan link)
278
+ - Quick-start commands for common tasks
279
+ - Active blockers section
280
+ - Last execution results summary
281
+
282
+ ---
283
+
284
+ ## Session Summary Files
285
+
286
+ Optionally, place `SESSION-SUMMARY-YYYY-MM-DD.md` at the `qa/` root after each major working session. These files:
287
+ - Document what was produced in the session
288
+ - Record any blockers encountered
289
+ - Provide the starting point for the next session
290
+
291
+ This is especially valuable for agents — a session summary provides continuity across multiple chat sessions.
@@ -0,0 +1,203 @@
1
+ # docs/generalization-decisions.md
2
+
3
+ **Phase 2 Artifact** — Classification and decision log for every element found during discovery.
4
+
5
+ Every decision in this document follows the format:
6
+
7
+ > **Decision ID** | **Item** | **Source** | **Decision** | **Rationale** | **What was discarded**
8
+
9
+ ---
10
+
11
+ ## §1 — 8-Folder QA Directory Structure
12
+
13
+ - **Item**: Numbered folder hierarchy `00-guides/` through `08-azure-integration/`
14
+ - **Source**: Both repos (identical structure)
15
+ - **Decision**: ✅ **Framework core**
16
+ - **Rationale**: Both repos independently converged on this same structure. It provides a clear, numbered namespace that agents can navigate predictably. The numbers prevent alphabetical re-ordering from breaking conventions.
17
+ - **What was discarded**: Nothing. Structure adopted as-is.
18
+
19
+ ---
20
+
21
+ ## §2 — 6-File Submodule Template Set
22
+
23
+ - **Item**: `00-inventory.md` → `05-test-scenarios.md`
24
+ - **Source**: Both repos (Repo B more consistently follows the pattern)
25
+ - **Decision**: ✅ **Framework core** (reusable template)
26
+ - **Rationale**: This is the most consistently-replicated pattern across both repos and the most clearly generalizable unit of work. Every submodule follows this structure regardless of domain.
27
+ - **Naming difference**: Repo A names file 1 `01-business-rules.md`; Repo B sometimes uses `01-functional-analysis.md`. **Resolution**: Standardize as `01-business-rules.md`. Functional analysis is a technique to produce business rules, not the output itself.
28
+ - **What was discarded**: `01-functional-analysis.md` naming variant.
29
+
30
+ ---
31
+
32
+ ## §3 — Agent Instructions: Module Analysis
33
+
34
+ - **Item**: `AGENT-INSTRUCTIONS-MODULE-ANALYSIS.md` — 766 lines (A), 834 lines (B)
35
+ - **Source**: Both repos (conceptually identical, slightly different phrasings)
36
+ - **Decision**: ✅ **Agent instructions** (generalized, project-specific refs removed)
37
+ - **Rationale**: Both are 4-phase instructions (Prepare → Explore → Document → Review). The core process is identical. Project-specific items removed: hardcoded URLs, project names, session names.
38
+ - **What was discarded**:
39
+ - Repo A: `https://redactedURL.com`, `redacted@mail.com`, `playwright-cli MCP tool reference`
40
+ - Repo B: `https://redactedURL.com`, `redacted-project` session name
41
+ - Replaced with: `{{QA_BASE_URL}}`, `{{QA_USER_EMAIL}}` placeholders
42
+ - **Adopted from Repo B** (merged): TC origin classification (UI-OBSERVADO / PENDIENTE-CODE / BLOQUEADO-PERMISOS), 50–85 TC target per submodule, 3-condition TC validity rule (VISIBLE + ACCESIBLE + OBSERVABLE)
43
+
44
+ ---
45
+
46
+ ## §4 — Agent Instructions: E2E Automation
47
+
48
+ - **Item**: `AGENT-INSTRUCTIONS-E2E-PLAYWRIGHT-SPRINT40.md` (Repo A only)
49
+ - **Source**: Repo A — sprint-specific, 961 lines
50
+ - **Decision**: ✅ **Agent instructions** + **Optional integration** (heavily refactored)
51
+ - **Rationale**: The document contains highly valuable generalizable patterns (multi-role auth, EXEC_IDX date strategy, 3-layer email validation, skip+DEF pattern, storageState) embedded within Sprint 40-specific content. The generalizable patterns were extracted; the sprint-specific content (task IDs, routes, form selectors) was discarded.
52
+ - **What was discarded**: Azure Task IDs (20111, 21944–21949, 20528–20529), all `/RCL/`, `/Seguridad/` route references, all Sprint 40 test counts and scope, specific ADO Plan/Suite IDs.
53
+ - **What was extracted**: The 18-section structure was collapsed into a generalized `04-automation-generation.md` agent instruction with parameterized sections.
54
+
55
+ ---
56
+
57
+ ## §5 — Standards Folder (`00-standards/`)
58
+
59
+ - **Item**: Naming conventions, bug template, TC template, test-data guidelines
60
+ - **Source**: Repo B only
61
+ - **Decision**: ✅ **Framework core** — adopt from Repo B as the baseline
62
+ - **Rationale**: Repo B has a full and well-designed standards set absent from Repo A. These are fully generalizable with minor parameterization (module/submodule codes).
63
+ - **What was discarded**:
64
+ - Repo B has `admin.qakeber.com` hardcoded in bug-report template and test-data guidelines. Replaced with `{{QA_ADMIN_EMAIL}}`.
65
+ - Module codes (AUTH, PERS, USER, AGRI, OPER, REP) were kept as example values in templates but removed from any "authoritative" list.
66
+
67
+ ---
68
+
69
+ ## §6 — Playwright Integration
70
+
71
+ - **Item**: `playwright.config.ts`, `global-setup.ts`, `.env.example`, `fixtures/auth.ts`, page objects, spec files
72
+ - **Source**: Both repos
73
+ - **Decision**: ✅ **Optional integration** (playwright adapter) + ✅ **Reusable templates** for config files
74
+ - **Rationale**: Playwright is the automation framework of choice in both repos but must remain optional. Projects may use a different test runner (Jest, Cypress). The configuration patterns (storageState, globalSetup, testIgnore for seeds, CI vs local workers) are generalizable as templates.
75
+ - **What was discarded**:
76
+ - All project-specific selectors (form fields, route paths, element IDs)
77
+ - All hardcoded URLs
78
+ - Sprint-specific npm scripts (`sprint40`, `sprint40:p0`)
79
+ - Application-specific form constants from `fixtures/test-data.ts`
80
+ - All page objects (too application-specific)
81
+ - **What was templated**:
82
+ - `playwright.config.ts` — with `{{...}}` placeholders for baseURL, test path, ADO credentials
83
+ - `global-setup.ts` — generic login flow with configurable selectors
84
+ - `.env.example` — with all credential variables documented
85
+ - `fixtures/auth.ts` — generic multi-role fixture
86
+
87
+ ---
88
+
89
+ ## §7 — `06-defects/` Directory
90
+
91
+ **This is the evaluation specifically requested in the brief.**
92
+
93
+ - **Item**: The `06-defects/` folder and its defect-tracking purpose
94
+ - **Source**: Repo A (actively used: DEF-001, DEF-002), Repo B (folder exists, no files)
95
+ - **Analysis**:
96
+
97
+ | Criteria | Finding |
98
+ |---|---|
99
+ | Is real value demonstrated? | Yes, in Repo A: DEF-* IDs are referenced from `test.skip()`, linking automation state to bug state. This provides traceability from failing test → known defect. |
100
+ | Is it redundant with ADO? | Partially. ADO Work Items serve the same purpose in organizations that use ADO. However, not all projects use ADO. |
101
+ | Is the format standardized? | No. In Repo A: freeform Markdown. Repo B has a bug-report template in `00-standards/`. |
102
+ | Does it create maintenance burden? | Yes, if not kept in sync with ADO. Two sources of truth for defects is a known anti-pattern. |
103
+
104
+ - **Decision**: ✅ **Keep as optional** — not required by framework core, but recommended when:
105
+ 1. ADO is not in use (lightweight alternative)
106
+ 2. The project needs offline/local defect tracking during sprint stabilization
107
+ 3. The team wants to document the `test.skip() → DEF-* → reactivation path` explicitly
108
+
109
+ - **Recommended evolution**: When ADO is enabled, `06-defects/` becomes a cache/mirror of ADO bugs relevant to QA automation. The defect file links to the ADO WI, rather than replacing it.
110
+
111
+ - **What would be removed**: If this folder is removed from a project, the `test.skip('DEF-XXX: ...')` convention should still be kept in spec files; the DEF ID should then reference the ADO WI ID directly.
112
+
113
+ ---
114
+
115
+ ## §8 — Azure DevOps Integration
116
+
117
+ - **Item**: Pipeline YAML, `playwright-azure-reporter`, PowerShell scripts, `module-registry.json`, `ado-ids-mapping.json`
118
+ - **Source**: Repo B (fully implemented), Repo A (partial — referenced but not implemented)
119
+ - **Decision**: ✅ **Optional integration** (ado-powershell adapter + playwright-azure-reporter adapter)
120
+ - **Rationale**: ADO integration provides real value (E2E result sync with Test Plans, CI pipeline, WI ID injection) but creates a strong dependency on a specific vendor (Azure DevOps). The framework must work without it.
121
+ - **What was kept**: The full set of scripts from Repo B — `inject-ado-ids.ps1`, `create-testplan-from-mapping.ps1`, `sync-ado-titles.ps1` — generalized by removing hardcoded org/project/ID values.
122
+ - **What was parameterized**: `ADO_ORG`, `ADO_PROJECT`, `ADO_PAT`, `planId`, `suiteId`, variable group name.
123
+ - **What was marked as stub**: The Repo B pipeline references a specific trigger branch (`keber.flores/qa-test/qa-specs`). This is replaced with a parameterized `{{CI_TRIGGER_BRANCH}}` in the template.
124
+
125
+ ---
126
+
127
+ ## §9 — Blazor-Specific Automation Guides
128
+
129
+ - **Item**: `BLAZOR_WASM_AUTOMATION.md`, `RADZEN_COMPONENTS_PLAYWRIGHT.md`, `RETROSPECTIVA_CASCADA_2026-02.md`
130
+ - **Source**: Repo B only
131
+ - **Decision**: ✅ **Optional integration** (blazor-radzen adapter) for reusable helper functions; ❌ **Out of framework** for retrospective
132
+ - **Rationale**: The Blazor/Radzen automation patterns (`openDropdownAndSelectFirst()`, `toBeAttached()`, `waitForFunction()` for popup detection) are highly reusable across any Radzen Blazor project. However, they are not generic enough for the framework core. The retrospective is project-specific debug log.
133
+ - **What was extracted**: `openDropdownAndSelectFirst()` function moved to `integrations/blazor-radzen/helpers.ts` (stub — marked as `ADAPTER`).
134
+ - **What was discarded**: Retrospective content, specific route references in cascade-dropdown backtrack.
135
+
136
+ ---
137
+
138
+ ## §10 — EXEC_IDX / RUN_SLOT Date Generation Pattern
139
+
140
+ - **Item**: `Math.floor(Date.now() / 60_000) % 100_000` (EXEC_IDX), `Math.floor(Date.now()/300_000)` (RUN_SLOT)
141
+ - **Source**: Repo A (primary), Repo B (uses raw `Date.now()` without the slot pattern)
142
+ - **Decision**: ✅ **Framework core** (general convention, extracted to template)
143
+ - **Rationale**: This pattern solves a real cross-project problem: parallel or repeated test runs creating data collisions. It avoids the need for test teardown and is independently applicable to any project with CRUD tests.
144
+ - **Action**: Documented in `agent-instructions/04-automation-generation.md` as a required pattern for data-producing tests. Moved to `templates/automation-scaffold/fixtures/test-helpers.ts`.
145
+
146
+ ---
147
+
148
+ ## §11 — Naming Convention: Test Titles
149
+
150
+ - **Item**: Test title format — `[Nx] Title @Pp` (Repo A) vs `[ADO_ID] Title` (Repo B)
151
+ - **Source**: Both repos, incompatible
152
+ - **Decision**: ✅ **Framework core** (adopt unified convention)
153
+ - **Unified convention**: `[{LOCAL_ID}] {title} @{priority}` — e.g. `[TC-OPER-CAT-001] Access catalog list @P0`
154
+ - **When ADO is enabled**: Local ID is replaced with ADO WI ID by `inject-ado-ids.ps1`, becoming `[22957] Access catalog list @P0`
155
+ - **Rationale**: The local ID format preserves traceability without requiring ADO. The ADO ID injection is an idempotent upgrade step, not a prerequisite.
156
+
157
+ ---
158
+
159
+ ## §12 — Page Object Model (POM) vs Inline Automation
160
+
161
+ - **Item**: POMs (Repo A) vs inline selector logic (Repo B)
162
+ - **Source**: Repo A has 5 POMs; Repo B uses inline `page.locator()` calls in spec files
163
+ - **Decision**: ✅ **Framework recommendation: use POMs** for production automation; inline is acceptable for exploratory scripts
164
+ - **Rationale**: POMs provide selector encapsulation and reuse across suites. Repo A's approach led to smaller spec files and easier maintenance. Repo B's inline approach was faster to write but led to selector duplication. The framework templates use POMs, but the agent instruction notes that inline is acceptable for single-use diagnostic specs.
165
+
166
+ ---
167
+
168
+ ## §13 — `SITEMAP_TERRAVIX_QA.md` / `ui-menu-map.md` Pattern
169
+
170
+ - **Item**: Auto-generated application sitemap from a real Playwright session
171
+ - **Source**: Both repos (Repo B: SITEMAP file, Repo A: auto-generated ui-menu-map.md)
172
+ - **Decision**: ✅ **Reusable template** — the `ui-menu-map.spec.ts` script extracted and generalized
173
+ - **Rationale**: Generating a live sitemap from a Playwright session is a highly valuable, universally applicable pattern. It provides the ground truth for module analysis and access-control testing.
174
+ - **What was parameterized**: `BASE_URL` env var, output path in `qa/01-specifications/shared/ui-menu-map.md`.
175
+
176
+ ---
177
+
178
+ ## §14 — Session Summary Pattern
179
+
180
+ - **Item**: `SESSION-SUMMARY-YYYY-MM-DD.md` files at qa/ root (Repo B)
181
+ - **Source**: Repo B only
182
+ - **Decision**: ✅ **Reusable template**
183
+ - **Rationale**: Provides a living log of what was produced in each QA working session. Useful for agent continuity (can resume from a known state) and for traceability.
184
+ - **What was discarded**: Specific content (Personas module, 19 files created, etc.)
185
+
186
+ ---
187
+
188
+ ## §15 — `06-defects/` vs ADO Work Items Decision Tree
189
+
190
+ For completeness, here is the recommended decision tree:
191
+
192
+ ```
193
+ Is Azure DevOps enabled in this project?
194
+ ├── YES → Use ADO Work Items for ALL defects.
195
+ │ Keep 06-defects/ as a lightweight reference cache only.
196
+ │ Each DEF-*.md file = summary + link to ADO WI URL.
197
+ │ test.skip() references ADO WI ID, not DEF-ID.
198
+
199
+ └── NO → Use 06-defects/ as the primary defect tracker.
200
+ Follow the bug-report-template.md format.
201
+ test.skip() references DEF-ID.
202
+ When ADO is enabled later: migrate IDs.
203
+ ```