"description":"Schema for runs/{slug}/meta.json — run metadata for a Tier 1 local structured run. Authoritative layout: templates/runs-layout.md. Boundary rule: rules/two-tier-artifacts.md. State transitions active -> archived at close (archive-at-close).",
"description":"Optional JSON Schema $self reference for editor validation."
},
"schema_version":{
"type":"integer",
"const":1,
"description":"Layout schema version. Bumped on breaking changes to this shape."
},
"slug":{
"type":"string",
"pattern":"^[a-z0-9][a-z0-9-]*$",
"description":"Run slug. Matches the workflow branch tail and the Gitea wiki namespace."
},
"ticket":{
"oneOf":[
{"type":"null"},
{
"type":"object",
"additionalProperties":false,
"required":["owner","repo","number"],
"properties":{
"owner":{"type":"string","minLength":1},
"repo":{"type":"string","minLength":1},
"number":{"type":"integer","minimum":1}
}
}
],
"description":"Source issue reference, or null for an ad-hoc run (no ticket)."
},
"branch":{
"type":"string",
"description":"Workflow branch, e.g. workflow/enhancement/1968-two-tier-artifacts. Omitted for ad-hoc runs without a branch (both runs-bundle profiles tolerate omission)."
},
"worktree":{
"type":["string","null"],
"description":"Absolute path of the worktree hosting this run, or null for ad-hoc runs without a worktree (aligned with runs-bundle.schema.json metaStrict)."
},
"parent_epic":{
"oneOf":[
{"type":"null"},
{
"type":"object",
"additionalProperties":false,
"required":["number"],
"properties":{
"number":{"type":"integer","minimum":1}
}
}
],
"description":"Parent Epic issue number, or null if the run is not under an Epic."
},
"state":{
"type":"string",
"enum":["active","archived"],
"description":"active: run in progress (workspace gitignored). archived: closed; bundle committed under runs/archive/{slug}.json."
"description":"RFC 3339 timestamp set at archive-at-close, or null while active."
},
"close_commit_sha":{
"type":["string","null"],
"pattern":"^([0-9a-f]{40}|[0-9a-f]{64})$",
"description":"git SHA of the commit that landed archive/{slug}.json; null while active. Must be non-null when state=archived (enforced by the if/then invariant)."