From 7ff753a73c7dda23516c46d3fe3a7e39c6e3c54e Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Feb 2026 15:36:56 +0000 Subject: [PATCH] Use Claude engine, fix network schema, remove pr-fix workflow - Add engine: claude to all agentic workflows (uses ANTHROPIC_API_KEY) - Fix dependency-update.md network field: use object format instead of array to match the oneOf schema (string | object) - Remove pr-fix.md since ci-doctor.md already handles CI failure investigation and auto-fixing https://claude.ai/code/session_01JTYNSeJrGzdW6wfAUbdjjw --- .github/workflows/ci-doctor.md | 2 + .github/workflows/code-review.md | 2 + .github/workflows/dependency-update.md | 7 +- .github/workflows/pr-fix.md | 103 ------------------------- 4 files changed, 9 insertions(+), 105 deletions(-) delete mode 100644 .github/workflows/pr-fix.md diff --git a/.github/workflows/ci-doctor.md b/.github/workflows/ci-doctor.md index f274df1..03909bd 100644 --- a/.github/workflows/ci-doctor.md +++ b/.github/workflows/ci-doctor.md @@ -38,6 +38,8 @@ tools: github: toolsets: [pull_requests, repos, issues] +engine: claude + timeout-minutes: 20 --- diff --git a/.github/workflows/code-review.md b/.github/workflows/code-review.md index 6e730ab..aaf9026 100644 --- a/.github/workflows/code-review.md +++ b/.github/workflows/code-review.md @@ -35,6 +35,8 @@ tools: bash: true web-fetch: +engine: claude + timeout-minutes: 15 --- diff --git a/.github/workflows/dependency-update.md b/.github/workflows/dependency-update.md index 71fc660..7c202a9 100644 --- a/.github/workflows/dependency-update.md +++ b/.github/workflows/dependency-update.md @@ -12,8 +12,9 @@ on: permissions: read-all network: - - defaults - - go + allowed: + - go + blocked: [] safe-outputs: create-pull-request: @@ -32,6 +33,8 @@ tools: github: toolsets: [pull_requests, repos, issues] +engine: claude + timeout-minutes: 30 --- diff --git a/.github/workflows/pr-fix.md b/.github/workflows/pr-fix.md deleted file mode 100644 index a1a8a8a..0000000 --- a/.github/workflows/pr-fix.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -description: | - On-demand PR fixer triggered by the /pr-fix command. Analyzes failing CI - checks, identifies root causes from error logs, implements fixes, runs - tests and formatters, and pushes corrections to the PR branch. Provides - detailed comments explaining changes made. - -on: - slash_command: - name: pr-fix - reaction: "eyes" - -permissions: read-all - -network: defaults - -safe-outputs: - push-to-pull-request-branch: - create-issue: - title-prefix: "[PR Fix] " - labels: [automation, pr-fix] - assignees: [imjasonh] - add-comment: - -tools: - bash: true - web-fetch: - github: - toolsets: [pull_requests, repos] - -timeout-minutes: 20 ---- - -# PR Fix - -You are an AI assistant that fixes pull requests for the **git-k8s** project — a Kubernetes-native controller system written in Go. - -## Project Context - -- **Language**: Go 1.24.7, module `github.com/imjasonh/git-k8s` -- **Build**: `go build ./cmd/{push,sync,resolver,repo-watcher}-controller/` -- **Test**: `go test ./...` -- **Lint**: `go vet ./...` -- **Tidy**: `go mod tidy` - -## Current Context - -- **Repository**: ${{ github.repository }} -- **Pull Request**: #${{ github.event.issue.number }} -- **Instructions**: "${{ steps.sanitized.outputs.text }}" - -## Fix Protocol - -### Step 1: Understand the Problem - -1. Read the pull request and all comments for PR #${{ github.event.issue.number }} -2. Parse the instructions from the `/pr-fix` command. If no specific instructions are given, default to analyzing and fixing CI failures. - -### Step 2: Analyze CI Failures - -1. Get the latest workflow runs for this PR -2. Identify failing checks and retrieve their logs -3. Extract specific error messages, file paths, and line numbers -4. Determine the root cause: - - Compilation errors - - Test failures - - Linting/vet issues - - `go mod tidy` drift - - E2E test failures - -### Step 3: Implement the Fix - -1. Check out the branch for PR #${{ github.event.issue.number }} -2. Set up the Go development environment -3. Implement the fix based on your analysis -4. Verify the fix: - - `go build ./cmd/push-controller/ && go build ./cmd/sync-controller/ && go build ./cmd/resolver-controller/ && go build ./cmd/repo-watcher-controller/` - - `go test ./...` - - `go vet ./...` - - `go mod tidy` (check for drift) - -### Step 4: Push and Document - -1. Commit the changes with a clear message explaining the fix -2. Push to the PR branch -3. Add a comment to the PR explaining: - - What was failing and why - - What the fix does - - What commands you ran to verify - -### Step 5: Escalate if Needed - -If you cannot fix the issue or are unsure about the right approach: -1. Add a comment explaining what you found and what you tried -2. Create an issue assigned to @imjasonh with specific questions -3. Do not push broken code - -## Guidelines - -- **Verify before pushing** — always run build, test, and vet before pushing -- **Minimal changes** — fix only what's broken, don't refactor unrelated code -- **Preserve intent** — understand the PR author's intent and work with it -- **Be transparent** — document everything you did in the PR comment