# Tier 3: The Worker Agents (Contributors)

**Designated Models:** DeepSeek V3/R1, Gemini 2.5 Flash.
**Execution Frequency:** High (The core loop).
**Core Role:** Generating syntax, writing localized files, running unit tests.

The engine room of the system. Contributors execute the highest volume of API calls. Their memory context is ruthlessly pruned. By leveraging cheap, fast models, they operate with zero architectural anxiety—they just write the code they are assigned. They are "Amnesiac Workers," having their history wiped between tasks to prevent context ballooning.

## Memory Context & Paths

### Path A: Heads Down Execution (Task Execution)
*   **Trigger:** Tier 2 (Tech Lead) hands down a hyper-specific Ticket.
*   **What it Sees (Context):**
    *   **The Ticket Prompt:** The exact, isolated instructions from Tier 2.
    *   **The Target File (Raw View):** The raw, unredacted, line-by-line source code of *only* the specific file (or class/function) it was assigned to modify.
    *   **Foreign Interfaces (Skeleton View):** Strict AST skeleton (signatures only) of external dependencies required by the ticket.
*   **What it Ignores:** Epic/Track goals, Tech Lead's Curated View, other files in the same directory, parallel Tickets.
*   **Output Format:** XML Tags (`<file_path>`, `<file_content>`) defining direct file modifications or `mcp_client.py` tool payloads.

### Path B: Trial and Error (Local Iteration & Tool Execution)
*   **Trigger:** The Contributor runs a local linter/test, encounters a syntax error, or the human pauses execution using "Step" mode.
*   **What it Sees (Context):**
    *   **Ephemeral Working History:** A short, rolling window of its last 2–3 attempts (e.g., "Attempt 1: Wrote code -> Tool Output: SyntaxError").
    *   **Tier 4 (QA) Injections:** Compressed (20-50 token) fix recommendations from Tier 4 agents (e.g., "Add a closing bracket on line 42").
    *   **Human Mutations:** Any direct edits made to its JSON history payload before proceeding.
*   **What it Ignores:** Tech Lead code reviews, attempts older than the rolling window (wiped to save tokens).
*   **Output Format:** Revised tool payloads until tests pass or the human approves.

### Path C: Task Submission (Micro-Pull Request)
*   **Trigger:** The code executes cleanly, and "Step" mode is finalized into "Task Complete."
*   **What it Sees (Context):**
    *   **The Original Ticket:** To confirm instructions were met.
    *   **The Final State:** The cleanly modified file or exact diff.
*   **What it Ignores:** **All of Path B.** Before submission to Tier 2, the orchestrator wipes the messy trial-and-error history from the payload.
*   **Output Format:** A concise completion message and the clean diff, sent up to Tier 2.