An AI-powered agent that converts GitLab issues into detailed development plans with implementation steps, task checklists, and test scenarios.
- AI-generated development plans using Claude
- Structured output: implementation steps, task checklist, test scenarios
- GitLab webhook integration for automatic triggering
- Posts plans as issue comments
- Webhook signature verification
git clone <repo-url>
cd az_porchcorpse-project
pip install -r requirements.txtCopy .env.example to .env and fill in your credentials:
cp .env.example .envRequired:
GITLAB_TOKEN: Personal access token from GitLab (Settings > Access Tokens)GITLAB_URL: Your GitLab instance URL (https://gitlab.com)PROJECT_ID: Your project IDCLAUDE_API_KEY: API key from AnthropicWEBHOOK_SECRET: Random string for webhook security
python webhook_server.pyThe server runs on http://localhost:5000.
Google Cloud Functions:
gcloud functions deploy dev-plan-agent \
--runtime python312 \
--trigger-http \
--entry-point handle_issue_webhook \
--set-env-vars GITLAB_TOKEN=xxx,CLAUDE_API_KEY=xxx,PROJECT_ID=xxxAWS Lambda:
Use webhook_server.py with a Lambda handler wrapper or deploy via Serverless Framework.
- Go to your project: Settings > Webhooks
- Add webhook URL:
https://your-deployment-url/webhook/issue - Trigger events: Issues events
- Secret token: Use your
WEBHOOK_SECRET - Click Add webhook
Mention @dev-planner in an issue title or description:
Title: Implement user authentication @dev-planner
Description: Add login/signup functionality with email verification
The agent will automatically:
- Fetch the issue
- Generate a development plan
- Post it as a comment
from agent import DevPlanAgent
agent = DevPlanAgent()
agent.process_issue(issue_iid=1).
├── agent.py # Main AI agent logic
├── gitlab_integration.py # GitLab API wrapper
├── webhook_server.py # Flask webhook server
├── requirements.txt # Python dependencies
├── .env.example # Environment template
└── README.md # This file
- Deploy to serverless platform
- Test with sample issues
- Add support for creating child issues from checklist
- Enhance plan generation with project context
- Add support for different issue types (bug, feature, etc.)
- Create UI dashboard for plan management
Webhook not triggering?
- Check GitLab webhook logs: Project > Webhooks > Recent deliveries
- Verify
@dev-plannermention is in issue - Ensure webhook URL is publicly accessible
Claude API errors?
- Verify
CLAUDE_API_KEYis correct - Check API quota and billing
GitLab authentication issues?
- Ensure token has
apiandread_apiscopes - Verify
PROJECT_IDis correct