Context Object Specification (COS)
Version: 0.2
Chapter: 270 — Extension
Status: Normative
Category: Core Model
1. Purpose
This chapter defines the Extension System of the Context Object Specification (COS).
The Extension System enables COS to support domain-specific enhancements without modifying the Core Model.
Extensions are the only sanctioned mechanism for evolving COS capabilities.
2. Conceptual Role
If:
- Core Model = stable foundation
- Semantic = meaning layer
- Recommendation = action layer
Then:
Extension = controlled expansion mechanism
It answers:
“How can COS evolve without breaking compatibility?”
3. Definition
An Extension is a namespaced, optional augmentation to the Context Object that introduces domain-specific structure or behavior.
Extensions:
- do not modify Core Model
- do not override existing semantics
- do not alter interpretation rules
They only add isolated capability domains.
4. Core Principle
Extensions MUST follow:
Additive only, never invasive
This ensures:
- core object isolation
- predictable evolution
- isolation of complexity
5. Extension Model (Conceptual)
interface ExtensionEntry {
namespace: string;
version: string;
payload: Record<string, unknown>;
}
A Context Object carries extensions as an optional list:
interface ExtensionCollection {
extensions?: ExtensionEntry[];
}
6. Namespace Rule
Every Extension MUST define an owner-qualified namespace using reverse-domain notation. A namespace contains at least two dot-separated lowercase labels; labels MAY contain ASCII digits and interior hyphens.
Examples:
org.example.pdfio.github.context-object-spec.browsercom.example.editor.code
An owner MUST control the corresponding domain or project namespace. A Context Object MUST NOT contain the same Extension namespace more than once. COS v0.2 does not operate a central namespace registry.
7. Isolation Principle
Each Extension MUST operate in isolation.
This means:
-
Extensions MUST NOT modify Core fields:
versionsourceselectioncontextmeta
-
Extensions MAY reference Core fields but MUST NOT alter their defined meaning.
8. Optionality Rule
Extensions are OPTIONAL by design.
A valid Context Object:
- MAY contain zero extensions
- MAY contain multiple extensions
- MUST remain valid without any extension
9. Versioning Rule
Each Extension MUST declare its version explicitly.
Versioning MUST:
- be independent of COS version
- follow semantic versioning (MAJOR.MINOR.PATCH)
This allows independent evolution.
10. Extension Data Model
The payload field contains namespace-specific data.
Its structure is defined by the owning Extension namespace, not by COS Core.
Consumers that do not support the namespace MUST ignore the payload safely.
11. Execution Boundary
Extensions MUST NOT introduce execution logic into COS core.
They MAY:
- define domain-specific structure
- define parsing rules (external to COS core)
- define interpretation hints
They MUST NOT:
- execute actions
- trigger pipelines
- alter recommendation behavior directly
12. Compatibility Guarantee
A Context Object MUST remain valid regardless of:
- unknown extensions
- unsupported extensions
- missing extensions
Consumers MUST ignore unknown namespaces safely.
13. Forward Compatibility Principle
Consumers SHOULD:
- ignore unknown extensions
- preserve extension payload during transport
- avoid destructive normalization
14. Relationship to Core Model
Extensions attach to the Context Object as an independent layer:
Context Object
├── version
├── source
├── selection
├── context
├── meta?
└── extensions? ← this chapter
15. Example (Informative)
{
"extensions": [
{
"namespace": "org.example.pdf",
"version": "1.0.0",
"payload": {
"pageNumber": 12,
"bbox": {
"x": 120,
"y": 340,
"width": 200,
"height": 80
}
}
}
]
}
16. Design Notes
The Extension system is intentionally minimal but strict.
It is designed to:
- prevent core model pollution
- enable domain specialization
- support ecosystem growth
Without this layer, COS would either become:
- too rigid (no evolution)
- or too chaotic (core drift)
17. Summary
Extension is the controlled evolution mechanism of COS.
It enables the protocol to grow across domains while preserving the stability of the Core Model.
Within COS, Extension is the boundary between core stability and ecosystem innovation.