summaryrefslogtreecommitdiff
path: root/internal/agentchannel/agentchannel.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/agentchannel/agentchannel.go')
-rw-r--r--internal/agentchannel/agentchannel.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/agentchannel/agentchannel.go b/internal/agentchannel/agentchannel.go
index 42eacbc..83c5f8d 100644
--- a/internal/agentchannel/agentchannel.go
+++ b/internal/agentchannel/agentchannel.go
@@ -44,6 +44,20 @@ type SubtaskSpec struct {
Role string
}
+// EpicProposal describes an epic a discovery/planner-role agent wants to
+// group one or more stories under (internal/story.Epic/Story — the planning
+// layer above the flat task tree). Matching an existing epic is by exact
+// Name (see storeChannel.ProposeEpic in internal/executor/channel.go) — the
+// simplest reasonable de-dup, not fuzzy matching.
+type EpicProposal struct {
+ Name string
+ Description string
+ // StoryIDs are the story IDs to group under this epic. An ID that
+ // doesn't resolve to an existing story is skipped rather than failing
+ // the whole call — one bad ID shouldn't block grouping the rest.
+ StoryIDs []string
+}
+
// AgentChannel is how a Runner reports agent-originated signals to the rest of
// the system. Implementations translate these into stored artifacts and events.
// The transport by which a Runner detects these signals — post-exit files
@@ -59,6 +73,13 @@ type AgentChannel interface {
SpawnSubtask(ctx context.Context, spec SubtaskSpec) (taskID string, err error)
// RecordProgress records a free-form progress note from the agent.
RecordProgress(ctx context.Context, message string) error
+ // ProposeEpic groups spec.StoryIDs under a new or existing epic (matched
+ // by name), returning the epic's ID. Called by a discovery/planner-role
+ // agent that has independently judged a set of stories to form a
+ // cohesive initiative — the judgment itself is the calling agent's job
+ // (via its instructions/model); this just gives it a mechanism to act on
+ // it.
+ ProposeEpic(ctx context.Context, spec EpicProposal) (epicID string, err error)
}
// BlockedError is returned by Run when the agent asked the user a question and