|
1 | 1 |
|
2 | | -# Protocol Commons Policy |
| 2 | +# Protocol-Commons Policy |
3 | 3 |
|
4 | | -This document defines the canonical rules for creating, validating, and publishing verb schemas in the CommandLayer Protocol Commons. |
| 4 | +This document defines the canonical rules for creating, validating, versioning, and publishing verb schemas in the CommandLayer Protocol Commons. |
5 | 5 |
|
6 | | -The Protocol Commons provides the universal language foundation for all agents and autonomous workflows. |
| 6 | +The Commons is the universal grammar for autonomous agents. |
7 | 7 |
|
8 | 8 | --- |
9 | 9 |
|
10 | | -## 1. Canonical Rules |
11 | | - |
12 | | -All canonical verbs MUST: |
13 | | - |
14 | | -- Be lowercase, single-word identifiers |
15 | | -- Define both: |
16 | | - ``` |
17 | | - <verb>.request.schema.json |
18 | | - <verb>.receipt.schema.json |
19 | | - ``` |
20 | | -- Validate under **strict Ajv** with: |
21 | | - - Draft 2020-12 |
22 | | - - strict mode enabled |
23 | | - - no additionalProperties |
24 | | - - no union types beyond explicitly allowed structures |
25 | | - ---- |
26 | | -- Use deterministic `$id` URLs: |
27 | | - ``` |
28 | | - https://commandlayer.org/schemas/v1.0.0/commons/<verb>/requests/<verb>.request.schema.json |
29 | | - ``` |
30 | | -- Follow fixed directory structure: |
31 | | - ``` |
32 | | - /schemas/v1.0.0/commons/<verb>/... |
33 | | - ``` |
34 | | -- Remain **immutable** once published |
35 | | - |
36 | | -Schemas MUST be domain-neutral and free of vendor-specific semantics. |
| 10 | +## 1. Verbs Must Remain Canonical |
| 11 | + |
| 12 | +- Single lowercase word |
| 13 | +- One meaning; no semantic overload |
| 14 | +- Domain-neutral |
| 15 | +- Published only after governance review |
| 16 | + |
| 17 | +Common verbs **SHALL NOT** model: |
| 18 | +- Payments |
| 19 | +- Contracts / transfers |
| 20 | +- Authentication |
| 21 | +- Business logic |
| 22 | + |
| 23 | +Those belong in the _Commercial_ layer. |
37 | 24 |
|
38 | 25 | --- |
39 | 26 |
|
40 | | -## 2. Required Files Per Verb |
| 27 | +## 2. Required Artifacts Per Verb |
41 | 28 |
|
42 | | -Each verb MUST contain: |
| 29 | +Each canonical verb MUST define: |
43 | 30 |
|
44 | 31 | - `requests/<verb>.request.schema.json` |
45 | 32 | - `receipts/<verb>.receipt.schema.json` |
| 33 | + |
| 34 | +And MUST ship: |
| 35 | +- |
46 | 36 | - `examples/valid/*.json` |
47 | 37 | - `examples/invalid/*.json` |
48 | 38 |
|
49 | | -Request + receipt schemas MUST reference: |
50 | | - |
51 | | -``` |
52 | | -schemas/v1.0.0/_shared/*.schema.json |
53 | | -``` |
54 | 39 |
|
55 | 40 | --- |
56 | 41 |
|
57 | | -## 3. ENS TXT Requirements |
| 42 | +## 3. JSON Schema Requirements |
58 | 43 |
|
59 | | -All canonical verbs MUST have resolvable ENS TXT entries: |
| 44 | +- Draft **2020-12** |
| 45 | +- Ajv **strict mode** |
| 46 | +- `"additionalProperties": false` at top level |
| 47 | +- Deterministic `$id` and directory structure: |
60 | 48 |
|
61 | | -``` |
62 | | -cl.verb=<verb> |
63 | | -cl.version=1.0.0 |
| 49 | +/schemas/v1.0.0/commons/<verb>/ |
64 | 50 |
|
65 | | -cl.entry=x402://<verbagent>.eth/<verb>/v1 |
66 | 51 |
|
67 | | -cl.schema.request=https://commandlayer.org/schemas/v1.0.0/commons/<verb>/requests/<verb>.request.schema.json |
68 | | -cl.schema.receipt=https://commandlayer.org/schemas/v1.0.0/commons/<verb>/receipts/<verb>.receipt.schema.json |
69 | | -
|
70 | | -cl.cid.schemas=<cid-schemas> |
71 | | -cl.schemas.mirror.ipfs=https://ipfs.io/ipfs/<cid-schemas> |
72 | | -
|
73 | | -cl.agentcard=https://commandlayer.org/agent-cards/agents/v1.0.0/commons/<verbagent>.eth.json |
74 | | -cl.cid.agentcard=<cid-agentcard> |
75 | | -cl.agentcard.mirror.ipfs=https://ipfs.io/ipfs/<cid-agentcard>/agents/<verbagent>.eth.json |
| 52 | +--- |
76 | 53 |
|
77 | | -cl.checksum.request=<sha256-request> |
78 | | -cl.checksum.receipt=<sha256-receipt> |
79 | | -cl.checksum.agentcard=<sha256-agentcard> |
| 54 | +## 4. x402 Alignment |
80 | 55 |
|
81 | | -cl.owner=commandlayer.eth |
| 56 | +All requests: |
| 57 | +`x402.verb = <verb>` |
| 58 | +`x402.version = "1.0.0"` |
82 | 59 |
|
83 | | -``` |
84 | 60 |
|
85 | | -ENS bindings are **critical protocol resources** and may only be modified through governance. |
| 61 | +All receipts: |
| 62 | +`x402.status = "ok" | "error"` |
86 | 63 |
|
87 | 64 | --- |
88 | 65 |
|
89 | | -## 4. Versioning Policy |
90 | | - |
91 | | -Version bumps follow: |
| 66 | +## 5. Immutability |
92 | 67 |
|
93 | | -- **MAJOR** — Breaking changes to request/receipt shape, trace semantics, or $id structure |
94 | | -- **MINOR** — Additive fields that do not break interoperability |
95 | | -- **PATCH** — Documentation or example fixes |
96 | | - |
97 | | -Once a directory is versioned (e.g., `v1.0.0`), it is **frozen forever**. |
98 | | - |
99 | | -Upgrades require a parallel directory: |
100 | | - |
101 | | -``` |
102 | | -/schemas/v1.1.0/commons/<verb>/... |
103 | | -``` |
| 68 | +Once published: |
| 69 | +- **No changes** in-place |
| 70 | +- Any update requires a new version directory |
| 71 | +- New CID + new checksums |
| 72 | +- ENS TXT updates |
104 | 73 |
|
105 | 74 | --- |
106 | 75 |
|
107 | | -## 5. Integrity & Provenance |
108 | | - |
109 | | -All schema files MUST be represented in: |
| 76 | +## 6. Breaking Change Rules |
110 | 77 |
|
111 | | -- `checksums.txt` |
112 | | -- `SECURITY_PROVENANCE.md` |
| 78 | +### Requires MAJOR version bump: |
| 79 | +- Removing fields |
| 80 | +- Changing requiredness |
| 81 | +- New semantics for success/error |
| 82 | +- Trace model changes |
113 | 83 |
|
114 | | -Every release MUST: |
| 84 | +### Requires MINOR: |
| 85 | +- Additive `input.*` or `result.*` |
115 | 86 |
|
116 | | -- Update the IPFS CID |
117 | | -- Update checksums |
118 | | -- Update ENS TXT if applicable |
| 87 | +### PATCH: |
| 88 | +- Example or documentation fixes |
119 | 89 |
|
120 | 90 | --- |
121 | 91 |
|
122 | | -## 6. Immutability Principle |
| 92 | +## 7. Governance Compliance |
123 | 93 |
|
124 | | -The Protocol Commons operates under a strict immutability rule: |
125 | | - |
126 | | - No schema changes, once published in a versioned directory, may be altered in-place. |
127 | | - |
128 | | -All corrective or breaking changes MUST be handled via new versioned directories. |
129 | | - |
130 | | ---- |
| 94 | +Every change MUST: |
| 95 | +- Have an issue link |
| 96 | +- Be recorded in `RESOLUTION.md` |
131 | 97 |
|
132 | | -## 7. Deprecation Policy |
133 | 98 |
|
134 | | -Deprecated verbs or schemas MUST be: |
135 | 99 |
|
136 | | -1. Logged in `RESOLUTION.md` (with rationale and timestamp) |
137 | | -2. Documented in `SPEC.md` |
138 | | -3. Preserved for backward compatibility |
139 | 100 |
|
140 | | -Removal is only permitted for verified security risks and MUST include a migration path. |
141 | 101 |
|
142 | | -## Links |
143 | 102 |
|
144 | | -- [SECURITY POLICY](./SECURITY.md) — responsible disclosure and vulnerability handling |
145 | | -- [RESOLUTION](./RESOLUTION.md) — governance and deprecation log |
146 | | -- [POLICY](./POLICY.md) — verbs and ENS binding rules |
147 | | -- [GOVERNANCE](./GOVERNANCE.md) — decision-making and multisig control |
148 | 103 |
|
149 | 104 |
|
150 | 105 |
|
|
0 commit comments