agentboot 0.1.0 → 0.3.0
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.
- package/README.md +9 -8
- package/agentboot.config.json +4 -1
- package/package.json +2 -2
- package/scripts/cli.ts +465 -18
- package/scripts/compile.ts +724 -75
- package/scripts/dev-sync.ts +1 -1
- package/scripts/lib/config.ts +259 -1
- package/scripts/lib/frontmatter.ts +3 -1
- package/scripts/validate.ts +12 -7
- package/website/docusaurus.config.ts +117 -0
- package/website/package-lock.json +18448 -0
- package/website/package.json +47 -0
- package/website/sidebars.ts +53 -0
- package/website/src/css/custom.css +23 -0
- package/website/src/pages/index.module.css +23 -0
- package/website/src/pages/index.tsx +125 -0
- package/website/static/.nojekyll +0 -0
- package/website/static/CNAME +1 -0
- package/website/static/img/favicon.ico +0 -0
- package/website/static/img/logo.svg +1 -0
- package/.github/ISSUE_TEMPLATE/persona-request.md +0 -62
- package/.github/ISSUE_TEMPLATE/quality-feedback.md +0 -67
- package/.github/workflows/cla.yml +0 -25
- package/.github/workflows/validate.yml +0 -49
- package/.idea/agentboot.iml +0 -9
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/CLAUDE.md +0 -230
- package/CONTRIBUTING.md +0 -168
- package/PERSONAS.md +0 -156
- package/core/instructions/baseline.instructions.md +0 -133
- package/core/instructions/security.instructions.md +0 -186
- package/core/personas/code-reviewer/SKILL.md +0 -175
- package/core/personas/security-reviewer/SKILL.md +0 -233
- package/core/personas/test-data-expert/SKILL.md +0 -234
- package/core/personas/test-generator/SKILL.md +0 -262
- package/core/traits/audit-trail.md +0 -182
- package/core/traits/confidence-signaling.md +0 -172
- package/core/traits/critical-thinking.md +0 -129
- package/core/traits/schema-awareness.md +0 -132
- package/core/traits/source-citation.md +0 -174
- package/core/traits/structured-output.md +0 -199
- package/docs/ci-cd-automation.md +0 -548
- package/docs/claude-code-reference/README.md +0 -21
- package/docs/claude-code-reference/agentboot-coverage.md +0 -484
- package/docs/claude-code-reference/feature-inventory.md +0 -906
- package/docs/cli-commands-audit.md +0 -112
- package/docs/cli-design.md +0 -924
- package/docs/concepts.md +0 -1117
- package/docs/config-schema-audit.md +0 -121
- package/docs/configuration.md +0 -645
- package/docs/delivery-methods.md +0 -758
- package/docs/developer-onboarding.md +0 -342
- package/docs/extending.md +0 -448
- package/docs/getting-started.md +0 -298
- package/docs/knowledge-layer.md +0 -464
- package/docs/marketplace.md +0 -822
- package/docs/org-connection.md +0 -570
- package/docs/plans/architecture.md +0 -2429
- package/docs/plans/design.md +0 -2018
- package/docs/plans/prd.md +0 -1862
- package/docs/plans/stack-rank.md +0 -261
- package/docs/plans/technical-spec.md +0 -2755
- package/docs/privacy-and-safety.md +0 -807
- package/docs/prompt-optimization.md +0 -1071
- package/docs/test-plan.md +0 -972
- package/docs/third-party-ecosystem.md +0 -496
- package/domains/compliance-template/README.md +0 -173
- package/domains/compliance-template/traits/compliance-aware.md +0 -228
- package/examples/enterprise/agentboot.config.json +0 -184
- package/examples/minimal/agentboot.config.json +0 -46
- package/tests/REGRESSION-PLAN.md +0 -705
- package/tests/TEST-PLAN.md +0 -111
- package/tests/cli.test.ts +0 -705
- package/tests/pipeline.test.ts +0 -608
- package/tests/validate.test.ts +0 -278
- package/tsconfig.json +0 -62
package/docs/ci-cd-automation.md
DELETED
|
@@ -1,548 +0,0 @@
|
|
|
1
|
-
# AgentBoot in CI/CD & Automation
|
|
2
|
-
|
|
3
|
-
How AgentBoot personas operate in non-interactive contexts: PR review bots, compliance
|
|
4
|
-
gates, scheduled scans, and the sync pipeline itself.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Use Cases
|
|
9
|
-
|
|
10
|
-
| Use Case | Trigger | Persona(s) | Output |
|
|
11
|
-
|----------|---------|-----------|--------|
|
|
12
|
-
| **PR review** | PR opened/updated | code-reviewer, security-reviewer | PR comment with findings |
|
|
13
|
-
| **Compliance gate** | PR opened, scheduled | compliance hooks, guardrails | Pass/fail + audit log |
|
|
14
|
-
| **Architecture drift** | PR opened, scheduled | architecture-reviewer | Structured findings |
|
|
15
|
-
| **Test generation** | PR opened (new files) | test-generator | Suggested test files |
|
|
16
|
-
| **Persona validation** | PR to personas repo | validate.ts | Build pass/fail |
|
|
17
|
-
| **Persona sync** | Merge to personas repo main | sync.ts | PRs in target repos |
|
|
18
|
-
| **Scheduled security scan** | Cron (daily/weekly) | security-reviewer | Report |
|
|
19
|
-
| **Onboarding verification** | New repo registered | agentboot build | .claude/ populated |
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Delivery Methods for CI/CD
|
|
24
|
-
|
|
25
|
-
### 1. Claude Code Headless (`claude -p`) — Primary
|
|
26
|
-
|
|
27
|
-
Claude Code's print mode is the native CI interface. It runs a persona non-interactively,
|
|
28
|
-
produces structured output, and exits.
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
claude -p \
|
|
32
|
-
--agent security-reviewer \
|
|
33
|
-
--output-format json \
|
|
34
|
-
--max-turns 10 \
|
|
35
|
-
--max-budget-usd 1.00 \
|
|
36
|
-
--permission-mode bypassPermissions \
|
|
37
|
-
"Review the changes in this PR for security issues. Output structured findings."
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
**Key flags for CI:**
|
|
41
|
-
|
|
42
|
-
| Flag | Purpose |
|
|
43
|
-
|------|---------|
|
|
44
|
-
| `-p` | Print mode — non-interactive, exits when done |
|
|
45
|
-
| `--agent {name}` | Run a specific persona |
|
|
46
|
-
| `--output-format json` | Machine-parseable output |
|
|
47
|
-
| `--max-turns N` | Bound compute (prevent runaway) |
|
|
48
|
-
| `--max-budget-usd N` | Bound cost |
|
|
49
|
-
| `--permission-mode bypassPermissions` | No interactive prompts (CI has no human) |
|
|
50
|
-
| `--json-schema '{...}'` | Force output to match a schema |
|
|
51
|
-
| `--fallback-model sonnet` | Graceful degradation if primary model unavailable |
|
|
52
|
-
| `--no-session-persistence` | Don't save session (ephemeral CI run) |
|
|
53
|
-
| `--system-prompt-file ./ci-prompt.md` | Inject CI-specific instructions |
|
|
54
|
-
| `--tools "Read,Grep,Glob,Bash"` | Restrict tools (no Edit/Write in review) |
|
|
55
|
-
| `--from-pr 123` | Resume context from a PR (auto-links session) |
|
|
56
|
-
|
|
57
|
-
**PR review workflow:**
|
|
58
|
-
|
|
59
|
-
```yaml
|
|
60
|
-
# .github/workflows/agentboot-review.yml
|
|
61
|
-
name: AgentBoot PR Review
|
|
62
|
-
on:
|
|
63
|
-
pull_request:
|
|
64
|
-
types: [opened, synchronize]
|
|
65
|
-
|
|
66
|
-
jobs:
|
|
67
|
-
review:
|
|
68
|
-
runs-on: ubuntu-latest
|
|
69
|
-
steps:
|
|
70
|
-
- uses: actions/checkout@v4
|
|
71
|
-
with:
|
|
72
|
-
fetch-depth: 0 # Full history for diff context
|
|
73
|
-
|
|
74
|
-
- name: Install Claude Code
|
|
75
|
-
run: npm install -g @anthropic-ai/claude-code
|
|
76
|
-
|
|
77
|
-
- name: Run code review
|
|
78
|
-
env:
|
|
79
|
-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
80
|
-
run: |
|
|
81
|
-
claude -p \
|
|
82
|
-
--agent code-reviewer \
|
|
83
|
-
--output-format json \
|
|
84
|
-
--max-turns 10 \
|
|
85
|
-
--max-budget-usd 2.00 \
|
|
86
|
-
--permission-mode bypassPermissions \
|
|
87
|
-
--no-session-persistence \
|
|
88
|
-
"Review the PR diff. Run git diff origin/main...HEAD to see changes." \
|
|
89
|
-
> review-output.json
|
|
90
|
-
|
|
91
|
-
- name: Post review comment
|
|
92
|
-
env:
|
|
93
|
-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
94
|
-
run: |
|
|
95
|
-
# Parse JSON output and post as PR comment
|
|
96
|
-
jq -r '.result' review-output.json | gh pr comment ${{ github.event.pull_request.number }} --body-file -
|
|
97
|
-
|
|
98
|
-
- name: Check for blockers
|
|
99
|
-
run: |
|
|
100
|
-
# Fail CI if CRITICAL findings
|
|
101
|
-
CRITICAL_COUNT=$(jq '[.findings[] | select(.severity == "CRITICAL")] | length' review-output.json 2>/dev/null || echo "0")
|
|
102
|
-
if [ "$CRITICAL_COUNT" -gt 0 ]; then
|
|
103
|
-
echo "::error::$CRITICAL_COUNT CRITICAL findings. Review required."
|
|
104
|
-
exit 1
|
|
105
|
-
fi
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
**Why this is the primary CI method:**
|
|
109
|
-
- Native Claude Code feature — no wrapper or adapter
|
|
110
|
-
- JSON output is machine-parseable
|
|
111
|
-
- Cost-bounded (`--max-budget-usd`)
|
|
112
|
-
- Compute-bounded (`--max-turns`)
|
|
113
|
-
- Schema-enforced output (`--json-schema`)
|
|
114
|
-
- Full agent/persona support (`--agent`)
|
|
115
|
-
- Session isolation (`--no-session-persistence`)
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
### 2. AgentBoot CLI (`agentboot`) — Build Pipeline
|
|
120
|
-
|
|
121
|
-
The CLI handles the personas repo CI — validating, building, and syncing.
|
|
122
|
-
|
|
123
|
-
```yaml
|
|
124
|
-
# .github/workflows/agentboot-build.yml (in the personas repo)
|
|
125
|
-
name: AgentBoot Build & Sync
|
|
126
|
-
on:
|
|
127
|
-
push:
|
|
128
|
-
branches: [main]
|
|
129
|
-
pull_request:
|
|
130
|
-
|
|
131
|
-
jobs:
|
|
132
|
-
validate:
|
|
133
|
-
runs-on: ubuntu-latest
|
|
134
|
-
steps:
|
|
135
|
-
- uses: actions/checkout@v4
|
|
136
|
-
- uses: actions/setup-node@v4
|
|
137
|
-
with: { node-version: '22' }
|
|
138
|
-
- run: npm ci
|
|
139
|
-
- run: agentboot validate # Schema, trait refs, frontmatter, secrets
|
|
140
|
-
|
|
141
|
-
build:
|
|
142
|
-
needs: validate
|
|
143
|
-
runs-on: ubuntu-latest
|
|
144
|
-
steps:
|
|
145
|
-
- uses: actions/checkout@v4
|
|
146
|
-
- uses: actions/setup-node@v4
|
|
147
|
-
with: { node-version: '22' }
|
|
148
|
-
- run: npm ci
|
|
149
|
-
- run: agentboot build
|
|
150
|
-
- run: agentboot export --format plugin # Generate CC plugin
|
|
151
|
-
- run: agentboot export --format cross-platform
|
|
152
|
-
- uses: actions/upload-artifact@v4
|
|
153
|
-
with:
|
|
154
|
-
name: agentboot-dist
|
|
155
|
-
path: dist/
|
|
156
|
-
|
|
157
|
-
sync:
|
|
158
|
-
if: github.ref == 'refs/heads/main'
|
|
159
|
-
needs: build
|
|
160
|
-
runs-on: ubuntu-latest
|
|
161
|
-
steps:
|
|
162
|
-
- uses: actions/checkout@v4
|
|
163
|
-
- uses: actions/setup-node@v4
|
|
164
|
-
with: { node-version: '22' }
|
|
165
|
-
- run: npm ci
|
|
166
|
-
- run: agentboot build
|
|
167
|
-
- run: agentboot sync --mode github-api
|
|
168
|
-
env:
|
|
169
|
-
GITHUB_TOKEN: ${{ secrets.SYNC_TOKEN }}
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
**This handles:**
|
|
173
|
-
- Validation on every PR to the personas repo
|
|
174
|
-
- Build verification (trait composition, frontmatter, PERSONAS.md)
|
|
175
|
-
- Plugin generation for marketplace publishing
|
|
176
|
-
- Auto-sync to target repos on merge to main (via GitHub API PRs)
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
### 3. Compliance Gate (Hooks, No LLM)
|
|
181
|
-
|
|
182
|
-
Not everything needs an LLM call. Deterministic compliance checks run as hook scripts
|
|
183
|
-
or standalone CI steps — fast, cheap, and predictable.
|
|
184
|
-
|
|
185
|
-
```yaml
|
|
186
|
-
compliance-gate:
|
|
187
|
-
runs-on: ubuntu-latest
|
|
188
|
-
steps:
|
|
189
|
-
- uses: actions/checkout@v4
|
|
190
|
-
|
|
191
|
-
- name: PHI/PII scan (deterministic)
|
|
192
|
-
run: |
|
|
193
|
-
# Run AgentBoot's compliance hook script against the diff
|
|
194
|
-
git diff origin/main...HEAD | .claude/hooks/sensitive-data-scan.sh
|
|
195
|
-
# Exit code 2 = PHI detected = CI fail
|
|
196
|
-
|
|
197
|
-
- name: Credential scan
|
|
198
|
-
run: |
|
|
199
|
-
# Regex-based credential detection
|
|
200
|
-
git diff origin/main...HEAD | .claude/hooks/credential-scan.sh
|
|
201
|
-
|
|
202
|
-
- name: License check
|
|
203
|
-
run: |
|
|
204
|
-
# Verify no GPL/AGPL dependencies added
|
|
205
|
-
.claude/hooks/license-check.sh
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
**Why this matters:**
|
|
209
|
-
- Zero cost (no API call)
|
|
210
|
-
- Sub-second execution
|
|
211
|
-
- Deterministic (same input → same output)
|
|
212
|
-
- Runs on every PR, not just reviewed ones
|
|
213
|
-
- Defense-in-depth Layer 1 (before the LLM-based review)
|
|
214
|
-
|
|
215
|
-
---
|
|
216
|
-
|
|
217
|
-
### 4. MCP Server — Programmatic Access
|
|
218
|
-
|
|
219
|
-
For CI systems that need to invoke personas programmatically (not via Claude Code CLI),
|
|
220
|
-
the MCP server provides an API.
|
|
221
|
-
|
|
222
|
-
```yaml
|
|
223
|
-
mcp-review:
|
|
224
|
-
runs-on: ubuntu-latest
|
|
225
|
-
services:
|
|
226
|
-
agentboot-mcp:
|
|
227
|
-
image: ghcr.io/agentboot/mcp-server:latest
|
|
228
|
-
env:
|
|
229
|
-
AGENTBOOT_CONFIG: /config/agentboot.config.json
|
|
230
|
-
|
|
231
|
-
steps:
|
|
232
|
-
- name: Invoke security review via MCP
|
|
233
|
-
run: |
|
|
234
|
-
# Call MCP tool directly
|
|
235
|
-
curl -X POST http://agentboot-mcp:8080/tools/agentboot_review \
|
|
236
|
-
-H "Content-Type: application/json" \
|
|
237
|
-
-d '{
|
|
238
|
-
"persona": "security-reviewer",
|
|
239
|
-
"input": "'"$(git diff origin/main...HEAD)"'",
|
|
240
|
-
"format": "json"
|
|
241
|
-
}' > review.json
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
**When to use MCP over `claude -p`:**
|
|
245
|
-
- When the CI environment can't install Claude Code
|
|
246
|
-
- When you need persona invocation from non-Node.js CI (Python, Go, etc.)
|
|
247
|
-
- When you want a persistent server for multiple review calls (cheaper than cold-starting `claude -p` each time)
|
|
248
|
-
- When integrating with non-Anthropic LLM backends
|
|
249
|
-
|
|
250
|
-
---
|
|
251
|
-
|
|
252
|
-
### 5. Cron (Scheduled Scans via Claude Code)
|
|
253
|
-
|
|
254
|
-
Claude Code's native `CronCreate` tool runs scheduled tasks. For CI-like automation
|
|
255
|
-
that runs inside a developer's session rather than in a CI pipeline:
|
|
256
|
-
|
|
257
|
-
```
|
|
258
|
-
# In a Claude Code session:
|
|
259
|
-
CronCreate: "Run /agentboot:review-security on all files changed in the last 24h" every 24h
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
**Better for CI pipelines — use GitHub Actions scheduled:**
|
|
263
|
-
|
|
264
|
-
```yaml
|
|
265
|
-
scheduled-scan:
|
|
266
|
-
runs-on: ubuntu-latest
|
|
267
|
-
schedule:
|
|
268
|
-
- cron: '0 6 * * 1' # Every Monday at 6am
|
|
269
|
-
|
|
270
|
-
steps:
|
|
271
|
-
- uses: actions/checkout@v4
|
|
272
|
-
|
|
273
|
-
- name: Full security scan
|
|
274
|
-
env:
|
|
275
|
-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
276
|
-
run: |
|
|
277
|
-
claude -p \
|
|
278
|
-
--agent security-reviewer \
|
|
279
|
-
--output-format json \
|
|
280
|
-
--max-turns 30 \
|
|
281
|
-
--max-budget-usd 10.00 \
|
|
282
|
-
--permission-mode bypassPermissions \
|
|
283
|
-
--no-session-persistence \
|
|
284
|
-
"Scan the entire codebase for security issues. Focus on: auth, data handling, API security, dependency vulnerabilities."
|
|
285
|
-
|
|
286
|
-
- name: Full architecture review
|
|
287
|
-
run: |
|
|
288
|
-
claude -p \
|
|
289
|
-
--agent architecture-reviewer \
|
|
290
|
-
--output-format json \
|
|
291
|
-
--max-turns 20 \
|
|
292
|
-
--max-budget-usd 5.00 \
|
|
293
|
-
--permission-mode bypassPermissions \
|
|
294
|
-
--no-session-persistence \
|
|
295
|
-
"Check for architectural drift against ADRs. Report violations."
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
|
-
## Output Schema for CI
|
|
301
|
-
|
|
302
|
-
AgentBoot personas in CI should produce structured output that CI can parse:
|
|
303
|
-
|
|
304
|
-
```json
|
|
305
|
-
{
|
|
306
|
-
"persona": "security-reviewer",
|
|
307
|
-
"version": "1.2.0",
|
|
308
|
-
"model": "claude-sonnet-4-6",
|
|
309
|
-
"timestamp": "2026-03-19T14:30:00Z",
|
|
310
|
-
"scope": {
|
|
311
|
-
"org": "acme-corp",
|
|
312
|
-
"group": "platform",
|
|
313
|
-
"team": "api"
|
|
314
|
-
},
|
|
315
|
-
"input": {
|
|
316
|
-
"type": "pr-diff",
|
|
317
|
-
"ref": "refs/pull/123/head",
|
|
318
|
-
"base": "main",
|
|
319
|
-
"files_changed": 12
|
|
320
|
-
},
|
|
321
|
-
"summary": {
|
|
322
|
-
"critical": 0,
|
|
323
|
-
"error": 2,
|
|
324
|
-
"warn": 5,
|
|
325
|
-
"info": 3,
|
|
326
|
-
"suggestions": 2
|
|
327
|
-
},
|
|
328
|
-
"findings": [
|
|
329
|
-
{
|
|
330
|
-
"severity": "ERROR",
|
|
331
|
-
"rule": "missing-auth-check",
|
|
332
|
-
"location": "src/api/users.ts:47",
|
|
333
|
-
"description": "POST endpoint missing authentication middleware",
|
|
334
|
-
"suggestion": "Add authMiddleware() before the handler",
|
|
335
|
-
"confidence": 0.9,
|
|
336
|
-
"citation": "src/middleware/auth.ts:12 — pattern used on all other endpoints"
|
|
337
|
-
}
|
|
338
|
-
],
|
|
339
|
-
"cost": {
|
|
340
|
-
"input_tokens": 12400,
|
|
341
|
-
"output_tokens": 3200,
|
|
342
|
-
"usd": 0.42
|
|
343
|
-
},
|
|
344
|
-
"gate": {
|
|
345
|
-
"passed": true,
|
|
346
|
-
"reason": "No CRITICAL findings. 2 ERROR findings require manual review."
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
Use `--json-schema` to enforce this structure:
|
|
352
|
-
|
|
353
|
-
```bash
|
|
354
|
-
claude -p \
|
|
355
|
-
--agent security-reviewer \
|
|
356
|
-
--output-format json \
|
|
357
|
-
--json-schema '{"type":"object","required":["summary","findings","gate"],...}' \
|
|
358
|
-
"Review this PR."
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
---
|
|
362
|
-
|
|
363
|
-
## Decision Matrix
|
|
364
|
-
|
|
365
|
-
| Use Case | Method | Cost | Latency | Deterministic |
|
|
366
|
-
|----------|--------|------|---------|---------------|
|
|
367
|
-
| PR compliance gate (PHI/credentials) | Hook scripts | Free | <1s | Yes |
|
|
368
|
-
| PR code review | `claude -p --agent` | $0.50-2.00 | 30-90s | No |
|
|
369
|
-
| PR security review | `claude -p --agent` | $1.00-5.00 | 60-120s | No |
|
|
370
|
-
| Personas repo validation | `agentboot validate` | Free | <5s | Yes |
|
|
371
|
-
| Personas repo build | `agentboot build` | Free | <10s | Yes |
|
|
372
|
-
| Personas sync to repos | `agentboot sync` | Free | <30s | Yes |
|
|
373
|
-
| Weekly security scan | `claude -p` + cron | $5-20 | 5-15min | No |
|
|
374
|
-
| Architecture drift detection | `claude -p` + cron | $2-10 | 2-10min | No |
|
|
375
|
-
| Cross-platform review API | MCP server | Varies | Varies | No |
|
|
376
|
-
|
|
377
|
-
**Rule of thumb:** Use deterministic hooks for pass/fail gates. Use LLM-based review
|
|
378
|
-
for nuanced analysis. Layer them: hooks catch the obvious, personas catch the subtle.
|
|
379
|
-
|
|
380
|
-
---
|
|
381
|
-
|
|
382
|
-
## CI Permissions & Security
|
|
383
|
-
|
|
384
|
-
### API Key Management
|
|
385
|
-
|
|
386
|
-
```yaml
|
|
387
|
-
# GitHub Actions secret
|
|
388
|
-
env:
|
|
389
|
-
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
- Use a **dedicated CI API key** with budget limits, not a developer's key
|
|
393
|
-
- Set `--max-budget-usd` on every `claude -p` call to prevent runaway costs
|
|
394
|
-
- Monitor usage via Anthropic's usage dashboard or structured telemetry
|
|
395
|
-
|
|
396
|
-
### Tool Restrictions in CI
|
|
397
|
-
|
|
398
|
-
CI personas should have stricter tool access than interactive personas:
|
|
399
|
-
|
|
400
|
-
```bash
|
|
401
|
-
# Review persona — read-only
|
|
402
|
-
claude -p --agent code-reviewer \
|
|
403
|
-
--tools "Read,Grep,Glob,Bash" \
|
|
404
|
-
--permission-mode bypassPermissions
|
|
405
|
-
|
|
406
|
-
# Test generator — can write test files
|
|
407
|
-
claude -p --agent test-generator \
|
|
408
|
-
--tools "Read,Grep,Glob,Bash,Write" \
|
|
409
|
-
--allowedTools "Write(tests/**)" \
|
|
410
|
-
--permission-mode bypassPermissions
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
### Network Access
|
|
414
|
-
|
|
415
|
-
CI runners may need network restrictions:
|
|
416
|
-
|
|
417
|
-
```bash
|
|
418
|
-
# No web access (air-gapped review)
|
|
419
|
-
claude -p --agent code-reviewer \
|
|
420
|
-
--tools "Read,Grep,Glob,Bash" \
|
|
421
|
-
--disallowedTools "WebFetch,WebSearch"
|
|
422
|
-
```
|
|
423
|
-
|
|
424
|
-
---
|
|
425
|
-
|
|
426
|
-
## GitHub Actions Reusable Workflow
|
|
427
|
-
|
|
428
|
-
AgentBoot should ship a reusable GitHub Actions workflow that orgs can call:
|
|
429
|
-
|
|
430
|
-
```yaml
|
|
431
|
-
# In target repo: .github/workflows/agentboot-review.yml
|
|
432
|
-
name: AgentBoot Review
|
|
433
|
-
on:
|
|
434
|
-
pull_request:
|
|
435
|
-
types: [opened, synchronize]
|
|
436
|
-
|
|
437
|
-
jobs:
|
|
438
|
-
review:
|
|
439
|
-
uses: agentboot/agentboot/.github/workflows/review.yml@v1
|
|
440
|
-
with:
|
|
441
|
-
personas: "code-reviewer,security-reviewer"
|
|
442
|
-
max-budget: "3.00"
|
|
443
|
-
fail-on: "critical" # critical | error | warn
|
|
444
|
-
comment-on-pr: true
|
|
445
|
-
secrets:
|
|
446
|
-
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
This is the **lowest-friction CI integration** — one YAML file in the target repo,
|
|
450
|
-
no AgentBoot CLI installation, no personas repo setup. The reusable workflow handles
|
|
451
|
-
`claude -p` invocation, output parsing, PR commenting, and gate logic.
|
|
452
|
-
|
|
453
|
-
---
|
|
454
|
-
|
|
455
|
-
## Non-Claude Code CI/CD
|
|
456
|
-
|
|
457
|
-
### GitHub Copilot
|
|
458
|
-
|
|
459
|
-
**Native PR Review (Repository Rules):**
|
|
460
|
-
|
|
461
|
-
Copilot can auto-review every PR without any CI pipeline. Configure in GitHub repo
|
|
462
|
-
settings → Rules → Copilot review. This uses the `copilot-instructions.md` that
|
|
463
|
-
AgentBoot synced to the repo as the review baseline.
|
|
464
|
-
|
|
465
|
-
This is the lowest-effort CI-like experience: AgentBoot syncs instructions → Copilot
|
|
466
|
-
reads them → every PR gets reviewed automatically. No API key, no workflow file, no
|
|
467
|
-
cost per run (included in Copilot Enterprise).
|
|
468
|
-
|
|
469
|
-
**Copilot CLI in GitHub Actions:**
|
|
470
|
-
|
|
471
|
-
```yaml
|
|
472
|
-
- name: Review with Copilot CLI
|
|
473
|
-
run: |
|
|
474
|
-
gh copilot suggest \
|
|
475
|
-
--skill code-reviewer \
|
|
476
|
-
"Review the changes in this PR" \
|
|
477
|
-
> review.md
|
|
478
|
-
```
|
|
479
|
-
|
|
480
|
-
Copilot CLI supports Agent Skills (agentskills.io format). AgentBoot's cross-platform
|
|
481
|
-
SKILL.md output works here.
|
|
482
|
-
|
|
483
|
-
**Limitations vs. `claude -p`:**
|
|
484
|
-
- No `--output-format json` — output is text only
|
|
485
|
-
- No `--max-budget-usd` — no cost bounding
|
|
486
|
-
- No `--json-schema` — no structured output enforcement
|
|
487
|
-
- No `--agent` with custom frontmatter — skills only, not full agent definitions
|
|
488
|
-
- No `--permission-mode` — no fine-grained tool control
|
|
489
|
-
|
|
490
|
-
### Cursor
|
|
491
|
-
|
|
492
|
-
Cursor has no headless/CLI mode for CI. The CI strategy for Cursor repos:
|
|
493
|
-
|
|
494
|
-
1. Use `claude -p` in CI (even if developers use Cursor locally)
|
|
495
|
-
2. AgentBoot's personas work in both — same SKILL.md format
|
|
496
|
-
3. The CI review uses Claude Code; the developer uses Cursor interactively
|
|
497
|
-
|
|
498
|
-
This is a legitimate pattern: the CI agent doesn't have to match the developer's IDE.
|
|
499
|
-
The persona definitions are the same; only the runtime differs.
|
|
500
|
-
|
|
501
|
-
### Gemini CLI
|
|
502
|
-
|
|
503
|
-
```bash
|
|
504
|
-
gemini -p --skill security-reviewer "Review this PR"
|
|
505
|
-
```
|
|
506
|
-
|
|
507
|
-
Gemini CLI supports Agent Skills. AgentBoot's cross-platform SKILL.md works here.
|
|
508
|
-
Less mature than `claude -p` for CI (fewer flags, no cost bounding).
|
|
509
|
-
|
|
510
|
-
### MCP Server in CI (Any Platform)
|
|
511
|
-
|
|
512
|
-
The MCP server is platform-agnostic. Any CI system that can make HTTP calls can
|
|
513
|
-
invoke AgentBoot personas:
|
|
514
|
-
|
|
515
|
-
```yaml
|
|
516
|
-
- name: Review via MCP
|
|
517
|
-
run: |
|
|
518
|
-
curl -X POST http://agentboot-mcp:8080/tools/agentboot_review \
|
|
519
|
-
-d '{"persona": "security-reviewer", "input": "'"$(git diff)"'"}'
|
|
520
|
-
```
|
|
521
|
-
|
|
522
|
-
This works regardless of whether the org uses CC, Copilot, Cursor, or all three.
|
|
523
|
-
|
|
524
|
-
### CI Platform Comparison
|
|
525
|
-
|
|
526
|
-
| Capability | Claude Code (`claude -p`) | Copilot (native) | Copilot CLI | Gemini CLI | MCP Server |
|
|
527
|
-
|------------|--------------------------|-------------------|-------------|------------|------------|
|
|
528
|
-
| Structured JSON output | Yes (`--output-format json`) | No | No | No | Yes |
|
|
529
|
-
| Cost bounding | Yes (`--max-budget-usd`) | Included | No | No | Custom |
|
|
530
|
-
| Schema enforcement | Yes (`--json-schema`) | No | No | No | Custom |
|
|
531
|
-
| Custom agents | Yes (`--agent`) | No | No | No | Yes |
|
|
532
|
-
| Tool restrictions | Yes (`--tools`) | N/A | No | No | Custom |
|
|
533
|
-
| Deterministic hooks | Yes (settings.json) | No | No | No | Custom |
|
|
534
|
-
| Zero-config PR review | No (needs workflow) | Yes (repo rules) | No | No | No |
|
|
535
|
-
| Agent Skills support | Yes | Yes (agent mode) | Yes | Yes | N/A |
|
|
536
|
-
| Per-run cost | API usage | Included in license | API usage | API usage | API usage |
|
|
537
|
-
|
|
538
|
-
**Recommendation for mixed-agent orgs:** Use Copilot's native PR review for the
|
|
539
|
-
zero-config baseline (free, always-on), and `claude -p` in CI for the deep review
|
|
540
|
-
with structured output, cost bounding, and custom agent support. They complement
|
|
541
|
-
each other.
|
|
542
|
-
|
|
543
|
-
---
|
|
544
|
-
|
|
545
|
-
*See also:*
|
|
546
|
-
- [`docs/delivery-methods.md`](delivery-methods.md) — all delivery channels including non-CC
|
|
547
|
-
- [`docs/concepts.md`](concepts.md) — compliance hooks, structured telemetry
|
|
548
|
-
- [`docs/claude-code-reference/feature-inventory.md`](claude-code-reference/feature-inventory.md) — CLI flags reference
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Claude Code Reference — AgentBoot Knowledge Base
|
|
2
|
-
|
|
3
|
-
This directory is AgentBoot's living knowledge base of Claude Code features, configurations,
|
|
4
|
-
and nuances. It serves two purposes:
|
|
5
|
-
|
|
6
|
-
1. **Internal reference** — so AgentBoot's build system generates output that uses every
|
|
7
|
-
available Claude Code feature optimally.
|
|
8
|
-
2. **User guidance** — so AgentBoot users understand what Claude Code can do and how
|
|
9
|
-
AgentBoot leverages it on their behalf.
|
|
10
|
-
|
|
11
|
-
## Documents
|
|
12
|
-
|
|
13
|
-
| File | Purpose |
|
|
14
|
-
|------|---------|
|
|
15
|
-
| [feature-inventory.md](./feature-inventory.md) | Complete inventory of every CC feature with exact syntax |
|
|
16
|
-
| [agentboot-coverage.md](./agentboot-coverage.md) | Gap analysis: what AgentBoot uses vs. what's available |
|
|
17
|
-
|
|
18
|
-
## Maintenance
|
|
19
|
-
|
|
20
|
-
This knowledge base must evolve with Claude Code. When Anthropic ships new features,
|
|
21
|
-
update the inventory and reassess coverage. The gap analysis drives AgentBoot's roadmap.
|