generatePrompt
generatePrompt(
pattern,windowDays?):string
Defined in: packages/core/src/report/prompt.ts:8
Generates a structured investigation prompt for a flaky test pattern. Designed to be pasted directly into an AI assistant (Claude, Cursor, Copilot).
Parameters
Section titled “Parameters”pattern
Section titled “pattern”failureKinds
Section titled “failureKinds”("unknown" | "assertion" | "timeout" | "uncaught")[]
lastErrorMessage
Section titled “lastErrorMessage”string | null
lastErrorStack
Section titled “lastErrorStack”string | null
lastFailed
Section titled “lastFailed”string
priorFails
Section titled “priorFails”number
recentFails
Section titled “recentFails”number
testFile
Section titled “testFile”string
testName
Section titled “testName”string
windowDays?
Section titled “windowDays?”number = 7
Returns
Section titled “Returns”string