← back to ClawCoder

src/lib/generator/claude-md.ts

22 lines

import type { Profile } from '../profiles/types'
import { renderTemplate } from '../profiles/templates'

export interface GeneratorVars {
  projectName: string
  projectDescription: string
  techStack: string
}

/**
 * Generate the CLAUDE.md content for a given profile and user variables.
 */
export function generateClaudeMd(profile: Profile, vars: GeneratorVars): string {
  const templateVars: Record<string, string> = {
    projectName: vars.projectName,
    projectDescription: vars.projectDescription,
    techStack: vars.techStack,
  }

  return renderTemplate(profile.template.content, templateVars)
}