Skip to content

[SUGGESTION] to have git branch before apply spec #279

Closed as not planned
Closed as not planned

Description

@AngDrew

make git branch before implement the request. foe example, git branch openspec/<changes-name>. checkout existing branch instead if it exists.

that prompt at the bottom of openspec-apply.md can help to use git branch before implementing.. this is the safest way to implement the spec without manually setting the git

Activity

  1. coderabbitai commented on Nov 5, 2025

    @coderabbitai
    Contributor

    A summary of the changes CodeRabbit can apply:

    • Add git branch creation/checkout as the first apply step by modifying src/core/templates/slash-command-templates.ts to detect and checkout existing branch openspec/ or create and checkout openspec/ if missing, ensuring all OpenSpec changes are made on a dedicated feature branch.

    • Update src/core/templates/slash-command-templates.ts to replace the original generic "applySteps" checklist with a step-by-step Git workflow (check for or create/checkout openspec/ branch, isolate work, then read proposal/design/tasks, complete tasks sequentially, confirm completion, and update the checklist) and renumber steps so branch handling is primary while preserving the references section.

    • ✅ Create PR with these edits
    • 📋 Get copyable edits
  2. clay-good commented on Jul 27, 2026

    @clay-good
    Collaborator

    Closing as a duplicate of #332 — both request automatic git branch creation/checkout as part of the workflow (this one at apply time, #332 at proposal time; same feature, one design). #332 is the thread with maintainer engagement — TabishB: "We're experimenting with reworking a lot of the core internals... This will come alongside that soon" — and it has absorbed the when-to-branch discussion, so consolidating there. There's also an open community PR in this space (#939, --branch flag on new-change). Please add the apply-time perspective to #332 if it matters for your workflow.

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

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