Skip to content
commission

commission apply document reference

The shape of the JSON document commission apply -f plan.json accepts — the one call that creates or updates a whole task graph atomically. Read this when you are planning work rather than executing it.

commission apply --schema prints the same schema at the terminal, and commission apply -f plan.json --dry-run validates and previews without writing.

Why one document

Local keys are resolved to real task ids inside a single transaction, so a plan can reference tasks it is creating in the same breath (deps: ["schema"]). Re-applying the same document upserts by key instead of duplicating, which makes a plan file safe to edit and re-run. Nothing lands unless everything validates.

Example

{
  "project": "myapp",
  "name": "My App",
  "gates": { "tier1": ["pr", "test"] },
  "tasks": [
    {
      "key": "schema",
      "title": "Design the storage schema",
      "body": "Tables, indexes, and the migration path.",
      "priority": 1,
      "gate": "tier1",
      "touches": ["src/db/**"],
      "criteria": ["migration runs forward and backward"],
      "links": [{ "kind": "doc", "ref": "docs/concepts/index.md" }]
    },
    {
      "key": "api",
      "title": "Expose it over HTTP",
      "deps": ["schema"],
      "touches": ["src/server/**"]
    }
  ]
}

Two tasks, one dependency — api is not on the ready frontier until schema is closed, and nothing had to declare that it was “blocked”.

Fields

keytyperequireddescription
projectstring (min 1)yes
namestringno
visionstringno
gatesrecord<string, string[]>no
tasksobject[]yes
tasks[].keystring (min 1)yes
tasks[].titlestring (min 1)yes
tasks[].bodystringno
tasks[].parentstringno
tasks[].depsstring[]no
tasks[].priorityinteger (0–3)no
tasks[].severityinteger (1–4)no1 = worst; distinct from priority
tasks[].duestringnoISO date the task is due
tasks[].gatestringno
tasks[].autonomy“autonomous” | “supervised” | “human_only”nohow far an agent may take this unsupervised; human_only means agents never claim it
tasks[].preferredActorstringnowho should do this — a bias, never a lock
tasks[].mayExecutestring[]noroles or capabilities required to claim it
tasks[].touchesstring[]no
tasks[].criteriastring[]no
tasks[].linksobject[]no
tasks[].links[].kind“doc” | “url” | “file”yes
tasks[].links[].refstring (min 1)yes
tasks[].links[].notestringno
tasks[].status“open” | “in_progress” | “in_review” | “done” | “cancelled”no
tasks[].evidenceobject[]no
tasks[].evidence[].kindstringyes
tasks[].evidence[].valuestringyes
tasks[].evidence[].notestringno

JSON Schema

The machine-readable form, as emitted by commission apply --schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "project": {
      "type": "string",
      "minLength": 1
    },
    "name": {
      "type": "string"
    },
    "vision": {
      "type": "string"
    },
    "gates": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    "tasks": {
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "body": {
            "type": "string"
          },
          "parent": {
            "type": "string"
          },
          "deps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "priority": {
            "type": "integer",
            "minimum": 0,
            "maximum": 3
          },
          "severity": {
            "description": "1 = worst; distinct from priority",
            "type": "integer",
            "minimum": 1,
            "maximum": 4
          },
          "due": {
            "description": "ISO date the task is due",
            "type": "string"
          },
          "gate": {
            "type": "string"
          },
          "autonomy": {
            "description": "how far an agent may take this unsupervised; human_only means agents never claim it",
            "type": "string",
            "enum": [
              "autonomous",
              "supervised",
              "human_only"
            ]
          },
          "preferredActor": {
            "description": "who should do this — a bias, never a lock",
            "type": "string"
          },
          "mayExecute": {
            "description": "roles or capabilities required to claim it",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "touches": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "criteria": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "doc",
                    "url",
                    "file"
                  ]
                },
                "ref": {
                  "type": "string",
                  "minLength": 1
                },
                "note": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "ref"
              ],
              "additionalProperties": false
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "in_progress",
              "in_review",
              "done",
              "cancelled"
            ]
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "value"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "key",
          "title"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "project",
    "tasks"
  ],
  "additionalProperties": false
}

This page is docs/reference/apply.md in the Commission repository, rendered in place — the site keeps no copy of it. It is generated by scripts/generate-docs.ts, so it is exhaustive, and editing it by hand is reverted by the next run.