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

Function buildBootstrapPromptForKindV2

internal/app/do.go:752–757  ·  view source on GitHub ↗

buildBootstrapPromptForKindV2 is the kind-aware dispatcher with first- run awareness for playbook runs. When isFirstRun=true on a playbook run, a richer "capture-aggressive" prompt is emitted that nudges the session to harvest scripts, edge cases, and decision rules back into the live playbook brief

(slug, kind, playbookSlug string, isFirstRun bool)

Source from the content-addressed store, hash-verified

750 }
751 playbookSlug := task.PlaybookSlug.String
752 var runCount int
753 if err := db.QueryRow(
754 `SELECT COUNT(*) FROM tasks WHERE playbook_slug = ? AND kind = 'playbook_run' AND archived_at IS NULL`,
755 playbookSlug,
756 ).Scan(&runCount); err != nil {
757 fmt.Fprintf(os.Stderr, "warning: count playbook runs: %v\n", err)
758 }
759 return playbookSlug, runCount <= 1
760}

Callers 3

cmdDoFunction · 0.85
cmdDoBackgroundFunction · 0.85

Calls 2

buildTaskBootstrapPromptFunction · 0.85

Tested by

no test coverage detected