diff --git a/.axiom/axiom_config.yaml b/.axiom/axiom_config.yaml index b3bedbef..e6057960 100644 --- a/.axiom/axiom_config.yaml +++ b/.axiom/axiom_config.yaml @@ -217,6 +217,7 @@ tags: # ---------------------------------------------------------- TEST_CONTRACT: type: string + multiline: true description: "Тестовый контракт: Input -> Output" contract_types: - Function @@ -224,6 +225,7 @@ tags: TEST_SCENARIO: type: string + multiline: true description: "Тестовый сценарий: Название -> Ожидание" contract_types: - Function @@ -231,12 +233,14 @@ tags: TEST_FIXTURE: type: string + multiline: true description: "Тестовая фикстура: Название -> file:[path] | INLINE_JSON" contract_types: - Block TEST_EDGE: type: string + multiline: true description: "Граничный случай: Название -> Сбой" contract_types: - Function @@ -244,6 +248,7 @@ tags: TEST_INVARIANT: type: string + multiline: true description: "Тестовый инвариант: Имя -> VERIFIED_BY: [scenarios]" contract_types: - Module diff --git a/.axiom/semantic_index/index.duckdb b/.axiom/semantic_index/index.duckdb index dfd34b6d..03faf052 100644 Binary files a/.axiom/semantic_index/index.duckdb and b/.axiom/semantic_index/index.duckdb differ diff --git a/.kilocode/mcp.json b/.kilocode/mcp.json index b4505828..30d26411 100644 --- a/.kilocode/mcp.json +++ b/.kilocode/mcp.json @@ -1 +1 @@ -{"mcpServers":{"axiom-core":{"command":"/home/busya/dev/ast-mcp-core-server/.venv/bin/python","args":["-c","from src.server import main; main()"],"env":{"PYTHONPATH":"/home/busya/dev/ast-mcp-core-server"},"alwaysAllow":["read_grace_outline_tool","ast_search_tool","get_semantic_context_tool","build_task_context_tool","diff_contract_semantics_tool","simulate_patch_tool","patch_contract_tool","rename_contract_id_tool","move_contract_tool","extract_contract_tool","infer_missing_relations_tool","map_runtime_trace_to_contracts_tool","scaffold_contract_tests_tool","search_contracts_tool","reindex_workspace_tool","prune_contract_metadata_tool","workspace_semantic_health_tool","trace_tests_for_contract_tool","guarded_patch_contract_tool","impact_analysis_tool","wrap_node_in_contract_tool","rename_semantic_tag_tool","scan_vulnerabilities","find_contract_tool","safe_patch_tool","run_workspace_command_tool","rebuild_workspace_semantic_index_tool","audit_contracts_tool","update_contract_metadata_tool","rebuild_workspace_semantic_index"]},"chrome-devtools":{"command":"npx","args":["chrome-devtools-mcp@latest","--browser-url=http://127.0.0.1:9222"],"disabled":false,"alwaysAllow":["take_snapshot"]}}} \ No newline at end of file +{"mcpServers":{"axiom-core":{"command":"/home/busya/dev/ast-mcp-core-server/.venv/bin/python","args":["-c","from src.server import main; main()"],"env":{"PYTHONPATH":"/home/busya/dev/ast-mcp-core-server"},"alwaysAllow":["read_grace_outline_tool","ast_search_tool","get_semantic_context_tool","build_task_context_tool","diff_contract_semantics_tool","simulate_patch_tool","patch_contract_tool","rename_contract_id_tool","move_contract_tool","extract_contract_tool","infer_missing_relations_tool","map_runtime_trace_to_contracts_tool","scaffold_contract_tests_tool","search_contracts_tool","reindex_workspace_tool","prune_contract_metadata_tool","workspace_semantic_health_tool","trace_tests_for_contract_tool","guarded_patch_contract_tool","impact_analysis_tool","wrap_node_in_contract_tool","rename_semantic_tag_tool","scan_vulnerabilities","find_contract_tool","safe_patch_tool","run_workspace_command_tool","rebuild_workspace_semantic_index_tool","audit_contracts_tool","update_contract_metadata_tool","rebuild_workspace_semantic_index","audit_belief_protocol_tool","patch_belief_protocol_tool"]},"chrome-devtools":{"command":"npx","args":["chrome-devtools-mcp@latest","--browser-url=http://127.0.0.1:9222"],"disabled":false,"alwaysAllow":["take_snapshot"]}}} \ No newline at end of file diff --git a/backend/src/core/migration/__init__.py b/backend/src/core/migration/__init__.py index bb9644c4..2d7b3d8b 100644 --- a/backend/src/core/migration/__init__.py +++ b/backend/src/core/migration/__init__.py @@ -1,8 +1,4 @@ # [DEF:MigrationPackage:Module] -# @COMPLEXITY: 1 -# @SEMANTICS: migration, package, exports -# @PURPOSE: Namespace package for migration pre-flight orchestration components. -# @LAYER: Core from .dry_run_orchestrator import MigrationDryRunService from .archive_parser import MigrationArchiveParser diff --git a/backend/src/core/task_manager/__init__.py b/backend/src/core/task_manager/__init__.py index b2bb5be8..33384e85 100644 --- a/backend/src/core/task_manager/__init__.py +++ b/backend/src/core/task_manager/__init__.py @@ -1,12 +1,4 @@ # [DEF:TaskManagerPackage:Module] -# @COMPLEXITY: 1 -# @SEMANTICS: task, manager, package, exports -# @PURPOSE: Exports the public API of the task manager package. -# @LAYER: Core -# @RELATION: DEPENDS_ON ->[TaskManagerModels] -# @RELATION: DEPENDS_ON ->[TaskManagerModule] -# @RELATION: DEPENDS_ON ->[TaskManager] -# @INVARIANT: Package exports stay aligned with manager and models contracts. from .models import Task, TaskStatus, LogEntry from .manager import TaskManager diff --git a/backend/src/core/task_manager/models.py b/backend/src/core/task_manager/models.py index e17dcaa7..aeff33d9 100644 --- a/backend/src/core/task_manager/models.py +++ b/backend/src/core/task_manager/models.py @@ -19,9 +19,6 @@ from pydantic import BaseModel, Field # [DEF:TaskStatus:Enum] -# @COMPLEXITY: 1 -# @SEMANTICS: task, status, state, enum -# @PURPOSE: Defines the possible states a task can be in during its lifecycle. class TaskStatus(str, Enum): PENDING = "PENDING" RUNNING = "RUNNING" @@ -35,11 +32,6 @@ class TaskStatus(str, Enum): # [DEF:LogLevel:Enum] -# @SEMANTICS: log, level, severity, enum -# @PURPOSE: Defines the possible log levels for task logging. -# @COMPLEXITY: 1 -# @RELATION: [DEPENDS_ON] -> [LogEntry] -# @RELATION: [USED_BY] -> [TaskLogger] class LogLevel(str, Enum): DEBUG = "DEBUG" INFO = "INFO" @@ -51,20 +43,13 @@ class LogLevel(str, Enum): # [DEF:LogEntry:Class] -# @SEMANTICS: log, entry, record, pydantic # @PURPOSE: A Pydantic model representing a single, structured log entry associated with a task. # @COMPLEXITY: 2 -# @RELATION: [DEPENDS_ON] -> [LogLevel] -# @RELATION: [DEPENDS_ON] -> [Task] -# @INVARIANT: Each log entry has a unique timestamp and source. # -# @TEST_CONTRACT: LogEntryModel -> # { # required_fields: {message: str}, # optional_fields: {timestamp: datetime, level: str, source: str, context: dict, metadata: dict} # } -# @TEST_FIXTURE: valid_log_entry -> {"message": "Plugin initialized"} -# @TEST_EDGE: empty_message -> {"message": ""} class LogEntry(BaseModel): timestamp: datetime = Field(default_factory=datetime.utcnow) level: str = Field(default="INFO") @@ -105,10 +90,6 @@ class TaskLog(BaseModel): # [DEF:LogFilter:Class] -# @SEMANTICS: log, filter, query, pydantic -# @PURPOSE: Filter parameters for querying task logs. -# @COMPLEXITY: 1 -# @RELATION: [DEPENDS_ON] -> [TaskManager] class LogFilter(BaseModel): level: Optional[str] = None # Filter by log level source: Optional[str] = None # Filter by source component diff --git a/backend/src/models/git.py b/backend/src/models/git.py index f7cbd474..f30a6008 100644 --- a/backend/src/models/git.py +++ b/backend/src/models/git.py @@ -1,9 +1,4 @@ # [DEF:GitModels:Module] -# @COMPLEXITY: 1 -# @SEMANTICS: git, models, sqlalchemy, database, schema -# @PURPOSE: Git-specific SQLAlchemy models for configuration and repository tracking. -# @LAYER: Model -# @RELATION: specs/011-git-integration-dashboard/data-model.md import enum from datetime import datetime diff --git a/backend/src/models/storage.py b/backend/src/models/storage.py index c67f1b1d..1f223e7f 100644 --- a/backend/src/models/storage.py +++ b/backend/src/models/storage.py @@ -1,8 +1,4 @@ # [DEF:StorageModels:Module] -# @COMPLEXITY: 1 -# @SEMANTICS: storage, file, model, pydantic -# @PURPOSE: Data models for the storage system. -# @LAYER: Domain from datetime import datetime from enum import Enum diff --git a/backend/src/plugins/llm_analysis/__init__.py b/backend/src/plugins/llm_analysis/__init__.py index fd678af2..4064146c 100644 --- a/backend/src/plugins/llm_analysis/__init__.py +++ b/backend/src/plugins/llm_analysis/__init__.py @@ -1,7 +1,4 @@ # [DEF:backend/src/plugins/llm_analysis/__init__.py:Module] -# @COMPLEXITY: 1 -# @PURPOSE: Initialize the LLM Analysis plugin package. -# @LAYER: Domain """ LLM Analysis Plugin for automated dashboard validation and dataset documentation. diff --git a/backend/src/services/__init__.py b/backend/src/services/__init__.py index 7b9ce14c..06d50838 100644 --- a/backend/src/services/__init__.py +++ b/backend/src/services/__init__.py @@ -1,9 +1,6 @@ # [DEF:services:Module] # @COMPLEXITY: 2 -# @SEMANTICS: services, package, init # @PURPOSE: Package initialization for services module -# @LAYER: Core -# @RELATION: EXPORTS -> resource_service, mapping_service # @NOTE: Only export services that don't cause circular imports # @NOTE: GitService, AuthService, LLMProviderService have circular import issues - import directly when needed diff --git a/backend/src/services/rbac_permission_catalog.py b/backend/src/services/rbac_permission_catalog.py index 6736e292..7f858a86 100644 --- a/backend/src/services/rbac_permission_catalog.py +++ b/backend/src/services/rbac_permission_catalog.py @@ -1,12 +1,7 @@ # [DEF:rbac_permission_catalog:Module] # # @COMPLEXITY: 2 -# @SEMANTICS: rbac, permissions, catalog, sync, discovery # @PURPOSE: Discovers declared RBAC permissions from API routes/plugins and synchronizes them into auth database. -# @LAYER: Service -# @RELATION: CALLS -> backend.src.core.plugin_loader.PluginLoader.get_all_plugin_configs -# @RELATION: DEPENDS_ON -> backend.src.models.auth.Permission -# @INVARIANT: Synchronization is idempotent for existing (resource, action) permission pairs. # [SECTION: IMPORTS] import re diff --git a/backend/src/services/reports/type_profiles.py b/backend/src/services/reports/type_profiles.py index 41e723de..a6b01f23 100644 --- a/backend/src/services/reports/type_profiles.py +++ b/backend/src/services/reports/type_profiles.py @@ -1,12 +1,6 @@ # [DEF:type_profiles:Module] # @COMPLEXITY: 2 -# @SEMANTICS: reports, type_profiles, normalization, fallback # @PURPOSE: Deterministic mapping of plugin/task identifiers to canonical report task types and fallback profile metadata. -# @LAYER: Domain -# @RELATION: [DEPENDS_ON] ->[TaskType] -# @RELATION: [CONTAINS] ->[resolve_task_type] -# @RELATION: [CONTAINS] ->[get_type_profile] -# @INVARIANT: Unknown input always resolves to TaskType.UNKNOWN with a single fallback profile. # [SECTION: IMPORTS] from typing import Any, Dict, Optional diff --git a/frontend/src/lib/components/reports/reportTypeProfiles.js b/frontend/src/lib/components/reports/reportTypeProfiles.js index c9df430d..46776757 100644 --- a/frontend/src/lib/components/reports/reportTypeProfiles.js +++ b/frontend/src/lib/components/reports/reportTypeProfiles.js @@ -1,10 +1,6 @@ // [DEF:ReportTypeProfiles:Module] // @COMPLEXITY: 2 -// @SEMANTICS: reports, ui, profiles, fallback, mapping // @PURPOSE: Deterministic mapping from report task_type to visual profile with one fallback. -// @LAYER: UI -// @RELATION: DEPENDS_ON -> [i18n] -// @INVARIANT: Unknown type always resolves to fallback profile. import { _ } from '$lib/i18n'; diff --git a/frontend/src/lib/stores/__tests__/test_activity.js b/frontend/src/lib/stores/__tests__/test_activity.js index df793281..04520cb9 100644 --- a/frontend/src/lib/stores/__tests__/test_activity.js +++ b/frontend/src/lib/stores/__tests__/test_activity.js @@ -1,7 +1,6 @@ // [DEF:ActivityTest:Module] // @COMPLEXITY: 3 // @PURPOSE: Unit tests for activity store -// @LAYER: UI // @RELATION: DEPENDS_ON -> [activity] // @RELATION: DEPENDS_ON -> [taskDrawer] diff --git a/frontend/src/lib/stores/assistantChat.js b/frontend/src/lib/stores/assistantChat.js index f48a25e1..360c2214 100644 --- a/frontend/src/lib/stores/assistantChat.js +++ b/frontend/src/lib/stores/assistantChat.js @@ -1,13 +1,8 @@ // [DEF:assistantChat:Store] // @COMPLEXITY: 3 -// @SEMANTICS: assistant, store, ui-state, conversation // @PURPOSE: Control assistant chat panel visibility and active conversation binding. -// @LAYER: UI // @RELATION: BINDS_TO -> AssistantChatPanel -// @INVARIANT: conversationId persists while panel toggles unless explicitly reset. // -// @UX_STATE: Closed -> Panel hidden. -// @UX_STATE: Open -> Panel visible and interactive. import { writable } from 'svelte/store'; diff --git a/frontend/src/lib/stores/taskDrawer.js b/frontend/src/lib/stores/taskDrawer.js index a4f019a8..72a66b7e 100644 --- a/frontend/src/lib/stores/taskDrawer.js +++ b/frontend/src/lib/stores/taskDrawer.js @@ -2,14 +2,8 @@ // @RELATION: USES -> App // @COMPLEXITY: 3 // @PURPOSE: Manage Task Drawer visibility and resource-to-task mapping -// @LAYER: UI -// @INVARIANT: resourceTaskMap always reflects current task associations // -// @UX_STATE: Closed -> Drawer hidden, no active task -// @UX_STATE: Open -> Drawer visible, logs streaming -// @UX_STATE: InputRequired -> Interactive form rendered in drawer // -// @TEST_CONTRACT: TaskDrawerStore -> // { // required_fields: {isOpen: boolean, activeTaskId: string|null, resourceTaskMap: Object}, // invariants: [ @@ -19,8 +13,6 @@ // "Maintains mapping in resourceTaskMap correctly via updateResourceTask" // ] // } -// @TEST_FIXTURE: valid_store_state -> {"isOpen": true, "activeTaskId": "test_1", "resourceTaskMap": {"res1": {"taskId": "test_1", "status": "RUNNING"}}} -// @TEST_INVARIANT: state_management -> verifies: [valid_store_state] import { writable } from 'svelte/store';