fix(mojang): prefer api.minecraftservices.com over deprecated api.mojang.com #99
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # When `ready-for-agent` is applied to an issue, fire a Claude Code session | |
| # that reads the issue body + its agent-brief comment, implements the change, | |
| # and opens a PR. Billed via the user's Claude Pro/Max subscription quota | |
| # (OAuth token in CLAUDE_CODE_OAUTH_TOKEN), not API tokens. | |
| # | |
| # Setup (one-time, manual): | |
| # 1. Install the Claude GitHub App: https://github.com/apps/claude | |
| # 2. Generate an OAuth token locally: `claude setup-token` | |
| # 3. Add it as a repo secret named `CLAUDE_CODE_OAUTH_TOKEN` | |
| # | |
| # To dispatch: apply the `ready-for-agent` label to an issue. The agent | |
| # brief comment on that issue is the durable contract it'll implement to. | |
| name: ready-for-agent | |
| on: | |
| issues: | |
| types: [labeled] | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write # required by claude-code-action's OAuth flow | |
| jobs: | |
| implement: | |
| if: github.event.label.name == 'ready-for-agent' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: main | |
| - name: Set up uv + Python | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Implement issue via Claude Code | |
| uses: anthropics/claude-code-action@v1 | |
| with: | |
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | |
| # bypassPermissions is the right mode for ephemeral CI runners — | |
| # the runner has no persistent secrets beyond CLAUDE_CODE_OAUTH_TOKEN | |
| # (which is masked from subprocess env), and prompt-on-every-tool | |
| # auto-denies in non-interactive mode. 80 turns gives headroom for | |
| # branch + multi-file edit + test + commit + push + PR; the third | |
| # run on #86 needed 51 turns even before its 27 denial-retries. | |
| claude_args: "--max-turns 80 --permission-mode bypassPermissions" | |
| prompt: | | |
| You are implementing issue #${{ github.event.issue.number }} in | |
| this repo. Title: ${{ github.event.issue.title }} | |
| ## Read first | |
| 1. `CLAUDE.md` and `docs/decisions.md` — project conventions. | |
| 2. `gh issue view ${{ github.event.issue.number }} --comments` — | |
| full issue body and any comments. The comment beginning with | |
| `*This was generated by AI during triage.*` is the agent | |
| brief: a durable behavioural contract. The issue body is | |
| precise reference (file paths, line numbers). Implement to | |
| the contract; use the body as a guide. | |
| ## Apply the project's coding posture | |
| Invoke the `andrej-karpathy-skills:karpathy-guidelines` skill at | |
| the start. Key principles: | |
| - Surgical changes only. Touch what the issue requires. | |
| - Don't refactor adjacent code, comments, or formatting. | |
| - Match existing style. | |
| - Minimum code that solves the problem. | |
| ## Workflow | |
| 1. Confirm you're on `origin/main` HEAD. If not, `git fetch | |
| origin && git reset --hard origin/main` first. | |
| 2. Create a branch: `issue-${{ github.event.issue.number }}-<short-slug>`. | |
| Slug is 3–6 lowercase-hyphenated words from the issue title. | |
| 3. Implement the change. | |
| 4. `uv run pytest -v` — must pass. | |
| 5. `uv run ruff check .` — must be clean. | |
| 6. Commit with a conventional-commit message. Inspect recent | |
| `git log --oneline -10` for the project's style (`feat(files):`, | |
| `fix(slice11):`, etc.) and follow it. | |
| 7. Push the branch: `git push -u origin <branch>`. | |
| 8. Open the PR with `gh pr create --base main`. PR title is the | |
| conventional-commit subject. PR body: | |
| Closes #${{ github.event.issue.number }}. | |
| ## Summary | |
| <bullets> | |
| ## Test plan | |
| - [x] `uv run pytest -v` — N passed | |
| - [x] `uv run ruff check .` — clean | |
| - [ ] Manual: <any acceptance criteria CI can't cover> | |
| <optional: notes / scope-expansion flags for review> | |
| 9. Do NOT merge the PR. Human reviews. | |
| ## Worth flagging in the PR body | |
| - Any scope expansion beyond the agent brief (with reasoning). | |
| - Any existing tests you updated and why. | |
| - Acceptance criteria that require manual verification. | |
| - Anything that looked unexpectedly stale or broken nearby. | |
| ## Heads-up | |
| - Linux runner; Python 3.12 + uv + FastAPI + Jinja + HTMX. | |
| - No JS test harness in this repo; JS behavioural acceptance is | |
| manual unless the issue says otherwise. | |
| - The repo uses squash-merges; PR title becomes the eventual | |
| main-branch commit subject. |