Skip to content

Commit d943a42

Browse files
authored
Update README.md
1 parent 07de15c commit d943a42

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ Autonomous agents fail at scale without shared meaning:
2828
**Protocol-Commons** fixes this with a global action language:
2929
canonical verbs + JSON Schemas + strict validation.
3030

31-
If agents can’t agree on what actions mean → **nothing works**.
32-
31+
**If agents can’t agree on what actions mean → nothing works.**
3332

3433
---
3534
## Real verbs. Real receipts.
@@ -87,19 +86,18 @@ npx cl-validate examples/v1.0.0/commons/summarize/request.json
8786
**Programmatic usage**
8887
```
8988
import Ajv from "ajv";
90-
import req from "@commandlayer/protocol-commons/schemas/v1.0.0/commons/analyze/requests/analyze.request.schema.json";
89+
import analyzeRequest from "@commandlayer/protocol-commons/schemas/v1.0.0/commons/analyze/requests/analyze.request.schema.json";
9190
9291
const ajv = new Ajv({ strict: true });
93-
const validate = ajv.compile(req);
92+
const validate = ajv.compile(analyzeRequest);
9493
95-
console.log(validate({
94+
const input = {
9695
verb: "analyze",
9796
content: "CommandLayer defines semantics."
98-
}));
99-
97+
};
10098
10199
console.log(validate(input)); // true or false
102-
console.log(validate.errors); // schema-aligned diagnostics if invalid
100+
console.log(validate.errors); // diagnostics if invalid
103101
```
104102

105103
## What Commons enables
@@ -423,3 +421,4 @@ CommandLayer follows a clean separation of concerns:
423421

424422

425423

424+

0 commit comments

Comments
 (0)