[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AYN88VBFB9D3G7XZAFYKCH":3,"skill-same:01M7AYN88VBFB9D3G7XZAFYKCH":110},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M7AYN88VBFB9D3G7XZAFYKCH","hermes-profile-setup",null,"Create and configure Hermes profiles for separate use cases — fitness, finance, creative, research. Adapt SOUL.md from other agents (OpenClaw, Claude Code). Maintain memory across profiles.","oat431\u002Fhermes_config_backup","oat431","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F54722120?v=4","01M7AYD07EH8SYPMYY8CGZKS22","Oralita","01M7AYD0816QDF77E3TWCRSQC9",1,"MIT","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: hermes-profile-setup\ndescription: \"Create and configure Hermes profiles for separate use cases — fitness, finance, creative, research. Adapt SOUL.md from other agents (OpenClaw, Claude Code). Maintain memory across profiles.\"\nversion: 1.1.0\nauthor: OraMesLita\nlicense: MIT\nmetadata:\n  hermes:\n    triggers:\n      - \"create a profile for\"\n      - \"new profile\"\n      - \"separate context\"\n      - \"gym profile\"\n      - \"health profile\"\n      - \"adapt SOUL\"\n      - \"memory cleanup\"\n      - \"memory is full\"\n      - \"clean up memory\"\n      - \"model list\"\n      - \"provider model list\"\n      - \"model picker\"\n    related_skills: [hermes-agent]\n---\n\n# Hermes Profile Setup & Maintenance\n\nWhen to create a separate profile, how to adapt foreign agent SOUL templates, and how to keep memory lean across profiles.\n\n## When to Create a Profile\n\nCreate a **new profile** when any of these are true:\n\n- The use case is a **different domain** than your current profile (programming → fitness, fitness → finance)\n- You want **isolated memory** — health data shouldn't mix with code review context\n- You want a **different persona\u002FSOUL** — fitness coach vs DevOps engineer\n- You want **different tools\u002Fskills** — gym profile doesn't need GitHub MCP or PostgreSQL\n- You want a **cheaper model** for lightweight Q&A (health advice doesn't need deepseek-v4-pro)\n\nStay in the **same profile** when:\n\n- The task is the same domain with a different project (Python backend → React frontend)\n- You want shared memory and conventions across work\n\n## Creating a Profile\n\n```bash\n# Fresh profile (recommended for new domains)\nhermes profile create \u003Cname>\n\n# Clone config + .env + SOUL.md AND ALL skills + memory (identical setup, fresh sessions)\nhermes profile create \u003Cname> --clone\n\n# Clone everything via --clone-all (same as --clone; --clone already brings skills)\nhermes profile create \u003Cname> --clone-all\n```\n\n**Recommendation:** use `--clone` for cross-domain profiles — it copies API keys, provider config, SOUL.md, *and all installed skills* (observed output: \"Cloned config, .env, SOUL.md, and skills from default\"). It does NOT leave skills clean. Only session history and memory start fresh. **A `--clone` profile inherits every skill from the source profile — plan to prune.** Trim irrelevant skill categories after creation (e.g. a book-summarizer profile does not need `gym`, `smart-home`, `mlops`, `slidev`) so the new profile doesn't waste context on foreign skills. `hermes tools` \u002F skill pruning manage this per profile.\n\n### Smoke-test a new profile immediately\nThe generated `\u003Cname>.bat` shortcut in `~\u002F.local\u002Fbin` is not on the git-bash PATH (it just wraps `hermes -p \u003Cname>`). Verify the soul is live with a one-shot query instead:\n\n```bash\nhermes -p \u003Cname> chat -q \"Answer in one sentence: what is your name and core role?\"\n```\n\nThe reply must reflect the new SOUL.md (e.g. the book-summarizer profile answers as \"Libri, the Book Summarizer...\"). A wrong identity means the soul didn't install where expected. The reply prints directly ABOVE the `Resume this session` footer — a tight `| tail -8` can clip it to just session metadata. Use `| tail -24` or `| grep -i \"\u003Cexpected name>\"` to actually capture the answer.\n\n### Review-first gate for new souls (Panomete's rule)\nDo NOT create the profile the moment a soul is drafted. When authoring a new fleet specialist:\n1. Write the soul to the canonical collection — `F:\\obsidian_note\\hermes_config_backup\\soul-collection\\\u003CDOMAIN>\\\u003Cposition>-soul.md` — `AI-SDLC\\` for engineering souls, `Life Styles\\` for lifestyle souls. Never write souls to the collection root.\n2. Let Panomete review the soul file and explicitly approve it becoming a profile.\n3. Only after approval, run the full install checklist below.\nThis review-first gate keeps drafts out of `$HERMES_HOME\u002Fprofiles\u002F` until they're approved — approved and live = reviewed.\n\n### Post-approval install checklist (2026-09 canon, verified on career-coach \u002F journey-writer \u002F audiophile)\n1. `hermes profile create \u003Cname> --clone`\n2. Stash the clone default: `cp \u003Cprofile>\u002FSOUL.md \u003Cprofile>\u002FSOUL.md.default-clone.bak`\n3. `cp` collection soul → `\u003Cprofile>\u002FSOUL.md`, then `md5sum` both — byte-identical before proceeding.\n4. Registry (`profile-registry.md`, collection root): add routing row + append to `Profiles to create` + append to the matching soul-source line (`AI-SDLC\\` or `Life Styles\\`).\n5. Main soul (`$HERMES_HOME\u002FSOUL.md`): add a routing-table row AND a `What I Route` bullet.\n6. Sync main soul → `soul-collection\u002Fhermes-main-soul.md`.\n7. Smoke test (below), then update the fleet count in memory.\n\nAfter creation, the profile auto-generates a CLI shortcut:\n```bash\n\u003Cname> chat       # start a session\n\u003Cname> setup      # configure model\u002Fkeys\n```\n\n## Adapting SOUL.md from Other Agents\n\nOther agent frameworks (OpenClaw, Claude Code, Codex) have SOUL.md or AGENTS.md templates online. The adaptation process:\n\n### 1. Fetch the source\n```bash\ncurl -sL \"https:\u002F\u002Fraw.githubusercontent.com\u002F\u003Cuser>\u002F\u003Crepo>\u002F\u003Cbranch>\u002Fpath\u002Fto\u002FSOUL.md\"\n```\n\n### 2. Map foreign concepts to Hermes equivalents\n\n| Foreign (OpenClaw\u002FClaude Code) | Hermes equivalent |\n|---|---|\n| `~\u002F.openclaw\u002Fstate\u002F` file paths | `memory` tool for durable facts, `session_search` for past conversations |\n| `memory\u002FYYYY-MM-DD.md` daily journal | Hermes memory auto-injects every session — no manual journaling |\n| `MEMORY.md` long-term file | Persistent memory entries survive across sessions |\n| `CLAUDE.md` project context | `.hermes.md` or `AGENTS.md` in project root |\n| Local file-based state | `memory` tool + Obsidian vault if applicable |\n\n### 3. Add Hermes-specific sections\n\nEvery Hermes SOUL.md should include:\n- **Tools Available** — list which Hermes tools the profile uses (`memory`, `web`, `file`, `todo`, `clarify`)\n- **Memory & Continuity** — explain how memory persists (tool-based, not file-based)\n- **Self-update footer** — standard \"If this SOUL evolves, update it and notify the user\"\n- **Profile-aware paths** — reference the profile's own memory, not `~\u002F.hermes\u002F` global\n\n### 4. Write to the profile path\n\n```\n~\u002FAppData\u002FLocal\u002Fhermes\u002Fprofiles\u002F\u003Cname>\u002FSOUL.md    (Windows)\n~\u002F.hermes\u002Fprofiles\u002F\u003Cname>\u002FSOUL.md                 (macOS\u002FLinux)\n```\n\n### 5. Trim tools for the domain\n\nDon't load a gym profile with `terminal`, `github`, `docker` skills. The profile inherits the `cli` platform toolsets by default — suggest trimming via `hermes tools` in the new profile's shell.\n\n## Authoring Original SOULs from Scratch\n\nWhen the user wants a **new persona from their own domain** (not adapted from a foreign agent) — e.g. AI-SDLC role souls, life-style souls (educator, financial advisor, deck-builder) — use this workflow. It differs from adaptation: there's no source template, so the persona must be *grilled into existence* before writing.\n\n### 1. Grill first, write after (most important rule)\nNever invent a persona. Run the interview (via `grill-me` \u002F `grill-with-docs`, or manually if the user is mid-conversation) to pin:\n- **Who** the persona serves and their boundaries (e.g. \"serves only me\", \"any audience\")\n- **Philosophy** — teaching style, risk stance, design taste\n- **Deliverables** — what they produce and in what format (Obsidian md? PPTX? Excel formulas?)\n- **Expertise level** — \"graduate of which BOK\" (see below)\n- **Priority awareness** — 🔴\u002F🟡\u002F🟢 behavior like a real worker\n- **Personality** — warmth\u002Fterseness, tone, direct vs encouraging\n\n**Grill format that works with Panomete:** numbered questions with lettered options (a\u002Fb\u002Fc\u002Fd) plus an escape hatch (\"d) your call\"), max ~10 per round (9–10-question grills landed cleanly 2026-09), and he answers in shorthand (`1a, 2b, 3d`). Use a numbered list in chat, NOT the `clarify` tool — clarify only supports one question with ≤4 choices, which is too slow for a multi-question grill. Works for both new souls (identity\u002Fscope\u002Foutput\u002Flanguage\u002Fdestination\u002Ftone\u002Fcoverage) and upgrades (scope of level-up, what to preserve, doc depth).\n\nPush back on vague answers; each follow-up question makes the SOUL sharper. A \"sharp specialist\" beats a \"blurry generalist\" every time.\n\n### 2. Naming & layout convention\n- `[position]-soul.md` (e.g. `product-owner-soul.md`, `educator-soul.md`)\n- Collection root with domain subfolders:\n  ```\n  soul-collection\u002F\u003CDOMAIN>\u002F          e.g. soul-collection\u002FAI-SDLC\u002F\n    \u003Cposition>-soul.md\n  ```\n- One person wearing several hats = one soul per *role*, not one per person.\n\n### 3. Anatomy (borrows the AI-SDLC template)\nCore Principles → Identity (name\u002Frole\u002Femoji\u002Fvibe\u002Fmission) → **Role Boundary** (for specialist\u002Fproduct souls: who owns what across the fleet) → Knowledge Base (vault-grounded) → Core Techniques (applied, not named) → Owned Documents (🔴\u002F🟡\u002F🟢 with template paths + depth) → Handoff Protocol (outgoing\u002Fincoming) → Priority Protocol → Execution Style → Collaboration Rules → Quality Gates.\n\nThis anatomy is a template, not a straitjacket — lifestyle souls reorder\u002Fomit sections to match the domain (deck\u002Feducator souls have no Priority Protocol section, and that's fine). Souls that produce **visual output** (UI, decks, dashboards, diagrams) also carry a **Brand Compliance (Panomete CI)** section: brand root `F:\\obsidian_note\\oralita_md\\personal\\brand\\` (locked 2026-08-25: primary `#1FB854`, secondary `#1EB88E`, accent `#1FB8AB`, Sarabun + JetBrains Mono) with Apply-when \u002F Skip-when \u002F ask-if-unsure rules. Text-only souls (audiophile, career-coach, journey-writer) skip it.\n\n**Role Boundary section** (added 2026-08-06 after 4 specialist upgrades): when a soul shares a fleet with other specialist profiles, include a dedicated section that states explicitly what this role owns vs. what DevOps\u002FFull-Stack\u002FQA\u002FPO own. This prevents cross-profile turf confusion — without it, specialist souls tend to absorb responsibilities that belong to other profiles. Every specialist soul upgraded in batch (devops, qa, product-owner, data-engineer) needed one.\n\n### 4. Ground each soul in the user's BOK vault\nEach soul is a \"graduate\" of the BOK(s) that own its documents. The knowledge is **live**, so point at real vault paths, not titles:\n- `body-of-knowledge\u002F\u003CBOK>\u002F\u003Cchapter>.md` — the curriculum the soul reads\n- `document_template\u002F\u003Ccategory>\u002F\u003Cdoc>.md` — the templates the soul owns (with Heavy\u002FMed\u002FLight depth)\n- `career-path\u002F\u003CNN>_\u003CRole>\u002F00_overview.md` — competence anchor\n- `software-engineering-note\u002F\u003CKA>\u002F` — deep domain notes\n\n**Verify every referenced path resolves** after writing — stale template names are the #1 error. See `references\u002Fsoul-authoring-vault-grounded.md` and run `scripts\u002Fverify_soul_refs.py`.\n\n## Upgrading an Existing SOUL to a New Career Level\n\nWhen the user has a career-path vault (`swe-knowledge\u002Fcareer-path\u002F\u003CNN>_\u003CRole>\u002F`) and asks to level up an existing specialist soul (e.g. full-stack → senior), run the upgrade workflow in `references\u002Fsoul-level-upgrade.md`:\n\n1. **Inventory the career path first** — read the target `00_overview.md` + every capability-area `00_overview.md` (the mid-vs-senior tables state the exact behavior shift).\n2. **Gap-analyze the current soul** — capability × coverage (✅\u002F🟡\u002F❌) table. Expect 5–7 missing areas on a level-up; that's the point.\n3. **Keep what survives** — carry forward still-valid principles (Dependency Rule, ADR discipline, API-contract-first) and preserve identity; elevate role line + philosophy (\"code is the product\" → \"outcomes are the product\").\n4. **Flip the career anchor** to the new level; add BOKs the new capability areas cite (BABOK\u002FPMBOK\u002FCyBOK for senior).\n5. **Same review-first gate + sync flow** as new souls: collection file → user review → approve → backup → copy → md5sum → smoke test. Registry\u002Fmain-soul routing rows change only for NEW profiles, not level upgrades.\n\n### Product\u002Fbusiness path variant\n\nNot every career path entered from Senior Software Engineer is a senior-specialist engineering path. For paths whose overview declares `career_family: product-and-business` or `level: manager` (for example, Product Manager), use a layered product upgrade rather than copying the Senior SWE soul:\n\n1. **Make the product path primary.** Map every product capability area (for example, discovery, strategy, prioritization, roadmapping, analytics, requirements, and technical partnership) to an operating charter.\n2. **Use Senior SWE as a foundation.** When `entry_from` includes Senior Software Engineer, include all nine senior capabilities in a compact mapping table, but translate them into product behavior instead of duplicating engineering techniques.\n3. **Elevate from backlog ownership to outcome ownership.** Add customer evidence, market context, strategic choices, measurable outcomes, living roadmaps, learning loops, and post-launch outcome review.\n4. **Declare role boundaries.** Product owns the problem, why, outcomes, and priority; engineering owns how; QA and DevOps provide quality and operational evidence. Do not silently turn the soul into a project manager, engineering manager, or architect.\n5. **Ground product documents in verified templates.** If a canonical backlog, roadmap, or experiment template does not exist, label it project-specific or external instead of inventing a vault path.\n6. **Treat career-path wikilinks as leads, not proof.** Career notes may contain illustrative or stale links. Verify every referenced path against the live filesystem before copying it into a soul.\n\nSee `references\u002Fproduct-business-soul-upgrade.md` for the reusable capability map, document map, boundary rules, and review checklist.\n\nFor a batch worked example showing the specialist-path upgrade pattern applied to 4 souls (devops, qa, product-owner, data-engineer) in one session — including the Role Boundary section, principle-count growth, BOK expansion, and sync flow — see `references\u002Fspecialist-path-batch-upgrade.md`.\n\n## Syncing Profiles to the Soul Collection\n\nWhen the collection is updated (soul upgraded, persona changed) and the user wants existing profiles updated, sync each `$HERMES_HOME\u002Fprofiles\u002F\u003Cname>\u002FSOUL.md` to its collection counterpart. Do NOT assume a profile is stale — verify first.\n\n### 1. Find stale profiles with a hash diff\n```bash\ncd \"$HERMES_HOME\u002Fprofiles\" && md5sum *\u002FSOUL.md\nmd5sum ~\u002Fsoul-collection\u002F\u003CDOMAIN>\u002F*.md\n```\nA profile is stale when its `SOUL.md` hash ≠ the matching collection file's hash. Matching by content hash, not size or date — that's how you catch \"same-ish but different\" souls. Life-style souls that weren't touched stay in sync automatically; only the re-authored ones go stale.\n\n### 2. Name-mapping pitfall\nProfile dir name ≠ collection filename (and ≠ subfolder). Map manually — and update the map every time the fleet grows:\n```\nproduct-owner      ↔ AI-SDLC\u002Fproduct-owner-soul.md\nfull-stack         ↔ AI-SDLC\u002Ffull-stack-developer-soul.md    (NOT full-stack-soul.md)\ndevops             ↔ AI-SDLC\u002Fdevops-engineer-soul.md\nqa                 ↔ AI-SDLC\u002Fqa-engineer-soul.md\nui-ux              ↔ AI-SDLC\u002Fui-ux-designer-soul.md\ncareer-coach       ↔ Life Styles\u002Fcareer-coach-soul.md\njourney-writer     ↔ Life Styles\u002Fjourney-writer-soul.md\naudiophile         ↔ Life Styles\u002Faudiophile-soul.md\n```\nWriting a verification loop that guesses `\u003Cprofile>-soul.md` will report false \"MISMATCH\" on every profile whose collection name has a middle token. Use an explicit `declare -A` map instead, and have the loop search BOTH `AI-SDLC\u002F` and `Life Styles\u002F`.\n\n### 3. Back up before overwriting\nOld souls are not recoverable once overwritten (the collection file was already replaced). Canonical backup root (Panomete, 2026-09 — replaces the retired `profiles\u002F_soul_backup_*` dated-dir pattern): `F:\\obsidian_note\\hermes_config_backup\\soul-collection\\`, with live souls under `AI-SDLC\\` \u002F `Life Styles\\` subfolders. For pre-overwrite stashes use a dated archive subfolder:\n```bash\nBK=\"F:\u002Fobsidian_note\u002Fhermes_config_backup\u002Fsoul-collection\u002F_archive\u002F$(date +%Y%m%d)\" && mkdir -p \"$BK\"\nfor d in \u003Cstale-profiles>; do cp \"$d\u002FSOUL.md\" \"$BK\u002F${d}-SOUL.md.bak\"; done\n```\n\n### 4. Copy, then re-verify\n```bash\ncp \u003Ccollection>\u002F\u003Cfile>-soul.md \u003Cprofile>\u002FSOUL.md\n# re-run md5sum: profile hash must now equal collection hash (byte-identical)\n```\n\n### 5. Tell the user the running-session caveat\nAlready-running sessions keep the old soul (Hermes never mutates a live system prompt). New sessions pick up the new SOUL.md. Recommend opening a fresh session per profile to see the change.\n\n### 6. Remember the main soul\nThe default\u002Fmain profile's SOUL lives at `$HERMES_HOME\u002FSOUL.md` (not in `profiles\u002F`). Back it up to the collection root (e.g. `soul-collection\u002Fhermes-main-soul.md`) when iterating on it — it's the file that governs the base agent.\n\n## Replicating the Setup to a New Machine\n\nWhen the user wants the whole Hermes setup on another computer (new PC, friend's PC, disaster recovery) — full verified detail in `references\u002Fmachine-replication-handoff.md`.\n\n1. **Grill the scope first** (same numbered-options format as souls): base-only vs fleet, searxng local vs homelab, OpenRouter model tier, target OS, who owns the API keys. The answers define the runbook.\n2. **The GitHub repo is the handoff source** (`oat431\u002Fhermes_config_backup`): `workflow\u002F` = skills (`hermes-main-profile\u002F` + `shared-skills\u002F` + per-profile folders), `soul-collection\u002F` = souls + registry, runbook `Hermes-Setup-Install.md` at repo root. (`oat431\u002Foralita_md` is STALE legacy — never point a new machine there.) `git push` before going.\n3. **Skill install:** `hermes skills tap add oat431\u002Foralita_md` + `hermes skills install \u003Cname>` — but taps resolve the `skills\u002F` folder ONLY; skills under a different path (e.g. `workflow\u002F`) are invisible to taps → fallback is direct raw-URL install of the SKILL.md.\n4. **Profile handoff:** `hermes profile export` works but ships caches (~105 MB). Lean copy = `SOUL.md` + `memories\u002F` + `config.yaml` only; skip `state.db`, `sessions\u002F`, caches.\n5. **Profile skills are NOT in the main skills dir.** Each profile's `skills\u002F` folder holds its own custom skills (created inside that profile's sessions) that do NOT appear in `$HERMES_HOME\u002Fskills\u002F`. A backup that only walks the main skills dir silently misses them. Backup layout is SHALLOW skill dirs only — `workflow\u002Fhermes-main-profile\u002F\u003Cskill>\u002F` + `workflow\u002F\u003Cprofile>\u002F\u003Cskill>\u002F`, never a deep `skills\u002F` tree copy (that is clone bloat; see \"Syncing Created Skills to the Backup Repo\") — plus a **shared-skills dedup layer**:\n   - Hash-verify (md5sum) every copy of a multi-profile skill BEFORE consolidating. All copies identical → move one copy to `workflow\u002Fshared-skills\u002F`, delete the per-profile copies, and write a `shared-skills\u002FREADME.md` listing what's shared and what stays local.\n   - A profile with a **divergent variant** keeps its local copy (e.g. ui-ux's `grill-me`\u002F`grill-with-docs`, career-coach's `obsidian-vault-builder`).\n   - A skill with **many** variants never gets shared (e.g. `hermes-profile-setup` had 4 — stays per-profile).\n   - Net effect 2026-09: 8 skills shared, 59 duplicate copies removed.\n   Restore by copying back into `%LOCALAPPDATA%\\hermes\\profiles\\\u003Cname>\\skills\\`.\n5. **🔴 SECRET HYGIENE (hard rule):** never copy `config.yaml` into a public repo as-is — `mcp_servers.\u003Cname>.env` carries live tokens (GitHub PATs, DB URLs with passwords). Sanitize to the model block only. GitHub push protection (GH013) blocks the push — treat the rejection as a gift: nothing landed, but the secret **transited GitHub's servers**, so amend the local commit (`git commit --amend`) AND recommend token rotation.\n6. **Skill publishing:** `hermes skills publish --to github --repo \u003Cowner\u002Frepo> \u003Cskill_path>` scans the skill, then creates a PR (it does NOT push directly). The merge API 404s on bot-created PRs → squash-merge locally (`git fetch origin pull\u002FN\u002Fhead:branch`, `git merge --squash`, push), then close the PR and delete the branch via API. Strip `__pycache__`\u002F`.pyc` from the merged set.\n7. **User-facing runbook format (Panomete):** numbered steps, every command explained, tables for ladders\u002Fchecklists, Mermaid flow at top, verification checklist at the end, written into the vault and pushed to the repo.\n\n## Syncing Created Skills to the Backup Repo (workflow\u002F)\n\nRun whenever the user asks to back up \"skills created along the way\" — it recurs every few weeks as the fleet grows.\n\n1. **Inventory**: walk `$HERMES_HOME\u002Fskills\u002F` (main) AND every `$HERMES_HOME\u002Fprofiles\u002F\u003Cname>\u002Fskills\u002F` (profile skills do NOT appear in the main dir). Content-hash each SKILL.md against the backup copy — new or changed are the sync candidates.\n2. **Author gate**: back up only user-created skills — check the `author:` frontmatter (this fleet: Panomete \u002F OraMesLita \u002F Hermes-authored). Cross-check community packs by hashing against the bundled tree at `$HERMES_HOME\u002Fhermes-agent\u002Fskills\u002F`; name-matching alone misses renamed or re-grouped copies, so hash is the tiebreaker. **The bundle hash alone under-reports:** packs installed from a skills registry are not in the bundled tree, so they pass the hash test and pollute the candidate list. The reliable third signal is **recurrence across homes** — a skill present in nearly every profile (30–40 per home, same names) is a distributed pack, while genuine profile work appears in one or two homes. Rank candidates by `len(homes)` ascending and only the 1–3-home tail is real.\n3. **Shallow dirs only**: entries live at `workflow\u002Fhermes-main-profile\u002F\u003Cskill>\u002F`, `workflow\u002F\u003Cprofile>\u002F\u003Cskill>\u002F`, `workflow\u002Fshared-skills\u002F\u003Cskill>\u002F`. A `workflow\u002F\u003Cprofile>\u002Fskills\u002F...` deep tree means a copy swallowed the entire live skills dir (~90–118 preloaded skills per profile, tens of MB) — that is bloat to purge, since Hermes ships those anyway.\n4. **Rescue before purge**: real user skills can hide inside those deep junk trees, never promoted to the shallow level. Classify EVERY orphan directory by author + bundle hash and copy the user-created ones to their shallow spot before deleting the tree — a purge without this step silently destroys unique work.\n5. **Soul check with CRLF awareness**: hash-compare every live `profiles\u002F\u003Cname>\u002FSOUL.md` against its collection counterpart using the explicit name map (see name-mapping pitfall). A plain `diff` can report the whole file changed from pure CRLF-vs-LF line-ending noise — before concluding a soul differs, compare normalized content (`replace('\\r\\n','\\n').strip()`), and only then weigh mtimes; a \"newer\" backup file with identical normalized content needs no update.\n6. **Secret-scan the staged diff before committing**: `git diff --cached | grep -oE \"ghp_|sk-[A-Za-z0-9]{20,}|AIza\"` (or your provider's key prefixes) and review hits by direction — a match inside `deleted file` hunks of purged preloaded helper scripts is removal, not a leak; a match in `+` lines blocks the commit.\n7. **Close out**: update `workflow\u002FOverview.md` counts and the per-profile table to the verified post-sync numbers, commit, push, and correct the fleet entry in memory only if the profile roster changed.\n\n## Routing-Generalist Main Soul (multi-profile fleets)\n\nOnce the user has specialist profiles, the **main soul's job changes**: it stops being another specialist and becomes the *router\u002Foperator* — the one who \"knows lots of things AND knows lots of people.\" This pattern (full detail + worked example: `references\u002Frouter-generalist-main-soul.md`):\n\n- **Hard handoff protocol** — when a question matches a specialist domain: (1) 2-3 sentence summary, (2) direct routing line (\"This is a `full-stack` task.\"), (3) context to bring. Be straight, not wishy-washy.\n- **\"What I Do \u002F What I Route\" split** — light work (chat, research, quick scripts, Hermes config, soul creation) done directly; deep work (code→full-stack, bugs→qa, design→ui-ux, homelab→devops, money→financial-advisor, lessons→educator, decks→deck) routed, never half-done.\n- **New-specialist triggers** — depth signal (question needs real depth in a domain with no profile) or repeated signal (same kind of question 2-3×) → *recommend* creating a soul, never create unilaterally.\n- **`profile-registry.md`** — a routing table (profile → domain → owns → trigger phrases → emoji) living in the soul-collection root. Single source of truth for routing AND the re-install manifest for a new device (profile list, soul sources, MCP servers).\n- **Keep the old persona** when re-purposing: same name\u002Femoji\u002Fvibe, changed role description + routing table. The user keeps their identity; the job changes.\n\n### SOUL.md load semantics (verified in source)\nSOUL.md is **auto-injected at conversation start** (the `--ignore-rules` flag: \"Skip auto-injection of AGENTS.md, SOUL.md, .cursorrules, memory\"). The system prompt is **byte-stable for the life of a conversation** — a live session keeps its old soul no matter what you edit. A **new conversation** picks up the new soul; **restarting the app only helps if it starts a fresh chat** (resuming an old session does nothing). Tell the user: open a new chat, don't just restart.\n\n## Memory Maintenance\n\nMemory fills up from procedural entries, stale stats, and duplication. Clean it periodically.\n\n### Audit pattern\n\n1. **Read current state:** check the memory and user profile percentages in the system prompt header\n2. **Categorize entries:**\n   - ✅ **Keep:** identity facts, preferences, paths, security rules\n   - ❌ **Remove:** procedural rules (belong in SOUL.md or skills), stale completion stats, task logs\n   - ⚠️ **Consolidate:** entries duplicated across memory + user profile\n3. **Batch operations:** use `memory(operations=[...])` for atomic changes — never multiple single-operation calls\n4. **Verify:** check new percentages after the batch completes\n\n### What never belongs in memory\n\n- Procedural rules (\"always do X, never do Y\") → SOUL.md or skill\n- Task progress (\"completed phase 3\", \"merged PR #42\") → session_search\n- Stale counts (\"12 files done, 5 remaining\") → they rot within days\n- Environment-specific failures (\"pip install failed\") → fix the environment, don't memorialize the error\n\n### What belongs in memory\n\n- User identity, preferences, and style\n- Persistent paths (Obsidian vaults, project roots)\n- Security rules and boundaries\n- Domain-specific context (homelab URL, tech stack)\n\n### Cleaning stale entries\n\nWhen Obsidian or another external system is the source of truth, memory should only hold the **path** and the **pattern** — not the current completion state. \"Vault at F:\\projects\\orlita_md\\, numbered folders\" is durable. \"Math (12 files), English (27 files)\" is stale in a week.\n\n## Configuration Audit for Specific Use Cases\n\nWhen auditing a profile for a specific use case (e.g., programming):\n\n### Priority order\n1. **Safety nets:** fallback model (uncommented), checkpoints enabled, approval mode\n2. **Cost:** model choice matches the domain (coding needs reasoning, health Q&A doesn't)\n3. **Memory headroom:** under 60% is healthy, over 80% needs pruning\n4. **Tools:** MCP servers and skills relevant to the domain\n5. **UX:** streaming, cost display, reasoning effort tuned to the task\n\n### Common misses\n- Fallback model commented out → no automatic failover on 429\u002F503\n- `checkpoints.enabled: false` → no `\u002Frollback` safety net during refactors\n- `approvals.mode: manual` → excessive friction; `smart` uses LLM to auto-approve low-risk commands\n- `reasoning_effort: medium` on coding profiles → bump to `high` for architecture decisions\n- `terminal.timeout: 180` → too tight for docker builds or large test suites\n\n## Bulk Provider\u002FModel Migration Across All Profiles\n\nWhen the user switches the whole fleet to a new provider\u002Fmodel (e.g. \"unsubscribed z.ai, everything on QwenCloud token plan now\"), do it as one systematic sweep, not profile-by-profile ad-hoc:\n\n1. **Survey first** — read every `config.yaml` model block at once (`hermes config get model` for main; `hermes --profile \u003Cname> config get model` per profile). Build a table: current provider \u002F default \u002F base_url. Note profiles on the *old* provider AND profiles with a *stale* `base_url` from the previous provider — both need fixing.\n2. **Standardize provider + default** via the CLI (never hand-edit `config.yaml` — the patch tool refuses and a stray indent corrupts it): `hermes config set model.provider \u003Cp>` + `hermes config set model.default \u003Cm>` (prefix `--profile \u003Cname>` for each profile).\n3. **Strip stale base_urls** — `hermes config unset model.base_url` (main) \u002F `--profile \u003Cname>`. Let the provider resolve its endpoint from the env var; a leftover DeepSeek\u002Fz.ai URL is the classic breakage.\n4. **🔴 Per-profile `.env` is NOT inherited from main.** Each profile's `$HERMES_HOME\u002Fprofiles\u002F\u003Cname>\u002F.env` is a separate file. When you migrate profiles to a provider whose key lives in the main `.env`, you MUST copy the key (and any base_url override) into **every** profile's `.env`. This session: `financial-advisor` and `product-owner` had no `DASHSCOPE_API_KEY`; `book-summarizer`, `data-engineer`, `security-engineer` had no `DASHSCOPE_BASE_URL` — all would have silently failed auth. Audit with a grep loop over `profiles\u002F*\u002F.env` for the provider's env var and fill the gaps.\n5. **Create missing configs** — some profiles may lack `config.yaml` entirely (e.g. `product-owner` had only `profile.yaml` with a `ui_meta` block, no model config). Copy a known-good sibling's config, set the model block, and inject real secrets in-shell (see secret hygiene below).\n6. **Verify the whole sweep** — re-run `hermes config get model` + `--profile \u003Cname>` for every profile; confirm provider\u002Fdefault\u002Fbase_url are uniform and no stale provider (`zai`\u002F`deepseek`\u002F`openrouter`) remains. Watch for false positives from `fallback_providers:` blocks and commented `# provider:` templates.\n\n**Faster alternative — Python script for 10+ profiles:** when the fleet is large,\nrunning `hermes config set` per profile is slow. Use a Python script with\n`re.sub` to patch all `config.yaml` files at once, then verify with the CLI.\nThe script replaces the `default:` value inside each model block. Template:\n\n```python\nimport os, re\nHOME = os.environ[\"HERMES_HOME\"]\nNEW_MODEL = \"qwen3.8-flash\"\nfor p in os.listdir(os.path.join(HOME, \"profiles\")):\n    if p.startswith(\"_\"): continue\n    cfg = os.path.join(HOME, \"profiles\", p, \"config.yaml\")\n    if not os.path.exists(cfg): continue\n    with open(cfg, encoding=\"utf-8\") as f:\n        text = f.read()\n    text = re.sub(r\"^  default: .*$\", f\"  default: {NEW_MODEL}\", text, flags=re.M)  # whole-line replace, see pitfalls\n    with open(cfg, \"w\", encoding=\"utf-8\") as f:\n        f.write(text)\n```\n\nThen set the main config: `hermes config set model.default \u003Cmodel>`. Verify\nevery profile after with a grep loop over `hermes config get`.\n\n**Regex-sweep pitfalls (each broke a real sweep):**\n- Replace the WHOLE `key: value` line (anchored `^  default: .*$` + `re.M`), never `\\s*`-after-colon with an insert — `\\s*` swallows the newline when the old value is empty and glues the new value onto the next one (`default: mimo-v2.6-promimo-v2.6-pro`). A `\\S+`-value pattern silently skips an empty `default:`, leaving the profile on no model.\n- `base_url` cleanup must match 2-space lines under `model:` only. `fallback_providers:` entries carry their own 4-space `base_url` (often `''`) — those are per-fallback settings, not stale endpoints; leave them alone.\n- Re-read and assert on every file in the same run (`default:`\u002F`provider:` parse to the expected values) before reporting done — a \"N files updated\" log cannot see a doubled value or an untouched empty one.\n\n`^  default: ` (2-space, anchored) is safe on single-model-block configs; if a config carries extra model blocks (fallback, TTS), scope the sub to the `^model:` block first.\n\n**Secret hygiene while bulk-editing:** never `echo` a live token into chat output. Use `grep '\u003CKEY>=' main\u002F.env >> profile\u002F.env` (redirection, no display) or, when a file must be written fresh, write a `__PLACEHOLDER__` then `REAL=$(grep ...); sed -i \"s|__PLACEHOLDER__|$REAL|\"` so the value never appears in the transcript.\n\n**Provider keys can live in `auth.json`, not just `.env`.** Credentials added via `hermes setup` or by hand land in `auth.json` → `credential_pool.\u003Cprovider>[]`. Two traps: (1) the secret field name varies by entry — `access_token`, `api_key`, `key` — so `entry.get(\"api_key\") or entry.get(\"key\")` reports \"no key\" for a perfectly valid manual entry; probe `secret_fingerprint` presence instead. (2) 🔴 A named profile reads ONLY its own `auth.json`\u002F`.env` — the root store is never a fallback — so a root-added credential must be backfilled per profile (copy the `credential_pool` entry or re-run provider setup per profile) and smoke-tested with `hermes -p \u003Cname> chat -q`. A fleet whose configs already point at the new provider can still be unauthenticated in every profile.\n\n**Token-plan key specifics (QwenCloud \u002F Alibaba Token Plan):** the key authenticates against the Anthropic-format gateway, so `DASHSCOPE_BASE_URL=https:\u002F\u002Ftoken-plan.ap-southeast-1.maas.aliyuncs.com\u002Fapps\u002Fanthropic` is required in every profile `.env`. Unset it and the `alibaba` provider falls back to the OpenAI-compatible `dashscope-intl` endpoint, which rejects the token-plan key.\n\n**A model listed anywhere is NOT proof the key can call it.** `provider_models_cache.json` aggregates listings across providers, so a model seen next to your provider's block may belong to another (kimi-k3 under openrouter), and even models inside your provider's list can be plan-ineligible (\"Access to model denied — check eligibility\") or absent (\"Model not exist\"); the token-plan gateway may not even expose `\u002Fmodels`. Before bulk-switching any fleet to a named model, live-test it with the real key — POST one tiny `chat` message to `$DASHSCOPE_BASE_URL\u002Fv1\u002Fmessages` (header `x-api-key`, `anthropic-version: 2023-06-01`) and require a 200 with content in the reply. An unverified model never goes into N configs; if it fails, report that and leave profiles untouched.\n\n### Provider Model List (picker) Maintenance\n\nThe picker's rows do **not** come from `config.yaml` — a home stores no model list. They resolve from a\nper-home `provider_models_cache.json` (keyed by credential fingerprint), then a curated static\nfallback, then models.dev metadata. So \"the provider's model list is stale\u002Fmissing\" is a per-home\ncache fix, not a config edit. Three rules that do not bend:\n\n- **Never hand-edit `provider_models_cache.json`** — a row with a wrong fingerprint is invalid and the\n  next picker open silently replaces it with the curated fallback.\n- **Write through `hermes_cli.models.update_provider_cache_entry(slug, models)`** (Hermes venv\n  interpreter), setting `HERMES_HOME` and loading that home's `.env` before each call — the fingerprint\n  hashes the provider env vars, and env keys must be cleared between homes.\n- **Verify with `cached_provider_model_ids(slug, non_blocking=True)`**, the function the UI uses; the raw\n  JSON can look right while the read path filters rows away.\n\nA served list that exactly equals the curated static list means the live probe failed — that is not\nproof about the account's entitlement. Full procedure, probe-result decoding, and the durable\nslug-based alternative: `references\u002Fprovider-model-list-maintenance.md`.\n\n## Troubleshooting a Broken Profile (gateway setup \u002F no provider \u002F no MCP)\n\nSymptom: a profile loads but (a) shows a \"gateway needs setup\" prompt, (b) has no provider\u002Fmodel available, (c) reports no MCP servers. All three hit the `deck` profile in one session (2026-08) — root causes, in order of likelihood:\n\n1. **Missing `_config_version`** → `hermes config check --profile \u003Cname>` reports `Config version: 0 → N (update available)`. Hermes treats the profile as unconfigured and asks for gateway setup. Fix: add `_config_version: \u003CN>` (copy the current value from the main `$HERMES_HOME\u002Fconfig.yaml`) as the first line of `profiles\u002F\u003Cname>\u002Fconfig.yaml`.\n2. **Empty `gateway: {}` block** in the profile config confuses startup. Working profiles have **no** `gateway` key at all. Fix: delete the empty block.\n3. **Stale `base_url` mismatched with `provider` protocol** → e.g. `provider: alibaba` + a leftover DeepSeek\u002Fz.ai\u002FOpenRouter URL breaks model loading. This exact bug was found in `career-coach`, `gym`, `full-stack` (stale DeepSeek URLs after switching provider) and `deck`. Fix: remove the stale `base_url` so the provider resolves its own endpoint (`hermes config unset model.base_url --profile \u003Cname>`), or set one matching the provider protocol.\n\n   ⚠️ **Token-plan nuance (do NOT over-generalize \"Anthropic URL = broken\").** The `alibaba` provider's *default* endpoint is OpenAI-compatible (`dashscope-intl.aliyuncs.com\u002Fcompatible-mode\u002Fv1`). BUT the **QwenCloud Token Plan key only authenticates against the Anthropic-format gateway** `https:\u002F\u002Ftoken-plan.ap-southeast-1.maas.aliyuncs.com\u002Fapps\u002Fanthropic`. So for a token-plan key, an Anthropic-format `base_url` is *correct*, not a bug — it must be set via the `DASHSCOPE_BASE_URL` env var (see the bulk-migration section below). The rule is: **the protocol must match whatever endpoint the key is actually provisioned for**, not a fixed \"alibaba = OpenAI-compat\" assumption.\n4. **`mcp_servers` block missing** → MCP servers are **NOT inherited from main config**; each profile's `config.yaml` needs its own block. A bare `mcp: {}` is not a config. Fix: copy the 5 standard servers (github, postgres, drawio, filesystem, searxng) from the main config into the profile file.\n5. **Model not served by the configured provider** → check `hermes config check --profile \u003Cname>` output for which env vars the provider expects (e.g. `DASHSCOPE_API_KEY` for alibaba, `GLM_API_KEY`\u002F`ZAI_API_KEY` for zai) and confirm the model name exists on that plan.\n\nFix flow: `hermes config check --profile \u003Cname>` → patch `config.yaml` (version + remove gateway + fix base_url + add mcp_servers) → `hermes gateway restart --profile \u003Cname>` to pick up the changes.\n\n## Pitfalls\n\n- **Don't clone-all for cross-domain profiles.** GitHub MCP, PostgreSQL, and Docker skills in a fitness profile waste memory and confuse context.\n- **Don't keep procedural rules in memory.** They get re-read as directives each session, creating self-imposed constraints. SOUL.md or skills are the right home.\n- **Don't store completion stats in memory.** \"Phase 3 done, 12 of 20 files\" rots within days. Obsidian or session_search are better.\n- **OpenClaw SOULs reference file paths that don't exist in Hermes.** Always map `~\u002F.openclaw\u002Fstate\u002F` → `memory` tool, not literal file paths.\n- **Profile `.env` files are NOT inherited from the main `.env`.** A key that lives in `$HERMES_HOME\u002F.env` (e.g. `DASHSCOPE_API_KEY`) is *not* automatically available to a profile — each `$HERMES_HOME\u002Fprofiles\u002F\u003Cname>\u002F.env` is its own file. The exception is `hermes profile create --clone`, which copies the `.env` at creation time, but a key added to main later will still be missing from existing profiles. After any provider change, grep each profile's `.env` for the new provider's key and backfill gaps (see Bulk Provider\u002FModel Migration).\n- **Never commit `config.yaml` to a public repo.** MCP server env sections hold live secrets — a profile's config is machine-local, not handoff material. Sanitize to the model block or omit it entirely (see Replicating section).\n- **Write souls into the collection subfolder, never the root.** Root-level `\u003Cprofile>-soul.md` files sitting next to `AI-SDLC\u002F` \u002F `Life Styles\u002F` are exactly how the 2026-09 duplicate pile-up happened (7 root dupes). Cleanup order when they exist anyway: hash-compare root vs subfolder → copy the NEWER content (e.g. brand-section updates) INTO the subfolder copy → only then delete the root file. Never delete first.\n- **Patch souls by anchoring on a header every target soul has.** Fleet souls are structurally heterogeneous (some lack `## Priority Protocol`; all have `## Quality Gates`). Read the actual section first — a file previously read with offset\u002Flimit counts as a partial view and later writes get refused\u002Fwarned — then insert new sections before `## Quality Gates` or after the Document Handoff tables. Writes to profile `SOUL.md` files may trigger a write-approval prompt; if it times out with the user away, that is not a content refusal — re-issue the identical patch in a fresh turn (it succeeded on retry) instead of forcing it through another path.\n","# Hermes Profile Setup & Maintenance\n\nWhen to create a separate profile, how to adapt foreign agent SOUL templates, and how to keep memory lean across profiles.\n\n## When to Create a Profile\n\nCreate a **new profile** when any of these are true:\n\n- The use case is a **different domain** than your current profile (programming → fitness, fitness → finance)\n- You want **isolated memory** — health data shouldn't mix with code review context\n- You want a **different persona\u002FSOUL** — fitness coach vs DevOps engineer\n- You want **different tools\u002Fskills** — gym profile doesn't need GitHub MCP or PostgreSQL\n- You want a **cheaper model** for lightweight Q&A (health advice doesn't need deepseek-v4-pro)\n\nStay in the **same profile** when:\n\n- The task is the same domain with a different project (Python backend → React frontend)\n- You want shared memory and conventions across work\n\n## Creating a Profile\n\n```bash\n# Fresh profile (recommended for new domains)\nhermes profile create \u003Cname>\n\n# Clone config + .env + SOUL.md AND ALL skills + memory (identical setup, fresh sessions)\nhermes profile create \u003Cname> --clone\n\n# Clone everything via --clone-all (same as --clone; --clone already brings skills)\nhermes profile create \u003Cname> --clone-all\n```\n\n**Recommendation:** use `--clone` for cross-domain profiles — it copies API keys, provider config, SOUL.md, *and all installed skills* (observed output: \"Cloned config, .env, SOUL.md, and skills from default\"). It does NOT leave skills clean. Only session history and memory start fresh. **A `--clone` profile inherits every skill from the source profile — plan to prune.** Trim irrelevant skill categories after creation (e.g. a book-summarizer profile does not need `gym`, `smart-home`, `mlops`, `slidev`) so the new profile doesn't waste context on foreign skills. `hermes tools` \u002F skill pruning manage this per profile.\n\n### Smoke-test a new profile immediately\nThe generated `\u003Cname>.bat` shortcut in `~\u002F.local\u002Fbin` is not on the git-bash PATH (it just wraps `hermes -p \u003Cname>`). Verify the soul is live with a one-shot query instead:\n\n```bash\nhermes -p \u003Cname> chat -q \"Answer in one sentence: what is your name and core role?\"\n```\n\nThe reply must reflect the new SOUL.md (e.g. the book-summarizer profile answers as \"Libri, the Book Summarizer...\"). A wrong identity means the soul didn't install where expected. The reply prints directly ABOVE the `Resume this session` footer — a tight `| tail -8` can clip it to just session metadata. Use `| tail -24` or `| grep -i \"\u003Cexpected name>\"` to actually capture the answer.\n\n### Review-first gate for new souls (Panomete's rule)\nDo NOT create the profile the moment a soul is drafted. When authoring a new fleet specialist:\n1. Write the soul to the canonical collection — `F:\\obsidian_note\\hermes_config_backup\\soul-collection\\\u003CDOMAIN>\\\u003Cposition>-soul.md` — `AI-SDLC\\` for engineering souls, `Life Styles\\` for lifestyle souls. Never write souls to the collection root.\n2. Let Panomete review the soul file and explicitly approve it becoming a profile.\n3. Only after approval, run the full install checklist below.\nThis review-first gate keeps drafts out of `$HERMES_HOME\u002Fprofiles\u002F` until they're approved — approved and live = reviewed.\n\n### Post-approval install checklist (2026-09 canon, verified on career-coach \u002F journey-writer \u002F audiophile)\n1. `hermes profile create \u003Cname> --clone`\n2. Stash the clone default: `cp \u003Cprofile>\u002FSOUL.md \u003Cprofile>\u002FSOUL.md.default-clone.bak`\n3. `cp` collection soul → `\u003Cprofile>\u002FSOUL.md`, then `md5sum` both — byte-identical before proceeding.\n4. Registry (`profile-registry.md`, collection root): add routing row + append to `Profiles to create` + append to the matching soul-source line (`AI-SDLC\\` or `Life Styles\\`).\n5. Main soul (`$HERMES_HOME\u002FSOUL.md`): add a routing-table row AND a `What I Route` bullet.\n6. Sync main soul → `soul-collection\u002Fhermes-main-soul.md`.\n7. Smoke test (below), then update the fleet count in memory.\n\nAfter creation, the profile auto-generates a CLI shortcut:\n```bash\n\u003Cname> chat       # start a session\n\u003Cname> setup      # configure model\u002Fkeys\n```\n\n## Adapting SOUL.md from Other Agents\n\nOther agent frameworks (OpenClaw, Claude Code, Codex) have SOUL.md or AGENTS.md templates online. The adaptation process:\n\n### 1. Fetch the source\n```bash\ncurl -sL \"https:\u002F\u002Fraw.githubusercontent.com\u002F\u003Cuser>\u002F\u003Crepo>\u002F\u003Cbranch>\u002Fpath\u002Fto\u002FSOUL.md\"\n```\n\n### 2. Map foreign concepts to Hermes equivalents\n\n| Foreign (OpenClaw\u002FClaude Code) | Hermes equivalent |\n|---|---|\n| `~\u002F.openclaw\u002Fstate\u002F` file paths | `memory` tool for durable facts, `session_search` for past conversations |\n| `memory\u002FYYYY-MM-DD.md` daily journal | Hermes memory auto-injects every session — no manual journaling |\n| `MEMORY.md` long-term file | Persistent memory entries survive across sessions |\n| `CLAUDE.md` project context | `.hermes.md` or `AGENTS.md` in project root |\n| Local file-based state | `memory` tool + Obsidian vault if applicable |\n\n### 3. Add Hermes-specific sections\n\nEvery Hermes SOUL.md should include:\n- **Tools Available** — list which Hermes tools the profile uses (`memory`, `web`, `file`, `todo`, `clarify`)\n- **Memory & Continuity** — explain how memory persists (tool-based, not file-based)\n- **Self-update footer** — standard \"If this SOUL evolves, update it and notify the user\"\n- **Profile-aware paths** — reference the profile's own memory, not `~\u002F.hermes\u002F` global\n\n### 4. Write to the profile path\n\n```\n~\u002FAppData\u002FLocal\u002Fhermes\u002Fprofiles\u002F\u003Cname>\u002FSOUL.md    (Windows)\n~\u002F.hermes\u002Fprofiles\u002F\u003Cname>\u002FSOUL.md                 (macOS\u002FLinux)\n```\n\n### 5. Trim tools for the domain\n\nDon't load a gym profile with `terminal`, `github`, `docker` skills. The profile inherits the `cli` platform toolsets by default — suggest trimming via `hermes tools` in the new profile's shell.\n\n## Authoring Original SOULs from Scratch\n\nWhen the user wants a **new persona from their own domain** (not adapted from a foreign agent) — e.g. AI-SDLC role souls, life-style souls (educator, financial advisor, deck-builder) — use this workflow. It differs from adaptation: there's no source template, so the persona must be *grilled into existence* before writing.\n\n### 1. Grill first, write after (most important rule)\nNever invent a persona. Run the interview (via `grill-me` \u002F `grill-with-docs`, or manually if the user is mid-conversation) to pin:\n- **Who** the persona serves and their boundaries (e.g. \"serves only me\", \"any audience\")\n- **Philosophy** — teaching style, risk stance, design taste\n- **Deliverables** — what they produce and in what format (Obsidian md? PPTX? Excel formulas?)\n- **Expertise level** — \"graduate of which BOK\" (see below)\n- **Priority awareness** — 🔴\u002F🟡\u002F🟢 behavior like a real worker\n- **Personality** — warmth\u002Fterseness, tone, direct vs encouraging\n\n**Grill format that works with Panomete:** numbered questions with lettered options (a\u002Fb\u002Fc\u002Fd) plus an escape hatch (\"d) your call\"), max ~10 per round (9–10-question grills landed cleanly 2026-09), and he answers in shorthand (`1a, 2b, 3d`). Use a numbered list in chat, NOT the `clarify` tool — clarify only supports one question with ≤4 choices, which is too slow for a multi-question grill. Works for both new souls (identity\u002Fscope\u002Foutput\u002Flanguage\u002Fdestination\u002Ftone\u002Fcoverage) and upgrades (scope of level-up, what to preserve, doc depth).\n\nPush back on vague answers; each follow-up question makes the SOUL sharper. A \"sharp specialist\" beats a \"blurry generalist\" every time.\n\n### 2. Naming & layout convention\n- `[position]-soul.md` (e.g. `product-owner-soul.md`, `educator-soul.md`)\n- Collection root with domain subfolders:\n  ```\n  soul-collection\u002F\u003CDOMAIN>\u002F          e.g. soul-collection\u002FAI-SDLC\u002F\n    \u003Cposition>-soul.md\n  ```\n- One person wearing several hats = one soul per *role*, not one per person.\n\n### 3. Anatomy (borrows the AI-SDLC template)\nCore Principles → Identity (name\u002Frole\u002Femoji\u002Fvibe\u002Fmission) → **Role Boundary** (for specialist\u002Fproduct souls: who owns what across the fleet) → Knowledge Base (vault-grounded) → Core Techniques (applied, not named) → Owned Documents (🔴\u002F🟡\u002F🟢 with template paths + depth) → Handoff Protocol (outgoing\u002Fincoming) → Priority Protocol → Execution Style → Collaboration Rules → Quality Gates.\n\nThis anatomy is a template, not a straitjacket — lifestyle souls reorder\u002Fomit sections to match the domain (deck\u002Feducator souls have no Priority Protocol section, and that's fine). Souls that produce **visual output** (UI, decks, dashboards, diagrams) also carry a **Brand Compliance (Panomete CI)** section: brand root `F:\\obsidian_note\\oralita_md\\personal\\brand\\` (locked 2026-08-25: primary `#1FB854`, secondary `#1EB88E`, accent `#1FB8AB`, Sarabun + JetBrains Mono) with Apply-when \u002F Skip-when \u002F ask-if-unsure rules. Text-only souls (audiophile, career-coach, journey-writer) skip it.\n\n**Role Boundary section** (added 2026-08-06 after 4 specialist upgrades): when a soul shares a fleet with other specialist profiles, include a dedicated section that states explicitly what this role owns vs. what DevOps\u002FFull-Stack\u002FQA\u002FPO own. This prevents cross-profile turf confusion — without it, specialist souls tend to absorb responsibilities that belong to other profiles. Every specialist soul upgraded in batch (devops, qa, product-owner, data-engineer) needed one.\n\n### 4. Ground each soul in the user's BOK vault\nEach soul is a \"graduate\" of the BOK(s) that own its documents. The knowledge is **live**, so point at real vault paths, not titles:\n- `body-of-knowledge\u002F\u003CBOK>\u002F\u003Cchapter>.md` — the curriculum the soul reads\n- `document_template\u002F\u003Ccategory>\u002F\u003Cdoc>.md` — the templates the soul owns (with Heavy\u002FMed\u002FLight depth)\n- `career-path\u002F\u003CNN>_\u003CRole>\u002F00_overview.md` — competence anchor\n- `software-engineering-note\u002F\u003CKA>\u002F` — deep domain notes\n\n**Verify every referenced path resolves** after writing — stale template names are the #1 error. See `references\u002Fsoul-authoring-vault-grounded.md` and run `scripts\u002Fverify_soul_refs.py`.\n\n## Upgrading an Existing SOUL to a New Career Level\n\nWhen the user has a career-path vault (`swe-knowledge\u002Fcareer-path\u002F\u003CNN>_\u003CRole>\u002F`) and asks to level up an existing specialist soul (e.g. full-stack → senior), run the upgrade workflow in `references\u002Fsoul-level-upgrade.md`:\n\n1. **Inventory the career path first** — read the target `00_overview.md` + every capability-area `00_overview.md` (the mid-vs-senior tables state the exact behavior shift).\n2. **Gap-analyze the current soul** — capability × coverage (✅\u002F🟡\u002F❌) table. Expect 5–7 missing areas on a level-up; that's the point.\n3. **Keep what survives** — carry forward still-valid principles (Dependency Rule, ADR discipline, API-contract-first) and preserve identity; elevate role line + philosophy (\"code is the product\" → \"outcomes are the product\").\n4. **Flip the career anchor** to the new level; add BOKs the new capability areas cite (BABOK\u002FPMBOK\u002FCyBOK for senior).\n5. **Same review-first gate + sync flow** as new souls: collection file → user review → approve → backup → copy → md5sum → smoke test. Registry\u002Fmain-soul routing rows change only for NEW profiles, not level upgrades.\n\n### Product\u002Fbusiness path variant\n\nNot every career path entered from Senior Software Engineer is a senior-specialist engineering path. For paths whose overview declares `career_family: product-and-business` or `level: manager` (for example, Product Manager), use a layered product upgrade rather than copying the Senior SWE soul:\n\n1. **Make the product path primary.** Map every product capability area (for example, discovery, strategy, prioritization, roadmapping, analytics, requirements, and technical partnership) to an operating charter.\n2. **Use Senior SWE as a foundation.** When `entry_from` includes Senior Software Engineer, include all nine senior capabilities in a compact mapping table, but translate them into product behavior instead of duplicating engineering techniques.\n3. **Elevate from backlog ownership to outcome ownership.** Add customer evidence, market context, strategic choices, measurable outcomes, living roadmaps, learning loops, and post-launch outcome review.\n4. **Declare role boundaries.** Product owns the problem, why, outcomes, and priority; engineering owns how; QA and DevOps provide quality and operational evidence. Do not silently turn the soul into a project manager, engineering manager, or architect.\n5. **Ground product documents in verified templates.** If a canonical backlog, roadmap, or experiment template does not exist, label it project-specific or external instead of inventing a vault path.\n6. **Treat career-path wikilinks as leads, not proof.** Career notes may contain illustrative or stale links. Verify every referenced path against the live filesystem before copying it into a soul.\n\nSee `references\u002Fproduct-business-soul-upgrade.md` for the reusable capability map, document map, boundary rules, and review checklist.\n\nFor a batch worked example showing the specialist-path upgrade pattern applied to 4 souls (devops, qa, product-owner, data-engineer) in one session — including the Role Boundary section, principle-count growth, BOK expansion, and sync flow — see `references\u002Fspecialist-path-batch-upgrade.md`.\n\n## Syncing Profiles to the Soul Collection\n\nWhen the collection is updated (soul upgraded, persona changed) and the user wants existing profiles updated, sync each `$HERMES_HOME\u002Fprofiles\u002F\u003Cname>\u002FSOUL.md` to its collection counterpart. Do NOT assume a profile is stale — verify first.\n\n### 1. Find stale profiles with a hash diff\n```bash\ncd \"$HERMES_HOME\u002Fprofiles\" && md5sum *\u002FSOUL.md\nmd5sum ~\u002Fsoul-collection\u002F\u003CDOMAIN>\u002F*.md\n```\nA profile is stale when its `SOUL.md` hash ≠ the matching collection file's hash. Matching by content hash, not size or date — that's how you catch \"same-ish but different\" souls. Life-style souls that weren't touched stay in sync automatically; only the re-authored ones go stale.\n\n### 2. Name-mapping pitfall\nProfile dir name ≠ collection filename (and ≠ subfolder). Map manually — and update the map every time the fleet grows:\n```\nproduct-owner      ↔ AI-SDLC\u002Fproduct-owner-soul.md\nfull-stack         ↔ AI-SDLC\u002Ffull-stack-developer-soul.md    (NOT full-stack-soul.md)\ndevops             ↔ AI-SDLC\u002Fdevops-engineer-soul.md\nqa                 ↔ AI-SDLC\u002Fqa-engineer-soul.md\nui-ux              ↔ AI-SDLC\u002Fui-ux-designer-soul.md\ncareer-coach       ↔ Life Styles\u002Fcareer-coach-soul.md\njourney-writer     ↔ Life Styles\u002Fjourney-writer-soul.md\naudiophile         ↔ Life Styles\u002Faudiophile-soul.md\n```\nWriting a verification loop that guesses `\u003Cprofile>-soul.md` will report false \"MISMATCH\" on every profile whose collection name has a middle token. Use an explicit `declare -A` map instead, and have the loop search BOTH `AI-SDLC\u002F` and `Life Styles\u002F`.\n\n### 3. Back up before overwriting\nOld souls are not recoverable once overwritten (the collection file was already replaced). Canonical backup root (Panomete, 2026-09 — replaces the retired `profiles\u002F_soul_backup_*` dated-dir pattern): `F:\\obsidian_note\\hermes_config_backup\\soul-collection\\`, with live souls under `AI-SDLC\\` \u002F `Life Styles\\` subfolders. For pre-overwrite stashes use a dated archive subfolder:\n```bash\nBK=\"F:\u002Fobsidian_note\u002Fhermes_config_backup\u002Fsoul-collection\u002F_archive\u002F$(date +%Y%m%d)\" && mkdir -p \"$BK\"\nfor d in \u003Cstale-profiles>; do cp \"$d\u002FSOUL.md\" \"$BK\u002F${d}-SOUL.md.bak\"; done\n```\n\n### 4. Copy, then re-verify\n```bash\ncp \u003Ccollection>\u002F\u003Cfile>-soul.md \u003Cprofile>\u002FSOUL.md\n# re-run md5sum: profile hash must now equal collection hash (byte-identical)\n```\n\n### 5. Tell the user the running-session caveat\nAlready-running sessions keep the old soul (Hermes never mutates a live system prompt). New sessions pick up the new SOUL.md. Recommend opening a fresh session per profile to see the change.\n\n### 6. Remember the main soul\nThe default\u002Fmain profile's SOUL lives at `$HERMES_HOME\u002FSOUL.md` (not in `profiles\u002F`). Back it up to the collection root (e.g. `soul-collection\u002Fhermes-main-soul.md`) when iterating on it — it's the file that governs the base agent.\n\n## Replicating the Setup to a New Machine\n\nWhen the user wants the whole Hermes setup on another computer (new PC, friend's PC, disaster recovery) — full verified detail in `references\u002Fmachine-replication-handoff.md`.\n\n1. **Grill the scope first** (same numbered-options format as souls): base-only vs fleet, searxng local vs homelab, OpenRouter model tier, target OS, who owns the API keys. The answers define the runbook.\n2. **The GitHub repo is the handoff source** (`oat431\u002Fhermes_config_backup`): `workflow\u002F` = skills (`hermes-main-profile\u002F` + `shared-skills\u002F` + per-profile folders), `soul-collection\u002F` = souls + registry, runbook `Hermes-Setup-Install.md` at repo root. (`oat431\u002Foralita_md` is STALE legacy — never point a new machine there.) `git push` before going.\n3. **Skill install:** `hermes skills tap add oat431\u002Foralita_md` + `hermes skills install \u003Cname>` — but taps resolve the `skills\u002F` folder ONLY; skills under a different path (e.g. `workflow\u002F`) are invisible to taps → fallback is direct raw-URL install of the SKILL.md.\n4. **Profile handoff:** `hermes profile export` works but ships caches (~105 MB). Lean copy = `SOUL.md` + `memories\u002F` + `config.yaml` only; skip `state.db`, `sessions\u002F`, caches.\n5. **Profile skills are NOT in the main skills dir.** Each profile's `skills\u002F` folder holds its own custom skills (created inside that profile's sessions) that do NOT appear in `$HERMES_HOME\u002Fskills\u002F`. A backup that only walks the main skills dir silently misses them. Backup layout is SHALLOW skill dirs only — `workflow\u002Fhermes-main-profile\u002F\u003Cskill>\u002F` + `workflow\u002F\u003Cprofile>\u002F\u003Cskill>\u002F`, never a deep `skills\u002F` tree copy (that is clone bloat; see \"Syncing Created Skills to the Backup Repo\") — plus a **shared-skills dedup layer**:\n   - Hash-verify (md5sum) every copy of a multi-profile skill BEFORE consolidating. All copies identical → move one copy to `workflow\u002Fshared-skills\u002F`, delete the per-profile copies, and write a `shared-skills\u002FREADME.md` listing what's shared and what stays local.\n   - A profile with a **divergent variant** keeps its local copy (e.g. ui-ux's `grill-me`\u002F`grill-with-docs`, career-coach's `obsidian-vault-builder`).\n   - A skill with **many** variants never gets shared (e.g. `hermes-profile-setup` had 4 — stays per-profile).\n   - Net effect 2026-09: 8 skills shared, 59 duplicate copies removed.\n   Restore by copying back into `%LOCALAPPDATA%\\hermes\\profiles\\\u003Cname>\\skills\\`.\n5. **🔴 SECRET HYGIENE (hard rule):** never copy `config.yaml` into a public repo as-is — `mcp_servers.\u003Cname>.env` carries live tokens (GitHub PATs, DB URLs with passwords). Sanitize to the model block only. GitHub push protection (GH013) blocks the push — treat the rejection as a gift: nothing landed, but the secret **transited GitHub's servers**, so amend the local commit (`git commit --amend`) AND recommend token rotation.\n6. **Skill publishing:** `hermes skills publish --to github --repo \u003Cowner\u002Frepo> \u003Cskill_path>` scans the skill, then creates a PR (it does NOT push directly). The merge API 404s on bot-created PRs → squash-merge locally (`git fetch origin pull\u002FN\u002Fhead:branch`, `git merge --squash`, push), then close the PR and delete the branch via API. Strip `__pycache__`\u002F`.pyc` from the merged set.\n7. **User-facing runbook format (Panomete):** numbered steps, every command explained, tables for ladders\u002Fchecklists, Mermaid flow at top, verification checklist at the end, written into the vault and pushed to the repo.\n\n## Syncing Created Skills to the Backup Repo (workflow\u002F)\n\nRun whenever the user asks to back up \"skills created along the way\" — it recurs every few weeks as the fleet grows.\n\n1. **Inventory**: walk `$HERMES_HOME\u002Fskills\u002F` (main) AND every `$HERMES_HOME\u002Fprofiles\u002F\u003Cname>\u002Fskills\u002F` (profile skills do NOT appear in the main dir). Content-hash each SKILL.md against the backup copy — new or changed are the sync candidates.\n2. **Author gate**: back up only user-created skills — check the `author:` frontmatter (this fleet: Panomete \u002F OraMesLita \u002F Hermes-authored). Cross-check community packs by hashing against the bundled tree at `$HERMES_HOME\u002Fhermes-agent\u002Fskills\u002F`; name-matching alone misses renamed or re-grouped copies, so hash is the tiebreaker. **The bundle hash alone under-reports:** packs installed from a skills registry are not in the bundled tree, so they pass the hash test and pollute the candidate list. The reliable third signal is **recurrence across homes** — a skill present in nearly every profile (30–40 per home, same names) is a distributed pack, while genuine profile work appears in one or two homes. Rank candidates by `len(homes)` ascending and only the 1–3-home tail is real.\n3. **Shallow dirs only**: entries live at `workflow\u002Fhermes-main-profile\u002F\u003Cskill>\u002F`, `workflow\u002F\u003Cprofile>\u002F\u003Cskill>\u002F`, `workflow\u002Fshared-skills\u002F\u003Cskill>\u002F`. A `workflow\u002F\u003Cprofile>\u002Fskills\u002F...` deep tree means a copy swallowed the entire live skills dir (~90–118 preloaded skills per profile, tens of MB) — that is bloat to purge, since Hermes ships those anyway.\n4. **Rescue before purge**: real user skills can hide inside those deep junk trees, never promoted to the shallow level. Classify EVERY orphan directory by author + bundle hash and copy the user-created ones to their shallow spot before deleting the tree — a purge without this step silently destroys unique work.\n5. **Soul check with CRLF awareness**: hash-compare every live `profiles\u002F\u003Cname>\u002FSOUL.md` against its collection counterpart using the explicit name map (see name-mapping pitfall). A plain `diff` can report the whole file changed from pure CRLF-vs-LF line-ending noise — before concluding a soul differs, compare normalized content (`replace('\\r\\n','\\n').strip()`), and only then weigh mtimes; a \"newer\" backup file with identical normalized content needs no update.\n6. **Secret-scan the staged diff before committing**: `git diff --cached | grep -oE \"ghp_|sk-[A-Za-z0-9]{20,}|AIza\"` (or your provider's key prefixes) and review hits by direction — a match inside `deleted file` hunks of purged preloaded helper scripts is removal, not a leak; a match in `+` lines blocks the commit.\n7. **Close out**: update `workflow\u002FOverview.md` counts and the per-profile table to the verified post-sync numbers, commit, push, and correct the fleet entry in memory only if the profile roster changed.\n\n## Routing-Generalist Main Soul (multi-profile fleets)\n\nOnce the user has specialist profiles, the **main soul's job changes**: it stops being another specialist and becomes the *router\u002Foperator* — the one who \"knows lots of things AND knows lots of people.\" This pattern (full detail + worked example: `references\u002Frouter-generalist-main-soul.md`):\n\n- **Hard handoff protocol** — when a question matches a specialist domain: (1) 2-3 sentence summary, (2) direct routing line (\"This is a `full-stack` task.\"), (3) context to bring. Be straight, not wishy-washy.\n- **\"What I Do \u002F What I Route\" split** — light work (chat, research, quick scripts, Hermes config, soul creation) done directly; deep work (code→full-stack, bugs→qa, design→ui-ux, homelab→devops, money→financial-advisor, lessons→educator, decks→deck) routed, never half-done.\n- **New-specialist triggers** — depth signal (question needs real depth in a domain with no profile) or repeated signal (same kind of question 2-3×) → *recommend* creating a soul, never create unilaterally.\n- **`profile-registry.md`** — a routing table (profile → domain → owns → trigger phrases → emoji) living in the soul-collection root. Single source of truth for routing AND the re-install manifest for a new device (profile list, soul sources, MCP servers).\n- **Keep the old persona** when re-purposing: same name\u002Femoji\u002Fvibe, changed role description + routing table. The user keeps their identity; the job changes.\n\n### SOUL.md load semantics (verified in source)\nSOUL.md is **auto-injected at conversation start** (the `--ignore-rules` flag: \"Skip auto-injection of AGENTS.md, SOUL.md, .cursorrules, memory\"). The system prompt is **byte-stable for the life of a conversation** — a live session keeps its old soul no matter what you edit. A **new conversation** picks up the new soul; **restarting the app only helps if it starts a fresh chat** (resuming an old session does nothing). Tell the user: open a new chat, don't just restart.\n\n## Memory Maintenance\n\nMemory fills up from procedural entries, stale stats, and duplication. Clean it periodically.\n\n### Audit pattern\n\n1. **Read current state:** check the memory and user profile percentages in the system prompt header\n2. **Categorize entries:**\n   - ✅ **Keep:** identity facts, preferences, paths, security rules\n   - ❌ **Remove:** procedural rules (belong in SOUL.md or skills), stale completion stats, task logs\n   - ⚠️ **Consolidate:** entries duplicated across memory + user profile\n3. **Batch operations:** use `memory(operations=[...])` for atomic changes — never multiple single-operation calls\n4. **Verify:** check new percentages after the batch completes\n\n### What never belongs in memory\n\n- Procedural rules (\"always do X, never do Y\") → SOUL.md or skill\n- Task progress (\"completed phase 3\", \"merged PR #42\") → session_search\n- Stale counts (\"12 files done, 5 remaining\") → they rot within days\n- Environment-specific failures (\"pip install failed\") → fix the environment, don't memorialize the error\n\n### What belongs in memory\n\n- User identity, preferences, and style\n- Persistent paths (Obsidian vaults, project roots)\n- Security rules and boundaries\n- Domain-specific context (homelab URL, tech stack)\n\n### Cleaning stale entries\n\nWhen Obsidian or another external system is the source of truth, memory should only hold the **path** and the **pattern** — not the current completion state. \"Vault at F:\\projects\\orlita_md\\, numbered folders\" is durable. \"Math (12 files), English (27 files)\" is stale in a week.\n\n## Configuration Audit for Specific Use Cases\n\nWhen auditing a profile for a specific use case (e.g., programming):\n\n### Priority order\n1. **Safety nets:** fallback model (uncommented), checkpoints enabled, approval mode\n2. **Cost:** model choice matches the domain (coding needs reasoning, health Q&A doesn't)\n3. **Memory headroom:** under 60% is healthy, over 80% needs pruning\n4. **Tools:** MCP servers and skills relevant to the domain\n5. **UX:** streaming, cost display, reasoning effort tuned to the task\n\n### Common misses\n- Fallback model commented out → no automatic failover on 429\u002F503\n- `checkpoints.enabled: false` → no `\u002Frollback` safety net during refactors\n- `approvals.mode: manual` → excessive friction; `smart` uses LLM to auto-approve low-risk commands\n- `reasoning_effort: medium` on coding profiles → bump to `high` for architecture decisions\n- `terminal.timeout: 180` → too tight for docker builds or large test suites\n\n## Bulk Provider\u002FModel Migration Across All Profiles\n\nWhen the user switches the whole fleet to a new provider\u002Fmodel (e.g. \"unsubscribed z.ai, everything on QwenCloud token plan now\"), do it as one systematic sweep, not profile-by-profile ad-hoc:\n\n1. **Survey first** — read every `config.yaml` model block at once (`hermes config get model` for main; `hermes --profile \u003Cname> config get model` per profile). Build a table: current provider \u002F default \u002F base_url. Note profiles on the *old* provider AND profiles with a *stale* `base_url` from the previous provider — both need fixing.\n2. **Standardize provider + default** via the CLI (never hand-edit `config.yaml` — the patch tool refuses and a stray indent corrupts it): `hermes config set model.provider \u003Cp>` + `hermes config set model.default \u003Cm>` (prefix `--profile \u003Cname>` for each profile).\n3. **Strip stale base_urls** — `hermes config unset model.base_url` (main) \u002F `--profile \u003Cname>`. Let the provider resolve its endpoint from the env var; a leftover DeepSeek\u002Fz.ai URL is the classic breakage.\n4. **🔴 Per-profile `.env` is NOT inherited from main.** Each profile's `$HERMES_HOME\u002Fprofiles\u002F\u003Cname>\u002F.env` is a separate file. When you migrate profiles to a provider whose key lives in the main `.env`, you MUST copy the key (and any base_url override) into **every** profile's `.env`. This session: `financial-advisor` and `product-owner` had no `DASHSCOPE_API_KEY`; `book-summarizer`, `data-engineer`, `security-engineer` had no `DASHSCOPE_BASE_URL` — all would have silently failed auth. Audit with a grep loop over `profiles\u002F*\u002F.env` for the provider's env var and fill the gaps.\n5. **Create missing configs** — some profiles may lack `config.yaml` entirely (e.g. `product-owner` had only `profile.yaml` with a `ui_meta` block, no model config). Copy a known-good sibling's config, set the model block, and inject real secrets in-shell (see secret hygiene below).\n6. **Verify the whole sweep** — re-run `hermes config get model` + `--profile \u003Cname>` for every profile; confirm provider\u002Fdefault\u002Fbase_url are uniform and no stale provider (`zai`\u002F`deepseek`\u002F`openrouter`) remains. Watch for false positives from `fallback_providers:` blocks and commented `# provider:` templates.\n\n**Faster alternative — Python script for 10+ profiles:** when the fleet is large,\nrunning `hermes config set` per profile is slow. Use a Python script with\n`re.sub` to patch all `config.yaml` files at once, then verify with the CLI.\nThe script replaces the `default:` value inside each model block. Template:\n\n```python\nimport os, re\nHOME = os.environ[\"HERMES_HOME\"]\nNEW_MODEL = \"qwen3.8-flash\"\nfor p in os.listdir(os.path.join(HOME, \"profiles\")):\n    if p.startswith(\"_\"): continue\n    cfg = os.path.join(HOME, \"profiles\", p, \"config.yaml\")\n    if not os.path.exists(cfg): continue\n    with open(cfg, encoding=\"utf-8\") as f:\n        text = f.read()\n    text = re.sub(r\"^  default: .*$\", f\"  default: {NEW_MODEL}\", text, flags=re.M)  # whole-line replace, see pitfalls\n    with open(cfg, \"w\", encoding=\"utf-8\") as f:\n        f.write(text)\n```\n\nThen set the main config: `hermes config set model.default \u003Cmodel>`. Verify\nevery profile after with a grep loop over `hermes config get`.\n\n**Regex-sweep pitfalls (each broke a real sweep):**\n- Replace the WHOLE `key: value` line (anchored `^  default: .*$` + `re.M`), never `\\s*`-after-colon with an insert — `\\s*` swallows the newline when the old value is empty and glues the new value onto the next one (`default: mimo-v2.6-promimo-v2.6-pro`). A `\\S+`-value pattern silently skips an empty `default:`, leaving the profile on no model.\n- `base_url` cleanup must match 2-space lines under `model:` only. `fallback_providers:` entries carry their own 4-space `base_url` (often `''`) — those are per-fallback settings, not stale endpoints; leave them alone.\n- Re-read and assert on every file in the same run (`default:`\u002F`provider:` parse to the expected values) before reporting done — a \"N files updated\" log cannot see a doubled value or an untouched empty one.\n\n`^  default: ` (2-space, anchored) is safe on single-model-block configs; if a config carries extra model blocks (fallback, TTS), scope the sub to the `^model:` block first.\n\n**Secret hygiene while bulk-editing:** never `echo` a live token into chat output. Use `grep '\u003CKEY>=' main\u002F.env >> profile\u002F.env` (redirection, no display) or, when a file must be written fresh, write a `__PLACEHOLDER__` then `REAL=$(grep ...); sed -i \"s|__PLACEHOLDER__|$REAL|\"` so the value never appears in the transcript.\n\n**Provider keys can live in `auth.json`, not just `.env`.** Credentials added via `hermes setup` or by hand land in `auth.json` → `credential_pool.\u003Cprovider>[]`. Two traps: (1) the secret field name varies by entry — `access_token`, `api_key`, `key` — so `entry.get(\"api_key\") or entry.get(\"key\")` reports \"no key\" for a perfectly valid manual entry; probe `secret_fingerprint` presence instead. (2) 🔴 A named profile reads ONLY its own `auth.json`\u002F`.env` — the root store is never a fallback — so a root-added credential must be backfilled per profile (copy the `credential_pool` entry or re-run provider setup per profile) and smoke-tested with `hermes -p \u003Cname> chat -q`. A fleet whose configs already point at the new provider can still be unauthenticated in every profile.\n\n**Token-plan key specifics (QwenCloud \u002F Alibaba Token Plan):** the key authenticates against the Anthropic-format gateway, so `DASHSCOPE_BASE_URL=https:\u002F\u002Ftoken-plan.ap-southeast-1.maas.aliyuncs.com\u002Fapps\u002Fanthropic` is required in every profile `.env`. Unset it and the `alibaba` provider falls back to the OpenAI-compatible `dashscope-intl` endpoint, which rejects the token-plan key.\n\n**A model listed anywhere is NOT proof the key can call it.** `provider_models_cache.json` aggregates listings across providers, so a model seen next to your provider's block may belong to another (kimi-k3 under openrouter), and even models inside your provider's list can be plan-ineligible (\"Access to model denied — check eligibility\") or absent (\"Model not exist\"); the token-plan gateway may not even expose `\u002Fmodels`. Before bulk-switching any fleet to a named model, live-test it with the real key — POST one tiny `chat` message to `$DASHSCOPE_BASE_URL\u002Fv1\u002Fmessages` (header `x-api-key`, `anthropic-version: 2023-06-01`) and require a 200 with content in the reply. An unverified model never goes into N configs; if it fails, report that and leave profiles untouched.\n\n### Provider Model List (picker) Maintenance\n\nThe picker's rows do **not** come from `config.yaml` — a home stores no model list. They resolve from a\nper-home `provider_models_cache.json` (keyed by credential fingerprint), then a curated static\nfallback, then models.dev metadata. So \"the provider's model list is stale\u002Fmissing\" is a per-home\ncache fix, not a config edit. Three rules that do not bend:\n\n- **Never hand-edit `provider_models_cache.json`** — a row with a wrong fingerprint is invalid and the\n  next picker open silently replaces it with the curated fallback.\n- **Write through `hermes_cli.models.update_provider_cache_entry(slug, models)`** (Hermes venv\n  interpreter), setting `HERMES_HOME` and loading that home's `.env` before each call — the fingerprint\n  hashes the provider env vars, and env keys must be cleared between homes.\n- **Verify with `cached_provider_model_ids(slug, non_blocking=True)`**, the function the UI uses; the raw\n  JSON can look right while the read path filters rows away.\n\nA served list that exactly equals the curated static list means the live probe failed — that is not\nproof about the account's entitlement. Full procedure, probe-result decoding, and the durable\nslug-based alternative: `references\u002Fprovider-model-list-maintenance.md`.\n\n## Troubleshooting a Broken Profile (gateway setup \u002F no provider \u002F no MCP)\n\nSymptom: a profile loads but (a) shows a \"gateway needs setup\" prompt, (b) has no provider\u002Fmodel available, (c) reports no MCP servers. All three hit the `deck` profile in one session (2026-08) — root causes, in order of likelihood:\n\n1. **Missing `_config_version`** → `hermes config check --profile \u003Cname>` reports `Config version: 0 → N (update available)`. Hermes treats the profile as unconfigured and asks for gateway setup. Fix: add `_config_version: \u003CN>` (copy the current value from the main `$HERMES_HOME\u002Fconfig.yaml`) as the first line of `profiles\u002F\u003Cname>\u002Fconfig.yaml`.\n2. **Empty `gateway: {}` block** in the profile config confuses startup. Working profiles have **no** `gateway` key at all. Fix: delete the empty block.\n3. **Stale `base_url` mismatched with `provider` protocol** → e.g. `provider: alibaba` + a leftover DeepSeek\u002Fz.ai\u002FOpenRouter URL breaks model loading. This exact bug was found in `career-coach`, `gym`, `full-stack` (stale DeepSeek URLs after switching provider) and `deck`. Fix: remove the stale `base_url` so the provider resolves its own endpoint (`hermes config unset model.base_url --profile \u003Cname>`), or set one matching the provider protocol.\n\n   ⚠️ **Token-plan nuance (do NOT over-generalize \"Anthropic URL = broken\").** The `alibaba` provider's *default* endpoint is OpenAI-compatible (`dashscope-intl.aliyuncs.com\u002Fcompatible-mode\u002Fv1`). BUT the **QwenCloud Token Plan key only authenticates against the Anthropic-format gateway** `https:\u002F\u002Ftoken-plan.ap-southeast-1.maas.aliyuncs.com\u002Fapps\u002Fanthropic`. So for a token-plan key, an Anthropic-format `base_url` is *correct*, not a bug — it must be set via the `DASHSCOPE_BASE_URL` env var (see the bulk-migration section below). The rule is: **the protocol must match whatever endpoint the key is actually provisioned for**, not a fixed \"alibaba = OpenAI-compat\" assumption.\n4. **`mcp_servers` block missing** → MCP servers are **NOT inherited from main config**; each profile's `config.yaml` needs its own block. A bare `mcp: {}` is not a config. Fix: copy the 5 standard servers (github, postgres, drawio, filesystem, searxng) from the main config into the profile file.\n5. **Model not served by the configured provider** → check `hermes config check --profile \u003Cname>` output for which env vars the provider expects (e.g. `DASHSCOPE_API_KEY` for alibaba, `GLM_API_KEY`\u002F`ZAI_API_KEY` for zai) and confirm the model name exists on that plan.\n\nFix flow: `hermes config check --profile \u003Cname>` → patch `config.yaml` (version + remove gateway + fix base_url + add mcp_servers) → `hermes gateway restart --profile \u003Cname>` to pick up the changes.\n\n## Pitfalls\n\n- **Don't clone-all for cross-domain profiles.** GitHub MCP, PostgreSQL, and Docker skills in a fitness profile waste memory and confuse context.\n- **Don't keep procedural rules in memory.** They get re-read as directives each session, creating self-imposed constraints. SOUL.md or skills are the right home.\n- **Don't store completion stats in memory.** \"Phase 3 done, 12 of 20 files\" rots within days. Obsidian or session_search are better.\n- **OpenClaw SOULs reference file paths that don't exist in Hermes.** Always map `~\u002F.openclaw\u002Fstate\u002F` → `memory` tool, not literal file paths.\n- **Profile `.env` files are NOT inherited from the main `.env`.** A key that lives in `$HERMES_HOME\u002F.env` (e.g. `DASHSCOPE_API_KEY`) is *not* automatically available to a profile — each `$HERMES_HOME\u002Fprofiles\u002F\u003Cname>\u002F.env` is its own file. The exception is `hermes profile create --clone`, which copies the `.env` at creation time, but a key added to main later will still be missing from existing profiles. After any provider change, grep each profile's `.env` for the new provider's key and backfill gaps (see Bulk Provider\u002FModel Migration).\n- **Never commit `config.yaml` to a public repo.** MCP server env sections hold live secrets — a profile's config is machine-local, not handoff material. Sanitize to the model block or omit it entirely (see Replicating section).\n- **Write souls into the collection subfolder, never the root.** Root-level `\u003Cprofile>-soul.md` files sitting next to `AI-SDLC\u002F` \u002F `Life Styles\u002F` are exactly how the 2026-09 duplicate pile-up happened (7 root dupes). Cleanup order when they exist anyway: hash-compare root vs subfolder → copy the NEWER content (e.g. brand-section updates) INTO the subfolder copy → only then delete the root file. Never delete first.\n- **Patch souls by anchoring on a header every target soul has.** Fleet souls are structurally heterogeneous (some lack `## Priority Protocol`; all have `## Quality Gates`). Read the actual section first — a file previously read with offset\u002Flimit counts as a partial view and later writes get refused\u002Fwarned — then insert new sections before `## Quality Gates` or after the Document Handoff tables. Writes to profile `SOUL.md` files may trigger a write-approval prompt; if it times out with the user away, that is not a content refusal — re-issue the identical patch in a fresh turn (it succeeded on retry) instead of forcing it through another path.\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"description":7},"OraMesLita","1.1.0",{"hermes":27},{"triggers":28,"related_skills":41},[29,30,31,32,33,34,35,36,37,38,39,40],"create a profile for","new profile","separate context","gym profile","health profile","adapt SOUL","memory cleanup","memory is full","clean up memory","model list","provider model list","model picker",[42],"hermes-agent","main","2988869c5a7d7be2225c9ea7a54a4a56a59b0d45","workflow\u002Fhermes-main-profile\u002Fhermes-profile-setup",0,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup","https:\u002F\u002Fgithub.com\u002Foat431","https:\u002F\u002Fpanomete.com\u002F","Hope and Luck is not a part of the strategy, \r\n\r\nSoftskill produces plan Hard skill produce product.","2026-11-03 00:43:08",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add oat431\u002Fhermes_config_backup --skill hermes-profile-setup",{"tool":58,"command":59},"bunx","bunx skills add oat431\u002Fhermes_config_backup --skill hermes-profile-setup",{"tool":61,"command":62},"pnpm","pnpm dlx skills add oat431\u002Fhermes_config_backup --skill hermes-profile-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002FSKILL.md",true,[66,72,76,80,84,88,92,96,100,104],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fmachine-replication-handoff.md","REFERENCE","参考文档",7032,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002Freferences\u002Fmachine-replication-handoff.md",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"references\u002Fmemory-cleanup-example.md",2142,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002Freferences\u002Fmemory-cleanup-example.md",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fproduct-business-soul-upgrade.md",10262,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002Freferences\u002Fproduct-business-soul-upgrade.md",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fprovider-model-list-maintenance.md",4343,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002Freferences\u002Fprovider-model-list-maintenance.md",{"path":85,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Frouter-generalist-main-soul.md",5235,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002Freferences\u002Frouter-generalist-main-soul.md",{"path":89,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":90,"sourceHtmlUrl":91},"references\u002Fsoul-adaptation-openclaw.md",2113,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002Freferences\u002Fsoul-adaptation-openclaw.md",{"path":93,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":94,"sourceHtmlUrl":95},"references\u002Fsoul-authoring-vault-grounded.md",4273,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002Freferences\u002Fsoul-authoring-vault-grounded.md",{"path":97,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":98,"sourceHtmlUrl":99},"references\u002Fsoul-level-upgrade.md",6456,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002Freferences\u002Fsoul-level-upgrade.md",{"path":101,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":102,"sourceHtmlUrl":103},"references\u002Fspecialist-path-batch-upgrade.md",6176,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002Freferences\u002Fspecialist-path-batch-upgrade.md",{"path":105,"resourceType":106,"resourceTypeDesc":107,"sizeBytes":108,"sourceHtmlUrl":109},"scripts\u002Fverify_soul_refs.py","SCRIPT","脚本",3729,"https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fhermes-main-profile\u002Fhermes-profile-setup\u002Fscripts\u002Fverify_soul_refs.py",[111,118,125,133,140,147],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M7AYZ2JY3NFKAPQSC39N5F3F","project-spec-docs","Fill\u002Fupdate project_spec docs (templates, MM handoffs).","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fproject-spec-docs\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":19},"01M7AYYRZPE7HQX7778558X52S","penpot-mcp","Penpot MCP: connect, verify, and fix streaming via nginx.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fpenpot-mcp\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":129,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":19},"01M7AYYNKP61CN2281VMJDXMB5","nginx-streaming-proxy","Configure nginx for streaming endpoints (SSE, MCP, WS).","Unlicense","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fnginx-streaming-proxy\u002FSKILL.md",[],[],{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":19},"01M7AYYJP0MDV1D3WVEEZB3SGA","branding-ci","Use for brand\u002FCI identity, style guides, and brand docs.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fui-ux\u002Fbranding-ci\u002FSKILL.md",[],[],{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":129,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":19},"01M7AYYGCXVT97DDTCM0ZJT6F6","yuanbao","Yuanbao (元宝) groups: @mention users, query info\u002Fmembers.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fshared-skills\u002Fyuanbao\u002FSKILL.md",[],[],{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":129,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":19},"01M7AYYC2Y65NMGMD4GQXAZMMS","slidev","Create and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, code walkthroughs, teaching materials, or developer decks.","https:\u002F\u002Fgithub.com\u002Foat431\u002Fhermes_config_backup\u002Fblob\u002Fmain\u002Fworkflow\u002Fshared-skills\u002Fslidev\u002FSKILL.md",[],[]]