Automations
Go CLI tools that bring AI-powered automation to your development workflow. Run them locally, integrate into your CI pipelines, or use with GitHub Actions.
Getting Started#
Each automation is a standalone Go CLI tool. You can run them locally or integrate them into CI:
Local Usage
- 1Clone the
yo-gorepository and navigate to the automation directory - 2Build the tool with
go buildor run directly withgo run . - 3Set required environment variables (see each automation's documentation)
CI Integration
The example workflows below show how to wrap each CLI tool in a GitHub Action. Adapt the workflow YAML to match your CI environment.
Required Configuration
Most automations require a GITHUB_TOKEN for repository access and an AI provider API key. Check each tool's README for specific requirements.
Available Automations#
CI Triage
Automatically analyze CI failures and provide actionable summaries. When a workflow fails, this automation examines logs, identifies the root cause, and posts a comment with fix suggestions.
Features:
- Parses build logs to identify failure patterns
- Distinguishes between flaky tests, dependency issues, and code errors
- Posts a PR comment with root cause analysis
- Suggests specific fixes based on error patterns
- Links to relevant documentation when applicable
Workflow Configuration:
name: CI Triage
on:
workflow_run:
workflows: ["CI"]
types: [completed]
jobs:
triage:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download logs
uses: actions/download-artifact@v4
with:
name: build-logs
- name: Analyze failure
uses: opencode-ai/ci-triage@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
opencode-api-key: ${{ secrets.OPENCODE_API_KEY }}
- name: Post analysis
uses: actions/github-script@v7
with:
script: |
const analysis = require('./triage-report.json');
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.workflow_run.pull_requests[0]?.number,
body: analysis.summary
});PRD Generator
Generate Product Requirements Documents from issue descriptions. When an issue is labeled as a feature request, this automation creates a structured PRD with user stories, acceptance criteria, and technical considerations.
Features:
- Extracts requirements from issue description
- Generates user stories with acceptance criteria
- Identifies technical dependencies and risks
- Creates milestone and task breakdown
- Outputs to docs/prds/ in your repository
Workflow Configuration:
name: PRD Generator
on:
issues:
types: [labeled, opened]
jobs:
generate-prd:
if: contains(github.event.issue.labels.*.name, 'feature-request')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Generate PRD
uses: opencode-ai/prd-generator@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
opencode-api-key: ${{ secrets.OPENCODE_API_KEY }}
issue-number: ${{ github.event.issue.number }}
output-path: docs/prds/
- name: Create PR with PRD
uses: peter-evans/create-pull-request@v6
with:
title: "docs: Add PRD for #${{ github.event.issue.number }}"
body: |
Generated PRD for issue #${{ github.event.issue.number }}
Please review the requirements and user stories.
branch: prd/issue-${{ github.event.issue.number }}
commit-message: "docs: generate PRD for issue #${{ github.event.issue.number }}"Release Notes
Automatically generate release notes from merged PRs and commits. Creates well-formatted changelogs organized by category (features, fixes, improvements) when a release is published.
Features:
- Collects all merged PRs since last release
- Categorizes changes by PR labels or commit prefixes
- Generates markdown changelog with contributor credits
- Optionally updates CHANGELOG.md in your repo
- Supports conventional commits format
Workflow Configuration:
name: Release Notes
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Release tag'
required: true
jobs:
generate-notes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate release notes
uses: opencode-ai/release-notes@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
opencode-api-key: ${{ secrets.OPENCODE_API_KEY }}
tag: ${{ github.event.release.tag_name || inputs.tag }}
categories: |
feat: Features
fix: Bug Fixes
docs: Documentation
perf: Performance
refactor: Refactoring
- name: Update release
uses: softprops/action-gh-release@v1
with:
body_path: release-notes.md
tag_name: ${{ github.event.release.tag_name || inputs.tag }}Customization#
All automations can be customized to fit your workflow:
Trigger conditions
Modify the on: section to change when the workflow runs. Filter by branches, paths, or other conditions.
Action inputs
Each action accepts configuration inputs. Check the action's README for all available options.
Combining automations
Chain multiple automations together using workflow outputs or by triggering workflows from other workflows.