Summary
The README documents ddx patterns 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 patterns list # List available patterns
ddx patterns apply < name> # Apply pattern to project
However, running these commands results in:
$ ddx patterns --help
Error: unknown command " patterns" for " ddx"
Documentation vs Implementation Gap
README Claims:
ddx patterns list - List available patterns ❌
ddx patterns apply <name> - Apply pattern 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 prompts command IS implemented (prompts.go, factory functions, registration)
❌ ddx templates command is NOT implemented (tracked in feat: implement missing ddx templates command #22 )
❌ ddx patterns command is NOT implemented (no patterns.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/patterns.go with:
func runPatternsList (cmd * cobra.Command , args []string ) error
func runPatternsShow (cmd * cobra.Command , args []string ) error
Add factory functions in cli/cmd/command_factory_commands.go:
func (f * CommandFactory ) newPatternsListCommand () * cobra.Command
func (f * CommandFactory ) newPatternsShowCommand () * cobra.Command
Register commands in cli/cmd/command_factory.go:
patternsCmd := & cobra.Command {
Use : "patterns" ,
Short : "Manage code patterns" ,
Aliases : []string {"pattern" },
}
patternsCmd .AddCommand (f .newPatternsListCommand ())
patternsCmd .AddCommand (f .newPatternsShowCommand ())
rootCmd .AddCommand (patternsCmd )
User Impact
Current Workaround:
Users must use generic commands:
ddx list (shows all resources mixed together)
ddx apply pattern-name
With Implementation:
Users can use documented, intuitive commands:
ddx patterns list (shows only code patterns)
ddx patterns show <name> (display pattern content)
Use Cases for Patterns
Code patterns are reusable solutions for common programming tasks:
Error handling patterns
Authentication patterns
Database connection patterns
API response patterns
Testing patterns
Logging patterns
Having dedicated commands makes these much more discoverable and usable.
Acceptance Criteria
Related Issues
This is part of a broader documentation-implementation gap:
🤖 Generated with Claude Code
Summary
The README documents
ddx patternscommands that don't exist in the CLI implementation, causing user confusion and broken workflows.Problem
The README clearly documents these commands under "Resource Commands":
However, running these commands results in:
Documentation vs Implementation Gap
README Claims:
ddx patterns list- List available patterns ❌ddx patterns apply <name>- Apply pattern 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 (tracked in feat: implement missing ddx templates command #22)ddx patternscommand is NOT implemented (nopatterns.go, no factory functions)Only the
promptsresource command was actually built -templatesandpatternswere documented but never implemented.Expected Implementation
Following the same pattern as
ddx prompts:Create
cli/cmd/patterns.gowith:Add factory functions in
cli/cmd/command_factory_commands.go:Register commands in
cli/cmd/command_factory.go:User Impact
Current Workaround:
Users must use generic commands:
ddx list(shows all resources mixed together)ddx apply pattern-nameWith Implementation:
Users can use documented, intuitive commands:
ddx patterns list(shows only code patterns)ddx patterns show <name>(display pattern content)Use Cases for Patterns
Code patterns are reusable solutions for common programming tasks:
Having dedicated commands makes these much more discoverable and usable.
Acceptance Criteria
ddx patterns --helpshows help textddx patterns listlists available patterns from library/patterns/ddx patterns list --search <term>filters patternsddx patterns show <name>displays pattern contentddx promptsRelated Issues
This is part of a broader documentation-implementation gap:
ddx templatescommand (feat: implement missing ddx templates command #22)🤖 Generated with Claude Code