This project uses GitHub Actions for CI/CD and AI-powered automation.
- Trigger: Push to main/master, PRs
- What: Builds the library and demo, runs TypeScript checks across Node 18/20/22
- Trigger: Push to main/master, manual
- What: Builds the Vite demo app and deploys to GitHub Pages
- Trigger: GitHub Release published, or manual with version bump selector
- What: Builds the library and publishes to npm with provenance
- Trigger: Issue labeled
ai-fix, or manual with issue number - What: Reads the issue, sends source code + issue context to an AI model, applies suggested fixes, verifies the build, and opens a PR
- Flow:
- New issue opened → auto-triage adds
ai-fixlabel for bugs - AI agent analyzes the issue against the full source code
- AI returns file patches → applied to a branch
- Build is verified
- PR is opened linking to the issue
- Bot comments on the issue with status
- New issue opened → auto-triage adds
- Trigger: Weekly (Monday 09:00 UTC), or manual
- What: AI reviews the codebase and suggests one focused improvement (performance, a11y, type safety, cleanup)
- Safeguard: Skips if there's already an open AI improvement PR
- Trigger: New issue opened
- What: Analyzes issue title/body and auto-adds labels (
bug,enhancement,accessibility,typescript,ai-fix)
| Secret | Required For | How to Get |
|---|---|---|
NPM_TOKEN |
npm publish | npm tokens |
ANTHROPIC_API_KEY |
AI workflows (default) | Anthropic Console |
OPENAI_API_KEY |
AI workflows (alternative) | OpenAI Platform |
| Variable | Default | Description |
|---|---|---|
AI_PROVIDER |
anthropic |
AI provider: anthropic or openai |
- Go to Settings → Pages
- Set Source to GitHub Actions
- Add secrets in your repo: Settings → Secrets and variables → Actions → New repository secret
- Add variables (optional): Settings → Secrets and variables → Actions → Variables tab
- Enable GitHub Pages: Settings → Pages → Source: GitHub Actions
- Push to main — CI and demo deployment will run automatically
All workflows support workflow_dispatch (manual trigger) from the Actions tab:
- AI Issue Fixer: Enter an issue number to analyze
- AI Improve: Run on-demand instead of waiting for the weekly schedule
- Publish: Select a version bump type (patch/minor/major)
- Deploy Demo: Re-deploy the demo page
The AI agent (.github/scripts/ai-agent.js) works in two modes:
Issue opened → Read issue + comments → Bundle source code →
AI analyzes & returns JSON patches → Apply patches → Verify build → Open PR
Weekly schedule → Bundle source code → AI suggests improvement →
Apply patches → Verify build → Open PR
The agent supports both Anthropic (Claude) and OpenAI (GPT-4o) as backends, configured via the AI_PROVIDER repository variable.