Context Object Specification (COS)
Version: 0.2
Chapter: 260 — Metadata
Status: Informative — Supporting
Category: Core Model
1. Purpose
This chapter defines metadata guidance for the Context Object Specification (COS).
In COS v0.2 lean core, metadata is intentionally small.
It exists purely for observability, traceability, and versioning.
It does NOT describe content meaning.
2. Conceptual Role
If:
- Semantic = meaning
- Recommendation = action possibility
Then:
Metadata = system-level truth about the Context Object itself
It answers:
“How was this Context Object created and transformed?”
3. Definition
Metadata is a structured, non-semantic layer that describes the lifecycle and provenance of a Context Object.
It is independent of:
- content
- structure
- semantic interpretation
- recommendations
4. Core Principle
Metadata is:
about the system, not about the content
This principle enforces strict separation between:
- content understanding
- system observability
5. Lean Meta Model
interface Meta {
createdAt?: number;
adapter?: string;
stages?: string[];
}
createdAt is an integer count of milliseconds since the Unix epoch.
Detailed source information belongs to the top-level source field.
stages MAY list minimal generation stages such as:
["selection", "source", "context", "relations"]
stages is not a detailed pipeline trace. It exists only to indicate which major parts of the lean object were produced.
Detailed pipeline traces and integrity data SHOULD be placed in Extensions.
6. Extended Metadata (Optional)
Implementations MAY expose extended metadata for debugging or audit use cases.
interface ExtendedMetadata {
pipeline?: PipelineTrace;
integrity?: IntegrityInfo;
}
7. Pipeline Trace
Represents how the Context Object was transformed.
interface PipelineTrace {
stages: PipelineStageTrace[];
}
interface PipelineStageTrace {
name: string;
timestamp?: number;
durationMs?: number;
status?: "success" | "failed" | "skipped";
}
8. Integrity Information
Optional verification and consistency metadata.
interface IntegrityInfo {
hash?: string;
checksumAlgorithm?: "sha256";
validated?: boolean;
}
9. Immutability Rule
Metadata MUST reflect the history of a Context Object.
It MUST NOT be used to modify or reinterpret:
- semantic content
- hierarchy structure
- recommendations
10. Observability Principle
Metadata MUST enable:
- debugging pipeline execution
- tracing transformation stages
- verifying data consistency
- reproducing Context Object generation
11. Non-Semantic Constraint
Metadata MUST NOT include:
- content interpretation
- semantic labeling
- user intent inference
- recommendation logic
It is strictly system-level.
12. Relationship to Context Object
Meta is an optional top-level component of the Context Object:
Context Object
├── source
├── selection
├── context
└── meta?
13. Determinism Note
Metadata MAY include non-deterministic fields (e.g., timestamps).
However:
- pipeline trace SHOULD be reproducible
- structural metadata SHOULD remain consistent across runs
14. Example (Informative)
{
"createdAt": 1720250000000,
"adapter": "web-adapter",
"stages": ["selection", "source", "context"]
}
15. Design Notes
Metadata is deliberately kept outside content context to avoid:
- mixing system telemetry with content meaning
- contaminating Consumer reasoning with execution details
- coupling protocol with implementation internals
It ensures COS remains both interpretable and debuggable at scale.
16. Summary
Metadata defines optional system-level facts about a Context Object.
It provides limited observability without interfering with source, selection, or context interpretation.
Detailed observability belongs in Extensions.