Build orchestration SDK for PostSharp/Metalama repositories.
Important
Read this file entirely before doing any work or answering any question for this project, especially regarding loading skills.
The postsharp-engineering plugin provides skills and slash commands. To discover them:
Before any work in this repo, read these skills:
$env:USERPROFILE\.claude\plugins\cache\postsharp-engineering\**\skills\*.md- Engineering workflows (git, builds, CI/CD)- Never update DockerBuild.ps1, Dockerfile. Dockerfile.claude, eng/RunClaude.ps1. These files are generated by
Build.ps1. Their source code is in the Resources directory. - ALWAYS Read which plug-ins and skills are available to you before doing ANY work, and confirm to the users that you have read these skills before any session.
When running inside a Docker container, you have access to the host-approval MCP server for executing privileged commands on the host machine. These commands require human approval before execution.
The MCP server uses token-based authentication:
- DockerBuild.ps1 generates a random 128-bit secret when starting the MCP server
- The secret is passed to the container via the
MCP_APPROVAL_SERVER_TOKENenvironment variable - All MCP requests include this secret as a URL parameter for authentication
- The MCP server validates the token before processing any commands
Use the ExecuteCommand tool from the host-approval MCP server for:
gh pr create- Creating pull requestsgh pr merge- Merging pull requestsgh pr view- Viewing PR details (private repos)gh release create- Creating releasesgh issue create/close/comment- Issue management- Any
ghcommand that requires authentication
git push- Pushing commits to remotegit push --tags- Pushing tagsgit push --force- Force pushing (use with caution)
- Any API calls to TeamCity
- Triggering builds
- Accessing build artifacts
- Managing build configurations
dotnet nuget push- Publishing NuGet packages- Any operation that publishes artifacts externally
Call the ExecuteCommand tool with:
command: The command to executeworkingDirectory: The working directory (use forward slashes:X:/src/RepoName)claimedPurpose: A clear explanation of why this command is needed
To push a feature branch:
ExecuteCommand(
command: "git push origin feature/my-feature",
workingDirectory: "X:/src/PostSharp.Engineering",
claimedPurpose: "Push the feature branch with MCP implementation to remote for PR creation"
)
Do NOT use the MCP server for:
- Local git operations (commit, branch, checkout, status, diff, log)
- Local builds (
dotnet build,dotnet test) - File operations within the container
- Reading files or exploring the codebase
These operations should be done directly in the container using standard tools.
Before scheduling a TeamCity build or deploy, the version must be bumped. This is done via the VersionBump build configuration on TeamCity.
Use the MCP ExecuteCommand tool to trigger the VersionBump build via TeamCity API (requires TEAMCITY_CLOUD_TOKEN on host):
$headers = @{
"Authorization" = "Bearer $env:TEAMCITY_CLOUD_TOKEN"
"Content-Type" = "application/json"
"Accept" = "application/json"
}
$body = @{
buildType = @{ id = "<ProjectPrefix>_VersionBump" }
branchName = "<branch>"
} | ConvertTo-Json
Invoke-RestMethod -Uri "https://postsharp.teamcity.com/app/rest/buildQueue" -Method Post -Headers $headers -Body $body- Check
.teamcity/settings.ktsfor the VCS root:AbsoluteId("...") - The build type ID is:
<VcsRootId>_VersionBump - For this repo:
Engineering_PostSharpEngineering_VersionBump