Class: Ocak::Commands::Design

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/ocak/commands/design.rb

Instance Method Summary collapse

Instance Method Details

#call(description: nil) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/ocak/commands/design.rb', line 10

def call(description: nil, **)
  skill_path = File.join(Dir.pwd, '.claude', 'skills', 'design', 'SKILL.md')

  unless File.exist?(skill_path)
    warn 'No design skill found. Run `ocak init` first.'
    exit 1
  end

  puts 'Starting interactive design session...'
  puts 'This will open Claude Code with the /design skill.'
  puts ''

  if description
    exec('claude', '--skill', skill_path, '--', description)
  else
    puts 'Run this inside Claude Code:'
    puts '  /design <description of what you want to build>'
    puts ''
    puts 'Or provide a description directly:'
    puts '  ocak design "add user authentication with OAuth"'
  end
end