🛠️ Update various documentation, scripts, and configuration templates to enhance clarity, functionality, and maintainability across the project

This commit is contained in:
2026-05-04 10:56:41 +00:00
parent 1a2f1510bf
commit 31975e3088
41 changed files with 4184 additions and 133 deletions

View File

@@ -23,15 +23,52 @@ function Assert-Path {
}
}
function Assert-Command {
param(
[string]$Label,
[string]$CommandName
)
if (Get-Command $CommandName -ErrorAction SilentlyContinue) {
Write-Host "[ok] $Label: $CommandName"
} else {
throw "Missing $Label: $CommandName"
}
}
function Assert-ReadableFile {
param(
[string]$Label,
[string]$Path
)
if ((Test-Path -LiteralPath $Path -PathType Leaf) -and (Get-Item -LiteralPath $Path).PSIsContainer -eq $false) {
Write-Host "[ok] $Label: $Path"
} else {
throw "Unreadable $Label: $Path"
}
}
Assert-Path -Label 'repo root' -Path $RepoRoot
Assert-Path -Label 'canonical home' -Path $CanonicalHome
Assert-Path -Label 'skills link' -Path (Join-Path $CopilotHome 'skills')
Assert-Path -Label 'agents link' -Path (Join-Path $CopilotHome 'agents')
Assert-Path -Label 'instructions link' -Path (Join-Path $CopilotHome 'instructions')
Assert-Path -Label 'hooks link' -Path (Join-Path $CopilotHome 'hooks')
Assert-Path -Label 'session start hook' -Path (Join-Path $CanonicalHome 'resources\hooks\session-audit.json')
Assert-Path -Label 'session start hook script' -Path (Join-Path $CanonicalHome 'resources\scripts\report-hook-event.sh')
Assert-ReadableFile -Label 'session start hook script' -Path (Join-Path $CanonicalHome 'resources\scripts\report-hook-event.sh')
Assert-Command -Label 'session start hook shell' -CommandName 'bash'
Assert-Path -Label 'prompts link' -Path (Join-Path $VscodeUserDir 'prompts')
Assert-Path -Label 'VS Code MCP config' -Path (Join-Path $VscodeUserDir 'mcp.json')
Assert-Path -Label 'Copilot CLI MCP config' -Path (Join-Path $CopilotHome 'mcp-config.json')
Assert-Path -Label 'local MCP overrides' -Path (Join-Path $CanonicalHome '.local\mcp.local.jsonc')
if (-not $Quick) {
Assert-Path -Label 'VS Code settings template' -Path (Join-Path $RepoRoot 'config\vscode\settings.template.jsonc')
Assert-Path -Label 'CLI env template' -Path (Join-Path $RepoRoot 'config\copilot-cli\env.example.ps1')
Assert-Path -Label 'VS Code MCP template' -Path (Join-Path $RepoRoot 'config\mcp\vscode.mcp.template.jsonc')
Assert-Path -Label 'Copilot CLI MCP template' -Path (Join-Path $RepoRoot 'config\mcp\copilot-cli.mcp.template.jsonc')
Assert-Path -Label 'MCP local override example' -Path (Join-Path $RepoRoot 'config\mcp\local-overrides.example.jsonc')
Assert-Path -Label 'Copilot CLI filesystem wrapper' -Path (Join-Path $RepoRoot 'install\mcp\copilot-cli-filesystem-wrapper.mjs')
}