GetPrompt returns the agent prompt with the progress path and current story context substituted. The storyContext is the JSON of the current story to work on, inlined directly into the prompt so that the agent does not need to read the entire prd.md file.
(progressPath, storyContext, storyID, storyTitle string)
| 24 | // current story to work on, inlined directly into the prompt so that the |
| 25 | // agent does not need to read the entire prd.md file. |
| 26 | func GetPrompt(progressPath, storyContext, storyID, storyTitle string) string { |
| 27 | result := strings.ReplaceAll(promptTemplate, "{{PROGRESS_PATH}}", progressPath) |
| 28 | result = strings.ReplaceAll(result, "{{STORY_CONTEXT}}", storyContext) |
| 29 | result = strings.ReplaceAll(result, "{{STORY_ID}}", storyID) |
| 30 | return strings.ReplaceAll(result, "{{STORY_TITLE}}", storyTitle) |
| 31 | } |
| 32 | |
| 33 | // GetInitPrompt returns the PRD generator prompt with the PRD directory and optional context substituted. |
| 34 | func GetInitPrompt(prdDir, context string) string { |
no outgoing calls