Skip to content

feat(factory): add issue-based kickoff #75

@duizendstra

Description

@duizendstra

Summary

This feature request proposes enhancing the contextvibes factory kickoff command to accept a GitHub issue number, from which it will automatically generate a conventional, well-formatted branch name.

Problem Statement

The current kickoff command requires the developer to manually construct a branch name. The typical workflow involves:

  1. Opening the browser to view the GitHub issue.
  2. Copying the issue title.
  3. Manually formatting the title into a kebab-case slug.
  4. Determining the correct prefix (feature/, fix/, etc.).
  5. Assembling the final branch name and passing it to the kickoff command.

This process is manual, tedious, and prone to typos or inconsistencies in branch naming.

Proposed Solution

Enhance the kickoff command with a new flag, --issue.

contextvibes factory kickoff --issue <issue-number>

When this flag is used, the command will perform the following steps:

  1. Use the gh CLI in the background to fetch the specified issue's title and labels (e.g., gh issue view <number> --json title,labels).
  2. Determine Branch Type: Infer the branch prefix from the issue's labels. For example:
    • bug label -> fix/
    • enhancement label -> feature/
    • documentation label -> docs/
    • (Default to feature/ if no matching label is found).
  3. Generate Branch Slug: Sanitize the issue title into a concise, URL-friendly kebab-case slug.
  4. Construct Branch Name: Assemble the final branch name in the format: <type>/<issue-number>-<slug>.
  5. Execute Kickoff: Proceed with the standard kickoff logic using the auto-generated branch name.

Example Usage

Executing the command:

contextvibes factory kickoff --issue 42

...where issue #42 is titled "Add user login endpoint" and has an "enhancement" label, would result in the tool automatically running the equivalent of:

contextvibes factory kickoff --branch "feature/42-add-user-login-endpoint"

Benefits

  • Automation: Drastically speeds up the process of starting a new task.
  • Consistency: Enforces a perfect and consistent branch naming convention across the project.
  • Reduced Errors: Eliminates the possibility of typos in the branch name.
  • Improved Traceability: Automatically links branches back to their originating issue number.

Context

  • CLI Version: dev
  • OS/Arch: linux/amd64
  • Filed by: @duizendstra

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions