- Add path-specific rules for commands/queries, dynamic queries, validation, and gRPC - Add /add-command, /add-query, /add-dynamic-query scaffolding skills - Add project settings with post-edit formatting, proto validation, and build-gate hooks - Add .editorconfig codifying existing code style conventions - Trim CLAUDE.md from 414 to 130 lines (domain details moved to rules) - Add .harness-version tracking for the shared claude-harness repo Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
80 lines
2.4 KiB
JSON
80 lines
2.4 KiB
JSON
{
|
|
"permissions": {
|
|
"allow": [
|
|
"Bash(dotnet build:*)",
|
|
"Bash(dotnet clean:*)",
|
|
"Bash(dotnet restore:*)",
|
|
"Bash(dotnet run:*)",
|
|
"Bash(dotnet test:*)",
|
|
"Bash(dotnet format:*)",
|
|
"Bash(dotnet add:*)",
|
|
"Bash(dotnet remove:*)",
|
|
"Bash(dotnet sln:*)",
|
|
"Bash(dotnet --list-sdks:*)",
|
|
"Bash(dotnet tool install:*)",
|
|
"Bash(dotnet ef:*)",
|
|
"Bash(grpcurl:*)",
|
|
"Bash(protogen:*)",
|
|
"Bash(mkdir:*)",
|
|
"Bash(ls:*)",
|
|
"Bash(git status:*)",
|
|
"Bash(git log:*)",
|
|
"Bash(git diff:*)",
|
|
"Bash(git branch:*)",
|
|
"Bash(git stash:*)",
|
|
"Bash(git add:*)",
|
|
"Bash(git checkout:*)",
|
|
"WebSearch",
|
|
"WebFetch(domain:learn.microsoft.com)",
|
|
"WebFetch(domain:github.com)",
|
|
"WebFetch(domain:www.nuget.org)",
|
|
"WebFetch(domain:stackoverflow.com)"
|
|
],
|
|
"ask": [
|
|
"Bash(dotnet publish:*)",
|
|
"Bash(dotnet pack:*)",
|
|
"Bash(git push:*)",
|
|
"Bash(git commit:*)"
|
|
]
|
|
},
|
|
"hooks": {
|
|
"PostToolUse": [
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "bash -c 'INPUT=$(cat); FILE=$(echo \"$INPUT\" | jq -r \".tool_input.file_path // empty\"); if [[ -n \"$FILE\" && \"$FILE\" == *.cs ]]; then dotnet format --include \"$FILE\" --no-restore --diagnostics IDE0005 IDE0055 IDE0161 2>/dev/null || true; fi'",
|
|
"timeout": 15,
|
|
"statusMessage": "Formatting..."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"matcher": "Edit|Write",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "bash -c 'INPUT=$(cat); FILE=$(echo \"$INPUT\" | jq -r \".tool_input.file_path // empty\"); if [[ -n \"$FILE\" && \"$FILE\" == *.proto ]]; then dotnet build --no-restore 2>&1 | grep -E \"(error|warning)\" | head -10; fi'",
|
|
"timeout": 30,
|
|
"statusMessage": "Validating proto..."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Stop": [
|
|
{
|
|
"matcher": "",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "bash -c 'BUILD=$(dotnet build --no-restore 2>&1); if echo \"$BUILD\" | grep -q \"Build FAILED\"; then echo \"BUILD FAILED — errors below:\" >&2; echo \"$BUILD\" | grep -E \"error CS\" >&2; exit 2; fi'",
|
|
"timeout": 60,
|
|
"statusMessage": "Verifying build..."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|