diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-04-04 09:36:56 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-04-04 09:36:56 +0000 |
| commit | 70e90275c0a08649c314cae5280521bcd29272e6 (patch) | |
| tree | 9da0ed0e7e47b070948f6fe968905bf1b000a899 /internal/api/stories.go | |
| parent | 5437d2982c2eb0650ca06fa8c45c59188c983eb8 (diff) | |
feat: acceptance_criteria per story task in elaboration and approval
Add AcceptanceCriteria field to elaboratedStoryTask struct, update
buildStoryElaboratePrompt schema and rules, pass the value through
handleApproveStory into task.Task, and add a test verifying the
field is persisted on approved story tasks.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/api/stories.go')
| -rw-r--r-- | internal/api/stories.go | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/internal/api/stories.go b/internal/api/stories.go index 1743dbe..fa10ccd 100644 --- a/internal/api/stories.go +++ b/internal/api/stories.go @@ -254,19 +254,20 @@ func (s *Server) handleApproveStory(w http.ResponseWriter, r *http.Request) { var prevTaskID string for _, tp := range input.Tasks { t := &task.Task{ - ID: uuid.New().String(), - Name: tp.Name, - Project: input.ProjectID, - RepositoryURL: repoURL, - StoryID: story.ID, - Agent: task.AgentConfig{Type: "claude", Instructions: tp.Instructions}, - Priority: task.PriorityNormal, - Tags: []string{}, - DependsOn: []string{}, - Retry: task.RetryConfig{MaxAttempts: 1, Backoff: "exponential"}, - State: task.StatePending, - CreatedAt: time.Now().UTC(), - UpdatedAt: time.Now().UTC(), + ID: uuid.New().String(), + Name: tp.Name, + Project: input.ProjectID, + RepositoryURL: repoURL, + StoryID: story.ID, + Agent: task.AgentConfig{Type: "claude", Instructions: tp.Instructions}, + AcceptanceCriteria: tp.AcceptanceCriteria, + Priority: task.PriorityNormal, + Tags: []string{}, + DependsOn: []string{}, + Retry: task.RetryConfig{MaxAttempts: 1, Backoff: "exponential"}, + State: task.StatePending, + CreatedAt: time.Now().UTC(), + UpdatedAt: time.Now().UTC(), } if prevTaskID != "" { t.DependsOn = []string{prevTaskID} |
