Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .conductor/GITHUB_TOKEN_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ When you install Code Conductor in your project:
- **Limitations**: Can't trigger other workflows, rate limited
- **Optional upgrade**: Create a PAT for enhanced features (see below)

**Important**: The workflows generated by setup.py are configured to use `github.token` by default. This is the recommended approach for most users.

### 2. For Code Conductor Development (Maintainers Only)
The ryanmac/code-conductor repository itself uses:
- **Token name**: `CONDUCTOR_GITHUB_TOKEN`
Expand Down
144 changes: 36 additions & 108 deletions .github/ISSUE_TEMPLATE/conductor-task.yml
Original file line number Diff line number Diff line change
@@ -1,144 +1,72 @@
name: 🎯 Conductor Task
description: Create a new task for AI agent coordination
title: "[Task] "
name: Conductor Task
description: Create a new task for agent coordination
title: "[TASK] "
labels: ["conductor:task"]
body:
- type: markdown
attributes:
value: |
## 🎼 Create a Conductor Task

This template helps you create a structured task that can be automatically processed by Code-Conductor agents.

**Note**: Adding the `conductor:task` label will automatically convert this issue into a task.

- type: input
id: task_title
id: title
attributes:
label: Task Title
description: A clear, concise title for the task
placeholder: "Implement user authentication system"
description: Brief description of what needs to be done
placeholder: "Implement user authentication"
validations:
required: true

- type: textarea
id: description
attributes:
label: Description
description: Detailed description of what needs to be accomplished
label: Task Description
description: Detailed description of the task
placeholder: |
Create a secure user authentication system with the following features:
- User registration and login
- Password hashing with bcrypt
- JWT token management
- Session persistence
- Password reset functionality
Implement JWT-based authentication with:
- Login endpoint
- Logout endpoint
- Token refresh mechanism
validations:
required: true

- type: dropdown
id: effort
id: priority
attributes:
label: Estimated Effort
description: How much work is this task?
label: Priority
options:
- small (< 4 hours)
- medium (4-16 hours)
- large (> 16 hours)
- High
- Medium
- Low
validations:
required: true

- type: checkboxes
id: required_skills
attributes:
label: Required Skills
description: What specialized skills are needed? (Leave empty for general dev tasks)
options:
- label: DevOps (deployment, infrastructure, CI/CD)
- label: Security (authentication, encryption, compliance)
- label: UI/UX Design (interface design, user experience)
- label: Rust Development (systems programming, performance)
- label: Database (optimization, migrations, architecture)

- type: textarea
id: files
attributes:
label: Files Involved
description: List the files that will be modified (one per line)
placeholder: |
src/auth/models.py
src/auth/views.py
src/auth/serializers.py
tests/test_auth.py
requirements.txt

- type: textarea
id: specifications
- type: input
id: effort
attributes:
label: Specifications
description: Link to design docs, API specs, or detailed requirements
placeholder: |
- API Documentation: docs/auth-api.md
- Database Schema: docs/auth-schema.sql
- Security Requirements: docs/security-requirements.md
label: Estimated Effort
description: Rough estimate (small/medium/large)
placeholder: "medium"

- type: textarea
id: best_practices
- type: input
id: skills
attributes:
label: Best Practices
description: Important guidelines and coding standards to follow
placeholder: |
- Follow Django REST framework conventions
- Use type hints for all function signatures
- Implement comprehensive error handling
- Add logging for all authentication events
- Follow OWASP security guidelines
label: Required Skills
description: Comma-separated list of required skills (leave empty for general dev)
placeholder: "security, backend"

- type: textarea
id: success_criteria
attributes:
label: Success Criteria
description: How will we know this task is complete?
description: How will we know when this task is complete?
placeholder: |
**Tests**: All tests pass with 95% code coverage
**Security**: Passes security audit checklist
**Performance**: Login completes in under 200ms
**Documentation**: All API endpoints documented
**Code Review**: Approved by security team member
- All authentication endpoints working
- Tests written with 100% coverage
- Security review passed
validations:
required: true

- type: textarea
id: dependencies
attributes:
label: Dependencies
description: Other tasks or issues that must be completed first
description: List any tasks or PRs this depends on
placeholder: |
- Issue #123: Database migration system
- Task user_model_001: User model updates

- type: checkboxes
id: acknowledgments
attributes:
label: Acknowledgments
description: Please confirm you understand how Conductor tasks work
options:
- label: I understand this will be converted to an agent task automatically
required: true
- label: I have provided enough detail for an AI agent to complete this work
required: true
- label: I will monitor the progress and provide feedback as needed
required: true

- type: markdown
attributes:
value: |
---

## 🚀 What Happens Next?

1. **Task Creation**: This issue will be automatically converted to a conductor task
2. **Agent Assignment**: Available agents can claim this task via the bootstrap script
3. **Isolation**: Work happens in isolated git worktrees to prevent conflicts
4. **Progress**: Monitor via GitHub Actions and system health checks
5. **Completion**: Agent creates PR when task is finished

📚 **Learn more**: [Code-Conductor Documentation](docs/USAGE.md)
- PR#123 (Database schema)
- Task#456 (User model)
35 changes: 35 additions & 0 deletions .github/workflows/conductor-cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Conductor Cleanup

on:
schedule:
- cron: '0 */6 * * *' # Every 6 hours
workflow_dispatch:

jobs:
cleanup-stale-work:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install dependencies
run: |
pip install pyyaml

- name: Clean up abandoned worktrees
run: |
python .conductor/scripts/cleanup-worktrees.py

- name: Archive completed tasks
run: |
python .conductor/scripts/archive-completed.py

- name: Commit cleanup changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '🧹 Cleanup stale work and archive completed tasks'
file_pattern: '.conductor/*.json'
14 changes: 7 additions & 7 deletions .github/workflows/pr-review-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
id: check
uses: actions/github-script@v7
with:
github-token: ${{ secrets.CONDUCTOR_GITHUB_TOKEN }}
github-token: ${{ secrets.CONDUCTOR_GITHUB_TOKEN || github.token }}
script: |
let shouldReview = false;
let prNumber = null;
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:

- name: Setup GitHub CLI
run: |
echo "${{ secrets.CONDUCTOR_GITHUB_TOKEN }}" > token.txt
echo "${{ secrets.CONDUCTOR_GITHUB_TOKEN || github.token }}" > token.txt
gh auth login --with-token < token.txt
rm -f token.txt

Expand All @@ -157,7 +157,7 @@ jobs:
gh label create "${name}" --color "${color}" --description "${desc}" || true
done
env:
GH_TOKEN: ${{ secrets.CONDUCTOR_GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.CONDUCTOR_GITHUB_TOKEN || github.token }}

- name: Create review task issue
run: |
Expand All @@ -166,16 +166,16 @@ jobs:
--repo "${{ github.repository }}" \
--event-type "${{ github.event_name }}"
env:
GH_TOKEN: ${{ secrets.CONDUCTOR_GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.CONDUCTOR_GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.CONDUCTOR_GITHUB_TOKEN || github.token }}
GITHUB_TOKEN: ${{ secrets.CONDUCTOR_GITHUB_TOKEN || github.token }}

- name: Add acknowledgment comment
if: github.event_name == 'issue_comment'
run: |
gh pr comment ${{ github.event.issue.number }} \
--body "✅ Review task created! An AI agent will claim and complete the code review."
env:
GH_TOKEN: ${{ secrets.CONDUCTOR_GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.CONDUCTOR_GITHUB_TOKEN || github.token }}

- name: Remove needs-review label
if: github.event_name == 'pull_request'
Expand All @@ -184,4 +184,4 @@ jobs:
gh pr edit ${{ needs.check-review-needed.outputs.pr_number }} \
--remove-label "needs-review" || true
env:
GH_TOKEN: ${{ secrets.CONDUCTOR_GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.CONDUCTOR_GITHUB_TOKEN || github.token }}
55 changes: 55 additions & 0 deletions .github/workflows/pr-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: AI Code Review

on:
pull_request:
types: [opened, synchronize, reopened]
pull_request_review_comment:
types: [created, edited]
issue_comment:
types: [created]

permissions:
contents: read
pull-requests: write
issues: write

jobs:
ai-review:
name: AI Code Review
runs-on: ubuntu-latest
# Skip if PR is from a bot or if skip-review label is present
if: |
github.event.pull_request &&
github.event.pull_request.user.type != 'Bot' &&
!contains(github.event.pull_request.labels.*.name, 'skip-review')

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install dependencies
run: |
pip install pyyaml requests

- name: Run AI Code Review
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
# Simple AI review trigger
echo "🔍 AI Code Review triggered for PR #$PR_NUMBER"

# Check if code-reviewer role exists
if [ -f ".conductor/roles/code-reviewer.md" ]; then
echo "✅ Code reviewer role found"
# The actual review would be done by the code-reviewer agent
# This workflow just ensures the infrastructure is in place
else
echo "⚠️ Code reviewer role not configured"
fi
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- 🐛 Glob pattern support for .NET project detection (*.csproj)
- 🔒 Code-reviewer role always included in auto-configuration
- 📋 Demo tasks only created if none exist
- 🔧 **GitHub Token Configuration**: Fixed workflow token issues for user projects
- User projects now correctly use `github.token` instead of `CONDUCTOR_GITHUB_TOKEN`
- Updated conductor-init.sh to not copy workflow files during installation
- setup.py now generates all necessary workflows including PR review workflow
- Prevents "Input required and not supplied: github-token" errors in user projects

## [2.0.0] - 2025-07-23

Expand Down
21 changes: 12 additions & 9 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,18 +291,21 @@ GOOD:

This prevents both external (GitHub issues) and internal (todo list) duplication.

## GitHub Authentication Setup
## GitHub Authentication

Code Conductor requires a GitHub token with appropriate permissions for managing issues, pull requests, and labels.
Code Conductor uses GitHub's built-in authentication for all operations. No manual token setup is required for most users!

### Quick Setup
1. Create a GitHub Personal Access Token with `repo` scope at https://github.com/settings/tokens
2. Add it as `CONDUCTOR_GITHUB_TOKEN` in your repository's Settings → Secrets → Actions
3. The token is automatically passed to all conductor scripts
### Default Setup (Recommended)
The workflows generated by Code Conductor automatically use GitHub Actions' built-in `${{ github.token }}`, which provides:
- ✅ Read/write access to issues, pull requests, and code
- ✅ Ability to create and manage labels
- ✅ No setup required - works out of the box!

### Required Permissions
- **repo** scope (includes all repository permissions)
- Optional: **workflow** scope if modifying GitHub Actions
### Advanced Setup (Optional)
Only create a Personal Access Token if you need:
- Higher API rate limits (5,000/hour instead of 1,000/hour)
- Cross-repository access
- Ability to trigger other workflows

For detailed setup instructions and troubleshooting, see [.conductor/GITHUB_TOKEN_SETUP.md](.conductor/GITHUB_TOKEN_SETUP.md).

Expand Down
Loading