← back to ClawCoder

src/lib/generator/rules.ts

19 lines

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

export interface RuleFile {
  path: string
  content: string
}

/**
 * Generate .claude/rules/ files for the given profile.
 * Beginners typically have no rules files; intermediate+ profiles
 * include project-specific rules.
 */
export function generateRulesFiles(profile: Profile): RuleFile[] {
  return profile.rulesFiles.map(rf => ({
    path: rf.path,
    content: rf.content,
  }))
}