Autoplay
Autoplay lets you click a button and have AI automatically implement an issue, run tests, and create a pull request. It uses Claude Code (Anthropic) in GitHub Actions.
Requirements - Autoplay requires GitHub integration to be set up, and you need to configure a workflow file in your repository.
How It Works
- Click "Autoplay" on an issue in SprintFlint
- SprintFlint triggers a GitHub Actions workflow in your repository
- Claude Code implements the issue
- Tests are run automatically to verify the implementation
- A pull request is created when everything passes
- The PR links back to the original issue
Repository Setup
your-repo/
├── .github/workflows/autoplay.yml # GitHub Actions workflow
├── Procfile.autoplay # Foreman config for CI (optional)
└── ...
Claude Code Setup
Use the official claude-code-action GitHub Action:
- name: Run Claude Code
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
# Or: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
Implement issue ${{ inputs.issue_number }}: ${{ inputs.issue_title }}
${{ inputs.issue_description }}
Create branch '${{ inputs.branch_name }}', commit, and open a PR.
If you have questions or cannot complete the issue, use the SprintFlint API
to add a comment: POST /api/v1/projects/.../issues/.../comments with
X-API-Token header.
github_token: ${{ github.token }}
Claude Code Authentication
- OAuth (Pro/Max): Run
claude setup-token, then addCLAUDE_CODE_OAUTH_TOKEN - API key: From console.anthropic.com, add
ANTHROPIC_API_KEY - Bedrock/Vertex: use
use_bedrock: trueoruse_vertex: truein the action
SprintFlint API Integration
The AI can use the SprintFlint REST API to leave comments when it has questions or needs clarification:
curl -X POST https://sprintflint.com/api/v1/projects/{project_id}/sprints/{sprint_id}/issues/{issue_id}/comments \
-H "X-API-Token: $SPRINTFLINT_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"comment": {"body": "Question: Should this handle edge case X?"}}'
AI Feedback - When the AI has questions or cannot complete an issue, it can leave a comment on the ticket via the SprintFlint API instead of failing silently.
SprintFlint API Token
Required for AI feedback. Lets the AI leave comments when it has questions.
- Go to your Profile
- Open the "API Token" section and generate a token
- Add as repository secret:
SPRINTFLINT_API_TOKEN
Browser Testing
Install agent-browser for UI testing. Claude Code can use it via shell commands:
- name: Install agent-browser
run: |
npm install -g agent-browser
agent-browser install
agent-browser open http://localhost:3000
agent-browser snapshot -i # refs @e1, @e2, ...
agent-browser click @e1
agent-browser fill @e2 "text"
agent-browser screenshot page.png
Project-Specific Setup
Add the steps needed to run your stack before the AI step. Example for Rails:
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4.7'
bundler-cache: true
- uses: actions/setup-node@v4
with:
node-version: '24.x'
cache: 'yarn'
- name: Setup database
run: bundle exec rake db:create db:migrate db:seed
env:
RAILS_ENV: test
Troubleshooting
Workflow not triggering
- Ensure
autoplay.ymlis in.github/workflows/on the default branch - Check workflow syntax (YAML and step names)
Authentication errors
- Check
CLAUDE_CODE_OAUTH_TOKENorANTHROPIC_API_KEY - Regenerate tokens if they may have expired
Tests failing
- Inspect the workflow logs in GitHub Actions
- Ensure project-specific setup (DB, env, assets) is complete and matches local
Next Steps
- API Reference - Integrate with your own tools
- GitHub Integration - Learn about PR linking