# Brand Profile Reference Full specification for loading and applying user brand profiles. Referenced from SKILL.md Step 0. ## Profile locations 1. `~/.config/kami/brand.md` (global user config, XDG-compliant, preferred) 2. `~/.kami/brand.md` (legacy fallback) If found, parse the YAML frontmatter for structured fields and treat the Markdown body below the frontmatter as freeform habit notes. If no profile exists, continue without interruption. ## Layer A: Placeholder substitution Apply at template edit time: replace matching `{{...}}` placeholders in the HTML body with profile values before building. | Profile field | Template placeholder(s) | |---|---| | `name` | `{{NAME}}`, `{{作者}}`, `{{AUTHOR}}` | | `role_title` | `{{ROLE_TITLE}}` | | `email` | `{{EMAIL}}` | | `website` | `{{WEBSITE}}`, `{{PERSONAL_SITE}}` | | `github` | `{{GITHUB_URL}}` (expand to full URL: `https://github.com/`) | | `x` | `{{X_URL}}` (expand to `https://x.com/`) | | `city` | `{{CITY}}` | | `country` | `{{COUNTRY}}` | | `company` | `{{COMPANY}}` | | `tagline` | `{{TAGLINE}}` | Rule: explicit instructions in the current conversation always override profile values (e.g. "sign it as Alex" beats `name: Tang`). Profile fills slots only; if the template has no matching placeholder, do not insert the field. ## Layer B: Session defaults Apply when the current request is ambiguous. Use profile fields to fill in missing signal silently; do not skip clarification questions for genuinely unclear intent (e.g. "make a document" still warrants asking which type). | Ambiguous signal | Profile field | Behavior | |---|---|---| | No language stated | `language` | Use `cn` / `en` / `ja` path | | No doc type stated | `default_doc_type` | Use as fallback, still ask if truly ambiguous | | No output format stated | `output_format` | `pdf` / `pptx` / `both` | | No page size stated | `page_size` | `a4` or `letter` | | Currency context unclear | `currency_locale` | `USD` -> $, M/B; `CNY` -> 元, 万/亿 | | Tone unclear | `tone` | `formal` -> deferential register; `casual` -> relaxed; `balanced` -> default | | Footer unclear | `footer_note` | Append standing disclaimer if present | | TOC decision unclear | `always_include_toc` | `true` -> auto-add TOC in long-doc / portfolio | ## Layer C: Visual customization Apply after template content is filled, before calling `build.py`: - `brand_color`: edit the `--brand` CSS variable in the template `