Skip to content

Add seed-existing-repo.sh to retrofit CMD into an existing repository #2

Description

@quackerjeff

Summary

Add a companion bootstrap script for applying CMD scaffolding to an already-created repository.

Problem

scripts/seed-repo.sh is optimized for creating a new repository from scratch. Many real teams will already have service repositories and need a safe way to add the CMD workflow to those repos without recreating them.

Proposed enhancement

Add scripts/seed-existing-repo.sh that:

  • targets an existing repository directory
  • validates that the target is already a git repository or offers a clear mode for handling a non-git directory
  • applies a selected repo profile such as ui, api, worker, data, fullstack, or platform
  • copies the shared CMD assets listed in the manifests
  • creates local bootstrap files when missing
  • avoids overwriting existing files without explicit confirmation or flags
  • reports which files were created, skipped, or would conflict

Expected benefit

  • easier adoption in brownfield repos
  • safer rollout of CMD across multi-repo systems
  • less manual copying and lower risk of inconsistent repo setup
  • better path for gradually standardizing existing service repos

Acceptance criteria

  • seed-existing-repo.sh supports the same repo types as seed-repo.sh
  • the script detects and reports file conflicts clearly
  • the script does not overwrite existing files by default
  • bootstrap docs explain when to use seed-repo.sh vs seed-existing-repo.sh
  • the resulting repo includes the same local bootstrap structure expected by CMD

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions