Skip to content

Commit ce8ac60

Browse files
committed
docs: add cross-language specification section to readme
link to spec layers (schema, conformance vectors, prose) and document rfc 8785 jcs adoption for deterministic run-id generation.
1 parent b3a40fc commit ce8ac60

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,32 @@ Standalone evaluator configs reference schema `$defs`:
316316
}
317317
```
318318
319+
## Cross-Language Specification
320+
321+
PPEF is designed for cross-language interoperability. A Python runner can produce results consumable by the TypeScript aggregator, and vice versa.
322+
323+
The specification lives in [`spec/`](spec/) and comprises three layers:
324+
325+
| Layer | Location | Purpose |
326+
|-------|----------|---------|
327+
| JSON Schema | [`ppef.schema.json`](ppef.schema.json) | Machine-readable type definitions for all input and output types |
328+
| Conformance Vectors | [`spec/conformance/`](spec/conformance/) | Pinned input/output pairs that any implementation must reproduce |
329+
| Prose Specification | [`spec/README.md`](spec/README.md) | Execution semantics, module contracts, statistical algorithms |
330+
331+
All output types are available as `$defs` in the schema, enabling validation from any language:
332+
333+
```
334+
ppef.schema.json#/$defs/EvaluationResult
335+
ppef.schema.json#/$defs/ResultBatch
336+
ppef.schema.json#/$defs/AggregationOutput
337+
ppef.schema.json#/$defs/ClaimEvaluationSummary
338+
ppef.schema.json#/$defs/MetricsEvaluationSummary
339+
ppef.schema.json#/$defs/RobustnessAnalysisOutput
340+
ppef.schema.json#/$defs/ExploratoryEvaluationSummary
341+
```
342+
343+
Run ID generation uses [RFC 8785 (JSON Canonicalization Scheme)](https://www.rfc-editor.org/rfc/rfc8785) for deterministic cross-language hashing. Libraries exist for Python (`jcs`), Rust (`serde_jcs`), Go (`go-jcs`), and others.
344+
319345
## Architecture
320346
321347
### Data Flow Pipeline
@@ -380,7 +406,7 @@ Available subpaths: `ppef/types`, `ppef/registry`, `ppef/executor`, `ppef/collec
380406
- Conventional commits enforced via commitlint + husky
381407
- Semantic release from main branch
382408
- No `any` types — use `unknown` with type guards
383-
- Executor produces deterministic `runId` via SHA-256 hash of inputs
409+
- Executor produces deterministic `runId` via SHA-256 hash of RFC 8785 (JCS) canonicalized inputs
384410
385411
## License
386412

0 commit comments

Comments
 (0)