Module: OllamaAgent::SelfImprovement::RubyMasteryContext
- Defined in:
- lib/ollama_agent/self_improvement/ruby_mastery_context.rb
Overview
Optional markdown report from the ‘ruby_mastery` gem, prepended to self_review / improve prompts.
Class Method Summary collapse
Class Method Details
.markdown_section(root) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ollama_agent/self_improvement/ruby_mastery_context.rb', line 10 def markdown_section(root) return nil if root.to_s.strip.empty? return nil unless File.directory?(root) return nil unless load_gem body = report_markdown_captured(root) return nil if body.nil? || body.strip.empty? wrap_truncated(body, max_body_chars) rescue StandardError => e warn "ollama_agent: ruby_mastery skipped (#{e.class}: #{e.})" nil end |