Skip to content

Task file reference

Contract: https://example.org/governed-harness/schemas/v1/task.schema.json (JSON Schema 2020-12).

harness task create --file task.yaml accepts YAML or JSON and persists a task that validates against this schema. The loader is lenient: a requirement or acceptance criterion may be a plain string, a missing taskId or item id is generated, snake_case aliases are accepted, projectId defaults to the project and schemaVersion and createdAt are set by the harness. Unknown top-level keys are ignored, and a missing title or intent is currently stored as the text None instead of being rejected (issue #29), so always provide both.

At least one acceptance criterion is required, except when the project sets intake.criteriaPolicy: enforce: then a task without criteria is accepted and stored with criteriaPending: true, and INTENT asks for its criteria (rule C0). Only the harness sets criteriaPending, and it removes the field once harness task clarify adds the first criterion.

Task

Field Type Required Constraints
acceptanceCriteria array of AcceptanceCriterion yes
checklist array of ChecklistItem no
constraints array of string no
contract OperationalContract or null no
createdAt string (date-time) no
criteriaPending boolean no default false
implementation ImplementationInstruction no
intent string yes min length 1; max length 16000
metadata object no
probes array of ProbeDefinition no
projectId string yes
requirements array of Requirement no
schemaVersion 1.0 no default "1.0"
taskId string yes
title string yes min length 1; max length 300

AcceptanceCriterion

Field Type Required Constraints
criterionId string yes
priority MUST | SHOULD | COULD no default "MUST"
text string yes min length 1; max length 8000
verification CriterionVerification or null no
verificationHint string or null no max length 4000

ChecklistItem

Field Type Required Constraints
id string yes pattern ^[A-Za-z0-9][A-Za-z0-9_.-]{0,63}$
text string yes min length 1; max length 2000

CriterionVerification

Field Type Required Constraints
deferred string or null no max length 1000
level VerificationLevel yes
manual string or null no max length 2000
probe string or null no
tests array of string no

FilePatch

Field Type Required Constraints
content string or null no
expectedSha256 string or null no
operation create | replace | append | delete yes
path string yes

ImplementationInstruction

Field Type Required Constraints
argv array of string no
cwd string no default "."
mode none | patch | command no default "none"
patches array of FilePatch no

OperationalContract

Field Type Required Constraints
branch string or null no max length 200
comment boolean or null no
coverageThreshold number or null no
createPullRequest boolean or null no
definitionOfDone array of string no
examples array of string no
objective string or null no max length 4000
outOfScope array of string no
push boolean or null no
scope array of string no
scopePaths array of string no
verificationLevel VerificationLevel or null no

ProbeAssertion

Field Type Required Constraints
after string or null no
before string or null no
contains string or null no
equals any no
kind exitCode | jsonPath | differs | order | text yes
matches string or null no
order ascending | descending or null no
path string or null no
present boolean or null no
variants array of string no

ProbeDefinition

Field Type Required Constraints
assertions array of ProbeAssertion yes
command array of string yes
criteria array of string no
cwd string no default "."
id string yes pattern ^[a-z0-9][a-z0-9_.-]{0,63}$
level VerificationLevel no default "L3"
matrix map of array of string no
output json | text no default "text"
passEnv array of string no
timeoutSeconds integer no default 60
variants array of ProbeVariant no

ProbeVariant

Field Type Required Constraints
env map of string no
name string yes min length 1; max length 200
values map of string no

Requirement

Field Type Required Constraints
requirementId string yes
source string no default "human"
text string yes min length 1; max length 8000

VerificationLevel

Field Type Required Constraints