summaryrefslogtreecommitdiff
path: root/internal/api/elaborate.go
diff options
context:
space:
mode:
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) {