@keber/qa-framework 1.7.0 → 1.7.1
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 +12 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/scripts/init.js +8 -49
- package/scripts/upgrade.js +4 -41
- package/templates/qa-framework.instructions.md +45 -0
package/CHANGELOG.md
CHANGED
|
@@ -33,6 +33,18 @@ has been removed or parameterized. See `docs/comparison-matrix.md` and `docs/gen
|
|
|
33
33
|
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
+
## [1.7.1] - 2026-05-06
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
- **Agent instructions template extracted** — `templates/qa-framework.instructions.md` is now
|
|
41
|
+
the single source of truth for QA agent rules. Both `init` and `upgrade` read and interpolate
|
|
42
|
+
this file instead of maintaining separate hardcoded strings, eliminating the rule divergence
|
|
43
|
+
that caused `upgrade` to deploy only 7 rules instead of 11.
|
|
44
|
+
- `upgrade.js` — removed `buildCopilotInstructions()` function (dead code after template extraction).
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
36
48
|
## [1.7.0] - 2026-05-06
|
|
37
49
|
|
|
38
50
|
### Changed
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keber/qa-framework",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "Reusable spec-driven QA framework for IDE-agent-assisted automated testing. Installable as an npm package. Provides structure, templates, agent instructions, and optional integrations for Playwright and Azure DevOps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"qa",
|
package/scripts/init.js
CHANGED
|
@@ -264,17 +264,16 @@ const adoSkillReady = fs.existsSync(path.join(cwd, '.github', 'skills', 'ado-qa
|
|
|
264
264
|
const adoAvailable = adoQaInstalled || adoSkillReady;
|
|
265
265
|
|
|
266
266
|
const adoSection = adoAvailable
|
|
267
|
-
?
|
|
268
|
-
## Azure DevOps integration (ado-qa)
|
|
267
|
+
? `## Azure DevOps integration (ado-qa)
|
|
269
268
|
|
|
270
269
|
The \`ado-qa\` skill is installed. Load it in PowerShell before any ADO operation:
|
|
271
270
|
\`\`\`powershell
|
|
272
271
|
. .github/skills/ado-qa/load.ps1
|
|
273
272
|
\`\`\`
|
|
274
273
|
Refer to \`qa/00-guides/AGENT-INSTRUCTIONS-ADO-INTEGRATION.md\` for the full ADO workflow.
|
|
274
|
+
|
|
275
275
|
`
|
|
276
|
-
:
|
|
277
|
-
## Azure DevOps integration (not installed)
|
|
276
|
+
: `## Azure DevOps integration (not installed)
|
|
278
277
|
|
|
279
278
|
> ⚠️ **Agent note:** \`ado-qa\` is not installed in this project.
|
|
280
279
|
> To enable Azure DevOps integration (query Work Items, Test Plans, create bugs, etc.) run:
|
|
@@ -282,53 +281,13 @@ Refer to \`qa/00-guides/AGENT-INSTRUCTIONS-ADO-INTEGRATION.md\` for the full ADO
|
|
|
282
281
|
> npm install github:keber/ado-qa
|
|
283
282
|
> \`\`\`
|
|
284
283
|
> This will automatically copy the ADO skills to \`.github/skills/\` via postinstall.
|
|
285
|
-
`;
|
|
286
284
|
|
|
287
|
-
const copilotInstrContent = `---
|
|
288
|
-
applyTo: '**'
|
|
289
|
-
---
|
|
290
|
-
# QA Framework Instructions
|
|
291
|
-
|
|
292
|
-
This project uses \`@keber/qa-framework\` v${config.frameworkVersion ?? '1.0.0'} for spec-driven automated testing.
|
|
293
|
-
|
|
294
|
-
## Agent behavior rules
|
|
295
|
-
|
|
296
|
-
0. **On every conversation start:** check if \`qa/AGENT-NEXT-STEPS.md\` exists. If it does, read it and complete its steps before anything else.
|
|
297
|
-
1. Before performing any QA task, load the relevant skill from \`.github/skills/\`. For project context, read \`qa/memory/INDEX.md\` if it exists, then load only the memory files relevant to the current task — do not load all memory files unconditionally. Never execute a pipeline stage unless its prerequisite is satisfied.
|
|
298
|
-
2. Always save artifacts in the correct \`qa/\` subfolder - refer to \`qa/QA-STRUCTURE-GUIDE.md\`
|
|
299
|
-
3. Never hardcode credentials - always use env vars and \`<PLACEHOLDER>\` in documentation
|
|
300
|
-
4. Follow the naming conventions in \`qa/00-standards/naming-conventions.md\`
|
|
301
|
-
5. Read previous test suites code in \`qa/07-automation/e2e/tests/\` if available before writing new automation to maintain consistency in style and approach
|
|
302
|
-
6. Project QA config is at \`qa/qa-framework.config.json\`
|
|
303
|
-
7. Save learnings in \`qa/memory/\` with proper naming and metadata. Always update \`qa/memory/INDEX.md\` after adding or updating any memory file.
|
|
304
|
-
8. **Sprint/module completion criteria:** A sprint or module is complete when every TC in scope has one of these three valid states - and no other: (a) \`test()\` passing: the app meets the spec; (b) \`test.fail()\`: the app violates the spec **and** a file \`qa/06-defects/open/DEF-SIS-NNN_*.md\` exists documenting which business rule is violated and what the app actually does; (c) \`test.skip()\`: the TC is not yet executable, annotated with \`PENDING-CODE\` and a linked issue. A sprint is **not** complete if any TC is failing without \`test.fail()\`, or has \`test.fail()\` without a defect file, or has \`test.skip()\` without a \`PENDING-CODE\` reason.
|
|
305
|
-
9. **On sprint/module completion:** (1) update the module status row in \`qa/README.md\`; (2) move the completed sprint checklist from \`AGENT-NEXT-STEPS.md\` to the \`## Sprint History\` section of \`qa/README.md\`; (3) trim \`AGENT-NEXT-STEPS.md\` so it contains only the next sprint — never let it accumulate more than one active sprint.
|
|
306
|
-
10. **Assertion polarity rule (BLOCKING):** A test must assert what the **spec** requires, not what the app currently does. If the app fails to meet the spec, use \`test.fail()\` + correct assertion to document the defect — **never invert or weaken an assertion to make a test go green.** A failing test that exposes a real defect is always more valuable than a passing test that hides one.
|
|
307
|
-
11. **Character encoding safety (BLOCKING):** In ALL generated content (markdown, scripts, test titles, ADO fields, config files), never use characters at these Unicode code points: em-dash (U+2014), en-dash (U+2013), horizontal ellipsis (U+2026), smart/curly quotes (U+201C, U+201D, U+2018, U+2019), or directional arrows (U+2190-U+21FF). Use ASCII equivalents instead: \` - \` (hyphen with surrounding spaces) for dashes, \`...\` for ellipsis, \`"\` and \`'\` for quotes, \`->\` and \`<-\` for arrows. Exception: Latin Extended characters (U+00C0-U+024F) are always permitted - this covers Spanish vowels with accents (U+00E0-U+00FA), n with tilde (U+00F1/U+00D1), and u/o with umlaut (U+00FC/U+00DC, U+00F6/U+00D6).
|
|
308
|
-
|
|
309
|
-
## Formatting rules for generated content
|
|
310
|
-
1. Generate the output in \`UTF-8\` encoding without BOM (\`UTF-8\`, no signature).
|
|
311
|
-
2. Ensure the raw output is \`UTF-8\` encoded with no \`EF BB BF\` bytes at the beginning.
|
|
312
|
-
|
|
313
|
-
## QA Pipeline
|
|
314
|
-
|
|
315
|
-
Stages must run in order. Never start a stage unless its prerequisite is met.
|
|
316
|
-
|
|
317
|
-
| Stage | Task | Skill | Prerequisite |
|
|
318
|
-
|---|---|---|---|
|
|
319
|
-
| 1 | Analyze module | \`.github/skills/qa-module-analysis/SKILL.md\` | None |
|
|
320
|
-
| 2 | Generate specifications | \`.github/skills/qa-spec-generation/SKILL.md\` | 00-inventory.md exists |
|
|
321
|
-
| 3 | Generate test plan | \`.github/skills/qa-test-plan/SKILL.md\` | 05-test-scenarios.md exists |
|
|
322
|
-
| 4 | Generate test cases | \`.github/skills/qa-test-cases/SKILL.md\` | Test plan exists |
|
|
323
|
-
| 5 | Generate automation | \`.github/skills/qa-automation/SKILL.md\` | Specs approved, no PENDING-CODE |
|
|
324
|
-
| 5b | Stabilize failing tests | \`.github/skills/qa-test-stabilization/SKILL.md\` | Failing tests exist |
|
|
325
|
-
| 6 | Maintenance | \`.github/skills/qa-maintenance/SKILL.md\` | Application change delivered |
|
|
326
|
-
| — | ADO integration | \`.github/skills/qa-ado-integration/SKILL.md\` | ADO enabled in config |
|
|
327
|
-
|
|
328
|
-
## Project KB
|
|
329
|
-
1. \`qa/README.md\` — The Living Index: module status, sprint history, blockers, quick-start commands.
|
|
330
|
-
2. \`qa/memory/INDEX.md\` — Index of all memory files; load this before selecting which files to read.
|
|
331
285
|
`;
|
|
286
|
+
|
|
287
|
+
const instrTemplatePath = path.resolve(__dirname, '..', 'templates', 'qa-framework.instructions.md');
|
|
288
|
+
const copilotInstrContent = fs.readFileSync(instrTemplatePath, 'utf8')
|
|
289
|
+
.replace('{{VERSION}}', config.frameworkVersion ?? '1.0.0')
|
|
290
|
+
.replace('{{ADO_SECTION}}', adoSection);
|
|
332
291
|
writeIfMissing(copilotInstrPath, copilotInstrContent);
|
|
333
292
|
|
|
334
293
|
// --- AGENT-NEXT-STEPS.md — readable by the agent after install ---
|
package/scripts/upgrade.js
CHANGED
|
@@ -84,7 +84,10 @@ if (!fs.existsSync(skillsSrc)) {
|
|
|
84
84
|
// 2. .github/instructions/qa-framework.instructions.md — overwrite (framework-owned)
|
|
85
85
|
// ---------------------------------------------------------------------------
|
|
86
86
|
const copilotInstrPath = path.join(githubDir, 'instructions', 'qa-framework.instructions.md');
|
|
87
|
-
const
|
|
87
|
+
const instrTemplatePath = path.resolve(__dirname, '..', 'templates', 'qa-framework.instructions.md');
|
|
88
|
+
const copilotContent = fs.readFileSync(instrTemplatePath, 'utf8')
|
|
89
|
+
.replace('{{VERSION}}', config.frameworkVersion ?? '1.0.0')
|
|
90
|
+
.replace('{{ADO_SECTION}}', '');
|
|
88
91
|
forceWrite(copilotInstrPath, copilotContent);
|
|
89
92
|
|
|
90
93
|
// ---------------------------------------------------------------------------
|
|
@@ -312,43 +315,3 @@ function copyDirForce(srcDir, destDir) {
|
|
|
312
315
|
}
|
|
313
316
|
}
|
|
314
317
|
|
|
315
|
-
function buildCopilotInstructions(cfg) {
|
|
316
|
-
const version = cfg.frameworkVersion ?? '1.0.0';
|
|
317
|
-
return `---
|
|
318
|
-
applyTo: '**'
|
|
319
|
-
---
|
|
320
|
-
# QA Framework Instructions
|
|
321
|
-
|
|
322
|
-
This project uses \`@keber/qa-framework\` v${version} for spec-driven automated testing.
|
|
323
|
-
|
|
324
|
-
## Agent behavior rules
|
|
325
|
-
|
|
326
|
-
0. **On every conversation start:** check if \`qa/AGENT-NEXT-STEPS.md\` exists. If it does, read it and complete its steps before anything else.
|
|
327
|
-
1. Before performing any QA task, load the relevant skill from \`.github/skills/\`. For project context, read \`qa/memory/INDEX.md\` if it exists, then load only the memory files relevant to the current task — do not load all memory files unconditionally. Never execute a pipeline stage unless its prerequisite is satisfied.
|
|
328
|
-
2. Always save artifacts in the correct \`qa/\` subfolder — refer to \`qa/QA-STRUCTURE-GUIDE.md\`
|
|
329
|
-
3. Never hardcode credentials — always use env vars and \`<PLACEHOLDER>\` in documentation
|
|
330
|
-
4. Follow the naming conventions in \`qa/00-standards/naming-conventions.md\`
|
|
331
|
-
5. Project QA config is at \`qa/qa-framework.config.json\`
|
|
332
|
-
6. Save learnings in \`qa/memory/\` with proper naming and metadata. Always update \`qa/memory/INDEX.md\` after adding or updating any memory file.
|
|
333
|
-
7. **On module/sprint completion** (all TCs passing): (1) update the module status row in \`qa/README.md\`; (2) move the completed sprint checklist from \`AGENT-NEXT-STEPS.md\` to the \`## Sprint History\` section of \`qa/README.md\`; (3) trim \`AGENT-NEXT-STEPS.md\` so it contains only the next sprint — never let it accumulate more than one active sprint.
|
|
334
|
-
|
|
335
|
-
## QA Pipeline
|
|
336
|
-
|
|
337
|
-
Stages must run in order. Never start a stage unless its prerequisite is met.
|
|
338
|
-
|
|
339
|
-
| Stage | Task | Skill | Prerequisite |
|
|
340
|
-
|---|---|---|---|
|
|
341
|
-
| 1 | Analyze module | \`.github/skills/qa-module-analysis/SKILL.md\` | None |
|
|
342
|
-
| 2 | Generate specifications | \`.github/skills/qa-spec-generation/SKILL.md\` | 00-inventory.md exists |
|
|
343
|
-
| 3 | Generate test plan | \`.github/skills/qa-test-plan/SKILL.md\` | 05-test-scenarios.md exists |
|
|
344
|
-
| 4 | Generate test cases | \`.github/skills/qa-test-cases/SKILL.md\` | Test plan exists |
|
|
345
|
-
| 5 | Generate automation | \`.github/skills/qa-automation/SKILL.md\` | Specs approved, no PENDING-CODE |
|
|
346
|
-
| 5b | Stabilize failing tests | \`.github/skills/qa-test-stabilization/SKILL.md\` | Failing tests exist |
|
|
347
|
-
| 6 | Maintenance | \`.github/skills/qa-maintenance/SKILL.md\` | Application change delivered |
|
|
348
|
-
| — | ADO integration | \`.github/skills/qa-ado-integration/SKILL.md\` | ADO enabled in config |
|
|
349
|
-
|
|
350
|
-
## Project KB
|
|
351
|
-
1. \`qa/README.md\` — The Living Index: module status, sprint history, blockers, quick-start commands.
|
|
352
|
-
2. \`qa/memory/INDEX.md\` — Index of all memory files; load this before selecting which files to read.
|
|
353
|
-
`;
|
|
354
|
-
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
applyTo: '**'
|
|
3
|
+
---
|
|
4
|
+
# QA Framework Instructions
|
|
5
|
+
|
|
6
|
+
This project uses `@keber/qa-framework` v{{VERSION}} for spec-driven automated testing.
|
|
7
|
+
|
|
8
|
+
## Agent behavior rules
|
|
9
|
+
|
|
10
|
+
0. **On every conversation start:** check if `qa/AGENT-NEXT-STEPS.md` exists. If it does, read it and complete its steps before anything else.
|
|
11
|
+
1. Before performing any QA task, load the relevant skill from `.github/skills/`. For project context, read `qa/memory/INDEX.md` if it exists, then load only the memory files relevant to the current task — do not load all memory files unconditionally. Never execute a pipeline stage unless its prerequisite is satisfied.
|
|
12
|
+
2. Always save artifacts in the correct `qa/` subfolder - refer to `qa/QA-STRUCTURE-GUIDE.md`
|
|
13
|
+
3. Never hardcode credentials - always use env vars and `<PLACEHOLDER>` in documentation
|
|
14
|
+
4. Follow the naming conventions in `qa/00-standards/naming-conventions.md`
|
|
15
|
+
5. Read previous test suites code in `qa/07-automation/e2e/tests/` if available before writing new automation to maintain consistency in style and approach
|
|
16
|
+
6. Project QA config is at `qa/qa-framework.config.json`
|
|
17
|
+
7. Save learnings in `qa/memory/` with proper naming and metadata. Always update `qa/memory/INDEX.md` after adding or updating any memory file.
|
|
18
|
+
8. **Sprint/module completion criteria:** A sprint or module is complete when every TC in scope has one of these three valid states - and no other: (a) `test()` passing: the app meets the spec; (b) `test.fail()`: the app violates the spec **and** a file `qa/06-defects/open/DEF-SIS-NNN_*.md` exists documenting which business rule is violated and what the app actually does; (c) `test.skip()`: the TC is not yet executable, annotated with `PENDING-CODE` and a linked issue. A sprint is **not** complete if any TC is failing without `test.fail()`, or has `test.fail()` without a defect file, or has `test.skip()` without a `PENDING-CODE` reason.
|
|
19
|
+
9. **On sprint/module completion:** (1) update the module status row in `qa/README.md`; (2) move the completed sprint checklist from `AGENT-NEXT-STEPS.md` to the `## Sprint History` section of `qa/README.md`; (3) trim `AGENT-NEXT-STEPS.md` so it contains only the next sprint — never let it accumulate more than one active sprint.
|
|
20
|
+
10. **Assertion polarity rule (BLOCKING):** A test must assert what the **spec** requires, not what the app currently does. If the app fails to meet the spec, use `test.fail()` + correct assertion to document the defect — **never invert or weaken an assertion to make a test go green.** A failing test that exposes a real defect is always more valuable than a passing test that hides one.
|
|
21
|
+
11. **Character encoding safety (BLOCKING):** In ALL generated content (markdown, scripts, test titles, ADO fields, config files), never use characters at these Unicode code points: em-dash (U+2014), en-dash (U+2013), horizontal ellipsis (U+2026), smart/curly quotes (U+201C, U+201D, U+2018, U+2019), or directional arrows (U+2190-U+21FF). Use ASCII equivalents instead: ` - ` (hyphen with surrounding spaces) for dashes, `...` for ellipsis, `"` and `'` for quotes, `->` and `<-` for arrows. Exception: Latin Extended characters (U+00C0-U+024F) are always permitted - this covers Spanish vowels with accents (U+00E0-U+00FA), n with tilde (U+00F1/U+00D1), and u/o with umlaut (U+00FC/U+00DC, U+00F6/U+00D6).
|
|
22
|
+
|
|
23
|
+
## Formatting rules for generated content
|
|
24
|
+
1. Generate the output in `UTF-8` encoding without BOM (`UTF-8`, no signature).
|
|
25
|
+
2. Ensure the raw output is `UTF-8` encoded with no `EF BB BF` bytes at the beginning.
|
|
26
|
+
|
|
27
|
+
{{ADO_SECTION}}
|
|
28
|
+
## QA Pipeline
|
|
29
|
+
|
|
30
|
+
Stages must run in order. Never start a stage unless its prerequisite is met.
|
|
31
|
+
|
|
32
|
+
| Stage | Task | Skill | Prerequisite |
|
|
33
|
+
|---|---|---|---|
|
|
34
|
+
| 1 | Analyze module | `.github/skills/qa-module-analysis/SKILL.md` | None |
|
|
35
|
+
| 2 | Generate specifications | `.github/skills/qa-spec-generation/SKILL.md` | 00-inventory.md exists |
|
|
36
|
+
| 3 | Generate test plan | `.github/skills/qa-test-plan/SKILL.md` | 05-test-scenarios.md exists |
|
|
37
|
+
| 4 | Generate test cases | `.github/skills/qa-test-cases/SKILL.md` | Test plan exists |
|
|
38
|
+
| 5 | Generate automation | `.github/skills/qa-automation/SKILL.md` | Specs approved, no PENDING-CODE |
|
|
39
|
+
| 5b | Stabilize failing tests | `.github/skills/qa-test-stabilization/SKILL.md` | Failing tests exist |
|
|
40
|
+
| 6 | Maintenance | `.github/skills/qa-maintenance/SKILL.md` | Application change delivered |
|
|
41
|
+
| — | ADO integration | `.github/skills/qa-ado-integration/SKILL.md` | ADO enabled in config |
|
|
42
|
+
|
|
43
|
+
## Project KB
|
|
44
|
+
1. `qa/README.md` — The Living Index: module status, sprint history, blockers, quick-start commands.
|
|
45
|
+
2. `qa/memory/INDEX.md` — Index of all memory files; load this before selecting which files to read.
|