Class: CleoQualityReview::PromptBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/cleo_quality_review/prompt_builder.rb

Overview

Builds the complete LLM prompt from run data and artifacts

Instance Method Summary collapse

Constructor Details

#initialize(run:, prompt:, artifacts:) ⇒ PromptBuilder

Returns a new instance of PromptBuilder.

Parameters:

  • run (Run)

    the quality review run

  • prompt (String)

    base prompt template

  • artifacts (RunArtifacts)

    run artifacts containing diffs and outputs



13
14
15
16
17
# File 'lib/cleo_quality_review/prompt_builder.rb', line 13

def initialize(run:, prompt:, artifacts:)
  @run = run
  @prompt = prompt
  @artifacts = artifacts
end

Instance Method Details

#buildString

Build the complete prompt with all sections

Returns:

  • (String)


22
23
24
25
26
27
28
29
30
# File 'lib/cleo_quality_review/prompt_builder.rb', line 22

def build
  [
    prompt,
    ,
    diff_section,
    check_outputs_section,
    target_files_section,
  ].join("\n\n")
end