orchestrata_ultimate.agents.prompt_builder

Reference › orchestrata_ultimate › agents › prompt_builder

prompt_builder holds one function, build_repair_prompt, which assembles the prompt a junior coding volk receives for a repair cycle after QA review (specification 005). It takes a task summary, the issues text, a listing of the current source and an optional standards string (the project standards come from orchestrata_ultimate.core.standards) and returns the combined prompt string. Other reference modules do not import it.

At a glance

Source src/orchestrata_ultimate/agents/prompt_builder.py
Lines of code 40
Classes 0
Functions 1
Imports (internal) orchestrata_ultimate.core.standards
Imported by none
Tests that import it tests/agents/test_prompt_builder.py, tests/generated_agents/test_prompt_builder_generated.py, tests/generated_recovery/test_agents_prompt_builder.py

Class diagram

No classes; see Functions.

Dependency diagram

Dependency diagram orchestrata_ultimate.agents.prompt_builder

API

Functions

Function Signature Summary
build_repair_prompt build_repair_prompt(task_summary: str, issues_text: str, source_listing: str, standards: str = '') -> str Build a direct repair prompt for the junior coding volk.

Source

Permalink: https://gitlab.com/MSamy/orchestrata-ultimate-architecture/-/blob/a4cbc2bdf/src/orchestrata_ultimate/agents/prompt_builder.py

"""Prompt construction for agent repair cycles.

Builds structured prompts for junior coding volks to repair issues
identified during QA review.

Spec: 005 - Multi-Agent Coordination
"""

from orchestrata_ultimate.core.standards import CODING_STANDARDS_FIX


def build_repair_prompt(
    task_summary: str,
    issues_text: str,
    source_listing: str,
    standards: str = "",
) -> str:
    """Build a direct repair prompt for the junior coding volk.

    Args:
        task_summary: Short description of the task.
        issues_text: Formatted issues list.
        source_listing: Current file contents.
        standards: Coding standards to append. Defaults to
            CODING_STANDARDS_FIX.

    Returns:
        Complete fix prompt string.
    """
    if not standards:
        standards = CODING_STANDARDS_FIX
    return (
        f"Fix these issues in the existing code.\n\n"
        f"Task: {task_summary}\n\n"
        f"Issues to fix:\n{issues_text}\n\n"
        f"Current files:\n{source_listing}\n\n"
        f"Output ALL modified files as complete FILE: blocks.\n"
        f"Do NOT use diffs. Output COMPLETE file contents.\n\n"
        f"{standards}"
    )