This commit is contained in:
eddiesoehnel committed 2026-08-15 11:49:05 -06:00
1 parent d5411194a8
commit 41917c8e11
18 files changed
+1397 -1125

No files matched your search

+128 -71
View File
@@ -1,17 +1,27 @@
# Overview
# Knowledge Control Plane
A table/database, where each row contains the metadata for each chunk.
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.
Authoritative only for mutable fields.
Typical mutable fields include:
Recommended schema (conceptual)
- 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'),
access_level ENUM('open', 'preview', 'paid'),
price DECIMAL,
currency TEXT,
pricing_model TEXT,
@@ -21,8 +31,8 @@ chunks (
can_summarize BOOLEAN,
can_redistribute BOOLEAN,
-- Ops
status ENUM('active','deprecated'),
-- Operations
status ENUM('active', 'deprecated'),
last_updated TIMESTAMP
)
@@ -34,61 +44,82 @@ usage_metrics (
repeat_usage_rate,
updated_at
)
```
# Process
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.
1. Build chunks with CIS evelope data
## Source-of-Truth Boundary
2. Register each chunk in control plane
| 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 |
3. Control plane becomes authority for mutable fields
## Process
You change:
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.
price
access level
permissions
## Overlay, Not Mutation
ONLY in the table
4. Runtime merge
Instead of rewriting the chunk file directly every time:
merge DB values at serve time (or build time)
Option A (recommended early): build-time merge
When generating your site:
chunks.base.json (immutable)
+ control-plane overrides
→ chunks.resolved.json (served)
Option B (later): runtime merge via API
GET /api/chunks/{id}
→ loads base chunk
→ overlays DB values
→ returns resolved CIS
Overlay, Not Mutation
Think of it like:
Base CIS (immutable)
+
Control Plane (mutable)
=
```text
Base CIS (immutable or versioned)
+
Control plane (mutable)
=
Resolved CIS (served)
```
Example
### Option A — Build-Time Merge
Base chunk (file)
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": {...},
"identity": {
"did_chunk": "did:xyz"
},
"integrity": {
"cid_chunk": "cid:abc"
},
"semantics": {},
"rights": {
"usage_permissions": {
"train": false,
@@ -96,20 +127,36 @@ Base chunk (file)
}
}
}
Control plane row
```
### Control-Plane Record
```json
{
"did_chunk": "did:xyz",
"access_level": "paid",
"price": "0.05",
"currency": "USDC"
"currency": "USDC",
"pricing_model": "per_use"
}
Served response
```
### Resolved Response
```json
{
"identity": {...},
"integrity": {...},
"semantics": {...},
"identity": {
"did_chunk": "did:xyz"
},
"integrity": {
"cid_chunk": "cid:abc"
},
"semantics": {},
"rights": {
"usage_permissions": {...},
"usage_permissions": {
"train": false,
"summarize": true
},
"economic_terms": {
"pricing_model": "per_use",
"price": "0.05",
@@ -118,20 +165,30 @@ Served response
"access": "paid"
}
}
```
# Control Plane Table Uses
## Control-Plane Uses
Your table is not just admin—it becomes:
### 1. Pricing Engine
1. Pricing engine
adjust prices dynamically
test models (per-use vs subscription)
2. Access control system
open → preview → paid transitions
3. Reputation aggregator
usage metrics live here
4. Analytics layer
which chunks drive revenue
which get reused
- Adjust prices without rewriting content.
- Test models such as per-use, subscription, or negotiated access.
It is a control plane for knowledge economics, not just content management
### 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.