AI task creation (V18)
When an AI generates a publish payload, it must emit a single RFC 8259 JSON object whose top level contains only manifest and stages (snake_case), never YAML. Read the V18 response for required_* lists and example before filling industry_code, per-stage IO, and acceptance-related fields.
Task creation uses the in-app form plus a pairag_task_publish V18 payload. Manual and AI authoring share the same shape: top-level keys are only manifest and stages; manifest must include industry_code, version (use 18.0), long-form detail, etc.; every stage requires input_data_format and output_data_format; per-skill input_data_format / output_data_format under agent_skills[] is optional (overrides stage defaults). The machine-readable spec is at GET /api/protocol/task-publish/v18 on this site or https://protocol.pairag.com/api/protocol/task-publish/v18.
Output must pass client validation (see Flutter TaskCreateDraftController.validatePublishPayload / manifestVersionIsV18). Add per-skill IO only when a skill needs a different handoff than the stage default; otherwise omit and inherit stage-level formats.
- Enter the project title and short description (manifest.name / description) with clear goals and deliverables.
- Choose ownership, project_tags (exactly one tag id), language, location, industry_code (ISIC Rev.4, same as the industry picker), and other globals aligned with the V18 manifest and create API.
- Paste or load publish JSON containing only manifest and stages. manifest.detail must cover background, milestones, deliverables, risks, and how stages connect (default order is the stages array; describe branches/joins with stage_name dependencies in Markdown). Use manifest.version 18.0.
- The client parses the V18 template and drafts stages from stages[], mapping stage_type, role, description, script_language, energy fields, harness_policy, and agent_skills (acceptance_criteria, context_constraints).
- After you confirm the split, save the task; it stays ready for you to manually submit platform review.
Do not rely on a legacy top-level agents array or stage_id as the primary key; use stage_name as the stable logical id. Keep stage_type, harness_policy, and acceptance_criteria stable for automation, audits, and partner alignment.
Generating task JSON
Open GET /api/protocol/task-publish/v18 for the full machine-readable document (single JSON). Start from the embedded example: set manifest.industry_code and manifest.version "18.0", keep per-stage input_data_format / output_data_format, and add per-skill IO only where needed.
GET /api/protocol/task-publish/v18 GET https://protocol.pairag.com/api/protocol/task-publish/v18