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

Project config ​

Reference

Daggry cannot check a project until it knows how: which validators to run and which paths no agent can change. The project config says so. It is one YAML file in the workspace, .daggry/project.yaml, and it describes what the project is, which areas it has, which validators check it and which paths it protects. It holds no workflow, no agent and no approval rule: those are in the Tenant config. Read this page if you are a project owner, or if you write a tool that reads the file. To write your first one, follow Set up a project.

This page defines the sections of the file, the project's script validators, the result contracts and the extension rules. The table names the pages that define what this file leaves out.

TopicPage
The validator interface, the three sources of a validator and the built-in validatorsValidators
The workflows, agents, approval rules and scope of a run on a workspaceTenant config
What a workspace is made of, and which tools read a validator's outputBindings

The files on this page are illustrative. Each one is valid against the published schema. See Validation.

Download ​

The project config and the result document each have a published JSON Schema (draft 2020-12). The table links both files.

SchemaFile
daggry/project@1daggry-project-v1.json
daggry/result@1daggry-result-v1.json

The standard ​

Layout ​

A project config has three parts.

PartKeysRule
HeaderformatRequired. Names the standard and its major version.
Sectionsproject, areas, validators, verification, protectEach is optional. Each appears at most once.
Extensions<namespace>/<key>Any number. See Extension keys.

Each section answers one question a factory asks about a workspace.

SectionQuestion
projectWhat is this project, and how is a copy of it prepared?
areasWhich parts does the workspace have?
validatorsWhich scripts of its own check it?
verificationWhich validator is the project's verification?
protectWhich paths does the project add to the protected set?

Every object is closed: a key that is not listed on this page and is not an extension key is refused.

The header has one key.

KeyTypeRequiredMeaning
formatstringyesAlways daggry/project@1.

format follows the form <namespace>/<name>@<major>, the same form as an artifact kind. A reader refuses a missing format, a malformed one and a major version it does not know. A breaking change to the layout is a new major.

project ​

The project section holds the project's identity and what a copy of the workspace needs. It names no path group: the parts of the workspace are in areas. The table lists its keys.

KeyTypeRequiredMeaning
project.namestringnoThe project's name. Non-empty.
project.toolsarray of labelsnoThe tools a copy of the workspace needs before its validators can run. Each label names a tool and, when it matters, a version.
project.setuparray of commandsnoCommands that prepare a fresh copy of the workspace, in order.
project.entry_pointsarray of pathsnoThe files a reader starts from.

A label is a short name made of ASCII letters, digits, ., _ and -. Labels are an open vocabulary. A reader that does not know a label keeps it and applies nothing.

A command has the form defined in Commands. On a clean copy, a reader runs project.setup before the first validator.

areas ​

The areas section names the parts of the workspace. An area is a named group of paths. areas is a map from an area name to an area, and it is the only place in the four standards that gives a group of paths a name. A name follows the rule for a validator name. The table lists the keys of an area.

KeyTypeRequiredMeaning
pathsarray of globsyesThe paths the area holds. At least one glob, each non-empty.
rolelabelnoWhat the paths are for. Open vocabulary. A binding recommends a set of roles for its kind of work. See Bindings.
descriptionstringnoOne or two sentences for a reader, person or agent. Non-empty.

An area has three uses, and the table lists who names the area in each.

UseWho names the areaEffectDefined in
OrientNobody. The factory reads every name, role and description.None. An area on its own grants and limits nothing.This section.
Scope of a stepA workflow step, in scope, as area:<name>.The step can change only the paths its scope holds.Areas by name
Scope of a runThe tenant, in projects[].areas, or a run request.The run can change only paths inside the named areas.projects
ProtectThe project, in protect.paths, as area:<name>.No step can change a path the area holds.protect

These rules apply to areas.

  • The project names, others choose. The project says which areas exist. It never says which of them a run can change. A workflow chooses the scope of a step, and the tenant or the run request chooses the scope of a run.
  • A name must exist. A step, a tenant entry, a run request or a protect.paths entry that names an area this section lacks is refused. For the first three the run is refused when it starts.
  • Areas can overlap. A path can be in more than one area. A path is inside a scope when at least one named area holds it, and it is protected when at least one protected area holds it.
  • A path in no area is outside the scope of every run that names areas.
  • A role is a label. A reader that does not know a role keeps it and applies nothing. No role freezes a path. Frozen paths come from a step's freeze key. See Frozen paths.

How a scope is judged, and how the scope of a run and the scope of a step combine, is in Scope.

Commands ​

A command is written in one of the two forms in the table. Neither is a shell line.

FormYAMLMeaning
Argument listAn array of non-empty strings, at least one.The first string is the program, and the rest are its arguments. No shell reads them, so no quoting, pipe or variable expansion applies.
Script pathOne string with no whitespace.The path of a script in the workspace, relative to the workspace root. The reader runs the file with no arguments.

A path is never absolute and never holds ... The working directory is the workspace root. A command that needs a pipe or a loop is a script in the workspace.

validators ​

The validators section holds the project's script validators. A script validator is a validator the project declares: an executable or a script in the workspace. validators is a map from a validator name to a script validator. A name starts with a lowercase letter and holds lowercase letters, digits, - and _.

A workflow refers to a validator of this section as project/<name>. A project's script validator counts as evidence only when the tenant admits it. See Admission. What a validator is given, what it yields and where each source of validator runs is in Validators. The table lists the keys of a script validator.

KeyTypeRequiredMeaning
runcommandyesWhat runs. See Commands.
kindlabelyesWhat the validator looks at. Open vocabulary. custom is the label for one that fits no other. A binding names the kinds of its work. See Bindings.
resultobjectnoHow the result is read. Absent means contract: exit-code. See Result contracts.
timeoutintegerno1 or more. The longest the validator can run, in seconds. One that runs longer is stopped and counts as failed.
envarray of namesnoThe allow-list of environment variables the factory can pass to the validator's process. The file holds names, never values.
needs.toolsarray of labelsnoThe tools the validator needs in its runner, by the same labels as project.tools.
needs.runnerstringnoThe class of runner the validator needs, by name. The factory matches the name to a runner class it offers.
exposestringnoWho can call the validator: factory or agent. Absent means factory. See Who runs a validator.

A validator that names a tool or a runner class the factory does not offer cannot run. A reader refuses the run when a validator the run uses cannot run.

Result contracts ​

A result contract says how a factory reads what a script validator decided. The table lists the keys of result.

KeyTypeRequiredMeaning
result.contractstringyesexit-code, document, or the name of an adapter, <namespace>/<adapter>.
result.pathpathnoThe file the validator writes, relative to the workspace root. Absent means standard output.

The standard has the three contracts in the table. None of them names a tool.

ContractReadsGives
exit-codeThe exit code only.Pass when the code is 0, fail otherwise. No findings and no metrics.
documentA result document, daggry/result@1, that the validator writes at result.path or on standard output.The outcome, the findings and the metrics the document holds.
<namespace>/<adapter>The validator's own output, at result.path or on standard output, through an adapter.The result document the adapter writes from that output.

An adapter is a deterministic program that turns one tool's own output format into a result document. The tenant registers each adapter by name in extensions.adapters of the Tenant config. The format an adapter reads is defined by the binding that owns its namespace and is no part of this standard. See Bindings.

These rules apply to every contract.

  • The exit code is always recorded, whatever the contract.
  • Output that the contract cannot read gives no findings. A result document that is missing, does not parse or is not valid against the schema makes the result an error.
  • The result of every script validator a verify step runs is sealed in one form, whatever the contract: a measurement that names the validator and the contract and holds the exit code, an outcome, the findings and the metrics.
  • Code judges. The control plane derives the verdict from the sealed measurement. A script validator never writes its own verdict. See Validators.
  • An adapter runs in the deterministic runner, after the validator's process has ended. It reads the validator's output and nothing else.
  • A reader refuses a contract that is neither exit-code nor document nor an adapter the tenant registers. The run is refused when it starts.

Result document ​

A result document is the one standard form of a check's result. A script validator writes it directly under the document contract, and an adapter writes it for a tool that has a format of its own. The table lists its keys.

KeyTypeRequiredMeaning
formatstringyesAlways daggry/result@1.
outcomestringyesWhat the check decided: pass, fail or error.
findingsarray of objectsnoWhat the check found, one finding for each thing it inspected or each thing it reports. Can be empty.
findings[].idstringyesThe name of the finding, such as the name of a rule or of the item inspected. Non-empty.
findings[].outcomestringyespass, fail, error or skip. skip says the check did not inspect the item.
findings[].locatorstringnoWhere the finding is. A path relative to the workspace root, a path with a position as <path>:<line> or <path>:<line>:<column>, or any other string that names a place. Non-empty.
findings[].messagestringyesAny string, can be empty.
metricsmapnoNumbers the check measured, from a name to a number. A name starts with a lowercase letter and holds lowercase letters, digits and _.

These rules apply to a result document.

  • The outcome is the check's decision. Findings and metrics explain it and do not change it.
  • error is no decision. A check writes error when it could not inspect the workspace. An error counts as a failed check.
  • An id can repeat. Two findings can carry one id, for example one rule that fails in two places. A validator that compares findings by id takes the last one.
  • The document is closed. A key this section does not define and that is not an extension key is refused.

A style check of a set of documents writes this result document.

json
{
  "format": "daggry/result@1",
  "outcome": "fail",
  "findings": [
    {"id": "heading-order", "outcome": "pass", "locator": "handbook/leave.md", "message": ""},
    {"id": "sentence-length", "outcome": "fail", "locator": "handbook/pay.md:14", "message": "The sentence has 41 words. The limit is 30."},
    {"id": "glossary-terms", "outcome": "skip", "locator": "handbook/drafts/", "message": "Drafts are not inspected."}
  ],
  "metrics": {"pages": 12, "reading_grade": 8}
}

verification ​

The verification section says which validator is canonical, which others are measured with it and which limits hold. A project has many validators and exactly one canonical validator. The table lists the keys.

KeyTypeRequiredMeaning
verification.canonicalvalidator nameyes, when verification is presentThe validator that the reference project resolves to in a workflow.
verification.alsoarray of validator namesnoValidators that run with the canonical one, as supporting evidence. No name appears twice, and none is the canonical validator.
verification.thresholdsarray of objectsnoLimits on numbers that those validators give.
verification.thresholds[].validatorvalidator nameyesThe canonical validator or one in also.
verification.thresholds[].readstringyesThe number to read: exit_code, findings, findings.<outcome> or metrics.<name>.
verification.thresholds[].minnumberone of the twoThe lowest value that passes.
verification.thresholds[].maxnumberone of the twoThe highest value that passes.

read names one number of the validator's result, in one of the forms in the table.

readThe numberContracts that give it
exit_codeThe exit code.Every contract.
findingsThe count of findings.document and every adapter.
findings.pass, findings.fail, findings.error, findings.skipThe count of findings with that outcome.document and every adapter.
metrics.<name>The metric of that name.document and every adapter.

These rules apply to verification.

  • project is the project's verification. A verify step that names project runs the canonical validator and each validator in also on a clean copy of the sealed version of the workspace. Each result is sealed as a measurement of its own.
  • A threshold is a finding. The result of each threshold is sealed as a finding in the measurement of the validator it reads. See Threshold findings.
  • A workflow can assume it. A workflow names project and holds no command and no tool. The project config supplies the command, and the factory knows how to read the result.
  • A name must exist. A name in canonical, also or a threshold that validators does not hold is refused.
  • A missed threshold fails verification. The verification is green when the canonical validator passes, every validator in also passes and every threshold holds.
  • Criterion rules need findings. Criterion coverage and the baseline proof read the findings of the canonical validator. See Coverage and the carry rule. They need a canonical validator with the document contract or an adapter. One with exit-code gives a pass or a fail and covers no criterion.

A workflow whose verify step names project needs this section.

Admission ​

The tenant decides whether a project's own scripts count as evidence. A project declares its validators here, and the tenant admits all of them, none of them or a named list in projects[].validators.admit of the Tenant config. The default is none. The table lists what admission changes.

The validator isIn a verify stepAs a preview
AdmittedIt runs, and its result is sealed as evidence.It runs when it has expose: agent.
Not admittedThe run is refused when it starts.It runs when it has expose: agent.

project needs the canonical validator and every validator in also to be admitted.

Who runs a validator ​

A script validator is declared once and is used in the two ways in the table. Only verification produces evidence.

UseStarted byWhere it runsEvidence
VerificationA verify step that names project or project/<name>. See Validators by reference.The deterministic runner, on a clean copy of the sealed version, as an unprivileged user, after any agent process has ended.Yes: one measurement for each validator, and the verdict the control plane derives from it.
PreviewAn agent, for a validator with expose: agent.The agent's pod, on the working copy.Never.

expose says who can start a validator, with one of two values.

ValueMeaning
factoryOnly the factory's deterministic components call the validator. The agent cannot start it.
agentThe agent can also call the validator by name, as a preview.

A validator with expose: agent can also be the canonical validator: the agent previews it, and the factory measures it.

protect ​

The protect section holds the paths this project adds to the protected set. The always-protected paths, the default protection of the files a script validator runs and the boundary check that enforces all of it are defined in Protected paths. This section defines only the project's own additions, in one key.

KeyTypeRequiredMeaning
protect.pathsarray of entriesnoEach entry is a glob or an area reference, area:<name>. Added to the protected set for every run on this workspace.

These rules apply to protect.paths.

  • An entry that starts with area: is an area reference. It protects every path the area holds. A name that areas lacks is refused. Every other entry is a glob.
  • This section only adds. No key removes a path from the protected set.
  • A protected path is in no scope. A step whose scope names an area does not change the area's protected paths.

Extension keys ​

An extension key carries a section or a value that the standard does not define. The table lists the rules.

RuleDetail
Form<namespace>/<key>. Pattern ^[A-Za-z0-9_-]+/[A-Za-z0-9_-]+$.
NamespaceNames the party that defines the key. One party owns every key under its namespace. It is the same form as a key of the envelope's meta.
PlaceAt the top level and inside any section object, including a validator.
ValueAny YAML value in the strict subset.
A reader that knows the keyApplies it.
A reader that does not know the keyIgnores the value and preserves it: a tool that rewrites the file writes the key back unchanged.
A key without a namespaceRefused, unless this page defines it.
LimitAn extension narrows or adds. It never widens a rule of the standard, the project or the tenant, and never changes the meaning of a key this page defines.

A misspelt standard key is therefore an error, and a key in a namespace the reader does not know is not.

YAML subset ​

The file uses the same strict subset of YAML as a workflow file: no anchors, aliases, tags or merge keys, and no duplicate mapping key. See YAML subset.

Where it lives ​

The table says where the file lives, where it is read from and who changes it.

RuleDetail
Folder.daggry/ in the workspace.
Path.daggry/project.yaml.
Read fromThe baseline: the version of the workspace a run starts from. Never the working copy of a step.
Protected.daggry/** is always protected, so no step and no grant changes the file. See Protected paths.
Changed byA person, outside every run. The change takes effect in the next run whose baseline holds it. How a person accepts a change into a workspace is the binding's convention. See Bindings.

A step that edits the file changes nothing for its own run: the edit is put back and recorded, and the validators come from the baseline. The baseline proof uses the baseline's canonical validator too. See Baseline proof.

Precedence ​

Three documents set rules for a run: the tenant config, the project config and the workflow. The tenant's rule wins over the project's, and the project's wins over the workflow's. The full table is in Precedence.

The project config never chooses a workflow, an engine, an approval rule or the scope of a run, and it never widens a tenant rule.

Worked examples ​

A set of documents ​

This workspace holds a handbook, not a program. Its canonical validator is a script of its own that reviews every page against the house style and writes a result document. A second validator verifies the citations, and the agent can preview it. A third needs a variable from the factory and a runner that reaches the network. The file carries one extension key.

yaml
format: daggry/project@1

project:
  name: handbook
  tools: [pandoc-3]
  entry_points: [handbook/index.md]

areas:
  handbook:
    paths: ["handbook/**"]
    role: content
    description: One page for each policy. Each page is one Markdown file.
  sources:
    paths: ["sources/**"]
    role: reference
  style:
    paths: ["style/**"]
    role: config

validators:
  review:
    run: [sh, scripts/review-handbook.sh]
    kind: style
    result:
      contract: document
      path: reports/review.json
    timeout: 300
    needs:
      tools: [pandoc-3]
  citations:
    run: scripts/check-citations.sh
    kind: citations
    result:
      contract: document
    expose: agent
  links:
    run: [sh, scripts/check-links.sh]
    kind: custom
    env: [LINK_CHECK_TOKEN]
    needs:
      runner: networked

verification:
  canonical: review
  also: [citations]
  thresholds:
    - validator: review
      read: metrics.reading_grade
      max: 9
    - validator: citations
      read: findings.skip
      max: 0

protect:
  paths:
    - "area:style"

acme/review:
  owner: docs-team

The table explains the values.

ValueMeaning
reviewThe canonical validator. It writes its result document to reports/review.json. scripts/review-handbook.sh is protected by default. See What a project adds.
citationsA supporting validator, given as a script path. It writes its result document on standard output. The agent can run it as a preview.
linksA validator with the exit-code contract. It is in neither canonical nor also, so it runs only when a verify step names project/links.
metrics.reading_gradeA metric the review validator writes. The verification fails when it is above 9.
findings.skipThe count of citations the validator did not inspect. The verification fails when it is above 0.
area:styleAn area reference. No step changes the house style the validators read.
LINK_CHECK_TOKENThe name of a variable the factory can pass. The file holds no value.
networkedThe name of a runner class. The factory matches it to a class it offers.
acme/reviewA section defined under the namespace acme. A reader that does not know it ignores it and preserves it.

Smallest file ​

The smallest project config that a verify step can use names one validator and makes it canonical. The validator has the exit-code contract.

yaml
format: daggry/project@1
validators:
  review:
    run: [sh, check.sh]
    kind: custom
verification:
  canonical: review

Examples under the software binding ​

The three files in this section are for workspaces that hold programs. Each tool they name, each adapter in the software namespace, each kind and each role belongs to the software binding and is defined in Bindings. The standard on this page defines none of them.

Software binding: a Node project ​

The canonical validator runs vitest, which writes a JUnit XML report. The software/junit adapter reads the report. The linter runs through an npm script that package.json defines. The default protection covers the files a command names and not the files those programs read, so the file protects package.json itself, through an area.

yaml
format: daggry/project@1

project:
  name: shop-web
  tools: [node-22]
  setup:
    - [npm, ci]
    - [npm, run, build]
  entry_points: [src/main.ts]

areas:
  app:
    paths: ["src/**"]
    role: source
    description: The storefront. Pages are under src/pages and shared code under src/lib.
  tests:
    paths: ["src/**/*.test.ts"]
    role: tests
  docs:
    paths: ["docs/**"]
    role: docs
  tooling:
    paths: ["package.json", "vitest.config.ts"]
    role: config

validators:
  test:
    run: [npx, vitest, run, --reporter=junit, --outputFile=reports/junit.xml]
    kind: tests
    result:
      contract: software/junit
      path: reports/junit.xml
    timeout: 600
    needs:
      tools: [node-22]
    expose: agent
  lint:
    run: [npm, run, lint]
    kind: lint
    expose: agent
  types:
    run: [npx, tsc, --noEmit]
    kind: types

verification:
  canonical: test
  also: [lint, types]

protect:
  paths:
    - "area:tooling"

The table explains the values.

ValueMeaning
app, testsTwo areas that overlap: a test file under src/ is in both.
software/junitAn adapter of the software binding. It gives one finding for each test in the report.
toolingAn area for the files the validators read.
area:toolingAn area reference. No step changes package.json or vitest.config.ts.

Software binding: a Rust project ​

cargo test prints one result line for each test, and the software/libtest adapter reads those lines from standard output, so the canonical validator needs no report file. A threshold refuses a skipped test. One entry of protect.paths is a glob.

yaml
format: daggry/project@1

project:
  name: shop-core
  tools: [rust-1.90]
  setup:
    - [cargo, build, --workspace]

validators:
  test:
    run: [cargo, test, --workspace]
    kind: tests
    result:
      contract: software/libtest
    timeout: 1200
  clippy:
    run: [cargo, clippy, --workspace, --, -D, warnings]
    kind: lint
    expose: agent
  fmt:
    run: [cargo, fmt, --check]
    kind: format
    expose: agent

verification:
  canonical: test
  also: [clippy, fmt]
  thresholds:
    - validator: test
      read: findings.skip
      max: 0

areas:
  crates:
    paths: ["crates/**", "Cargo.*"]
    role: source
  docs:
    paths: ["docs/**"]
    role: docs

protect:
  paths:
    - "docs/adr/**"

Software binding: a .NET project ​

dotnet test writes a JUnit XML report through a logger that the test project references, and the software/junit adapter reads it. A second validator is a script that writes a result document with one metric, the share of lines the tests cover, and a threshold sets a floor on it.

yaml
format: daggry/project@1

project:
  name: shop-api
  tools: [dotnet-9]
  setup:
    - [dotnet, restore]
    - [dotnet, build, --no-restore]
  entry_points: [src/Shop.Api/Program.cs]

validators:
  test:
    run: [dotnet, test, --no-build, --logger, "junit;LogFilePath=reports/junit.xml"]
    kind: tests
    result:
      contract: software/junit
      path: reports/junit.xml
    needs:
      tools: [dotnet-9]
  coverage:
    run: scripts/coverage-summary.sh
    kind: coverage
    result:
      contract: document
      path: reports/coverage.json
  format:
    run: [dotnet, format, --verify-no-changes]
    kind: format
    expose: agent

verification:
  canonical: test
  also: [coverage]
  thresholds:
    - validator: coverage
      read: metrics.line_coverage_pct
      min: 80

areas:
  api:
    paths: ["src/Shop.Api/**"]
    role: source
  tests:
    paths: ["tests/**"]
    role: tests

Validation ​

Every YAML example on this page was checked against daggry-project-v1.json with a draft 2020-12 validator, and each one is valid. The result document was checked against daggry-result-v1.json. The rules that a schema cannot state were checked too: every name in canonical, also and a threshold is a validator in the same file, and every area reference in protect.paths names an area in the same file.

To check a file of your own, give the schema and the file to any validator that supports draft 2020-12. The schema does not check that an adapter is registered: that needs the tenant config.

Examples a reader refuses ​

A reader refuses each input in the table.

InputRefusal
No format keyMissing format.
format: daggry/project@2Unknown major.
validatrs: at the top levelUnknown key without a namespace: a misspelt validators.
An area with no paths, or with paths: []An area holds at least one glob.
protect.paths with area:web where areas holds no webNo such area.
protect.paths with area:Web AppNot an area name.
run: sh check.sh --allA shell line. A command is an argument list or one script path.
run: /usr/local/bin/checkAn absolute path.
A validator with no kindMissing kind.
kind: Style ReviewNot a label.
result: with contract: reportNot a contract. A contract is exit-code, document or <namespace>/<adapter>.
result: with contract: acme/sheet where the tenant registers no adapter of that nameNo such adapter. The run is refused when it starts.
result: with schema: https://example.com/s.jsonUnknown key. The form of a result document is fixed.
expose: everyoneNot factory or agent.
env: with TOKEN=abcNot a variable name. The file holds names, never values.
verification: with no canonicalMissing canonical.
canonical: reviews where validators holds reviewNo such validator.
canonical: with a list of two namesOne validator is canonical. The others go in also.
A threshold with neither min nor maxA threshold needs a limit.
A threshold with read: reading_gradeNot a read form. A metric is read as metrics.<name>.

A result document that a reader refuses makes the result an error. The table lists such documents.

InputRefusal
No format key, or format: daggry/result@2Missing format, or unknown major.
outcome: skippedNot pass, fail or error.
A finding with no messageMissing message.
metrics: with pages: "12"A metric is a number.

Next steps ​

The list names the pages to read next.

  • For the validator interface, the three sources of a validator and the built-in validators, see Validators.
  • For what a binding adds for one kind of work, including the adapters of the software binding, see Bindings.
  • For the tenant's side, including which workflows run on a workspace, see Tenant config.
  • For the always-protected paths and the boundary check, see Protected paths.
  • For what another factory implements to read this file, see Conformance.

Sponsored by