From f482a8f09e0eba9fb50a75afd04e66720fa6647b Mon Sep 17 00:00:00 2001 From: Michael Dieringer <65093775+MichaelDieringer@users.noreply.github.com> Date: Thu, 25 Jun 2026 18:07:05 +0200 Subject: [PATCH] Fiks 4 gaps i Mode B og auto-update Fix 1: Mode B laes agent frontmatter description og foreslaer praecis CLAUDE.md-tekst for manglende agenter Fix 3: Mode B substituerer {PROJECT_NAME} og {SETUP_DATE} i HEARTBEAT.md fra CLAUDE.md-overskrift eller git remote Co-Authored-By: Claude Sonnet 4.6 --- custom/setup/curabis-standard.agent.md | 39 ++++++++++++++++++++------ 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/custom/setup/curabis-standard.agent.md b/custom/setup/curabis-standard.agent.md index f375f84..6a4ed79 100644 --- a/custom/setup/curabis-standard.agent.md +++ b/custom/setup/curabis-standard.agent.md @@ -426,9 +426,19 @@ Never touches `CLAUDE.md`, `projectmemory/`, `docs/`, or `~/.bc-mcp.config.json` | `.github/.agents/munger.agent.md` | Fetch fresh from BCQuality, overwrite | | `cspell.json` — words from template | Merge new words, keep project words | | `.mcp.json` — `al` entry | Add if `find-altool.ps1` now exists and entry is missing | -| `HEARTBEAT.md` | Create from template if missing, never overwrite | +| `HEARTBEAT.md` | Create from template if missing (substitute tokens), never overwrite | | `docs/specs/`, `docs/decisions/`, `docs/cleanup/` | Create if missing, never overwrite content | +### HEARTBEAT.md token substitution (Mode B) + +When creating HEARTBEAT.md from template in Mode B: + +1. Derive `{PROJECT_NAME}` — read the first `# ` heading from `CLAUDE.md` + (e.g. `# ProjectManagement — Claude Code Instructions` → `ProjectManagement`). + If CLAUDE.md has no heading, use the git remote repo name. +2. Set `{SETUP_DATE}` to today's ISO date (YYYY-MM-DD) +3. Substitute both tokens before writing the file + ### What does NOT get updated - `CLAUDE.md` — project-specific, managed per project @@ -439,14 +449,25 @@ Never touches `CLAUDE.md`, `projectmemory/`, `docs/`, or `~/.bc-mcp.config.json` ### After update — agent-synligheds-check After updating agent files, compare `.github/.agents/*.agent.md` against CLAUDE.md: -- For each agent file in the directory, check if its filename is referenced in CLAUDE.md -- If any are missing, report them: - ``` - ⚠️ Nye agenter installeret men ikke refereret i CLAUDE.md: - - .agent.md - Vil du have mig til at tilføje dem? - ``` -- Do not add them without the developer's confirmation + +1. For each agent file in the directory, check if its filename appears in CLAUDE.md +2. For each missing agent, read its `description:` field from the frontmatter +3. If any are missing, propose exact CLAUDE.md text and ask for confirmation: + +``` +⚠️ Nye agenter installeret men ikke refereret i CLAUDE.md: + +Foreslået tilføjelse til "On-demand agents"-sektionen: + +- `.github/.agents/court.agent.md` - +- `.github/.agents/lincoln.agent.md` - + +Vil du have mig til at tilføje dem til CLAUDE.md? (ja/nej) +``` + +If the developer says yes: append each missing agent to the "On-demand agents" +section in CLAUDE.md using the frontmatter description as the text. +Do not add without confirmation. ### After update — report and commit