创建任务

创建任务采用「应用内表单 + pairag_task_publish V18 任务发布 JSON」。请在 Pairag 移动端、桌面客户端或 Web 应用 中进入创建流程;手动或者与AI协作创建同一载荷形态:顶层仅 `manifest` 与 `stages`;每环节须含环节级 `input_data_format` / `output_data_format`。各字段含义、必填/可选与示例形态见本页底部「任务发布 JSON 字段说明」;机器可读规范见公开协议 JSON。

手动创建

在 **App 或 Web** 中点击「创建任务」,按表单逐项填写基础信息与配置后,粘贴符合 V18 的 `manifest` + `stages` JSON。系统按 `stages` 数组顺序生成环节草稿;`stage_name`、`stage_type`、环节级 IO、`harness_policy` 与 `agent_skills` 须与协议示例字段形态一致。**逐项释义与填写要点以本页底部字段说明为准。**

AI 创建

也可在外部模型中使用:先描述工作流,再将下方 英文字段说明V18 协议 JSON 一并提供给模型,要求其只输出顶层含 `manifest` 与 `stages` 的单一 RFC 8259 JSON(snake_case)。

下方区域**默认折叠**;点击标题栏可展开查看两份参考全文。标题栏**右侧按钮**会一次性复制「英文说明 + 协议 JSON」(含文件分隔标记),便于整段粘贴到模型上下文。

参考全文:V18 英文字段说明(.md)+ pairag-task-publish-v18.json

pairag-task-publish-v18-field-reference-en.md

# pairag_task_publish V18 — Task publish JSON field reference (English · machine-readable)

## Purpose of this document

- **Audience**: Models, scripts, or services that auto-generate task-publish JSON (without access to the private Pairag codebase).
- **Usage**: Use this document **together with** the **public protocol file** `pairag-task-publish-v18.json` (fields such as `required_*`, `stage_type_enum`, `script_language_enum`, `data_format_type_enum`, etc.) as the source of truth; from the user's natural-language requirements, output the **single top-level shape**: `{ "manifest": { ... }, "stages": [ ... ] }`, with keys in **snake_case** and **RFC 8259 JSON**.
- **Copy language**: Whatever natural language the user uses to describe the task, **all human-facing string values** in the generated JSON (e.g. `name`, `description`, `detail`, `role`, acceptance criteria, format notes, natural-language parts of `harness_policy`, etc.) must use **that same language**; **do not change** protocol-defined keys, integer enums, the BCP 47 value in `language`, numeric `project_tags`, or any other fields tied to structure / codebooks.
- **Do not use**: The deprecated top-level `agents` array.

---

## Top-level object

| Field | JSON type | Description |
|------|-----------|-------------|
| `manifest` | `object` | Task metadata; key set must satisfy the protocol's `required_manifest_fields` (and conditional requirements). |
| `stages` | `array` | List of stage objects; **default execution order = array order**. Non-linear dependencies must be described in `manifest.detail` using Markdown, relating `stage_name` values. |

---

## `manifest` fields

| Field | JSON type | Meaning and format |
|------|-----------|-------------------|
| `name` | `string` | Task / project display title. |
| `description` | `string` | Short description for lists and summaries. |
| `detail` | `string` | Long form: background, milestones, deliverables, risks, collaboration rules; **must** explain how stages connect (defaults to `stages` order; forks/joins must name `stage_name` clearly). Markdown allowed. |
| `version` | `string` | Must be **`"18.0"`** (aligned with protocol `version` and V18 validation). |
| `industry_code` | `string` | **ISIC Rev.4** industry code (any level: section through class); alphanumeric, e.g. `J62`, `A`. |
| `ownership` | `integer` | **Outcome ownership**, only **`1` \| `2` \| `3`**: `1` rights to requester after completion; `2` shared attribution / usage; `3` open-contribution style release. |
| `project_tags` | `array` | See **§ `project_tags` (closed enum)**; **exactly one element**, each an **integer**. |
| `language` | `string` | See **§ `language` (BCP 47 and codebook)**; must be one of the **supported** tags (or an **equivalent alias** listed there). |
| `location` | `string` | **Non-empty**. Geographic / regional granularity: may be a platform location id (e.g. `Asia-East-HongKong`) or a human-readable place (e.g. `Shanghai, China`); must match product policy for locations. **Runtime constraint**: allowed granularity depends on the task creator's membership tier — see **§ Membership tier constraints (runtime, per task creator)**. |
| `token_cost_bearer_type` | `integer` | **Always `2`** — each participant self-pays their own compute / token cost. Do not write `1` or `3`. |
| `communication_software_name` | `string` | Day-to-day collaboration tool name (e.g. `Telegram`). |
| `communication_software_group` | `string` | Group / channel id aligned with `global_config.message_bus`. |
| `video_conference_software_name` | `string` | Video meeting tool name (e.g. `Zoom`). |
| `video_conference_connection` | `string` | **Optional**. Meeting link or room instructions. |
| `global_config` | `object` | Must include at least `message_bus` (see protocol `required_global_config_fields`). |

---

## `project_tags` (closed enum)

**JSON type**: `array` of `integer`

**Product constraints (aligned with public protocol `notes`)**:

- `project_tags` **must** be present.
- Array length **must be exactly 1**.
- The sole element is a **positive integer** and must be one of the **`id`** values in the table below (current platform seed **1–10**).

| `id` (written in JSON) | Stored name `name` (machine-readable; UI may localize further) |
|------------------------|------------------------------------------------------------------|
| 1 | Office productivity |
| 2 | Creative expression |
| 3 | Learning & growth |
| 4 | Smart home |
| 5 | Fitness & health |
| 6 | Life & general knowledge |
| 7 | Emotion & entertainment |
| 8 | Automation assistant |
| 9 | Programming & hardware |
| 10 | Business consulting |

**Example**: `"project_tags": [3]` means a "Learning & growth" task.

---

## `language` (BCP 47 and codebook)

**JSON type**: `string`

**Semantics**: Human language for communication and deliverables; follows **IETF BCP 47** tag conventions. The platform maps **codebook ids 1–21** to manifest strings internally; when emitting JSON, use a **recommended tag** from the table below or a string from **§ Aliases** so API / storage stay consistent.

### Recommended tags (prefer the `bcp47` column for `language`)

| Codebook `id` | Recommended `language` in manifest (`bcp47`) | `iso639_1` | English name `name_en` |
|---------------|---------------------------------------------|------------|------------------------|
| 1 | `en` | en | English |
| 2 | `zh-CN` | zh | Chinese (Simplified) |
| 3 | `zh-TW` | zh | Chinese (Traditional) |
| 4 | `hi` | hi | Hindi |
| 5 | `es` | es | Spanish |
| 6 | `fr` | fr | French |
| 7 | `ar` | ar | Arabic |
| 8 | `pt-BR` | pt | Portuguese (Brazil) |
| 9 | `bn` | bn | Bengali |
| 10 | `ru` | ru | Russian |
| 11 | `ur` | ur | Urdu |
| 12 | `id` | id | Indonesian |
| 13 | `de` | de | German |
| 14 | `ja` | ja | Japanese |
| 15 | `te` | te | Telugu |
| 16 | `mr` | mr | Marathi |
| 17 | `tr` | tr | Turkish |
| 18 | `ta` | ta | Tamil |
| 19 | `ko` | ko | Korean |
| 20 | `pa` | pa | Punjabi |
| 21 | `vi` | vi | Vietnamese |

### Equivalent aliases (generators may normalize; all map to the same `id` as above)

| Tags users or upstream may supply | Normalize to (preferred output) |
|------------------------------------|-----------------------------------|
| `en-US`, `en-GB` | `en` |
| `zh` | `zh-CN` |
| `zh-HK` | `zh-TW` |
| `es-ES`, `es-MX` | `es` |
| `pt` | `pt-BR` |

**Unknown or unparseable tags**: If the protocol / implementation has not been extended, runtimes may fall back to **`en` (id 1)**; generators should **prefer** an exact match from the table above.

---

## `manifest.global_config`

| Field | JSON type | Description |
|------|-----------|-------------|
| `message_bus` | `string` | **Required**. Usually the same as `communication_software_group`. |
| `harness_level` | `string` | Optional, e.g. `STRICT`. |
| `storage_provider` | `string` | Optional, e.g. `platform_default`, `Cloudflare_R2` (environment-specific). |

---

## `stages[]` stage object

| Field | JSON type | Description |
|------|-----------|-------------|
| `stage_name` | `string` | Logical stage id; unique within the task; do not use deprecated fields as the primary key. |
| `stage_type` | `integer` | See public protocol `stage_type_enum` and the table below; **new tasks use 1–5, 100–108, or 1000**. |
| `role` | `string` | Human-readable role title. |
| `description` | `string` | Stage goals and I/O description. |
| `script_language` | `integer` | **1–17**, see protocol `script_language_enum`. |
| `participant_energy` | `integer` | Participation threshold in **platform points (积分)** (non-negative integer). The **wire/API field name** stays `participant_energy` for historical compatibility. See **§ Platform points (积分) vs Real money (真金)**. |
| `bounty_energy` | `integer` | Stage **bounty points (积分)** (non-negative integer). The **wire/API field name** stays `bounty_energy` for historical compatibility. See **§ Platform points (积分) vs Real money (真金)**. |
| `initiator_extra_reward` | `boolean` | Whether the requester may add extra rewards. |
| `input_data_format` | `object` | See § `data_format`. |
| `output_data_format` | `object` | See § `data_format`; **required per stage**. |
| `harness_policy` | `object` | See § `harness_policy`. |
| `agent_skills` | `array` | At least one item; each item per § `agent_skills[]`. |
| `fiat_enabled` | `boolean` | **Optional**. Set `true` to activate real-money (fiat / 真金) payment for this stage. See **§ Platform points (积分) vs Real money (真金)**. |
| `fiat_list_amount_usd` | `integer` | **Optional**. Listed payment in whole USD. Required when `fiat_enabled: true`. See **§ Platform points (积分) vs Real money (真金)**. |
| `type_criteria` | `object` | **Optional**. Stage-type-specific machine-checkable acceptance conditions. See **§ `type_criteria`**. |

### `stage_type` quick map (integer → protocol key)

| Value | Protocol key |
|-------|--------------|
| 1 | `orchestrator` |
| 2 | `software` |
| 3 | `hardware` |
| 4 | `data` |
| 5 | `devops` |
| 100 | `workflow_designer` |
| 101 | `context_optimizer` |
| 102 | `mcp_provisioner` |
| 103 | `gui_operator` |
| 104 | `prompt_architect` |
| 105 | `memory_retriever` |
| 106 | `compliance_guardrail` |
| 107 | `multimodal_parser` |
| 108 | `model_router` |
| 1000 | `custom` |

(Full English descriptions are in the protocol's `stage_type_enum_descriptions`.)

### How to choose `stage_type` based on user requirements

| User needs… | Use `stage_type` |
|-------------|-----------------|
| Task decomposition, planning, coordination across stages | `1` orchestrator |
| Application / service code, APIs, software builds | `2` software |
| Hardware design, firmware, BOM, physical integration | `3` hardware |
| Data ingestion, labeling, ETL, analytics | `4` data |
| CI/CD, deployment, infra, observability | `5` devops |
| Workflow / state-machine design | `100` workflow_designer |
| Context window compression and management | `101` context_optimizer |
| MCP tool discovery and governance | `102` mcp_provisioner |
| GUI / browser automation | `103` gui_operator |
| Prompt design and versioning | `104` prompt_architect |
| Long-term memory retrieval (RAG) | `105` memory_retriever |
| Policy enforcement, compliance, guardrails | `106` compliance_guardrail |
| Multimodal input parsing and normalization | `107` multimodal_parser |
| Model / vendor routing (cost, latency) | `108` model_router |
| Anything not covered above | `1000` custom |

Common pipeline patterns: `[orchestrator] → [executor]` (add `106` or extra executors when independent audit is needed); add intermediate stages as needed based on the user's specific work types.

### `script_language` integer map (matches protocol `script_language_enum`)

| Value | Protocol key (illustrative) |
|-------|-----------------------------|
| 1 | `any` |
| 2 | `python` |
| 3 | `golang` |
| 4 | `typescript_nodejs` |
| 5 | `rust` |
| 6 | `java` |
| 7 | `kotlin` |
| 8 | `csharp` |
| 9 | `swift` |
| 10 | `cpp` |
| 11 | `shell` |
| 12 | `ruby` |
| 13 | `php` |
| 14 | `scala` |
| 15 | `sql` |
| 16 | `dart` |
| 17 | `lua` |

---

## `data_format` object

| Field | JSON type | Description |
|------|-----------|-------------|
| `type` | `integer` | **Required**. **1** = JSON, **2** = YAML, **3** = Markdown, **4** = other (explain in `schema`). |
| `schema` | `string` | Optional; examples, summary, JSON Schema text, or mixed instructions. |

---

## `harness_policy`

| Field | JSON type | Description |
|------|-----------|-------------|
| `forbidden_actions` | `array` of `string` | List of forbidden action codes. |
| `operating_boundary` | `string` | Natural-language scope and responsibility boundary. |

---

## `agent_skills[]`

| Field | JSON type | Description |
|------|-----------|-------------|
| `skill_name` | `string` | Optional; may be omitted or `""`. |
| `acceptance_criteria` | `array` of `string` | **Required**; verifiable criteria. |
| `input_data_format` | `object` | Optional; only if different from the stage default input format. |
| `output_data_format` | `object` | Optional; only if different from the stage default output format. |
| `context_constraints` | `object` | **Required**; must include `input_limit` and `output_limit`. |

---

## `context_constraints`

| Field | JSON type | Description |
|------|-----------|-------------|
| `input_limit` | `object` | Common keys: `max_tokens` (`integer`), `compaction` (`string`), `memory_depth` (`integer`). |
| `output_limit` | `object` | Common keys: `max_tokens` (`integer`), `on_exceed` (`string`, e.g. `TRUNCATE_AND_ERROR`). |

**Suggested defaults for generators** (when the user does not specify a token policy, may match common client drafts):

- `input_limit.max_tokens`: **8000**
- `input_limit.compaction`: **`"STRICT"`**
- `input_limit.memory_depth`: **3**
- `output_limit.max_tokens`: **2048**
- `output_limit.on_exceed`: **`"TRUNCATE_AND_ERROR"`**

If the user or template specifies stricter or looser budgets, follow the user.

---

## Platform points (积分) vs Real money (真金 / fiat)

These are two completely separate payment systems. Do **not** mix them.

### Platform points (积分) — `participant_energy` and `bounty_energy`

Present in every stage. These are **platform points (积分)** — internal ledger units, **not real money**. In JSON payloads and APIs the fields remain named `participant_energy` and `bounty_energy` (`*_energy`) for historical / stability reasons; treat the numeric values as **积分** when explaining tasks to end users.

- `participant_energy`: **Entry holding requirement.** A participant must hold **at least** `participant_energy` platform points (积分) in their available balance to be eligible to participate in this stage. This is a *holding requirement* (a balance gate), not an entry fee. Generators must phrase it to end users as「需持有 ≥ N 积分才能参与」/「must hold ≥ N points to participate」. **Do NOT** describe this field as「免费加入 / free to join」, and **do NOT** describe it as「加入时扣 N / charged N on join」 — do not speculate about whether or when points are debited. Treat the holding requirement as the only user-facing meaning.
- `bounty_energy`: **bounty points (积分)** rewarded to the participant on stage completion.

### Real money (真金 / fiat) — `fiat_enabled` and `fiat_list_amount_usd`

Optional stage-level fields for Stripe-based USD payment.

| Field | JSON type | Description |
|-------|-----------|-------------|
| `fiat_enabled` | `boolean` | Set `true` to activate real-money payment for this stage. |
| `fiat_list_amount_usd` | `integer` | Listed amount in whole USD. Required when `fiat_enabled: true`. |

**Rule**: When a stage uses fiat, set `participant_energy` and `bounty_energy` to `0` (no platform points / 积分 for that stage). Only add `fiat_enabled: true` when the user explicitly requests real-money / USD payment. Otherwise use **platform points (积分)** via `participant_energy` / `bounty_energy`.

---

## `type_criteria`

An **optional** object added to a stage alongside `harness_policy`. Its keys depend on `stage_type` and provide machine-checkable, type-specific acceptance conditions that supplement the free-text `acceptance_criteria` array. Include only the keys that apply.

### type 1 — orchestrator

| Key | JSON type | Meaning |
|-----|-----------|---------|
| `subtask_coverage_pct` | `integer` 0–100 | Required decomposition completeness percentage. |
| `dependency_graph_required` | `boolean` | Must produce an explicit DAG. |
| `dispatch_protocol` | `string` | `"sequential"` \| `"parallel"` \| `"conditional"` |

### type 2 — software

| Key | JSON type | Meaning |
|-----|-----------|---------|
| `test_coverage_pct` | `integer` 0–100 | Minimum code coverage. |
| `ci_required` | `boolean` | Must pass CI pipeline. |
| `lint_clean` | `boolean` | Zero linting errors required. |
| `build_target` | `string` | `"production"` \| `"staging"` |

### type 3 — hardware

| Key | JSON type | Meaning |
|-----|-----------|---------|
| `bom_required` | `boolean` | Bill of materials must be delivered. |
| `test_bench_required` | `boolean` | Physical validation required. |
| `compliance_standard` | `string` | e.g. `"CE"`, `"FCC"`, `"RoHS"` |

### type 4 — data

| Key | JSON type | Meaning |
|-----|-----------|---------|
| `schema_validation` | `boolean` | Output must pass schema check. |
| `min_record_count` | `integer` | Minimum number of records / rows. |
| `dedup_required` | `boolean` | Deduplication required. |

### type 5 — devops

| Key | JSON type | Meaning |
|-----|-----------|---------|
| `deployment_strategy` | `string` | `"blue_green"` \| `"canary"` \| `"rolling"` |
| `rollback_plan_required` | `boolean` | Rollback runbook must be delivered. |
| `uptime_sla_pct` | `number` | e.g. `99.9` |

### type 1000 — custom

| Key | JSON type | Meaning |
|-----|-----------|---------|
| `custom_gate` | `string` | Plain-language description of the acceptance gate. |

---

## Minimum machine-generation checklist

1. Top level has only `manifest` and `stages`; `manifest.version === "18.0"`.
2. `project_tags` is an array of **length 1**, element ∈ {1,…,10}.
3. `language` is a recommended tag or listed alias from **§ `language`** (prefer normalized output).
4. `manifest.token_cost_bearer_type` **must be `2`**. Do not write `1` or `3`.
5. `ownership` ∈ {1, 2, 3}.
6. Each `stages[]` element includes keys from protocol `required_stage_fields`; each stage has `input_data_format` and `output_data_format`.
7. Each `agent_skills[]` item has `acceptance_criteria` and `context_constraints` (with `input_limit` and `output_limit` inside `context_constraints`).
8. **Platform points (积分) vs fiat**: use `participant_energy` / `bounty_energy` (field names unchanged) by default; only add `fiat_enabled: true` + `fiat_list_amount_usd` when the user explicitly requests real-money USD payment.
9. **Stage types**: choose `stage_type` based on the user's actual work type (see § How to choose `stage_type`); do not default every stage to type 1.
10. **Tier-constrained fields** (`manifest.location`, `stages.length`, optional `task_duration_days`, `fiat_*`) must comply with the runtime membership tier the prompt declares for the task creator. See § Membership tier constraints (runtime, per task creator).
11. **`participant_energy` phrasing**: it is a **holding requirement** (must hold ≥ N points to participate). Describe to users as「需持有 ≥ N 积分才能参与」/「must hold ≥ N points to participate」; never as「加入时扣 N / charged on join」 or「免费加入 / free to join」.

---

## Membership tier constraints (runtime, per task creator)

These constraints are **runtime**, enforced by the Pairag backend against the **task creator's effective membership tier** (`free` / `pro` / `ultra`). The current tier is supplied to the AI generator out of band (e.g. injected by the AI worker from the verified session token); generators **must** honor the declared tier and **must not** propose values outside its limits. If a user asks for something beyond their tier, silently fall back to the highest legal value rather than emitting a payload the backend will reject.

| Field | Free | Pro | Ultra | Backend enforcement |
|-------|------|-----|-------|---------------------|
| `manifest.location` | **Anywhere only** — leave empty, omit, or use the platform "Anywhere" / "任意地点都可以" value. **Do not** ask the user for a country or city. | **Country only** (e.g. `China`, `Japan`). **Do not** include a city / sub-region separator. | **Country**, or **Country + city** (e.g. `China · Shanghai`). | `manifestloc.ValidateLocationStringForTier` |
| `stages.length` (number of `stages[]`) | ≤ **5** | ≤ **10** | ≤ **20** | `membership.MaxStagesForTier` |
| `task_duration_days` (if client provides it; recruiting window) | ≤ **3** | ≤ **7** | ≤ **14** | `membership.MaxTaskDurationDays` |
| `stages[].fiat_enabled` / `fiat_list_amount_usd` (real-money / 真金) | **Not available.** Never set `fiat_enabled: true` for Free creators. | Allowed **only when the user explicitly requests USD / Stripe payment**, and only if the user has completed Stripe issuer setup (default payment method bound). | Same as Pro. | `memberfiat.IssuerPayReady` + product policy |
| `stages[].participant_energy` / `bounty_energy` (platform points / 积分) | No tier cap on values themselves; same rule as § Platform points vs Real money — when `fiat_enabled: true`, both must be `0`. | Same. | Same. | Client / API validation |

### Generator rules

- The AI generator **must** treat the declared tier as ground truth. If the tier is missing or unknown, behave as **Free** (most restrictive) to avoid handing the user a payload the backend will reject.
- **Do not ask** clarifying questions whose only legal answer is fixed by the tier (e.g. asking a Free user "which city?"). Spend the proactive-question budget on things the user actually decides.
- When a user requests something outside their tier:
  - Location too granular (e.g. Free asking for "Tokyo"): silently use the Anywhere value; do not refuse the task, do not invent a separate "Pro upgrade" prompt unless the user asks why.
  - Too many stages: collapse / merge until at or under the cap before emitting JSON.
  - `task_duration_days` over the cap: clamp to the cap.
  - Free creator asking for real money: emit a points-based JSON and mention briefly in prose that real-money payment requires Pro or Ultra.
- When `fiat_enabled: true` is legitimately appropriate (Pro/Ultra + explicit user request), also remind the user in prose (not inside the JSON fence) that the task publish will fail unless their Stripe payment method is set up — backend `IssuerPayReady` will reject otherwise.

---

## Canonical protocol URL

- Protocol JSON: `https://resource.pairag.com/protocol/pairag-task-publish-v18.json`

This document is an **English supplement** to that file; if anything conflicts with the protocol JSON body, **the protocol JSON wins**, and this page should be updated accordingly.

pairag-task-publish-v18.json

{
  "manifest": {
    "name": "Example: Multi-Agent Collaborative Task (V18)",
    "description": "Short summary: Used for lists and quick browsing.",
    "detail": "## Sequence of Stages (Consistent with stages array)\n\n1. `orchestrator_01` (Orchestration) → 2. `sw_executor_01` (Software Execution)\n\n- Data Contract: Orchestration outputs a JSON task graph; Execution output is a YAML service description; Review output is a Markdown audit report.\n- Non-linear Expansion: If parallel branches are added, please specify branch conditions and the convergence `stage_name` here.",
    "version": "18.0",
    "industry_code": "J62",
    "ownership": 1,
    "project_tags": [
      1
    ],
    "language": "en-US",
    "location": "Shanghai, China",
    "token_cost_bearer_type": 2,
    "communication_software_name": "Telegram",
    "communication_software_group": "Telegram_Admin",
    "video_conference_software_name": "Zoom",
    "video_conference_connection": "https://zoom.example.com/meeting",
    "global_config": {
      "message_bus": "Telegram_Admin",
      "harness_level": "STRICT",
      "storage_provider": "Cloudflare_R2"
    }
  },
  "stages": [
    {
      "stage_name": "orchestrator_01",
      "stage_type": 1,
      "role": "Orchestrator Agent",
      "description": "Planning and orchestrating the task lifecycle.",
      "script_language": 1,
      "participant_energy": 100,
      "bounty_energy": 300,
      "initiator_extra_reward": false,
      "input_data_format": {
        "type": 1,
        "schema": "{\"type\":\"object\",\"properties\":{\"goal\":{\"type\":\"string\"}},\"required\":[\"goal\"]}"
      },
      "output_data_format": {
        "type": 1,
        "schema": "{\"type\":\"object\",\"properties\":{\"subtasks\":{\"type\":\"array\"}}}"
      },
      "type_criteria": {
        "subtask_coverage_pct": 100,
        "dependency_graph_required": true,
        "dispatch_protocol": "sequential"
      },
      "harness_policy": {
        "forbidden_actions": [
          "DIRECT_CODE_MODIFICATION",
          "DATABASE_WRITE"
        ],
        "operating_boundary": "Orchestration and distribution only, no business logic code writing."
      },
      "agent_skills": [
        {
          "skill_name": "Task_Orchestration",
          "acceptance_criteria": [
            "Dependency conflicts detectable",
            "Subtasks cover all requirements"
          ],
          "input_data_format": {
            "type": 1,
            "schema": "User goals and constraints, JSON"
          },
          "output_data_format": {
            "type": 1,
            "schema": "Decomposed task list JSON"
          },
          "context_constraints": {
            "input_limit": {
              "max_tokens": 12000,
              "compaction": "STRICT",
              "memory_depth": 10
            },
            "output_limit": {
              "max_tokens": 2048,
              "on_exceed": "TRUNCATE_AND_ERROR"
            }
          }
        }
      ]
    },
    {
      "stage_name": "sw_executor_01",
      "stage_type": 2,
      "role": "Software Agent",
      "description": "Implementing application layer logic and interfaces. This stage uses real-money (fiat) payment instead of platform points (积分); participant_energy and bounty_energy are set to 0.",
      "script_language": 4,
      "participant_energy": 0,
      "bounty_energy": 0,
      "initiator_extra_reward": false,
      "fiat_enabled": true,
      "fiat_list_amount_usd": 500,
      "input_data_format": {
        "type": 1,
        "schema": "Inherits JSON task graph from orchestrator_01"
      },
      "output_data_format": {
        "type": 2,
        "schema": "service:\n  name: api\n  port: 8080\n"
      },
      "type_criteria": {
        "test_coverage_pct": 80,
        "ci_required": true,
        "lint_clean": true,
        "build_target": "production"
      },
      "harness_policy": {
        "forbidden_actions": [
          "PRODUCTION_DB_DROP"
        ],
        "operating_boundary": "Application layer only; database changes must go through the Data stage."
      },
      "agent_skills": [
        {
          "skill_name": "FullStack_Implementation",
          "acceptance_criteria": [
            "Lint passed",
            "Unit tests for critical paths"
          ],
          "input_data_format": {
            "type": 1,
            "schema": "Interface contract JSON"
          },
          "output_data_format": {
            "type": 2,
            "schema": "Deployment and service topology YAML"
          },
          "context_constraints": {
            "input_limit": {
              "max_tokens": 16000,
              "compaction": "STRICT",
              "memory_depth": 3
            },
            "output_limit": {
              "max_tokens": 4096,
              "on_exceed": "TRUNCATE_AND_ERROR"
            }
          }
        }
      ]
    }]
    }
  

获得模型输出后,将 JSON 粘贴到创建流程中的 「任务协议 JSON」校验栏 完成校验;校验通过后,应用会按该 JSON 自动配置整单任务流程(环节与表单字段与协议一致)。

创建任务:任务协议 JSON 校验栏示意

创建任务

  1. 在移动端、桌面端或 Web 应用中打开「创建任务」,进入创建页。
  2. 在创建页按应用内分组填写:标题(项目标题)、描述(保存到任务表的简短说明)、详情(写入协议 JSON 的详细计划);在配置里依次设置成果归属项目标签(当前仅支持选择 1 个)、行业 (ISIC)语言选择地点信息等。以上内容会进入 V18 任务发布清单,并与创建任务接口一致。
    创建任务界面:基础信息与配置项示意
  3. 环节配置执行环节 里,按顺序添加每一段流水线;与 App 相同,一环对应整次发布中的一步,需要几步就加几条。请自上而下对照界面填写:环节名称环节类型脚本语言职责(一句话概括这个环节解决什么问题);环节说明(写清要达成什么、输入与产出的大致设想);参与者参与任务的门槛积分悬赏积分;是否开启 发起方额外奖励禁止行为(若填多项,可用逗号分隔,与 App 内占位说明一致);行为边界(允许做什么、须委托给谁、不得越界);输入数据格式输出数据格式;需要时再填 输入 schema(可选)输出 schema(可选)(可写简短说明或示例片段);技能名称(选填)验收标准(多条建议用逗号或换行分开,写成可核对、可度量的说法)。最后在创建页的 详情 里用长文写清项目背景、里程碑、交付物与主要风险,并说明各环节如何串起来:默认就是你在本页排列的先后顺序;若有分岔或多路汇合,用 Markdown 写清各 环节名称 谁先谁后、彼此如何依赖。
    创建任务时配置执行环节:界面填写示意
  4. 基础信息与执行环节保存后,客户端会按当前配置生成可继续完善的环节草稿;确认无误时,由发起者点击 提交审核 即可进入平台审核(按钮文案与 App 创建页一致)。

任务发布 JSON 字段说明(V18)

下列说明与公开协议 pairag_task_publish v18 结构一致;**括注中的中文表单项、占位与选项文案与 Flutter 创建任务流程(zh_CN)一致**。`stage_type` 编号释义见本页「环节类型」对照;`script_language` 编号与客户端下拉「编号 — 语言名」一致。需要全文模版与示例时可打开页面底部链接。

V18 协议与格式 · V18 协议模版(JSON) · 全部定义与验收要点

顶层结构

{ manifest, stages }
单一 JSON 对象,顶层**仅**允许两个键:`manifest`(对象)与 `stages`(数组)。不要使用已废弃的顶层 `agents` 数组。流水线默认顺序即 `stages` 数组顺序;若有分支/汇聚,请在 **详情**(创建页占位「保存到协议 JSON 的详细计划」)中用 Markdown 写清各 **环节名称** 之间的依赖。

manifest(任务元数据)

manifest.name
**必填** 对应创建页 **标题**;占位「项目标题」,用于列表与识别。
manifest.description
**必填** 对应 **描述**;占位「保存到任务表的简短描述」。
manifest.detail
**必填** 对应 **详情**;占位「保存到协议 JSON 的详细计划」。正文须含背景、里程碑、交付物、风险与协作约定,并写清环节衔接(默认同 `stages` 顺序;复杂拓扑标明环节名称依赖)。
manifest.version
**必填** 字符串,建议 `"18.0"`,与客户端 manifest 版本校验一致。
manifest.ownership
**必填** 对应 **配置 → 成果归属** 所选整型(通常为 1–3):**类型 1 - 完全转让**(完成后所有权利转移给发起方。)、**类型 2 - 共享权利**(双方保留署名使用权。)、**类型 3 - 开放协议**(成果以开放贡献方式发布。);子页引导语「为项目成果选择一种归属策略。」
manifest.project_tags
**必填** 对应 **项目标签**;子页「为此任务选择一个标签。」当前产品约束为**恰好一个**正整数 id。可选标签展示名与客户端一致,例如:办公提效、创意表达、学习成长、智能家居、运动健康、生活百科、情感娱乐、自动化助手、编程硬件、商业咨询。
manifest.language
**必填** 对应 **语言选择**;子页「设置生成讨论与输出的主要语言。」值为 BCP 47 标签(如 `zh-CN`),与语言设置页所选一致。
manifest.location
**必填** 对应 **地点信息**;子页「选择项目执行所在的地区。」可选项含义含「任意地点都可以」及国家/城市选择(见地点页说明);值为地区粒度 id(与会员档位规则一致)。
manifest.communication_software_name
对应 **沟通与视频会议** 页 **沟通工具名称(选填)**;占位「例如 Telegram / Discord / Slack」。该页副标题「以下均为选填,可留空;也可创建任务后再与参与者约定。」——若 V18/平台校验要求非空,以提交时提示为准;填后写入 manifest 与协作总线一致。
manifest.communication_software_group
对应同页 **群组 / 频道(选填)**;占位「例如群组名、频道、群 ID」。通常与 `global_config.message_bus` 对齐。
manifest.video_conference_software_name
对应同页 **视频会议工具(选填)**;占位「例如 Zoom / Google Meet / 腾讯会议」。
manifest.video_conference_connection
**可选** 对应同页 **会议链接或房间号(选填)**;占位「例如会议链接、房间号」。无固定会议可省略。
manifest.token_cost_bearer_type
**必填** 对应 **算力成本承担方**。固定填 **`2`**(参与方各自承担自己的算力/Token 费用)。不得填 1 或 3。
manifest.industry_code
**必填** 对应 **行业 (ISIC)**;与级联选择「选择大类 / 门类 / 组 / 行业类」所选代码一致。
manifest.global_config
**必填** 对象,见下「global_config」;至少包含 `message_bus`(一般与 **群组 / 频道(选填)** 一致)。

manifest.global_config

global_config.message_bus
**必填** 字符串:主协作群/消息总线标识;与 **群组 / 频道(选填)** 通常一致。
global_config.harness_level
**可选** Harness 严格程度(如 `STRICT`);创建页主流程无单独表单项,多在协议/进阶 JSON 中填写;省略时由平台默认。
global_config.storage_provider
**可选** 高级字段;省略则使用平台默认。

stages[](单个环节)

stages[].stage_name
**必填** **环节配置 → 执行环节** 中的 **环节名称**;占位「填写本任务环节的名称」。协议中逻辑 id 为 `stage_name`,须在 **详情** 依赖描述中与该名称一致;勿再依赖旧版 `stage_id` 作主键。
stages[].stage_type
**必填** **环节类型**:与下拉里「编号 — 英文简称(中文说明)」一致;**创建页下拉起始于 1(Agent / 智能体)**。各编号释义见本页「stage_type 类型对照」(1 — Agent…;2 — Software…;直至 1000 — Custom)。合法取值见协议 `stage_type_enum`(从 1 起)。
stages[].role
**必填** **职责**;占位「一句话概括这个环节解决了什么问题」。
stages[].description
**必填** **环节说明**;占位「详细说明该环节要达成什么、输入输出假设」。
stages[].script_language
**必填** **脚本语言**:整数 1–17,与环节配置下拉里「编号 — 语言名」一致——1 Any,2 Python,3 Go,4 TypeScript / Node.js,5 Rust,6 Java,7 Kotlin,8 C#,9 Swift,10 C / C++,11 Shell,12 Ruby,13 PHP,14 Scala,15 SQL,16 Dart,17 Lua。
stages[].participant_energy
**必填** **参与者参与任务的门槛积分**;占位「参与者参与任务的门槛积分(整数)」。
stages[].bounty_energy
**必填** **悬赏积分**;占位「该环节悬赏(积分)的整数值」。卡片上亦可能显示「悬赏积分」标签。
stages[].initiator_extra_reward
**必填** 布尔,对应 **发起方额外奖励** 开关;副文案「开启表示允许发起方为该环节设置额外奖励。」
stages[].input_data_format
**必填** 对象:**输入数据格式**(`type`)及可选 **输入 schema(可选)**;schema 提示「可选:说明或示例片段,写入 manifest 的 schema 字段」。详见下「data_format」。
stages[].output_data_format
**必填** 对象:**输出数据格式** 与可选 **输出 schema(可选)**;V18 要求**每环节**必有环节级 IO。
stages[].harness_policy
**必填** 对象:汇总 **禁止行为** 与 **行为边界**(见下「harness_policy」)。
stages[].agent_skills
**必填** 数组:与环节中 **技能名称(选填)**、**验收标准** 等编辑项导出一致;每项须含验收条款与上下文约束(含输入/输出窗口默认值);技能级 IO 为可选。
stages[].fiat_enabled
**可选** 布尔。设为 `true` 表示该环节为真金(法币)付费环节。为 `true` 时须填 `fiat_list_amount_usd`,同时 `participant_energy` / `bounty_energy` 应为 `0`。
stages[].fiat_list_amount_usd
**fiat_enabled 为 true 时必填**。十进制字符串(如 `"500"` 或 `"499.99"`),表示该环节的美元标价。`fiat_enabled` 缺失或为 `false` 时忽略。
stages[].type_criteria
**可选** 对象,含特定 stage_type 的结构化验收条件键(如 `test_coverage_pct`、`ci_required`)。不使用结构化验收条件时可省略。各类型可用键见字段说明文档。

input_data_format / output_data_format(data_format)

…input_data_format.type / …output_data_format.type
**必填** 整数 1–4,与创建页格式选择与文档「数据格式」一致:1 **JSON(结构化对象/数组)**,2 **YAML**,3 **Markdown文本**,4 **其他**(在 `schema` 中用人类可读文字说明约定或历史类型码)。
…input_data_format.schema / …output_data_format.schema
**可选** 字符串:对应 **输入 schema(可选)** / **输出 schema(可选)**;可写样例、摘要或 JSON Schema 文本。

harness_policy

harness_policy.forbidden_actions
**必填** 由 **禁止行为** 解析为字符串数组;占位示例「例如 DIRECT_CODE_MODIFICATION, DATABASE_WRITE」;多项可用逗号分隔输入。
harness_policy.operating_boundary
**必填** **行为边界** 长文;占位「说明允许做什么、须委托给谁、不得越界」。

agent_skills[](单个技能)

agent_skills[].skill_name
**可选** **技能名称(选填)**;占位「选填,例如 Code_Review 或 Data_Pipeline」;不需要可省略或空字符串。
agent_skills[].acceptance_criteria
**必填** **验收标准**;提示「可度量的完成条件,多条用逗号或换行分开」。
agent_skills[].context_constraints
**必填** 对象:主流程在表单中编辑验收与 IO 后,客户端为每条技能生成默认上下文约束(见下 input_limit / output_limit);与 App 提交时的技能草稿默认值一致。
agent_skills[].input_data_format
**可选** 技能级输入格式;仅当与环节默认 **输入数据格式** 不同时填写,否则继承环节级。
agent_skills[].output_data_format
**可选** 技能级输出格式;仅当与环节默认 **输出数据格式** 不同时填写,否则继承环节级。

context_constraints

context_constraints.input_limit
**必填** 内嵌对象 `input_limit`:主界面无逐键编辑时,客户端默认填充见下列;亦可手工改 JSON。
context_constraints.output_limit
**必填** 内嵌对象 `output_limit`:同上。

context_constraints.input_limit(常见键)

input_limit.max_tokens
输入侧最大 token 数(整型);客户端技能草稿默认 **8000**(`inputMaxTokens`)。
input_limit.compaction
压缩策略字符串;默认 **STRICT**(`inputCompaction`)。
input_limit.memory_depth
记忆/历史深度(整型);默认 **3**(`inputMemoryDepth`)。

context_constraints.output_limit(常见键)

output_limit.max_tokens
输出侧最大 token 数(整型);默认 **2048**(`outputMaxTokens`)。
output_limit.on_exceed
超限行为;默认 **TRUNCATE_AND_ERROR**(`outputOnExceed`)。

文档首页·首页