# AXIOM C.O.R.E. Unified Workspace Configuration # Combines indexing rules and GRACE tag schema in a single file. # # Структура тегов разделена по: # 1. Уровню сложности (min_complexity: 1-5) # 2. Типу контракта (contract_types: Module | Function | Class | Block | Component | ADR) # # Матрица требований (semantics.md Section VI): # C1 (ATOMIC): только якоря [DEF]...[/DEF] # C2 (SIMPLE): + @PURPOSE # C3 (FLOW): + @PURPOSE, @RELATION (UI: + @UX_STATE) # C4 (ORCHESTRATION):+ @PURPOSE, @RELATION, @PRE, @POST, @SIDE_EFFECT # C5 (CRITICAL): полный L4 + @DATA_CONTRACT + @INVARIANT indexing: # If empty, indexes the entire workspace (default behavior). # If specified, only these directories are scanned for contracts. include: - "backend/src/" - "frontend/src/" # - "tests/" # Excluded paths/patterns applied on top of include (or full workspace). # Supports directory names and glob patterns. exclude: # Directories - "specs/" - ".ai/" - ".git/" - ".venv/" - "__pycache__/" - "node_modules/" - ".pytest_cache/" - ".mypy_cache/" - ".ruff_cache/" - ".axiom/" # File patterns - "*.md" - "*.txt" - "*.log" - "*.yaml" - "*.yml" - "*.json" - "*.toml" - "*.ini" - "*.cfg" # ============================================================ # GRACE Tag Schema — разделено по сложности и типу контракта # ============================================================ # contract_types определяет, для каких типов контрактов тег обязателен: # - Module: заголовок модуля (файл) # - Function: функции и методы # - Class: классы # - Block: логические блоки внутри функций # - Component: UI-компоненты (Svelte) # - ADR: архитектурные решения # ============================================================ tags: # ---------------------------------------------------------- # Complexity 2 (SIMPLE) — требуется @PURPOSE # ---------------------------------------------------------- PURPOSE: type: string multiline: true description: "Основное предназначение модуля или функции" min_complexity: 2 contract_types: - Module - Function - Class - Component - ADR # ---------------------------------------------------------- # Complexity 3 (FLOW) — требуется @RELATION # ---------------------------------------------------------- RELATION: type: array separator: "->" is_reference: true description: "Граф зависимостей: PREDICATE -> TARGET_ID" allowed_predicates: - DEPENDS_ON - CALLS - INHERITS - IMPLEMENTS - DISPATCHES - BINDS_TO min_complexity: 3 contract_types: - Module - Function - Class - Component LAYER: type: string enum: ["Domain", "UI", "Infra"] description: "Архитектурный слой компонента" contract_types: - Module SEMANTICS: type: array separator: "," description: "Ключевые слова для семантического поиска" contract_types: - Module # ---------------------------------------------------------- # Complexity 3 — UX Contracts (Svelte 5+) # ---------------------------------------------------------- UX_STATE: type: string description: "Состояния UI: Idle, Loading, Error, Success" contract_types: - Component UX_FEEDBACK: type: string description: "Реакция системы: Toast, Shake, RedBorder" contract_types: - Component UX_RECOVERY: type: string description: "Путь восстановления после сбоя: Retry, ClearInput" contract_types: - Component UX_REACTIVITY: type: string description: "Явный биндинг через руны: $state, $derived, $effect, $props" contract_types: - Component # ---------------------------------------------------------- # Complexity 4 (ORCHESTRATION) — DbC контракты # ---------------------------------------------------------- PRE: type: string description: "Предусловия (Pre-conditions)" min_complexity: 4 contract_types: - Function - Class - Module POST: type: string description: "Постусловия (Post-conditions)" min_complexity: 4 contract_types: - Function - Class - Module SIDE_EFFECT: type: string description: "Побочные эффекты: мутации, I/O, сеть" min_complexity: 4 contract_types: - Function - Class - Module # ---------------------------------------------------------- # Complexity 5 (CRITICAL) — полный контракт # ---------------------------------------------------------- DATA_CONTRACT: type: string description: "Ссылка на DTO: Input -> Model, Output -> Model" min_complexity: 5 contract_types: - Function - Class - Module INVARIANT: type: string description: "Бизнес-инварианты, которые нельзя нарушить" min_complexity: 5 contract_types: - Function - Class - Module # ---------------------------------------------------------- # Decision Memory (ортогонально сложности) # ---------------------------------------------------------- RATIONALE: type: string multiline: true protected: true description: "Почему выбран этот путь, какое ограничение/цель защищается" contract_types: - Module - Function - Class - ADR REJECTED: type: string multiline: true protected: true description: "Какой путь запрещен и какой риск делает его недопустимым" contract_types: - Module - Function - Class - ADR # ---------------------------------------------------------- # Test Contracts (Section X — упрощенные правила) # ---------------------------------------------------------- TEST_CONTRACT: type: string multiline: true description: "Тестовый контракт: Input -> Output" contract_types: - Function - Block TEST_SCENARIO: type: string multiline: true description: "Тестовый сценарий: Название -> Ожидание" contract_types: - Function - Block TEST_FIXTURE: type: string multiline: true description: "Тестовая фикстура: Название -> file:[path] | INLINE_JSON" contract_types: - Block TEST_EDGE: type: string multiline: true description: "Граничный случай: Название -> Сбой" contract_types: - Function - Block TEST_INVARIANT: type: string multiline: true description: "Тестовый инвариант: Имя -> VERIFIED_BY: [scenarios]" contract_types: - Module - Function # ---------------------------------------------------------- # Metadata / Classification # ---------------------------------------------------------- TIER: type: string enum: ["CRITICAL", "STANDARD", "TRIVIAL"] description: "Уровень критичности компонента" contract_types: - Module - Function - Class COMPLEXITY: type: string enum: ["1", "2", "3", "4", "5"] description: "Уровень сложности контракта" contract_types: - Module - Function - Class - Component C: type: string enum: ["1", "2", "3", "4", "5"] description: "Сокращение для @COMPLEXITY" contract_types: - Module - Function - Class - Component