# Track Specification: System Stabilization & Standardization

## Overview
The Jomblo codebase has accumulated technical debt and inconsistent patterns ("semi-standardised" code). Documentation is out of date. This track initiates a rigorous "Repair & Standardize" effort using strict Test-Driven Development (TDD).

## Primary Goals
1.  **Audit & Identify:** Systematically scan the codebase to identify deviations from core architectural mandates (specifically in `actions/`, `lib/`, and `components/`).
2.  **Standardize Core Patterns:** Refactor code to strictly adhere to the following `GEMINI.md` mandates:
    *   **Server Actions:** Must use `createServerAction` wrapper.
    *   **Data Access:** Must use the Repository Pattern (no direct DB calls in Actions/Components).
    *   **Error Handling:** Must use unified error classes.
3.  **Future-Proof TDD Workflow:** Update `conductor/` documentation to enforce a strict, repeatable TDD process with **100% test coverage** requirement for all new and modified code.
4.  **Documentation Overhaul:** Rewrite `conductor/` documentation to be the single source of truth, archiving old `docs/` content.

## Scope
-   **Focus Area:** `actions/` directory and associated data access logic.
-   **Discovery:** We will start by auditing the codebase to find the specific "semi-standardised" patterns.
-   **Fixes:** We will prioritize fixing "Critical" architectural violations first.

## Non-Functional Requirements
-   **Strict TDD:** No code is written without a failing test.
-   **100% Coverage:** All touched files must achieve 100% test coverage.
-   **Documentation:** Update `conductor/` docs to reflect the *actual* implemented patterns.
-   **Clean Code:** Remove dead code and "commented out" blocks.

## Success Criteria
-   Audit report generated listing identified inconsistencies.
-   Selected high-priority modules (e.g., `actions/`) are refactored to standard.
-   All touched files have **100% test coverage**.
-   `conductor/` documentation is updated and accurate.
-   Detailed "Missing TDD Report" generated.
-   CI Build passes.