Hub CI/CD Guide
Overviewβ
The hub repo (your AgentBoot personas repo) uses a straightforward branching model and automated pipelines to keep persona changes validated, compiled, and distributed.
Branching Strategyβ
mainβ production. Everything merged here is compiled and synced to spoke repos automatically.- Feature branches β for persona changes, new traits, gotchas. All
/ab-proposed changes use theab/*prefix (e.g.,ab/trait-critical-thinking,ab/gotcha-lambda-cold-start). release/vX.Yβ release preparation branches for version milestones.
GitHub Actions: Validate + Build + Sync on Mergeβ
Drop this workflow into .github/workflows/agentboot.yml in your hub repo:
name: AgentBoot Pipeline
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate:
name: Validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npx agentboot validate --strict
build-and-sync:
name: Build & Sync
runs-on: ubuntu-latest
needs: validate
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npx agentboot build
- run: npx agentboot sync
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
What this does:
- On every PR: runs
agentboot validate --strictto catch errors before merge. - On merge to
main: validates, builds compiled output, and syncs to spoke repos.
Hub scaffolded by a pre-0.16 AgentBoot? Older versions of
agentboot installdid not write apackage.json/package-lock.jsonpair, and bothnpm ciandsetup-node'scache: 'npm'hard-fail without a lockfile. If your hub predates v0.16 and has nopackage-lock.json, runnpm installonce and commit the resulting files β or replacenpm ciwithnpm installin the workflow and drop thecache: 'npm'lines. Hubs scaffolded by v0.16+ ship the manifest + lockfile pair, so the workflow above works as-is. To pin AgentBoot itself, add it as an exact-version devDependency β see Enterprise Operations Β§ Pinned, reproducible installs.
CI Interfaceβ
For automated environments that use Claude evaluation, the primary interface is
claude -p --output-format json. This is cost-bounded and schema-enforced.
ab/* Branch Auto-Mergeβ
Branches created by /ab follow the ab/* naming convention. Configure branch
protection to auto-merge ab/* PRs when CI passes. This is optional but recommended
for fast iteration on persona improvements.
Setup:
- Require status checks:
validatemust pass. - Enable auto-merge for PRs with the
ab-contributionlabel (applied automatically by/abwhen proposing changes). - Optionally require one reviewer for non-
ab/*branches while allowingab/*branches to merge on CI pass alone.
Branch protection settings (GitHub):
- Require status checks to pass before merging: enabled
- Required checks:
Validate - Allow auto-merge: enabled
- Restrict who can push to matching branches: hub maintainers only