Generates prompt instructions defining where AI agents write deliverables and session results. Reuse for orchestrating multi-step AI workflows.
// Source: https://github.com/FarzamMohammadi/the-engineer | License: MIT | Copyright 2026 Farzam Mohammadi
// Provided via justclaw.it.com; keep this notice with the code.
import path from "node:path";
/** Options describing where an agent sub-phase records its work. */
export interface ResultContractOptions {
/** Absolute directory holding the deliverable and `session-result.json`. */
readonly directory: string;
/** Deliverable filename written alongside the result (e.g. `requirements.md`). */
readonly deliverable: string;
/** Optional one-line hint describing the `details` payload this step should include. */
readonly detailsHint?: string;
}
/** Build the "Where To Put Your Work" body: the deliverable path and the `session-result.json` contract. */
export function buildRes
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key