Skip to content

[Feature]: Extract feature directory creation into own extension #2889

@coders-kitchen

Description

@coders-kitchen

Problem Statement

In the current workflow the creation of a feature directory is part of the specify command.

There is already the option to use SPECIFY_FEATURE_DIRECTORY to overwrite the default behavior (sequential or timestamp based numbering), but thats cumbersom and errorprone to use. You have to remind yourself and your fellow team members to add this always to the specify command.

Proposed Solution

Extract the feature directory creation like the git branching into an own extension which is shipped (and for now enabled) by default.

By doing so, it would allow user to define their own extension which takes care of directory creation - eg. infer type of work from the description and organize by this (specs/feature/001-some-work).

The specify command would need an enhancement that make the "feature directory" hook mandatory and let the command fail if none is installed (as the default is there and enabled, it shouldn't be an issue).

The output / result of the hook shall always be a JSON containing the feature branch path.

NOT part of the extension shall be the creation of the feature.json that shall remain the responsiblity of specify command. That ensures that the requirements for any custom hook are only to accept the user input and return back the mentioned JSON (or any alternative). I'm happy to discuss if the hooks responsibility shall also be the creation of the feature.json.

In addition a minor modification may be necessary to the check_prerequesites scripts + config file, to allow any structure and name of the feature directory.

Alternatives Considered

  • Using a preset is an option, but has the drawback, that it has to be maintained regularly to ensure any updates on the specify command flow back to the preset.

  • write a custom pre-specify skill that takes care of this and calls the specify command with SPECIFY_FEATURE_DIRECTORY set. Works as well, but would be outside of the normal workflow.

Component

Agent integrations (command files, workflows)

AI Agent (if applicable)

None

Use Cases

  1. When working on company environments, where specific conventions have to be obeyed, it allows a solution without the needs for a preset
  2. When working on different projects with different needs for naming, the custom extensions allow a brain-dead setup as the extensions will take care of the conventions

Acceptance Criteria

  • feature directory creation is externalized into an extension
  • the extension is installed with specify init
  • the extension is enabled by default
  • the extension can be replaced with a custom extension
  • when specify command is executed the activated feature directory extension is used to create the directory

Additional Context

This feature was initially discussed with Codex 5.4.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions