195 lines
4.7 KiB
Markdown
195 lines
4.7 KiB
Markdown
# Knowledge Control Plane
|
|
|
|
The control plane is a table or database in which each row stores the mutable metadata for a content chunk. It is authoritative only for fields that are expected to change independently of the canonical chunk content.
|
|
|
|
Typical mutable fields include:
|
|
|
|
- access level;
|
|
- price, currency, and pricing model;
|
|
- usage permissions;
|
|
- lifecycle status;
|
|
- usage and reputation metrics.
|
|
|
|
The control plane does not replace the canonical chunk or its base CIS envelope. It overlays operational state onto that immutable or versioned source.
|
|
|
|
## Conceptual Schema
|
|
|
|
```sql
|
|
chunks (
|
|
did_chunk PRIMARY KEY,
|
|
page_slug,
|
|
path,
|
|
|
|
-- Access control
|
|
access_level ENUM('open', 'preview', 'paid'),
|
|
price DECIMAL,
|
|
currency TEXT,
|
|
pricing_model TEXT,
|
|
|
|
-- Permissions
|
|
can_train BOOLEAN,
|
|
can_summarize BOOLEAN,
|
|
can_redistribute BOOLEAN,
|
|
|
|
-- Operations
|
|
status ENUM('active', 'deprecated'),
|
|
last_updated TIMESTAMP
|
|
)
|
|
|
|
usage_metrics (
|
|
did_chunk,
|
|
total_accesses,
|
|
paid_accesses,
|
|
unique_agents,
|
|
repeat_usage_rate,
|
|
updated_at
|
|
)
|
|
```
|
|
|
|
This schema is conceptual. A production implementation should add the keys, constraints, audit fields, indexes, and controlled vocabularies required by its database and governance model.
|
|
|
|
## Source-of-Truth Boundary
|
|
|
|
| Concern | Authority |
|
|
| --- | --- |
|
|
| Chunk content and stable identity | Base chunk and CIS envelope |
|
|
| Content hash and version lineage | Base chunk and CIS envelope |
|
|
| Semantics and authored provenance | Base chunk and CIS envelope |
|
|
| Access level and permissions | Control plane |
|
|
| Price, currency, and pricing model | Control plane |
|
|
| Lifecycle and operational status | Control plane |
|
|
| Usage and reputation metrics | Control plane or event-derived aggregates |
|
|
| Served representation | Resolved view created from both sources |
|
|
|
|
## Process
|
|
|
|
1. Build the chunks with their base CIS envelope data.
|
|
2. Register each chunk in the control plane by stable `did_chunk`.
|
|
3. Make the control plane authoritative for approved mutable fields.
|
|
4. Change price, access level, permissions, and similar operational state only in the control plane.
|
|
5. Merge the base chunk with the current control-plane values at build time or request time.
|
|
6. Serve the merged result as a resolved view; do not overwrite the canonical base chunk.
|
|
|
|
## Overlay, Not Mutation
|
|
|
|
```text
|
|
Base CIS (immutable or versioned)
|
|
+
|
|
Control plane (mutable)
|
|
=
|
|
Resolved CIS (served)
|
|
```
|
|
|
|
### Option A — Build-Time Merge
|
|
|
|
This is the recommended starting point for a static or infrequently changing system.
|
|
|
|
```text
|
|
chunks.base.json
|
|
+ control-plane overrides
|
|
-> chunks.resolved.json
|
|
```
|
|
|
|
Advantages include simpler hosting, cacheability, and easier inspection. The resolved file must be regenerated whenever a relevant control-plane value changes.
|
|
|
|
### Option B — Runtime Merge Through an API
|
|
|
|
Use runtime resolution when access, permission, or pricing state changes frequently or must be evaluated per requester.
|
|
|
|
```http
|
|
GET /api/chunks/{id}
|
|
```
|
|
|
|
The service:
|
|
|
|
1. loads the base chunk;
|
|
2. retrieves the current control-plane record;
|
|
3. applies authorized overrides;
|
|
4. returns the resolved CIS representation.
|
|
|
|
## Example
|
|
|
|
### Base Chunk
|
|
|
|
```json
|
|
{
|
|
"identity": {
|
|
"did_chunk": "did:xyz"
|
|
},
|
|
"integrity": {
|
|
"cid_chunk": "cid:abc"
|
|
},
|
|
"semantics": {},
|
|
"rights": {
|
|
"usage_permissions": {
|
|
"train": false,
|
|
"summarize": true
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
### Control-Plane Record
|
|
|
|
```json
|
|
{
|
|
"did_chunk": "did:xyz",
|
|
"access_level": "paid",
|
|
"price": "0.05",
|
|
"currency": "USDC",
|
|
"pricing_model": "per_use"
|
|
}
|
|
```
|
|
|
|
### Resolved Response
|
|
|
|
```json
|
|
{
|
|
"identity": {
|
|
"did_chunk": "did:xyz"
|
|
},
|
|
"integrity": {
|
|
"cid_chunk": "cid:abc"
|
|
},
|
|
"semantics": {},
|
|
"rights": {
|
|
"usage_permissions": {
|
|
"train": false,
|
|
"summarize": true
|
|
},
|
|
"economic_terms": {
|
|
"pricing_model": "per_use",
|
|
"price": "0.05",
|
|
"currency": "USDC"
|
|
},
|
|
"access": "paid"
|
|
}
|
|
}
|
|
```
|
|
|
|
## Control-Plane Uses
|
|
|
|
### 1. Pricing Engine
|
|
|
|
- Adjust prices without rewriting content.
|
|
- Test models such as per-use, subscription, or negotiated access.
|
|
|
|
### 2. Access-Control System
|
|
|
|
- Manage transitions between `open`, `preview`, and `paid`.
|
|
- Apply requester-specific permissions or entitlements.
|
|
|
|
### 3. Reputation Aggregator
|
|
|
|
- Maintain or derive usage metrics.
|
|
- Record repeat usage, trusted-agent usage, and task-success signals when evidence supports them.
|
|
|
|
### 4. Analytics Layer
|
|
|
|
- Identify which chunks are accessed, reused, or purchased.
|
|
- Evaluate which resources contribute to revenue or successful outcomes.
|
|
|
|
## Governing Principle
|
|
|
|
The control plane manages knowledge economics and mutable operating policy, not canonical content. Base content remains stable and auditable; the resolved view reflects current operational state.
|