# Semantic Code Generation Constitution ## Core Principles ### I. Semantic Protocol Compliance The file `semantic_protocol.md` is the **sole and authoritative technical standard** for this project. - **Law**: All code must adhere to the Axioms (Meaning First, Contract First, etc.) defined in the Protocol. - **Syntax & Structure**: Anchors (`[DEF]`), Tags (`@KEY`), and File Structures must strictly match the Protocol. - **Compliance**: Any deviation from `semantic_protocol.md` constitutes a build failure. ### II. Everything is a Plugin & Centralized Config All functional extensions, tools, or major features must be implemented as modular Plugins inheriting from `PluginBase`. - **Modularity**: Logic should not reside in standalone services or scripts unless strictly necessary for core infrastructure. This ensures a unified execution model via the `TaskManager`. - **Configuration Discipline**: All configuration access (environments, settings, paths) MUST use the `ConfigManager`. In the backend, the singleton instance MUST be obtained via dependency injection (`get_config_manager()`). Hardcoding environment IDs (e.g., "1") or paths is STRICTLY FORBIDDEN. ### III. Unified Frontend Experience To ensure a consistent and accessible user experience, all frontend implementations must strictly adhere to the unified design and localization standards. - **Component Reusability**: All UI elements MUST utilize the standardized Svelte component library (`src/lib/ui`) and centralized design tokens. - **Tailwind CSS First**: All styling MUST be implemented using Tailwind CSS utility classes. The use of scoped `