@mknrt/autotests-overkill 1.1.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.
Files changed (121) hide show
  1. package/README.md +117 -0
  2. package/assets/overkill-logo.svg +8 -0
  3. package/assets/overkill-small.svg +8 -0
  4. package/dist/connectors/index.d.ts +4 -0
  5. package/dist/connectors/index.js +4 -0
  6. package/dist/indexer/index.d.ts +4 -0
  7. package/dist/indexer/index.js +4 -0
  8. package/dist/mcp/index.d.ts +2 -0
  9. package/dist/mcp/index.js +2 -0
  10. package/dist/src/appContext.d.ts +21 -0
  11. package/dist/src/appContext.js +40 -0
  12. package/dist/src/cli/indexKnowledge.d.ts +1 -0
  13. package/dist/src/cli/indexKnowledge.js +11 -0
  14. package/dist/src/cli/main.d.ts +19 -0
  15. package/dist/src/cli/main.js +59 -0
  16. package/dist/src/cli/runAcceptance.d.ts +21 -0
  17. package/dist/src/cli/runAcceptance.js +131 -0
  18. package/dist/src/cli/runMcpServer.d.ts +1 -0
  19. package/dist/src/cli/runMcpServer.js +10 -0
  20. package/dist/src/cli/shared.d.ts +1 -0
  21. package/dist/src/cli/shared.js +7 -0
  22. package/dist/src/config/consumerConfig.d.ts +126 -0
  23. package/dist/src/config/consumerConfig.js +63 -0
  24. package/dist/src/connectors/autotests2Connector.d.ts +41 -0
  25. package/dist/src/connectors/autotests2Connector.js +94 -0
  26. package/dist/src/connectors/caseplatformConnector.d.ts +35 -0
  27. package/dist/src/connectors/caseplatformConnector.js +251 -0
  28. package/dist/src/connectors/ciArtifactsConnector.d.ts +23 -0
  29. package/dist/src/connectors/ciArtifactsConnector.js +14 -0
  30. package/dist/src/connectors/diffConnector.d.ts +1 -0
  31. package/dist/src/connectors/diffConnector.js +4 -0
  32. package/dist/src/connectors/filesystemConnector.d.ts +4 -0
  33. package/dist/src/connectors/filesystemConnector.js +15 -0
  34. package/dist/src/connectors/gitlabConnector.d.ts +14 -0
  35. package/dist/src/connectors/gitlabConnector.js +64 -0
  36. package/dist/src/connectors/reportPortalConnector.d.ts +14 -0
  37. package/dist/src/connectors/reportPortalConnector.js +84 -0
  38. package/dist/src/contracts/confidence.d.ts +8 -0
  39. package/dist/src/contracts/confidence.js +33 -0
  40. package/dist/src/contracts/errors.d.ts +6 -0
  41. package/dist/src/contracts/errors.js +18 -0
  42. package/dist/src/contracts/toolOutput.d.ts +113 -0
  43. package/dist/src/contracts/toolOutput.js +35 -0
  44. package/dist/src/domain/analyzeDiffImpact.d.ts +22 -0
  45. package/dist/src/domain/analyzeDiffImpact.js +52 -0
  46. package/dist/src/domain/analyzeTestGaps.d.ts +22 -0
  47. package/dist/src/domain/analyzeTestGaps.js +41 -0
  48. package/dist/src/domain/buildRerunScope.d.ts +23 -0
  49. package/dist/src/domain/buildRerunScope.js +17 -0
  50. package/dist/src/domain/buildSetupTeardownPlan.d.ts +23 -0
  51. package/dist/src/domain/buildSetupTeardownPlan.js +13 -0
  52. package/dist/src/domain/findExistingTestAssets.d.ts +22 -0
  53. package/dist/src/domain/findExistingTestAssets.js +50 -0
  54. package/dist/src/domain/findFrontendContract.d.ts +22 -0
  55. package/dist/src/domain/findFrontendContract.js +13 -0
  56. package/dist/src/domain/findFrontendRuntimeLogic.d.ts +22 -0
  57. package/dist/src/domain/findFrontendRuntimeLogic.js +28 -0
  58. package/dist/src/domain/findTestAreaContext.d.ts +23 -0
  59. package/dist/src/domain/findTestAreaContext.js +30 -0
  60. package/dist/src/domain/generateSpecBlueprint.d.ts +23 -0
  61. package/dist/src/domain/generateSpecBlueprint.js +213 -0
  62. package/dist/src/domain/mapFeatureToExistingCoverage.d.ts +22 -0
  63. package/dist/src/domain/mapFeatureToExistingCoverage.js +56 -0
  64. package/dist/src/domain/recommendSelectorStrategy.d.ts +22 -0
  65. package/dist/src/domain/recommendSelectorStrategy.js +13 -0
  66. package/dist/src/domain/shared.d.ts +5 -0
  67. package/dist/src/domain/shared.js +36 -0
  68. package/dist/src/domain/summarizeCiContext.d.ts +22 -0
  69. package/dist/src/domain/summarizeCiContext.js +35 -0
  70. package/dist/src/domain/triageFailedRun.d.ts +25 -0
  71. package/dist/src/domain/triageFailedRun.js +46 -0
  72. package/dist/src/index.d.ts +4 -0
  73. package/dist/src/index.js +4 -0
  74. package/dist/src/indexer/extractors/frontendContractExtractor.d.ts +17 -0
  75. package/dist/src/indexer/extractors/frontendContractExtractor.js +109 -0
  76. package/dist/src/indexer/extractors/frontendRuntimeExtractor.d.ts +14 -0
  77. package/dist/src/indexer/extractors/frontendRuntimeExtractor.js +110 -0
  78. package/dist/src/indexer/extractors/testAssetExtractor.d.ts +13 -0
  79. package/dist/src/indexer/extractors/testAssetExtractor.js +17 -0
  80. package/dist/src/indexer/refreshPipeline.d.ts +12 -0
  81. package/dist/src/indexer/refreshPipeline.js +156 -0
  82. package/dist/src/indexer/snapshotStore.d.ts +10 -0
  83. package/dist/src/indexer/snapshotStore.js +45 -0
  84. package/dist/src/knowledge/database.d.ts +3 -0
  85. package/dist/src/knowledge/database.js +8 -0
  86. package/dist/src/knowledge/migrations.d.ts +1 -0
  87. package/dist/src/knowledge/migrations.js +28 -0
  88. package/dist/src/knowledge/repositories.d.ts +28 -0
  89. package/dist/src/knowledge/repositories.js +78 -0
  90. package/dist/src/mcp/registerTools.d.ts +11 -0
  91. package/dist/src/mcp/registerTools.js +118 -0
  92. package/dist/src/mcp/server.d.ts +4 -0
  93. package/dist/src/mcp/server.js +29 -0
  94. package/dist/src/utils/fileUtils.d.ts +4 -0
  95. package/dist/src/utils/fileUtils.js +16 -0
  96. package/dist/src/utils/pathUtils.d.ts +7 -0
  97. package/dist/src/utils/pathUtils.js +59 -0
  98. package/dist/src/utils/textUtils.d.ts +3 -0
  99. package/dist/src/utils/textUtils.js +26 -0
  100. package/docs/architecture/overview.md +31 -0
  101. package/docs/consumer-integration.md +64 -0
  102. package/docs/operator-cookbook.md +39 -0
  103. package/docs/plugin-packaging.md +33 -0
  104. package/docs/superpowers/plans/2026-04-19-autotests-overkill-v1.md +600 -0
  105. package/docs/tool-catalog.md +34 -0
  106. package/overkill.config.example.json +16 -0
  107. package/package.json +73 -0
  108. package/skills/overkill-debug-failure/SKILL.md +13 -0
  109. package/skills/overkill-find-gaps/SKILL.md +13 -0
  110. package/skills/overkill-generate-setup/SKILL.md +12 -0
  111. package/skills/overkill-generate-test/SKILL.md +15 -0
  112. package/skills/overkill-impact-analysis/SKILL.md +12 -0
  113. package/skills/overkill-onboard/SKILL.md +16 -0
  114. package/skills/overkill-prompt-builder/SKILL.md +13 -0
  115. package/skills/overkill-reuse-project-patterns/SKILL.md +13 -0
  116. package/skills/overkill-review-test-draft/SKILL.md +10 -0
  117. package/templates/prompts/debug-failure.md +3 -0
  118. package/templates/prompts/find-gaps.md +3 -0
  119. package/templates/prompts/generate-test.md +3 -0
  120. package/templates/prompts/impact-analysis.md +3 -0
  121. package/templates/spec-blueprints/default.md +39 -0
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@mknrt/autotests-overkill",
3
+ "version": "1.1.0",
4
+ "private": false,
5
+ "type": "module",
6
+ "description": "AI-assisted testing intelligence platform for autotests2, caseplatform-web, and CI artifacts",
7
+ "license": "MIT",
8
+ "author": "mknrt",
9
+ "homepage": "https://github.com/iamknrt/autotests-overkill#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/iamknrt/autotests-overkill/issues"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/iamknrt/autotests-overkill.git"
16
+ },
17
+ "engines": {
18
+ "node": ">=20.0.0"
19
+ },
20
+ "bin": {
21
+ "autotests-overkill": "./dist/src/cli/main.js"
22
+ },
23
+ "files": [
24
+ "dist/",
25
+ "skills/",
26
+ "templates/",
27
+ "assets/",
28
+ "docs/",
29
+ "overkill.config.example.json",
30
+ "README.md"
31
+ ],
32
+ "exports": {
33
+ ".": {
34
+ "import": "./dist/src/index.js",
35
+ "types": "./dist/src/index.d.ts"
36
+ }
37
+ },
38
+ "main": "./dist/src/index.js",
39
+ "types": "./dist/src/index.d.ts",
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "scripts": {
44
+ "clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
45
+ "build": "npm run clean && tsc -p tsconfig.build.json",
46
+ "test": "vitest run",
47
+ "test:watch": "vitest",
48
+ "lint": "tsc -p tsconfig.json --noEmit",
49
+ "index": "tsx src/cli/indexKnowledge.ts",
50
+ "mcp": "tsx src/cli/runMcpServer.ts",
51
+ "mcp:smoke": "vitest run tests/mcp/smoke.test.ts",
52
+ "acceptance:coverage": "tsx src/cli/runAcceptance.ts coverage",
53
+ "acceptance:coverage:legacy": "tsx src/cli/runAcceptance.ts coverage dateRangeInput",
54
+ "acceptance:blueprint": "tsx src/cli/runAcceptance.ts blueprint dateRangeField",
55
+ "acceptance:failure": "tsx src/cli/runAcceptance.ts failure",
56
+ "acceptance:impact": "tsx src/cli/runAcceptance.ts impact",
57
+ "verify": "npm run lint && npm run test && npm run build",
58
+ "prepublishOnly": "npm run verify"
59
+ },
60
+ "dependencies": {
61
+ "@modelcontextprotocol/sdk": "^1.13.0",
62
+ "better-sqlite3": "^12.6.2",
63
+ "fast-glob": "^3.3.3",
64
+ "zod": "^3.24.1"
65
+ },
66
+ "devDependencies": {
67
+ "@types/better-sqlite3": "^7.6.12",
68
+ "@types/node": "^22.15.3",
69
+ "tsx": "^4.19.4",
70
+ "typescript": "^5.8.3",
71
+ "vitest": "^3.1.2"
72
+ }
73
+ }
@@ -0,0 +1,13 @@
1
+ # overkill-debug-failure
2
+
3
+ Goal: triage failed runs using real artifacts and metadata.
4
+
5
+ Workflow:
6
+ 1. Run `summarize_ci_context`.
7
+ 2. Run `triage_failed_run`.
8
+ 3. Run `build_rerun_scope`.
9
+ 4. If code changed recently, run `analyze_diff_impact`.
10
+
11
+ Rules:
12
+ - Separate artifact-backed hypotheses from generic guesses.
13
+ - Mention screenshots, videos, or API captures explicitly when they inform the conclusion.
@@ -0,0 +1,13 @@
1
+ # overkill-find-gaps
2
+
3
+ Goal: show meaningful coverage gaps without hand-grepping two repositories.
4
+
5
+ Workflow:
6
+ 1. Run `map_feature_to_existing_coverage`.
7
+ 2. Run `find_frontend_runtime_logic`.
8
+ 3. Run `analyze_test_gaps`.
9
+ 4. Run `recommend_selector_strategy` if the next step is new test work.
10
+
11
+ Rules:
12
+ - Focus on runtime branches, methods, and events with evidence.
13
+ - Distinguish true gaps from unclear heuristics using warnings/confidence.
@@ -0,0 +1,12 @@
1
+ # overkill-generate-setup
2
+
3
+ Goal: produce a setup/teardown plan that respects `autotests2` conventions.
4
+
5
+ Workflow:
6
+ 1. Run `find_test_area_context`.
7
+ 2. Run `find_existing_test_assets`.
8
+ 3. Run `build_setup_teardown_plan`.
9
+
10
+ Rules:
11
+ - Reuse auth, init, and wait helpers before suggesting new support code.
12
+ - Keep setup deterministic and aligned with the target area.
@@ -0,0 +1,15 @@
1
+ # overkill-generate-test
2
+
3
+ Goal: generate a draft test with maximum reuse and minimum ad-hoc Cypress code.
4
+
5
+ Workflow:
6
+ 1. Run `find_existing_test_assets`.
7
+ 2. Run `find_frontend_contract`.
8
+ 3. Run `find_frontend_runtime_logic`.
9
+ 4. Run `generate_spec_blueprint`.
10
+ 5. Present the draft as a starting point, not an auto-applied change.
11
+
12
+ Rules:
13
+ - Prefer existing commands, selectors, and init patterns from `autotests2`.
14
+ - Do not silently write into consumer repositories.
15
+ - Cite repo paths from evidence when explaining the draft.
@@ -0,0 +1,12 @@
1
+ # overkill-impact-analysis
2
+
3
+ Goal: determine which tests are affected by a code change.
4
+
5
+ Workflow:
6
+ 1. Run `analyze_diff_impact`.
7
+ 2. Run `build_rerun_scope` if there are failed specs or current CI context.
8
+ 3. Summarize the smallest safe rerun set.
9
+
10
+ Rules:
11
+ - Prefer evidence-backed impacted specs over broad reruns.
12
+ - Call out uncertainty with warnings when heuristics are weak.
@@ -0,0 +1,16 @@
1
+ # overkill-onboard
2
+
3
+ Goal: onboard an engineer to the platform quickly.
4
+
5
+ Start Here:
6
+ 1. Read `README.md`.
7
+ 2. Copy `overkill.config.example.json` to `overkill.config.json`.
8
+ 3. Run `npm install`.
9
+ 4. Run `npm run build`.
10
+ 5. Run `npm run index`.
11
+ 6. Run `npm run mcp:smoke`.
12
+ 7. Use the checked-in `.mcp.json` manifest for client integration instead of `npm run mcp`, because stdio MCP servers must keep `stdout` clean.
13
+ 7. Run the acceptance commands against local repos.
14
+
15
+ Key Idea:
16
+ - The platform analyzes and drafts; it does not silently edit consumer repos.
@@ -0,0 +1,13 @@
1
+ # overkill-prompt-builder
2
+
3
+ Goal: build high-quality prompts for Codex tasks on top of the platform.
4
+
5
+ Prompt Template:
6
+ 1. State the target feature or widget.
7
+ 2. State the desired outcome: generate draft, find gaps, debug failure, or analyze impact.
8
+ 3. Mention the target area if known: `formRunner`, `constructor`, or `criticalPathTests`.
9
+ 4. Ask for evidence-backed output with repo paths.
10
+ 5. Ask explicitly to reuse existing assets before proposing new code.
11
+
12
+ Example:
13
+ `Use overkill tools to analyze the caption widget in formRunner, find reusable test assets, extract the frontend contract, and produce a draft spec skeleton with repo-path evidence.`
@@ -0,0 +1,13 @@
1
+ # overkill-reuse-project-patterns
2
+
3
+ Goal: reuse the project’s own commands, setup, and selector conventions before introducing anything new.
4
+
5
+ Workflow:
6
+ 1. Run `find_existing_test_assets`.
7
+ 2. Run `find_test_area_context`.
8
+ 3. Run `recommend_selector_strategy`.
9
+ 4. Run `build_setup_teardown_plan` for the target area.
10
+
11
+ Rules:
12
+ - Prefer project helpers over custom chains.
13
+ - Call out the exact paths to reusable assets.
@@ -0,0 +1,10 @@
1
+ # overkill-review-test-draft
2
+
3
+ Goal: review a draft test for reuse, anti-flaky patterns, and project fit.
4
+
5
+ Checklist:
6
+ 1. Confirm existing commands/helpers/selectors were reused where possible.
7
+ 2. Check that selector strategy is stable and aligned with `getWidget` or selectors tree.
8
+ 3. Check that setup uses `init()` or `initConf()` consistently.
9
+ 4. Compare the draft against `find_existing_test_assets` results for duplication.
10
+ 5. Flag brittle waits, DOM-order selectors, or silent mutations.
@@ -0,0 +1,3 @@
1
+ # Debug Failure Prompt
2
+
3
+ Summarize CI stats, inspect screenshots/videos/API captures, then produce hypotheses grounded in artifacts. Separate environment/flaky suspects from probable product regressions.
@@ -0,0 +1,3 @@
1
+ # Find Gaps Prompt
2
+
3
+ Map current coverage first, then compare runtime branches and events to the existing specs. Highlight only evidence-backed gaps and rank them by likely user impact.
@@ -0,0 +1,3 @@
1
+ # Generate Test Prompt
2
+
3
+ Use `find_existing_test_assets`, `find_frontend_contract`, `find_frontend_runtime_logic`, and `generate_spec_blueprint` for the target widget or feature. Reuse existing setup and selectors. Do not invent new helpers unless reuse is impossible.
@@ -0,0 +1,3 @@
1
+ # Impact Analysis Prompt
2
+
3
+ Given changed files or a diff, infer the frontend feature area, map to existing specs, and return the smallest rerun set that still protects the changed behavior.
@@ -0,0 +1,39 @@
1
+ # Default Spec Blueprint
2
+
3
+ ```js
4
+ /**
5
+ * Draft spec blueprint
6
+ * Suggested import target: ../../../../../support/base
7
+ * Setup hints:
8
+ * - keep init(...) at describe level
9
+ * - reuse before()/beforeEach() from the closest reference spec
10
+ * Reuse candidates:
11
+ * - cy.getWidget
12
+ * - cy.selectForm / cy.selectAppInConstructor
13
+ * - cy.waitVcmForm / cy.waitFormsInFr
14
+ * Selector guidance: prefer existing selectors tree or testguid-backed hooks, not nth-child or deprecated elements selectors.
15
+ */
16
+ import init from '../../../../../support/base';
17
+
18
+ describe('[Overkill] <feature>', { tags: ['@vcm', '@regress', '@parallel-true'] }, () => {
19
+ init(Cypress.expose('<app-id>'));
20
+
21
+ before(() => {
22
+ cy.waitFormsInFr('<form count if the feature opens nested forms>');
23
+ });
24
+
25
+ beforeEach(() => {
26
+ cy.waitVcmForm();
27
+ cy.fixCypressSpec();
28
+ cy.selectForm('<form name from reference spec>');
29
+ cy.waitVcmForm();
30
+ });
31
+
32
+ const target = '<widget control name from reference spec>';
33
+
34
+ it('covers the primary scenario', () => {
35
+ cy.getWidget('<action widget from reference spec>').click();
36
+ cy.getWidget(target).should('be.visible');
37
+ });
38
+ });
39
+ ```