summaryrefslogtreecommitdiff
path: root/internal/api/elaborate.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-04-04 09:36:56 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-04-04 09:36:56 +0000
commit70e90275c0a08649c314cae5280521bcd29272e6 (patch)
tree9da0ed0e7e47b070948f6fe968905bf1b000a899 /internal/api/elaborate.go
parent5437d2982c2eb0650ca06fa8c45c59188c983eb8 (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/elaborate.go')
-rw-r--r--internal/api/elaborate.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/internal/api/elaborate.go b/internal/api/elaborate.go
index dd51c7d..0cb298d 100644
--- a/internal/api/elaborate.go
+++ b/internal/api/elaborate.go
@@ -282,9 +282,10 @@ type elaboratedStorySubtask struct {
// elaboratedStoryTask is one independently-deployable unit in a story plan.
type elaboratedStoryTask struct {
- Name string `json:"name"`
- Instructions string `json:"instructions"`
- Subtasks []elaboratedStorySubtask `json:"subtasks"`
+ Name string `json:"name"`
+ Instructions string `json:"instructions"`
+ AcceptanceCriteria string `json:"acceptance_criteria"`
+ Subtasks []elaboratedStorySubtask `json:"subtasks"`
}
// elaboratedStoryValidation describes how to verify the story was successful.
@@ -313,6 +314,7 @@ Output ONLY valid JSON matching this schema:
{
"name": "task name",
"instructions": "detailed instructions including file paths and what to change",
+ "acceptance_criteria": "specific, verifiable conditions a separate reviewer can check — e.g. 'run go test ./... and verify all pass; confirm GET /api/foo returns 200 with expected JSON shape'",
"subtasks": [
{ "name": "subtask name", "instructions": "..." }
]
@@ -330,7 +332,8 @@ Rules:
- Subtasks within a task are order-dependent and run sequentially
- Instructions must include specific file paths, function names, and exact changes
- Instructions must end with: git add -A && git commit -m "..." && git push origin <branch>
-- Validation should match the scope: small change = build check; new feature = smoke test`
+- Validation should match the scope: small change = build check; new feature = smoke test
+- acceptance_criteria must be concrete and verifiable by a separate agent — no vague assertions like "code looks good"`
}
func (s *Server) elaborateStoryWithClaude(ctx context.Context, workDir, goal string) (*elaboratedStory, error) {