Class: Ocak::Commands::Hiz

Inherits:
Dry::CLI::Command
  • Object
show all
Includes:
Planner, StepComments, Verification
Defined in:
lib/ocak/commands/hiz.rb

Defined Under Namespace

Classes: HizState

Constant Summary collapse

STEP_MODELS =
{
  'implementer' => 'sonnet',
  'reviewer' => 'haiku',
  'security-reviewer' => 'sonnet'
}.freeze
IMPLEMENT_STEP =
{ agent: 'implementer', role: 'implement' }.freeze
REVIEW_STEPS =
[
  { agent: 'reviewer',          role: 'review' },
  { agent: 'security-reviewer', role: 'security' }
].freeze

Constants included from Planner

Planner::STEP_PROMPTS

Instance Method Summary collapse

Methods included from Planner

#build_step_prompt, #parse_planner_output, #plan_batches, #sequential_batches

Methods included from Verification

#lint_extensions_for, #run_final_checks, #run_scoped_lint

Instance Method Details

#call(issue:, **options) ⇒ Object



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/ocak/commands/hiz.rb', line 44

def call(issue:, **options)
  @config = Config.load
  issue_number = issue.to_i

  if options[:dry_run]
    print_dry_run(issue_number)
    return
  end

  logger = build_logger(issue_number)
  watch_formatter = options[:watch] ? WatchFormatter.new : nil
  claude = ClaudeRunner.new(config: @config, logger: logger, watch: watch_formatter)
  issues = IssueFetcher.new(config: @config, logger: logger)

  logger.info("=== Hiz (fast mode) for issue ##{issue_number} ===")

  run_fast_pipeline(issue_number, claude: claude, logger: logger, issues: issues)
rescue Config::ConfigNotFound => e
  warn "Error: #{e.message}"
  exit 1
end