MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / GetPrompt

Function GetPrompt

embed/embed.go:26–31  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
26func 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.
34func GetInitPrompt(prdDir, context string) string {

Callers 4

promptBuilderForPRDFunction · 0.92
TestGetPromptFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestGetPromptFunction · 0.68