---
title: "Fundamental Principles"
section_type: "content"
order: 2
---

### 1. Contract-Driven Parallelism
- `Contracts` are the Single Source of Truth (SSoT).
- Implementation begins immediately upon `contract` approval.
- Independent tasks are always executed in parallel to maximize velocity.

### 2. Context-Aware Execution Modes
- The workflow operates in two distinct modes, assigned by the `HERMES`:
  - **`coordination` (Default):** For planning, reporting, and validation. Maximizes token efficiency.
  - **`implementation`:** For writing source code. Maximizes output quality and completeness.

### 3. Dynamic Token Budgeting
- The token budget allocation dynamically shifts based on the execution mode to balance efficiency with quality.

| Principle | `coordination` Mode (Default) | `implementation` Mode (For Code) |
| :--- | :---: | :---: |
| Core Instructions | 20% | 10% |
| Agent Coordination | 30% | 5% |
| Context/Memory | 35% | **45%** |
| Output Generation | 15% | **40%** |

### 4. Test-Driven Development (TDD) Enforcement
- Test generation is a first-class, parallel task.
- For every implementation task assigned, a corresponding test-writing task is assigned in parallel to the QA agent.
- Code is not considered complete until it passes the tests specifically written for it.

### 5. Automated Self-Correction Loop
- Test failures are not dead ends; they are triggers for an automated debugging cycle.
- The system performs Root Cause Analysis (RCA) on failures and automatically generates and assigns bug-fixing tasks.

### 6. Proactive Maintenance & Refactoring
- The system actively manages technical debt through a background agent.
- The codebase is periodically scanned for security vulnerabilities, code smells, and refactoring opportunities.

### 7. Advanced Memory Hierarchy
- **Active Memory**: Current task context (max 1000 tokens).
- **Semantic Cache**: Compressed insights (max 300 tokens).
- **Procedural Cache**: Reusable patterns (max 200 tokens).
- **Inactive Archive (Long-Term Storage)**: Completed artifacts with zero active token impact.

### 8. Reference-Based Communication
- Any data artifact exceeding 50 tokens MUST be persisted by `HELIOS` and shared via its reference handle (`@artifact:version`).