Class: RubynCode::CLI::Commands::Megaplan
- Defined in:
- lib/rubyn_code/cli/commands/megaplan.rb
Overview
‘/megaplan` REPL command — mirrors the VS Code chat’s chat-resident megaplan entry. Loads the megaplan skill (from the shared skills catalog) into the conversation, flips plan mode ON so the agent is restricted to read-only tools, and kicks off a conversational interview.
The interview itself is chat-style here (multi-turn natural- language Q&A), not the structured question-card UI the VS Code extension uses. Same skill content driving both surfaces.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
Class Method Details
.aliases ⇒ Object
18 |
# File 'lib/rubyn_code/cli/commands/megaplan.rb', line 18 def self.aliases = ['/mega-plan'].freeze |
.command_name ⇒ Object
16 |
# File 'lib/rubyn_code/cli/commands/megaplan.rb', line 16 def self.command_name = '/megaplan' |
.description ⇒ Object
17 |
# File 'lib/rubyn_code/cli/commands/megaplan.rb', line 17 def self.description = 'Plan a feature in phases (interview, then numbered phase docs)' |
Instance Method Details
#execute(args, ctx) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/rubyn_code/cli/commands/megaplan.rb', line 20 def execute(args, ctx) content = ctx.skill_loader.load('megaplan') ctx.conversation.("<skill>#{content}</skill>") ctx.renderer.info('Megaplan mode — interviewer with read-only tools 🧠') ctx.(build_prompt(args.join(' ').strip)) { action: :set_plan_mode, enabled: true } rescue StandardError => e ctx.renderer.error("Megaplan error: #{e.}") nil end |