Skip to content

Commit fd00fa2

Browse files
authored
Merge branch 'main' into codex/move-readme-table-of-contents-to-top
2 parents 51afb12 + f4a08db commit fd00fa2

File tree

176 files changed

+1107
-348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+1107
-348
lines changed

ONBOARDING.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,19 @@ Canonical definitions → `SPEC.md`.
7474

7575
## 4. Working Norms
7676

77-
Before changing schemas or examples:
77+
```
78+
npm install
79+
npm run validate
80+
```
7881

79-
- Read `SCHEMAS.md` for layout and versioning rules
80-
- Read `SPEC.md` for the contract you are changing
81-
- Treat published version folders as immutable unless governance explicitly opens a new release line
82-
- Use `npm run validate` as the default repo-wide verification command
82+
Use the subcommands only when you need a narrower loop:
83+
84+
```
85+
npm run validate:schemas
86+
npm run validate:examples
87+
```
88+
5. Update `RESOLUTION.md`, provenance
89+
6. Submit PR with version class (MAJOR/MINOR/PATCH)
8390

8491
If you are preparing a contribution, follow `CONTRIBUTING.md`.
8592

@@ -91,6 +98,16 @@ If you are preparing a contribution, follow `CONTRIBUTING.md`.
9198
- Fully traceable governance + checksums
9299
- Deterministic $id + HTTP resolution
93100

101+
## 5A. Fixture Rules
102+
103+
When you touch `examples/`, keep the validation surface credible:
104+
105+
- valid examples should be realistic, not cartoon placeholders
106+
- invalid examples should usually test one clear failure, not five at once
107+
- filenames should explain the scenario (`missing-input`, `invalid-version`, `extra-property`, etc.)
108+
- request examples must stay verb-aligned; do not copy an invalid fixture from one verb directory into another
109+
- valid receipts should use realistic `sha256:` digests and CID-shaped values
110+
94111
Default assumption: **new version** for any semantic change.
95112

96113
## 6. Support

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ If agents cannot agree on what actions mean, interoperability breaks.
9999
"status": "ok",
100100
"timestamp": "2026-03-18T12:00:00Z",
101101
"agent": "summarizeagent.eth",
102-
"request_hash": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
103-
"result_hash": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
104-
"result_cid": "bafybeisummarizereceiptokexample0001",
102+
"request_hash": "sha256:4b87d90208e62430a5d8f577938fd26d02d646f092d137cee66216c0daac8243",
103+
"result_hash": "sha256:8b5d2d4dfb4a8bb7d4d1ed436e78c5f4bcf6ca9714ec93a8db8e5ec6ed8b1b8d",
104+
"result_cid": "bafybeif6h8j0l2n4p6r8t0v2x4z6b8d0f2h4j6l8n0p2r4t6v8x0z2bd",
105105
"summary": "Commons v1.1.0 makes requests smaller and receipts easier to verify while preserving stable verb semantics.",
106106
"signature": "sigAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
107107
}
@@ -128,13 +128,15 @@ Install Commons and AJV:
128128
npm install @commandlayer/commons ajv ajv-formats ajv-errors
129129
```
130130
131-
**Validate all schemas and examples with the repo's working commands**
131+
**Validate the full repo surface**
132132
133133
```bash
134134
npm install
135135
npm run validate
136136
```
137137
138+
`npm run validate` is the primary command: it compiles every schema and then checks that all shipped examples pass or fail exactly as intended.
139+
138140
**Validate a specific example against the published schema using AJV**
139141
140142
```bash
@@ -419,14 +421,30 @@ Published version directories must not be edited in place.
419421
Use `npm run validate` as the canonical repo-wide validation command. For targeted checks, the repo also exposes:
420422
421423
```bash
424+
npm run validate
422425
npm run validate:schemas
423426
npm run validate:examples
424427
```
425428
426-
These commands compile schemas in strict Ajv mode and validate the shipped examples for both `v1.0.0` and `v1.1.0`.
429+
- `npm run validate` — the main contributor command. Compiles every schema, then validates every shipped example.
430+
- `npm run validate:schemas` — schema compilation only. Useful when changing schema files or Ajv configuration.
431+
- `npm run validate:examples` — fixture pass/fail verification only. Useful when editing examples or improving failure coverage.
432+
433+
For `v1.1.0`, fixture discipline matters as much as schema compilation: valid examples must look operationally plausible, and invalid examples should usually fail for one clear reason that matches the filename.
427434
428435
---
429436
437+
## Fixture discipline
438+
439+
For `examples/v1.1.0/commons/`, contributors should treat fixtures as protocol evidence, not filler:
440+
441+
- valid examples should look realistic enough that an implementer could model against them
442+
- invalid examples should usually exercise one clear failure mode
443+
- filenames should describe the exact failure being tested
444+
- request fixtures must stay aligned with the verb directory they live in; deliberate wrong-verb cases must be explicitly named
445+
- valid receipts should use realistic digest and CID-shaped values instead of toy placeholders
446+
447+
430448
## License
431449
432450
MIT.

checksums.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ b451b0c05cb77f7ad66906f351b560400447de136c1ad2ce27c63fc3bcaf0d9a schemas/v1.0.0
2424
ccb7f20562d2e34dff73a17794aabcf98f25f659e83a790e42cf9a31e97460b3 schemas/v1.0.0/commons/summarize/receipts/summarize.receipt.schema.json
2525
be565b5a72dc03a1517a9c2ea0a0842c86def2e58e8471f81e3cac6262bffb68 schemas/v1.0.0/commons/summarize/requests/summarize.request.schema.json
2626
4760c15bc2985b35be8a333859e0b2e97617735be0d0222722b162de47caf940 schemas/v1.1.0/commons/analyze/analyze.receipt.schema.json
27-
28571a5750590c256b9318ecb1cfb60e39614df82cee0b3b2a921980100e447c schemas/v1.1.0/commons/analyze/analyze.request.schema.json
27+
7f3c2254410e5a552905810a5a4e564af97b82bd7122d92af7d5ca9c43438caa schemas/v1.1.0/commons/analyze/analyze.request.schema.json
2828
6aeb33050633f712dfcaabc8e57ba058275e44653407bb766f0417cb5bfd8c2b schemas/v1.1.0/commons/classify/classify.receipt.schema.json
2929
476253e821ff4e7dfa441e5604c6efc29d12729bcb50e8a02db86fbd121240ab schemas/v1.1.0/commons/classify/classify.request.schema.json
3030
13a2f4d9083e1e5ed6bd6b98e05736e7791bfd62b109b4090ab4abff75572ad5 schemas/v1.1.0/commons/clean/clean.receipt.schema.json

examples/v1.1.0/commons/analyze/json/invalid/001-analyze.request.invalid.json

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version": "1.1.0",
3+
"input": "Find the hidden assumptions in this release checklist.",
4+
"mode": "extract"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"verb": "analyze",
3+
"version": "1.1.0",
4+
"mode": "extract"
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"verb": "analyze",
3+
"version": "1.1.0",
4+
"input": "",
5+
"mode": "extract"
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"verb": "analyze",
3+
"version": "1.1",
4+
"input": "Review the incident summary.",
5+
"mode": "extract"
6+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"verb": "analyze",
3+
"version": "1.1.0",
4+
"input": "Review the incident summary.",
5+
"mode": "extract",
6+
"trace_id": "req_01"
7+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"verb": "analyze",
3+
"version": "1.1.0",
4+
"input": "Review the incident summary.",
5+
"mode": "bullet-points"
6+
}

0 commit comments

Comments
 (0)