From 8e1c392181f2fc8bb6a1759fa7d6aef4d44f9242 Mon Sep 17 00:00:00 2001 From: Michael Dieringer <65093775+MichaelDieringer@users.noreply.github.com> Date: Fri, 3 Jul 2026 15:39:24 +0200 Subject: [PATCH] Auto-onboarding: kloning af et CURABIS-repo onboarder maskinen selv Setup v15: projekt-CLAUDE.md-templatens self-heal udvidet fra kun mirror til hele maskinen - mangler ~/.claude/CLAUDE.md eller bridgen, koerer sessionen Install-CurabisMachine.ps1 fra stable selv (idempotent, identitet fra git config), rapporterer de manuelle rest-trin (personlig secret, AL: Configure MCP Server) og beder om Claude Code-genstart. Mirror-only-staleness beholder det lette self-heal. CONSUMPTION.md: Auto-trigger-afsnit - een-linjes-kommandoen er fallback, ikke procedure; foerste session i et klonet repo goer arbejdet. Torsten-scenariet (frisk maskine, manuel onboarding-viden paakraevet) forsvinder dermed for alle fremtidige udviklere. Co-Authored-By: Claude Fable 5 --- CONSUMPTION.md | 7 +++++++ custom/setup/curabis-standard.agent.md | 19 +++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/CONSUMPTION.md b/CONSUMPTION.md index 2713ace..d05faf3 100644 --- a/CONSUMPTION.md +++ b/CONSUMPTION.md @@ -51,6 +51,13 @@ personal client secret), the knowledge sync script, and syncs the machine mirror. Per repo afterwards: VS Code → `AL: Configure MCP Server` (generates `.vscode/find-altool.ps1`), then "Opdater CURABIS Standard fra BCQuality". +**Auto-trigger:** the command above rarely needs to be run by hand. Every +project CLAUDE.md (setup v15+) carries a machine self-heal: any Claude Code +session in any configured CURABIS repo detects an un-onboarded machine +(missing `~/.claude/CLAUDE.md` or bridge) and runs the onboarding itself — +cloning a CURABIS repo IS the onboarding. Only the personal client secret +and the VS Code AL extension remain manual by design. + ## Release channel: `stable` Merging to `main` is **not** a deployment. All consumers — the machine diff --git a/custom/setup/curabis-standard.agent.md b/custom/setup/curabis-standard.agent.md index a44916e..c7915f5 100644 --- a/custom/setup/curabis-standard.agent.md +++ b/custom/setup/curabis-standard.agent.md @@ -1,7 +1,7 @@ --- kind: action-skill id: curabis-standard-setup -version: 14 +version: 15 title: CURABIS Standard — Project Setup description: > Configures a new or existing repository to the CURABIS Standard development @@ -185,14 +185,21 @@ to this repository (BCQuality rule `bcquality-knowledge-must-mirror-to-machine-not-repo`) — one sync per machine covers every repo, and the repo history stays free of upstream rule churn. -If `~/.claude/bcquality-knowledge/` is missing or empty, self-heal before continuing: +**Machine self-heal (auto-onboarding):** if this machine is not CURABIS- +onboarded — `~/.claude/CLAUDE.md` or `~/.claude/bc-mcp-bridge.js` is missing — +run the full onboarding NOW (idempotent; identity taken from git config): + + powershell -ExecutionPolicy Bypass -Command "Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/Curabis/BCQuality/stable/custom/setup/machine/Install-CurabisMachine.ps1 -OutFile $env:TEMP\icm.ps1; & $env:TEMP\icm.ps1" + +Then report the manual leftovers it lists (personal client secret, AL: +Configure MCP Server) and ask the developer to restart Claude Code. + +If only `~/.claude/bcquality-knowledge/` is missing or stale, the lighter +self-heal suffices: powershell -ExecutionPolicy Bypass -File "$env:USERPROFILE\.claude\sync-bcquality-knowledge.ps1" -If the sync script itself is missing, first download it AS RAW BYTES (do not -decode/re-encode — use `Invoke-WebRequest -OutFile`) from -`https://raw.githubusercontent.com/Curabis/BCQuality/stable/custom/setup/sync-bcquality-knowledge.ps1` -to `~/.claude/sync-bcquality-knowledge.ps1`, then run it. +(If that sync script itself is missing, the full onboarding above installs it.) These rules are always active.