pub fn build_config_files(
content_map: &HashMap<String, String>,
skills: &[AgentSkill],
agent_name: &str,
agent_id: &str,
agent_slug: &str,
working_directory: &str,
provider_id: &str,
) -> Vec<AgentConfigFile>Expand description
Build the list of config files to write to the agent working directory.
Assembles the startup instructions file (CLAUDE.md, AGENTS.md,
GEMINI.md, … — resolved per provider_id via
providers::get_provider(provider_id).startup_instructions_filename;
see docs/specs/SPEC_PROVIDER_AWARE_STARTUP_INSTRUCTIONS_2026_08_24.md)
from soul + agentmd + memory + skills index, writes each skill as
a slash command under .claude/commands/<trigger>.md, writes
.claude/hooks.json if a hooks content entry is present, auto-injects
the AgentMux MCP server entry, and applies {{VARIABLE}} template
substitution throughout. An unrecognized provider_id, or one with no
confirmed native file (currently only kimi), gets no instructions
file written at all — never a silent CLAUDE.md fallback.
Mirrors buildConfigFiles() in frontend/app/view/agent/agent-model.ts.