diff --git a/pkg/agentic/actions.go b/pkg/agentic/actions.go index 33c09f8..16a9f22 100644 --- a/pkg/agentic/actions.go +++ b/pkg/agentic/actions.go @@ -423,6 +423,17 @@ func (s *PrepSubsystem) handleEpic(ctx context.Context, options core.Options) co return core.Result{Value: out, OK: true} } +// result := c.Command("epic").Run(core.NewOptions( +// +// core.Option{Key: "repo", Value: "go-io"}, +// core.Option{Key: "title", Value: "Stabilise agent dispatch"}, +// core.Option{Key: "tasks", Value: []string{"Fix the queue race", "Add regression tests"}}, +// +// )) +func (s *PrepSubsystem) cmdEpic(options core.Options) core.Result { + return s.handleEpic(s.commandContext(), options) +} + func dispatchInputFromOptions(options core.Options) DispatchInput { return DispatchInput{ Repo: optionStringValue(options, "repo"), diff --git a/pkg/agentic/commands.go b/pkg/agentic/commands.go index 629c987..d83fdce 100644 --- a/pkg/agentic/commands.go +++ b/pkg/agentic/commands.go @@ -53,6 +53,8 @@ func (s *PrepSubsystem) registerCommands(ctx context.Context) { c.Command("brain:forget", core.Command{Description: "Forget a memory in OpenBrain", Action: s.cmdBrainForget}) c.Command("lang/detect", core.Command{Description: "Detect the primary language for a repository or workspace", Action: s.cmdLangDetect}) c.Command("lang/list", core.Command{Description: "List supported language identifiers", Action: s.cmdLangList}) + c.Command("epic", core.Command{Description: "Create sub-issues from an epic plan", Action: s.cmdEpic}) + c.Command("agentic:epic", core.Command{Description: "Create sub-issues from an epic plan", Action: s.cmdEpic}) c.Command("plan-cleanup", core.Command{Description: "Permanently delete archived plans past the retention period", Action: s.cmdPlanCleanup}) c.Command("agentic:plan-cleanup", core.Command{Description: "Permanently delete archived plans past the retention period", Action: s.cmdPlanCleanup}) c.Command("pr-manage", core.Command{Description: "Manage open PRs (merge, close, review)", Action: s.cmdPRManage}) diff --git a/pkg/agentic/commands_test.go b/pkg/agentic/commands_test.go index cfc683a..9026654 100644 --- a/pkg/agentic/commands_test.go +++ b/pkg/agentic/commands_test.go @@ -1409,6 +1409,8 @@ func TestCommands_RegisterCommands_Good_AllRegistered(t *testing.T) { assert.Contains(t, cmds, "extract") assert.Contains(t, cmds, "lang/detect") assert.Contains(t, cmds, "lang/list") + assert.Contains(t, cmds, "epic") + assert.Contains(t, cmds, "agentic:epic") assert.Contains(t, cmds, "plan") assert.Contains(t, cmds, "plan/create") assert.Contains(t, cmds, "plan/list") diff --git a/pkg/agentic/prep_test.go b/pkg/agentic/prep_test.go index 7a39988..5e26c3c 100644 --- a/pkg/agentic/prep_test.go +++ b/pkg/agentic/prep_test.go @@ -692,6 +692,8 @@ func TestPrep_OnStartup_Good_RegistersGenerateCommand(t *testing.T) { assert.Contains(t, c.Commands(), "brain/forget") assert.Contains(t, c.Commands(), "lang/detect") assert.Contains(t, c.Commands(), "lang/list") + assert.Contains(t, c.Commands(), "epic") + assert.Contains(t, c.Commands(), "agentic:epic") assert.Contains(t, c.Commands(), "plan-cleanup") assert.Contains(t, c.Commands(), "plan/from-issue") assert.Contains(t, c.Commands(), "session/end")