Skip to content

PRD draft

Requirements, acceptance criteria and unresolved details.

All action kinds · Project workflow

  • Kind: prd_draft
  • Availability: available
  • Registry cost category: one_call
  • Lifecycle stage IDs: prd

The cost category describes model work in the registry; it is not a manufacturing price or a monetary quote. Read maglev actions kinds --json for current availability and schemas.

Returns a draft for review against the project brief and supporting evidence. A completed action does not establish that a physical test, production gate or engineering review has passed.

Send these fields inside the request’s input object. Use only facts you have, and keep unresolved requirements explicit. Optional fields with defaults can be omitted.

Field Type Required Details
useCase string Yes Min length 1. Max length 4000
users string No Max length 2000
mustHave string[] No Max items 60
niceToHave string[] No Max items 60
environment string No Max length 2000
interfaces string[] No Max items 40
Input JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"useCase": {
"type": "string",
"minLength": 1,
"maxLength": 4000
},
"users": {
"type": "string",
"maxLength": 2000
},
"mustHave": {
"maxItems": 60,
"type": "array",
"items": {
"type": "string",
"maxLength": 1000
}
},
"niceToHave": {
"maxItems": 60,
"type": "array",
"items": {
"type": "string",
"maxLength": 1000
}
},
"environment": {
"type": "string",
"maxLength": 2000
},
"interfaces": {
"maxItems": 40,
"type": "array",
"items": {
"type": "string",
"maxLength": 500
}
}
},
"required": [
"useCase"
]
}

Prepare action.json with kind: "prd_draft" and an input object matching the schema above.

Replace PROJECT_ID with your saved project ID. Use a new idempotency key for new work and retain it for an identical retry.

Terminal window
maglev actions request PROJECT_ID --input action.json \
--idempotency-key example-prd-draft-001 --json

Read action.status, action.output, deliveries and any task in the response. Model actions can take several minutes. After a timeout, check saved actions before retrying. See request and recovery behavior.

The schema below describes action.output.result. The saved action.output envelope also contains draft: true and a note. It can be null while an action is running or after a failure; check the status before reading the result. Null or missing facts are unknown; preserve source references and open questions.

Field Type Required Details
requirements object[] Yes
requirements[].id string If parent supplied REQ-001 style
requirements[].area string If parent supplied function, performance, mechanical, electrical, power, interfaces, environment, safety, reliability, manufacturing, test, certification or packaging
requirements[].text string If parent supplied The requirement; a number the request did not give is written as TBD, never guessed
requirements[].acceptance string If parent supplied How it will be verified
requirements[].priority string If parent supplied One of: must, should, could
requirements[].status string If parent supplied One of: defined, tbd
certificationTargets object[] Yes
certificationTargets[].market string If parent supplied
certificationTargets[].mark string If parent supplied
certificationTargets[].basis string If parent supplied The passage that supports naming this target for this product
tbd string[] Yes Requirements and numbers still to be defined, with who defines them
assumptions string[] Yes What was assumed in order to write this draft
openQuestions string[] Yes What only the founder, a factory or a lab can answer
sources string[] Yes Repo paths of the passages actually relied on
Output JSON schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"requirements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "REQ-001 style"
},
"area": {
"type": "string",
"description": "function, performance, mechanical, electrical, power, interfaces, environment, safety, reliability, manufacturing, test, certification or packaging"
},
"text": {
"type": "string",
"description": "The requirement; a number the request did not give is written as TBD, never guessed"
},
"acceptance": {
"type": "string",
"description": "How it will be verified"
},
"priority": {
"type": "string",
"enum": [
"must",
"should",
"could"
]
},
"status": {
"type": "string",
"enum": [
"defined",
"tbd"
]
}
},
"required": [
"id",
"area",
"text",
"acceptance",
"priority",
"status"
],
"additionalProperties": false
}
},
"certificationTargets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"market": {
"type": "string"
},
"mark": {
"type": "string"
},
"basis": {
"type": "string",
"description": "The passage that supports naming this target for this product"
}
},
"required": [
"market",
"mark",
"basis"
],
"additionalProperties": false
}
},
"tbd": {
"type": "array",
"items": {
"type": "string"
},
"description": "Requirements and numbers still to be defined, with who defines them"
},
"assumptions": {
"type": "array",
"items": {
"type": "string"
},
"description": "What was assumed in order to write this draft"
},
"openQuestions": {
"type": "array",
"items": {
"type": "string"
},
"description": "What only the founder, a factory or a lab can answer"
},
"sources": {
"type": "array",
"items": {
"type": "string"
},
"description": "Repo paths of the passages actually relied on"
}
},
"required": [
"requirements",
"certificationTargets",
"tbd",
"assumptions",
"openQuestions",
"sources"
],
"additionalProperties": false
}