diff --git a/.claude/agent-teams-ai-setup.md b/.claude/agent-teams-ai-setup.md index 918ae2d..0239817 100644 --- a/.claude/agent-teams-ai-setup.md +++ b/.claude/agent-teams-ai-setup.md @@ -922,10 +922,13 @@ Infrastructure: ## CI/CD Workflows -Current workflows in `.github/workflows/`: -- `claude-agent-teams-research.yml` - Feature analysis -- `claude-agent-teams-implement.yml` - Feature implementation -- `release-please.yml` - Automated releases +The Claude workflows this document described have been removed: they ran on a credential that +no longer buys a model call, so every trigger was a red check that reviewed nothing. What is +left in `.github/workflows/` is ordinary automation — `ci.yml`, `docs.yml`, `publish.yml`, +`release.yml`. + +The agent definitions, rules, skills and commands under `.claude/` are unaffected: they are for +local Claude Code sessions and never needed CI. ## Docker Infrastructure diff --git a/.claude/mr-review-team.json b/.claude/mr-review-team.json index 55e6890..e7b95f8 100644 --- a/.claude/mr-review-team.json +++ b/.claude/mr-review-team.json @@ -17,7 +17,7 @@ { "name": "devops-engineer", "role": "developer", - "workflow": "You are a DevOps Engineer responsible for CI/CD, infrastructure, and automation.\n\n## Project Context\n\n**Infrastructure:**\n- CI/CD: GitHub Actions\n- Containers: Docker + docker-compose\n- Testing: pytest (backend), Vitest (frontend)\n- Linting: ruff (Python), ESLint (TypeScript)\n\n## CI/CD Workflows\n\nLocation: `.github/workflows/`\n\n**Active Workflows:**\n- `claude-agent-teams-research.yml` - Feature analysis with 3 agents\n- `claude-agent-teams-implement.yml` - Feature implementation with 3 agents\n- `release-please.yml` - Automated releases\n\n**Key Settings:**\n- `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: \"1\"` - Enable Agent Teams\n- `allowed_bots: \"*\"` - Allow bot-created PRs\n- `track_progress: true` - Visual progress tracking\n\n## Docker Infrastructure\n\nServices in `docker-compose.yml`:\n```yaml\nservices:\n postgres: # Main database\n redis: # Caching\n mr-review: # Backend API\n web-app: # Frontend dev server\n```\n\n## Makefile Commands\n\n```bash\n# Infrastructure\nmake run-infra # Start core services\nmake stop-all-services # Stop everything\nmake clean-volumes # Clean Docker volumes\n\n# Development\nmake run-services # Start all services\nmake fmt # Format code\nmake lint # Run linters\nmake test # Run tests\n\n# Database\nmake alembic-new-migration # Create migration\n```\n\n## Your Responsibilities\n\n1. **CI/CD maintenance**: Keep workflows updated, optimize build times\n2. **Docker optimization**: Multi-stage builds, layer caching\n3. **Testing automation**: Fast feedback loops\n4. **Monitoring**: Health checks, metrics, logging\n5. **Security**: Dependency scanning, container security\n6. **Documentation**: Setup instructions, troubleshooting\n\n## Working Process\n\n1. Monitor CI/CD failures - fix quickly\n2. Optimize workflow execution times\n3. Update dependencies securely\n4. Document infrastructure changes\n5. Test Docker changes locally first\n6. Keep `.github/workflows/` organized\n7. Support developers with CI issues\n\n## Git Workflow\n\n- Infrastructure changes: `chore/__description`\n- Workflow updates: `ci/__description`\n- Test locally before committing\n- Document changes in commit messages\n\n## Key Files\n\n- `.github/workflows/` - CI/CD pipelines\n- `docker-compose.yml` - Service definitions\n- `Makefile` - Build automation\n- `scripts/` - Helper scripts\n\n## Red Flags to REJECT\n\n❌ CI/CD changes without testing\n❌ Docker changes breaking local dev\n❌ Missing health checks\n❌ Insecure secrets handling\n❌ Workflow changes breaking PRs\n\nREMEMBER: CI/CD is critical infrastructure. Test thoroughly before merging." + "workflow": "You are a DevOps Engineer responsible for CI/CD, infrastructure, and automation.\n\n## Project Context\n\n**Infrastructure:**\n- CI/CD: GitHub Actions\n- Containers: Docker + docker-compose\n- Testing: pytest (backend), Vitest (frontend)\n- Linting: ruff (Python), ESLint (TypeScript)\n\n## CI/CD Workflows\n\nLocation: `.github/workflows/`\n\n**Active Workflows:**\n- `ci.yml` - Lint, type check and tests\n- `docs.yml` - Build and deploy the documentation site\n- `release.yml` - Release Please: version bumps, changelog, tags\n- `publish.yml` - Build and push the api and web-app images to ghcr.io\n\n## Docker Infrastructure\n\nServices in `docker-compose.yml`:\n```yaml\nservices:\n postgres: # Main database\n redis: # Caching\n mr-review: # Backend API\n web-app: # Frontend dev server\n```\n\n## Makefile Commands\n\n```bash\n# Infrastructure\nmake run-infra # Start core services\nmake stop-all-services # Stop everything\nmake clean-volumes # Clean Docker volumes\n\n# Development\nmake run-services # Start all services\nmake fmt # Format code\nmake lint # Run linters\nmake test # Run tests\n\n# Database\nmake alembic-new-migration # Create migration\n```\n\n## Your Responsibilities\n\n1. **CI/CD maintenance**: Keep workflows updated, optimize build times\n2. **Docker optimization**: Multi-stage builds, layer caching\n3. **Testing automation**: Fast feedback loops\n4. **Monitoring**: Health checks, metrics, logging\n5. **Security**: Dependency scanning, container security\n6. **Documentation**: Setup instructions, troubleshooting\n\n## Working Process\n\n1. Monitor CI/CD failures - fix quickly\n2. Optimize workflow execution times\n3. Update dependencies securely\n4. Document infrastructure changes\n5. Test Docker changes locally first\n6. Keep `.github/workflows/` organized\n7. Support developers with CI issues\n\n## Git Workflow\n\n- Infrastructure changes: `chore/__description`\n- Workflow updates: `ci/__description`\n- Test locally before committing\n- Document changes in commit messages\n\n## Key Files\n\n- `.github/workflows/` - CI/CD pipelines\n- `docker-compose.yml` - Service definitions\n- `Makefile` - Build automation\n- `scripts/` - Helper scripts\n\n## Red Flags to REJECT\n\n❌ CI/CD changes without testing\n❌ Docker changes breaking local dev\n❌ Missing health checks\n❌ Insecure secrets handling\n❌ Workflow changes breaking PRs\n\nREMEMBER: CI/CD is critical infrastructure. Test thoroughly before merging." }, { "name": "product-analyst", diff --git a/.github/workflows/claude-agent-teams-implement.yml b/.github/workflows/claude-agent-teams-implement.yml deleted file mode 100644 index 49f6e09..0000000 --- a/.github/workflows/claude-agent-teams-implement.yml +++ /dev/null @@ -1,130 +0,0 @@ -name: Claude Agent Teams Implementation - -on: - issues: - types: [labeled] - workflow_dispatch: - inputs: - issue_number: - description: "Issue number to implement" - required: true - type: number - -permissions: - issues: write - contents: write - pull-requests: write - id-token: write - -jobs: - multi-agent-implement: - runs-on: ubuntu-latest - # Trigger only for issues with 'implement' label or manual dispatch - if: | - (github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'implement')) || - github.event_name == 'workflow_dispatch' - steps: - - name: Checkout code - uses: actions/checkout@v7 - - - name: Get issue details - id: issue - run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - ISSUE_NUMBER="${{ github.event.inputs.issue_number }}" - else - ISSUE_NUMBER="${{ github.event.issue.number }}" - fi - - echo "number=$ISSUE_NUMBER" >> $GITHUB_OUTPUT - - ISSUE_DATA=$(gh issue view $ISSUE_NUMBER --json title,body,labels) - echo "title=$(echo "$ISSUE_DATA" | jq -r '.title')" >> $GITHUB_OUTPUT - echo "body<> $GITHUB_OUTPUT - echo "$ISSUE_DATA" | jq -r '.body' >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Cache Claude Code installation - - name: Cache Claude Code - uses: actions/cache@v6 - with: - path: | - ~/.claude - ~/.cache/claude - key: ${{ runner.os }}-claude-${{ hashFiles('.github/workflows/claude-agent-teams-implement.yml') }} - restore-keys: | - ${{ runner.os }}-claude- - - - name: Multi-Agent Implementation with Claude - uses: anthropics/claude-code-action@v1 - env: - CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: "1" - with: - claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - track_progress: true - prompt: | - REPO: ${{ github.repository }} - ISSUE NUMBER: ${{ steps.issue.outputs.number }} - TITLE: ${{ steps.issue.outputs.title }} - - BODY: - ${{ steps.issue.outputs.body }} - - **AGENT TEAMS MODE: Multi-agent parallel implementation** - - This issue has analysis complete (see comments above). Now implement the solution. - - **Previous Analysis Summary (from Agent Teams research):** - - Analysis complete with recommendations - - Implementation plan provided - - Read all comments on this issue for context - - **Implementation Task:** - Spawn specialized agents to implement the approved solution: - - **Agent 1 - Core Implementation**: - - Read analysis comments on this issue - - Implement core domain/use_case changes - - Follow .claude/rules/ (Onion Architecture) - - Add type hints, proper naming - - NO TODOs or FIXMEs - - **Agent 2 - Infrastructure & Config**: - - Implement infrastructure layer (infra/) - - Add configuration (Settings, DI providers) - - Follow dependency injection patterns - - Register in DI container - - **Agent 3 - Tests & Documentation**: - - Write unit tests (tests/unit/) - - Write integration tests if needed - - Update relevant docs - - Verify all tests pass - - **Coordination:** - - Each agent: Focus on assigned scope - - Communicate via mailbox (ask questions, share findings) - - Team lead: Ensure consistency, create PR - - **Output:** - 1. Create feature branch: `feat/ISSUE-${{ steps.issue.outputs.number }}__` - 2. Implement changes (all 3 agents in parallel) - 3. Run tests to verify - 4. Commit changes (conventional commits) - 5. Push branch using `./scripts/git-push.sh origin ` - 6. Create PR with: - - Title: Link to issue - - Body: Implementation summary - - Link back to this issue - - **Tools:** - - Use `./scripts/git-push.sh` for safe git push - - Use `gh pr create` to create pull request - - Read codebase extensively - - Write/Edit files as needed - - claude_args: | - --model opus - --allowedTools "Edit,Write,Read,Glob,Grep,Bash(git:*),Bash(./scripts/git-push.sh:*),Bash(gh pr:*),Bash(pytest:*),Bash(ruff:*),Bash(mypy:*)" diff --git a/.github/workflows/claude-agent-teams-research.yml b/.github/workflows/claude-agent-teams-research.yml deleted file mode 100644 index 58fdb5e..0000000 --- a/.github/workflows/claude-agent-teams-research.yml +++ /dev/null @@ -1,148 +0,0 @@ -name: Claude Agent Teams Research - -on: - issues: - types: [labeled] - workflow_dispatch: - inputs: - issue_number: - description: "Issue number to analyze" - required: true - type: number - -permissions: - issues: write - contents: read - id-token: write - -jobs: - multi-agent-research: - runs-on: ubuntu-latest - # Trigger only for issues with 'agent-teams' label or manual dispatch - if: | - (github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'agent-teams')) || - github.event_name == 'workflow_dispatch' - steps: - - name: Checkout code - uses: actions/checkout@v7 - - - name: Get issue details - id: issue - run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - ISSUE_NUMBER="${{ github.event.inputs.issue_number }}" - else - ISSUE_NUMBER="${{ github.event.issue.number }}" - fi - - echo "number=$ISSUE_NUMBER" >> $GITHUB_OUTPUT - - ISSUE_DATA=$(gh issue view $ISSUE_NUMBER --json title,body,labels) - echo "title=$(echo "$ISSUE_DATA" | jq -r '.title')" >> $GITHUB_OUTPUT - echo "body<> $GITHUB_OUTPUT - echo "$ISSUE_DATA" | jq -r '.body' >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Cache Claude Code installation - - name: Cache Claude Code - uses: actions/cache@v6 - with: - path: | - ~/.claude - ~/.cache/claude - key: ${{ runner.os }}-claude-${{ hashFiles('.github/workflows/claude-agent-teams-research.yml') }} - restore-keys: | - ${{ runner.os }}-claude- - - - name: Multi-Agent Research with Claude - uses: anthropics/claude-code-action@v1 - env: - CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: "1" - with: - claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - track_progress: true - prompt: | - REPO: ${{ github.repository }} - ISSUE NUMBER: ${{ steps.issue.outputs.number }} - TITLE: ${{ steps.issue.outputs.title }} - - BODY: - ${{ steps.issue.outputs.body }} - - **AGENT TEAMS MODE: Comprehensive feature research** - - This is a feature request requiring deep analysis. Spawn specialized agents: - - **Agent 1 - Technical Feasibility**: - - Analyze codebase architecture (check .claude/rules/) - - Identify integration points - - Assess compatibility with existing patterns - - Estimate implementation complexity - - List technical dependencies - - **Agent 2 - Design & Architecture**: - - Propose implementation approach - - Design patterns to use (Onion/FSD compliant) - - API design (if applicable) - - Database schema changes (if needed) - - Testing strategy - - **Agent 3 - Risk Analysis & Alternatives**: - - Identify potential risks and pitfalls - - Breaking changes impact - - Performance implications - - Alternative approaches - - Trade-offs analysis - - **Team Lead - Synthesis**: - - Collect findings from all agents - - Create unified implementation plan - - Prioritize recommendations - - Estimate effort (story points) - - Post comprehensive analysis as issue comment - - **Output Format** (post as comment): - ```markdown - ## 🤖 Multi-Agent Analysis Results - - ### Executive Summary - [High-level recommendation: Approve/Reject/Modify with rationale] - - ### Technical Feasibility (Agent 1) - - **Integration Points**: [list] - - **Complexity**: [Low/Medium/High] - - **Dependencies**: [list] - - ### Proposed Design (Agent 2) - - **Architecture**: [approach] - - **Patterns**: [list] - - **API Changes**: [if any] - - ### Risk Analysis (Agent 3) - - **Risks**: [list with severity] - - **Alternatives**: [list] - - **Recommendation**: [which approach and why] - - ### Implementation Plan - 1. [Step 1] - 2. [Step 2] - ... - - ### Effort Estimate - - Story Points: [number] - - Timeline: [estimate] - - --- - 🤖 Generated by Claude Agent Teams - ``` - - **Tools**: - - Use `./scripts/add-comment.sh` to post analysis - - Use `gh issue` commands to read related issues - - Read codebase extensively (this is read-heavy task, perfect for agent teams) - - claude_args: | - --model opus - --allowedTools "Bash(./scripts/add-comment.sh:*),Bash(./scripts/gh.sh:*),Bash(gh issue:*)" diff --git a/.github/workflows/claude-mentions.yml b/.github/workflows/claude-mentions.yml deleted file mode 100644 index d7e8880..0000000 --- a/.github/workflows/claude-mentions.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Claude Mentions - -on: - issue_comment: - types: [created] - pull_request_review_comment: - types: [created] - -permissions: - issues: write - pull-requests: write - contents: read - id-token: write - -jobs: - respond: - runs-on: ubuntu-latest - # Only respond to @claude mentions - if: contains(github.event.comment.body, '@claude') - steps: - - name: Checkout code - uses: actions/checkout@v7 - with: - ref: ${{ github.event.pull_request.head.ref || github.ref }} - - # Cache Claude Code installation - - name: Cache Claude Code - uses: actions/cache@v6 - with: - path: | - ~/.claude - ~/.cache/claude - key: ${{ runner.os }}-claude-${{ hashFiles('.github/workflows/claude-mentions.yml') }} - restore-keys: | - ${{ runner.os }}-claude- - - - name: Extract command - id: command - run: | - COMMENT_BODY="${{ github.event.comment.body }}" - - # Extract command after @claude - if echo "$COMMENT_BODY" | grep -qE '@claude\s+review'; then - echo "agent=backend-reviewer" >> $GITHUB_OUTPUT - echo "action=review" >> $GITHUB_OUTPUT - elif echo "$COMMENT_BODY" | grep -qE '@claude\s+implement'; then - echo "agent=backend-engineer" >> $GITHUB_OUTPUT - echo "action=implement" >> $GITHUB_OUTPUT - elif echo "$COMMENT_BODY" | grep -qE '@claude\s+test'; then - echo "agent=frontend-qa-engineer" >> $GITHUB_OUTPUT - echo "action=test" >> $GITHUB_OUTPUT - elif echo "$COMMENT_BODY" | grep -qE '@claude\s+triage'; then - echo "agent=triage" >> $GITHUB_OUTPUT - echo "action=triage" >> $GITHUB_OUTPUT - else - echo "agent=backend-engineer" >> $GITHUB_OUTPUT - echo "action=help" >> $GITHUB_OUTPUT - fi - - - name: Respond to mention - uses: anthropics/claude-code-action@v1 - with: - claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - prompt: | - You've been mentioned in a comment: - - **Context**: ${{ github.event.issue.title || github.event.pull_request.title }} - **Author**: ${{ github.event.comment.user.login }} - **Comment**: - ${{ github.event.comment.body }} - - **Action requested**: ${{ steps.command.outputs.action }} - **Suggested agent**: ${{ steps.command.outputs.agent }} - - Respond to this request appropriately: - - If asked to review: perform code review - - If asked to implement: clarify requirements and implement - - If asked to test: write/run tests - - If asked to triage: analyze and label issue (check .claude/agents/triage.md) - - Otherwise: ask for clarification on what you should do - - Reply in the comment thread with your response. diff --git a/.github/workflows/claude-pm.yml b/.github/workflows/claude-pm.yml deleted file mode 100644 index f9ed5e4..0000000 --- a/.github/workflows/claude-pm.yml +++ /dev/null @@ -1,113 +0,0 @@ -name: Claude Product Management - -on: - schedule: - # Run daily at 9 AM UTC (noon Moscow) - - cron: '0 9 * * *' - workflow_dispatch: # Allow manual trigger - -permissions: - issues: write - pull-requests: read - contents: read - id-token: write - -jobs: - backlog-review: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v7 - - # Cache Claude Code installation - - name: Cache Claude Code - uses: actions/cache@v6 - with: - path: | - ~/.claude - ~/.cache/claude - key: ${{ runner.os }}-claude-${{ hashFiles('.github/workflows/claude-pm.yml') }} - restore-keys: | - ${{ runner.os }}-claude- - - - name: Review backlog - uses: anthropics/claude-code-action@v1 - with: - claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - prompt: | - Daily product management review for mr-review service. - - As the product manager: - - 1. **Review Open Issues**: - - List all open issues - - Check if priorities are correctly assigned - - Identify issues missing labels or clear descriptions - - Flag issues with no activity for >30 days - - 2. **Review Open PRs**: - - List all open PRs - - Check for PRs waiting on review - - Identify stale PRs (>7 days old) - - Check if PRs are blocked - - 3. **Backlog Health**: - - Count issues by priority - - Identify missing milestones - - Suggest grouping related issues into epics - - 4. **Create Summary Issue**: - - Create a new issue titled "Product Review - [DATE]" - - Include: - * Backlog health metrics - * Priority recommendations - * Stale issues/PRs to close or escalate - * Suggested milestone assignments - - Tag with label "product-review" - - Follow guidelines in .claude/agents/product-manager.md - - milestone-planning: - runs-on: ubuntu-latest - needs: backlog-review - # Run only on Mondays - if: github.event.schedule == '0 9 * * 1' - steps: - - name: Checkout code - uses: actions/checkout@v7 - - # Cache Claude Code installation - - name: Cache Claude Code - uses: actions/cache@v6 - with: - path: | - ~/.claude - ~/.cache/claude - key: ${{ runner.os }}-claude-${{ hashFiles('.github/workflows/claude-pm.yml') }} - restore-keys: | - ${{ runner.os }}-claude- - - - name: Plan next milestone - uses: anthropics/claude-code-action@v1 - with: - claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - prompt: | - Weekly milestone planning for mr-review service. - - As the product manager: - - 1. Review current milestone progress - 2. Identify issues that should move to next milestone - 3. Suggest new milestone if current is >80% complete - 4. Create milestone planning document as issue comment - - Focus on: - - High priority bugs - - New VCS integrations - - Performance improvements - - User-requested features - - Balance between: - - User value (new features, integrations) - - Technical health (refactoring, testing, docs) - - Team velocity (don't overcommit) diff --git a/.github/workflows/claude-triage.yml b/.github/workflows/claude-triage.yml deleted file mode 100644 index ff9bb43..0000000 --- a/.github/workflows/claude-triage.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Claude Issue Triage - -on: - issues: - types: [opened] - -permissions: - issues: write - contents: read - id-token: write - -jobs: - triage: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v7 - - # Cache Claude Code installation - - name: Cache Claude Code - uses: actions/cache@v6 - with: - path: | - ~/.claude - ~/.cache/claude - key: ${{ runner.os }}-claude-${{ hashFiles('.github/workflows/claude-triage.yml') }} - restore-keys: | - ${{ runner.os }}-claude- - - - name: Triage issue with Claude - uses: anthropics/claude-code-action@v1 - with: - claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - track_progress: true - prompt: | - REPO: ${{ github.repository }} - ISSUE NUMBER: ${{ github.event.issue.number }} - TITLE: ${{ github.event.issue.title }} - BODY: ${{ github.event.issue.body }} - AUTHOR: ${{ github.event.issue.user.login }} - - Analyze this new issue and: - 1. Determine type: bug, feature, enhancement, or documentation - 2. Assess priority: priority:high, priority:medium, priority:low - 3. Identify area: area:backend, area:frontend, area:vcs, area:ai, area:infra, area:docs - 4. Check for duplicates using ./scripts/gh.sh search issues "keywords" - - Use ./scripts/gh.sh to interact with GitHub: - - `./scripts/gh.sh label list` to see available labels - - `./scripts/gh.sh search issues "query"` to find similar issues - - Add labels using: - `./scripts/edit-issue-labels.sh --add-label "label1" --add-label "label2"` - - claude_args: | - --allowedTools "Bash(./scripts/gh.sh:*),Bash(./scripts/edit-issue-labels.sh:*)"