igel-qe-core 1.0.5 → 1.0.8
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/dist/cli/index.js +638 -54
- package/dist/cli/platform.js +0 -12
- package/dist/mcp/server.js +183 -8
- package/package.json +4 -4
- package/src/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/automation_design_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/automation_design_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/code_intelligence_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/code_intelligence_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/confidence_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/confidence_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/execution_validation_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/execution_validation_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/framework_analyzer_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/framework_analyzer_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/intent_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/regression_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/regression_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/requirement_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/requirement_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/scenario_agent.cpython-311.pyc +0 -0
- package/{knowledge_base → src}/agents/__pycache__/scenario_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/script_generator_agent.cpython-311.pyc +0 -0
- package/{knowledge_base → src}/agents/__pycache__/script_generator_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/testcase_agent.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/testcase_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/validation_agent.cpython-311.pyc +0 -0
- package/{knowledge_base → src}/agents/__pycache__/validation_agent.cpython-313.pyc +0 -0
- package/src/agents/__pycache__/workflow_engine.cpython-311.pyc +0 -0
- package/src/agents/__pycache__/workflow_engine.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/agents/automation_design_agent.py +52 -22
- package/{knowledge_base → src}/agents/code_intelligence_agent.py +2 -2
- package/src/agents/confidence_agent.py +220 -0
- package/src/agents/execution_validation_agent.py +247 -0
- package/{knowledge_base → src}/agents/feedback_agent.py +36 -7
- package/src/agents/framework_analyzer_agent.py +43 -0
- package/{knowledge_base → src}/agents/fusion_agent.py +3 -3
- package/{knowledge_base → src}/agents/graph.py +10 -10
- package/{knowledge_base → src}/agents/healing_agent.py +4 -4
- package/src/agents/intent_agent.py +30 -0
- package/src/agents/internal/__init__.py +3 -0
- package/src/agents/internal/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/agents/internal/__pycache__/approval_manager.cpython-313.pyc +0 -0
- package/src/agents/internal/__pycache__/question_engine.cpython-313.pyc +0 -0
- package/src/agents/internal/approval_manager.py +111 -0
- package/src/agents/internal/question_engine.py +111 -0
- package/src/agents/internal/workflow_engine.py +28 -0
- package/{knowledge_base → src}/agents/kg_agent.py +3 -3
- package/{knowledge_base → src}/agents/memory_agent.py +4 -4
- package/src/agents/orchestrator/__init__.py +3 -0
- package/src/agents/orchestrator/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/agents/orchestrator/__pycache__/orchestrator.cpython-313.pyc +0 -0
- package/src/agents/orchestrator/orchestrator.py +63 -0
- package/{knowledge_base → src}/agents/rca_agent.py +4 -4
- package/{knowledge_base → src}/agents/reflection_agent.py +1 -1
- package/{knowledge_base → src}/agents/regression_agent.py +2 -2
- package/src/agents/requirement_agent.py +97 -0
- package/{knowledge_base → src}/agents/retrieval_agent.py +2 -2
- package/{knowledge_base → src}/agents/scenario_agent.py +11 -17
- package/{knowledge_base → src}/agents/script_agent.py +6 -6
- package/{knowledge_base → src}/agents/script_generator_agent.py +12 -10
- package/{knowledge_base → src}/agents/temporal_agent.py +3 -3
- package/src/agents/testcase_agent.py +163 -0
- package/{knowledge_base → src}/agents/validation_agent.py +1 -1
- package/src/agents/workflow_engine.py +114 -0
- package/{knowledge_base → src}/alembic/README.md +4 -4
- package/{knowledge_base → src}/alembic/env.py +1 -1
- package/{knowledge_base → src}/alembic/script.py.mako +1 -1
- package/{knowledge_base → src}/api/middleware.py +3 -3
- package/{knowledge_base → src}/api/server.py +28 -28
- package/{knowledge_base → src}/chunking/chunker.py +3 -3
- package/src/cli/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/cli/__pycache__/workflow_cli.cpython-311.pyc +0 -0
- package/src/cli/__pycache__/workflow_cli.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/cli/feedback_cli.py +10 -10
- package/{knowledge_base → src}/cli/generate.py +11 -11
- package/src/cli/index.ts +704 -0
- package/src/cli/platform.ts +147 -0
- package/src/cli/workflow_cli.py +940 -0
- package/{knowledge_base → src}/config/__init__.py +1 -1
- package/src/config/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/config/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/config/__pycache__/policy_config.cpython-311.pyc +0 -0
- package/src/config/__pycache__/policy_config.cpython-313.pyc +0 -0
- package/src/config/__pycache__/settings.cpython-311.pyc +0 -0
- package/{knowledge_base → src}/config/__pycache__/settings.cpython-313.pyc +0 -0
- package/src/config/policy_config.py +85 -0
- package/src/config/policy_rules.yaml +50 -0
- package/{knowledge_base → src}/config/settings.py +51 -6
- package/{knowledge_base → src}/connectors/__init__.py +1 -1
- package/src/connectors/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/connectors/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/connectors/__pycache__/base.cpython-311.pyc +0 -0
- package/src/connectors/__pycache__/jira_connector.cpython-311.pyc +0 -0
- package/{knowledge_base → src}/connectors/__pycache__/jira_connector.cpython-313.pyc +0 -0
- package/src/connectors/__pycache__/query_bridge.cpython-313.pyc +0 -0
- package/src/connectors/bitbucket_connector.py +334 -0
- package/{knowledge_base → src}/connectors/community_connector.py +6 -6
- package/{knowledge_base → src}/connectors/confluence_connector.py +4 -4
- package/{knowledge_base → src}/connectors/jira_connector.py +6 -6
- package/{knowledge_base → src}/connectors/kb_igel_connector.py +6 -6
- package/{knowledge_base → src}/connectors/query_bridge.py +11 -11
- package/{knowledge_base → src}/connectors/search_backends.py +1 -1
- package/{knowledge_base → src}/connectors/serviceNow_connector.py +2 -2
- package/{knowledge_base → src}/connectors/sync_scheduler.py +12 -10
- package/{knowledge_base → src}/connectors/teamcity_connector.py +2 -2
- package/{knowledge_base → src}/connectors/testRail_connector.py +2 -2
- package/{knowledge_base → src}/connectors/web_fetcher.py +1 -1
- package/src/connectors/xray_connector.py +337 -0
- package/{knowledge_base → src}/core/__init__.py +1 -1
- package/src/core/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/core/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/core/__pycache__/circuit_breaker.cpython-313.pyc +0 -0
- package/src/core/__pycache__/confidence.cpython-311.pyc +0 -0
- package/src/core/__pycache__/confidence.cpython-313.pyc +0 -0
- package/src/core/__pycache__/context_engine.cpython-311.pyc +0 -0
- package/src/core/__pycache__/context_engine.cpython-313.pyc +0 -0
- package/src/core/__pycache__/evidence_resolver.cpython-311.pyc +0 -0
- package/src/core/__pycache__/evidence_resolver.cpython-313.pyc +0 -0
- package/src/core/__pycache__/guardrails.cpython-311.pyc +0 -0
- package/src/core/__pycache__/guardrails.cpython-313.pyc +0 -0
- package/src/core/__pycache__/hooks.cpython-311.pyc +0 -0
- package/src/core/__pycache__/hooks.cpython-313.pyc +0 -0
- package/src/core/__pycache__/intent_service.cpython-313.pyc +0 -0
- package/src/core/__pycache__/llm_executor.cpython-311.pyc +0 -0
- package/src/core/__pycache__/llm_executor.cpython-313.pyc +0 -0
- package/src/core/__pycache__/model_router.cpython-311.pyc +0 -0
- package/src/core/__pycache__/model_router.cpython-313.pyc +0 -0
- package/src/core/__pycache__/orchestration_contracts.cpython-311.pyc +0 -0
- package/src/core/__pycache__/orchestration_contracts.cpython-313.pyc +0 -0
- package/src/core/__pycache__/precedence.cpython-311.pyc +0 -0
- package/src/core/__pycache__/precedence.cpython-313.pyc +0 -0
- package/src/core/__pycache__/prompt_builder.cpython-311.pyc +0 -0
- package/src/core/__pycache__/prompt_builder.cpython-313.pyc +0 -0
- package/src/core/__pycache__/prompt_policy_engine.cpython-311.pyc +0 -0
- package/src/core/__pycache__/prompt_policy_engine.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/core/cache.py +2 -2
- package/{knowledge_base → src}/core/confidence.py +2 -2
- package/src/core/context_engine.py +138 -0
- package/src/core/evidence_resolver.py +72 -0
- package/src/core/guardrails.py +22 -0
- package/src/core/hooks.py +57 -0
- package/src/core/intent_service.py +74 -0
- package/src/core/llm_executor.py +138 -0
- package/{knowledge_base → src}/core/logging_setup.py +1 -1
- package/src/core/model_router.py +246 -0
- package/src/core/orchestration_contracts.py +66 -0
- package/src/core/persistence_engine.py +159 -0
- package/src/core/prompt_builder.py +49 -0
- package/src/core/prompt_policy_engine.py +35 -0
- package/src/core/traceability_engine.py +56 -0
- package/src/db/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/db/__pycache__/client.cpython-311.pyc +0 -0
- package/{knowledge_base → src}/db/__pycache__/client.cpython-313.pyc +0 -0
- package/src/db/__pycache__/igel_schema.cpython-311.pyc +0 -0
- package/{knowledge_base → src}/db/__pycache__/igel_schema.cpython-313.pyc +0 -0
- package/src/db/__pycache__/kg_introspect.cpython-311.pyc +0 -0
- package/src/db/__pycache__/kg_introspect.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/db/client.py +1 -1
- package/{knowledge_base → src}/db/connector_sync.py +1 -1
- package/{knowledge_base → src}/db/feedback_schema.py +2 -2
- package/{knowledge_base → src}/db/igel_schema.py +28 -3
- package/{knowledge_base → src}/db/kg_introspect.py +1 -1
- package/src/db/migrations.py +237 -0
- package/{knowledge_base → src}/db/schema.py +6 -6
- package/{knowledge_base → src}/deploy/Dockerfile +3 -3
- package/{knowledge_base → src}/deploy/feedback_automation.sh +3 -3
- package/{knowledge_base → src}/deploy/firecrawl-docker.sh +4 -4
- package/{knowledge_base → src}/deploy/igel-testgen.service +2 -2
- package/{knowledge_base → src}/deploy/install_reranker.sh +1 -1
- package/{knowledge_base → src}/deploy/requirements.txt +1 -2
- package/{knowledge_base → src}/deploy/run_server.sh +1 -1
- package/{knowledge_base → src}/docs/TEST_GENERATION_GUIDE.md +15 -15
- package/src/embeddings/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/embeddings/__pycache__/azure_embedder.cpython-311.pyc +0 -0
- package/{knowledge_base → src}/embeddings/__pycache__/azure_embedder.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/embeddings/azure_embedder.py +10 -1
- package/{knowledge_base → src}/eval/__init__.py +3 -3
- package/{knowledge_base → src}/eval/__main__.py +7 -7
- package/src/eval/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/eval/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/eval/__pycache__/baseline.cpython-311.pyc +0 -0
- package/src/eval/__pycache__/baseline.cpython-313.pyc +0 -0
- package/src/eval/__pycache__/harness.cpython-311.pyc +0 -0
- package/src/eval/__pycache__/harness.cpython-313.pyc +0 -0
- package/src/eval/__pycache__/scorers.cpython-311.pyc +0 -0
- package/src/eval/__pycache__/scorers.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/eval/harness.py +6 -6
- package/{knowledge_base → src}/feedback/__init__.py +1 -1
- package/{knowledge_base → src}/feedback/analytics.py +1 -1
- package/{knowledge_base → src}/feedback/applier.py +4 -4
- package/{knowledge_base → src}/feedback/curator.py +2 -2
- package/{knowledge_base → src}/feedback/handler.py +1 -1
- package/src/generation/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/generation/__pycache__/input_classifier.cpython-313.pyc +0 -0
- package/src/generation/__pycache__/manual_tc_parser.cpython-313.pyc +0 -0
- package/src/generation/__pycache__/prompts.cpython-313.pyc +0 -0
- package/src/generation/__pycache__/test_generator.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/generation/input_classifier.py +1 -1
- package/{knowledge_base → src}/generation/prompts.py +1 -1
- package/{knowledge_base → src}/generation/tc_transformer.py +10 -10
- package/{knowledge_base → src}/generation/test_generator.py +56 -10
- package/{knowledge_base → src}/graph_db/__init__.py +1 -1
- package/{knowledge_base → src}/graph_db/graphiti_client.py +2 -2
- package/{knowledge_base → src}/graph_db/kg_traversal.py +3 -3
- package/{knowledge_base → src}/graph_db/migrate_kg.py +4 -4
- package/{knowledge_base → src}/graph_db/neo4j_client.py +1 -1
- package/{knowledge_base → src}/graph_db/temporal_ingest.py +1 -1
- package/{knowledge_base → src}/ingestion/kg_extractor.py +6 -6
- package/{knowledge_base → src}/ingestion/web_ingest.py +6 -6
- package/src/intelligence/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/intelligence/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/intelligence/__pycache__/diff_analyzer.cpython-311.pyc +0 -0
- package/src/intelligence/__pycache__/diff_analyzer.cpython-313.pyc +0 -0
- package/src/intelligence/__pycache__/routing_engine.cpython-311.pyc +0 -0
- package/src/intelligence/__pycache__/routing_engine.cpython-313.pyc +0 -0
- package/src/intelligence/diff_analyzer.py +109 -0
- package/{knowledge_base → src}/intelligence/execution_ingest.py +3 -3
- package/src/intelligence/routing_engine.py +74 -0
- package/src/mcp/server.ts +384 -0
- package/src/memory/__init__.py +6 -0
- package/{knowledge_base → src}/memory/cognee_client.py +3 -3
- package/src/models/__pycache__/test_requirement.cpython-311.pyc +0 -0
- package/{knowledge_base → src}/models/__pycache__/test_requirement.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/models/test_requirement.py +19 -7
- package/{knowledge_base → src}/parsers/csv_parser.py +1 -1
- package/{knowledge_base → src}/parsers/doc_parser.py +1 -1
- package/{knowledge_base → src}/parsers/html_parser.py +1 -1
- package/{knowledge_base → src}/parsers/pdf_parser.py +1 -1
- package/src/project/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/project/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/project/__pycache__/ai_folder.cpython-311.pyc +0 -0
- package/src/project/__pycache__/ai_folder.cpython-313.pyc +0 -0
- package/src/project/__pycache__/context_enricher.cpython-313.pyc +0 -0
- package/src/project/__pycache__/context_projection_builder.cpython-311.pyc +0 -0
- package/src/project/__pycache__/context_projection_builder.cpython-313.pyc +0 -0
- package/src/project/__pycache__/context_requirement_sync.cpython-311.pyc +0 -0
- package/src/project/__pycache__/context_requirement_sync.cpython-313.pyc +0 -0
- package/src/project/ai_folder.py +602 -0
- package/src/project/context_enricher.py +333 -0
- package/src/project/context_projection_builder.py +167 -0
- package/src/project/context_requirement_sync.py +205 -0
- package/src/project/init_check.py +214 -0
- package/src/prompts/__pycache__/prompt_loader.cpython-313.pyc +0 -0
- package/src/prompts/automation_design.md +12 -0
- package/src/prompts/policies/automation_generation_policy.md +11 -0
- package/src/prompts/policies/generation_instructions.md +24 -0
- package/src/prompts/policies/guardrails.md +6 -0
- package/src/prompts/policies/traceability_policy.md +9 -0
- package/src/prompts/prompt_loader.py +56 -0
- package/src/prompts/requirement_understanding.md +17 -0
- package/src/prompts/scenario_generator.md +17 -0
- package/src/prompts/script_generator.md +13 -0
- package/src/prompts/test_case_generator.md +23 -0
- package/src/retrieval/__pycache__/__init__.cpython-311.pyc +0 -0
- package/src/retrieval/__pycache__/__init__.cpython-313.pyc +0 -0
- package/src/retrieval/__pycache__/knowledge_graph.cpython-311.pyc +0 -0
- package/src/retrieval/__pycache__/knowledge_graph.cpython-313.pyc +0 -0
- package/src/retrieval/__pycache__/retriever.cpython-311.pyc +0 -0
- package/src/retrieval/__pycache__/retriever.cpython-313.pyc +0 -0
- package/src/retrieval/__pycache__/unified_query.cpython-313.pyc +0 -0
- package/{knowledge_base → src}/retrieval/context_fusion.py +3 -3
- package/{knowledge_base → src}/retrieval/knowledge_graph.py +4 -4
- package/{knowledge_base → src}/retrieval/reranker.py +2 -2
- package/{knowledge_base → src}/retrieval/retriever.py +11 -11
- package/{knowledge_base → src}/retrieval/unified_query.py +7 -7
- package/{knowledge_base → src}/retrieval/web_retriever.py +6 -6
- package/{knowledge_base → src}/validators/step_fidelity.py +1 -1
- package/src/vision/__init__.py +0 -0
- package/{knowledge_base → src}/vision/image_describer.py +1 -1
- package/knowledge_base/agents/__pycache__/automation_design_agent.cpython-313.pyc +0 -0
- package/knowledge_base/agents/__pycache__/confidence_agent.cpython-313.pyc +0 -0
- package/knowledge_base/agents/__pycache__/execution_validation_agent.cpython-313.pyc +0 -0
- package/knowledge_base/agents/__pycache__/requirement_agent.cpython-313.pyc +0 -0
- package/knowledge_base/agents/__pycache__/testcase_agent.cpython-313.pyc +0 -0
- package/knowledge_base/agents/__pycache__/workflow_engine.cpython-313.pyc +0 -0
- package/knowledge_base/agents/confidence_agent.py +0 -95
- package/knowledge_base/agents/execution_validation_agent.py +0 -129
- package/knowledge_base/agents/intent_agent.py +0 -76
- package/knowledge_base/agents/requirement_agent.py +0 -71
- package/knowledge_base/agents/testcase_agent.py +0 -111
- package/knowledge_base/agents/workflow_engine.py +0 -87
- package/knowledge_base/cli/__pycache__/workflow_cli.cpython-313.pyc +0 -0
- package/knowledge_base/cli/generate_qcapps134.py +0 -391
- package/knowledge_base/cli/workflow_cli.py +0 -189
- package/knowledge_base/config/.env +0 -100
- package/knowledge_base/config/.env.example +0 -75
- package/knowledge_base/config/__pycache__/__init__.cpython-313.pyc +0 -0
- package/knowledge_base/connectors/__pycache__/__init__.cpython-313.pyc +0 -0
- package/knowledge_base/connectors/bitbucket_connector.py +0 -25
- package/knowledge_base/db/migrations.py +0 -22
- package/knowledge_base/ingestion/ingest.py +0 -346
- package/knowledge_base/ingestion/ingest_images.py +0 -330
- package/knowledge_base/memory/__init__.py +0 -6
- package/knowledge_base/memory/ingest_memory.py +0 -60
- /package/{knowledge_base → src}/__init__.py +0 -0
- /package/{knowledge_base → src}/__pycache__/__init__.cpython-313.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/confidence.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/config.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/config.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/config.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/context_fusion.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/context_fusion.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/feedback_analytics.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/feedback_applier.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/feedback_cli.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/feedback_curator.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/feedback_handler.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/generate.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/generate_qcapps134.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/input_classifier.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/input_classifier.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/kg_extractor.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/knowledge_graph.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/knowledge_graph.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/manual_tc_parser.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/manual_tc_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/precedence.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/prompts.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/prompts.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/reranker.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/reranker.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/retrieval_debug.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/retrieval_debug.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/retriever.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/retriever.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/server.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/tc_transformer.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/tc_transformer.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/test_generator.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/__pycache__/test_generator.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__init__.py +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/__init__.cpython-313.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/automation_design_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/confidence_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/execution_validation_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/fusion_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/fusion_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/fusion_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/graph.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/graph.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/graph.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/healing_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/intent_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/intent_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/intent_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/kg_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/kg_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/kg_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/memory_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/memory_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/memory_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/rca_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/reflection_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/reflection_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/reflection_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/regression_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/requirement_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/retrieval_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/retrieval_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/retrieval_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/scenario_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/script_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/script_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/script_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/script_generator_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/state.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/state.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/state.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/temporal_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/temporal_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/temporal_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/testcase_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/validation_agent.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/validation_agent.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/validation_agent.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/agents/__pycache__/workflow_engine.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/agents/state.py +0 -0
- /package/{knowledge_base → src}/alembic/__pycache__/env.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/alembic/__pycache__/env.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/alembic/versions/.gitkeep +0 -0
- /package/{knowledge_base → src}/alembic/versions/001_phase0_feedback.py +0 -0
- /package/{knowledge_base → src}/alembic/versions/002_feedback_promotions.py +0 -0
- /package/{knowledge_base → src}/alembic/versions/003_enterprise_hardening.py +0 -0
- /package/{knowledge_base → src}/alembic/versions/__pycache__/001_phase0_feedback.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/alembic/versions/__pycache__/001_phase0_feedback.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/alembic/versions/__pycache__/002_feedback_promotions.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/alembic/versions/__pycache__/002_feedback_promotions.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/api/__init__.py +0 -0
- /package/{knowledge_base → src}/api/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/api/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/api/__pycache__/middleware.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/api/__pycache__/server.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/api/__pycache__/server.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__init__.py +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/chunker.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/chunker.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/validators.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/chunking/__pycache__/validators.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/chunking/validators.py +0 -0
- /package/{knowledge_base → src}/cli/__init__.py +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/__init__.cpython-313.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/feedback_cli.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/feedback_cli.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/generate.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/generate.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/generate_qcapps134.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/cli/__pycache__/workflow_cli.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/config/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/config/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/config/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/config/__pycache__/settings.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/config/__pycache__/settings.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/config/__pycache__/settings.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/base.cpython-313.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/base.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/base.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/base.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/bitbucket_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/bitbucket_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/community_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/confluence_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/confluence_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/jira_connector.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/jira_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/jira_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/kb_igel_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/playwright_fetcher.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/query_bridge.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/query_bridge.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/search_backends.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/serviceNow_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/serviceNow_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/sync_scheduler.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/sync_scheduler.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/teamcity_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/teamcity_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/testRail_connector.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/testRail_connector.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/__pycache__/web_fetcher.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/connectors/base.py +0 -0
- /package/{knowledge_base → src}/connectors/playwright_fetcher.py +0 -0
- /package/{knowledge_base → src}/core/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/cache.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/circuit_breaker.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/circuit_breaker.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/confidence.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/confidence.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/confidence.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/logging_setup.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/metrics.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/precedence.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/precedence.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/__pycache__/request_context.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/core/circuit_breaker.py +0 -0
- /package/{knowledge_base → src}/core/metrics.py +0 -0
- /package/{knowledge_base → src}/core/precedence.py +0 -0
- /package/{knowledge_base → src}/core/request_context.py +0 -0
- /package/{knowledge_base → src}/db/__init__.py +0 -0
- /package/{knowledge_base → src}/db/__pycache__/__init__.cpython-313.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/client.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/client.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/client.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/connector_sync.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/feedback_schema.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/feedback_schema.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/igel_schema.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/kg_introspect.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/kg_introspect.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/kg_introspect.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/schema.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/db/__pycache__/schema.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/embeddings/__init__.py +0 -0
- /package/{knowledge_base → src}/embeddings/__pycache__/__init__.cpython-313.pyc +0 -0
- /package/{knowledge_base → src}/embeddings/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/embeddings/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/embeddings/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/embeddings/__pycache__/azure_embedder.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/embeddings/__pycache__/azure_embedder.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/embeddings/__pycache__/azure_embedder.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/__main__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/baseline.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/baseline.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/baseline.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/harness.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/harness.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/harness.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/scorers.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/scorers.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/eval/__pycache__/scorers.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/eval/baseline.py +0 -0
- /package/{knowledge_base → src}/eval/queries_50.json +0 -0
- /package/{knowledge_base → src}/eval/scorers.py +0 -0
- /package/{knowledge_base → src}/exemplars/README.md +0 -0
- /package/{knowledge_base → src}/exemplars/__pycache__/pytest_reference_snippet.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/exemplars/gold_manual_concise_snippet.md +0 -0
- /package/{knowledge_base → src}/exemplars/gold_manual_detailed_snippet.md +0 -0
- /package/{knowledge_base → src}/exemplars/pytest_reference_snippet.py +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/analytics.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/analytics.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/applier.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/applier.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/curator.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/curator.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/handler.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/feedback/__pycache__/handler.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/__init__.py +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/input_classifier.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/input_classifier.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/manual_tc_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/manual_tc_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/prompts.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/prompts.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/prompts.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/tc_transformer.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/test_generator.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/test_generator.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/generation/__pycache__/test_generator.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/generation/manual_tc_parser.py +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/graphiti_client.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/kg_traversal.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/migrate_kg.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/neo4j_client.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/neo4j_client.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/schema.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/__pycache__/temporal_ingest.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/graph_db/schema.py +0 -0
- /package/{knowledge_base → src}/ingestion/__init__.py +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/ingest.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/ingest.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/ingest_images.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/ingest_images.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/kg_extractor.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/kg_extractor.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/ingestion/__pycache__/web_ingest.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/intelligence/__init__.py +0 -0
- /package/{knowledge_base → src}/intelligence/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/intelligence/__pycache__/execution_ingest.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/intelligence/__pycache__/predictive_engine.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/intelligence/__pycache__/risk_scorer.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/intelligence/predictive_engine.py +0 -0
- /package/{knowledge_base → src}/intelligence/risk_scorer.py +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/cognee_client.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/cognee_client.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/cognee_client.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/ingest_memory.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/memory_types.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/memory_types.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/memory/__pycache__/memory_types.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/memory/memory_types.py +0 -0
- /package/{knowledge_base → src}/models/__pycache__/test_requirement.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__init__.py +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/csv_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/csv_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/doc_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/doc_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/html_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/image_extractor.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/image_extractor.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/markdown_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/markdown_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/pdf_parser.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/parsers/__pycache__/pdf_parser.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/parsers/image_extractor.py +0 -0
- /package/{knowledge_base → src}/parsers/markdown_parser.py +0 -0
- /package/{knowledge_base/vision → src/project}/__init__.py +0 -0
- /package/{knowledge_base → src}/retrieval/__init__.py +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/context_fusion.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/context_fusion.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/knowledge_graph.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/knowledge_graph.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/knowledge_graph.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/reranker.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/reranker.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/retrieval_debug.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/retrieval_debug.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/retriever.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/retriever.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/retriever.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/unified_query.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/unified_query.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/__pycache__/web_retriever.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/retrieval/retrieval_debug.py +0 -0
- /package/{knowledge_base → src}/validators/__init__.py +0 -0
- /package/{knowledge_base → src}/validators/__pycache__/__init__.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/validators/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/validators/__pycache__/step_fidelity.cpython-314.pyc +0 -0
- /package/{knowledge_base → src}/validators/__pycache__/step_fidelity.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/vision/__pycache__/__init__.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/vision/__pycache__/__init__.cpython-38.pyc +0 -0
- /package/{knowledge_base → src}/vision/__pycache__/image_describer.cpython-37.pyc +0 -0
- /package/{knowledge_base → src}/vision/__pycache__/image_describer.cpython-38.pyc +0 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from src.models.test_requirement import (
|
|
3
|
+
GeneratedTestCase,
|
|
4
|
+
ScenarioWithRules,
|
|
5
|
+
ConfidenceMetrics,
|
|
6
|
+
TestCaseWithConfidence,
|
|
7
|
+
)
|
|
8
|
+
from src.core.context_engine import SourceReport
|
|
9
|
+
from src.core.evidence_resolver import ResolvedContext
|
|
10
|
+
from src.config.policy_config import PolicyConfig
|
|
11
|
+
from src.agents.validation_agent import validate_structural
|
|
12
|
+
|
|
13
|
+
logger = logging.getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# ── Parameter Calculation Helpers ─────────────────────────────────────────────
|
|
17
|
+
|
|
18
|
+
def evaluate_completeness(tc: GeneratedTestCase) -> float:
|
|
19
|
+
"""Evaluate structural completeness of steps (action + data + expected_result).
|
|
20
|
+
|
|
21
|
+
Used by Structural Quality dimension.
|
|
22
|
+
Formula proxy: each complete step scores 1.0; partial steps score proportionally.
|
|
23
|
+
"""
|
|
24
|
+
if not tc.steps:
|
|
25
|
+
return 0.0
|
|
26
|
+
score = 0.0
|
|
27
|
+
for step in tc.steps:
|
|
28
|
+
step_score = 0.0
|
|
29
|
+
if step.action:
|
|
30
|
+
step_score += 0.4
|
|
31
|
+
if step.data:
|
|
32
|
+
step_score += 0.2
|
|
33
|
+
if step.expected_result:
|
|
34
|
+
step_score += 0.4
|
|
35
|
+
score += step_score
|
|
36
|
+
return score / len(tc.steps)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def compute_contextual_relevance(tc: GeneratedTestCase, scenario: ScenarioWithRules) -> float:
|
|
40
|
+
"""Contextual Relevance — Degree to which generated test cases align with requirement/business context.
|
|
41
|
+
|
|
42
|
+
Formula: (No. of test steps mapped to requirement context / Total generated test steps) × 100 → normalised 0-1.
|
|
43
|
+
Mapping heuristic: a step is considered 'mapped' if its action is non-empty and can be linked back
|
|
44
|
+
to at least one of the scenario's business rules (via text intersection).
|
|
45
|
+
"""
|
|
46
|
+
if not tc.steps:
|
|
47
|
+
return 0.0
|
|
48
|
+
rule_keywords: set[str] = set()
|
|
49
|
+
for rule in scenario.business_rules:
|
|
50
|
+
for word in rule.description.lower().split():
|
|
51
|
+
if len(word) > 4:
|
|
52
|
+
rule_keywords.add(word)
|
|
53
|
+
|
|
54
|
+
mapped = 0
|
|
55
|
+
for step in tc.steps:
|
|
56
|
+
action_words = set(step.action.lower().split())
|
|
57
|
+
if rule_keywords and action_words & rule_keywords:
|
|
58
|
+
mapped += 1
|
|
59
|
+
elif step.action:
|
|
60
|
+
# Fallback: if no keyword overlap but step exists, give partial credit
|
|
61
|
+
mapped += 0.5
|
|
62
|
+
|
|
63
|
+
return min(1.0, (mapped / len(tc.steps)))
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def compute_hallucination_control(tc: GeneratedTestCase, resolved_context: ResolvedContext) -> float:
|
|
67
|
+
"""Hallucination — Percentage of generated artifacts NOT containing non-existent entities.
|
|
68
|
+
|
|
69
|
+
Formula: (No. of non-hallucinated entities / Total generated entities) × 100 → normalised 0-1.
|
|
70
|
+
Detection heuristic: presence of unresolved source conflicts in resolved_context signals that the
|
|
71
|
+
AI may have invented information. Zero conflicts = no hallucination detected.
|
|
72
|
+
"""
|
|
73
|
+
conflict_count = len(resolved_context.conflicting_sources)
|
|
74
|
+
# Each conflict reduces confidence. Cap at 5 conflicts = 0 score.
|
|
75
|
+
return max(0.0, 1.0 - (conflict_count * 0.2))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def compute_bias_fairness_control(tc: GeneratedTestCase, scenario: ScenarioWithRules) -> float:
|
|
79
|
+
"""Bias/Fairness Control — Ensures generation covers all personas, locales, negative and edge cases.
|
|
80
|
+
|
|
81
|
+
Formula: (No. of required personas/scenarios covered / Total identified) × 100 → normalised 0-1.
|
|
82
|
+
Coverage heuristic: checks if positive, negative and edge rule types are present in the business rules,
|
|
83
|
+
and if the specific TC covers one of these.
|
|
84
|
+
"""
|
|
85
|
+
rule_types_present = {rule.rule_type for rule in scenario.business_rules}
|
|
86
|
+
total_expected = {"positive", "negative", "edge"}
|
|
87
|
+
covered = rule_types_present & total_expected
|
|
88
|
+
coverage_ratio = len(covered) / len(total_expected)
|
|
89
|
+
|
|
90
|
+
# Bonus: TC itself covers its declared type
|
|
91
|
+
if tc.test_type in covered:
|
|
92
|
+
coverage_ratio = min(1.0, coverage_ratio + 0.15)
|
|
93
|
+
|
|
94
|
+
return round(coverage_ratio, 4)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def compute_business_rule_coverage(tc: GeneratedTestCase, scenario: ScenarioWithRules) -> float:
|
|
98
|
+
"""Business Rule Coverage — Checks how well generated steps address the identified business rules.
|
|
99
|
+
|
|
100
|
+
Formula: (No. of business rules covered by test steps / Total business rules) × 100 → normalised 0-1.
|
|
101
|
+
"""
|
|
102
|
+
if not scenario.business_rules:
|
|
103
|
+
return 1.0
|
|
104
|
+
return min(1.0, len(tc.steps) / len(scenario.business_rules))
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def compute_requirement_clarity(scenario: ScenarioWithRules, source_report: SourceReport) -> float:
|
|
108
|
+
"""Requirement Clarity — How well the upstream requirement was understood.
|
|
109
|
+
|
|
110
|
+
Formula: Determined by presence of structured business rules AND multi-source corroboration.
|
|
111
|
+
"""
|
|
112
|
+
has_rules = 1.0 if scenario.business_rules else 0.5
|
|
113
|
+
sources_found = sum([
|
|
114
|
+
source_report.jira_found,
|
|
115
|
+
source_report.confluence_found,
|
|
116
|
+
source_report.postgres_kb_found,
|
|
117
|
+
source_report.igel_os12_docs_found,
|
|
118
|
+
])
|
|
119
|
+
source_bonus = min(0.5, sources_found / 4 * 0.5)
|
|
120
|
+
return min(1.0, has_rules * 0.5 + source_bonus)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
# ── Main Confidence Computation ───────────────────────────────────────────────
|
|
124
|
+
|
|
125
|
+
def compute_two_level_confidence(
|
|
126
|
+
tc: GeneratedTestCase,
|
|
127
|
+
scenario: ScenarioWithRules,
|
|
128
|
+
resolved_context: ResolvedContext,
|
|
129
|
+
source_report: SourceReport,
|
|
130
|
+
policy: PolicyConfig,
|
|
131
|
+
) -> TestCaseWithConfidence:
|
|
132
|
+
"""Compute the full confidence score using the 8-parameter framework.
|
|
133
|
+
|
|
134
|
+
Pre-execution parameters (set here):
|
|
135
|
+
1. Contextual Relevance – steps mapped to req context
|
|
136
|
+
2. Hallucination Control – grounded vs invented entities
|
|
137
|
+
3. Bias/Fairness Control – persona/scenario type coverage
|
|
138
|
+
4. Business Rule Coverage – rules addressed by steps
|
|
139
|
+
5. Requirement Clarity – clarity of upstream requirement
|
|
140
|
+
6. Structural Quality – step completeness (action+data+expected)
|
|
141
|
+
|
|
142
|
+
Post-execution parameters (set by ExecutionValidationAgent / HealingAgent):
|
|
143
|
+
7. Maintainability – complexity + duplication (in ExecutionMetrics)
|
|
144
|
+
8. First-Pass Success – runtime result on first run (in ExecutionMetrics)
|
|
145
|
+
9. Reusability – registry-sourced vs new components (in ExecutionMetrics)
|
|
146
|
+
10. Flakiness – historical inconsistency rate (in ExecutionMetrics)
|
|
147
|
+
"""
|
|
148
|
+
dims = policy.confidence_dimensions
|
|
149
|
+
|
|
150
|
+
# ── Pre-Execution Dimensions ──────────────────────────────────────────────
|
|
151
|
+
|
|
152
|
+
# 1. Context Strength (informational, not weighted)
|
|
153
|
+
sources_found = sum([
|
|
154
|
+
source_report.jira_found,
|
|
155
|
+
source_report.confluence_found,
|
|
156
|
+
source_report.postgres_kb_found,
|
|
157
|
+
source_report.igel_os12_docs_found,
|
|
158
|
+
])
|
|
159
|
+
context_strength = min(1.0, sources_found / 4.0)
|
|
160
|
+
|
|
161
|
+
# 2. Contextual Relevance
|
|
162
|
+
contextual_relevance = compute_contextual_relevance(tc, scenario)
|
|
163
|
+
|
|
164
|
+
# 3. Hallucination Control (replaces evidence_quality)
|
|
165
|
+
hallucination_control = compute_hallucination_control(tc, resolved_context)
|
|
166
|
+
|
|
167
|
+
# 4. Bias/Fairness Control (replaces scenario_coverage)
|
|
168
|
+
bias_fairness_control = compute_bias_fairness_control(tc, scenario)
|
|
169
|
+
|
|
170
|
+
# 5. Business Rule Coverage
|
|
171
|
+
business_rule_coverage = compute_business_rule_coverage(tc, scenario)
|
|
172
|
+
|
|
173
|
+
# 6. Requirement Clarity
|
|
174
|
+
requirement_clarity = compute_requirement_clarity(scenario, source_report)
|
|
175
|
+
|
|
176
|
+
# 7. Structural Quality
|
|
177
|
+
struct_ok, _ = validate_structural(tc, scenario)
|
|
178
|
+
structural_quality = evaluate_completeness(tc) if struct_ok else 0.0
|
|
179
|
+
|
|
180
|
+
# ── Weighted Final Score ──────────────────────────────────────────────────
|
|
181
|
+
# Weights pulled from policy dimensions; field names updated to match new params
|
|
182
|
+
total = (
|
|
183
|
+
contextual_relevance * getattr(dims, "contextual_relevance", 0.25) +
|
|
184
|
+
hallucination_control * getattr(dims, "hallucination_control", 0.20) +
|
|
185
|
+
bias_fairness_control * getattr(dims, "bias_fairness_control", 0.15) +
|
|
186
|
+
business_rule_coverage * getattr(dims, "business_rule_coverage", 0.15) +
|
|
187
|
+
requirement_clarity * getattr(dims, "requirement_clarity", 0.15) +
|
|
188
|
+
structural_quality * getattr(dims, "structural_quality", 0.10)
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
metrics = ConfidenceMetrics(
|
|
192
|
+
context_strength=context_strength,
|
|
193
|
+
requirement_clarity=requirement_clarity,
|
|
194
|
+
hallucination_control=hallucination_control,
|
|
195
|
+
business_rule_coverage=business_rule_coverage,
|
|
196
|
+
contextual_relevance=contextual_relevance,
|
|
197
|
+
bias_fairness_control=bias_fairness_control,
|
|
198
|
+
structural_quality=structural_quality,
|
|
199
|
+
final_confidence=round(total, 4),
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
tc.confidence_score = total
|
|
203
|
+
tc.confidence_metrics = metrics.model_dump() if hasattr(metrics, "model_dump") else metrics.dict()
|
|
204
|
+
|
|
205
|
+
bands = policy.confidence_bands
|
|
206
|
+
is_approved = total >= bands.auto_approved
|
|
207
|
+
|
|
208
|
+
if not is_approved:
|
|
209
|
+
logger.info(
|
|
210
|
+
"Test case %s needs review (score: %.2f | contextual_relevance=%.2f, hallucination=%.2f, bias=%.2f)",
|
|
211
|
+
tc.tc_reference, total, contextual_relevance, hallucination_control, bias_fairness_control,
|
|
212
|
+
)
|
|
213
|
+
else:
|
|
214
|
+
logger.info("Test case %s auto-approved (score: %.2f)", tc.tc_reference, total)
|
|
215
|
+
|
|
216
|
+
return TestCaseWithConfidence(
|
|
217
|
+
test_case=tc,
|
|
218
|
+
confidence=metrics,
|
|
219
|
+
is_approved=is_approved,
|
|
220
|
+
)
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import ast
|
|
2
|
+
import logging
|
|
3
|
+
import subprocess
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from typing import Tuple, Set
|
|
6
|
+
|
|
7
|
+
from src.db.client import get_conn
|
|
8
|
+
from src.models.test_requirement import ExecutionMetrics
|
|
9
|
+
|
|
10
|
+
logger = logging.getLogger(__name__)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# ── Static Complexity Analyser (lightweight, no external deps) ─────────────────
|
|
14
|
+
|
|
15
|
+
def _compute_cyclomatic_complexity(tree: ast.Module) -> int:
|
|
16
|
+
"""Count decision points to approximate cyclomatic complexity.
|
|
17
|
+
|
|
18
|
+
Counts: if/elif/for/while/try/except/with/assert branches.
|
|
19
|
+
Complexity = 1 + decision_points (baseline 1 per function).
|
|
20
|
+
"""
|
|
21
|
+
decision_nodes = (
|
|
22
|
+
ast.If, ast.For, ast.While, ast.Try,
|
|
23
|
+
ast.ExceptHandler, ast.With, ast.Assert,
|
|
24
|
+
)
|
|
25
|
+
return sum(1 for _ in ast.walk(tree) if isinstance(_, decision_nodes))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _compute_duplication_score(code: str) -> float:
|
|
29
|
+
"""Approximate duplication score by detecting repeated non-trivial line blocks.
|
|
30
|
+
|
|
31
|
+
Returns a 0-100 score where 0 = no duplication, 100 = fully duplicated.
|
|
32
|
+
"""
|
|
33
|
+
lines = [l.strip() for l in code.splitlines() if l.strip() and not l.strip().startswith("#")]
|
|
34
|
+
if not lines:
|
|
35
|
+
return 0.0
|
|
36
|
+
seen: dict[str, int] = {}
|
|
37
|
+
for line in lines:
|
|
38
|
+
seen[line] = seen.get(line, 0) + 1
|
|
39
|
+
duplicated = sum(count - 1 for count in seen.values() if count > 1)
|
|
40
|
+
return round(min(100.0, (duplicated / len(lines)) * 100), 2)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _count_style_violations(code: str) -> int:
|
|
44
|
+
"""Count basic style violations (magic numbers, overly long lines, missing docstrings).
|
|
45
|
+
|
|
46
|
+
Each violation adds to the Maintainability penalty.
|
|
47
|
+
"""
|
|
48
|
+
violations = 0
|
|
49
|
+
for line in code.splitlines():
|
|
50
|
+
if len(line) > 120:
|
|
51
|
+
violations += 1
|
|
52
|
+
# Detect magic numbers not assigned to a variable
|
|
53
|
+
import re
|
|
54
|
+
if re.search(r"\b(?<![\w=])\d{2,}\b", line) and "=" not in line:
|
|
55
|
+
violations += 1
|
|
56
|
+
return violations
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def compute_maintainability(code: str) -> Tuple[float, float, float, int]:
|
|
60
|
+
"""Maintainability — Ease of modifying and understanding generated scripts.
|
|
61
|
+
|
|
62
|
+
Formula: 100 – ((Complexity Score + Duplication Score + Violations) / Max Score × 100)
|
|
63
|
+
Returns: (maintainability_score 0-1, complexity_raw, duplication_raw, violations_count)
|
|
64
|
+
"""
|
|
65
|
+
try:
|
|
66
|
+
tree = ast.parse(code)
|
|
67
|
+
except SyntaxError:
|
|
68
|
+
return 0.0, 0.0, 0.0, 0
|
|
69
|
+
|
|
70
|
+
complexity = _compute_cyclomatic_complexity(tree)
|
|
71
|
+
duplication = _compute_duplication_score(code)
|
|
72
|
+
violations = _count_style_violations(code)
|
|
73
|
+
|
|
74
|
+
# Normalise each sub-score to 0-100 range (caps prevent extreme values)
|
|
75
|
+
MAX_COMPLEXITY = 50.0 # treat 50+ branches as worst case
|
|
76
|
+
MAX_VIOLATIONS = 30.0 # treat 30+ violations as worst case
|
|
77
|
+
|
|
78
|
+
complexity_norm = min(100.0, (complexity / MAX_COMPLEXITY) * 100)
|
|
79
|
+
violation_norm = min(100.0, (violations / MAX_VIOLATIONS) * 100)
|
|
80
|
+
|
|
81
|
+
# Formula (all three sub-scores weighted equally within their sum)
|
|
82
|
+
penalty = (complexity_norm + duplication + violation_norm) / 3.0
|
|
83
|
+
maintainability_pct = max(0.0, 100.0 - penalty)
|
|
84
|
+
maintainability_score = round(maintainability_pct / 100.0, 4)
|
|
85
|
+
|
|
86
|
+
return maintainability_score, round(complexity_norm, 2), round(duplication, 2), violations
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class ExecutionValidationAgent:
|
|
90
|
+
"""Multi-stage validation pipeline for generated automation scripts."""
|
|
91
|
+
|
|
92
|
+
def __init__(self, repo_path: Path):
|
|
93
|
+
self.repo_path = repo_path
|
|
94
|
+
|
|
95
|
+
# ── Validation Stages ─────────────────────────────────────────────────────
|
|
96
|
+
|
|
97
|
+
def validate_syntax(self, code: str) -> Tuple[bool, str]:
|
|
98
|
+
"""Stage 1: Check Python syntax."""
|
|
99
|
+
try:
|
|
100
|
+
ast.parse(code)
|
|
101
|
+
return True, ""
|
|
102
|
+
except SyntaxError as e:
|
|
103
|
+
return False, f"SyntaxError at line {e.lineno}: {e.msg}"
|
|
104
|
+
|
|
105
|
+
def _get_known_assets(self, asset_type: str) -> Set[str]:
|
|
106
|
+
"""Fetch all known assets of a specific type from the Asset Registry."""
|
|
107
|
+
assets: Set[str] = set()
|
|
108
|
+
try:
|
|
109
|
+
with get_conn() as conn:
|
|
110
|
+
with conn.cursor() as cur:
|
|
111
|
+
cur.execute(
|
|
112
|
+
"SELECT name FROM igel_asset_registry WHERE asset_type = %s",
|
|
113
|
+
(asset_type,),
|
|
114
|
+
)
|
|
115
|
+
for row in cur.fetchall():
|
|
116
|
+
assets.add(row[0])
|
|
117
|
+
except Exception as e:
|
|
118
|
+
logger.error("Failed to query registry for %s: %s", asset_type, e)
|
|
119
|
+
return assets
|
|
120
|
+
|
|
121
|
+
def validate_imports(self, code: str) -> Tuple[bool, str]:
|
|
122
|
+
"""Stage 2: Check if imported modules exist in the registry."""
|
|
123
|
+
try:
|
|
124
|
+
ast.parse(code)
|
|
125
|
+
except SyntaxError:
|
|
126
|
+
return False, "Syntax invalid, cannot check imports."
|
|
127
|
+
# Registry-aware import validation is advisory; non-blocking.
|
|
128
|
+
return True, ""
|
|
129
|
+
|
|
130
|
+
def validate_fixtures(self, code: str) -> Tuple[bool, str]:
|
|
131
|
+
"""Stage 3: Check if requested pytest fixtures exist."""
|
|
132
|
+
try:
|
|
133
|
+
tree = ast.parse(code)
|
|
134
|
+
except SyntaxError:
|
|
135
|
+
return False, "Syntax invalid, cannot check fixtures."
|
|
136
|
+
|
|
137
|
+
known_fixtures = self._get_known_assets("fixture")
|
|
138
|
+
missing = []
|
|
139
|
+
for node in ast.walk(tree):
|
|
140
|
+
if isinstance(node, ast.FunctionDef) and node.name.startswith("test_"):
|
|
141
|
+
for arg in node.args.args:
|
|
142
|
+
arg_name = arg.arg
|
|
143
|
+
if arg_name not in {"request", "monkeypatch", "capsys", "tmpdir", "self", "cls"}:
|
|
144
|
+
if known_fixtures and arg_name not in known_fixtures:
|
|
145
|
+
missing.append(
|
|
146
|
+
f"Fixture '{arg_name}' requested by {node.name} not found in registry."
|
|
147
|
+
)
|
|
148
|
+
if missing:
|
|
149
|
+
return False, "\n".join(missing)
|
|
150
|
+
return True, ""
|
|
151
|
+
|
|
152
|
+
def validate_pytest_collection(self, file_path: Path) -> Tuple[bool, str]:
|
|
153
|
+
"""Stage 4: Perform a pytest dry-run (collection only)."""
|
|
154
|
+
if not file_path.exists():
|
|
155
|
+
return False, f"File {file_path} does not exist."
|
|
156
|
+
try:
|
|
157
|
+
result = subprocess.run(
|
|
158
|
+
["pytest", "--collect-only", str(file_path)],
|
|
159
|
+
capture_output=True,
|
|
160
|
+
text=True,
|
|
161
|
+
cwd=str(self.repo_path),
|
|
162
|
+
)
|
|
163
|
+
if result.returncode == 5:
|
|
164
|
+
return False, "Pytest collected 0 tests."
|
|
165
|
+
if result.returncode != 0:
|
|
166
|
+
return False, f"Pytest collection failed:\n{result.stderr or result.stdout}"
|
|
167
|
+
return True, ""
|
|
168
|
+
except Exception as e:
|
|
169
|
+
return False, f"Error running pytest collection: {e}"
|
|
170
|
+
|
|
171
|
+
# ── Main Pipeline ─────────────────────────────────────────────────────────
|
|
172
|
+
|
|
173
|
+
def validate_pipeline(self, code: str, file_path: Path) -> Tuple[bool, str, str, ExecutionMetrics]:
|
|
174
|
+
"""Run all execution validation stages and compute ExecutionMetrics.
|
|
175
|
+
|
|
176
|
+
Returns: (passed: bool, status: str, error_msg: str, ExecutionMetrics)
|
|
177
|
+
|
|
178
|
+
ExecutionMetrics computed here:
|
|
179
|
+
- Maintainability – AST-based complexity/duplication formula
|
|
180
|
+
- First-Pass Success – whether collection + syntax pass on first attempt
|
|
181
|
+
- Reusability – populated by automation_design_agent (passed in plan)
|
|
182
|
+
- Flakiness – historical; placeholder (0.0) until HealingAgent populates
|
|
183
|
+
"""
|
|
184
|
+
logger.info("Starting execution validation pipeline for %s", file_path)
|
|
185
|
+
|
|
186
|
+
# ── Maintainability (always computed, even if later stages fail) ──────
|
|
187
|
+
maintainability, complexity_norm, duplication, violations = compute_maintainability(code)
|
|
188
|
+
|
|
189
|
+
ok, err = self.validate_syntax(code)
|
|
190
|
+
if not ok:
|
|
191
|
+
exec_metrics = ExecutionMetrics(
|
|
192
|
+
maintainability_score=maintainability,
|
|
193
|
+
complexity_score=complexity_norm,
|
|
194
|
+
duplication_score=duplication,
|
|
195
|
+
violations_count=violations,
|
|
196
|
+
first_pass_success=False,
|
|
197
|
+
)
|
|
198
|
+
return False, "syntax_failed", err, exec_metrics
|
|
199
|
+
|
|
200
|
+
ok, err = self.validate_imports(code)
|
|
201
|
+
if not ok:
|
|
202
|
+
exec_metrics = ExecutionMetrics(
|
|
203
|
+
maintainability_score=maintainability,
|
|
204
|
+
complexity_score=complexity_norm,
|
|
205
|
+
duplication_score=duplication,
|
|
206
|
+
violations_count=violations,
|
|
207
|
+
first_pass_success=False,
|
|
208
|
+
)
|
|
209
|
+
return False, "import_failed", err, exec_metrics
|
|
210
|
+
|
|
211
|
+
ok, err = self.validate_fixtures(code)
|
|
212
|
+
if not ok:
|
|
213
|
+
exec_metrics = ExecutionMetrics(
|
|
214
|
+
maintainability_score=maintainability,
|
|
215
|
+
complexity_score=complexity_norm,
|
|
216
|
+
duplication_score=duplication,
|
|
217
|
+
violations_count=violations,
|
|
218
|
+
first_pass_success=False,
|
|
219
|
+
)
|
|
220
|
+
return False, "fixture_failed", err, exec_metrics
|
|
221
|
+
|
|
222
|
+
ok, err = self.validate_pytest_collection(file_path)
|
|
223
|
+
if not ok:
|
|
224
|
+
exec_metrics = ExecutionMetrics(
|
|
225
|
+
maintainability_score=maintainability,
|
|
226
|
+
complexity_score=complexity_norm,
|
|
227
|
+
duplication_score=duplication,
|
|
228
|
+
violations_count=violations,
|
|
229
|
+
first_pass_success=False,
|
|
230
|
+
)
|
|
231
|
+
return False, "collection_failed", err, exec_metrics
|
|
232
|
+
|
|
233
|
+
# All stages passed → First-Pass Success = True
|
|
234
|
+
exec_metrics = ExecutionMetrics(
|
|
235
|
+
maintainability_score=maintainability,
|
|
236
|
+
complexity_score=complexity_norm,
|
|
237
|
+
duplication_score=duplication,
|
|
238
|
+
violations_count=violations,
|
|
239
|
+
first_pass_success=True,
|
|
240
|
+
# reusability_score injected by caller from AutomationPlan.reusability_score
|
|
241
|
+
# flakiness_score injected by HealingAgent over time
|
|
242
|
+
)
|
|
243
|
+
logger.info(
|
|
244
|
+
"Execution validation passed for %s | maintainability=%.2f, first_pass=True",
|
|
245
|
+
file_path, maintainability,
|
|
246
|
+
)
|
|
247
|
+
return True, "passed", "", exec_metrics
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import logging
|
|
3
3
|
from typing import Dict, Any, Optional
|
|
4
|
-
from
|
|
4
|
+
from src.db.client import get_conn
|
|
5
5
|
|
|
6
6
|
logger = logging.getLogger(__name__)
|
|
7
7
|
|
|
@@ -39,22 +39,51 @@ class FeedbackAgent:
|
|
|
39
39
|
"""Alias for capture_feedback for CLI compatibility."""
|
|
40
40
|
return self.capture_feedback(level, target_id, feedback_type, user_comment, corrected_data)
|
|
41
41
|
|
|
42
|
-
def get_feedback_for_target(self, target_id: str) -> list:
|
|
43
|
-
"""Retrieve historical feedback for a specific target to use as generation context.
|
|
42
|
+
def get_feedback_for_target(self, target_id: str, limit: int = 5, max_chars: int = 800) -> list:
|
|
43
|
+
"""Retrieve historical feedback for a specific target to use as generation context.
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
target_id: The target entity ID (requirement key, test case ID, etc.)
|
|
47
|
+
limit: Maximum number of feedback items to return (default 5).
|
|
48
|
+
max_chars: Hard cap on total combined character length of all returned
|
|
49
|
+
user_comment fields (default 800). Items are included in
|
|
50
|
+
descending ID order and truncated once the cap is reached.
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
List of feedback dicts, each with keys: type, comment, corrected_data.
|
|
54
|
+
Total len(item["comment"]) across all items ≤ max_chars.
|
|
55
|
+
"""
|
|
44
56
|
feedback = []
|
|
45
57
|
try:
|
|
46
58
|
with get_conn() as conn:
|
|
47
59
|
with conn.cursor() as cur:
|
|
48
60
|
cur.execute(
|
|
49
|
-
"
|
|
50
|
-
|
|
61
|
+
"""
|
|
62
|
+
SELECT feedback_type, user_comment, corrected_data
|
|
63
|
+
FROM igel_granular_feedback
|
|
64
|
+
WHERE target_id = %s
|
|
65
|
+
ORDER BY id DESC
|
|
66
|
+
LIMIT %s
|
|
67
|
+
""",
|
|
68
|
+
(target_id, limit),
|
|
51
69
|
)
|
|
70
|
+
total_chars = 0
|
|
52
71
|
for row in cur.fetchall():
|
|
72
|
+
comment = row[1] or ""
|
|
73
|
+
if total_chars + len(comment) > max_chars:
|
|
74
|
+
# Truncate comment to fit within the budget
|
|
75
|
+
remaining = max_chars - total_chars
|
|
76
|
+
if remaining <= 0:
|
|
77
|
+
break
|
|
78
|
+
comment = comment[:remaining]
|
|
53
79
|
feedback.append({
|
|
54
80
|
"type": row[0],
|
|
55
|
-
"comment":
|
|
56
|
-
"corrected_data": row[2]
|
|
81
|
+
"comment": comment,
|
|
82
|
+
"corrected_data": row[2],
|
|
57
83
|
})
|
|
84
|
+
total_chars += len(comment)
|
|
85
|
+
if total_chars >= max_chars:
|
|
86
|
+
break
|
|
58
87
|
except Exception as e:
|
|
59
88
|
logger.error(f"Failed to get feedback: {e}")
|
|
60
89
|
return feedback
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Framework Analyzer Agent.
|
|
2
|
+
|
|
3
|
+
Consumes a diff/impact scope package and performs scoped framework analysis.
|
|
4
|
+
This is intentionally scope-limited to avoid full repository rescans.
|
|
5
|
+
"""
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
import logging
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
from typing import Iterable
|
|
11
|
+
|
|
12
|
+
from src.agents.regression_agent import BitbucketSyncAgent
|
|
13
|
+
|
|
14
|
+
logger = logging.getLogger(__name__)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class FrameworkAnalyzerAgent:
|
|
18
|
+
"""Analyze only impacted files and update framework registries."""
|
|
19
|
+
|
|
20
|
+
def __init__(self, repo_path: Path):
|
|
21
|
+
self.repo_path = repo_path
|
|
22
|
+
self._sync = BitbucketSyncAgent(repo_path)
|
|
23
|
+
|
|
24
|
+
def analyze_scope(self, analysis_targets: Iterable[Path]) -> dict:
|
|
25
|
+
targets = []
|
|
26
|
+
for t in analysis_targets:
|
|
27
|
+
p = Path(t)
|
|
28
|
+
full = p if p.is_absolute() else (self.repo_path / p)
|
|
29
|
+
if full.exists():
|
|
30
|
+
targets.append(full)
|
|
31
|
+
|
|
32
|
+
indexed_assets = self._sync.sync_changed_files(targets)
|
|
33
|
+
logger.info(
|
|
34
|
+
"FrameworkAnalyzer: targets=%d indexed_assets=%d",
|
|
35
|
+
len(targets),
|
|
36
|
+
indexed_assets,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
"analysis_targets_count": len(targets),
|
|
41
|
+
"indexed_assets": indexed_assets,
|
|
42
|
+
"analysis_targets": [str(p.relative_to(self.repo_path)) for p in targets],
|
|
43
|
+
}
|
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
|
|
4
4
|
import re
|
|
5
5
|
|
|
6
|
-
from
|
|
6
|
+
from src.agents.state import AgenticState
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def fusion_agent(state: AgenticState) -> AgenticState:
|
|
@@ -29,7 +29,7 @@ def fusion_agent(state: AgenticState) -> AgenticState:
|
|
|
29
29
|
conflicts: list[dict] = list(kg.get("conflicts") or [])
|
|
30
30
|
if not conflicts and rag:
|
|
31
31
|
try:
|
|
32
|
-
from
|
|
32
|
+
from src.core.precedence import detect_precedence_conflicts
|
|
33
33
|
pseudo = []
|
|
34
34
|
for i, chunk in enumerate(rag[:8]):
|
|
35
35
|
pseudo.append(type("R", (), {
|
|
@@ -71,7 +71,7 @@ def fusion_agent(state: AgenticState) -> AgenticState:
|
|
|
71
71
|
# LLM-assisted context quality when heuristic score is low
|
|
72
72
|
if quality < 0.5 and rag:
|
|
73
73
|
try:
|
|
74
|
-
from
|
|
74
|
+
from src.generation.test_generator import _call_gpt
|
|
75
75
|
sample = "\n".join(c.get("content", "")[:200] for c in rag[:3])
|
|
76
76
|
verdict = _call_gpt(
|
|
77
77
|
"Rate context relevance 0-1 for IGEL test generation. Reply with number only.",
|
|
@@ -5,16 +5,16 @@ import logging
|
|
|
5
5
|
import time
|
|
6
6
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
8
|
+
from src.agents.fusion_agent import fusion_agent
|
|
9
|
+
from src.agents.intent_agent import intent_agent
|
|
10
|
+
from src.agents.kg_agent import kg_agent
|
|
11
|
+
from src.agents.memory_agent import memory_agent
|
|
12
|
+
from src.agents.reflection_agent import reflection_agent, should_loop_back
|
|
13
|
+
from src.agents.retrieval_agent import retrieval_agent
|
|
14
|
+
from src.agents.script_agent import script_agent
|
|
15
|
+
from src.agents.state import AgenticState, initial_state
|
|
16
|
+
from src.agents.temporal_agent import temporal_agent
|
|
17
|
+
from src.agents.validation_agent import validation_agent
|
|
18
18
|
|
|
19
19
|
logger = logging.getLogger(__name__)
|
|
20
20
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"""Healing agent — Phase 7."""
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
4
|
+
from src.config import cfg
|
|
5
|
+
from src.memory.cognee_client import get_cognee_client
|
|
6
|
+
from src.memory.memory_types import MemoryType
|
|
7
|
+
from src.generation.test_generator import _call_gpt
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def propose_fix(test_id: str, flaky_history: list[dict] | None = None) -> dict:
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""Intent classification agent — unified via IntentService."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from src.agents.state import AgenticState
|
|
5
|
+
from src.core.intent_service import IntentService
|
|
6
|
+
|
|
7
|
+
_intent_service = IntentService()
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def intent_agent(state: AgenticState) -> AgenticState:
|
|
11
|
+
query = state.get("query", "")
|
|
12
|
+
classified = _intent_service.classify(query)
|
|
13
|
+
intent = classified.intent
|
|
14
|
+
feature = classified.feature_area
|
|
15
|
+
version_scope = classified.version_scope
|
|
16
|
+
categories = classified.query_categories
|
|
17
|
+
|
|
18
|
+
state["intent"] = intent
|
|
19
|
+
state["feature_area"] = feature
|
|
20
|
+
state["version_scope"] = version_scope
|
|
21
|
+
state["query_categories"] = categories
|
|
22
|
+
state.setdefault("agent_trace", []).append({
|
|
23
|
+
"agent": "IntentAgent",
|
|
24
|
+
"status": "complete",
|
|
25
|
+
"intent": intent,
|
|
26
|
+
"feature_area": feature,
|
|
27
|
+
"version_scope": version_scope,
|
|
28
|
+
"query_categories": categories,
|
|
29
|
+
})
|
|
30
|
+
return state
|