Skip to main content

Variable: recipes

const recipes: object

Defined in: src/ai/recipes.ts:39

Consumer-facing recipes introspection API.

Type Declaration​

describe()​

readonly describe: (title) => string | undefined

Returns a human-readable description of a named recipe.

Parameters​

title​

string

Returns​

string | undefined

find()​

readonly find: (query) => RecipeEntry[]

Searches recipes by substring match on title, description, or tags.

Parameters​

query​

string

Returns​

RecipeEntry[]

forAI()​

readonly forAI: () => RecipeEntry[]

Returns all recipes in an AI-agent-friendly format.

Returns​

RecipeEntry[]

forCapability()​

readonly forCapability: (capability) => RecipeEntry[]

Returns recipes associated with a specific capability.

Parameters​

capability​

string

Returns​

RecipeEntry[]

forDomain()​

readonly forDomain: (domain) => RecipeEntry[]

Returns recipes relevant to a specific SAP domain.

Parameters​

domain​

string

Returns​

RecipeEntry[]

forProcess()​

readonly forProcess: (process) => RecipeEntry[]

Returns recipes for a specific business process.

Parameters​

process​

string

Returns​

RecipeEntry[]

getCategories()​

readonly getCategories: () => string[]

Returns unique category names across all registered recipes.

Returns​

string[]

getSteps()​

readonly getSteps: (title) => string | undefined

Returns the code steps for a named recipe, or undefined.

Parameters​

title​

string

Returns​

string | undefined

getTopRecipes()​

readonly getTopRecipes: (n) => RecipeEntry[]

Returns the top n recipes by insertion order.

Parameters​

n​

number

Returns​

RecipeEntry[]

has()​

readonly has: (title) => boolean

Returns true if a recipe with the given title exists.

Parameters​

title​

string

Returns​

boolean

list()​

readonly list: () => RecipeEntry[]

Returns all registered recipe entries.

Returns​

RecipeEntry[]

registry​

registry: RecipeRegistry

The underlying registry instance (for advanced usage like fromEntries()).

readonly search: (query) => RecipeEntry[]

Searches recipes by substring match on title, description, or tags.

Parameters​

query​

string

Returns​

RecipeEntry[]

select()​

readonly select: (filter) => RecipeEntry[]

Returns recipes matching the given filter criteria.

Parameters​

filter​
category?​

string

priority?​

RecipePriority

role?​

RecipeRole

Returns​

RecipeEntry[]

selectByCategory()​

readonly selectByCategory: (category) => RecipeEntry[]

Returns recipes matching the given category.

Parameters​

category​

string

Returns​

RecipeEntry[]

selectByPriority()​

readonly selectByPriority: (priority) => RecipeEntry[]

Returns recipes matching the given priority level.

Parameters​

priority​

RecipePriority

Returns​

RecipeEntry[]

selectByRole()​

readonly selectByRole: (role) => RecipeEntry[]

Returns recipes matching the given role.

Parameters​

role​

RecipeRole

Returns​

RecipeEntry[]

toJSON()​

readonly toJSON: () => readonly RecipeEntry[]

Exports all recipes as a JSON-serializable array.

Returns​

readonly RecipeEntry[]

validate()​

readonly validate: (title) => object

Validates that a recipe title exists and returns basic info.

Parameters​

title​

string

Returns​

object

role?​

readonly optional role: RecipeRole

valid​

readonly valid: boolean

Intent​

Provide drop-in parity with mk's recipes object.

Capability​

Recipe discovery, AI test scaffolding.

Example​

import { recipes } from 'playwright-praman';

const essential = recipes.selectByPriority('essential');
const all = recipes.forAI();