Skip to content

Feature: optional branch bootstrap during /dmx/init #3

Description

@hpieris-dm

Problem

/dmx/init detects integration and production branches from what already exists in the repo (stagingmainmaster). When none of those branches exist locally or on the remote, init sets branch_base: {REQUIRED} and downstream skills cannot proceed until the user manually creates and pushes a branch outside the workflow.

This is a common friction point on new or empty repositories where no default branch has been established yet.

Proposal

Add optional branch bootstrap during init — not silent auto-creation of multiple standard branch names.

Suggested approach:

  1. Detect empty or branch-less repos — no local branch and/or no recognizable integration branch on the remote.
  2. Prompt the user — e.g. "No integration branch found. Create main as the integration branch?" with a sensible default name.
  3. Create only what was agreed — single branch, local checkout, optional initial commit if the repo is completely empty; push only when the user confirms and a remote exists.
  4. Never overwrite — do not create or rename branches when candidates already exist; do not auto-create master, staging, and development as a bundle.

Out of scope

  • Replacing a team's existing branch topology
  • Creating protected branches without explicit user consent
  • Guessing production vs integration roles when both main and master exist (init already asks in that case)

Acceptance criteria

  • Init handles repos with no integration branch without leaving branch_base: {REQUIRED} as the only outcome
  • Branch creation is opt-in and user-confirmed
  • Existing repos with established branches behave exactly as today
  • Config written after bootstrap includes valid branch_base (and production_branch where detectable)

Context

Related skill: dmx-init — branch detection in Step 2 (integration / production role resolution).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions