-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Summary
The README documents ddx templates commands that don't exist in the CLI implementation, causing user confusion and broken workflows.
Problem
The README clearly documents these commands under "Resource Commands":
ddx templates list # List available templates
ddx templates apply <name> # Apply template to projectHowever, running these commands results in:
$ ddx templates --help
Error: unknown command "templates" for "ddx"Documentation vs Implementation Gap
README Claims:
ddx templates list- List available templates ❌ddx templates apply <name>- Apply template to project ❌
CLI Actually Has:
ddx list- Lists all resources (templates, patterns, prompts, etc.) ✅ddx apply <name>- Apply any resource ✅
Root Cause Analysis
Looking at the codebase:
- ✅
ddx promptscommand IS implemented (prompts.go, factory functions, registration) - ❌
ddx templatescommand is NOT implemented (notemplates.go, no factory functions) - ❌
ddx patternscommand is NOT implemented (nopatterns.go, no factory functions)
Only the prompts resource command was actually built - templates and patterns were documented but never implemented.
Expected Implementation
Following the same pattern as ddx prompts:
-
Create
cli/cmd/templates.gowith:func runTemplatesList(cmd *cobra.Command, args []string) error func runTemplatesShow(cmd *cobra.Command, args []string) error
-
Add factory functions in
cli/cmd/command_factory_commands.go:func (f *CommandFactory) newTemplatesListCommand() *cobra.Command func (f *CommandFactory) newTemplatesShowCommand() *cobra.Command
-
Register commands in
cli/cmd/command_factory.go:templatesCmd := &cobra.Command{ Use: "templates", Short: "Manage project templates", Aliases: []string{"template"}, } templatesCmd.AddCommand(f.newTemplatesListCommand()) templatesCmd.AddCommand(f.newTemplatesShowCommand()) rootCmd.AddCommand(templatesCmd)
User Impact
Current Workaround:
Users must use generic commands:
ddx list(shows all resources mixed together)ddx apply template-name
With Implementation:
Users can use documented, intuitive commands:
ddx templates list(shows only templates)ddx templates show <name>(display template content)
Acceptance Criteria
-
ddx templates --helpshows help text -
ddx templates listlists available templates from library/templates/ -
ddx templates list --search <term>filters templates -
ddx templates show <name>displays template content - Commands follow same pattern as
ddx prompts - Error handling for missing templates directory
- Proper test coverage
Related Issues
This is part of a broader documentation-implementation gap:
- Missing
ddx patternscommand (separate issue) - README needs to be aligned with actual CLI capabilities
🤖 Generated with Claude Code