Class: Aidp::Init::DocGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/aidp/init/doc_generator.rb

Overview

Creates project documentation artefacts based on the analyzer output. All documents are deterministic and tailored with repository insights.

Constant Summary collapse

OUTPUT_DIR =
"docs"
STYLE_GUIDE_PATH =
File.join(OUTPUT_DIR, "LLM_STYLE_GUIDE.md")
ANALYSIS_PATH =
File.join(OUTPUT_DIR, "PROJECT_ANALYSIS.md")
QUALITY_PLAN_PATH =
File.join(OUTPUT_DIR, "CODE_QUALITY_PLAN.md")

Instance Method Summary collapse

Constructor Details

#initialize(project_dir = Dir.pwd) ⇒ DocGenerator

Returns a new instance of DocGenerator.



16
17
18
# File 'lib/aidp/init/doc_generator.rb', line 16

def initialize(project_dir = Dir.pwd)
  @project_dir = project_dir
end

Instance Method Details

#generate(analysis:, preferences: {}) ⇒ Object



20
21
22
23
24
25
# File 'lib/aidp/init/doc_generator.rb', line 20

def generate(analysis:, preferences: {})
  ensure_output_directory
  write_style_guide(analysis, preferences)
  write_project_analysis(analysis)
  write_quality_plan(analysis, preferences)
end