Class: RubyCoded::Skills::MarkdownLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_coded/skills/markdown_loader.rb

Overview

Loads project-local markdown skill files.

Constant Summary collapse

SUPPORTED_MODES =
%w[chat plan agent].freeze

Instance Method Summary collapse

Constructor Details

#initialize(project_root:) ⇒ MarkdownLoader

Returns a new instance of MarkdownLoader.



11
12
13
# File 'lib/ruby_coded/skills/markdown_loader.rb', line 11

def initialize(project_root:)
  @project_root = project_root
end

Instance Method Details

#load_filesObject



15
16
17
# File 'lib/ruby_coded/skills/markdown_loader.rb', line 15

def load_files
  load_report[:entries]
end

#load_reportObject



19
20
21
22
23
# File 'lib/ruby_coded/skills/markdown_loader.rb', line 19

def load_report
  return empty_report unless Dir.exist?(skills_dir)

  build_report(skill_paths)
end