Skip to content

feat: add full AI workflow suite#75

Merged
JacobPEvans merged 2 commits intomainfrom
feature/add-ai-workflows
Mar 6, 2026
Merged

feat: add full AI workflow suite#75
JacobPEvans merged 2 commits intomainfrom
feature/add-ai-workflows

Conversation

@JacobPEvans
Copy link
Owner

Summary

  • Add event-driven suite: PR reviews, post-merge checks, CI fix, issue resolution
  • Add scheduled workflows: code-simplifier (Sun/Wed/Sat), best-practices (Tue/Fri), next-steps (Mon/Thu)
  • Add issue management: issue-sweeper and issue-hygiene (weekly Sunday)

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings March 6, 2026 11:22
@gemini-code-assist
Copy link

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@greptile-apps
Copy link

greptile-apps bot commented Mar 6, 2026

Greptile Summary

This PR introduces a full suite of eight AI-driven GitHub Actions workflows — event-driven PR/CI review, post-merge checks, issue auto-resolution, and several scheduled maintenance jobs — all delegating to reusable workflows in the separate JacobPEvans/ai-workflows repository at @v0.8.0. The overall architecture (re-dispatch pattern, job-level permissions, daily rate-limit guard) is well-considered, but three issues need attention before merging:

  • check_suite cascade (ai-all.yml) — including check_suite: completed in the trigger set means every workflow completion in the repo fires the all job, which itself completes and fires another check_suite event, creating an unbounded loop. This is the most critical issue.
  • CI workflow fires on success (ai-ci.yml) — the workflow_run trigger has no conclusion == 'failure' guard, so the AI CI-fix suite runs after every passing CI run as well.
  • Race condition in dispatch limit (issue-auto-resolve.yml) — the 5/day cap is checked and then dispatched non-atomically; simultaneous issue events can all pass the guard in the same second.
  • secrets: inherit to mutable semver tag — all eight workflows forward every repository secret to an external reusable workflow pinned by a moveable semver tag (@v0.8.0). Pinning to a full commit SHA would eliminate the supply-chain risk.

Confidence Score: 2/5

  • Not safe to merge as-is — the check_suite cascade and missing CI-failure guard are likely to cause immediate operational problems on merge.
  • The check_suite trigger in ai-all.yml will create a self-reinforcing workflow loop as soon as the first AI suite run completes, potentially exhausting Actions minutes quickly. The missing failure guard in ai-ci.yml doubles unnecessary AI API usage. These are deterministic issues, not edge cases.
  • .github/workflows/ai-all.yml (cascade trigger) and .github/workflows/ai-ci.yml (missing failure guard) need fixes before merging.

Important Files Changed

Filename Overview
.github/workflows/ai-all.yml Central event-driven dispatcher; check_suite: completed trigger will cascade on every CI run, and secrets: inherit forwards all repo secrets to an external reusable workflow pinned by mutable semver tag.
.github/workflows/ai-ci.yml CI remediation workflow; missing a conclusion == 'failure' guard so it fires on every CI completion (success and failure), wasting resources.
.github/workflows/issue-auto-resolve.yml Issue auto-resolver with a best-effort daily dispatch cap; race condition allows concurrent events to bypass the 5/day limit, and both downstream reusable calls use secrets: inherit.
.github/workflows/best-practices.yml Scheduled best-practices audit (Tue/Fri at 03:00 UTC); straightforward thin wrapper with minimal logic, only concern is secrets: inherit to external workflow.
.github/workflows/code-simplifier.yml Scheduled code simplifier (Sun/Wed/Sat at 04:00 UTC); thin wrapper with contents: write and secrets: inherit, otherwise low risk.
.github/workflows/issue-hygiene.yml Weekly Sunday issue hygiene run; minimal permissions (contents: read), straightforward delegation — no issues beyond the shared secrets: inherit concern.
.github/workflows/issue-sweeper.yml Weekly Sunday issue sweeper running one hour before hygiene; minimal permissions, simple wrapper — same secrets: inherit note as other workflows.
.github/workflows/next-steps.yml Scheduled next-steps planner (Mon/Thu at 05:00 UTC); requests contents: write and issues: write alongside secrets: inherit, otherwise straightforward.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub Events
    participant AAY as ai-all.yml
    participant ACI as ai-ci.yml
    participant IAR as issue-auto-resolve.yml
    participant EXT as ai-workflows (external)

    GH->>AAY: push to main
    AAY->>GH: gh workflow run (workflow_dispatch + commit_sha)
    GH->>AAY: workflow_dispatch
    AAY->>EXT: suite-all.yml@v0.8.0 (secrets: inherit)

    GH->>AAY: pull_request opened/sync
    AAY->>EXT: suite-all.yml@v0.8.0 (secrets: inherit)

    GH->>AAY: check_suite completed ⚠️
    AAY->>EXT: suite-all.yml@v0.8.0 (cascade risk)
    EXT-->>GH: check_suite completed (loops back ⚠️)

    GH->>ACI: workflow_run "Validate Claude Code Plugin" completed
    Note over ACI: Triggers on success AND failure ⚠️
    ACI->>EXT: suite-ci.yml@v0.8.0 (secrets: inherit)

    GH->>IAR: issues opened/labeled
    IAR->>IAR: check daily limit (race-prone ⚠️)
    IAR->>GH: gh workflow run (re-dispatch)
    GH->>IAR: workflow_dispatch
    IAR->>EXT: issue-triage.yml@v0.8.0 (secrets: inherit)
    IAR->>EXT: issue-resolver.yml@v0.8.0 (secrets: inherit)
Loading

Last reviewed commit: 3be304c

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a comprehensive suite of 8 AI-powered GitHub Actions workflow files that integrate with the JacobPEvans/ai-workflows reusable workflow library (pinned to @v0.8.0). The workflows cover event-driven automation (PR reviews, CI fixes, issue resolution), scheduled maintenance tasks (code simplification, best practices checks, next-steps planning), and issue management (sweeping and hygiene).

Changes:

  • Add event-driven workflows: ai-all.yml (unified PR/comment/review router), ai-ci.yml (CI failure auto-fix), and issue-auto-resolve.yml (auto-triage + resolve issues)
  • Add scheduled workflows: code-simplifier.yml (Sun/Wed/Sat), best-practices.yml (Tue/Fri), next-steps.yml (Mon/Thu)
  • Add weekly issue management: issue-sweeper.yml and issue-hygiene.yml (both Sunday)

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/ai-all.yml Unified event-driven workflow routing PR, comment, review, check suite, and push events to the suite-all reusable workflow, with a push-to-workflow_dispatch re-dispatch pattern
.github/workflows/ai-ci.yml Triggers on Validate Claude Code Plugin workflow completion to auto-fix CI failures via suite-ci reusable workflow
.github/workflows/best-practices.yml Scheduled (Tue/Fri) best practices review via reusable workflow
.github/workflows/code-simplifier.yml Scheduled (Sun/Wed/Sat) code simplification via reusable workflow
.github/workflows/issue-auto-resolve.yml Event-driven issue triage and resolution with label filtering (ai:ready) and daily dispatch limit (5/day)
.github/workflows/issue-hygiene.yml Weekly Sunday issue hygiene check via reusable workflow
.github/workflows/issue-sweeper.yml Weekly Sunday issue sweep via reusable workflow
.github/workflows/next-steps.yml Scheduled (Mon/Thu) next-steps planning via reusable workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JacobPEvans JacobPEvans merged commit 4a1d6fe into main Mar 6, 2026
10 checks passed
@JacobPEvans JacobPEvans deleted the feature/add-ai-workflows branch March 6, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants