implementation-work schema (v0.1)
The implementation-work file is validated by the normative JSON Schema published at its canonical URL:
- $id: https://contextbrew.dev/schemas/implementation-work/v0.1/schema.json
- Format version:
0.1.0 - Schema dialect: draft-07
- Validate with:
ctx schema implementation-workor any JSON Schema validator (ajv, VS Code, …)
Root object: WorkDefinition
Section titled “Root object: WorkDefinition”Immutable authored intention (WIRE-03 required fields).
| Property | Type | Required | Description |
|---|---|---|---|
format | "cb.implementation-work/v1" | yes | |
schemaVersion | "0.1.0" | yes | |
definitionId | string | yes | |
revisionDigest | Digest | yes | Immutable content digest — excludes itself and transport receipts. |
parentRevisionDigests | Digest[] | yes | |
scopeRef | ScopeRef | yes | |
recipeRef | object | null | yes | Canonical recipe identity + exact revision; null ONLY for task-only definitions. |
sourcePin | object | yes | Exact closure ref, or immutable release artifact set + digest; mode explicit. |
operations | WorkOperation[] | yes | |
createdFrom | object | yes |
Definitions
Section titled “Definitions”AllowedScope
Section titled “AllowedScope”Allowed artifact/resource scope for an operation.
| Property | Type | Required | Description |
|---|---|---|---|
pathPrefixes | RepoRelativePath[] | yes | |
resourceBindingIds | | yes | |
artifactKinds | | yes |
Digest
Section titled “Digest”Tagged sha256 digest, sha256: + 64 lowercase hex — the frozen profile.
Type: string
ObjectRevisionRef
Section titled “ObjectRevisionRef”Enrolled object revision reference — the preferred exact reference.
| Property | Type | Required | Description |
|---|---|---|---|
refType | "object-revision" | yes | |
objectId | string | yes | |
revisionHash | Digest | yes | |
rootClosureDigest | Digest | null | yes | |
kind | PieceKind | yes |
PieceKind
Section titled “PieceKind”Type: "cbrl.requirement" | "cbrl.acceptance-criteria" | "cbrl.test-case" | "ddd.aggregate" | "ddd.invariant"
PieceRef
Section titled “PieceRef”Type: ObjectRevisionRef | SourceElementRef
RepoRelativePath
Section titled “RepoRelativePath”Normalized repository-relative POSIX path (no leading /, no ..).
Type: string
ScopeRef
Section titled “ScopeRef”Authorized scope mapping (WIRE-03 scopeRef).
| Property | Type | Required | Description |
|---|---|---|---|
authority | string | yes | |
orgId | string | yes | |
projectId | string | yes | |
repoScopeId | string | yes | |
mappingRevision | Digest | yes | Revision of the project↔repo mapping this scope was resolved against. |
SourceElementRef
Section titled “SourceElementRef”Legacy exact-source locator (ROP-11 bridge). Proves identity in the pinned snapshot only — NO cross-rename continuity, no fabricated object IDs.
| Property | Type | Required | Description |
|---|---|---|---|
refType | "source-element" | yes | |
authority | string | yes | |
repoScope | string | yes | |
model | string | yes | |
sourceCommit | Digest | yes | |
sourceBytesDigest | Digest | yes | |
codecVersion | string | yes | |
elementKind | PieceKind | yes | |
nativeSelector | string | yes | Uniquely resolved native key/owner selector — label alone is invalid. |
nativeCriterionId | string | yes | |
selectedPayloadDigest | Digest | null | yes |
TargetSelector
Section titled “TargetSelector”Explicit target selector inside an operation.
| Property | Type | Required | Description |
|---|---|---|---|
targetId | string | yes | |
componentPath | RepoRelativePath | null | yes |
WorkAction
Section titled “WorkAction”Type: "create" | "update" | "remove" | "use" | "preserve" | "verify" | "refactor" | "migrate"
WorkOperation
Section titled “WorkOperation”A single closed operation record (ROP-07 intent shape).
| Property | Type | Required | Description |
|---|---|---|---|
operationId | string | yes | |
action | WorkAction | yes | |
pieceRefs | PieceRef[] | yes | |
intent | string | yes | |
expectedOutcome | string | yes | |
requiredCriteria | | yes | Versioned registered criteria this operation is accountable for. |
requiredChecks | | yes | Versioned registered checks; command text is advisory, never authority. |
preserve | | yes | Preservation obligations spanning this operation (may span several). |
dependsOn | | yes | |
targetSelector | TargetSelector | yes | |
allowedScope | AllowedScope | yes | |
adapterRequirement | string | yes | Registered specialization/adapter requirement (refactor/migrate). |
predecessorRef | PieceRef | null | yes | Predecessor piece/revision retained for remove (ROP-07). |
retirementScope | object | null | yes | Explicit retirement scope — REQUIRED for remove (affected consumers + data policy). |
See the schemas overview for the versioning policy and how these files are generated and kept in sync.
