Skip to content

feat: add release automation to Bootstrap command#208

Closed
jeremyeder wants to merge 1 commit intomainfrom
feature/bootstrap-release-automation
Closed

feat: add release automation to Bootstrap command#208
jeremyeder wants to merge 1 commit intomainfrom
feature/bootstrap-release-automation

Conversation

@jeremyeder
Copy link
Copy Markdown
Contributor

Summary

Implements #157 - Adds release automation capabilities to the Bootstrap command with:

  • Semantic release workflows with conventional commits
  • PyPI publishing with OIDC (test + production)
  • Version synchronization across project files
  • Template drift detection to ensure templates stay in sync with AgentReady's infrastructure

Implementation Details

CLI Enhancements

  • Added --enable-release flag to enable automated release workflow
  • Added --enable-publishing flag to enable PyPI publishing
  • Added --enable-all flag to enable all advanced features
  • Added drift-check command for template validation against AgentReady's actual files

Bootstrap Templates (Python Only - MVP)

Three new Jinja2 templates created based on AgentReady's own infrastructure:

  • release.yml.j2: Semantic release workflow with conditional publishing blocks
  • releaserc.json.j2: Semantic-release configuration with conditional assets
  • sync-version.sh.j2: Version sync script for pyproject.toml and CLAUDE.md (if present)

Templates use context variables:

  • enable_publishing: Controls PyPI publishing steps
  • has_claude_md: Controls CLAUDE.md version sync
  • project_name: For project-specific paths

Services

BootstrapGenerator enhancements (src/agentready/services/bootstrap.py):

  • New constructor parameters: enable_release, enable_publishing
  • New methods: _generate_release_workflow(), _generate_release_config(), _generate_version_sync_scripts()
  • Helper method: _detect_project_name() extracts name from pyproject.toml

DriftDetector service (src/agentready/services/drift_detector.py):

  • Compares generated Bootstrap templates with AgentReady's actual infrastructure files
  • Reports drift with detailed diffs (--verbose flag)
  • Structural drift detection for files that will never match exactly
  • Exits with error code 1 if drift detected (for CI integration)

Drift Prevention

The new drift-check command validates that Bootstrap templates stay synchronized with AgentReady's actual infrastructure:

# Quick check
agentready drift-check

# Detailed analysis with diffs
agentready drift-check --verbose

This ensures templates don't diverge from the actual files they're based on.

Usage Examples

# Basic release automation (semantic versioning, changelog, GitHub releases)
agentready bootstrap . --enable-release

# Full automation (release + PyPI publishing)
agentready bootstrap . --enable-all

# Dry run to preview
agentready bootstrap . --enable-all --dry-run

Test Plan

  • Linters pass (black, isort, ruff)
  • Pre-commit hooks pass
  • Bootstrap command runs without errors
  • drift-check command works and detects drift
  • Templates render correctly with context variables
  • CLI help displays new options
  • E2E test: Generate release automation in test repository
  • Verify semantic-release workflow runs correctly

Migration Notes

No breaking changes - this is opt-in functionality via new CLI flags.

Existing usage remains unchanged:

agentready bootstrap .  # Still works exactly as before

Future Work

Per issue #157, this MVP includes:

  • ✅ Python templates only
  • ✅ Release workflow
  • ✅ Semantic-release config
  • ✅ Version sync scripts
  • ✅ Drift detection

Future phases will add:

  • JavaScript/TypeScript templates
  • Go templates
  • Docker container support
  • Documentation deployment workflows
  • Interactive mode with prompts

Related Issues

Closes #157

🤖 Generated with Claude Code

Implements issue #157 with support for:
- Semantic release workflows with conventional commits
- PyPI publishing with OIDC (test + production)
- Version synchronization across project files
- Template drift detection to ensure templates stay in sync

## Changes

### CLI Enhancements
- Add --enable-release flag to bootstrap command
- Add --enable-publishing flag for PyPI publishing
- Add --enable-all flag for full automation
- Add drift-check command for template validation

### Bootstrap Templates (Python)
- release.yml.j2: Semantic release workflow with conditional publishing
- releaserc.json.j2: Semantic-release configuration
- sync-version.sh.j2: Version sync script for pyproject.toml and CLAUDE.md

### Services
- BootstrapGenerator: Enhanced with release automation methods
- DriftDetector: Validates templates against AgentReady's actual files

### Drift Prevention
The drift-check command compares generated Bootstrap templates with
AgentReady's actual infrastructure to ensure templates stay synchronized.

Usage:
  agentready bootstrap . --enable-all
  agentready drift-check --verbose

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@jeremyeder
Copy link
Copy Markdown
Contributor Author

Closing as stale. This PR is 4 days old with failing tests from deprecated workflows. The feature can be revisited in Issue #157 if still needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: update Bootstrap to include release automation and advanced GitHub Actions

1 participant