v1

latestOpenAPI 3.1.02026-07-13250151.3 KB
intents

Generate the formatted agent prompt for an intent. Assembles spec + workspace strategy + product + constitution rules + linked evidence and returns both a markdown/string prompt and a structured JSON payload.

json is an opaque object whose exact shape is produced by generateAgentPrompt (varies by agent_type/format) — fields above are illustrative. The 422 body is { error, readiness: { isSubstantive, isReadyForExecution, score, blockers[], warnings[] }, suggestion }. implementation_context is stripped from the export unless the workspace flag implementation_context_enabled is on. Constitution rules are prefixed [BLOCKING]/[advisory] by enforcement level. Date fields (createdAt/updatedAt/shippedAt/verifiedAt) are converted to epoch ms internally before prompt generation.

get/api/v1/intents/{id}/prompt

Path parameters

idstring required

id path parameter.

Query parameters

agent_typestring

Target agent: cursor|windsurf|claude-code|codex|generic. Default 'claude-code'.

modestring

draft|execute. Default 'execute'. In 'execute' mode the intent must pass readiness (meaningful title + objective + >=1 outcome) or 422.

formatstring

json|markdown. Default 'markdown'. Shapes the prompt string.

workspace_idstring

Required only when authenticating via session cookie (ignored for API-key auth).

Response

Returns { prompt, json }

object required