From 49acb466496753379ba867f12dd21099c5a2b57d Mon Sep 17 00:00:00 2001 From: Daniel Kronovet Date: Tue, 21 Apr 2026 12:19:24 -0400 Subject: [PATCH 1/2] feat: wire claude-code-action for issue-driven PR drafting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the orphaned OpenHands setup with anthropics/claude-code-action, scoped to draft PRs in response to defrag-generated issues (e.g., the monthly "defrag: cross-page analysis findings" issues). - Add .github/workflows/claude.yaml: fires on issue labels, assignments, comments, and PR review activity. Uses the action's defaults (label `claude`, @claude mentions, assignee triggers). - Prompt scopes Claude to the repo's conventions (CLAUDE.md, spec/) and explicitly tells it to apply mechanical fixes (terminology, verified cross-refs, heading alignment) while flagging structural changes in the PR description for human curation — the draft is a jumping-off point, not an autonomous resolution. - Remove .github/actions/{ci,openhands,release}.yaml: these were in the wrong directory (GitHub only runs workflows from .github/workflows/) and never fired. OpenHands specifically is superseded by this integration. --- .github/actions/ci.yaml | 38 ------------------------------ .github/actions/openhands.yaml | 21 ----------------- .github/actions/release.yaml | 43 ---------------------------------- .github/workflows/claude.yaml | 38 ++++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 102 deletions(-) delete mode 100644 .github/actions/ci.yaml delete mode 100644 .github/actions/openhands.yaml delete mode 100644 .github/actions/release.yaml create mode 100644 .github/workflows/claude.yaml diff --git a/.github/actions/ci.yaml b/.github/actions/ci.yaml deleted file mode 100644 index f081eda3..00000000 --- a/.github/actions/ci.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: CI - -on: - pull_request: - branches: [main] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - - name: TODO to Issue - uses: alstr/todo-to-issue-action@v5 - - - name: Run misspell with reviewdog - uses: reviewdog/action-misspell@v1.23.0 - - - name: Set up Node.js - uses: actions/setup-node@v3 - with: - node-version: "18" - - - name: Install dependencies - run: npm ci - - - name: Run linter - run: npm run lint - - - name: Run tests - run: npm test - - - name: Build project - run: npm run build - - - name: Check formatting - run: npm run format:check diff --git a/.github/actions/openhands.yaml b/.github/actions/openhands.yaml deleted file mode 100644 index 096e8282..00000000 --- a/.github/actions/openhands.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Resolve Issue with OpenHands - -on: - issues: - types: [labeled] - pull_request: - types: [labeled] - -jobs: - call-openhands-resolver: - uses: All-Hands-AI/openhands-resolver/.github/workflows/openhands-resolver.yml@main - if: github.event.label.name == 'fix-me' - with: - issue_number: ${{ github.event.issue.number || github.event.pull_request.number }} - max_iterations: 50 - secrets: - PAT_TOKEN: ${{ secrets.PAT_TOKEN }} - PAT_USERNAME: ${{ secrets.PAT_USERNAME }} - LLM_MODEL: ${{ secrets.LLM_MODEL }} - LLM_API_KEY: ${{ secrets.LLM_API_KEY }} - LLM_BASE_URL: ${{ secrets.LLM_BASE_URL }} diff --git a/.github/actions/release.yaml b/.github/actions/release.yaml deleted file mode 100644 index 0eea9f55..00000000 --- a/.github/actions/release.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: Release - -on: - workflow_dispatch: - inputs: - version: - description: "Version to release (e.g., v1.0.0)" - required: true - type: string - dojo_version: - description: "Dojo version to use" - required: true - type: string - -jobs: - create-release: - runs-on: ubuntu-latest - env: - DOJO_VERSION: ${{ inputs.dojo_version }} - steps: - - uses: actions/checkout@v3 - - # Setup and test with specified Dojo version - - run: curl -L https://install.dojoengine.org | bash - - run: /home/runner/.config/.dojo/bin/dojoup -v ${{ env.DOJO_VERSION }} - - run: | - /home/runner/.config/.dojo/bin/sozo build - /home/runner/.config/.dojo/bin/sozo test - - # Create tag and release - - name: Create Tag - run: | - git tag ${{ inputs.version }} - git push origin ${{ inputs.version }} - - - name: Create Release - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ inputs.version }} - name: Release ${{ inputs.version }} - draft: false - prerelease: false - generate_release_notes: true diff --git a/.github/workflows/claude.yaml b/.github/workflows/claude.yaml new file mode 100644 index 00000000..461fda2e --- /dev/null +++ b/.github/workflows/claude.yaml @@ -0,0 +1,38 @@ +name: Claude + +on: + issues: + types: [labeled, assigned] + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + pull_request_review: + types: [submitted] + +jobs: + claude: + runs-on: ubuntu-latest + permissions: + contents: write + issues: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: anthropics/claude-code-action@v1 + with: + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + github_token: ${{ secrets.GITHUB_TOKEN }} + prompt: | + You are acting on the Dojo documentation repo. The project-level CLAUDE.md and the files in `spec/` (style-guide.md, page-types.md, best-practices.md) are the source of truth for writing conventions — read them before drafting changes. + + When responding to a cross-page analysis issue opened by the defrag workflow (title "defrag: cross-page analysis findings"), treat it as a scoping document, not a spec: + + - Draft a PR that addresses the concrete, low-judgment items (terminology consistency, adding cross-references whose targets clearly exist, heading format alignment). + - Leave structural changes (content relocations, redundancy removal) for human review — propose them in the PR description with pros/cons rather than applying them directly. + - Verify every link target exists in `docs/pages/` before adding a cross-reference. Do not invent paths. + - Run `pnpm run build` before finalizing and fix any errors the build surfaces. + - In the PR description, enumerate which findings you addressed and which you deferred to the reviewer, so the human can curate quickly. From a1f98669435c0bbd770076fbe7bf664051bd370b Mon Sep 17 00:00:00 2001 From: Daniel Kronovet Date: Tue, 21 Apr 2026 12:33:57 -0400 Subject: [PATCH 2/2] chore: gate PRs on a clean pnpm build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a minimal CI workflow that runs `pnpm install --frozen-lockfile` followed by `pnpm run build` on every PR to main and every push to main. The defrag workflow already runs the build inside its own context, but regular contributor PRs had no gate — regressions only surfaced after merge. This restores the build-check intent from the deleted ci.yaml without its dead weight (Node 18, npm, stale v3 actions). --- .github/workflows/build.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..69eb9dd6 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,24 @@ +name: Build + +on: + pull_request: + branches: [main] + push: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "24" + cache: "pnpm" + + - run: pnpm install --frozen-lockfile + + - run: pnpm run build