Knowledge Retention Phase

Reflex Training
Mechanic Sector

(Engage card to reveal Pilot's Intelligence.)

Sector ID: 6A

The Pilot's Audit

"The AI Trap: "The Hard Dependency""

// AI-Generated Code: Rigid Wiring
public class Player : MonoBehaviour {
    // Audit Fail: Hard dependency on a specific manager
    public UIManager uiManager; 

    void TakeDamage(int amt) {
        hp -= amt;
        uiManager.UpdateHealth(hp);
    }
}

Protocol Analysis

This is "Rigid Wiring." The Player script now depends entirely on the UI Manager. You can't test the Player in a grey-box level without dragging the UI Manager along with it.

Audit Complete

Sector ID: 2D

The Pilot's Audit

"The Audit: Spot the "Side Effect" Error"

// AI-Generated Code (Impure)
public bool CanReachDestination(float distance) {
    float fuelNeeded = distance * 0.5f;
    if (currentFuel >= fuelNeeded) {
        return true;
    } else {
        isEmergencyDeclared = true; // SIDE EFFECT: Changing state!
        return false;
    }
}

Protocol Analysis

This method is named as a "Check" (returning a bool), but it secretly modifies isEmergencyDeclared. If you call this check multiple times for telemetry, you might trigger an emergency state without meaning to.

Audit Complete

Sector ID: 7B

The Pilot's Audit

"The AI Trap: "The Naming Soup""

// AI-Generated Code: Messy and Inconsistent
void calc_dist() {
    // Audit Fail: 'd' and 'h' are meaningless names.
    // 'calc_dist' uses underscores, which isn't standard C#.
    float d = Vector3.Distance(transform.position, h.position);
}

Protocol Analysis

This is "Visual Static." When you have 400,000 files, you cannot afford to guess what d stands for. A professional pilot demands "Self-Documenting Code" where the names explain the logic.

Audit Complete

Sector ID: 7F

The Pilot's Audit

"The AI Trap: "The Scroll of Doom""

// AI-Generated Code: Disorganized and Flat
public class Drone : MonoBehaviour {
    public float speed;
    void Start() { ... }
    public void TakeDamage() { ... }
    private float health;
    void Update() { ... }
    public void Move() { ... }
    // Audit Fail: Variables are mixed with methods. 
    // Navigation is slow and error-prone.
}

Protocol Analysis

This is "Structural Clutter." In a 400,000-file project, time spent scrolling is time lost. A professional pilot demands "Visual Hierarchy" so they can jump to the right section of the dashboard instantly.

Audit Complete

Sector ID: 3C

The Pilot's Audit

"The AI Trap: "The Typosquat""

// AI-Generated Code: Fragile and Unverifiable
void OnTriggerEnter(Collider other) {
    // Audit Fail: If you accidentally name the item "redkey" in the inspector,
    // this logic will fail silently. No error will pop up.
    if (inventory.HasItem("RedKey")) {
        OpenDoor();
    }
}

Protocol Analysis

This is "Blind Coupling." You are forcing the code to match a string that might change or be misspelled. If the player can't open the door, you'll spend hours debugging logic when the problem was just a capital 'K'.

Audit Complete

Sector ID: 1A

The Pilot's Audit

"The Audit: Spot the "0.4 mph" Error"

// AI-Generated Code
public string coinCount = "0";

void AddCoin() {
    coinCount = coinCount + 1; // ERROR: Can't do math on text!
}

Protocol Analysis

Because a "coin count" is a number you need to add to. Using a string (text) to hold a number is like using a cardboard box to hold a gallon of gasoline—it's the wrong container for the job.

Audit Complete

Refresh Sector Protocols

Scanning database for new traps