cicaddy-github 0.4.0__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. {cicaddy_github-0.4.0/.claude → cicaddy_github-0.5.0/.agents}/skills/cicaddy-action/SKILL.md +121 -1
  2. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/.github/workflows/changelog.yml +2 -2
  3. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/.github/workflows/release.yml +1 -1
  4. cicaddy_github-0.5.0/AGENTS.md +211 -0
  5. cicaddy_github-0.5.0/CLAUDE.md +9 -0
  6. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/PKG-INFO +88 -12
  7. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/README.md +86 -10
  8. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/action.yml +26 -3
  9. cicaddy_github-0.5.0/docs/delegation.md +167 -0
  10. cicaddy_github-0.5.0/docs/providers.md +93 -0
  11. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/entrypoint.sh +36 -0
  12. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/pyproject.toml +5 -2
  13. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/config/settings.py +23 -0
  14. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/github_integration/agents.py +198 -0
  15. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/github_integration/detector.py +12 -0
  16. cicaddy_github-0.5.0/src/cicaddy_github/github_integration/go_dep_review_tools.py +513 -0
  17. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/plugin.py +43 -1
  18. cicaddy_github-0.5.0/tasks/go_dep_impact_review.yml +107 -0
  19. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tests/unit/test_agents.py +122 -1
  20. cicaddy_github-0.5.0/tests/unit/test_go_dep_review.py +635 -0
  21. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tests/unit/test_plugin.py +73 -0
  22. cicaddy_github-0.4.0/CLAUDE.md +0 -41
  23. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/.github/dependabot.yml +0 -0
  24. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/.github/workflows/ci.yml +0 -0
  25. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/.github/workflows/pr-review.yml +0 -0
  26. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/.gitignore +0 -0
  27. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/.pre-commit-config.yaml +0 -0
  28. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/CODE_OF_CONDUCT.md +0 -0
  29. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/CONTRIBUTING.md +0 -0
  30. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/Dockerfile +0 -0
  31. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/LICENSE +0 -0
  32. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/__init__.py +0 -0
  33. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/config/__init__.py +0 -0
  34. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/github_integration/__init__.py +0 -0
  35. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/github_integration/analyzer.py +0 -0
  36. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/github_integration/tools.py +0 -0
  37. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/security/__init__.py +0 -0
  38. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/security/leak_detector.py +0 -0
  39. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/src/cicaddy_github/validation.py +0 -0
  40. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tasks/changelog_report.yml +0 -0
  41. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tasks/pr_review.yml +0 -0
  42. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/templates/report_template.html +0 -0
  43. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tests/__init__.py +0 -0
  44. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tests/conftest.py +0 -0
  45. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tests/unit/__init__.py +0 -0
  46. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tests/unit/test_analyzer.py +0 -0
  47. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tests/unit/test_detector.py +0 -0
  48. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tests/unit/test_leak_detector.py +0 -0
  49. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tests/unit/test_settings.py +0 -0
  50. {cicaddy_github-0.4.0 → cicaddy_github-0.5.0}/tests/unit/test_tools.py +0 -0
@@ -225,7 +225,7 @@ the `safe-to-review` label. The label is auto-removed on new pushes to prevent
225
225
  TOCTOU bypasses.
226
226
 
227
227
  ```yaml
228
- - uses: redhat-community-ai-tools/cicaddy-action@v0.4.0
228
+ - uses: redhat-community-ai-tools/cicaddy-action@v0.5.0
229
229
  with:
230
230
  ai_provider: gemini
231
231
  ai_model: gemini-3-flash-preview
@@ -306,6 +306,126 @@ JSON array. Each server object has:
306
306
  - The `github_pr` agent updates its PR comment in-place on re-runs
307
307
  - Use `gh auth token` to generate a GitHub token quickly
308
308
 
309
+ ## Sub-Agent Delegation
310
+
311
+ cicaddy-action v0.5.0+ supports AI-powered sub-agent delegation via cicaddy>=0.8.0. When enabled, the framework uses a triage AI to select specialized sub-agents that run in parallel.
312
+
313
+ ### How It Works
314
+
315
+ 1. **Triage** — AI analyzes the PR diff/context and selects reviewers (security, architecture, performance, etc.)
316
+ 2. **Parallel Execution** — Selected sub-agents run concurrently with focused prompts and filtered tools
317
+ 3. **Aggregation** — Results merged into a single PR comment with per-agent sections
318
+
319
+ ### Configuration
320
+
321
+ **Action Inputs:**
322
+ - `delegation_mode`: `none` (default) or `auto`
323
+ - `max_sub_agents`: 1-10 (default: `3`)
324
+
325
+ **Environment Variables:**
326
+ - `DELEGATION_MODE`: `none` or `auto`
327
+ - `MAX_SUB_AGENTS`: 1-10 (default: `3`)
328
+ - `SUB_AGENT_MAX_ITERS`: 1-15 (default: `10`)
329
+ - `DELEGATION_AGENTS_DIR`: `.agents/delegation` (custom agent YAML directory)
330
+ - `DELEGATION_AGENTS`: JSON array for inline custom agents
331
+ - `TRIAGE_PROMPT`: Custom triage instructions
332
+
333
+ **CLI Flags:**
334
+ ```bash
335
+ cicaddy run --env-file .env --delegation-mode auto --max-sub-agents 2
336
+ ```
337
+
338
+ ### Built-in Review Sub-Agents
339
+
340
+ For `github_pr` agent type:
341
+ - `security-reviewer` — Auth, crypto, secrets, injection
342
+ - `architecture-reviewer` — Design patterns, module boundaries
343
+ - `api-reviewer` — Endpoints, schemas, versioning
344
+ - `database-reviewer` — Queries, migrations, indexes
345
+ - `ui-reviewer` — Frontend components, accessibility
346
+ - `devops-reviewer` — CI/CD, Docker, deployment
347
+ - `performance-reviewer` — Algorithms, caching, concurrency
348
+ - `general-reviewer` — Catch-all
349
+
350
+ ### Plugin Hooks
351
+
352
+ The `cicaddy.delegation_blocked_tools` entry point blocks write and side-effect operations in sub-agents:
353
+ - Posting PR comments and submitting reviews
354
+ - Merging PRs and managing labels
355
+ - Creating/editing/closing issues
356
+ - Branch and tag operations
357
+ - Sending Slack notifications
358
+
359
+ Sub-agents only perform analysis; they cannot modify GitHub state or send notifications.
360
+
361
+ ### PR Comment Output
362
+
363
+ When delegation is active, PR comments include a collapsible metadata block:
364
+ ```markdown
365
+ <details><summary>Delegation details: 3 agent(s) succeeded (12.4s)</summary>
366
+
367
+ Agents: security-reviewer, architecture-reviewer, api-reviewer
368
+
369
+ - **security-reviewer**: PR modifies authentication middleware
370
+ - **architecture-reviewer**: Significant module boundary changes
371
+ - **api-reviewer**: REST endpoint modifications detected
372
+
373
+ </details>
374
+ ```
375
+
376
+ ### Custom Sub-Agents
377
+
378
+ Define custom agents in `.agents/delegation/review/`:
379
+
380
+ ```yaml
381
+ # .agents/delegation/review/compliance-reviewer.yaml
382
+ name: compliance-reviewer
383
+ agent_type: review
384
+ persona: compliance engineer
385
+ description: Reviews regulatory compliance impact
386
+ categories: [security, configuration]
387
+ constraints:
388
+ - Focus on SOC2, GDPR, HIPAA compliance
389
+ - Flag PII handling changes
390
+ priority: 15
391
+ ```
392
+
393
+ Or inline via `DELEGATION_AGENTS` JSON env var.
394
+
395
+ ### GitHub Actions Example
396
+
397
+ ```yaml
398
+ - uses: redhat-community-ai-tools/cicaddy-action@main
399
+ with:
400
+ ai_provider: gemini
401
+ ai_model: gemini-3-flash-preview
402
+ ai_api_key: ${{ secrets.AI_API_KEY }}
403
+ task_file: tasks/pr_review.yml
404
+ post_pr_comment: 'true'
405
+ delegation_mode: 'auto'
406
+ max_sub_agents: '3'
407
+ ```
408
+
409
+ ### Local Development Example
410
+
411
+ ```bash
412
+ # .env.my-review
413
+ AI_PROVIDER=gemini
414
+ AI_MODEL=gemini-3-flash-preview
415
+ GEMINI_API_KEY=<key>
416
+ GITHUB_TOKEN=<token>
417
+ GITHUB_REPOSITORY=owner/repo
418
+ GITHUB_PR_NUMBER=42
419
+ POST_PR_COMMENT=true
420
+ DELEGATION_MODE=auto
421
+ MAX_SUB_AGENTS=3
422
+
423
+ # Run:
424
+ uv run cicaddy run --env-file .env.my-review
425
+ ```
426
+
427
+ See [docs/delegation.md](../../../docs/delegation.md) for the full specification.
428
+
309
429
  ## Code Style
310
430
 
311
431
  - Python 3.11+ with type hints
@@ -50,7 +50,7 @@ jobs:
50
50
  cp "${{ steps.report.outputs.report_html }}" _site/index.html
51
51
 
52
52
  - name: Upload Pages artifact
53
- uses: actions/upload-pages-artifact@v4
53
+ uses: actions/upload-pages-artifact@v5
54
54
  with:
55
55
  path: _site
56
56
 
@@ -63,4 +63,4 @@ jobs:
63
63
  steps:
64
64
  - name: Deploy to GitHub Pages
65
65
  id: deployment
66
- uses: actions/deploy-pages@v4
66
+ uses: actions/deploy-pages@v5
@@ -67,7 +67,7 @@ jobs:
67
67
  steps:
68
68
  - uses: actions/checkout@v6
69
69
  - name: Create GitHub Release
70
- uses: softprops/action-gh-release@v2
70
+ uses: softprops/action-gh-release@v3
71
71
  with:
72
72
  generate_release_notes: true
73
73
 
@@ -0,0 +1,211 @@
1
+ # cicaddy-action Development Guidelines
2
+
3
+ ## Project Overview
4
+
5
+ GitHub Action that wraps cicaddy for running AI agent tasks in GitHub Actions workflows. The `cicaddy-github` plugin extends cicaddy with GitHub-specific agents, tools, and configuration.
6
+
7
+ ## Architecture
8
+
9
+ ### Plugin System
10
+
11
+ This package registers itself with cicaddy's plugin system via entry points in `pyproject.toml`:
12
+
13
+ - `cicaddy.agents` — registers GitHub-specific agents (e.g., `GitHubPRAgent`, `GitHubTaskAgent`)
14
+ - `cicaddy.settings_loader` — provides GitHub settings loader
15
+ - `cicaddy.cli_args` / `cicaddy.env_vars` / `cicaddy.validators` — CLI and config extensions
16
+
17
+ ### Agent Registration
18
+
19
+ ```python
20
+ # src/cicaddy_github/plugin.py
21
+ def register_agents():
22
+ from cicaddy.agent.factory import AgentFactory
23
+ from cicaddy_github.github_integration.agents import GitHubPRAgent, GitHubTaskAgent
24
+ from cicaddy_github.github_integration.detector import _detect_github_agent_type
25
+
26
+ AgentFactory.register("github_pr", GitHubPRAgent)
27
+ AgentFactory.register("github_task", GitHubTaskAgent)
28
+ AgentFactory.register_detector(_detect_github_agent_type, priority=40)
29
+ ```
30
+
31
+ Detector priority 40 ensures GitHub detection runs before cicaddy's built-in CI detector at priority 50.
32
+
33
+ ### Project Structure
34
+
35
+ ```
36
+ cicaddy-action/
37
+ action.yml # GitHub Action definition (inputs/outputs)
38
+ Dockerfile # Container image (python:3.12-slim + uv)
39
+ entrypoint.sh # Maps GitHub Action inputs to cicaddy env vars
40
+ pyproject.toml # Package config (cicaddy-github plugin)
41
+ tasks/
42
+ pr_review.yml # DSPy task for PR code review
43
+ changelog_report.yml # DSPy task for changelog generation
44
+ src/cicaddy_github/
45
+ plugin.py # Entry points: register_agents, get_cli_args, etc.
46
+ config/settings.py # Settings class extending CoreSettings
47
+ github_integration/
48
+ agents.py # GitHubPRAgent, GitHubTaskAgent
49
+ analyzer.py # PyGithub wrapper (diff, PR data, comments)
50
+ detector.py # Auto-detect agent type from GitHub env
51
+ tools.py # Git operations (@tool decorated)
52
+ security/
53
+ leak_detector.py # Secret redaction via detect-secrets
54
+ ```
55
+
56
+ ### Key Subpackages
57
+
58
+ | Package | Purpose |
59
+ |---------|---------|
60
+ | `src/cicaddy_github/github_integration/` | GitHub API client, agents, analyzers, tools |
61
+ | `src/cicaddy_github/config/` | GitHub settings (token, repository, PR number) |
62
+ | `src/cicaddy_github/security/` | Secret detection and redaction |
63
+ | `src/cicaddy_github/plugin.py` | Entry point registration for cicaddy plugin system |
64
+ | `tasks/` | DSPy task definitions for PR review and changelog generation |
65
+
66
+ ### Dependencies
67
+
68
+ - Depends on `cicaddy>=0.8.0` (core library) and `PyGithub>=2.1.0`
69
+ - Follows the same agent/factory patterns as the core library
70
+ - Extends `BaseAIAgent` from cicaddy
71
+
72
+ ## Agent Types
73
+
74
+ | Type | Class | Trigger |
75
+ |------|-------|---------|
76
+ | `github_pr` | `GitHubPRAgent` | `GITHUB_EVENT_NAME=pull_request` + `GITHUB_PR_NUMBER` |
77
+ | `github_task` | `GitHubTaskAgent` | `GITHUB_EVENT_NAME` present but not a PR |
78
+
79
+ ## Sub-Agent Delegation (v0.5.0+)
80
+
81
+ Requires cicaddy>=0.8.0. When `DELEGATION_MODE=auto`, the parent agent's `analyze()` method delegates to specialized sub-agents:
82
+
83
+ 1. **Triage** — AI analyzes the PR diff/context and selects reviewers
84
+ 2. **Parallel Execution** — Selected sub-agents run concurrently with focused prompts
85
+ 3. **Aggregation** — Results merged into a single PR comment with per-agent sections
86
+
87
+ ### Plugin Hooks
88
+
89
+ The cicaddy-github plugin provides:
90
+
91
+ - `cicaddy.delegation_blocked_tools` entry point — blocks write and side-effect operations (posting comments, submitting reviews, merging PRs, sending Slack notifications, etc.) so sub-agents only perform analysis
92
+ - Delegation metadata in PR comments — shows which agents ran, success/failure counts, and execution time in a collapsible details block
93
+
94
+ ### Configuration
95
+
96
+ | Variable | Default | Description |
97
+ |----------|---------|-------------|
98
+ | `DELEGATION_MODE` | `none` | `none` or `auto` |
99
+ | `MAX_SUB_AGENTS` | `3` | Max concurrent sub-agents (1-10) |
100
+ | `SUB_AGENT_MAX_ITERS` | `10` | Iterations per sub-agent (1-15) |
101
+ | `DELEGATION_AGENTS_DIR` | `.agents/delegation` | Custom agent YAML directory (relative to repo root) |
102
+ | `DELEGATION_AGENTS` | (empty) | JSON config for inline custom sub-agent definitions |
103
+ | `TRIAGE_PROMPT` | (empty) | Custom triage instructions |
104
+
105
+ Action inputs: `delegation_mode`, `max_sub_agents`
106
+ CLI flags: `--delegation-mode auto --max-sub-agents 2`
107
+
108
+ See cicaddy's [sub-agent delegation docs](https://github.com/waynesun09/cicaddy/blob/main/docs/sub-agent-delegation.md) for built-in agents, custom YAML format, and tool filtering.
109
+
110
+ ## Action Inputs
111
+
112
+ All inputs use **underscores** (not hyphens) for Docker container compatibility:
113
+
114
+ | Input | Required | Description |
115
+ |-------|----------|-------------|
116
+ | `ai_provider` | Yes | `gemini`, `openai`, `claude`, `anthropic-vertex` |
117
+ | `ai_model` | Yes | Model identifier |
118
+ | `ai_api_key` | No* | AI provider API key (not needed for `anthropic-vertex`) |
119
+ | `vertex_project_id` | No | GCP project ID (required for `anthropic-vertex`) |
120
+ | `cloud_ml_region` | No | Vertex AI region (default: `us-east5`) |
121
+ | `task_file` | No | Path to DSPy YAML task file |
122
+ | `task_prompt` | No | Inline task prompt |
123
+ | `post_pr_comment` | No | Post results as PR comment (default: `false`) |
124
+ | `github_token` | No | GitHub token (default: `${{ github.token }}`) |
125
+ | `mcp_servers_config` | No | JSON array of MCP server configs |
126
+ | `slack_webhook_url` | No | Slack webhook URL |
127
+ | `report_template` | No | Custom HTML report template path |
128
+ | `delegation_mode` | No | `none` (default) or `auto` for sub-agent delegation |
129
+ | `max_sub_agents` | No | Max concurrent sub-agents, 1-10 (default: `3`) |
130
+
131
+ *Not required if provider-specific key is set via `env:`.
132
+
133
+ ## Entrypoint Flow
134
+
135
+ `entrypoint.sh` bridges GitHub Action inputs to cicaddy environment:
136
+
137
+ 1. Exports `AI_PROVIDER` and `AI_MODEL` from `INPUT_*` vars
138
+ 2. Maps `INPUT_AI_API_KEY` to provider-specific env var (`GEMINI_API_KEY`, etc.)
139
+ 3. Resolves `AI_TASK_FILE` and `REPORT_TEMPLATE` to absolute paths
140
+ 4. Extracts `GITHUB_PR_NUMBER` from `GITHUB_REF` (`refs/pull/<N>/merge`)
141
+ 5. Creates `.cicaddy/` subdirectory and `cd`s into it (cicaddy writes reports to `../`)
142
+ 6. Runs `cicaddy run`
143
+
144
+ ## Code Quality
145
+
146
+ - Run `pre-commit run --files <changed-files>` before committing
147
+ - Run `uv run pytest tests/ -q --cov=src/cicaddy_github` before committing (must pass all tests)
148
+ - Prefer shared/utility modules over code duplication
149
+ - Follow type hints, Google-style docstrings, async where appropriate
150
+
151
+ ## Git Workflow
152
+
153
+ - **Sign commits**: `git commit -s` (DCO sign-off required)
154
+ - Only commit files modified in current session
155
+ - **No "Generated with Claude Code"** or **"Co-Authored-By"** in commits, PR descriptions
156
+ - Ask permission before pushing to remote
157
+
158
+ ## Python
159
+
160
+ - Use `uv` for package management
161
+ - Always use virtual environments
162
+ - Dev install: `uv pip install -e ".[test]"`
163
+ - Run tests: `uv run pytest tests/ -q --cov=src/cicaddy_github`
164
+ - Type checking: `uv run ty check` (if available)
165
+ - Format: `pre-commit run ruff-format --files <changed-files>`
166
+
167
+ ## Docker
168
+
169
+ - Build Docker image: `docker build -t cicaddy-action:test .`
170
+ - Test Docker image: `docker run --rm --entrypoint cicaddy cicaddy-action:test --version`
171
+
172
+ ## Running Locally
173
+
174
+ Create an env file and use `uv run cicaddy run --env-file <file>`:
175
+
176
+ ```bash
177
+ # AI Provider
178
+ AI_PROVIDER=gemini
179
+ AI_MODEL=gemini-3-flash-preview
180
+ GEMINI_API_KEY=<key>
181
+
182
+ # GitHub Configuration
183
+ GITHUB_TOKEN=<token>
184
+ GITHUB_REPOSITORY=owner/repo
185
+ GITHUB_EVENT_NAME=pull_request
186
+ GITHUB_PR_NUMBER=42
187
+
188
+ # Agent Settings
189
+ POST_PR_COMMENT=true
190
+ ENABLE_LOCAL_TOOLS=true
191
+ LOCAL_TOOLS_WORKING_DIR=.
192
+
193
+ LOG_LEVEL=INFO
194
+ ```
195
+
196
+ Run with: `uv run cicaddy run --env-file .env.my-review`
197
+
198
+ ## PR Review Workflow Security
199
+
200
+ - The PR review workflow uses `pull_request_target` so secrets are available for fork PRs
201
+ - Internal PRs (same repo) run automatically; fork PRs require the `safe-to-review` label
202
+ - The label is auto-removed on `synchronize` (new pushes from forks) to prevent TOCTOU bypasses
203
+ - The workflow never checks out or executes untrusted PR code — cicaddy fetches the diff via the GitHub API
204
+
205
+ ## Release Checklist
206
+
207
+ - **Bump `version` in `pyproject.toml` BEFORE tagging** — the release workflow builds from the checked-out source, so the `pyproject.toml` version must match the git tag
208
+ - When bumping the version, also update all `cicaddy-action@vX.Y.Z` version references in `README.md` and skills to match the new version
209
+ - Run full test suite: `uv run pytest tests/ -q --cov=src/cicaddy_github`
210
+ - Create release with `gh release create v<version>`
211
+ - PyPI publish is automated via `.github/workflows/release.yml`
@@ -0,0 +1,9 @@
1
+ # Claude Code Rules
2
+
3
+ > **Note**: For comprehensive development guidelines, see [AGENTS.md](AGENTS.md).
4
+ >
5
+ > AGENTS.md contains the full architecture documentation, plugin system details,
6
+ > GitHub Action inputs, entrypoint flow, code quality guidelines, Git workflow,
7
+ > Python setup, Docker usage, and release process.
8
+ >
9
+ > This file is maintained for Claude Code compatibility and will redirect to AGENTS.md.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cicaddy-github
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: GitHub Actions plugin for cicaddy AI agent framework
5
5
  Project-URL: Homepage, https://github.com/redhat-community-ai-tools/cicaddy-action
6
6
  Project-URL: Repository, https://github.com/redhat-community-ai-tools/cicaddy-action.git
@@ -9,7 +9,7 @@ Author: Wayne Sun
9
9
  License: Apache-2.0
10
10
  License-File: LICENSE
11
11
  Requires-Python: >=3.11
12
- Requires-Dist: cicaddy>=0.3.0
12
+ Requires-Dist: cicaddy>=0.8.0
13
13
  Requires-Dist: detect-secrets>=1.4.0
14
14
  Requires-Dist: pygithub>=2.1.0
15
15
  Provides-Extra: test
@@ -25,8 +25,10 @@ GitHub Action that wraps [cicaddy](https://github.com/waynesun09/cicaddy) for ru
25
25
  ## Features
26
26
 
27
27
  - **AI-powered PR reviews** with optional Context7 MCP for up-to-date library documentation
28
+ - **Sub-agent delegation** for parallel specialized reviews (security, architecture, performance, etc.)
29
+ - **Go dependency impact analysis** for Go dependency update PRs with risk classification
28
30
  - **Changelog report generation** from git tag diffs and release notes
29
- - **Multiple AI providers**: Gemini, OpenAI, Claude
31
+ - **Multiple AI providers**: Gemini, OpenAI, Claude, Claude via Vertex AI
30
32
  - **Secret redaction** via detect-secrets for safe public outputs
31
33
  - **DSPy YAML task definitions** for customizable analysis workflows
32
34
 
@@ -53,19 +55,23 @@ jobs:
53
55
  review:
54
56
  runs-on: ubuntu-latest
55
57
  steps:
56
- - uses: actions/checkout@v4
58
+ - uses: actions/checkout@v6
57
59
  with:
58
60
  fetch-depth: 0
59
61
 
60
- - uses: redhat-community-ai-tools/cicaddy-action@v0.4.0
62
+ - uses: redhat-community-ai-tools/cicaddy-action@main
61
63
  with:
62
64
  ai_provider: gemini
63
65
  ai_model: gemini-3-flash-preview
64
66
  ai_api_key: ${{ secrets.AI_API_KEY }}
65
67
  task_file: tasks/pr_review.yml
66
68
  post_pr_comment: 'true'
69
+ env:
70
+ DELEGATION_MODE: auto
67
71
  ```
68
72
 
73
+ > **Sub-Agent Delegation**: When `DELEGATION_MODE` is set to `auto`, the agent uses AI-powered triage to analyze the PR diff and spawns specialized sub-agents in parallel (e.g., code quality, security, performance). Each sub-agent runs with a focused scope and reduced token budget, and their results are aggregated into a single unified review. This produces deeper, more structured reviews compared to single-agent mode. Set `DELEGATION_MODE` to `none` to use a single agent instead. See [docs/delegation.md](docs/delegation.md) for details.
74
+
69
75
  ### Changelog Report on Release
70
76
 
71
77
  ```yaml
@@ -79,11 +85,11 @@ jobs:
79
85
  changelog:
80
86
  runs-on: ubuntu-latest
81
87
  steps:
82
- - uses: actions/checkout@v4
88
+ - uses: actions/checkout@v6
83
89
  with:
84
90
  fetch-depth: 0
85
91
 
86
- - uses: redhat-community-ai-tools/cicaddy-action@v0.4.0
92
+ - uses: redhat-community-ai-tools/cicaddy-action@main
87
93
  with:
88
94
  ai_provider: gemini
89
95
  ai_model: gemini-3-flash-preview
@@ -91,13 +97,63 @@ jobs:
91
97
  task_file: tasks/changelog_report.yml
92
98
  ```
93
99
 
100
+ ### Go Dependency Impact Analysis
101
+
102
+ Analyze Go dependency update PRs (e.g. from Renovate or Dependabot) with
103
+ AI-assisted risk classification. The agent collects dependency diffs,
104
+ usage analysis (via `go mod why`/`go mod graph`), upstream changelogs,
105
+ and security advisories, then posts a structured impact assessment as a
106
+ PR comment.
107
+
108
+ ```yaml
109
+ name: Go Dependency Impact Analysis
110
+
111
+ on:
112
+ pull_request:
113
+ paths:
114
+ - 'go.mod'
115
+ - 'go.sum'
116
+
117
+ permissions:
118
+ contents: read
119
+ pull-requests: write
120
+
121
+ jobs:
122
+ dep-review:
123
+ runs-on: ubuntu-latest
124
+ steps:
125
+ - uses: actions/checkout@v6
126
+ - uses: actions/setup-go@v6
127
+ with:
128
+ go-version: '1.22'
129
+ - uses: redhat-community-ai-tools/cicaddy-action@main
130
+ with:
131
+ ai_provider: gemini
132
+ ai_model: gemini-3-flash-preview
133
+ ai_api_key: ${{ secrets.AI_API_KEY }}
134
+ task_file: tasks/go_dep_impact_review.yml
135
+ post_pr_comment: 'true'
136
+ run_govulncheck: 'true'
137
+ env:
138
+ AGENT_TASKS: go_dep_review
139
+ ```
140
+
141
+ The `AGENT_TASKS: go_dep_review` env var activates the Go dependency review
142
+ agent instead of the default PR code review agent. The `run_govulncheck`
143
+ input enables vulnerability reachability analysis (requires Go and
144
+ govulncheck installed in the runner).
145
+
146
+ See [docs/providers.md](docs/providers.md) for provider-specific configuration including Claude via Vertex AI (GCP), OpenAI, and Anthropic API setup.
147
+
94
148
  ## Inputs
95
149
 
96
150
  | Input | Required | Description |
97
151
  |-------|----------|-------------|
98
- | `ai_provider` | Yes | AI provider: `gemini`, `openai`, `claude` |
152
+ | `ai_provider` | Yes | AI provider: `gemini`, `openai`, `claude`, `anthropic-vertex` |
99
153
  | `ai_model` | Yes | Model identifier |
100
- | `ai_api_key` | Yes | AI provider API key |
154
+ | `ai_api_key` | No | AI provider API key (not needed for `anthropic-vertex`) |
155
+ | `vertex_project_id` | No | GCP project ID (required for `anthropic-vertex`) |
156
+ | `cloud_ml_region` | No | Vertex AI region (default: `us-east5`) |
101
157
  | `task_file` | No | Path to DSPy YAML task file |
102
158
  | `task_prompt` | No | Inline task prompt (alternative to task_file) |
103
159
  | `report_template` | No | Path to custom HTML report template |
@@ -105,6 +161,10 @@ jobs:
105
161
  | `slack_webhook_url` | No | Slack webhook URL for notifications |
106
162
  | `post_pr_comment` | No | Post results as PR comment (default: `false`) |
107
163
  | `submit_review` | No | Submit formal PR review with APPROVE/REQUEST_CHANGES (default: `false`) |
164
+ | `run_govulncheck` | No | Run govulncheck for vulnerability reachability analysis (default: `false`) |
165
+ | `dep_review_severity_threshold` | No | Minimum semver bump to analyze: `minor` or `major` (default: `minor`) |
166
+ | `delegation_mode` | No | Enable AI-powered sub-agent delegation: `none` (default) or `auto` |
167
+ | `max_sub_agents` | No | Maximum concurrent sub-agents, 1-10 (default: `3`) |
108
168
  | `github_token` | No | GitHub token (default: `${{ github.token }}`) |
109
169
 
110
170
  ## Outputs
@@ -117,7 +177,10 @@ jobs:
117
177
 
118
178
  ## Custom Tasks
119
179
 
120
- Create DSPy YAML task files to define custom analysis workflows. See `tasks/changelog_report.yml` and `tasks/pr_review.yml` for examples.
180
+ Create DSPy YAML task files to define custom analysis workflows. See `tasks/` for examples:
181
+ - `tasks/pr_review.yml` — AI code review
182
+ - `tasks/changelog_report.yml` — Changelog generation
183
+ - `tasks/go_dep_impact_review.yml` — Go dependency impact analysis
121
184
 
122
185
  ## Local Development
123
186
 
@@ -192,15 +255,28 @@ uv run cicaddy validate --env-file .env.my-review
192
255
 
193
256
  | Variable | Required | Description |
194
257
  |----------|----------|-------------|
195
- | `AI_PROVIDER` | Yes | `gemini`, `openai`, or `claude` |
258
+ | `AI_PROVIDER` | Yes | `gemini`, `openai`, `claude`, or `anthropic-vertex` |
196
259
  | `AI_MODEL` | Yes | Model identifier (e.g. `gemini-3-flash-preview`) |
197
- | `GEMINI_API_KEY` / `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` | Yes | API key matching the provider |
260
+ | `GEMINI_API_KEY` / `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` | Yes* | API key matching the provider (*not needed for `anthropic-vertex`) |
261
+ | `ANTHROPIC_VERTEX_PROJECT_ID` | No | GCP project ID (required for `anthropic-vertex`) |
262
+ | `CLOUD_ML_REGION` | No | Vertex AI region (default: `us-east5`) |
198
263
  | `GITHUB_TOKEN` | Yes | GitHub personal access token |
199
264
  | `GITHUB_REPOSITORY` | Yes | Target repo in `owner/repo` format |
200
265
  | `GITHUB_EVENT_NAME` | No | Set to `pull_request` for auto-detection (optional if `GITHUB_PR_NUMBER` is set) |
201
266
  | `GITHUB_PR_NUMBER` | Yes | PR number to review |
202
267
  | `POST_PR_COMMENT` | No | Post results as PR comment (`true`/`false`) |
268
+ | `AGENT_TASKS` | No | Agent task type (e.g. `go_dep_review` for Go dependency analysis) |
269
+ | `DELEGATION_MODE` | No | `auto` for AI-powered sub-agent delegation, `none` for single-agent (default: `none`) |
270
+ | `MAX_SUB_AGENTS` | No | Max concurrent sub-agents for delegation, 1-10 (default: `3`) |
271
+ | `SUB_AGENT_MAX_ITERS` | No | Max iterations per sub-agent, 1-15 (default: `5`) |
203
272
  | `AI_TASK_FILE` | No | Path to DSPy YAML task file for custom workflows |
273
+ | `RUN_GOVULNCHECK` | No | Run govulncheck for reachability analysis (`true`/`false`) |
274
+ | `DELEGATION_MODE` | No | `none` or `auto` for sub-agent delegation |
275
+ | `MAX_SUB_AGENTS` | No | Maximum concurrent sub-agents (default: `3`) |
276
+ | `SUB_AGENT_MAX_ITERS` | No | Max iterations per sub-agent (default: `10`) |
277
+ | `DELEGATION_AGENTS_DIR` | No | Custom agent YAML directory (default: `.agents/delegation`) |
278
+ | `DELEGATION_AGENTS` | No | JSON config for inline custom sub-agents |
279
+ | `TRIAGE_PROMPT` | No | Custom triage instructions |
204
280
  | `GIT_DIFF_CONTEXT_LINES` | No | Number of context lines in diffs (default: `10`) |
205
281
  | `ENABLE_LOCAL_TOOLS` | No | Enable local git tools (`true`/`false`) |
206
282
  | `LOCAL_TOOLS_WORKING_DIR` | No | Working directory for local tools |