module Tina4::AI
def install_for_tool(root, tool, context)
-
(Array- list of created/updated relative file paths)
Parameters:
-
context(String) -- generated context content -
tool(Hash) -- tool entry from AI_TOOLS -
root(String) -- absolute project root path
def install_for_tool(root, tool, context) created = [] context_path = File.join(root, tool[:context_file]) # Create directories if tool[:config_dir] FileUtils.mkdir_p(File.join(root, tool[:config_dir])) end FileUtils.mkdir_p(File.dirname(context_path)) # Always overwrite -- user chose to install action = File.exist?(context_path) ? "Updated" : "Installed" File.write(context_path, context) rel = context_path.sub("#{root}/", "") created << rel puts " \e[32m✓\e[0m #{action} #{rel}" # Claude-specific extras if tool[:name] == "claude-code" skills = install_claude_skills(root) created.concat(skills) end created end