Skip to content

Implement pre-merge validation command #23

@eberrigan

Description

@eberrigan

Overview

Implement the /pre-merge-check command as defined in the OpenSpec proposal to provide comprehensive validation before merging PRs.

Background

OpenSpec proposal: openspec/changes/add-pre-merge-validation/proposal.md

This command will orchestrate all validation steps (Terraform, YAML, Bash), detect merge conflicts, analyze PR status, and identify unaddressed review comments.

Implementation Tasks

Phase 1: ✅ Repository Preparation (COMPLETED)

  • Remove .claude/ from .gitignore (commit ca6f2fa)
  • Commit .claude/ directory to repository (commit ca6f2fa)

Phase 2: Core Command Implementation (TODO)

  • Create .claude/commands/pre-merge-check.md
  • Implement three execution modes (local, pre-pr, pre-merge)
  • Implement git status validation (conflicts, divergence)
  • Orchestrate existing validation commands
  • Integrate PR analysis via gh CLI
  • Implement OpenSpec validation integration
  • Add clear reporting and verdict logic

Phase 3: Address Current PR #17 Issues (TODO)

  • Resolve merge conflicts with main
  • Fix CRITICAL syntax error in main.tf:299 (missing closing brace)
  • Fix SECURITY issue in user_data.sh:49 (quote variable)
  • Fix BUG in main.tf:256 (empty DOMAIN_NAME for CloudFlare)
  • Address remaining 7 Copilot comments
  • Run new /pre-merge-check command to verify

Phase 4: Documentation and Testing (TODO)

  • Write command usage documentation
  • Add examples for each mode
  • Test with various scenarios
  • Update README.md

Success Criteria

References

  • OpenSpec proposal: openspec/changes/add-pre-merge-validation/proposal.md
  • Spec: openspec/changes/add-pre-merge-validation/specs/development-commands/spec.md
  • Tasks: openspec/changes/add-pre-merge-validation/tasks.md
  • Related: Issue Automate example configuration testing in CI #22 (automate config testing in CI)

Next Steps

  1. Implement /pre-merge-check command following tasks.md
  2. Test with current PR Implement simplified DNS/SSL configuration and add config validation to CI #17
  3. Address all Copilot comments identified by command
  4. Merge PR Implement simplified DNS/SSL configuration and add config validation to CI #17 once command shows "Ready to Merge"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions