Skip to content

nebulos/github-automation-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Automation Template

Full TAC-Powered Git Workflow Automation

This template provides complete GitHub-centric automation for planning, bugs, and features using Tactical Agentic Coding principles.


What This Template Does

Automates Your Entire Development Workflow:

  1. GitHub Issue → Plan - Automatically generate detailed implementation plans from issues
  2. Plan → Implementation - Execute plans with automated coding, testing, and validation
  3. Implementation → PR - Create pull requests with comprehensive context
  4. Bug Fixes - Automated bug reproduction, fixing, and testing
  5. Feature Development - Full PITER framework (Plan, Implement, Test, Evaluate, Report)

Quick Start

1. Copy Template to Your Project

# Copy this template to your new project
cp -r github-automation-template my-new-project
cd my-new-project

# Initialize git if needed
git init
git add .
git commit -m "Initial commit with TAC automation"

# Connect to GitHub
gh repo create --source=. --public  # or --private
git push -u origin main

2. Install Dependencies

# Ensure you have:
# - Claude Code installed
# - GitHub CLI (gh) authenticated
# - Python 3.8+ for ADWs

# Verify installations
claude --version
gh auth status
python --version

3. Prime the Agent

claude /prime

This teaches the agent about your project structure and automation capabilities.


GitHub Workflows Available

Issue-Based Workflows

Create Feature from Issue:

# Creates plan from GitHub issue #123
claude /issue-to-plan --issue=123

# Implement the plan
claude /ship --issue=123

Fix Bug from Issue:

# Automated bug fix workflow
claude /fix-bug --issue=456

Manual Workflows

Plan a Feature:

# Generate detailed plan
claude /plan "Add user authentication"

# The plan is saved to specs/ automatically

Ship a Feature:

# Execute existing plan
claude /ship --plan=user-authentication

Create Pull Request:

# Auto-generate PR with context
claude /create-pr

Available Slash Commands

Core Workflows

  • /prime - Understand project and capabilities
  • /plan [feature] - Generate implementation plan
  • /ship [plan] - Implement feature from plan
  • /test - Run full test suite with reporting

GitHub Integration

  • /issue-to-plan --issue=N - Convert GitHub issue to plan
  • /fix-bug --issue=N - Automated bug fix workflow
  • /create-pr - Generate PR with full context
  • /update-docs - Update documentation and README

Quality & Review

  • /review - Comprehensive code review
  • /security-scan - Security vulnerability scan
  • /coverage - Test coverage report
  • /refactor [component] - Intelligent refactoring

ADWs (AI Developer Workflows)

The adws/ directory contains Python scripts that orchestrate complex workflows:

Feature Shipper (adws/feature_shipper.py)

# Usage:
python adws/feature_shipper.py "user-authentication"

# What it does:
# 1. Plans the feature
# 2. Implements it
# 3. Runs tests
# 4. Creates PR if tests pass

Bug Fixer (adws/bug_fixer.py)

# Usage:
python adws/bug_fixer.py --issue=123

# What it does:
# 1. Fetches issue from GitHub
# 2. Reproduces bug
# 3. Implements fix
# 4. Adds regression test
# 5. Creates PR with fix

Daily Maintenance (adws/daily_maintenance.py)

# Run via cron or manually:
python adws/daily_maintenance.py

# What it does:
# 1. Checks for outdated dependencies
# 2. Runs security scans
# 3. Updates documentation if stale
# 4. Creates issues for problems found

Git Hooks

The template includes git hooks in scripts/hooks/ that trigger automation:

Pre-Commit Hook

  • Runs linting
  • Checks for secrets
  • Validates commit message format

Post-Commit Hook

  • Updates documentation if code changed
  • Runs quick smoke tests

Pre-Push Hook

  • Runs full test suite
  • Validates branch is ready to push

Install hooks:

./scripts/install-hooks.sh

Directory Structure

github-automation-template/
├── .claude/
│   ├── commands/              # Slash commands for workflows
│   │   ├── prime.md
│   │   ├── plan.md
│   │   ├── ship.md
│   │   ├── issue-to-plan.md
│   │   ├── fix-bug.md
│   │   ├── create-pr.md
│   │   └── [10+ more commands]
│   └── settings.json
│
├── adws/                      # AI Developer Workflows
│   ├── feature_shipper.py     # Full feature development pipeline
│   ├── bug_fixer.py           # Automated bug fixing
│   ├── plan_generator.py      # Plan creation from requirements
│   ├── pr_creator.py          # Intelligent PR generation
│   └── daily_maintenance.py   # Proactive maintenance
│
├── specs/                     # Implementation plans
│   ├── templates/             # Reusable plan templates
│   │   ├── feature-plan.md
│   │   ├── bug-fix-plan.md
│   │   └── refactor-plan.md
│   └── [your-plans-here].md
│
├── ai_docs/                   # Agent-specific documentation
│   ├── architecture.md        # System architecture guide
│   ├── workflows.md           # How automation works
│   ├── conventions.md         # Coding standards
│   └── troubleshooting.md     # Common issues
│
├── app/                       # YOUR APPLICATION CODE GOES HERE
│   ├── (Replace with your actual application)
│   └── README.md
│
├── scripts/                   # Helper scripts
│   ├── install-hooks.sh       # Install git hooks
│   ├── setup-github.sh        # Configure GitHub integration
│   └── hooks/                 # Git hook implementations
│       ├── pre-commit
│       ├── post-commit
│       └── pre-push
│
├── .github/
│   └── workflows/             # GitHub Actions (optional)
│       └── agentic-ci.yml     # CI/CD with agent integration
│
└── README.md                  # This file

The Automation Philosophy

This template follows TAC principles:

1. Agent-Optimized Structure

  • Clear standard out logging everywhere
  • Type flows are traceable
  • Tests mirror code structure
  • Documentation always current

2. GitHub as Command Center

  • Issues drive planning
  • Labels trigger workflows
  • PRs include full context
  • Automation is transparent

3. Closed-Loop Systems

  • Plans validate against reality
  • Tests provide feedback
  • Self-correction built in
  • Continuous improvement

4. Progressive Autonomy

  • Start with manual slash commands
  • Add ADWs as you trust them
  • Enable git hooks when ready
  • Achieve zero-touch engineering

Usage Patterns

Pattern 1: New Feature from GitHub Issue

# Someone creates issue #42 "Add password reset"

# Step 1: Convert to plan
claude /issue-to-plan --issue=42

# Step 2: Review plan in specs/password-reset.md
# Add your expertise, edge cases, security requirements

# Step 3: Ship it
claude /ship --issue=42

# Step 4: Create PR
claude /create-pr

Pattern 2: Bug Fix Automation

# Bug reported in issue #99

# One command does everything:
python adws/bug_fixer.py --issue=99

# What happens:
# - Fetches issue details
# - Reproduces bug
# - Implements fix
# - Adds regression test
# - Creates PR automatically

Pattern 3: Planned Feature Development

# Step 1: Brain dump your idea
claude /plan "Add user authentication with OAuth"

# Step 2: Agent expands to 200+ line plan
# (saved to specs/user-authentication.md)

# Step 3: Review and refine

# Step 4: Execute
claude /ship --plan=user-authentication

# Step 5: Tests run automatically, PR created if passing

Configuration

GitHub Integration Setup

# Run setup script
./scripts/setup-github.sh

# This configures:
# - Issue label automation
# - PR template with agent context
# - Repository settings for workflows

Claude Settings

Edit .claude/settings.json:

{
  "allowed_tools": [
    "bash",
    "read",
    "write",
    "edit"
  ],
  "github_integration": {
    "enabled": true,
    "auto_pr": false,
    "auto_commit": false
  }
}

Measuring Success

Track these KPIs:

Plan Velocity

  • Goal: Idea → Detailed Plan in <30 minutes

Review Velocity

  • Goal: Review agent work in <15 minutes

Hot Streak

  • Goal: 15+ consecutive successes

Autonomy Level

  • Goal: 80%+ work done without intervention

Safety & Best Practices

Always Review Before Merging:

  • Agent-generated code should be reviewed
  • Tests must pass before merging
  • Security-sensitive changes need manual review

Start Conservative:

  1. Use slash commands manually first
  2. Add ADWs when comfortable
  3. Enable git hooks when confident
  4. Full automation comes last

Understand What Runs:

  • Read each slash command before using
  • Review ADW code before running
  • Test git hooks in safe branch first

Troubleshooting

Issue: Agent can't find project context

# Solution: Run prime again
claude /prime

Issue: GitHub integration not working

# Verify GitHub CLI is authenticated
gh auth status

# Re-authenticate if needed
gh auth login

Issue: Tests failing after agent implementation

# Use fix workflow
claude /fix-tests

# Or manually review test output
claude "Review the test failures and fix them"

Next Steps

Day 1: Setup

  1. Copy template to your project
  2. Run /prime to teach agent about project
  3. Try one manual workflow (/plan something small)

Week 1: Basic Workflows

  1. Use /plan and /ship for 2-3 features
  2. Track your KPIs
  3. Refine plans based on results

Week 2: GitHub Integration

  1. Use /issue-to-plan for real GitHub issues
  2. Practice /create-pr workflow
  3. Install git hooks

Week 3: ADWs

  1. Run feature_shipper.py for complete feature
  2. Try bug_fixer.py on real bugs
  3. Set up daily_maintenance.py to run weekly

Week 4+: Full Automation

  1. Enable git hooks for automatic validation
  2. Schedule ADWs via cron
  3. Achieve 80%+ autonomy level

Learn More


Credits

Based on Tactical Agentic Coding course by IndyDevDan (@indydevdan)

Template Philosophy: "Don't build your codebase—build the agent pipeline that builds your codebase."


Ready to stop coding and start commanding compute? Run /prime and let's begin.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published