Skip to content

Commit 613f4a4

Browse files
authored
Update README.md
1 parent 4488d4a commit 613f4a4

File tree

1 file changed

+31
-33
lines changed

1 file changed

+31
-33
lines changed

README.md

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,41 @@ SDKs → Runtimes → x402 → ENS → Receipts
6969
3. **x402 enables verifiable invocation and settlement**
7070

7171
---
72+
## Quickstart
73+
74+
```bash
75+
npm install @commandlayer/protocol-commons
76+
77+
```
78+
Import and inspect a canonical verb schema:
79+
```
80+
import Ajv from "ajv";
81+
import analyzeRequest from "@commandlayer/protocol-commons/schemas/v1.0.0/commons/analyze/requests/analyze.request.schema.json";
82+
83+
const ajv = new Ajv({ strict: true });
84+
const validate = ajv.compile(analyzeRequest);
85+
86+
const input = {
87+
verb: "analyze",
88+
content: "CommandLayer defines the semantics of agent behavior."
89+
};
90+
91+
console.log(validate(input)); // true or false
92+
console.log(validate.errors); // schema-aligned diagnostics if invalid
93+
```
94+
95+
**What this gives you:**
96+
97+
- Deterministic action contracts
98+
- Runtime-level validation
99+
- Reliable cross-agent interoperability
100+
- Immediate SDK/receipt predictability
72101

73102
### Protocol‐Commons is the **semantic foundation** of the CommandLayer stack.
74103

75104
## Table of Contents
76105
- [Overview](#overview)
77-
- [Why This Exists](#Why-this-exists)
106+
- [Why this exists](#why-this-exists)
78107
- [Quickstart](#quickstart)
79108
- [CommandLayer Protocol Stack](#commandlayer-protocol-stack)
80109
- [Status](#status)
@@ -163,38 +192,6 @@ Everything else is layered cleanly on top.
163192

164193
---
165194

166-
## Quickstart
167-
168-
```bash
169-
npm install @commandlayer/protocol-commons
170-
171-
```
172-
Import and inspect a canonical verb schema:
173-
```
174-
import Ajv from "ajv";
175-
import analyzeRequest from "@commandlayer/protocol-commons/schemas/v1.0.0/commons/analyze/requests/analyze.request.schema.json";
176-
177-
const ajv = new Ajv({ strict: true });
178-
const validate = ajv.compile(analyzeRequest);
179-
180-
const input = {
181-
verb: "analyze",
182-
content: "CommandLayer defines the semantics of agent behavior."
183-
};
184-
185-
console.log(validate(input)); // true or false
186-
console.log(validate.errors); // schema-aligned diagnostics if invalid
187-
```
188-
189-
**What this gives you:**
190-
191-
- Deterministic action contracts
192-
- Runtime-level validation
193-
- Reliable cross-agent interoperability
194-
- Immediate SDK/receipt predictability
195-
196-
---
197-
198195
## CommandLayer Protocol Stack
199196
```
200197
| Layer | Role |
@@ -405,3 +402,4 @@ CommandLayer follows a clean separation of concerns:
405402

406403

407404

405+

0 commit comments

Comments
 (0)