Module: Aidp::ConfigPaths

Defined in:
lib/aidp/config_paths.rb

Overview

Centralized path management for all AIDP internal files Ensures consistent file locations and prevents path-related bugs

Class Method Summary collapse

Class Method Details

.aidp_dir(project_dir = Dir.pwd) ⇒ Object



9
# File 'lib/aidp/config_paths.rb', line 9

def self.aidp_dir(project_dir = Dir.pwd) = File.join(project_dir, ".aidp")

.analyze_progress_file(project_dir = Dir.pwd) ⇒ Object



14
# File 'lib/aidp/config_paths.rb', line 14

def self.analyze_progress_file(project_dir = Dir.pwd) = File.join(progress_dir(project_dir), "analyze.yml")

.checkpoint_file(project_dir = Dir.pwd) ⇒ Object



20
# File 'lib/aidp/config_paths.rb', line 20

def self.checkpoint_file(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "checkpoint.yml")

.checkpoint_history_file(project_dir = Dir.pwd) ⇒ Object



21
# File 'lib/aidp/config_paths.rb', line 21

def self.checkpoint_history_file(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "checkpoint_history.jsonl")

.config_dir(project_dir = Dir.pwd) ⇒ Object



11
# File 'lib/aidp/config_paths.rb', line 11

def self.config_dir(project_dir = Dir.pwd) = aidp_dir(project_dir)

.config_exists?(project_dir = Dir.pwd) ⇒ Boolean



35
36
37
# File 'lib/aidp/config_paths.rb', line 35

def self.config_exists?(project_dir = Dir.pwd)
  File.exist?(config_file(project_dir))
end

.config_file(project_dir = Dir.pwd) ⇒ Object



10
# File 'lib/aidp/config_paths.rb', line 10

def self.config_file(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "aidp.yml")

.ensure_aidp_dir(project_dir = Dir.pwd) ⇒ Object



39
40
41
42
43
# File 'lib/aidp/config_paths.rb', line 39

def self.ensure_aidp_dir(project_dir = Dir.pwd)
  dir = aidp_dir(project_dir)
  FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
  dir
end

.ensure_config_dir(project_dir = Dir.pwd) ⇒ Object



45
46
47
# File 'lib/aidp/config_paths.rb', line 45

def self.ensure_config_dir(project_dir = Dir.pwd)
  ensure_aidp_dir(project_dir)
end

.ensure_evaluations_dir(project_dir = Dir.pwd) ⇒ Object



79
80
81
82
83
# File 'lib/aidp/config_paths.rb', line 79

def self.ensure_evaluations_dir(project_dir = Dir.pwd)
  dir = evaluations_dir(project_dir)
  FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
  dir
end

.ensure_harness_state_dir(project_dir = Dir.pwd) ⇒ Object



55
56
57
58
59
# File 'lib/aidp/config_paths.rb', line 55

def self.ensure_harness_state_dir(project_dir = Dir.pwd)
  dir = harness_state_dir(project_dir)
  FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
  dir
end

.ensure_jobs_dir(project_dir = Dir.pwd) ⇒ Object



67
68
69
70
71
# File 'lib/aidp/config_paths.rb', line 67

def self.ensure_jobs_dir(project_dir = Dir.pwd)
  dir = jobs_dir(project_dir)
  FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
  dir
end

.ensure_json_storage_dir(project_dir = Dir.pwd) ⇒ Object



73
74
75
76
77
# File 'lib/aidp/config_paths.rb', line 73

def self.ensure_json_storage_dir(project_dir = Dir.pwd)
  dir = json_storage_dir(project_dir)
  FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
  dir
end

.ensure_progress_dir(project_dir = Dir.pwd) ⇒ Object



49
50
51
52
53
# File 'lib/aidp/config_paths.rb', line 49

def self.ensure_progress_dir(project_dir = Dir.pwd)
  dir = progress_dir(project_dir)
  FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
  dir
end

.ensure_providers_dir(project_dir = Dir.pwd) ⇒ Object



61
62
63
64
65
# File 'lib/aidp/config_paths.rb', line 61

def self.ensure_providers_dir(project_dir = Dir.pwd)
  dir = providers_dir(project_dir)
  FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
  dir
end

.ensure_security_dir(project_dir = Dir.pwd) ⇒ Object



85
86
87
88
89
# File 'lib/aidp/config_paths.rb', line 85

def self.ensure_security_dir(project_dir = Dir.pwd)
  dir = security_dir(project_dir)
  FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
  dir
end

.evaluations_dir(project_dir = Dir.pwd) ⇒ Object



26
# File 'lib/aidp/config_paths.rb', line 26

def self.evaluations_dir(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "evaluations")

.evaluations_index_file(project_dir = Dir.pwd) ⇒ Object



27
# File 'lib/aidp/config_paths.rb', line 27

def self.evaluations_index_file(project_dir = Dir.pwd) = File.join(evaluations_dir(project_dir), "index.json")

.execute_progress_file(project_dir = Dir.pwd) ⇒ Object



13
# File 'lib/aidp/config_paths.rb', line 13

def self.execute_progress_file(project_dir = Dir.pwd) = File.join(progress_dir(project_dir), "execute.yml")

.harness_state_dir(project_dir = Dir.pwd) ⇒ Object



15
# File 'lib/aidp/config_paths.rb', line 15

def self.harness_state_dir(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "harness")

.harness_state_file(mode, project_dir = Dir.pwd) ⇒ Object



16
# File 'lib/aidp/config_paths.rb', line 16

def self.harness_state_file(mode, project_dir = Dir.pwd) = File.join(harness_state_dir(project_dir), "#{mode}_state.json")

.jobs_dir(project_dir = Dir.pwd) ⇒ Object



19
# File 'lib/aidp/config_paths.rb', line 19

def self.jobs_dir(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "jobs")

.json_storage_dir(project_dir = Dir.pwd) ⇒ Object



22
# File 'lib/aidp/config_paths.rb', line 22

def self.json_storage_dir(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "json")

.logs_dir(project_dir = Dir.pwd) ⇒ Object



25
# File 'lib/aidp/config_paths.rb', line 25

def self.logs_dir(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "logs")

.mcp_risk_profile_file(project_dir = Dir.pwd) ⇒ Object



33
# File 'lib/aidp/config_paths.rb', line 33

def self.mcp_risk_profile_file(project_dir = Dir.pwd) = File.join(security_dir(project_dir), "mcp_risk_profile.yml")

.model_cache_dir(project_dir = Dir.pwd) ⇒ Object



23
# File 'lib/aidp/config_paths.rb', line 23

def self.model_cache_dir(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "model_cache")

.progress_dir(project_dir = Dir.pwd) ⇒ Object



12
# File 'lib/aidp/config_paths.rb', line 12

def self.progress_dir(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "progress")

.provider_info_file(provider_name, project_dir = Dir.pwd) ⇒ Object



18
# File 'lib/aidp/config_paths.rb', line 18

def self.provider_info_file(provider_name, project_dir = Dir.pwd) = File.join(providers_dir(project_dir), "#{provider_name}_info.yml")

.providers_dir(project_dir = Dir.pwd) ⇒ Object



17
# File 'lib/aidp/config_paths.rb', line 17

def self.providers_dir(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "providers")

.secrets_registry_file(project_dir = Dir.pwd) ⇒ Object



31
# File 'lib/aidp/config_paths.rb', line 31

def self.secrets_registry_file(project_dir = Dir.pwd) = File.join(security_dir(project_dir), "secrets_registry.json")

.security_audit_log_file(project_dir = Dir.pwd) ⇒ Object



32
# File 'lib/aidp/config_paths.rb', line 32

def self.security_audit_log_file(project_dir = Dir.pwd) = File.join(security_dir(project_dir), "audit.jsonl")

.security_dir(project_dir = Dir.pwd) ⇒ Object

Security module paths



30
# File 'lib/aidp/config_paths.rb', line 30

def self.security_dir(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "security")

.work_loop_dir(project_dir = Dir.pwd) ⇒ Object



24
# File 'lib/aidp/config_paths.rb', line 24

def self.work_loop_dir(project_dir = Dir.pwd) = File.join(aidp_dir(project_dir), "work_loop")