@@ -74,7 +74,7 @@ SDKs → Runtimes → x402 → ENS → Receipts
7474
7575## Table of Contents
7676- [ Overview] ( #overview )
77- - [ Why This Exists] ( #why -this-exists )
77+ - [ Why This Exists] ( #Why -this-exists )
7878- [ Quickstart] ( #quickstart )
7979- [ CommandLayer Protocol Stack] ( #commandlayer-protocol-stack )
8080- [ Status] ( #status )
@@ -162,16 +162,27 @@ npm install @commandlayer/protocol-commons
162162```
163163Import and inspect a canonical verb schema:
164164```
165+ import Ajv from "ajv";
165166import analyzeRequest from "@commandlayer/protocol-commons/schemas/v1.0.0/commons/analyze/requests/analyze.request.schema.json";
166167
167- console.log(analyzeRequest.$id); // Deterministic schema ID
168- console.log(analyzeRequest.properties); // Typed input contract for "analyze"
168+ const ajv = new Ajv({ strict: true });
169+ const validate = ajv.compile(analyzeRequest);
170+
171+ const input = {
172+ verb: "analyze",
173+ content: "CommandLayer defines the semantics of agent behavior."
174+ };
175+
176+ console.log(validate(input)); // true or false
177+ console.log(validate.errors); // schema-aligned diagnostics if invalid
169178```
170- ** Use these schemas to:**
171179
172- - validate agent requests and receipts
173- - generate types
174- - enforce consistent behavior across runtimes
180+ ** What this gives you:**
181+
182+ - Deterministic action contracts
183+ - Runtime-level validation
184+ - Reliable cross-agent interoperability
185+ - Immediate SDK/receipt predictability
175186
176187---
177188
@@ -383,3 +394,4 @@ CommandLayer follows a clean separation of concerns:
383394
384395
385396
397+
0 commit comments