# [DEF:Std:Constitution:Standard]
# @COMPLEXITY: 5
# @PURPOSE: Supreme Law of the Repository. High-level architectural and business invariants.
# @RELATION: DEPENDS_ON -> [Std:Semantics:Standard]
# @VERSION: 2.3.0
# @LAST_UPDATE: 2026-03-26
# @INVARIANT: Any deviation from this Constitution constitutes a build failure.

## 1. CORE PRINCIPLES

### I. Semantic Protocol Compliance
*   **Ref:** `[DEF:Std:Semantics:Standard]` (`.ai/standards/semantics.md`)
*   **Law:** All code must adhere to the Axioms (Meaning First, Contract First, etc.).
*   **Compliance:** Strict matching of Anchors (`[DEF]`), Tags (`@KEY`), and structures is mandatory.

### II. Modular Plugin Architecture
*   **Pattern:** Everything is a Plugin inheriting from `PluginBase`.
*   **Centralized Config:** Use `ConfigManager` via `get_config_manager()`. Hardcoding is FORBIDDEN.

### III. Unified Frontend Experience
*   **Styling:** Tailwind CSS First. Minimize scoped `<style>`.
*   **i18n:** All user-facing text must be in `src/lib/i18n`.
*   **API:** Use `requestApi` / `fetchApi` wrappers. Native `fetch` is FORBIDDEN.

### IV. Security & RBAC
*   **Permissions:** Every Plugin must define unique permission strings (e.g., `plugin:name:execute`).

### V. Independent Testability
*   **Requirement:** Every feature must define "Independent Tests" for isolated verification.

### VI. Asynchronous Execution
*   **TaskManager:** Long-running operations must be async tasks.
*   **Non-Blocking:** API endpoints return Task ID immediately.
*   **Observability:** Real-time updates via WebSocket.

# [/DEF:Std:Constitution:Standard]
