Private preview. Daggry is not publicly released.Roadmap
Skip to content

Record kinds ​

Reference

A record helps you only if you know what its fields mean. Daggry seals eight kinds of record, and this page lists each kind's body fields, its constraints, a valid example and who seals it. Read it if you write gates, validators or tools that read the trail. The validators that judge these records are in Validators. The envelope around every body is in Evidence record format.

A kind's namespace says who defines it. The evidence namespace holds the kinds of the standard, and daggry holds Daggry's own. Another factory adds kinds in a namespace of its own and leaves both of these unchanged, so a new kind of record never changes the standard. See Conformance.

The example bodies on this page are illustrative. Each is valid under the schema and the policy rules that follow it. Digests shown as short strings such as ab pass the schemas, which require only a non-empty string. Real digests are 64 lowercase hex digits.

Download ​

Every kind has a published JSON Schema (draft 2020-12) for its body, and so does the envelope. The table links each file.

SchemaFile
evidence/envelope@1evidence-envelope-v1.json
evidence/plan@1evidence-plan-v1.json
evidence/measurement@1evidence-measurement-v1.json
evidence/verdict@1evidence-verdict-v1.json
evidence/approval@1evidence-approval-v1.json
daggry/change@1daggry-change-v1.json
daggry/observation@1daggry-observation-v1.json
daggry/run-lock@1daggry-run-lock-v1.json
daggry/work-item@1daggry-work-item-v1.json

The result document a script validator writes is not a sealed kind. Its schema, daggry/result@1, is in Project config.

The eight kinds ​

Four kinds belong to the evidence language. Four are Daggry's own. No kind names a tool or a kind of work. Where a field takes a form that depends on the workspace, the binding gives the form. See Bindings.

The table lists each kind, what it holds and who seals it.

KindHoldsSealed by
evidence/plan@1The acceptance criteria an agent plans.Control plane, from an agent step's submitted record.
evidence/measurement@1The result of one check on one version of the workspace.Control plane, from the runner's record of a script validator's run.
evidence/verdict@1What a validator produced.Control plane, from a validator's output.
evidence/approval@1A human grant bound to one digest.Control plane, on daggry approve.
daggry/change@1A version of the workspace, the paths it changed and the frozen set.Control plane, after it accepts an agent or command step.
daggry/observation@1A protected-restored or step-failed record.Control plane, from the runner's report or its own failure record.
daggry/run-lock@1What a run pins.Control plane, at run start.
daggry/work-item@1The workspace and the request a run is for.Control plane, at run start.

Each kind is a JSON Schema (draft 2020-12) for the artifact's body. Every object in every schema refuses unknown fields. The schema's $id is the kind. Every kind is at major version 1.

A workflow and a gate name a kind by its bare name (plan, change), which is unique across both namespaces.

A name that the evidence or the daggry namespace lacks (evidence/change@1, daggry/plan@1) is refused as an unknown kind. So is a kind in another namespace (acme/plan@1) that the tenant has not registered in extensions.artifact_kinds of the Tenant config. A known name at another major (evidence/plan@2) is refused as an unknown major.

A body that does not fit its schema is refused with the JSON pointer of the offending value: body of `<kind>`: <message> (at `<location>`).

Reading the field tables ​

Each field table has these two columns besides the name, the type and the constraints.

ColumnMeaning
ReqWhether the schema requires the field.
ClassThe field's fact class: claimed (an agent wrote it), derived (code computed it from sealed inputs) or - (no class). A gate reads only derived fields. See Gate expressions.

Who seals what ​

The control plane seals every kind. The table lists the artifact id and the parents of each.

KindArtifact idparents
run-lockrun-locknone, because it starts the run
work-itemwork-itemnone, because it starts the run
plan<step>-<n>the artifacts it builds on
measurement<step>-head for the canonical validator, <step>-head-<name> for any other script validator, <step>-redthe change it measured
changechange-<n>the plan it implements
observation<step>-restored-<n>, observation-<n>the artifacts it concerns
verdictverdict-<n>the digests of the inputs judged
approvalapproval-<n>the one bound artifact

For the meta keys stamped on each kind, see Stamped keys.

parents names the artifacts a record builds on, so you can walk from a verdict back to the measurement, the change and the plan. <n> is a counter per run. A step submits only the kinds its workflow declares. An agent never writes a seal field.

evidence/plan@1 ​

The acceptance criteria an agent plans. A person approves the plan with daggry approve, which seals an approval bound to the plan's digest.

FieldTypeReqClassConstraints
criteriaarray of objectsyesclaimedAt least 1 item.
criteria[].idstringyes-Non-empty.
criteria[].textstringyes-Non-empty.

Constraint beyond the schema: criterion ids are unique within a plan and compared exactly (c1 and C1 differ). A duplicate is refused at /criteria/<i>/id with duplicate criterion id `<id>` .

criteria is claimed, so a gate cannot read it. A loop reads the list with over: plan.

Example:

json
{"criteria": [{"id": "AC-1", "text": "An empty name is rejected"}, {"id": "AC-2", "text": "A name over 64 characters is rejected"}]}
Schema: evidence/plan@1
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "evidence/plan@1",
  "title": "evidence/plan@1: the acceptance criteria an agent plans",
  "type": "object",
  "required": [
    "criteria"
  ],
  "additionalProperties": false,
  "properties": {
    "criteria": {
      "x-fact-class": "claimed",
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": [
          "id",
          "text"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "text": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    }
  }
}

evidence/measurement@1 ​

The result of one check on one version of the workspace. A measurement names the script validator that ran and its result contract, and holds the exit code, an outcome, the findings and the metrics.

A verify step seals one measurement for each script validator it runs. See Validators.

FieldTypeReqClassConstraints
labelstringyesderivedNon-empty. Policy: base, head or red.
revisionstringyesclaimedNon-empty. The version of the workspace that was measured, in the form the binding gives.
criterionstringnoderivedNon-empty when present. Policy: required for red, refused for base and head.
exit_codeintegeryesderivedAny integer.
checkstringnoderivedThe name of the script validator that ran, as its declaration names it: a lowercase letter, then lowercase letters, digits, - or _.
contractstringnoderivedNon-empty. The result contract: exit-code, document or <namespace>/<adapter>.
outcomestringnoderivedpass, fail or error. See Outcome.
findingsarray of objectsnoderivedCan be empty.
findings[].idstringyes-Non-empty.
findings[].outcomestringyes-pass, fail, error or skip.
findings[].locatorstringno-Non-empty when present. Where the finding is, as the result document gives it.
findings[].pathstringno-Non-empty when present. The path part of the locator, when the locator names a file of the workspace.
findings[].messagestringyes-Any string, can be empty.
metricsmapnoderivedFrom a name to a number. A name starts with a lowercase letter and holds lowercase letters, digits and _.
testsarray of objectsnoderivedA second form of the findings that the software binding's adapters write. See Bindings.

The control plane fills check, contract, outcome, findings and metrics on every measurement it seals. The findings and the metrics come from the result document of the validator, unchanged.

The table lists the policy rules that Daggry applies after the schema.

RuleRefusal
label is base, head or red.`x` is not one of `base`, `head`, `red` at /label.
revision has the form the binding gives a version of the workspace.A refusal at /revision.
red requires criterion.a `red` measurement requires `criterion` at the root.
base and head refuse criterion.`criterion` is refused of a `base` or `head` measurement at /criterion.

The table lists the labels.

LabelWhat was measured
baseThe baseline: the version of the workspace the run starts from.
headThe last sealed version.
redThe baseline with a proof step's new frozen paths overlaid, by the canonical validator. It carries the criterion id it proves. See Baseline proof.

revision is claimed, so a gate cannot read it. The control plane separately checks that a head measurement's revision equals the last sealed version. inputs.measurement.exit_code == 0 and inputs.measurement.outcome == 'pass' are usable gate reads.

Outcome ​

outcome says in one word what the check decided.

OutcomeWhen
passThe exit code is 0, the result is readable by the contract, a result document says pass and every threshold on the validator holds.
failThe exit code is not 0, a result document says fail, or a threshold on the validator is missed.
errorThe contract can read no result: the validator ran past its timeout, its result document is missing or invalid, or the document says error. An error counts as a failed check.

Threshold findings ​

Each threshold in verification.thresholds adds one finding to the measurement of the validator it reads, whatever the contract.

FieldValue
idthreshold:<read>, with the threshold's read value.
outcomepass when the limit holds, fail when it is missed, error when the number cannot be read.
messageThe value read and the limit.

A threshold finding with the outcome fail or error makes the measurement's outcome fail.

Examples ​

The first measurement is of a canonical validator with the document contract. One finding failed, and a threshold on a metric holds:

json
{
  "label": "head",
  "revision": "v-0042",
  "exit_code": 1,
  "check": "review",
  "contract": "document",
  "outcome": "fail",
  "findings": [
    {"id": "ac_1_summary_present", "outcome": "pass", "locator": "handbook/leave.md", "path": "handbook/leave.md", "message": ""},
    {"id": "ac_2_sentence_length", "outcome": "fail", "locator": "handbook/pay.md:14", "path": "handbook/pay.md", "message": "The sentence has 41 words. The limit is 30."},
    {"id": "threshold:metrics.reading_grade", "outcome": "pass", "message": "metrics.reading_grade is 8, max is 9"}
  ],
  "metrics": {"pages": 12, "reading_grade": 8}
}

The second is of a validator with the exit-code contract:

json
{
  "label": "head",
  "revision": "v-0042",
  "exit_code": 0,
  "check": "links",
  "contract": "exit-code",
  "outcome": "pass",
  "findings": []
}

The third is read through an adapter of the software binding. One test is skipped, so a threshold on the count of skipped findings is missed:

json
{
  "label": "head",
  "revision": "2f6c1e0b9a7d4c3e8f5a1b2c3d4e5f6a7b8c9d0e",
  "exit_code": 0,
  "check": "test",
  "contract": "software/libtest",
  "outcome": "fail",
  "findings": [
    {"id": "cart::tests::ac_1_rejects_empty", "outcome": "pass", "message": ""},
    {"id": "cart::tests::ac_2_rejects_long_name", "outcome": "skip", "message": ""},
    {"id": "threshold:findings.skip", "outcome": "fail", "message": "findings.skip is 1, max is 0"}
  ],
  "metrics": {"passed": 1, "failed": 0, "skipped": 1},
  "tests": [
    {"name": "cart::tests::ac_1_rejects_empty", "outcome": "passed"},
    {"name": "cart::tests::ac_2_rejects_long_name", "outcome": "ignored"}
  ]
}

v-0042 stands for a version id in the form the workspace's binding gives. Under the software binding a version id is a commit, as in the third example. The first two validators are declared in A set of documents and the third in Software binding: a Rust project.

Schema: evidence/measurement@1
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "evidence/measurement@1",
  "title": "evidence/measurement@1: the result of one check on one version of the workspace",
  "type": "object",
  "required": [
    "label",
    "revision",
    "exit_code"
  ],
  "additionalProperties": false,
  "properties": {
    "label": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "derived"
    },
    "revision": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "claimed"
    },
    "criterion": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "derived"
    },
    "exit_code": {
      "type": "integer",
      "x-fact-class": "derived"
    },
    "tests": {
      "x-fact-class": "derived",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "outcome"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "outcome": {
            "enum": [
              "passed",
              "failed",
              "ignored"
            ]
          }
        }
      }
    },
    "check": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_-]*$",
      "x-fact-class": "derived"
    },
    "contract": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "derived"
    },
    "outcome": {
      "enum": [
        "pass",
        "fail",
        "error"
      ],
      "x-fact-class": "derived"
    },
    "findings": {
      "x-fact-class": "derived",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "outcome",
          "message"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "outcome": {
            "enum": [
              "pass",
              "fail",
              "error",
              "skip"
            ]
          },
          "locator": {
            "type": "string",
            "minLength": 1
          },
          "path": {
            "type": "string",
            "minLength": 1
          },
          "message": {
            "type": "string"
          }
        }
      }
    },
    "metrics": {
      "type": "object",
      "propertyNames": {
        "pattern": "^[a-z][a-z0-9_]*$"
      },
      "additionalProperties": {
        "type": "number"
      },
      "x-fact-class": "derived"
    }
  }
}

evidence/verdict@1 ​

What a validator produced: a status, findings and derived facts. Only the control plane's verdicts open gates. The validator contract is in Validators.

FieldTypeReqClassConstraints
validatorstringyes-Non-empty.
versionstringyes-Non-empty.
statusstringyesderivedpass, fail or inconclusive.
findingsarray of objectsyes-Each { "message": <string> }. message is required and nothing else is allowed.
factsarray of objectsyesderivedEach fact has a name, a class and a value.
facts[].namestringyes-Non-empty. A stricter grammar applies. See Verdict rules.
facts[].classstringyes-Only derived.
facts[].valueboolean, integer or stringyes-A float is refused.

A gate reads verdict.status and verdict.<fact name>. verdict.findings, verdict.validator and verdict.version have no class and are refused.

The verdict's parents are the digests of the artifacts it judged.

Example: the verdict of daggry/criterion-coverage over a plan with AC-1 and AC-2, and a head measurement where only a finding for AC-1 passed.

json
{
  "validator": "daggry/criterion-coverage",
  "version": "0.1.0",
  "status": "fail",
  "findings": [{"message": "uncovered: AC-2"}],
  "facts": [
    {"name": "criteria_covered", "class": "derived", "value": 1},
    {"name": "criteria_uncovered", "class": "derived", "value": 1},
    {"name": "all_covered", "class": "derived", "value": false}
  ]
}
Schema: evidence/verdict@1
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "evidence/verdict@1",
  "title": "evidence/verdict@1: what a validator produced. A gate reads verdict.<fact name> and verdict.status",
  "type": "object",
  "required": [
    "validator",
    "version",
    "status",
    "findings",
    "facts"
  ],
  "additionalProperties": false,
  "properties": {
    "validator": {
      "type": "string",
      "minLength": 1
    },
    "version": {
      "type": "string",
      "minLength": 1
    },
    "status": {
      "enum": [
        "pass",
        "fail",
        "inconclusive"
      ],
      "x-fact-class": "derived"
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "message"
        ],
        "additionalProperties": false,
        "properties": {
          "message": {
            "type": "string"
          }
        }
      }
    },
    "facts": {
      "x-fact-class": "derived",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "class",
          "value"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "class": {
            "const": "derived"
          },
          "value": {
            "type": [
              "boolean",
              "integer",
              "string"
            ]
          }
        }
      }
    }
  }
}

evidence/approval@1 ​

A human grant bound to one artifact digest.

FieldTypeReqClassConstraints
subjectstringyesderivedNon-empty.
pathstring or nullyesderivedExplicit null when none.
digeststringyesderivedNon-empty.
source_refstring or nullyesderivedPolicy: null, or a non-empty string of ASCII decimal digits.
cited_phrasestring or nullyesderivedExplicit null when none.
intent_readstring or nullyesderivedExplicit null when none.
authorstringyesderivedNon-empty.

All seven fields are required. Write an absent value as null; do not omit the field. A source_ref that is neither null nor decimal digits is refused at /source_ref with `source_ref` is null or the decimal id of a comment.

The table lists how the CLI path fills the body.

CommandsubjectpathdigestParent
daggry approve <run-id>The run id.nullThe hex digest of the artifact the human step waits on: the plan for approval, the latest change for input-needed.That artifact.
daggry approve <run-id> --unfreeze <path>The run id.The path.The frozen file digest that the latest change records for the path.That change.

source_ref, cited_phrase and intent_read are null on the CLI path. author is the identity of the caller. Approval by a verified comment on the work item carries the comment's id in source_ref, the cited phrase, and the intent an independent step read from the comment, which falls in a closed set of seven.

Refusals: an --unfreeze of a path the change does not freeze (`<path>` is not a frozen path), and an approval when nothing is sealed to bind (nothing to approve: no sealed plan or no sealed change).

Example:

json
{
  "subject": "<run-id>",
  "path": null,
  "digest": "<hex digest of the plan>",
  "source_ref": null,
  "cited_phrase": null,
  "intent_read": null,
  "author": "<identity of the caller>"
}

<run-id> is the run's id. <hex digest of the plan> is the plan's 64-digit digest. <identity of the caller> is the identity of the token that ran daggry approve.

Schema: evidence/approval@1
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "evidence/approval@1",
  "title": "evidence/approval@1: a human grant bound to one digest",
  "type": "object",
  "required": [
    "subject",
    "path",
    "digest",
    "source_ref",
    "cited_phrase",
    "intent_read",
    "author"
  ],
  "additionalProperties": false,
  "properties": {
    "subject": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "derived"
    },
    "path": {
      "type": [
        "string",
        "null"
      ],
      "x-fact-class": "derived"
    },
    "digest": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "derived"
    },
    "source_ref": {
      "type": [
        "string",
        "null"
      ],
      "x-fact-class": "derived"
    },
    "cited_phrase": {
      "type": [
        "string",
        "null"
      ],
      "x-fact-class": "derived"
    },
    "intent_read": {
      "type": [
        "string",
        "null"
      ],
      "x-fact-class": "derived"
    },
    "author": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "derived"
    }
  }
}

daggry/change@1 ​

A change is a set of differences made to the workspace. The record holds the version of the workspace the change ends at, the paths it changed and the run's frozen set at that seal.

FieldTypeReqClassConstraints
revisionstringyesclaimedNon-empty. The version of the workspace, in the form the binding gives.
pathsarray of stringsyesclaimedEach non-empty. The paths the step changed against the last sealed version.
frozenarray of objectsyesderivedCan be empty.
frozen[].pathstringyes-Non-empty.
frozen[].digeststringyes-Non-empty. The digest of the file's content, as the workspace store names it.

The frozen set holds each path of a proof step's change that matches the step's freeze globs, with its file digest. The set carries forward: each new change holds the previous frozen set plus new frozen paths. An unfrozen path is re-entered at its new digest, or dropped if the file is gone. The set is frozen for every later step of the run. See Frozen paths.

The control plane seals a change after an accepted agent or command step. A verify step seals none.

Example:

json
{
  "revision": "v-0042",
  "paths": ["handbook/pay.md", "checks/ac-2-sentence-length.rule"],
  "frozen": [{"path": "checks/ac-2-sentence-length.rule", "digest": "5ba93c9db0cff93f52b521d7420e43f6eda2784f"}]
}
Schema: daggry/change@1
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "daggry/change@1",
  "title": "daggry/change@1: a version of the workspace, the paths it changed and the frozen set",
  "type": "object",
  "required": [
    "revision",
    "paths",
    "frozen"
  ],
  "additionalProperties": false,
  "properties": {
    "revision": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "claimed"
    },
    "paths": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "x-fact-class": "claimed"
    },
    "frozen": {
      "x-fact-class": "derived",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "path",
          "digest"
        ],
        "additionalProperties": false,
        "properties": {
          "path": {
            "type": "string",
            "minLength": 1
          },
          "digest": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    }
  }
}

daggry/observation@1 ​

A record Daggry keeps and no gate uses. One schema admits two records, selected by record.

FieldTypeReqClassConstraints
recordstringyesderivedprotected-restored or step-failed.
reasonstringyesderivedNon-empty.
pathstringby recordderivedNon-empty. Required for protected-restored. Refused for step-failed.
stepstringby recordderivedNon-empty. Required for step-failed. Refused for protected-restored.
attemptintegerby recordderived1 or more. Required for step-failed. Refused for protected-restored.

The table lists the two records.

RecordFieldsSealed when
protected-restoredrecord, path, reasonThe runner puts a violating path back and reports it.
step-failedrecord, step, attempt, reasonThe control plane fails a job. reason is the job ran past its timeout or the lease lapsed on the last allowed attempt.

Examples:

json
{"record": "protected-restored", "path": "checks/ac-2-sentence-length.rule", "reason": "protected"}
json
{"record": "step-failed", "step": "implement", "reason": "the job ran past its timeout", "attempt": 1}
Schema: daggry/observation@1
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "daggry/observation@1",
  "title": "daggry/observation@1: a protected-restored or a step-failed record",
  "type": "object",
  "required": [
    "record",
    "reason"
  ],
  "additionalProperties": false,
  "properties": {
    "record": {
      "enum": [
        "protected-restored",
        "step-failed"
      ],
      "x-fact-class": "derived"
    },
    "path": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "derived"
    },
    "reason": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "derived"
    },
    "step": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "derived"
    },
    "attempt": {
      "type": "integer",
      "minimum": 1,
      "x-fact-class": "derived"
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "record": {
            "const": "protected-restored"
          }
        },
        "required": [
          "record"
        ]
      },
      "then": {
        "required": [
          "path"
        ],
        "properties": {
          "step": false,
          "attempt": false
        }
      }
    },
    {
      "if": {
        "properties": {
          "record": {
            "const": "step-failed"
          }
        },
        "required": [
          "record"
        ]
      },
      "then": {
        "required": [
          "step",
          "attempt"
        ],
        "properties": {
          "path": false
        }
      }
    }
  ]
}

daggry/run-lock@1 ​

What a run pins at start. It is the first entry of a run.

FieldTypeReqClassConstraints
validatorsarray of objectsyesderived
validators[].namestringyes-Non-empty. The validator's reference. See Versioning.
validators[].versionstringyes-Non-empty.
boundary_rulesarray of stringsyesderivedEach non-empty.
image_digeststringyesderivedNon-empty. The digest of the job image.
workflow_digeststringyesderivedNon-empty. SHA-256 hex of the exact bytes of the workflow file.

boundary_rules holds one string per rule: always <glob> for each always-protected glob, then scope <step id>: <nothing|anywhere|glob> for each step scope, in workflow order, one string per glob for a glob list. The control plane reads the rules back when it rechecks a step. A step with no scope in the lock can write nothing.

The workflow text is also held as a blob under workflow_digest, so daggry verify covers it by re-hashing.

Example for a three-step workflow. The list of always rules is shortened here; a real lock lists every always-protected glob first. The workflow has three steps: plan with scope nothing, draft with scope handbook/** and checks/**, and render with scope anywhere.

json
{
  "validators": [
    {"name": "daggry/base-relative", "version": "0.1.0"},
    {"name": "daggry/baseline-proof", "version": "0.1.0"},
    {"name": "daggry/criterion-coverage", "version": "0.1.0"},
    {"name": "daggry/result-gate", "version": "0.1.0"}
  ],
  "boundary_rules": [
    "always .daggry/**", "always **/AGENTS.md", "always .agents/**", "always **/SKILL.md",
    "always **/.mcp.json",
    "scope plan: nothing", "scope draft: handbook/**", "scope draft: checks/**", "scope render: anywhere"
  ],
  "image_digest": "sha256:0f3c9a1d5e7b2468ace02468ace13579bdf02468ace13579bdf0246813579bdf",
  "workflow_digest": "c8618c0481c6ebedaee10fc75c0cc758a62cab3ddc8d62971ae9680fa73b3b55"
}
Schema: daggry/run-lock@1
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "daggry/run-lock@1",
  "title": "daggry/run-lock@1: what a run pins",
  "type": "object",
  "required": [
    "validators",
    "boundary_rules",
    "image_digest",
    "workflow_digest"
  ],
  "additionalProperties": false,
  "properties": {
    "validators": {
      "x-fact-class": "derived",
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "name",
          "version"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "boundary_rules": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "x-fact-class": "derived"
    },
    "image_digest": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "derived"
    },
    "workflow_digest": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "derived"
    }
  }
}

daggry/work-item@1 ​

A work item is the request the work answers. The record holds the workspace and the request a run is for. The control plane seals it at run start from what it fetched about the request.

The record has two forms. A body holds exactly one of them.

FormFieldsUsed by
Neutralworkspace and request.Every binding.
Softwarerepository and issue.The software binding. See Bindings.

The table lists the fields of both forms.

FieldTypeReqClassConstraints
workspacestringneutral formclaimedNon-empty. The workspace, as the tenant config names it.
requestobjectneutral formclaimedClosed object.
request.refstringyes-Non-empty. What names the request where it comes from, such as a URL or an id.
request.titlestringyes-Any string, can be empty.
request.bodystringyes-Any string, can be empty.
repositorystringsoftware formclaimedPattern ^[^/\s]+/[^/\s]+$.
issueobjectsoftware formclaimedClosed object: url (non-empty string), number (integer, 1 or more), title and body (strings).

Every top-level field is claimed because it comes from a person's text. No gate can read them.

Example in the neutral form:

json
{
  "workspace": "handbook",
  "request": {"ref": "review-118", "title": "Shorten the pay policy", "body": "Sentences in the pay policy are too long."}
}
Schema: daggry/work-item@1
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "daggry/work-item@1",
  "title": "daggry/work-item@1: the workspace and the request a run is for",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "workspace": {
      "type": "string",
      "minLength": 1,
      "x-fact-class": "claimed"
    },
    "request": {
      "x-fact-class": "claimed",
      "type": "object",
      "required": [
        "ref",
        "title",
        "body"
      ],
      "additionalProperties": false,
      "properties": {
        "ref": {
          "type": "string",
          "minLength": 1
        },
        "title": {
          "type": "string"
        },
        "body": {
          "type": "string"
        }
      }
    },
    "repository": {
      "type": "string",
      "pattern": "^[^/\\s]+/[^/\\s]+$",
      "x-fact-class": "claimed"
    },
    "issue": {
      "x-fact-class": "claimed",
      "type": "object",
      "required": [
        "url",
        "number",
        "title",
        "body"
      ],
      "additionalProperties": false,
      "properties": {
        "url": {
          "type": "string",
          "minLength": 1
        },
        "number": {
          "type": "integer",
          "minimum": 1
        },
        "title": {
          "type": "string"
        },
        "body": {
          "type": "string"
        }
      }
    }
  },
  "oneOf": [
    {
      "required": [
        "workspace",
        "request"
      ],
      "properties": {
        "repository": false,
        "issue": false
      }
    },
    {
      "required": [
        "repository",
        "issue"
      ],
      "properties": {
        "workspace": false,
        "request": false
      }
    }
  ]
}

Fact classes by kind ​

Every field has one class, and a gate reads only derived fields. For the classes and the class of every field of every kind, see Fact classes. Every meta value is derived, because code stamps it. Any field a schema does not list has no class.

Sponsored by