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

  1. Click "Autoplay" on an issue in SprintFlint
  2. SprintFlint triggers a GitHub Actions workflow in your repository
  3. Claude Code implements the issue
  4. Tests are run automatically to verify the implementation
  5. A pull request is created when everything passes
  6. 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

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.

  1. Go to your Profile
  2. Open the "API Token" section and generate a token
  3. 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

Authentication errors

Tests failing

Next Steps