Skip to content

Commit d6f995d

Browse files
committed
docs(okf): add optional structured sources metadata
1 parent ba17dd5 commit d6f995d

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

okf/SPEC.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,15 @@ description: <Optional one-line summary>
129129
resource: <Optional canonical URI for the underlying asset>
130130
tags: [<tag>, <tag>, …] # Optional
131131
timestamp: <ISO 8601 datetime> # Optional last-modified time
132+
sources: # Optional machine-readable provenance
133+
- id: <Optional stable source identifier>
134+
type: <Optional source kind>
135+
resource: <Optional URI or bundle-relative path>
136+
locator: <Optional source-specific pointer>
137+
captured_at: <Optional ISO 8601 datetime>
138+
digest:
139+
algorithm: <Optional digest algorithm>
140+
value: <Optional digest value>
132141
# … other producer-defined key/value pairs
133142
---
134143
```
@@ -156,6 +165,8 @@ timestamp: <ISO 8601 datetime> # Optional last-modified time
156165
rather than physical resources.
157166
- `tags` — A YAML list of short strings for cross-cutting categorization.
158167
- `timestamp` — ISO 8601 datetime of last meaningful change.
168+
- `sources` — A YAML list of source records for machine-readable
169+
provenance. See §8.
159170

160171
**Extensions:** Producers MAY include any additional keys. Consumers
161172
SHOULD preserve unknown keys when round-tripping and SHOULD NOT reject
@@ -336,6 +347,28 @@ Citation links MAY be absolute URLs, bundle-relative paths, or paths
336347
into a `references/` subdirectory that mirrors external material as
337348
first-class OKF concepts.
338349

350+
Concepts MAY also include a `sources` frontmatter field containing a
351+
YAML list of source records. `sources` is intended for machine-readable
352+
provenance. It complements, but does not replace, the human-readable
353+
`# Citations` section.
354+
355+
A source record MAY contain:
356+
357+
- `id` — Producer-defined stable identifier for the source.
358+
- `type` — Producer-defined source kind, such as `web_page`, `runbook`,
359+
`dataset`, `conversation_turn`, `ticket`, or `paper`.
360+
- `resource` — Absolute URI or bundle-relative path for the source.
361+
- `locator` — Producer-defined pointer within the source, such as a
362+
line, section, byte range, page, row, turn id, or fragment.
363+
- `captured_at` — ISO 8601 datetime when the producer captured or
364+
snapshotted this source material, if known.
365+
- `digest` — Optional object containing `algorithm` and `value`,
366+
representing a content digest of the source material when the
367+
producer has one.
368+
369+
Consumers SHOULD tolerate additional source record fields and SHOULD
370+
NOT require every source record to contain every field.
371+
339372
---
340373

341374
## 9. Conformance

0 commit comments

Comments
 (0)