refactor(semantics): migrate legacy @TIER to @COMPLEXITY annotations

- Replaced @TIER: TRIVIAL with @COMPLEXITY: 1
- Replaced @TIER: STANDARD with @COMPLEXITY: 3
- Replaced @TIER: CRITICAL with @COMPLEXITY: 5
- Manually elevated specific critical/complex components to levels 2 and 4
- Ignored legacy, specs, and node_modules directories
- Updated generated semantic map
This commit is contained in:
2026-03-16 10:06:44 +03:00
parent 7d8866f6ef
commit 67867f8220
321 changed files with 30101 additions and 58483 deletions

View File

@@ -1,7 +1,7 @@
<!-- [DEF:AssistantChatPanel:Component] -->
<script>
/**
* @TIER: CRITICAL
* @COMPLEXITY: 5
* @PURPOSE: Slide-out assistant chat panel for natural language command execution and task tracking.
* @LAYER: UI
* @RELATION: BINDS_TO -> assistantChatStore

View File

@@ -1,5 +1,5 @@
// [DEF:frontend.src.lib.components.assistant.__tests__.assistant_chat_integration:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: assistant, integration-test, ux-contract, i18n
// @PURPOSE: Contract-level integration checks for assistant chat panel implementation and localization wiring.
// @LAYER: UI Tests

View File

@@ -1,5 +1,5 @@
// [DEF:frontend.src.lib.components.assistant.__tests__.assistant_first_message_integration:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: assistant, integration-test, optimistic-message, conversation-race
// @PURPOSE: Verify first optimistic user message stays visible while a new conversation request is pending.
// @LAYER: UI Tests
@@ -121,7 +121,7 @@ vi.mock('$lib/i18n', () => ({
}));
// [DEF:assistant_first_message_tests:Function]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @PURPOSE: Guard optimistic first-message UX against history reload race in new conversation flow.
// @PRE: Assistant panel renders with open state and mocked network dependencies.
// @POST: First user message remains visible before pending send request resolves.

View File

@@ -1,6 +1,6 @@
<!-- [DEF:HealthMatrix:Component] -->
<!--
@TIER: STANDARD
@COMPLEXITY: 3
@PURPOSE: Visual grid/matrix representing the health status of dashboards.
@LAYER: UI/Component
@UX_STATE: Idle -> Displays the health matrix grid.

View File

@@ -1,6 +1,6 @@
<!-- [DEF:PolicyForm:Component] -->
<!--
@TIER: STANDARD
@COMPLEXITY: 3
@PURPOSE: Form for creating and editing validation policies.
@LAYER: UI/Component
@UX_STATE: Idle -> Displays the policy form.

View File

@@ -1,7 +1,7 @@
<!-- [DEF:Breadcrumbs:Component] -->
<script>
/**
* @TIER: STANDARD
* @COMPLEXITY: 3
* @PURPOSE: Display page hierarchy navigation
* @LAYER: UI
* @RELATION: DEPENDS_ON -> page store

View File

@@ -1,7 +1,7 @@
<!-- [DEF:Sidebar:Component] -->
<script>
/**
* @TIER: CRITICAL
* @COMPLEXITY: 5
* @PURPOSE: Persistent left sidebar with resource categories navigation
* @LAYER: UI
* @RELATION: BINDS_TO -> sidebarStore

View File

@@ -1,7 +1,7 @@
<!-- [DEF:TaskDrawer:Component] -->
<script>
/**
* @TIER: CRITICAL
* @COMPLEXITY: 5
* @PURPOSE: Global task drawer for monitoring background operations
* @LAYER: UI
* @RELATION: BINDS_TO -> taskDrawerStore, assistantChatStore, WebSocket
@@ -414,7 +414,7 @@
* @PURPOSE: Disconnects the active WebSocket connection
* @PRE: ws may or may not be initialized
* @POST: ws is closed and set to null
* @TIER: STANDARD
* @COMPLEXITY: 3
*/
function disconnectWebSocket() {
console.log("[TaskDrawer][WebSocket][disconnectWebSocket:START]");
@@ -470,7 +470,7 @@
* @PURPOSE: Return to task list view from task details
* @PRE: Drawer is open and activeTaskId is set
* @POST: Drawer switches to list view and reloads tasks
* @TIER: STANDARD
* @COMPLEXITY: 3
*/
function goBackToList() {
console.log("[TaskDrawer][UI][goBackToList:START]");

View File

@@ -1,7 +1,7 @@
<!-- [DEF:TopNavbar:Component] -->
<script>
/**
* @TIER: CRITICAL
* @COMPLEXITY: 5
* @PURPOSE: Unified top navigation bar with Logo, Search, Activity, and User menu
* @LAYER: UI
* @RELATION: BINDS_TO -> activityStore, authStore

View File

@@ -1,5 +1,5 @@
// [DEF:frontend.src.lib.components.layout.__tests__.sidebarNavigation:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: tests, sidebar, navigation, rbac, permissions
// @PURPOSE: Verifies RBAC-based sidebar category and subitem visibility.
// @LAYER: UI (Tests)

View File

@@ -1,5 +1,5 @@
// [DEF:__tests__/test_breadcrumbs:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @PURPOSE: Contract-focused unit tests for Breadcrumbs.svelte logic and UX annotations
// @LAYER: UI
// @RELATION: VERIFIES -> frontend/src/lib/components/layout/Breadcrumbs.svelte
@@ -68,7 +68,7 @@ describe('Breadcrumbs Component Contract & Logic', () => {
it('contains required UX tags and semantic header for STANDARD module', () => {
const source = fs.readFileSync(COMPONENT_PATH, 'utf-8');
expect(source).toContain('@TIER: STANDARD');
expect(source).toContain('@COMPLEXITY: 3');
expect(source).toContain('@UX_STATE: Idle');
expect(source).toContain('@UX_FEEDBACK');
expect(source).toContain('@UX_RECOVERY');

View File

@@ -1,5 +1,5 @@
// [DEF:__tests__/test_sidebar:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @PURPOSE: Unit tests for Sidebar.svelte component
// @LAYER: UI
// @RELATION: VERIFIES -> frontend/src/lib/components/layout/Sidebar.svelte

View File

@@ -1,5 +1,5 @@
// [DEF:__tests__/test_taskDrawer:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @PURPOSE: Unit tests for TaskDrawer.svelte component
// @LAYER: UI
// @RELATION: VERIFIES -> frontend/src/lib/components/layout/TaskDrawer.svelte

View File

@@ -1,5 +1,5 @@
// [DEF:__tests__/test_topNavbar:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @PURPOSE: Unit tests for TopNavbar.svelte component
// @LAYER: UI
// @RELATION: VERIFIES -> frontend/src/lib/components/layout/TopNavbar.svelte

View File

@@ -1,5 +1,5 @@
// [DEF:frontend.src.lib.components.layout.sidebarNavigation:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: navigation, sidebar, rbac, menu, filtering
// @PURPOSE: Build sidebar navigation categories filtered by current user permissions.
// @LAYER: UI

View File

@@ -1,7 +1,7 @@
<!-- [DEF:ReportCard:Component] -->
<script>
/**
* @TIER: CRITICAL
* @COMPLEXITY: 5
* @SEMANTICS: reports, card, type-profile, accessibility, fallback
* @PURPOSE: Render one report with explicit textual type label and profile-driven visual variant.
* @LAYER: UI

View File

@@ -1,7 +1,7 @@
<!-- [DEF:ReportDetailPanel:Component] -->
<script>
/**
* @TIER: CRITICAL
* @COMPLEXITY: 5
* @SEMANTICS: reports, detail, diagnostics, next-actions, placeholders
* @PURPOSE: Display detailed report context with diagnostics and actionable recovery guidance.
* @LAYER: UI

View File

@@ -1,7 +1,7 @@
<!-- [DEF:ReportsList:Component] -->
<script>
/**
* @TIER: CRITICAL
* @COMPLEXITY: 5
* @SEMANTICS: reports, list, card, unified, mixed-types
* @PURPOSE: Render unified list of normalized reports with canonical minimum fields.
* @LAYER: UI

View File

@@ -1,5 +1,5 @@
// [DEF:reports.fixtures:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: reports, fixtures, test-data
// @PURPOSE: Shared frontend fixtures for unified reports states.
// @LAYER: UI

View File

@@ -2,7 +2,7 @@
* @vitest-environment jsdom
*/
// [DEF:frontend.src.lib.components.reports.__tests__.report_card.ux:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: reports, ux-tests, card, states, recovery
// @PURPOSE: Test UX states and transitions for ReportCard component
// @LAYER: UI

View File

@@ -1,5 +1,5 @@
// [DEF:frontend.src.lib.components.reports.__tests__.report_detail.integration:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: tests, reports, detail, recovery-guidance, integration
// @PURPOSE: Validate detail-panel behavior for failed reports and recovery guidance visibility.
// @LAYER: UI (Tests)

View File

@@ -2,7 +2,7 @@
* @vitest-environment jsdom
*/
// [DEF:frontend.src.lib.components.reports.__tests__.report_detail.ux:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: reports, ux-tests, detail, diagnostics, recovery
// @PURPOSE: Test UX states and recovery for ReportDetailPanel component
// @LAYER: UI

View File

@@ -1,5 +1,5 @@
// [DEF:frontend.src.lib.components.reports.__tests__.report_type_profiles:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: tests, reports, type-profiles, fallback
// @PURPOSE: Validate report type profile mapping and unknown fallback behavior.
// @LAYER: UI (Tests)

View File

@@ -1,5 +1,5 @@
// [DEF:frontend.src.lib.components.reports.__tests__.reports_filter_performance:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: tests, reports, performance, filtering
// @PURPOSE: Guard test for report filter responsiveness on moderate in-memory dataset.
// @LAYER: UI (Tests)

View File

@@ -2,7 +2,7 @@
* @vitest-environment jsdom
*/
// [DEF:frontend.src.lib.components.reports.__tests__.reports_list.ux:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: reports, list, ux-tests, events, iteration
// @PURPOSE: Test ReportsList component iteration and event forwarding.
// @LAYER: UI

View File

@@ -1,5 +1,5 @@
// [DEF:frontend.src.lib.components.reports.__tests__.reports_page.integration:Module]
// @TIER: STANDARD
// @COMPLEXITY: 3
// @SEMANTICS: tests, reports, integration, mixed-types, rendering
// @PURPOSE: Integration-style checks for unified mixed-type reports rendering expectations.
// @LAYER: UI (Tests)

View File

@@ -1,5 +1,5 @@
// [DEF:frontend.src.lib.components.reports.reportTypeProfiles:Module]
// @TIER: CRITICAL
// @COMPLEXITY: 5
// @SEMANTICS: reports, ui, profiles, fallback, mapping
// @PURPOSE: Deterministic mapping from report task_type to visual profile with one fallback.
// @LAYER: UI