TPM Agent is a GitHub Action that uses AI to analyze, evaluate, and improve GitHub issues, transforming them into high-quality user stories ready for engineering work. It leverages Azure OpenAI and Semantic Kernel to provide actionable feedback, suggest labels, and refactor stories for clarity, completeness, and testability.
- AI-Driven Issue Evaluation: Summarizes, checks completeness, and judges readiness of issues.
- Refactored User Stories: Suggests improved titles, descriptions, and acceptance criteria when needed.
- Label Suggestions: Recommends up to 3 relevant GitHub labels.
- Markdown Round-Trip: Robust parsing and formatting for seamless GitHub comment updates.
- Input Validation: Ensures all required inputs are present and valid.
- Modular Codebase: Clean separation of concerns for maintainability.
This action is designed to run in a Docker container as part of your GitHub workflow. It requires configuration of environment variables for GitHub and Azure OpenAI access.
name: AI Issue Enhancer
on:
issues:
types: [opened, edited]
issue_comment:
types: [created]
jobs:
enhance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run TPM Agent
uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
openai_api_key: ${{ secrets.AZURE_OPENAI_KEY }}
openai_endpoint: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
openai_deployment: ${{ secrets.AZURE_OPENAI_DEPLOYMENT }}-
Clone the repo.
-
Install dependencies:
pip install -r requirements.txt
-
Run/test scripts in
src/as needed.
src/main.py- Entry point, event handling, AI integrationsrc/github_utils.py- GitHub API helperssrc/openai_utils.py- OpenAI/Semantic Kernel helperssrc/response_models.py- Markdown parsing/generationsrc/prompts.py- Prompt constructionaction.yml- GitHub Action metadatarequirements.txt- Python dependencies.github/workflows/- Example workflows
- Requires Azure OpenAI credentials and GitHub token as inputs or environment variables.
- See
action.ymlfor all supported inputs.
See CONTRIBUTING.md for guidelines.
MIT License. See LICENSE.