{
  "$schema": "https://skill-map.ai/spec/v1/conformance-case.schema.json",
  "id": "job-document-schema",
  "description": "`sm jobs submit --json` MUST emit the queued Job as a document validating against `job.schema.json#/$defs/CredentialedJob`, the projection that CARRIES the record credential. Submit and claim are the only two surfaces the spec permits to emit the nonce, which makes submit the one place the full Job contract is observable. Asserted against the `$defs` rather than the root on purpose: the root leaves `nonce` optional so the nonce-less read projection can also extend it, so validating there would pass a submit that silently dropped the credential. The sibling `jobs-list-omits-nonce` covers the other direction.",
  "fixture": "job-record-chain",
  "setup": {
    "priorScans": [{ "fixture": "job-record-chain" }],
    "priorInvokes": [{ "verb": "agent", "sub": "install", "flags": ["--for", "claude"] }]
  },
  "invoke": {
    "verb": "jobs",
    "sub": "submit",
    "args": ["ai-summarizer-action"],
    "flags": ["-n", "notes.md", "--json"]
  },
  "assertions": [
    { "type": "exit-code", "value": 0 },
    { "type": "stdout-matches-schema", "schema": "job.schema.json", "schemaPointer": "/$defs/CredentialedJob" },
    { "type": "json-path", "path": "$.status", "equals": "queued" },
    { "type": "json-path", "path": "$.nodeId", "equals": "notes.md" },
    { "type": "json-path", "path": "$.nonce", "matches": "^[0-9a-f]{32}$" }
  ]
}
