Headless Recipe integration
Use a headless recipe when commands, API responses, logs, or files can prove the behavior without a UI.
Install
yarn add -D @farmslot/recipe-harness @farmslot/protocol
Keep the project surface small:
scripts/agentic/recipe/action-manifest.json
scripts/agentic/recipe/recipes/smoke.recipe.json
scripts/agentic/validate-recipe.sh
Integrate
- Declare only the official actions the project can execute.
- Register the matching standard core adapters.
- Add namespaced project adapters only for durable project capabilities.
- Add one real smoke recipe.
- Expose a runner hook that accepts the recipe and artifact directory.
Minimal runner construction:
import { getRecipeActionManifestActionNames } from '@farmslot/protocol';
import { createRecipeRunner, createStandardCoreAdapters } from '@farmslot/recipe-harness';
const runner = createRecipeRunner({
actionManifest,
adapters: createStandardCoreAdapters({
actions: getRecipeActionManifestActionNames(actionManifest),
}),
});
Use the canonical recipe skeleton in Write a recipe. Exact action schemas come from the active runner manifest, not this guide.
Verify
farmslot-recipe run --list --adapter core
farmslot-recipe run smoke --describe --adapter core
farmslot-recipe run smoke --adapter core --artifacts-dir artifacts/recipe-run
Verify the human outcome plus recipe-resolution.json, summary.json, trace.json, and artifact-manifest.json.
Add a project action only when it is atomic, reusable, and materially cheaper than composing existing capabilities. Ticket-specific assertions belong in recipes.
See Recipe Runner Protocol for trust and artifact guarantees.