Using KwikQA
Configuration
Repairs need a reviewed kwikqa.config.json at the root of your project. It is plain JSON: loading it never runs any code. Create it with npx kwikqa init, then review and commit it.
Example
{
"schemaVersion": "1.0",
"editablePaths": [
{ "class": "spec", "pattern": "tests/**/*.spec.ts" },
{ "class": "page-object", "pattern": "tests/pages/**/*.ts" }
],
"generatedPaths": ["**/*.generated.ts", "**/__snapshots__/**"],
"budgets": { "maxFiles": 3, "maxChangedLines": 100 }
}
init proposes rules for the layout it finds: tests/ and e2e/ for Playwright, cypress/e2e/**/*.cy.ts for Cypress, and test/specs/**/*.ts for WebdriverIO. It names Cypress support files and WebdriverIO page objects (test/pageobjects/) for you to add as shared rules if you want KwikQA to propose fixes there.
Fields
schemaVersion- Always
"1.0"for this version. editablePaths- The only files a repair may change. Each rule pairs a glob
patternwith aclassthat says what kind of test code it is. Anything that matches no rule, including all application code, is off limits. generatedPaths- Globs for generated files. A repair never edits them, even if an editable rule also matches.
budgets- The largest repair KwikQA may propose:
maxFilesfrom 1 to 3 andmaxChangedLinesfrom 1 to 100, counting added and removed lines. A cause that needs more becomes a manual recommendation. ci- Optional.
"ci": { "fix": { "pullRequests": "draft" } }letskwikqa fixrun in GitHub Actions, Azure Pipelines, or GitLab CI/CD without a terminal, and open its validated repair as a draft pull request: see Fix pull requests.pullRequestsmust be"draft".maxPullRequestsPerRunmay be left out, and may only be 1.retry, false unless set, gives a failed validation its one retry, which is one more request. The policy counts only as committed: a file changed in the job approves nothing. kwikqa before 0.3.0 refuses a config with acisection.
Classes
| Class | For |
|---|---|
spec | Test files. |
page-object | Page objects and screen models. |
fixture | Playwright fixtures. |
test-data | Test data builders and factories. |
test-helper | Test-only helper modules. |
playwright-config | Playwright configuration. |
framework-config | Cypress or WebdriverIO configuration. |
Page objects, fixtures, helpers, and configuration are shared by many tests, so a change has a larger blast radius. init only proposes spec rules on its own; add shared classes deliberately. In KwikQA 0.1, repairs to shared code are proposed but stop at validation-unavailable; see repair rules.
Local files
KwikQA writes run records, patch journals, and validation output to .kwikqa/ in your project. Keep it out of git; init offers to add it to .gitignore.