find-altool.ps1 er et CURABIS-artefakt - fantomkommandoen udryddet

Felttest paa fremmed maskine afsloerede at VS Code-kommandoen
AL: Configure MCP Server IKKE FINDES - den har staaet i setup-
dokumentationen siden v6 og er blevet gentaget ukritisk siden,
inkl. af Claude i dag. find-altool.ps1 var i virkeligheden
haandlavet i Jernpladsen/Wareco (funktionelt identiske kopier).

- custom/setup/templates/find-altool.ps1: kanonisk template med
  robust versionssortering ([version]-parse i stedet for leksikalsk)
  og klar fejlbesked ved manglende/for gammel AL-extension
- Setup v16: 4b deployer filen fra templaten (raa bytes) og skriver
  ALTID al-entryen i .mcp.json; det betingede spor og fantom-noten
  er fjernet. Mode B: ny raekke deployer filen hvis den mangler
- Install-CurabisMachine.ps1 + CONSUMPTION.md: pr.-repo-trinnet er nu
  bare Opdater CURABIS Standard - AL-extensionen fra Marketplace er
  eneste maskinforudsaetning
- Roemer v5, station 12: AL MCP-wiring paa runden med autoriseret
  stille korrektion. Evidens: en session skrev AL-kode den ikke
  kunne compile og flagede det foerst ved forespoergsel (Conzept)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Michael Dieringer 2026-07-03 15:49:05 +02:00
parent 0f80d267b5
commit 5fb29ee749
5 changed files with 60 additions and 29 deletions

View file

@ -1,7 +1,7 @@
---
kind: action-skill
id: curabis-standard-setup
version: 15
version: 16
title: CURABIS Standard — Project Setup
description: >
Configures a new or existing repository to the CURABIS Standard development
@ -66,6 +66,7 @@ AGENTS_BASE = https://raw.githubusercontent.com/Curabis/BCQuality/stable/custom/
| ferencz.agent.md | `{AGENTS_BASE}/ferencz.agent.md` |
| roemer.agent.md | `{AGENTS_BASE}/roemer.agent.md` |
| cspell.json | `{BASE}/templates/cspell.json` |
| find-altool.ps1 | `{BASE}/templates/find-altool.ps1` |
| sync-bcquality-knowledge.ps1 | `{BASE}/sync-bcquality-knowledge.ps1` |
CLAUDE.md and .mcp.json are generated dynamically — not fetched as static templates
@ -191,8 +192,9 @@ 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.
Then report the manual leftovers it lists (personal client secret; the AL
Language extension if VS Code lacks it) and ask the developer to restart
Claude Code.
If only `~/.claude/bcquality-knowledge/` is missing or stale, the lighter
self-heal suffices:
@ -345,9 +347,17 @@ After creating any new `.al` file, reload the AL extension in VS Code
(`Ctrl+Shift+P -> AL: Reload Extension`) before trusting diagnostics.
```
#### 4b. .mcp.json
#### 4b. AL MCP + .mcp.json
`find-altool.ps1` is a CURABIS artifact deployed from BCQuality — there is NO
VS Code command that generates it (the historical instruction "AL: Configure
MCP Server" referenced a command that does not exist).
1. If `.vscode/find-altool.ps1` is missing: fetch
`{BASE}/templates/find-altool.ps1` AS RAW BYTES → `.vscode/find-altool.ps1`
(create `.vscode/` if needed) and stage it for commit.
2. Write `.mcp.json` — ALWAYS with both entries:
If `.vscode/find-altool.ps1` exists:
```json
{
"mcpServers": {
@ -368,28 +378,15 @@ If `.vscode/find-altool.ps1` exists:
}
```
If `.vscode/find-altool.ps1` does NOT exist:
```json
{
"mcpServers": {
"businesscentral": {
"command": "node",
"args": ["${USERPROFILE}\\.claude\\bc-mcp-bridge.js"]
}
}
}
```
Use Claude Code's built-in environment-variable expansion — `${CLAUDE_PROJECT_DIR:-.}`
and `${USERPROFILE}` — instead of substituting literal detected paths. `.mcp.json` is
git-committed and shared; a path baked in for one developer's machine or username
breaks every other developer's clone (see BCQuality rule
`mcp-config-must-not-hardcode-developer-paths`).
If `find-altool.ps1` is missing, note after writing .mcp.json:
> "ℹ️ AL MCP er ikke konfigureret endnu. Kør `Ctrl+Shift+P → AL: Configure MCP Server`
> i VS Code for at generere find-altool.ps1, og kør derefter
> 'Opdater CURABIS Standard fra BCQuality' — AL MCP tilføjes automatisk."
The only machine prerequisite is the AL Language extension itself
(`ms-dynamics-smb.al` from the Marketplace, recent version) — find-altool.ps1
locates its `altool.exe` dynamically and reports clearly if it is missing.
#### 4c. .github/.agents/ (fetch from BCQuality)
@ -546,7 +543,8 @@ Never touches `CLAUDE.md`, `projectmemory/`, `docs/`, or `~/.bc-mcp.config.json`
| `~/.claude/bcquality-knowledge/` | Re-run the sync script (see below) — machine-local, nothing to commit |
| `.github/.agents/bcquality-knowledge/` + `.github/.agents/sync-bcquality-knowledge.ps1` | v6-era repo-local mirror: propose removal (see below) |
| `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 |
| `.vscode/find-altool.ps1` | Fetch from `{BASE}/templates/` (raw bytes), add if missing — CURABIS artifact, no VS Code command generates it |
| `.mcp.json` — `al` entry | Add if missing (find-altool.ps1 is deployed by the row above) |
| `.mcp.json` — `businesscentral` path | Validate and correct if wrong (see below) |
| `.mcp.json` — `al` `-File` path | Validate and correct if wrong (see below) |
| `.apps/*.code-workspace` — reference layout | Create/complete: app projects + `.AL-Go` + relative `../docs` (rule `al-development-must-use-apps-workspace`) |

View file

@ -11,7 +11,7 @@
# Hvad der IKKE haandteres her (personligt/manuel):
# - din client secret i ~/.bc-mcp.config.json (scriptet lægger templaten
# og siger til)
# - VS Code + AL-extension + 'AL: Configure MCP Server' pr. repo
# - VS Code + AL Language-extensionen (ms-dynamics-smb.al fra Marketplace)
param(
[string]$FullName,
[string]$UserName
@ -77,6 +77,6 @@ if ($todo) {
$todo | ForEach-Object { Write-Host " !! $_" -ForegroundColor Yellow }
}
Write-Host ''
Write-Host 'Pr. repo herefter: aabn i VS Code -> AL: Configure MCP Server (genererer'
Write-Host '.vscode/find-altool.ps1), og sig "Opdater CURABIS Standard fra BCQuality"'
Write-Host 'i Claude Code. Genstart Claude Code efter foerste onboarding.'
Write-Host 'Pr. repo herefter: sig "Opdater CURABIS Standard fra BCQuality" i Claude'
Write-Host 'Code - den deployer selv .vscode/find-altool.ps1 og AL MCP-opsaetningen.'
Write-Host 'Genstart Claude Code efter foerste onboarding.'

View file

@ -0,0 +1,25 @@
# find-altool.ps1 - CURABIS-artefakt (deployes fra BCQuality, ikke genereret
# af AL-extensionen - der findes ingen VS Code-kommando til dette).
#
# Finder altool.exe dynamisk i den NYESTE installerede AL Language extension,
# uanset version, og videresender alle argumenter. Bruges af .mcp.json til at
# starte AL MCP-serveren:
# powershell -ExecutionPolicy Bypass -File .vscode/find-altool.ps1 launchmcpserver --transport stdio
$ext = Get-ChildItem "$env:USERPROFILE\.vscode\extensions" -Filter "ms-dynamics-smb.al-*" -Directory |
Sort-Object { [version]($_.Name -replace '^ms-dynamics-smb\.al-', '' -replace '-.*$', '') } -Descending |
Select-Object -First 1
if (-not $ext) {
Write-Error "AL Language extension ikke fundet. Installer ms-dynamics-smb.al fra VS Code Marketplace."
exit 1
}
$altool = Join-Path $ext.FullName "bin\win32\altool.exe"
if (-not (Test-Path $altool)) {
Write-Error "altool.exe ikke fundet i $($ext.FullName) - opdater AL-extensionen (MCP-serveren kraever en nyere version)."
exit 1
}
& $altool @args