Skip to content

Conversation

@derekmisler
Copy link
Contributor

@derekmisler derekmisler commented Feb 2, 2026

this is all very much just for testing some ideas, i don't intend on merging it as-is.

Summary

Adds AI-powered code quality infrastructure using cagent agents. This enables:

  • Weekly codebase scanning for security vulnerabilities and bugs
  • Automated issue fixing via the agent-fix label
  • Auto PR review for org members (with fork support)
  • Review response for automated PRs when reviewers request changes

What's Included

Agents (.github/agents/)

Agent Purpose
codebase-scanner.yaml Scans for security issues, logic errors, resource leaks, concurrency bugs
issue-fixer.yaml Analyzes GitHub issues and implements fixes
review-responder.yaml Responds to review feedback on automated PRs

Workflows (.github/workflows/)

Workflow Trigger Description
weekly-codebase-scan.yml Cron (Mon 9am UTC) Scans codebase, creates PR with fixes
issue-fix.yml agent-fix label Fixes issue, creates PR, requests review
pr-review.yml PR opened/ready Auto-reviews PRs from org members

Adds automated code quality infrastructure using cagent:
- Weekly codebase scanner for security and bug detection
- Issue fixer agent triggered by 'agent-fix' label
- Auto PR review for org members with fork support
- Review responder for automated PRs

Security measures:
- Input sanitization to redact secrets in issue content
- Dynamic org membership check (not hardcoded)
- Branch collision detection (no --force push)
- Bot verification for automated PR reviews
- Restricted shell permissions for agents
Adds robustness improvements:
- Build timeout (5 min) to prevent infinite loops
- Detect and revert new files created by agent (unexpected)
- Detect and revert deleted source files (not test files)
- Go syntax validation via gofmt before committing
- Improved agent instructions with verification criteria
- Clear definition of "verified issues" to reduce false positives
Features:
- Add workflow_dispatch trigger with dry-run option for issue-fix
- Support manual testing without creating PRs or comments

Documentation:
- Add comments explaining model choices (sonnet, 8192 tokens, 0.2 temp)
- Add comments explaining timeout values
- Improve code readability for open-source adoption
@derekmisler derekmisler self-assigned this Feb 2, 2026
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.

1 participant