@yasserkhanorg/impact-gate 2.0.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/LICENSE +168 -0
- package/README.md +520 -0
- package/dist/adapters/cypress.d.ts +10 -0
- package/dist/adapters/cypress.d.ts.map +1 -0
- package/dist/adapters/cypress.js +86 -0
- package/dist/adapters/framework_adapter.d.ts +41 -0
- package/dist/adapters/framework_adapter.d.ts.map +1 -0
- package/dist/adapters/framework_adapter.js +152 -0
- package/dist/adapters/playwright.d.ts +10 -0
- package/dist/adapters/playwright.d.ts.map +1 -0
- package/dist/adapters/playwright.js +86 -0
- package/dist/adapters/pytest.d.ts +10 -0
- package/dist/adapters/pytest.d.ts.map +1 -0
- package/dist/adapters/pytest.js +96 -0
- package/dist/adapters/supertest.d.ts +12 -0
- package/dist/adapters/supertest.d.ts.map +1 -0
- package/dist/adapters/supertest.js +85 -0
- package/dist/agent/api_catalog.d.ts +11 -0
- package/dist/agent/api_catalog.d.ts.map +1 -0
- package/dist/agent/api_catalog.js +210 -0
- package/dist/agent/config.d.ts +193 -0
- package/dist/agent/config.d.ts.map +1 -0
- package/dist/agent/config.js +875 -0
- package/dist/agent/feedback.d.ts +91 -0
- package/dist/agent/feedback.d.ts.map +1 -0
- package/dist/agent/feedback.js +323 -0
- package/dist/agent/git.d.ts +19 -0
- package/dist/agent/git.d.ts.map +1 -0
- package/dist/agent/git.js +257 -0
- package/dist/agent/handoff.d.ts +22 -0
- package/dist/agent/handoff.d.ts.map +1 -0
- package/dist/agent/handoff.js +180 -0
- package/dist/agent/llm_agents_flow.d.ts +15 -0
- package/dist/agent/llm_agents_flow.d.ts.map +1 -0
- package/dist/agent/llm_agents_flow.js +434 -0
- package/dist/agent/native_flow.d.ts +6 -0
- package/dist/agent/native_flow.d.ts.map +1 -0
- package/dist/agent/native_flow.js +179 -0
- package/dist/agent/pipeline.d.ts +7 -0
- package/dist/agent/pipeline.d.ts.map +1 -0
- package/dist/agent/pipeline.js +260 -0
- package/dist/agent/pipeline_types.d.ts +54 -0
- package/dist/agent/pipeline_types.d.ts.map +1 -0
- package/dist/agent/pipeline_types.js +4 -0
- package/dist/agent/pipeline_utils.d.ts +12 -0
- package/dist/agent/pipeline_utils.d.ts.map +1 -0
- package/dist/agent/pipeline_utils.js +156 -0
- package/dist/agent/plan.d.ts +170 -0
- package/dist/agent/plan.d.ts.map +1 -0
- package/dist/agent/plan.js +86 -0
- package/dist/agent/playwright_report.d.ts +8 -0
- package/dist/agent/playwright_report.d.ts.map +1 -0
- package/dist/agent/playwright_report.js +126 -0
- package/dist/agent/process_runner.d.ts +10 -0
- package/dist/agent/process_runner.d.ts.map +1 -0
- package/dist/agent/process_runner.js +92 -0
- package/dist/agent/spec_generator.d.ts +5 -0
- package/dist/agent/spec_generator.d.ts.map +1 -0
- package/dist/agent/spec_generator.js +253 -0
- package/dist/agent/test_path.d.ts +2 -0
- package/dist/agent/test_path.d.ts.map +1 -0
- package/dist/agent/test_path.js +23 -0
- package/dist/agent/traceability_capture.d.ts +18 -0
- package/dist/agent/traceability_capture.d.ts.map +1 -0
- package/dist/agent/traceability_capture.js +313 -0
- package/dist/agent/traceability_ingest.d.ts +21 -0
- package/dist/agent/traceability_ingest.d.ts.map +1 -0
- package/dist/agent/traceability_ingest.js +237 -0
- package/dist/agent/types.d.ts +42 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +4 -0
- package/dist/agent/utils.d.ts +13 -0
- package/dist/agent/utils.d.ts.map +1 -0
- package/dist/agent/utils.js +152 -0
- package/dist/agent/validation_runner.d.ts +5 -0
- package/dist/agent/validation_runner.d.ts.map +1 -0
- package/dist/agent/validation_runner.js +77 -0
- package/dist/agentic/fix_loop.d.ts +26 -0
- package/dist/agentic/fix_loop.d.ts.map +1 -0
- package/dist/agentic/fix_loop.js +96 -0
- package/dist/agentic/playwright_runner.d.ts +43 -0
- package/dist/agentic/playwright_runner.d.ts.map +1 -0
- package/dist/agentic/playwright_runner.js +165 -0
- package/dist/agentic/runner.d.ts +27 -0
- package/dist/agentic/runner.d.ts.map +1 -0
- package/dist/agentic/runner.js +210 -0
- package/dist/agentic/types.d.ts +62 -0
- package/dist/agentic/types.d.ts.map +1 -0
- package/dist/agentic/types.js +4 -0
- package/dist/agents/coverage-evaluator.d.ts +8 -0
- package/dist/agents/coverage-evaluator.d.ts.map +1 -0
- package/dist/agents/coverage-evaluator.js +41 -0
- package/dist/agents/cross-impact.d.ts +13 -0
- package/dist/agents/cross-impact.d.ts.map +1 -0
- package/dist/agents/cross-impact.js +140 -0
- package/dist/agents/executor.d.ts +8 -0
- package/dist/agents/executor.d.ts.map +1 -0
- package/dist/agents/executor.js +75 -0
- package/dist/agents/explorer.d.ts +12 -0
- package/dist/agents/explorer.d.ts.map +1 -0
- package/dist/agents/explorer.js +43 -0
- package/dist/agents/generator.d.ts +8 -0
- package/dist/agents/generator.d.ts.map +1 -0
- package/dist/agents/generator.js +77 -0
- package/dist/agents/healer.d.ts +8 -0
- package/dist/agents/healer.d.ts.map +1 -0
- package/dist/agents/healer.js +31 -0
- package/dist/agents/impact-analyst.d.ts +8 -0
- package/dist/agents/impact-analyst.d.ts.map +1 -0
- package/dist/agents/impact-analyst.js +38 -0
- package/dist/agents/regression-advisor.d.ts +8 -0
- package/dist/agents/regression-advisor.d.ts.map +1 -0
- package/dist/agents/regression-advisor.js +116 -0
- package/dist/agents/strategist.d.ts +9 -0
- package/dist/agents/strategist.d.ts.map +1 -0
- package/dist/agents/strategist.js +92 -0
- package/dist/agents/test-designer.d.ts +8 -0
- package/dist/agents/test-designer.d.ts.map +1 -0
- package/dist/agents/test-designer.js +111 -0
- package/dist/anthropic_provider.d.ts +65 -0
- package/dist/anthropic_provider.d.ts.map +1 -0
- package/dist/anthropic_provider.js +334 -0
- package/dist/api.d.ts +48 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +151 -0
- package/dist/base_provider.d.ts +109 -0
- package/dist/base_provider.d.ts.map +1 -0
- package/dist/base_provider.js +203 -0
- package/dist/budget_ledger.d.ts +28 -0
- package/dist/budget_ledger.d.ts.map +1 -0
- package/dist/budget_ledger.js +62 -0
- package/dist/cache/cached_provider.d.ts +49 -0
- package/dist/cache/cached_provider.d.ts.map +1 -0
- package/dist/cache/cached_provider.js +91 -0
- package/dist/cache/response_cache.d.ts +79 -0
- package/dist/cache/response_cache.d.ts.map +1 -0
- package/dist/cache/response_cache.js +177 -0
- package/dist/cli/commands/analyze.d.ts +3 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli/commands/analyze.js +77 -0
- package/dist/cli/commands/bootstrap.d.ts +3 -0
- package/dist/cli/commands/bootstrap.d.ts.map +1 -0
- package/dist/cli/commands/bootstrap.js +109 -0
- package/dist/cli/commands/cost_report.d.ts +3 -0
- package/dist/cli/commands/cost_report.d.ts.map +1 -0
- package/dist/cli/commands/cost_report.js +115 -0
- package/dist/cli/commands/crew.d.ts +3 -0
- package/dist/cli/commands/crew.d.ts.map +1 -0
- package/dist/cli/commands/crew.js +255 -0
- package/dist/cli/commands/feedback.d.ts +3 -0
- package/dist/cli/commands/feedback.d.ts.map +1 -0
- package/dist/cli/commands/feedback.js +39 -0
- package/dist/cli/commands/finalize.d.ts +3 -0
- package/dist/cli/commands/finalize.d.ts.map +1 -0
- package/dist/cli/commands/finalize.js +41 -0
- package/dist/cli/commands/gate.d.ts +3 -0
- package/dist/cli/commands/gate.d.ts.map +1 -0
- package/dist/cli/commands/gate.js +89 -0
- package/dist/cli/commands/generate.d.ts +4 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +108 -0
- package/dist/cli/commands/heal.d.ts +3 -0
- package/dist/cli/commands/heal.d.ts.map +1 -0
- package/dist/cli/commands/heal.js +60 -0
- package/dist/cli/commands/impact.d.ts +4 -0
- package/dist/cli/commands/impact.d.ts.map +1 -0
- package/dist/cli/commands/impact.js +33 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +169 -0
- package/dist/cli/commands/llm_health.d.ts +2 -0
- package/dist/cli/commands/llm_health.d.ts.map +1 -0
- package/dist/cli/commands/llm_health.js +22 -0
- package/dist/cli/commands/plan.d.ts +4 -0
- package/dist/cli/commands/plan.d.ts.map +1 -0
- package/dist/cli/commands/plan.js +120 -0
- package/dist/cli/commands/plan_crew.d.ts +17 -0
- package/dist/cli/commands/plan_crew.d.ts.map +1 -0
- package/dist/cli/commands/plan_crew.js +316 -0
- package/dist/cli/commands/traceability.d.ts +4 -0
- package/dist/cli/commands/traceability.d.ts.map +1 -0
- package/dist/cli/commands/traceability.js +77 -0
- package/dist/cli/commands/train.d.ts +3 -0
- package/dist/cli/commands/train.d.ts.map +1 -0
- package/dist/cli/commands/train.js +391 -0
- package/dist/cli/defaults.d.ts +35 -0
- package/dist/cli/defaults.d.ts.map +1 -0
- package/dist/cli/defaults.js +172 -0
- package/dist/cli/errors.d.ts +27 -0
- package/dist/cli/errors.d.ts.map +1 -0
- package/dist/cli/errors.js +57 -0
- package/dist/cli/parse_args.d.ts +6 -0
- package/dist/cli/parse_args.d.ts.map +1 -0
- package/dist/cli/parse_args.js +257 -0
- package/dist/cli/types.d.ts +87 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +4 -0
- package/dist/cli/usage.d.ts +2 -0
- package/dist/cli/usage.d.ts.map +1 -0
- package/dist/cli/usage.js +109 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +194 -0
- package/dist/crew/context.d.ts +55 -0
- package/dist/crew/context.d.ts.map +1 -0
- package/dist/crew/context.js +36 -0
- package/dist/crew/orchestrator.d.ts +50 -0
- package/dist/crew/orchestrator.d.ts.map +1 -0
- package/dist/crew/orchestrator.js +329 -0
- package/dist/crew/protocol.d.ts +46 -0
- package/dist/crew/protocol.d.ts.map +1 -0
- package/dist/crew/protocol.js +4 -0
- package/dist/crew/provider.d.ts +17 -0
- package/dist/crew/provider.d.ts.map +1 -0
- package/dist/crew/provider.js +36 -0
- package/dist/crew/sanitize.d.ts +3 -0
- package/dist/crew/sanitize.d.ts.map +1 -0
- package/dist/crew/sanitize.js +31 -0
- package/dist/crew/types.d.ts +52 -0
- package/dist/crew/types.d.ts.map +1 -0
- package/dist/crew/types.js +4 -0
- package/dist/crew/workflows.d.ts +52 -0
- package/dist/crew/workflows.d.ts.map +1 -0
- package/dist/crew/workflows.js +36 -0
- package/dist/custom_provider.d.ts +20 -0
- package/dist/custom_provider.d.ts.map +1 -0
- package/dist/custom_provider.js +277 -0
- package/dist/engine/ai_enrichment.d.ts +44 -0
- package/dist/engine/ai_enrichment.d.ts.map +1 -0
- package/dist/engine/ai_enrichment.js +267 -0
- package/dist/engine/diff_loader.d.ts +11 -0
- package/dist/engine/diff_loader.d.ts.map +1 -0
- package/dist/engine/diff_loader.js +63 -0
- package/dist/engine/impact_engine.d.ts +72 -0
- package/dist/engine/impact_engine.d.ts.map +1 -0
- package/dist/engine/impact_engine.js +298 -0
- package/dist/engine/plan_builder.d.ts +11 -0
- package/dist/engine/plan_builder.d.ts.map +1 -0
- package/dist/engine/plan_builder.js +599 -0
- package/dist/esm/adapters/cypress.js +49 -0
- package/dist/esm/adapters/framework_adapter.js +114 -0
- package/dist/esm/adapters/playwright.js +49 -0
- package/dist/esm/adapters/pytest.js +59 -0
- package/dist/esm/adapters/supertest.js +48 -0
- package/dist/esm/agent/api_catalog.js +199 -0
- package/dist/esm/agent/config.js +872 -0
- package/dist/esm/agent/feedback.js +317 -0
- package/dist/esm/agent/git.js +252 -0
- package/dist/esm/agent/handoff.js +177 -0
- package/dist/esm/agent/llm_agents_flow.js +421 -0
- package/dist/esm/agent/native_flow.js +175 -0
- package/dist/esm/agent/pipeline.js +256 -0
- package/dist/esm/agent/pipeline_types.js +3 -0
- package/dist/esm/agent/pipeline_utils.js +146 -0
- package/dist/esm/agent/plan.js +83 -0
- package/dist/esm/agent/playwright_report.js +123 -0
- package/dist/esm/agent/process_runner.js +83 -0
- package/dist/esm/agent/spec_generator.js +249 -0
- package/dist/esm/agent/test_path.js +20 -0
- package/dist/esm/agent/traceability_capture.js +310 -0
- package/dist/esm/agent/traceability_ingest.js +234 -0
- package/dist/esm/agent/types.js +3 -0
- package/dist/esm/agent/utils.js +138 -0
- package/dist/esm/agent/validation_runner.js +73 -0
- package/dist/esm/agentic/fix_loop.js +91 -0
- package/dist/esm/agentic/playwright_runner.js +161 -0
- package/dist/esm/agentic/runner.js +207 -0
- package/dist/esm/agentic/types.js +3 -0
- package/dist/esm/agents/coverage-evaluator.js +37 -0
- package/dist/esm/agents/cross-impact.js +136 -0
- package/dist/esm/agents/executor.js +71 -0
- package/dist/esm/agents/explorer.js +39 -0
- package/dist/esm/agents/generator.js +73 -0
- package/dist/esm/agents/healer.js +27 -0
- package/dist/esm/agents/impact-analyst.js +34 -0
- package/dist/esm/agents/regression-advisor.js +112 -0
- package/dist/esm/agents/strategist.js +88 -0
- package/dist/esm/agents/test-designer.js +107 -0
- package/dist/esm/anthropic_provider.js +326 -0
- package/dist/esm/api.js +143 -0
- package/dist/esm/base_provider.js +198 -0
- package/dist/esm/budget_ledger.js +58 -0
- package/dist/esm/cache/cached_provider.js +85 -0
- package/dist/esm/cache/response_cache.js +140 -0
- package/dist/esm/cli/commands/analyze.js +74 -0
- package/dist/esm/cli/commands/bootstrap.js +106 -0
- package/dist/esm/cli/commands/cost_report.js +112 -0
- package/dist/esm/cli/commands/crew.js +252 -0
- package/dist/esm/cli/commands/feedback.js +36 -0
- package/dist/esm/cli/commands/finalize.js +38 -0
- package/dist/esm/cli/commands/gate.js +86 -0
- package/dist/esm/cli/commands/generate.js +105 -0
- package/dist/esm/cli/commands/heal.js +57 -0
- package/dist/esm/cli/commands/impact.js +30 -0
- package/dist/esm/cli/commands/init.js +133 -0
- package/dist/esm/cli/commands/llm_health.js +19 -0
- package/dist/esm/cli/commands/plan.js +117 -0
- package/dist/esm/cli/commands/plan_crew.js +309 -0
- package/dist/esm/cli/commands/traceability.js +73 -0
- package/dist/esm/cli/commands/train.js +355 -0
- package/dist/esm/cli/defaults.js +165 -0
- package/dist/esm/cli/errors.js +52 -0
- package/dist/esm/cli/parse_args.js +251 -0
- package/dist/esm/cli/types.js +3 -0
- package/dist/esm/cli/usage.js +106 -0
- package/dist/esm/cli.js +192 -0
- package/dist/esm/crew/context.js +32 -0
- package/dist/esm/crew/orchestrator.js +325 -0
- package/dist/esm/crew/protocol.js +3 -0
- package/dist/esm/crew/provider.js +33 -0
- package/dist/esm/crew/sanitize.js +27 -0
- package/dist/esm/crew/types.js +3 -0
- package/dist/esm/crew/workflows.js +33 -0
- package/dist/esm/custom_provider.js +273 -0
- package/dist/esm/engine/ai_enrichment.js +264 -0
- package/dist/esm/engine/diff_loader.js +59 -0
- package/dist/esm/engine/impact_engine.js +291 -0
- package/dist/esm/engine/plan_builder.js +593 -0
- package/dist/esm/index.js +72 -0
- package/dist/esm/knowledge/api_surface.js +408 -0
- package/dist/esm/knowledge/cluster_utils.js +60 -0
- package/dist/esm/knowledge/context_loader.js +85 -0
- package/dist/esm/knowledge/failure_history.js +121 -0
- package/dist/esm/knowledge/kg_bridge.js +381 -0
- package/dist/esm/knowledge/kg_types.js +3 -0
- package/dist/esm/knowledge/route_families.js +393 -0
- package/dist/esm/knowledge/spec_index.js +122 -0
- package/dist/esm/logger.js +115 -0
- package/dist/esm/mcp-server.js +621 -0
- package/dist/esm/metrics/prometheus.js +149 -0
- package/dist/esm/model_router.js +59 -0
- package/dist/esm/ollama_provider.js +301 -0
- package/dist/esm/openai_provider.js +243 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pipeline/orchestrator.js +228 -0
- package/dist/esm/pipeline/spec_verifier.js +75 -0
- package/dist/esm/pipeline/stage0_preprocess.js +102 -0
- package/dist/esm/pipeline/stage1_impact.js +140 -0
- package/dist/esm/pipeline/stage2_coverage.js +153 -0
- package/dist/esm/pipeline/stage3_generation.js +284 -0
- package/dist/esm/pipeline/stage4_heal.js +288 -0
- package/dist/esm/progress.js +112 -0
- package/dist/esm/prompts/coverage.js +57 -0
- package/dist/esm/prompts/cross-impact.js +53 -0
- package/dist/esm/prompts/generation.js +297 -0
- package/dist/esm/prompts/generation_profile.js +147 -0
- package/dist/esm/prompts/heal.js +91 -0
- package/dist/esm/prompts/impact.js +63 -0
- package/dist/esm/prompts/json_extract.js +36 -0
- package/dist/esm/prompts/strategist.js +61 -0
- package/dist/esm/prompts/test-designer.js +92 -0
- package/dist/esm/provider_factory.js +366 -0
- package/dist/esm/provider_interface.js +23 -0
- package/dist/esm/provider_utils.js +96 -0
- package/dist/esm/qa-agent/cli.js +205 -0
- package/dist/esm/qa-agent/orchestrator.js +120 -0
- package/dist/esm/qa-agent/phase1/runner.js +139 -0
- package/dist/esm/qa-agent/phase1/scope.js +126 -0
- package/dist/esm/qa-agent/phase2/agent_browser.js +95 -0
- package/dist/esm/qa-agent/phase2/agent_loop.js +351 -0
- package/dist/esm/qa-agent/phase2/exploration_state.js +97 -0
- package/dist/esm/qa-agent/phase2/tools.js +386 -0
- package/dist/esm/qa-agent/phase2/vision.js +75 -0
- package/dist/esm/qa-agent/phase3/feedback.js +34 -0
- package/dist/esm/qa-agent/phase3/reporter.js +145 -0
- package/dist/esm/qa-agent/phase3/spec_generator.js +62 -0
- package/dist/esm/qa-agent/phase3/verdict.js +66 -0
- package/dist/esm/qa-agent/safe_env.js +23 -0
- package/dist/esm/qa-agent/types.js +3 -0
- package/dist/esm/reporters/junit.js +86 -0
- package/dist/esm/reporters/reporter.js +3 -0
- package/dist/esm/reporters/sarif.js +132 -0
- package/dist/esm/resilience/circuit_breaker.js +78 -0
- package/dist/esm/resilience/retry.js +56 -0
- package/dist/esm/sanitize.js +66 -0
- package/dist/esm/training/enricher.js +345 -0
- package/dist/esm/training/kg_scanner.js +115 -0
- package/dist/esm/training/merger.js +204 -0
- package/dist/esm/training/scanner.js +923 -0
- package/dist/esm/training/types.js +6 -0
- package/dist/esm/training/validator.js +254 -0
- package/dist/esm/validation/guardrails.js +101 -0
- package/dist/esm/validation/output_schema.js +80 -0
- package/dist/esm/version.js +33 -0
- package/dist/index.d.ts +99 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +169 -0
- package/dist/knowledge/api_surface.d.ts +37 -0
- package/dist/knowledge/api_surface.d.ts.map +1 -0
- package/dist/knowledge/api_surface.js +418 -0
- package/dist/knowledge/cluster_utils.d.ts +28 -0
- package/dist/knowledge/cluster_utils.d.ts.map +1 -0
- package/dist/knowledge/cluster_utils.js +67 -0
- package/dist/knowledge/context_loader.d.ts +13 -0
- package/dist/knowledge/context_loader.d.ts.map +1 -0
- package/dist/knowledge/context_loader.js +90 -0
- package/dist/knowledge/failure_history.d.ts +39 -0
- package/dist/knowledge/failure_history.d.ts.map +1 -0
- package/dist/knowledge/failure_history.js +128 -0
- package/dist/knowledge/kg_bridge.d.ts +31 -0
- package/dist/knowledge/kg_bridge.d.ts.map +1 -0
- package/dist/knowledge/kg_bridge.js +388 -0
- package/dist/knowledge/kg_types.d.ts +75 -0
- package/dist/knowledge/kg_types.d.ts.map +1 -0
- package/dist/knowledge/kg_types.js +4 -0
- package/dist/knowledge/route_families.d.ts +98 -0
- package/dist/knowledge/route_families.d.ts.map +1 -0
- package/dist/knowledge/route_families.js +410 -0
- package/dist/knowledge/spec_index.d.ts +18 -0
- package/dist/knowledge/spec_index.d.ts.map +1 -0
- package/dist/knowledge/spec_index.js +128 -0
- package/dist/logger.d.ts +31 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +119 -0
- package/dist/mcp-server.d.ts +68 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +629 -0
- package/dist/metrics/prometheus.d.ts +37 -0
- package/dist/metrics/prometheus.d.ts.map +1 -0
- package/dist/metrics/prometheus.js +153 -0
- package/dist/model_router.d.ts +28 -0
- package/dist/model_router.d.ts.map +1 -0
- package/dist/model_router.js +63 -0
- package/dist/ollama_provider.d.ts +65 -0
- package/dist/ollama_provider.d.ts.map +1 -0
- package/dist/ollama_provider.js +309 -0
- package/dist/openai_provider.d.ts +23 -0
- package/dist/openai_provider.d.ts.map +1 -0
- package/dist/openai_provider.js +251 -0
- package/dist/pipeline/orchestrator.d.ts +33 -0
- package/dist/pipeline/orchestrator.d.ts.map +1 -0
- package/dist/pipeline/orchestrator.js +231 -0
- package/dist/pipeline/spec_verifier.d.ts +20 -0
- package/dist/pipeline/spec_verifier.d.ts.map +1 -0
- package/dist/pipeline/spec_verifier.js +79 -0
- package/dist/pipeline/stage0_preprocess.d.ts +31 -0
- package/dist/pipeline/stage0_preprocess.d.ts.map +1 -0
- package/dist/pipeline/stage0_preprocess.js +105 -0
- package/dist/pipeline/stage1_impact.d.ts +19 -0
- package/dist/pipeline/stage1_impact.d.ts.map +1 -0
- package/dist/pipeline/stage1_impact.js +143 -0
- package/dist/pipeline/stage2_coverage.d.ts +19 -0
- package/dist/pipeline/stage2_coverage.d.ts.map +1 -0
- package/dist/pipeline/stage2_coverage.js +156 -0
- package/dist/pipeline/stage3_generation.d.ts +43 -0
- package/dist/pipeline/stage3_generation.d.ts.map +1 -0
- package/dist/pipeline/stage3_generation.js +287 -0
- package/dist/pipeline/stage4_heal.d.ts +62 -0
- package/dist/pipeline/stage4_heal.d.ts.map +1 -0
- package/dist/pipeline/stage4_heal.js +294 -0
- package/dist/progress.d.ts +22 -0
- package/dist/progress.d.ts.map +1 -0
- package/dist/progress.js +116 -0
- package/dist/prompts/coverage.d.ts +39 -0
- package/dist/prompts/coverage.d.ts.map +1 -0
- package/dist/prompts/coverage.js +61 -0
- package/dist/prompts/cross-impact.d.ts +23 -0
- package/dist/prompts/cross-impact.d.ts.map +1 -0
- package/dist/prompts/cross-impact.js +57 -0
- package/dist/prompts/generation.d.ts +25 -0
- package/dist/prompts/generation.d.ts.map +1 -0
- package/dist/prompts/generation.js +302 -0
- package/dist/prompts/generation_profile.d.ts +29 -0
- package/dist/prompts/generation_profile.d.ts.map +1 -0
- package/dist/prompts/generation_profile.js +151 -0
- package/dist/prompts/heal.d.ts +23 -0
- package/dist/prompts/heal.d.ts.map +1 -0
- package/dist/prompts/heal.js +95 -0
- package/dist/prompts/impact.d.ts +31 -0
- package/dist/prompts/impact.d.ts.map +1 -0
- package/dist/prompts/impact.js +67 -0
- package/dist/prompts/json_extract.d.ts +14 -0
- package/dist/prompts/json_extract.d.ts.map +1 -0
- package/dist/prompts/json_extract.js +39 -0
- package/dist/prompts/strategist.d.ts +25 -0
- package/dist/prompts/strategist.d.ts.map +1 -0
- package/dist/prompts/strategist.js +65 -0
- package/dist/prompts/test-designer.d.ts +35 -0
- package/dist/prompts/test-designer.d.ts.map +1 -0
- package/dist/prompts/test-designer.js +96 -0
- package/dist/provider_factory.d.ts +104 -0
- package/dist/provider_factory.d.ts.map +1 -0
- package/dist/provider_factory.js +371 -0
- package/dist/provider_interface.d.ts +365 -0
- package/dist/provider_interface.d.ts.map +1 -0
- package/dist/provider_interface.js +28 -0
- package/dist/provider_utils.d.ts +39 -0
- package/dist/provider_utils.d.ts.map +1 -0
- package/dist/provider_utils.js +103 -0
- package/dist/qa-agent/cli.d.ts +3 -0
- package/dist/qa-agent/cli.d.ts.map +1 -0
- package/dist/qa-agent/cli.js +207 -0
- package/dist/qa-agent/orchestrator.d.ts +3 -0
- package/dist/qa-agent/orchestrator.d.ts.map +1 -0
- package/dist/qa-agent/orchestrator.js +123 -0
- package/dist/qa-agent/phase1/runner.d.ts +3 -0
- package/dist/qa-agent/phase1/runner.d.ts.map +1 -0
- package/dist/qa-agent/phase1/runner.js +142 -0
- package/dist/qa-agent/phase1/scope.d.ts +6 -0
- package/dist/qa-agent/phase1/scope.d.ts.map +1 -0
- package/dist/qa-agent/phase1/scope.js +129 -0
- package/dist/qa-agent/phase2/agent_browser.d.ts +35 -0
- package/dist/qa-agent/phase2/agent_browser.d.ts.map +1 -0
- package/dist/qa-agent/phase2/agent_browser.js +99 -0
- package/dist/qa-agent/phase2/agent_loop.d.ts +3 -0
- package/dist/qa-agent/phase2/agent_loop.d.ts.map +1 -0
- package/dist/qa-agent/phase2/agent_loop.js +357 -0
- package/dist/qa-agent/phase2/exploration_state.d.ts +12 -0
- package/dist/qa-agent/phase2/exploration_state.d.ts.map +1 -0
- package/dist/qa-agent/phase2/exploration_state.js +109 -0
- package/dist/qa-agent/phase2/tools.d.ts +28 -0
- package/dist/qa-agent/phase2/tools.d.ts.map +1 -0
- package/dist/qa-agent/phase2/tools.js +390 -0
- package/dist/qa-agent/phase2/vision.d.ts +3 -0
- package/dist/qa-agent/phase2/vision.d.ts.map +1 -0
- package/dist/qa-agent/phase2/vision.js +78 -0
- package/dist/qa-agent/phase3/feedback.d.ts +3 -0
- package/dist/qa-agent/phase3/feedback.d.ts.map +1 -0
- package/dist/qa-agent/phase3/feedback.js +37 -0
- package/dist/qa-agent/phase3/reporter.d.ts +3 -0
- package/dist/qa-agent/phase3/reporter.d.ts.map +1 -0
- package/dist/qa-agent/phase3/reporter.js +148 -0
- package/dist/qa-agent/phase3/spec_generator.d.ts +3 -0
- package/dist/qa-agent/phase3/spec_generator.d.ts.map +1 -0
- package/dist/qa-agent/phase3/spec_generator.js +65 -0
- package/dist/qa-agent/phase3/verdict.d.ts +3 -0
- package/dist/qa-agent/phase3/verdict.d.ts.map +1 -0
- package/dist/qa-agent/phase3/verdict.js +69 -0
- package/dist/qa-agent/safe_env.d.ts +3 -0
- package/dist/qa-agent/safe_env.d.ts.map +1 -0
- package/dist/qa-agent/safe_env.js +26 -0
- package/dist/qa-agent/types.d.ts +130 -0
- package/dist/qa-agent/types.d.ts.map +1 -0
- package/dist/qa-agent/types.js +4 -0
- package/dist/reporters/junit.d.ts +6 -0
- package/dist/reporters/junit.d.ts.map +1 -0
- package/dist/reporters/junit.js +89 -0
- package/dist/reporters/reporter.d.ts +42 -0
- package/dist/reporters/reporter.d.ts.map +1 -0
- package/dist/reporters/reporter.js +4 -0
- package/dist/reporters/sarif.d.ts +7 -0
- package/dist/reporters/sarif.d.ts.map +1 -0
- package/dist/reporters/sarif.js +135 -0
- package/dist/resilience/circuit_breaker.d.ts +36 -0
- package/dist/resilience/circuit_breaker.d.ts.map +1 -0
- package/dist/resilience/circuit_breaker.js +82 -0
- package/dist/resilience/retry.d.ts +11 -0
- package/dist/resilience/retry.d.ts.map +1 -0
- package/dist/resilience/retry.js +59 -0
- package/dist/sanitize.d.ts +15 -0
- package/dist/sanitize.d.ts.map +1 -0
- package/dist/sanitize.js +71 -0
- package/dist/training/enricher.d.ts +17 -0
- package/dist/training/enricher.d.ts.map +1 -0
- package/dist/training/enricher.js +350 -0
- package/dist/training/kg_scanner.d.ts +13 -0
- package/dist/training/kg_scanner.d.ts.map +1 -0
- package/dist/training/kg_scanner.js +118 -0
- package/dist/training/merger.d.ts +15 -0
- package/dist/training/merger.d.ts.map +1 -0
- package/dist/training/merger.js +208 -0
- package/dist/training/scanner.d.ts +36 -0
- package/dist/training/scanner.d.ts.map +1 -0
- package/dist/training/scanner.js +932 -0
- package/dist/training/types.d.ts +117 -0
- package/dist/training/types.d.ts.map +1 -0
- package/dist/training/types.js +9 -0
- package/dist/training/validator.d.ts +21 -0
- package/dist/training/validator.d.ts.map +1 -0
- package/dist/training/validator.js +262 -0
- package/dist/validation/guardrails.d.ts +31 -0
- package/dist/validation/guardrails.d.ts.map +1 -0
- package/dist/validation/guardrails.js +112 -0
- package/dist/validation/output_schema.d.ts +67 -0
- package/dist/validation/output_schema.d.ts.map +1 -0
- package/dist/validation/output_schema.js +84 -0
- package/dist/version.d.ts +6 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +36 -0
- package/package.json +126 -0
- package/schemas/flow-decision.schema.json +83 -0
- package/schemas/gap.schema.json +18 -0
- package/schemas/impact.schema.json +455 -0
- package/schemas/plan.schema.json +491 -0
- package/schemas/route-families.schema.json +137 -0
- package/schemas/subsystem-risk-map.schema.json +62 -0
- package/schemas/traceability-input.schema.json +122 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined in Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
|
24
|
+
permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or Object
|
|
36
|
+
form, made available under the License, as indicated by a copyright
|
|
37
|
+
notice that is included in or attached to the work.
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean any work of authorship, including
|
|
48
|
+
the original Work and any Derivative Works thereof, that is intentionally
|
|
49
|
+
submitted to, or received by, Licensor for inclusion in the Work
|
|
50
|
+
by the copyright owner or by an individual or Legal Entity authorized
|
|
51
|
+
to submit on behalf of the copyright owner. For the purposes of this
|
|
52
|
+
definition, "submitted" means any form of electronic, verbal, or
|
|
53
|
+
written communication sent to the Licensor or its representatives,
|
|
54
|
+
including but not limited to communication on electronic mailing lists,
|
|
55
|
+
source code control systems, and issue tracking systems that are
|
|
56
|
+
managed by, or on behalf of, the Licensor for the purpose of
|
|
57
|
+
discussing and improving the Work.
|
|
58
|
+
|
|
59
|
+
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
60
|
+
whom a Contribution has been received by Licensor and subsequently
|
|
61
|
+
incorporated within the Work.
|
|
62
|
+
|
|
63
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
64
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
65
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
66
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
67
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
68
|
+
Work and such Derivative Works in Source or Object form.
|
|
69
|
+
|
|
70
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
71
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
72
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
73
|
+
(except as stated in this section) patent license to make, have made,
|
|
74
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
75
|
+
where such license applies only to those patent claims licensable
|
|
76
|
+
by such Contributor that are necessarily infringed by their
|
|
77
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
78
|
+
with the Work to which such Contribution(s) was submitted.
|
|
79
|
+
|
|
80
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
81
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
82
|
+
modifications, and in Source or Object form, provided that You
|
|
83
|
+
meet the following conditions:
|
|
84
|
+
|
|
85
|
+
(a) You must give any other recipients of the Work or
|
|
86
|
+
Derivative Works a copy of this License; and
|
|
87
|
+
|
|
88
|
+
(b) You must cause any modified files to carry prominent notices
|
|
89
|
+
stating that You changed the files; and
|
|
90
|
+
|
|
91
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
92
|
+
that You distribute, all copyright, patent, trademark, and
|
|
93
|
+
attribution notices from the Source form of the Work,
|
|
94
|
+
excluding those notices that do not pertain to any part of
|
|
95
|
+
the Derivative Works; and
|
|
96
|
+
|
|
97
|
+
(d) If the Work includes a "NOTICE" text file, then any
|
|
98
|
+
Derivative Works that You distribute must include a readable
|
|
99
|
+
copy of the attribution notices contained
|
|
100
|
+
within such NOTICE file, excluding those notices that do not
|
|
101
|
+
pertain to any part of the Derivative Works, in at least one
|
|
102
|
+
of the following places: within a NOTICE text file distributed
|
|
103
|
+
as part of the Derivative Works; within the Source form or
|
|
104
|
+
documentation, if provided along with the Derivative Works; or,
|
|
105
|
+
within a display generated by the Derivative Works, if and
|
|
106
|
+
wherever such third-party notices normally appear. The contents
|
|
107
|
+
of the NOTICE file are for informational purposes only and
|
|
108
|
+
do not modify the License. You may add Your own attribution
|
|
109
|
+
notices within Derivative Works that You distribute, alongside
|
|
110
|
+
or as an addendum to the NOTICE from the Work, provided that
|
|
111
|
+
such additional attribution notices cannot be construed
|
|
112
|
+
as modifying the License.
|
|
113
|
+
|
|
114
|
+
You may add Your own copyright statement to Your modifications and
|
|
115
|
+
may provide additional or different license terms and conditions
|
|
116
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
117
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
118
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
119
|
+
the conditions of this License.
|
|
120
|
+
|
|
121
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
122
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
123
|
+
by You to Licensor shall be under the terms and conditions of
|
|
124
|
+
this License, without any additional terms or conditions.
|
|
125
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
126
|
+
the terms of any separate license agreement you may have executed
|
|
127
|
+
with Licensor regarding such Contribution.
|
|
128
|
+
|
|
129
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
130
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
131
|
+
except as required for reasonable and customary use in describing the
|
|
132
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
133
|
+
|
|
134
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
135
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
136
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
137
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
138
|
+
or implied, including, without limitation, any warranties or
|
|
139
|
+
conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or
|
|
140
|
+
FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for
|
|
141
|
+
determining the appropriateness of using or redistributing the Work
|
|
142
|
+
and assume any risks associated with Your exercise of permissions
|
|
143
|
+
under this License.
|
|
144
|
+
|
|
145
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
146
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
147
|
+
unless required by applicable law (such as deliberate and grossly
|
|
148
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
149
|
+
liable to You for damages, including any direct, indirect, special,
|
|
150
|
+
incidental, or consequential damages of any character arising as a
|
|
151
|
+
result of this License or out of the use or inability to use the
|
|
152
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
153
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
154
|
+
other commercial damages or losses), even if such Contributor
|
|
155
|
+
has been advised of the possibility of such damages.
|
|
156
|
+
|
|
157
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
158
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
159
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
160
|
+
or other liability obligations and/or rights consistent with this
|
|
161
|
+
License. However, in accepting such obligations, You may act only
|
|
162
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
163
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
164
|
+
defend, and hold each Contributor harmless for any liability
|
|
165
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
166
|
+
of your accepting any such warranty or additional liability.
|
|
167
|
+
|
|
168
|
+
END OF TERMS AND CONDITIONS
|
package/README.md
ADDED
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
# @yasserkhanorg/impact-gate
|
|
2
|
+
|
|
3
|
+
Diff-aware E2E impact analysis and coverage gating for Playwright/Cypress teams. Optional AI features can suggest, generate, and heal tests once your project has a route-families.json manifest.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@yasserkhanorg/impact-gate)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://github.com/yasserfaraazkhan/impact-gate)
|
|
8
|
+
|
|
9
|
+
## What It Does
|
|
10
|
+
|
|
11
|
+
`impact-gate` is built first for one painful CI job: given a git diff, tell us which E2E surface changed and whether the current suite already covers it.
|
|
12
|
+
|
|
13
|
+
- **Primary**: diff-aware E2E impact analysis and coverage gating
|
|
14
|
+
- **Secondary**: optional AI features can suggest, generate, and heal tests once your project has a route-families.json manifest
|
|
15
|
+
- **Tertiary**: crew workflows, MCP integrations, plugins, and the autonomous QA agent
|
|
16
|
+
|
|
17
|
+
The clearest path today is a Playwright or Cypress repository with a maintained `route-families.json` manifest. That is the path this package is optimized to make unusually clear and useful.
|
|
18
|
+
|
|
19
|
+
Transition note:
|
|
20
|
+
- The package and primary CLI are being renamed to `impact-gate`.
|
|
21
|
+
- Legacy CLI aliases (`e2e-ai-agents`, `e2e-qa-agent`, `e2e-agents-mcp`) still work during migration.
|
|
22
|
+
- Legacy config filenames are still supported.
|
|
23
|
+
- The `.e2e-ai-agents/` artifact directory remains unchanged for compatibility.
|
|
24
|
+
|
|
25
|
+
## Product Shape
|
|
26
|
+
|
|
27
|
+
| Level | Commands | What They Are For |
|
|
28
|
+
|------|----------|-------------------|
|
|
29
|
+
| Core CI Workflow | `impact`, `plan`, `gate` | Decide what changed, what is covered, and whether a PR should pass |
|
|
30
|
+
| Optional AI Workflow | `generate`, `heal`, `analyze`, `finalize-generated-tests` | Suggest, create, or repair tests after impact analysis |
|
|
31
|
+
| Setup and Calibration | `train`, `bootstrap`, `traceability-*`, `feedback`, `cost-report`, `llm-health` | Build the manifest, feed execution data back in, and inspect cost/provider health |
|
|
32
|
+
| Advanced / Experimental | `crew`, MCP mode, plugins, `impact-gate-qa` | Deeper orchestration and browser-driven workflows beyond the core CI loop |
|
|
33
|
+
|
|
34
|
+
## Known Limitations
|
|
35
|
+
|
|
36
|
+
- The clearest, most stable workflow is still **Playwright/Cypress impact analysis and gating**.
|
|
37
|
+
- AI generation and healing work best **after** the project has a good `route-families.json` manifest.
|
|
38
|
+
- Advanced features are improving, but they are **not** the best entry point if you only want dependable CI coverage decisions.
|
|
39
|
+
- The Mattermost profile is still the most opinionated path in the codebase. Generic flows are supported, but the package should be judged first on the core CI workflow above.
|
|
40
|
+
|
|
41
|
+
## Free Tier
|
|
42
|
+
|
|
43
|
+
These commands work with **zero LLM cost** and do not require an API key:
|
|
44
|
+
|
|
45
|
+
| Command | What It Does |
|
|
46
|
+
|---------|-------------|
|
|
47
|
+
| `impact` | Deterministic impact analysis from a git diff |
|
|
48
|
+
| `plan` | Coverage-gap detection and recommended run set |
|
|
49
|
+
| `gate` | CI coverage gate that exits non-zero below a threshold |
|
|
50
|
+
| `train --no-enrich` | Build `route-families.json` with the scanner only |
|
|
51
|
+
| `bootstrap` | Generate `route-families.json` from a knowledge graph |
|
|
52
|
+
| `traceability-capture` | Extract test-file relationships from Playwright JSON |
|
|
53
|
+
| `traceability-ingest` | Merge traceability mappings into rolling manifest |
|
|
54
|
+
| `feedback` | Ingest recommendation outcomes for calibration |
|
|
55
|
+
| `cost-report` | View LLM cost breakdown from past runs |
|
|
56
|
+
|
|
57
|
+
Optional AI features use [Anthropic](https://console.anthropic.com/), [OpenAI](https://platform.openai.com/), or a local [Ollama](https://ollama.ai/) instance.
|
|
58
|
+
|
|
59
|
+
## Start Here
|
|
60
|
+
|
|
61
|
+
The fastest way to evaluate the package is the deterministic CI path. These commands do not require an API key.
|
|
62
|
+
|
|
63
|
+
Install the package:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npm install @yasserkhanorg/impact-gate
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Requires Node.js >= 20. Ships both CommonJS and ESM builds.
|
|
70
|
+
|
|
71
|
+
Verify the CLI:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npx impact-gate --help
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Then run the core CI workflow:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# 1. See what changed
|
|
81
|
+
npx impact-gate impact --path /path/to/project --since origin/main
|
|
82
|
+
|
|
83
|
+
# 2. Build a coverage plan and CI summary artifacts
|
|
84
|
+
npx impact-gate plan --path /path/to/project --since origin/main
|
|
85
|
+
|
|
86
|
+
# 3. Fail the job if coverage is below a threshold
|
|
87
|
+
npx impact-gate gate --path /path/to/project --threshold 80
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Notes:
|
|
91
|
+
|
|
92
|
+
- `impact` prints a deterministic summary to stdout.
|
|
93
|
+
- `plan` writes `.e2e-ai-agents/plan.json` and `.e2e-ai-agents/ci-summary.md`.
|
|
94
|
+
- `gate` expects a threshold in the range `0-100` and exits `1` when the threshold is missed.
|
|
95
|
+
- Add the Optional AI Workflow only after your `route-families.json` manifest is useful enough to trust.
|
|
96
|
+
|
|
97
|
+
## Setup and Calibration
|
|
98
|
+
|
|
99
|
+
These commands help the core CI workflow become accurate and project-aware.
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Build the manifest from the repo structure
|
|
103
|
+
npx impact-gate train --path /path/to/project --no-enrich
|
|
104
|
+
|
|
105
|
+
# Or bootstrap it from an Understand-Anything knowledge graph
|
|
106
|
+
npx impact-gate bootstrap --path /path/to/project [--kg-path ./knowledge-graph.json]
|
|
107
|
+
|
|
108
|
+
# Feed execution data back into the manifest
|
|
109
|
+
npx impact-gate traceability-capture --path /path/to/project --traceability-report ./playwright-report.json
|
|
110
|
+
npx impact-gate traceability-ingest --path /path/to/project --traceability-input ./traceability-input.json
|
|
111
|
+
|
|
112
|
+
# Calibration and diagnostics
|
|
113
|
+
npx impact-gate feedback --path /path/to/project --feedback-input ./feedback.json
|
|
114
|
+
npx impact-gate cost-report --path /path/to/project
|
|
115
|
+
npx impact-gate llm-health
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Optional AI Workflow
|
|
119
|
+
|
|
120
|
+
Once impact analysis is useful and the manifest is in place, you can layer on AI assistance.
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# All-in-one wrapper: impact + coverage + optional generation/healing
|
|
124
|
+
npx impact-gate analyze --path /path/to/project [--generate] [--heal]
|
|
125
|
+
|
|
126
|
+
# Generate tests for uncovered gaps
|
|
127
|
+
npx impact-gate generate --path /path/to/project
|
|
128
|
+
|
|
129
|
+
# Heal flaky or failing specs from a Playwright report
|
|
130
|
+
npx impact-gate heal --path /path/to/project --traceability-report ./playwright-report.json
|
|
131
|
+
|
|
132
|
+
# Stage generated tests, commit, and optionally open a PR
|
|
133
|
+
npx impact-gate finalize-generated-tests --path /path/to/project --create-pr
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`plan` and `suggest` are aliases. `analyze` is the convenience wrapper when you want the full path in one invocation.
|
|
137
|
+
|
|
138
|
+
## Advanced / Experimental
|
|
139
|
+
|
|
140
|
+
These features are real, but they are not the clearest place to start if your goal is simple CI coverage decisions.
|
|
141
|
+
|
|
142
|
+
### Multi-Agent Crew
|
|
143
|
+
|
|
144
|
+
The Crew orchestrates deeper multi-agent workflows on top of the same impact-analysis foundation. Use it when you want richer strategy output, structured test design, or end-to-end generation pipelines.
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Quick strategy recommendations
|
|
148
|
+
npx impact-gate crew --workflow quick-check --path /path/to/project --tests-root ./e2e-tests --since origin/master
|
|
149
|
+
|
|
150
|
+
# Full design-only workflow
|
|
151
|
+
npx impact-gate crew --workflow design-only --path /path/to/project --tests-root ./e2e-tests --since origin/master
|
|
152
|
+
|
|
153
|
+
# End-to-end workflow
|
|
154
|
+
npx impact-gate crew --workflow full-qa --path /path/to/project --tests-root ./e2e-tests --since origin/master
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Built-in safeguards include budget enforcement, provider circuit breaking, and structured output for downstream tooling.
|
|
158
|
+
|
|
159
|
+
### Plugins
|
|
160
|
+
|
|
161
|
+
External agents can register into crew workflows via the `plugins` config:
|
|
162
|
+
|
|
163
|
+
```typescript
|
|
164
|
+
import type {AgentPlugin, AgentTask, AgentResult, CrewContext} from '@yasserkhanorg/impact-gate';
|
|
165
|
+
|
|
166
|
+
const myPlugin: AgentPlugin = {
|
|
167
|
+
role: 'my-custom-analyzer',
|
|
168
|
+
phase: 'understand',
|
|
169
|
+
runAfter: ['impact-analyst'],
|
|
170
|
+
async execute(task: AgentTask, ctx: CrewContext): Promise<AgentResult> {
|
|
171
|
+
return {role: 'my-custom-analyzer', status: 'success', output: null, warnings: []};
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
export default myPlugin;
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
npx impact-gate crew --plugins ./my-plugin.ts --workflow full-qa --path ./app
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
See [docs/PLUGIN_API_STABILITY.md](docs/PLUGIN_API_STABILITY.md) for the API contract and stability guarantees.
|
|
183
|
+
|
|
184
|
+
### Programmatic API
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
import {
|
|
188
|
+
CrewOrchestrator,
|
|
189
|
+
ImpactAnalystAgent,
|
|
190
|
+
CrossImpactAgent,
|
|
191
|
+
RegressionAdvisorAgent,
|
|
192
|
+
StrategistAgent,
|
|
193
|
+
TestDesignerAgent,
|
|
194
|
+
} from '@yasserkhanorg/impact-gate';
|
|
195
|
+
|
|
196
|
+
const orchestrator = new CrewOrchestrator();
|
|
197
|
+
orchestrator.registerAgent(new ImpactAnalystAgent());
|
|
198
|
+
orchestrator.registerAgent(new CrossImpactAgent());
|
|
199
|
+
orchestrator.registerAgent(new RegressionAdvisorAgent());
|
|
200
|
+
orchestrator.registerAgent(new StrategistAgent());
|
|
201
|
+
orchestrator.registerAgent(new TestDesignerAgent());
|
|
202
|
+
|
|
203
|
+
const result = await orchestrator.run({
|
|
204
|
+
appPath: './webapp',
|
|
205
|
+
testsRoot: './e2e-tests',
|
|
206
|
+
gitSince: 'origin/master',
|
|
207
|
+
workflow: 'design-only',
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
console.log(result.context.strategyEntries);
|
|
211
|
+
console.log(result.context.testDesigns);
|
|
212
|
+
console.log(result.context.crossImpacts);
|
|
213
|
+
```
|
|
214
|
+
## Route-Families Training
|
|
215
|
+
|
|
216
|
+
### What it produces
|
|
217
|
+
|
|
218
|
+
The `train` command builds a **knowledge map** of your codebase — a single JSON file (`route-families.json`) that maps source files to features, test directories, and user flows. This is not ML training; no model is trained. It's building a structured manifest like:
|
|
219
|
+
|
|
220
|
+
```json
|
|
221
|
+
{
|
|
222
|
+
"id": "channels",
|
|
223
|
+
"routes": ["/{team}/channels/{channel}"],
|
|
224
|
+
"priority": "P0",
|
|
225
|
+
"webappPaths": ["src/components/channel_header/**"],
|
|
226
|
+
"serverPaths": ["server/channels/api4/channel*.go", "server/channels/app/channel*.go"],
|
|
227
|
+
"specDirs": ["specs/functional/channels/"],
|
|
228
|
+
"userFlows": ["Create channel", "Archive channel", "Search in channel"],
|
|
229
|
+
"components": ["ChannelHeader", "ChannelSidebar"]
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
### Why the tool needs this
|
|
234
|
+
|
|
235
|
+
When a PR changes `server/channels/app/channel.go`, the tool needs to answer: **"which E2E tests should I run?"** Without the manifest, it has no idea. With it:
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
channel.go changed
|
|
239
|
+
→ belongs to "channels" family
|
|
240
|
+
→ specs are in specs/functional/channels/
|
|
241
|
+
→ run those tests
|
|
242
|
+
→ flag if coverage is missing for the affected user flows
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Every downstream command (`impact`, `plan`, `generate`, `heal`, `impact-gate-qa`) reads this manifest to understand the codebase.
|
|
246
|
+
|
|
247
|
+
### How scanning works
|
|
248
|
+
|
|
249
|
+
The scanner uses 4 strategies to build the `file → family` mapping:
|
|
250
|
+
|
|
251
|
+
1. **Directory matching** — `src/channels/` + `tests/channels/` share a name → channels family
|
|
252
|
+
2. **Test-derived** — `specs/functional/channels/drafts/` exists with spec files → drafts family (even if source code is scattered across components/actions/reducers)
|
|
253
|
+
3. **Server-derived** — `api4/channel.go` + `app/channel.go` + `store/channel_store.go` span 3 backend tiers → channel family (related files like `channel_bookmark.go` are grouped under the parent)
|
|
254
|
+
4. **Name-matched** — `src/utils/channels.ts` or `server/public/model/channel.go` basename matches → add to channels family's paths
|
|
255
|
+
|
|
256
|
+
### What LLM enrichment adds
|
|
257
|
+
|
|
258
|
+
The scanner finds files. The LLM reads code samples and adds **semantic metadata** the scanner can't determine:
|
|
259
|
+
- Accurate URL routes (`/{team}/channels/{channel}` instead of guessed `/channels`)
|
|
260
|
+
- Priority classification (P0 critical user flow vs P2 nice-to-have)
|
|
261
|
+
- Human-readable user flows ("Create channel", "Search messages")
|
|
262
|
+
- React component and page object names
|
|
263
|
+
|
|
264
|
+
This metadata makes impact analysis smarter — it can prioritize P0 flows and suggest specific test scenarios.
|
|
265
|
+
|
|
266
|
+
### What validation does
|
|
267
|
+
|
|
268
|
+
The `--validate` flag measures manifest accuracy against **real git history**. It's not training data — it's a quality check:
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
835 commits → 5105 changed files → 3223 bound to a family = 63% coverage
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
This tells you the manifest is complete enough. If coverage were 30%, impact analysis would be blind to most code changes.
|
|
275
|
+
|
|
276
|
+
### Usage
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
# Scan your codebase + LLM enrichment (default)
|
|
280
|
+
npx impact-gate train --path /path/to/project
|
|
281
|
+
|
|
282
|
+
# Offline mode (no LLM, no API key needed)
|
|
283
|
+
npx impact-gate train --path /path/to/project --no-enrich
|
|
284
|
+
|
|
285
|
+
# Validate accuracy against recent git history
|
|
286
|
+
npx impact-gate train --path /path/to/project --validate --since HEAD~50
|
|
287
|
+
|
|
288
|
+
# Full pipeline: scan + enrich + validate
|
|
289
|
+
npx impact-gate train --path /path/to/project --validate --since HEAD~20
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
**Why LLM enrichment is on by default:** The manifest gives AI context for impact analysis, scenario suggestion, and bug detection. AI-generated context produces better AI reasoning downstream. Use `--no-enrich` for offline/free operation or to avoid sending code snippets to third-party LLM APIs.
|
|
293
|
+
|
|
294
|
+
**Training loop:** Run `train` → review `route-families.json` → run `train --validate` to check coverage % → fix gaps → repeat.
|
|
295
|
+
|
|
296
|
+
**Additional flags:**
|
|
297
|
+
- `--verbose` / `-v` — DEBUG-level output with timing for each phase
|
|
298
|
+
- `--json` — structured JSON log output (for CI pipelines)
|
|
299
|
+
- `--server-path` — explicit path to backend server root
|
|
300
|
+
- `--budget-usd` — max LLM spend (default: $0.50, max: $10)
|
|
301
|
+
|
|
302
|
+
**Output:**
|
|
303
|
+
- `<testsRoot>/.e2e-ai-agents/route-families.json` — the manifest
|
|
304
|
+
- `<testsRoot>/.e2e-ai-agents/train-report.json` — timing data, family counts, coverage stats, LLM metrics
|
|
305
|
+
|
|
306
|
+
## Configuration
|
|
307
|
+
|
|
308
|
+
Create `impact-gate.config.json` in your project (auto-discovered):
|
|
309
|
+
|
|
310
|
+
```json
|
|
311
|
+
{
|
|
312
|
+
"path": ".",
|
|
313
|
+
"profile": "mattermost",
|
|
314
|
+
"testsRoot": ".",
|
|
315
|
+
"mode": "impact",
|
|
316
|
+
"framework": "auto",
|
|
317
|
+
"git": { "since": "origin/master" },
|
|
318
|
+
"impact": {
|
|
319
|
+
"dependencyGraph": { "enabled": true, "maxDepth": 3 },
|
|
320
|
+
"traceability": { "enabled": true },
|
|
321
|
+
"aiFlow": { "enabled": true, "provider": "anthropic" }
|
|
322
|
+
},
|
|
323
|
+
"pipeline": {
|
|
324
|
+
"enabled": false,
|
|
325
|
+
"scenarios": 3,
|
|
326
|
+
"outputDir": "specs/functional/ai-assisted",
|
|
327
|
+
"mcp": false
|
|
328
|
+
},
|
|
329
|
+
"policy": {
|
|
330
|
+
"enforcementMode": "block",
|
|
331
|
+
"blockOnActions": ["must-add-tests"]
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Analysis Profiles
|
|
337
|
+
|
|
338
|
+
Profiles are not the same thing as frameworks. They control analysis strictness and project-specific conventions.
|
|
339
|
+
|
|
340
|
+
| Profile | Description |
|
|
341
|
+
|---------|-------------|
|
|
342
|
+
| `default` | Standard analysis behavior for most repositories |
|
|
343
|
+
| `mattermost` | Mattermost-specific conventions and stricter handling of heuristic-only mappings |
|
|
344
|
+
|
|
345
|
+
Framework detection is separate. The CLI can auto-detect Playwright, Cypress, pytest, supertest, and Selenium usage from the project structure and dependencies.
|
|
346
|
+
|
|
347
|
+
### Key options
|
|
348
|
+
|
|
349
|
+
- **`testsRoot`** — path to tests when they live outside the app root
|
|
350
|
+
- **`profile`** — `default` or `mattermost`
|
|
351
|
+
- **`impact.dependencyGraph`** — static reverse dependency graph for transitive impact
|
|
352
|
+
- **`impact.traceability`** — file-to-test mapping from CI execution data
|
|
353
|
+
- **`impact.aiFlow`** — LLM-powered flow mapping through the configured provider
|
|
354
|
+
- **`pipeline.mcp`** — use Playwright MCP server for browser-aware generation/healing
|
|
355
|
+
- **`policy.enforcementMode`** — `advisory`, `warn`, or `block`
|
|
356
|
+
|
|
357
|
+
## CI Integration
|
|
358
|
+
|
|
359
|
+
### GitHub Actions
|
|
360
|
+
|
|
361
|
+
```yaml
|
|
362
|
+
- name: Run E2E coverage check
|
|
363
|
+
run: |
|
|
364
|
+
npx impact-gate plan \
|
|
365
|
+
--config ./impact-gate.config.json \
|
|
366
|
+
--since origin/${{ github.base_ref }} \
|
|
367
|
+
--fail-on-must-add-tests \
|
|
368
|
+
--github-output "$GITHUB_OUTPUT"
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
The `plan` command writes:
|
|
372
|
+
- `.e2e-ai-agents/plan.json` — structured plan with `runSet`, `confidence`, `decision`
|
|
373
|
+
- `.e2e-ai-agents/ci-summary.md` — markdown summary for PR comments
|
|
374
|
+
- `.e2e-ai-agents/metrics-summary.json` — run metrics
|
|
375
|
+
|
|
376
|
+
Use `--fail-on-must-add-tests` to exit non-zero when uncovered P0/P1 gaps exist. Use `--github-output` to expose outputs to subsequent workflow steps.
|
|
377
|
+
|
|
378
|
+
If you want AI enrichment on top of the deterministic plan, add your provider environment variables to the workflow separately.
|
|
379
|
+
|
|
380
|
+
See [examples/github-actions/pr-impact.yml](examples/github-actions/pr-impact.yml) for a complete workflow template.
|
|
381
|
+
|
|
382
|
+
## Pipeline Modes
|
|
383
|
+
|
|
384
|
+
### Package Native (default)
|
|
385
|
+
|
|
386
|
+
Strategy-based test templates with quality guardrails and iterative heal attempts. The strongest path today is still a repo whose impact analysis and manifest quality are already in good shape.
|
|
387
|
+
|
|
388
|
+
### MCP Mode (`--pipeline-mcp`)
|
|
389
|
+
|
|
390
|
+
Uses the official Playwright Test Agent loop (planner/generator/healer) with Claude CLI orchestration. Validates generated specs against discovered local API surface to block hallucinated methods.
|
|
391
|
+
|
|
392
|
+
- **`--pipeline-mcp-only`** — fail if MCP setup fails (no silent fallback)
|
|
393
|
+
- **`--pipeline-mcp-allow-fallback`** — fall back to package-native if MCP unavailable
|
|
394
|
+
- **`--pipeline-mcp-timeout-ms`** — per-command timeout
|
|
395
|
+
- **`--pipeline-mcp-retries`** — retry count for transient failures
|
|
396
|
+
|
|
397
|
+
### Agentic Generation (`generate` command)
|
|
398
|
+
|
|
399
|
+
LLM-powered generate-run-fix loop: generates a spec, runs it, analyzes failures, and iterates up to `--max-attempts` times.
|
|
400
|
+
|
|
401
|
+
## LLM Providers
|
|
402
|
+
|
|
403
|
+
Used internally for AI enrichment, test generation, and healing.
|
|
404
|
+
|
|
405
|
+
```bash
|
|
406
|
+
# Anthropic
|
|
407
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
408
|
+
|
|
409
|
+
# OpenAI
|
|
410
|
+
export OPENAI_API_KEY=sk-...
|
|
411
|
+
|
|
412
|
+
# Ollama (free, local)
|
|
413
|
+
export OLLAMA_BASE_URL=http://localhost:11434
|
|
414
|
+
export OLLAMA_MODEL=deepseek-r1:7b
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
Programmatic provider usage:
|
|
418
|
+
|
|
419
|
+
```typescript
|
|
420
|
+
import { AnthropicProvider } from '@yasserkhanorg/impact-gate';
|
|
421
|
+
|
|
422
|
+
const claude = new AnthropicProvider({
|
|
423
|
+
apiKey: process.env.ANTHROPIC_API_KEY
|
|
424
|
+
});
|
|
425
|
+
const response = await claude.generateText('Analyze test failure');
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
Factory pattern with auto-detection, hybrid mode (free local + premium fallback), and custom OpenAI-compatible endpoints are also supported. See the [provider API exports](src/index.ts) for full details.
|
|
429
|
+
|
|
430
|
+
## Advanced / Experimental: MCP Server
|
|
431
|
+
|
|
432
|
+
Exposes 6 tools for test agents (Playwright v1.56+):
|
|
433
|
+
|
|
434
|
+
```typescript
|
|
435
|
+
import { E2EAgentsMCPServer } from '@yasserkhanorg/impact-gate/mcp';
|
|
436
|
+
|
|
437
|
+
const server = new E2EAgentsMCPServer();
|
|
438
|
+
// Tools: discover_tests, read_file, write_file, run_tests, get_git_changes, get_repository_context
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
Security: `write_file` is restricted to test spec files (`*.spec.ts`, `*.test.ts`) and the `.e2e-ai-agents/` directory. Path traversal and symlink escape are blocked. Rate limited to 100 requests/minute.
|
|
442
|
+
|
|
443
|
+
## Traceability
|
|
444
|
+
|
|
445
|
+
Build file-to-test mappings from CI execution data:
|
|
446
|
+
|
|
447
|
+
1. **Capture** — extract test-file relationships from Playwright JSON reports
|
|
448
|
+
2. **Ingest** — merge into a rolling manifest (`.e2e-ai-agents/traceability.json`)
|
|
449
|
+
3. **Query** — impact analysis uses the manifest to map changed files to relevant tests
|
|
450
|
+
|
|
451
|
+
Tuning flags: `--traceability-min-hits`, `--traceability-max-files-per-test`, `--traceability-max-age-days`.
|
|
452
|
+
|
|
453
|
+
Schemas: [schemas/traceability-input.schema.json](schemas/traceability-input.schema.json)
|
|
454
|
+
|
|
455
|
+
## Artifacts
|
|
456
|
+
|
|
457
|
+
| File | Written by | Purpose |
|
|
458
|
+
|------|-----------|---------|
|
|
459
|
+
| `route-families.json` | `train` | Route family manifest |
|
|
460
|
+
| `train-report.json` | `train` | Training timings, coverage, LLM metrics |
|
|
461
|
+
| `plan.json` | `plan` | Coverage plan with gaps, decisions, metrics |
|
|
462
|
+
| `ci-summary.md` | `plan` | Markdown for PR comments |
|
|
463
|
+
| `metrics.jsonl` | `plan` | Append-only run metrics |
|
|
464
|
+
| `metrics-summary.json` | `plan` | Aggregated metrics |
|
|
465
|
+
| `traceability.json` | `traceability-ingest` | File-to-test manifest |
|
|
466
|
+
| `traceability-state.json` | `traceability-ingest` | Rolling counts |
|
|
467
|
+
| `feedback.json` | `feedback` | Recommendation outcomes |
|
|
468
|
+
| `calibration.json` | `feedback` | Precision/recall calibration |
|
|
469
|
+
| `flaky-tests.json` | `feedback` | Flaky test scores |
|
|
470
|
+
| `agentic-summary.json` | `generate` | Agentic generation results |
|
|
471
|
+
|
|
472
|
+
All written under `<testsRoot>/.e2e-ai-agents/`.
|
|
473
|
+
|
|
474
|
+
## Advanced / Experimental: Autonomous QA Agent (`impact-gate-qa`)
|
|
475
|
+
|
|
476
|
+
An autonomous QA engineer that opens a real browser, navigates to changed features, tries edge cases, and produces a findings report — all unsupervised. Built on top of `agent-browser` and the Anthropic tool-use API.
|
|
477
|
+
|
|
478
|
+
### Quick Start
|
|
479
|
+
|
|
480
|
+
```bash
|
|
481
|
+
# PR mode — test features changed since origin/main
|
|
482
|
+
npx impact-gate-qa pr --since origin/main --base-url http://localhost:8065
|
|
483
|
+
|
|
484
|
+
# Hunt mode — deep-test a specific area
|
|
485
|
+
npx impact-gate-qa hunt "channel settings" --base-url http://localhost:8065
|
|
486
|
+
|
|
487
|
+
# Release mode — systematic exploration of all critical flows
|
|
488
|
+
npx impact-gate-qa release --base-url http://localhost:8065 --time 30
|
|
489
|
+
|
|
490
|
+
# Fix mode — verify healed specs
|
|
491
|
+
npx impact-gate-qa fix --base-url http://localhost:8065
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### Architecture
|
|
495
|
+
|
|
496
|
+
1. **Phase 1 (Script)** — Runs `impact-gate impact/plan` to determine scope, then executes matched Playwright specs.
|
|
497
|
+
2. **Phase 2 (Explore)** — LLM-driven browser loop: observe (accessibility snapshot) → think → act (click/fill/navigate) → record findings. Includes stuck detection, multi-user testing, console error capture, and vision-based analysis.
|
|
498
|
+
3. **Phase 3 (Report)** — Generates a structured report with findings, per-flow sign-off, and a release-readiness verdict (go/no-go/conditional).
|
|
499
|
+
|
|
500
|
+
### Options
|
|
501
|
+
|
|
502
|
+
| Flag | Default | Description |
|
|
503
|
+
|------|---------|-------------|
|
|
504
|
+
| `--base-url` | `http://localhost:8065` | Application URL |
|
|
505
|
+
| `--time` | `15` | Time limit in minutes |
|
|
506
|
+
| `--budget` | `2.00` | Max LLM spend in USD |
|
|
507
|
+
| `--phase` | `all` | Run only `1`, `2`, or `3` |
|
|
508
|
+
| `--headed` | off | Keep browser visible |
|
|
509
|
+
| `--since` | — | Git ref for diff-based scoping |
|
|
510
|
+
| `--tests-root` | — | Path to Playwright tests directory |
|
|
511
|
+
|
|
512
|
+
Requires `agent-browser` CLI (`npm install -g agent-browser`) and `ANTHROPIC_API_KEY`.
|
|
513
|
+
|
|
514
|
+
## Production Usage
|
|
515
|
+
|
|
516
|
+
The strongest production story today is a repo that maintains a good `route-families.json` manifest and uses the deterministic `impact -> plan -> gate` loop in CI. [Mattermost](https://github.com/mattermost/mattermost) is the most battle-tested public example for coverage gating, generation, and healing. See the [Mattermost Playwright integration](https://github.com/mattermost/mattermost/tree/master/e2e-tests/playwright) for a real-world setup.
|
|
517
|
+
|
|
518
|
+
## License
|
|
519
|
+
|
|
520
|
+
Apache 2.0
|