From 3be304c5feabb2f70ed692712dca146480fc7e05 Mon Sep 17 00:00:00 2001 From: JacobPEvans <20714140+JacobPEvans@users.noreply.github.com> Date: Fri, 6 Mar 2026 06:22:36 -0500 Subject: [PATCH 1/2] feat: add full AI workflow suite (claude) --- .github/workflows/ai-all.yml | 57 ++++++++++++++++ .github/workflows/ai-ci.yml | 26 ++++++++ .github/workflows/best-practices.yml | 13 ++++ .github/workflows/code-simplifier.yml | 13 ++++ .github/workflows/issue-auto-resolve.yml | 82 ++++++++++++++++++++++++ .github/workflows/issue-hygiene.yml | 14 ++++ .github/workflows/issue-sweeper.yml | 14 ++++ .github/workflows/next-steps.yml | 14 ++++ 8 files changed, 233 insertions(+) create mode 100644 .github/workflows/ai-all.yml create mode 100644 .github/workflows/ai-ci.yml create mode 100644 .github/workflows/best-practices.yml create mode 100644 .github/workflows/code-simplifier.yml create mode 100644 .github/workflows/issue-auto-resolve.yml create mode 100644 .github/workflows/issue-hygiene.yml create mode 100644 .github/workflows/issue-sweeper.yml create mode 100644 .github/workflows/next-steps.yml diff --git a/.github/workflows/ai-all.yml b/.github/workflows/ai-all.yml new file mode 100644 index 0000000..b489eb5 --- /dev/null +++ b/.github/workflows/ai-all.yml @@ -0,0 +1,57 @@ +name: AI Workflows + +on: + pull_request: + types: [opened, synchronize] + issue_comment: + types: [created] + pull_request_review: + types: [submitted] + check_suite: + types: [completed] + push: + branches: [main] + workflow_dispatch: + inputs: + commit_sha: + description: "Commit SHA to review (leave blank for latest main)" + required: false + type: string + +permissions: {} + +jobs: + # Push to main -> re-dispatch as workflow_dispatch so post-merge suites + # can use the commit SHA via inputs.commit_sha (workflow_run context workaround). + post-merge-dispatch: + if: github.event_name == 'push' + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - name: Re-trigger as workflow_dispatch + env: + WORKFLOW_NAME: ${{ github.workflow }} + GH_TOKEN: ${{ github.token }} + run: | + gh workflow run "$WORKFLOW_NAME" \ + --repo "${{ github.repository }}" \ + --ref main \ + -f commit_sha="${{ github.sha }}" + + # All non-push events -> suite-all routes to correct sub-suite + all: + if: github.event_name != 'push' + permissions: + actions: read + checks: read + contents: write + id-token: write + issues: write + pull-requests: write + uses: JacobPEvans/ai-workflows/.github/workflows/suite-all.yml@v0.8.0 + with: + caller_event: ${{ github.event_name }} + review_prompt: "Focus on Claude Code plugin structure, skill authoring patterns, and hook configuration best practices" + commit_sha: ${{ inputs.commit_sha || github.sha }} + secrets: inherit diff --git a/.github/workflows/ai-ci.yml b/.github/workflows/ai-ci.yml new file mode 100644 index 0000000..b0c4a7d --- /dev/null +++ b/.github/workflows/ai-ci.yml @@ -0,0 +1,26 @@ +name: AI CI + +on: + workflow_run: + workflows: ["Validate Claude Code Plugin"] + types: [completed] + +permissions: + actions: read + contents: write + id-token: write + issues: write + pull-requests: write + +concurrency: + group: ai-ci-${{ github.event.workflow_run.head_branch }} + cancel-in-progress: true + +jobs: + ci-suite: + uses: JacobPEvans/ai-workflows/.github/workflows/suite-ci.yml@v0.8.0 + with: + repo_context: "Claude Code plugins: skills, hooks, and slash commands for Claude Code CLI" + ci_structure: "validate-plugin.yml (JSON schema validation for plugin manifests)" + workflow_name: "Validate Claude Code Plugin" + secrets: inherit diff --git a/.github/workflows/best-practices.yml b/.github/workflows/best-practices.yml new file mode 100644 index 0000000..b5cd72d --- /dev/null +++ b/.github/workflows/best-practices.yml @@ -0,0 +1,13 @@ +name: Best Practices +on: + schedule: + - cron: "0 3 * * 2,5" + workflow_dispatch: +permissions: + contents: read + id-token: write + pull-requests: write +jobs: + best-practices: + uses: JacobPEvans/ai-workflows/.github/workflows/best-practices.yml@v0.8.0 + secrets: inherit diff --git a/.github/workflows/code-simplifier.yml b/.github/workflows/code-simplifier.yml new file mode 100644 index 0000000..200dcbe --- /dev/null +++ b/.github/workflows/code-simplifier.yml @@ -0,0 +1,13 @@ +name: Code Simplifier +on: + schedule: + - cron: "0 4 * * 0,3,6" + workflow_dispatch: +permissions: + contents: write + id-token: write + pull-requests: write +jobs: + simplify: + uses: JacobPEvans/ai-workflows/.github/workflows/code-simplifier.yml@v0.8.0 + secrets: inherit diff --git a/.github/workflows/issue-auto-resolve.yml b/.github/workflows/issue-auto-resolve.yml new file mode 100644 index 0000000..c6d3840 --- /dev/null +++ b/.github/workflows/issue-auto-resolve.yml @@ -0,0 +1,82 @@ +name: Issue Auto-Resolve + +on: + issues: + types: [opened, labeled] + workflow_dispatch: + inputs: + issue_number: + description: "Issue number to resolve" + required: true + type: string + +permissions: + actions: write + contents: write + id-token: write + issues: write + pull-requests: write + +jobs: + dispatch: + if: github.event_name == 'issues' + runs-on: ubuntu-latest + permissions: + actions: write + issues: write + steps: + - name: Dispatch as workflow_dispatch + env: + GH_TOKEN: ${{ github.token }} + WORKFLOW_NAME: ${{ github.workflow }} + REPO: ${{ github.repository }} + ISSUE_NUM: ${{ github.event.issue.number }} + EVENT_ACTION: ${{ github.event.action }} + LABEL_NAME: ${{ github.event.label.name }} + run: | + # Filter labeled events to only ai:ready + if [[ "$EVENT_ACTION" == "labeled" && "$LABEL_NAME" != "ai:ready" ]]; then + echo "Label '$LABEL_NAME' is not ai:ready — skipping" + exit 0 + fi + + # Daily dispatch limit (cost control safety valve) + TODAY=$(date -u +%Y-%m-%d) + COUNT=$(gh run list \ + --workflow "$WORKFLOW_NAME" \ + --repo "$REPO" \ + --event workflow_dispatch \ + --created ">=$TODAY" \ + --json databaseId --jq 'length') + if [[ "$COUNT" -ge 5 ]]; then + echo "Daily dispatch limit reached ($COUNT/5) — skipping" + exit 0 + fi + + # Remove ai:ready label so it can be re-applied to re-trigger + if [[ "$EVENT_ACTION" == "labeled" && "$LABEL_NAME" == "ai:ready" ]]; then + gh issue edit "$ISSUE_NUM" --repo "$REPO" --remove-label "ai:ready" || true + fi + + gh workflow run "$WORKFLOW_NAME" \ + --repo "$REPO" \ + -f issue_number="$ISSUE_NUM" + + run-triage: + if: github.event_name == 'workflow_dispatch' + uses: JacobPEvans/ai-workflows/.github/workflows/issue-triage.yml@v0.8.0 + secrets: inherit + with: + issue_number: ${{ inputs.issue_number }} + + resolve-issue: + needs: [run-triage] + if: >- + always() && + github.event_name == 'workflow_dispatch' && + (needs.run-triage.result == 'success' || needs.run-triage.result == 'skipped') + uses: JacobPEvans/ai-workflows/.github/workflows/issue-resolver.yml@v0.8.0 + secrets: inherit + with: + repo_context: "Claude Code plugins: skills, hooks, and slash commands for Claude Code CLI" + issue_number: ${{ inputs.issue_number }} diff --git a/.github/workflows/issue-hygiene.yml b/.github/workflows/issue-hygiene.yml new file mode 100644 index 0000000..f998d12 --- /dev/null +++ b/.github/workflows/issue-hygiene.yml @@ -0,0 +1,14 @@ +name: Issue Hygiene +on: + schedule: + - cron: "0 7 * * 0" + workflow_dispatch: +permissions: + contents: read + id-token: write + issues: write + pull-requests: read +jobs: + hygiene: + uses: JacobPEvans/ai-workflows/.github/workflows/issue-hygiene.yml@v0.8.0 + secrets: inherit diff --git a/.github/workflows/issue-sweeper.yml b/.github/workflows/issue-sweeper.yml new file mode 100644 index 0000000..c7d6983 --- /dev/null +++ b/.github/workflows/issue-sweeper.yml @@ -0,0 +1,14 @@ +name: Issue Sweeper +on: + schedule: + - cron: "0 6 * * 0" + workflow_dispatch: +permissions: + contents: read + id-token: write + issues: write + pull-requests: read +jobs: + sweep: + uses: JacobPEvans/ai-workflows/.github/workflows/issue-sweeper.yml@v0.8.0 + secrets: inherit diff --git a/.github/workflows/next-steps.yml b/.github/workflows/next-steps.yml new file mode 100644 index 0000000..020be9d --- /dev/null +++ b/.github/workflows/next-steps.yml @@ -0,0 +1,14 @@ +name: Next Steps +on: + schedule: + - cron: "0 5 * * 1,4" + workflow_dispatch: +permissions: + contents: write + id-token: write + pull-requests: write + issues: write +jobs: + next-steps: + uses: JacobPEvans/ai-workflows/.github/workflows/next-steps.yml@v0.8.0 + secrets: inherit From 3b39a58d4ab6534297741b689d17f83280b0c318 Mon Sep 17 00:00:00 2001 From: JacobPEvans <20714140+JacobPEvans@users.noreply.github.com> Date: Fri, 6 Mar 2026 06:43:49 -0500 Subject: [PATCH 2/2] fix: add concurrency groups to prevent duplicate PR creation (claude) --- .github/workflows/code-simplifier.yml | 5 +++++ .github/workflows/next-steps.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/code-simplifier.yml b/.github/workflows/code-simplifier.yml index 200dcbe..35addbc 100644 --- a/.github/workflows/code-simplifier.yml +++ b/.github/workflows/code-simplifier.yml @@ -7,6 +7,11 @@ permissions: contents: write id-token: write pull-requests: write + +concurrency: + group: code-simplifier + cancel-in-progress: true + jobs: simplify: uses: JacobPEvans/ai-workflows/.github/workflows/code-simplifier.yml@v0.8.0 diff --git a/.github/workflows/next-steps.yml b/.github/workflows/next-steps.yml index 020be9d..7b116f7 100644 --- a/.github/workflows/next-steps.yml +++ b/.github/workflows/next-steps.yml @@ -8,6 +8,11 @@ permissions: id-token: write pull-requests: write issues: write + +concurrency: + group: next-steps + cancel-in-progress: true + jobs: next-steps: uses: JacobPEvans/ai-workflows/.github/workflows/next-steps.yml@v0.8.0