Anomaly Agent Task Forge
Architecture: Deterministic LLM Anomaly Remediation
Summary: Legacy code often contains structural edge cases (e.g., dynamic jumps, unresolved subroutine calls, or system limit overrides) that require human review. The Anomaly Agent Task Forge converts these flags—generated by the Honesty Protocol—into strict, structured JSON job tickets designed for autonomous LLM agent dispatchers to resolve automatically.
Contextual Aggregation
Instead of bombarding an LLM with the entire monolithic repository, the forge groups architectural anomalies by their specific target files. Before generating a ticket, the forge queries the Intermediate Representation (IR) State Manager to extract the target file's DAG lineage. This ensures the AI agent understands the exact structural boundaries of the file it is attempting to patch.
The JSON Ticket Payload
The forge generates a strict JSON contract ({prog_id}_agent_job.json) that bounds the AI agent to a highly specific remediation context:
* Target File: The exact path to the localized COBOL payload.
* Detected Anomalies: The specific structural violations the agent must resolve.
* I/O Boundaries: Explicitly lists the inputs_required and outputs_produced so the agent understands the file's data flow.
* External State: Lists the external_calls so the agent knows which subroutines the file depends on.
Anti-Hallucination Constraints
To ensure the LLM generates a structurally sound patch without breaking the underlying mainframe logic, the ticket includes a strict System Prompt:
1. Architectural Persona: The agent is instructed to act as a "deterministic legacy systems architect."
2. Logic Preservation: The agent is explicitly commanded to only resolve the listed anomalies and is forbidden from altering the core business logic.
3. Deterministic Output: The agent must return its solution as a strictly formatted JSON object containing a diagnosis string (explaining the fix) and the patched_code string, allowing the GitGalaxy pipeline to automatically integrate the patched file without human copy-pasting.
🌌 Powered by the blAST Engine
This documentation is part of the GitGalaxy Ecosystem, an AST-free, LLM-free heuristic knowledge graph engine.
- 🪐 Explore the GitHub Repository for code, tools, and updates.
- 🔭 Visualize your own repository at GitGalaxy.io using our interactive 3D WebGPU dashboard.