MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestBuildBootstrapPromptInvokesSkill

Function TestBuildBootstrapPromptInvokesSkill

internal/app/hook_test.go:199–213  ·  view source on GitHub ↗

TestBuildBootstrapPromptInvokesSkill pins the same invariant for the fresh-spawn prompt used by `flow do` (the hook only covers resume).

(t *testing.T)

Source from the content-addressed store, hash-verified

197// TestBuildBootstrapPromptInvokesSkill pins the same invariant for the
198// fresh-spawn prompt used by `flow do` (the hook only covers resume).
199func TestBuildBootstrapPromptInvokesSkill(t *testing.T) {
200 prompt := buildBootstrapPrompt("task-x")
201 if !strings.Contains(prompt, "flow skill") && !strings.Contains(prompt, "`flow` skill") {
202 t.Errorf("bootstrap prompt must name the flow skill:\n%s", prompt)
203 }
204 if !strings.Contains(prompt, "Skill tool") {
205 t.Errorf("bootstrap prompt must instruct Skill tool invocation:\n%s", prompt)
206 }
207 if strings.Contains(prompt, "register-session") {
208 t.Errorf("bootstrap prompt should not mention register-session (pre-allocated by flow do):\n%s", prompt)
209 }
210 if !strings.Contains(prompt, "task-x") {
211 t.Errorf("bootstrap prompt must mention the task slug")
212 }
213}

Callers

nothing calls this directly

Calls 1

buildBootstrapPromptFunction · 0.85

Tested by

no test coverage detected