Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

Commit fcf594a

Browse files
authored
Update POLICY.md
1 parent 743e13b commit fcf594a

1 file changed

Lines changed: 103 additions & 54 deletions

File tree

POLICY.md

Lines changed: 103 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,156 @@
1-
# Schemas Policy — Protocol Commons
1+
# SCHEMAS_POLICY.md — Protocol-Commons (CommandLayer)
22

3-
This document governs the creation, evolution, and stability of all canonical schemas within the Protocol Commons layer of CommandLayer.
3+
**Scope:** Protocol-Commons
4+
**Status:** v1.0.0 — Stable-Lock
45

5-
Machine interoperability depends on **predictable**, **verifiable**, and **non-breaking** behavior. These rules ensure that autonomous agents integrating Protocol Commons never lose trust in the core semantics.
6+
This document is **NORMATIVE and ENFORCEABLE**.
7+
Machine interoperability depends on **predictable**, **verifiable**, and **non-breaking** semantics.
8+
9+
Protocol-Commons defines the **canonical language of agent intent**.
10+
All schemas under this layer MUST comply with this policy.
611

712
---
813

9-
## 1. Canonical Verb Requirements
14+
## 1. Canonical Verb Requirements — NORMATIVE
1015

11-
A canonical verb MUST:
16+
A **Commons** (canonical) verb MUST:
1217

1318
- Be a **single lowercase word**
1419
- Have exactly **one** interpretation
1520
- Be **domain-neutral** and non-commercial
16-
- Be approved through governance review PRIOR to publication
21+
- Pass governance review **prior to publication**
1722

18-
Commons verbs SHALL NOT encode:
23+
Canonical **Commons** verbs SHALL NOT encode:
1924

20-
- Payments or finance
21-
- Authentication or identity proofing
22-
- Business-specific logic
25+
- Payments, invoicing, authorization, or settlement
26+
- Authentication or identity proofing
27+
- Business, policy, or market-specific logic
2328

24-
Those belong to **Commercial** standards.
29+
> Economic and business semantics belong to **Commercial** verbs —
30+
> their schemas are permanently free, but NOT considered Commons.
2531
2632
---
2733

28-
## 2. Required Artifacts Per Verb
34+
## 2. Directory Layout — NORMATIVE
35+
36+
Each Commons verb MUST follow this **exact directory structure**:
37+
```
38+
schemas/v1.0.0/commons/<verb>/requests/<verb>.request.schema.json
39+
schemas/v1.0.0/commons/<verb>/receipts/<verb>.receipt.schema.json
40+
schemas/v1.0.0/examples/<verb>/valid/.json
41+
schemas/v1.0.0/examples/<verb>/invalid/.json
42+
```
2943

30-
Each verb MUST include:
44+
No aliases, shortcuts, or alternate layouts permitted.
45+
46+
---
3147

32-
- `requests/<verb>.request.schema.json`
33-
- `receipts/<verb>.receipt.schema.json`
34-
- Valid + invalid example sets:
48+
## 3. JSON Schema Requirements — NORMATIVE
3549

36-
`examples/valid/.json`
37-
`examples/invalid/.json`
50+
All Protocol-Commons schemas MUST:
3851

39-
vbnet
40-
Copy code
41-
Schematics MUST reference shared primitives under:
52+
- Use JSON Schema Draft **2020-12**
53+
- Validate under Ajv **strict** mode
54+
- Include `"additionalProperties": false` on every object
55+
- Define `$id` deterministically:
56+
```
57+
https://commandlayer.org/schemas/v1.0.0/commons/
58+
<verb>/requests/<verb>.request.schema.json
59+
```
4260

61+
Schemas MUST reference shared primitives only from:
62+
```
4363
schemas/v1.0.0/_shared/
64+
```
65+
66+
No external schema dependencies permitted.
4467

4568
---
4669

47-
## 3. JSON Schema Requirements
70+
## 4. x402 Alignment — NORMATIVE
4871

49-
- Draft **2020-12**
50-
- Ajv **strict** validation
51-
- `"additionalProperties": false`
52-
- Deterministic `$id` structure:
72+
All **requests MUST contain**:
5373

54-
https://commandlayer.org/schemas/v1.0.0/commons/<verb>/requests/<verb>.request.schema.json
55-
https://commandlayer.org/schemas/v1.0.0/commons/<verb>/receipts/<verb>.receipt.schema.json
74+
- `x402.verb = <verb>`
75+
- `x402.version = "1.0.0"`
5676

77+
All **receipts MUST contain**:
5778

58-
Directory layout MUST NOT vary.
79+
- `x402.status = "ok" | "error"`
5980

60-
---
81+
Receipts MUST echo:
82+
83+
- `trace.requestId`
84+
- `$id` and CID of request schema
6185

62-
## 4. x402 Alignment (Normative)
86+
This guarantees **verifiable interaction lineage**.
6387

64-
**All requests MUST define:**
88+
---
89+
90+
## 5. Immutable Semantics — Anti-Rug
6591

66-
- x402.verb = <verb>
67-
- x402.version = "1.0.0"
92+
Once published:
6893

94+
- **NO** in-place semantic modification permitted
95+
- Breaking behavior change → **major** version (`v2.0.0`)
96+
- Additive change → **minor** version
97+
- Documentation/example fixes → **patch** version
6998

70-
**All receipts MUST define:**
99+
New versions MUST include:
71100

72-
`x402.status = "ok" | "error"`
101+
- Updated **CIDs + SHA-256 checksums**
102+
- Required TXT binding updates where governed
73103

74-
Trace MUST echo `request.trace.requestId`.
104+
Historical versions MUST remain **resolvable forever**.
75105

76106
---
77107

78-
## 5. Immutability
108+
## 6. Validity Requirements — NORMATIVE
79109

80-
Once published:
110+
Every Commons verb MUST provide:
81111

82-
- No modification permitted in-place
83-
- Breaking change → new major version dir
84-
- Additive change → minor version dir
85-
- Example/docs fixes → patch version
112+
- Minimum **3 valid** example instances
113+
- Minimum **3 invalid** example instances including:
114+
- missing required fields
115+
- incorrect types
116+
- unauthorized extra properties
86117

87-
New versions MUST include:
118+
CI MUST enforce:
119+
120+
- No failing examples
121+
- No unreferenced files
122+
- No schema drift across commits
88123

89-
- Updated CIDs
90-
- Updated checksums
91-
- ENS TXT update where applicable
124+
> A verb without test vectors is NOT canonical.
92125
93126
---
94127

95-
## 6. Governance Compliance
128+
## 7. Governance Compliance — NORMATIVE
96129

97-
Every change MUST:
130+
All semantic changes MUST:
98131

99-
- Have an issue link
100-
- Pass CI validation
101-
- Be recorded in `RESOLUTION.md`
102-
- Be signed by governance maintainer
132+
1. Reference an Issue requesting change
133+
2. Pass validation CI
134+
3. Be recorded in `RESOLUTION.md`
135+
4. Be signed by governance maintainer
136+
137+
Silent changes are **forbidden**.
103138

104139
---
105140

106-
_Last updated: v1.0.0 — Stable-Lock_
141+
_Last updated: v1.0.0 — Stable-Lock_
142+
Signed: **`commandlayer.eth`**
143+
*Founding Steward — CommandLayer Semantic Standards*
144+
145+
146+
147+
148+
149+
150+
151+
152+
153+
154+
155+
107156

0 commit comments

Comments
 (0)