@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.
- package/README.md +117 -0
- package/assets/overkill-logo.svg +8 -0
- package/assets/overkill-small.svg +8 -0
- package/dist/connectors/index.d.ts +4 -0
- package/dist/connectors/index.js +4 -0
- package/dist/indexer/index.d.ts +4 -0
- package/dist/indexer/index.js +4 -0
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +2 -0
- package/dist/src/appContext.d.ts +21 -0
- package/dist/src/appContext.js +40 -0
- package/dist/src/cli/indexKnowledge.d.ts +1 -0
- package/dist/src/cli/indexKnowledge.js +11 -0
- package/dist/src/cli/main.d.ts +19 -0
- package/dist/src/cli/main.js +59 -0
- package/dist/src/cli/runAcceptance.d.ts +21 -0
- package/dist/src/cli/runAcceptance.js +131 -0
- package/dist/src/cli/runMcpServer.d.ts +1 -0
- package/dist/src/cli/runMcpServer.js +10 -0
- package/dist/src/cli/shared.d.ts +1 -0
- package/dist/src/cli/shared.js +7 -0
- package/dist/src/config/consumerConfig.d.ts +126 -0
- package/dist/src/config/consumerConfig.js +63 -0
- package/dist/src/connectors/autotests2Connector.d.ts +41 -0
- package/dist/src/connectors/autotests2Connector.js +94 -0
- package/dist/src/connectors/caseplatformConnector.d.ts +35 -0
- package/dist/src/connectors/caseplatformConnector.js +251 -0
- package/dist/src/connectors/ciArtifactsConnector.d.ts +23 -0
- package/dist/src/connectors/ciArtifactsConnector.js +14 -0
- package/dist/src/connectors/diffConnector.d.ts +1 -0
- package/dist/src/connectors/diffConnector.js +4 -0
- package/dist/src/connectors/filesystemConnector.d.ts +4 -0
- package/dist/src/connectors/filesystemConnector.js +15 -0
- package/dist/src/connectors/gitlabConnector.d.ts +14 -0
- package/dist/src/connectors/gitlabConnector.js +64 -0
- package/dist/src/connectors/reportPortalConnector.d.ts +14 -0
- package/dist/src/connectors/reportPortalConnector.js +84 -0
- package/dist/src/contracts/confidence.d.ts +8 -0
- package/dist/src/contracts/confidence.js +33 -0
- package/dist/src/contracts/errors.d.ts +6 -0
- package/dist/src/contracts/errors.js +18 -0
- package/dist/src/contracts/toolOutput.d.ts +113 -0
- package/dist/src/contracts/toolOutput.js +35 -0
- package/dist/src/domain/analyzeDiffImpact.d.ts +22 -0
- package/dist/src/domain/analyzeDiffImpact.js +52 -0
- package/dist/src/domain/analyzeTestGaps.d.ts +22 -0
- package/dist/src/domain/analyzeTestGaps.js +41 -0
- package/dist/src/domain/buildRerunScope.d.ts +23 -0
- package/dist/src/domain/buildRerunScope.js +17 -0
- package/dist/src/domain/buildSetupTeardownPlan.d.ts +23 -0
- package/dist/src/domain/buildSetupTeardownPlan.js +13 -0
- package/dist/src/domain/findExistingTestAssets.d.ts +22 -0
- package/dist/src/domain/findExistingTestAssets.js +50 -0
- package/dist/src/domain/findFrontendContract.d.ts +22 -0
- package/dist/src/domain/findFrontendContract.js +13 -0
- package/dist/src/domain/findFrontendRuntimeLogic.d.ts +22 -0
- package/dist/src/domain/findFrontendRuntimeLogic.js +28 -0
- package/dist/src/domain/findTestAreaContext.d.ts +23 -0
- package/dist/src/domain/findTestAreaContext.js +30 -0
- package/dist/src/domain/generateSpecBlueprint.d.ts +23 -0
- package/dist/src/domain/generateSpecBlueprint.js +213 -0
- package/dist/src/domain/mapFeatureToExistingCoverage.d.ts +22 -0
- package/dist/src/domain/mapFeatureToExistingCoverage.js +56 -0
- package/dist/src/domain/recommendSelectorStrategy.d.ts +22 -0
- package/dist/src/domain/recommendSelectorStrategy.js +13 -0
- package/dist/src/domain/shared.d.ts +5 -0
- package/dist/src/domain/shared.js +36 -0
- package/dist/src/domain/summarizeCiContext.d.ts +22 -0
- package/dist/src/domain/summarizeCiContext.js +35 -0
- package/dist/src/domain/triageFailedRun.d.ts +25 -0
- package/dist/src/domain/triageFailedRun.js +46 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +4 -0
- package/dist/src/indexer/extractors/frontendContractExtractor.d.ts +17 -0
- package/dist/src/indexer/extractors/frontendContractExtractor.js +109 -0
- package/dist/src/indexer/extractors/frontendRuntimeExtractor.d.ts +14 -0
- package/dist/src/indexer/extractors/frontendRuntimeExtractor.js +110 -0
- package/dist/src/indexer/extractors/testAssetExtractor.d.ts +13 -0
- package/dist/src/indexer/extractors/testAssetExtractor.js +17 -0
- package/dist/src/indexer/refreshPipeline.d.ts +12 -0
- package/dist/src/indexer/refreshPipeline.js +156 -0
- package/dist/src/indexer/snapshotStore.d.ts +10 -0
- package/dist/src/indexer/snapshotStore.js +45 -0
- package/dist/src/knowledge/database.d.ts +3 -0
- package/dist/src/knowledge/database.js +8 -0
- package/dist/src/knowledge/migrations.d.ts +1 -0
- package/dist/src/knowledge/migrations.js +28 -0
- package/dist/src/knowledge/repositories.d.ts +28 -0
- package/dist/src/knowledge/repositories.js +78 -0
- package/dist/src/mcp/registerTools.d.ts +11 -0
- package/dist/src/mcp/registerTools.js +118 -0
- package/dist/src/mcp/server.d.ts +4 -0
- package/dist/src/mcp/server.js +29 -0
- package/dist/src/utils/fileUtils.d.ts +4 -0
- package/dist/src/utils/fileUtils.js +16 -0
- package/dist/src/utils/pathUtils.d.ts +7 -0
- package/dist/src/utils/pathUtils.js +59 -0
- package/dist/src/utils/textUtils.d.ts +3 -0
- package/dist/src/utils/textUtils.js +26 -0
- package/docs/architecture/overview.md +31 -0
- package/docs/consumer-integration.md +64 -0
- package/docs/operator-cookbook.md +39 -0
- package/docs/plugin-packaging.md +33 -0
- package/docs/superpowers/plans/2026-04-19-autotests-overkill-v1.md +600 -0
- package/docs/tool-catalog.md +34 -0
- package/overkill.config.example.json +16 -0
- package/package.json +73 -0
- package/skills/overkill-debug-failure/SKILL.md +13 -0
- package/skills/overkill-find-gaps/SKILL.md +13 -0
- package/skills/overkill-generate-setup/SKILL.md +12 -0
- package/skills/overkill-generate-test/SKILL.md +15 -0
- package/skills/overkill-impact-analysis/SKILL.md +12 -0
- package/skills/overkill-onboard/SKILL.md +16 -0
- package/skills/overkill-prompt-builder/SKILL.md +13 -0
- package/skills/overkill-reuse-project-patterns/SKILL.md +13 -0
- package/skills/overkill-review-test-draft/SKILL.md +10 -0
- package/templates/prompts/debug-failure.md +3 -0
- package/templates/prompts/find-gaps.md +3 -0
- package/templates/prompts/generate-test.md +3 -0
- package/templates/prompts/impact-analysis.md +3 -0
- package/templates/spec-blueprints/default.md +39 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { analyzeDiffImpact } from '../domain/analyzeDiffImpact.js';
|
|
3
|
+
import { analyzeTestGaps } from '../domain/analyzeTestGaps.js';
|
|
4
|
+
import { buildRerunScope } from '../domain/buildRerunScope.js';
|
|
5
|
+
import { buildSetupTeardownPlan } from '../domain/buildSetupTeardownPlan.js';
|
|
6
|
+
import { findExistingTestAssets } from '../domain/findExistingTestAssets.js';
|
|
7
|
+
import { findFrontendContract } from '../domain/findFrontendContract.js';
|
|
8
|
+
import { findFrontendRuntimeLogic } from '../domain/findFrontendRuntimeLogic.js';
|
|
9
|
+
import { findTestAreaContext } from '../domain/findTestAreaContext.js';
|
|
10
|
+
import { generateSpecBlueprint } from '../domain/generateSpecBlueprint.js';
|
|
11
|
+
import { mapFeatureToExistingCoverage } from '../domain/mapFeatureToExistingCoverage.js';
|
|
12
|
+
import { recommendSelectorStrategy } from '../domain/recommendSelectorStrategy.js';
|
|
13
|
+
import { summarizeCiContext } from '../domain/summarizeCiContext.js';
|
|
14
|
+
import { triageFailedRun } from '../domain/triageFailedRun.js';
|
|
15
|
+
import { toolOutputSchema } from '../contracts/toolOutput.js';
|
|
16
|
+
export function buildToolRegistry() {
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
name: 'find_existing_test_assets',
|
|
20
|
+
description: 'Finds reusable specs, commands, helpers, and selectors in autotests2.',
|
|
21
|
+
inputSchema: z.object({ query: z.string().min(1) }),
|
|
22
|
+
outputSchema: toolOutputSchema,
|
|
23
|
+
execute: findExistingTestAssets,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'find_test_area_context',
|
|
27
|
+
description: 'Returns conventions, init patterns, and area context for constructor or formRunner.',
|
|
28
|
+
inputSchema: z.object({ area: z.string().optional(), feature: z.string().optional() }),
|
|
29
|
+
outputSchema: toolOutputSchema,
|
|
30
|
+
execute: findTestAreaContext,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'find_frontend_contract',
|
|
34
|
+
description: 'Extracts widget properties, events, methods, and source evidence from caseplatform-web.',
|
|
35
|
+
inputSchema: z.object({ widget: z.string().min(1) }),
|
|
36
|
+
outputSchema: toolOutputSchema,
|
|
37
|
+
execute: findFrontendContract,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'find_frontend_runtime_logic',
|
|
41
|
+
description: 'Extracts runtime branches, transitions, and event wiring for a widget.',
|
|
42
|
+
inputSchema: z.object({ widget: z.string().min(1) }),
|
|
43
|
+
outputSchema: toolOutputSchema,
|
|
44
|
+
execute: findFrontendRuntimeLogic,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'map_feature_to_existing_coverage',
|
|
48
|
+
description: 'Maps a feature or widget to existing coverage in autotests2.',
|
|
49
|
+
inputSchema: z.object({ widget: z.string().min(1) }),
|
|
50
|
+
outputSchema: toolOutputSchema,
|
|
51
|
+
execute: mapFeatureToExistingCoverage,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'analyze_test_gaps',
|
|
55
|
+
description: 'Highlights likely uncovered runtime methods, events, and branches.',
|
|
56
|
+
inputSchema: z.object({ widget: z.string().min(1) }),
|
|
57
|
+
outputSchema: toolOutputSchema,
|
|
58
|
+
execute: analyzeTestGaps,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: 'generate_spec_blueprint',
|
|
62
|
+
description: 'Builds a draft spec blueprint using existing project patterns.',
|
|
63
|
+
inputSchema: z.object({ feature: z.string().min(1), area: z.string().optional() }),
|
|
64
|
+
outputSchema: toolOutputSchema,
|
|
65
|
+
execute: generateSpecBlueprint,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'recommend_selector_strategy',
|
|
69
|
+
description: 'Recommends stable selectors and project helper usage for a feature.',
|
|
70
|
+
inputSchema: z.object({ feature: z.string().min(1) }),
|
|
71
|
+
outputSchema: toolOutputSchema,
|
|
72
|
+
execute: recommendSelectorStrategy,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'build_setup_teardown_plan',
|
|
76
|
+
description: 'Builds a reuse-first setup and teardown plan.',
|
|
77
|
+
inputSchema: z.object({ area: z.string().min(1), feature: z.string().min(1) }),
|
|
78
|
+
outputSchema: toolOutputSchema,
|
|
79
|
+
execute: buildSetupTeardownPlan,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'analyze_diff_impact',
|
|
83
|
+
description: 'Maps changed files to affected tests and risk areas.',
|
|
84
|
+
inputSchema: z.object({ changedFiles: z.array(z.string()).min(1) }),
|
|
85
|
+
outputSchema: toolOutputSchema,
|
|
86
|
+
execute: analyzeDiffImpact,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'triage_failed_run',
|
|
90
|
+
description: 'Analyzes failed run artifacts and returns evidence-backed hypotheses.',
|
|
91
|
+
inputSchema: z.object({
|
|
92
|
+
statsFile: z.string().min(1),
|
|
93
|
+
screenshotsRoot: z.string().min(1),
|
|
94
|
+
videosRoot: z.string().min(1),
|
|
95
|
+
apiCaptureRoot: z.string().min(1),
|
|
96
|
+
}),
|
|
97
|
+
outputSchema: toolOutputSchema,
|
|
98
|
+
execute: triageFailedRun,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: 'build_rerun_scope',
|
|
102
|
+
description: 'Builds a minimal rerun scope from changed files and failed specs.',
|
|
103
|
+
inputSchema: z.object({
|
|
104
|
+
changedFiles: z.array(z.string()).optional(),
|
|
105
|
+
statsFile: z.string().min(1),
|
|
106
|
+
}),
|
|
107
|
+
outputSchema: toolOutputSchema,
|
|
108
|
+
execute: buildRerunScope,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: 'summarize_ci_context',
|
|
112
|
+
description: 'Summarizes CI stats, launch metadata, and artifact availability.',
|
|
113
|
+
inputSchema: z.object({ statsFile: z.string().min(1) }),
|
|
114
|
+
outputSchema: toolOutputSchema,
|
|
115
|
+
execute: summarizeCiContext,
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { AppContext } from '../appContext.js';
|
|
3
|
+
export declare function createMcpServer(context: AppContext): Promise<McpServer>;
|
|
4
|
+
export declare function runMcpServer(context: AppContext): Promise<void>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
|
+
import { buildToolRegistry } from './registerTools.js';
|
|
4
|
+
export async function createMcpServer(context) {
|
|
5
|
+
const server = new McpServer({
|
|
6
|
+
name: 'autotests-ultimate-testing-overkill',
|
|
7
|
+
version: '1.1.0',
|
|
8
|
+
});
|
|
9
|
+
for (const tool of buildToolRegistry()) {
|
|
10
|
+
server.registerTool(tool.name, {
|
|
11
|
+
title: tool.name,
|
|
12
|
+
description: tool.description,
|
|
13
|
+
inputSchema: tool.inputSchema,
|
|
14
|
+
outputSchema: tool.outputSchema,
|
|
15
|
+
}, async (args) => {
|
|
16
|
+
const structuredContent = await tool.execute(args, context);
|
|
17
|
+
return {
|
|
18
|
+
content: [{ type: 'text', text: structuredContent.summary }],
|
|
19
|
+
structuredContent,
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return server;
|
|
24
|
+
}
|
|
25
|
+
export async function runMcpServer(context) {
|
|
26
|
+
const server = await createMcpServer(context);
|
|
27
|
+
const transport = new StdioServerTransport();
|
|
28
|
+
await server.connect(transport);
|
|
29
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function readTextIfExists(filePath: string): string;
|
|
2
|
+
export declare function ensureDirectory(directoryPath: string): void;
|
|
3
|
+
export declare function writeJson(filePath: string, value: unknown): void;
|
|
4
|
+
export declare function readJson<T>(filePath: string): T;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
export function readTextIfExists(filePath) {
|
|
3
|
+
if (!fs.existsSync(filePath)) {
|
|
4
|
+
return '';
|
|
5
|
+
}
|
|
6
|
+
return fs.readFileSync(filePath, 'utf8').replace(/^\uFEFF/, '');
|
|
7
|
+
}
|
|
8
|
+
export function ensureDirectory(directoryPath) {
|
|
9
|
+
fs.mkdirSync(directoryPath, { recursive: true });
|
|
10
|
+
}
|
|
11
|
+
export function writeJson(filePath, value) {
|
|
12
|
+
fs.writeFileSync(filePath, JSON.stringify(value, null, 2), 'utf8');
|
|
13
|
+
}
|
|
14
|
+
export function readJson(filePath) {
|
|
15
|
+
return JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
|
16
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function toPosixPath(value: string): string;
|
|
2
|
+
export declare function unique<T>(items: T[]): T[];
|
|
3
|
+
export declare function pathIncludes(pathValue: string, query: string): boolean;
|
|
4
|
+
export declare function safeRelative(from: string, to: string): string;
|
|
5
|
+
export declare function basenameWithoutExt(filePath: string): string;
|
|
6
|
+
export declare function widgetNameCandidates(widgetHint: string): string[];
|
|
7
|
+
export declare function featureNameCandidates(featureHint: string): string[];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
export function toPosixPath(value) {
|
|
3
|
+
return value.replaceAll('\\', '/');
|
|
4
|
+
}
|
|
5
|
+
export function unique(items) {
|
|
6
|
+
return [...new Set(items)];
|
|
7
|
+
}
|
|
8
|
+
export function pathIncludes(pathValue, query) {
|
|
9
|
+
return toPosixPath(pathValue).toLowerCase().includes(query.toLowerCase());
|
|
10
|
+
}
|
|
11
|
+
export function safeRelative(from, to) {
|
|
12
|
+
return toPosixPath(path.relative(from, to));
|
|
13
|
+
}
|
|
14
|
+
export function basenameWithoutExt(filePath) {
|
|
15
|
+
return path.basename(filePath, path.extname(filePath));
|
|
16
|
+
}
|
|
17
|
+
export function widgetNameCandidates(widgetHint) {
|
|
18
|
+
const clean = widgetHint.trim();
|
|
19
|
+
const pascal = clean
|
|
20
|
+
.replace(/[_\-]+/g, ' ')
|
|
21
|
+
.split(/\s+/)
|
|
22
|
+
.filter(Boolean)
|
|
23
|
+
.map((part) => part[0].toUpperCase() + part.slice(1))
|
|
24
|
+
.join('');
|
|
25
|
+
return unique([clean, clean.toLowerCase(), pascal, `${pascal}s`]);
|
|
26
|
+
}
|
|
27
|
+
export function featureNameCandidates(featureHint) {
|
|
28
|
+
const clean = featureHint.trim();
|
|
29
|
+
const normalized = clean
|
|
30
|
+
.replace(/([a-z])([A-Z])/g, '$1 $2')
|
|
31
|
+
.replace(/[_\-]+/g, ' ')
|
|
32
|
+
.trim();
|
|
33
|
+
const parts = normalized.split(/\s+/).filter(Boolean);
|
|
34
|
+
const pascal = parts.map((part) => part[0].toUpperCase() + part.slice(1)).join('');
|
|
35
|
+
const lowerJoined = parts.join('').toLowerCase();
|
|
36
|
+
const singular = lowerJoined.endsWith('s') && lowerJoined.length > 4 ? lowerJoined.slice(0, -1) : lowerJoined;
|
|
37
|
+
const capitalizedSingular = singular ? singular[0].toUpperCase() + singular.slice(1) : '';
|
|
38
|
+
const candidates = [
|
|
39
|
+
clean,
|
|
40
|
+
clean.toLowerCase(),
|
|
41
|
+
normalized,
|
|
42
|
+
normalized.toLowerCase(),
|
|
43
|
+
lowerJoined,
|
|
44
|
+
singular,
|
|
45
|
+
pascal,
|
|
46
|
+
capitalizedSingular,
|
|
47
|
+
singular ? `${singular}s` : '',
|
|
48
|
+
];
|
|
49
|
+
if (/error/i.test(clean)) {
|
|
50
|
+
candidates.push('apperror', 'AppError', 'ErrorTree', 'ErrorsGrid', 'validate');
|
|
51
|
+
}
|
|
52
|
+
if (/application|app/i.test(clean)) {
|
|
53
|
+
candidates.push('application', 'Application');
|
|
54
|
+
}
|
|
55
|
+
if (/process/i.test(clean)) {
|
|
56
|
+
candidates.push('process', 'Process');
|
|
57
|
+
}
|
|
58
|
+
return unique(candidates.filter(Boolean));
|
|
59
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export function truncate(value, maxLength = 220) {
|
|
2
|
+
if (value.length <= maxLength) {
|
|
3
|
+
return value;
|
|
4
|
+
}
|
|
5
|
+
return `${value.slice(0, maxLength - 3)}...`;
|
|
6
|
+
}
|
|
7
|
+
export function extractMatches(source, expression) {
|
|
8
|
+
const results = [];
|
|
9
|
+
let match;
|
|
10
|
+
const regex = new RegExp(expression.source, expression.flags.includes('g') ? expression.flags : `${expression.flags}g`);
|
|
11
|
+
while ((match = regex.exec(source)) !== null) {
|
|
12
|
+
if (match[1]) {
|
|
13
|
+
results.push(match[1]);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return results;
|
|
17
|
+
}
|
|
18
|
+
export function scoreTextMatch(source, query) {
|
|
19
|
+
const normalizedSource = source.toLowerCase();
|
|
20
|
+
const normalizedQuery = query.toLowerCase();
|
|
21
|
+
if (normalizedSource.includes(normalizedQuery)) {
|
|
22
|
+
return 2;
|
|
23
|
+
}
|
|
24
|
+
const queryTokens = normalizedQuery.split(/[\s_\-/]+/).filter(Boolean);
|
|
25
|
+
return queryTokens.reduce((score, token) => score + (normalizedSource.includes(token) ? 1 : 0), 0);
|
|
26
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Architecture Overview
|
|
2
|
+
|
|
3
|
+
## Boundaries
|
|
4
|
+
|
|
5
|
+
- `autotests-overkill` is the platform repository.
|
|
6
|
+
- `autotests2` is a consumer and evidence source.
|
|
7
|
+
- `caseplatform-web` is a frontend knowledge source.
|
|
8
|
+
- CI artifacts are ingested as data, not treated as source code.
|
|
9
|
+
|
|
10
|
+
## Runtime Model
|
|
11
|
+
|
|
12
|
+
1. Consumer config points to repo roots and CI artifacts.
|
|
13
|
+
2. Connectors scan those sources without mutating them.
|
|
14
|
+
3. Extractors normalize test assets, frontend contracts, runtime signals, and CI context.
|
|
15
|
+
4. The refresh pipeline stores searchable documents in SQLite + FTS and writes JSON snapshots under `.overkill-cache`.
|
|
16
|
+
5. Domain services compose evidence into normalized tool outputs.
|
|
17
|
+
6. The MCP server exposes those services as independent tools for Codex.
|
|
18
|
+
|
|
19
|
+
## Design Decisions
|
|
20
|
+
|
|
21
|
+
- TypeScript is used for explicit contracts and maintainability.
|
|
22
|
+
- SQLite + FTS gives fast local retrieval without requiring vector infrastructure.
|
|
23
|
+
- Tools are intentionally narrow and composable.
|
|
24
|
+
- Skills are documentation/orchestration layers; they do not bypass tool contracts.
|
|
25
|
+
- Consumer repositories stay read-only by default from the platform point of view.
|
|
26
|
+
|
|
27
|
+
## v1 Limitations
|
|
28
|
+
|
|
29
|
+
- Extractors are structural and regex-based rather than AST-complete.
|
|
30
|
+
- ReportPortal and GitLab integrations are config-ready but optional; local artifact analysis is the default path.
|
|
31
|
+
- Diff impact relies on naming and path heuristics, which is acceptable for v1 but should be hardened with richer relation indexing later.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Consumer Integration
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
Connect this package to `autotests2`, `caseplatform-web`, and CI artifacts without moving platform logic into those repositories.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- Local clone of `autotests2`
|
|
10
|
+
- Local clone of `caseplatform-web`
|
|
11
|
+
- Local Cypress artifacts or a synced CI artifact directory
|
|
12
|
+
- Node.js 20+
|
|
13
|
+
|
|
14
|
+
## Setup
|
|
15
|
+
|
|
16
|
+
1. Install the package with `npm install -D @mknrt/autotests-overkill`.
|
|
17
|
+
2. Copy `node_modules/@mknrt/autotests-overkill/overkill.config.example.json` to `overkill.config.json`.
|
|
18
|
+
3. Point `repos.autotests2` to the local `autotests2` clone.
|
|
19
|
+
4. Point `repos.caseplatformWeb` to the local `caseplatform-web` clone.
|
|
20
|
+
5. Point `ci.artifactsRoot` to the local Cypress artifact root, usually `../autotests2/cypress`.
|
|
21
|
+
6. Optionally set `ci.reportPortal.*` and `ci.gitlab.*` for live CI enrichment.
|
|
22
|
+
7. Run `npx autotests-overkill index`.
|
|
23
|
+
|
|
24
|
+
## Integration contract
|
|
25
|
+
|
|
26
|
+
- The platform core stays in this repository.
|
|
27
|
+
- `autotests2` remains the consumer and reuse source for commands, helpers, selectors, and spec patterns.
|
|
28
|
+
- `caseplatform-web` remains the frontend knowledge source.
|
|
29
|
+
- Consumer repositories are not mutated unless an operator explicitly copies a generated draft into them.
|
|
30
|
+
|
|
31
|
+
## Recommended operator flow
|
|
32
|
+
|
|
33
|
+
1. Run `npx autotests-overkill index` after fresh pulls or artifact sync.
|
|
34
|
+
2. Start the MCP server through a consumer-local MCP manifest or run `npx autotests-overkill mcp` directly.
|
|
35
|
+
3. Use the bundled skills or direct MCP tools to gather context.
|
|
36
|
+
4. Review the generated blueprint, gap analysis, or failure triage.
|
|
37
|
+
5. Apply test edits manually in `autotests2` only after review.
|
|
38
|
+
|
|
39
|
+
## Consumer-local MCP example
|
|
40
|
+
|
|
41
|
+
Create `.mcp.json` in the consumer repository:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"mcpServers": {
|
|
46
|
+
"autotests-overkill": {
|
|
47
|
+
"command": "node",
|
|
48
|
+
"args": [
|
|
49
|
+
"./node_modules/@mknrt/autotests-overkill/dist/src/cli/runMcpServer.js"
|
|
50
|
+
],
|
|
51
|
+
"cwd": "."
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Because the package is published publicly to npm, consumers do not need private registry setup to install it.
|
|
58
|
+
|
|
59
|
+
## CI integration notes
|
|
60
|
+
|
|
61
|
+
- Local artifacts stay the default source of truth.
|
|
62
|
+
- ReportPortal and GitLab are optional enrichment layers.
|
|
63
|
+
- If tokens, project IDs, or CI metadata are missing, the platform stays operational and emits warnings instead of failing.
|
|
64
|
+
- Re-run `npx autotests-overkill index` after syncing fresh artifacts if you want the knowledge cache refreshed before analysis.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Operator Cookbook
|
|
2
|
+
|
|
3
|
+
## Generate a draft test
|
|
4
|
+
|
|
5
|
+
1. Run `find_existing_test_assets` for the target widget or feature.
|
|
6
|
+
2. Run `find_frontend_contract`.
|
|
7
|
+
3. Run `find_frontend_runtime_logic`.
|
|
8
|
+
4. Run `generate_spec_blueprint`.
|
|
9
|
+
5. Review reuse candidates, setup hints, and selector guidance before editing `autotests2`.
|
|
10
|
+
|
|
11
|
+
## Find coverage gaps
|
|
12
|
+
|
|
13
|
+
1. Run `map_feature_to_existing_coverage`.
|
|
14
|
+
2. Run `analyze_test_gaps`.
|
|
15
|
+
3. Run `recommend_selector_strategy`.
|
|
16
|
+
4. Run `build_setup_teardown_plan`.
|
|
17
|
+
|
|
18
|
+
## Triage a failed run
|
|
19
|
+
|
|
20
|
+
1. Run `summarize_ci_context`.
|
|
21
|
+
2. Run `triage_failed_run`.
|
|
22
|
+
3. Run `build_rerun_scope`.
|
|
23
|
+
4. If frontend files changed, run `analyze_diff_impact`.
|
|
24
|
+
|
|
25
|
+
## Onboard a new engineer
|
|
26
|
+
|
|
27
|
+
1. Start with `skills/overkill-onboard/SKILL.md`.
|
|
28
|
+
2. Confirm that `overkill.config.json` points to real repo paths.
|
|
29
|
+
3. Let the client start MCP through `.mcp.json` and use the acceptance commands to prove the installation against local data.
|
|
30
|
+
|
|
31
|
+
## Useful verification commands
|
|
32
|
+
|
|
33
|
+
- `npm run verify`
|
|
34
|
+
- `npm run mcp:smoke`
|
|
35
|
+
- `npm run acceptance:coverage`
|
|
36
|
+
- `npm run acceptance:coverage:legacy`
|
|
37
|
+
- `npm run acceptance:blueprint`
|
|
38
|
+
- `npm run acceptance:failure`
|
|
39
|
+
- `npm run acceptance:impact`
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Codex Plugin Packaging
|
|
2
|
+
|
|
3
|
+
## Included plugin files
|
|
4
|
+
|
|
5
|
+
- `.codex-plugin/plugin.json` defines the plugin metadata
|
|
6
|
+
- `.mcp.json` registers the local MCP server command
|
|
7
|
+
- `skills/` contains the bundled skill set used by Codex
|
|
8
|
+
|
|
9
|
+
## Local installation shape
|
|
10
|
+
|
|
11
|
+
The repository is self-contained for local checkout-based Codex usage:
|
|
12
|
+
|
|
13
|
+
1. Keep the repository checked out locally.
|
|
14
|
+
2. Ensure `npm install` has been run once.
|
|
15
|
+
3. Create `overkill.config.json`.
|
|
16
|
+
4. Let Codex discover `.codex-plugin/plugin.json`.
|
|
17
|
+
5. Let Codex start the MCP server through `.mcp.json`.
|
|
18
|
+
|
|
19
|
+
For npm-installed usage inside a consumer repository, prefer a consumer-local `.mcp.json` that points to `./node_modules/@mknrt/autotests-overkill/dist/src/cli/runMcpServer.js`.
|
|
20
|
+
|
|
21
|
+
## MCP registration
|
|
22
|
+
|
|
23
|
+
The local MCP definition starts the server through:
|
|
24
|
+
|
|
25
|
+
- command: `node`
|
|
26
|
+
- args: `./node_modules/tsx/dist/cli.mjs`, `src/cli/runMcpServer.ts`
|
|
27
|
+
- cwd: `C:\gitrep\autotests-overkill`
|
|
28
|
+
|
|
29
|
+
The server reads `overkill.config.json` from the repository root and keeps all writes inside `cacheDir`.
|
|
30
|
+
|
|
31
|
+
## Skills discovery
|
|
32
|
+
|
|
33
|
+
The plugin manifest points `skills` to `./skills/`, so bundled skills such as `overkill-generate-test`, `overkill-find-gaps`, and `overkill-debug-failure` can be discovered without copying files elsewhere.
|