@@ -22,7 +22,7 @@ cxf-library/
2222├── routines/ # planned control-routine catalog
2323│ ├── registry.json # canonical class inventory
2424│ ├── generated-registry.json # executable deployment inventory
25- │ └── g36/ # G36 source pins , scope, and coverage
25+ │ └── g36/ # G36 pins, source inventory , scope, and coverage
2626├── tools/verify/ # Rust harness: loads each rule into the engine, runs vectors
2727```
2828
@@ -52,8 +52,9 @@ next free number, honoring any reservation.
5252## Routine catalog
5353
5454Routine contracts are independent of fault contracts. Nothing in this section
55- changes a fault schema identifier or fault behavior. The L0 routine catalog is
56- planned and non-executable.
55+ changes a fault schema identifier or fault behavior. The routine catalog is
56+ planned and non-executable. L1 adds source-tree evidence without adding a
57+ canonical class or executable deployment.
5758
5859Pin ownership is split by purpose:
5960
@@ -73,20 +74,77 @@ retired and MUST be absent.
7374` routines/registry.json ` is the canonical class inventory. Its top-level object
7475has exactly ` schema ` and ` routines ` ; ` schema ` is
7576` cxf-library/routine-registry/v2 ` . ` routines ` MUST be an array and MUST remain
76- empty in L0. A scope anchor is not a canonical class. Actual class and
77- subsequence identities are deferred to the pinned source inventory.
77+ empty in L1. A scope anchor is not a canonical class. The source inventory
78+ defined below records Git blobs; it does not identify Modelica classes or
79+ subsequences.
7880
7981` routines/generated-registry.json ` is the only inventory that may eventually
8082drive routine execution. Its top-level object has exactly ` schema ` and
8183` deployments ` ; ` schema ` is
8284` cxf-library/generated-routine-registry/v1 ` . ` deployments ` MUST be an array and
83- MUST remain empty in L0 . The verifier's ` --routines ` mode reads this file,
85+ MUST remain empty in L1 . The verifier's ` --routines ` mode reads this file,
8486accepts the empty array, and rejects nonempty arrays until the generated
8587deployment contract is implemented.
8688
8789Canonical IDs MUST NOT encode fixed parameter values. Generated deployment IDs
8890and row schemas are not defined by this version.
8991
92+ ### ` routines/g36/source-inventory.json ` (` cxf-library/g36-source-inventory/v1 ` )
93+
94+ The source inventory records two independent Git-tree snapshots from
95+ ` https://github.com/lbl-srg/modelica-buildings.git ` . Its top-level object has
96+ exactly these keys in order: ` schema ` , ` repository ` , ` source_root ` ,
97+ ` inventory_scope ` , ` dependency_closure ` , ` license ` , and ` snapshots ` .
98+
99+ - ` schema ` is ` cxf-library/g36-source-inventory/v1 ` ;
100+ - ` repository ` is ` https://github.com/lbl-srg/modelica-buildings.git ` ;
101+ - ` source_root ` is ` Buildings/Controls/OBC/ASHRAE/G36 ` ;
102+ - ` inventory_scope ` is ` source-root-regular-files ` ; and
103+ - ` dependency_closure ` is ` not-inventoried ` .
104+
105+ ` license ` has exactly ` upstream_path ` , ` retained_path ` , ` git_blob_sha1 ` , and
106+ ` sha256 ` , in that order. ` upstream_path ` is ` Buildings/legal.html ` and
107+ ` retained_path ` is ` routines/g36/LICENSE-BUILDINGS.html ` . The retained file MUST
108+ equal the Git blob bytes at both pins. ` git_blob_sha1 ` uses
109+ ` sha1:<40 lowercase hex> ` and ` sha256 ` uses ` sha256:<64 lowercase hex> ` .
110+
111+ ` snapshots ` contains exactly two rows, ordered ` release ` then ` development ` .
112+ Each row has exactly these keys in order: ` role ` , ` revision ` ,
113+ ` root_tree_sha1 ` , ` file_count ` , ` total_bytes ` , ` modelica_file_count ` ,
114+ ` package_order_count ` , and ` files ` . ` revision ` MUST equal the corresponding pin
115+ file. ` root_tree_sha1 ` is the Git tree ID for ` source_root ` , encoded as
116+ ` sha1:<40 lowercase hex> ` .
117+
118+ Each ` files ` row has exactly ` path ` , ` mode ` , ` bytes ` , ` git_blob_sha1 ` , and
119+ ` sha256 ` , in that order. Paths are full upstream repository-relative POSIX
120+ paths below ` source_root ` , sorted lexicographically and unique. Empty, ` . ` , and
121+ ` .. ` path segments, absolute paths, backslashes, and control characters are
122+ invalid. Version 1 supports only regular ` 100644 ` Git blobs; other modes and
123+ object types MUST be rejected. ` bytes ` and both hashes are calculated from Git
124+ object bytes rather than working-tree files.
125+
126+ ` file_count ` is the number of file rows, and ` total_bytes ` is the sum of their
127+ ` bytes ` values. ` modelica_file_count ` counts paths ending in ` .mo ` .
128+ ` package_order_count ` counts paths ending in ` /package.order ` ; ` package.order `
129+ content is not parsed or validated. All files remain in the inventory whether
130+ or not another source file names them.
131+
132+ The release and development snapshots MUST remain separate. The inventory does
133+ not choose a snapshot for a future canonical class and MUST NOT use one as a
134+ fallback for the other. It inventories no dependency outside ` source_root ` and
135+ makes no claim about Modelica declarations, classes, package members,
136+ references, imports, inheritance, source-family mapping, or executable
137+ coverage.
138+
139+ ` tools/lint/g36_source.py --write ` regenerates the inventory and retained legal
140+ notice from two supplied checkouts. ` --check ` verifies each checkout origin and
141+ exact HEAD, derives all records through Git object commands, and compares both
142+ tracked artifacts byte-for-byte without rewriting them. JSON uses two-space
143+ indentation, the field order above, and one final newline. It contains no
144+ timestamp, branch name, checkout path, or moving source identity. A source pin
145+ change requires regenerating both snapshots; generation fails if the pinned
146+ legal blobs or bytes differ.
147+
90148### ` routines/g36/scope.json ` (` cxf-library/g36-scope/v1 ` )
91149
92150The scope manifest makes the Section 5 planning boundary discoverable without
@@ -131,7 +189,7 @@ The IDs, destinations, and reviewed planning dispositions are:
131189| 5.21 | ` G36-SCOPE-05-21 ` | ` g36/plants/hot-water ` | ` independent-authoring ` |
132190| 5.22 | ` G36-SCOPE-05-22 ` | ` g36/fan-coil-units ` | ` upstream-partial ` |
133191
134- These dispositions classify the L0 source plan; they do not identify a source
192+ These dispositions classify the source plan; they do not identify a source
135193class or prove implementation. Destinations are safe repository-relative POSIX
136194paths below ` g36/ ` . Absolute paths, backslashes, empty segments, ` . ` segments,
137195and ` .. ` segments are invalid. The manifest reserves destinations without
@@ -142,19 +200,19 @@ requiring placeholder directories.
142200Coverage has exactly ` schema ` , ` profile ` , ` status ` , ` scope ` , and ` claims ` .
143201` schema ` is ` cxf-library/g36-coverage/v2 ` ; ` profile ` and ` status ` MUST equal
144202` scope.json ` ; ` scope ` is ` scope.json ` ; and ` claims ` MUST be an empty array in
145- L0 . Coverage does not repeat scope rows or inventory and makes no completeness,
203+ L1 . Coverage does not repeat scope rows or inventory and makes no completeness,
146204implementation, or evidence claim.
147205
148- No ` routine.cxf.jsonld ` may appear below ` routines/g36/ ` in L0 . The retired
206+ No ` routine.cxf.jsonld ` may appear below ` routines/g36/ ` in L1 . The retired
149207` routines/g36/generic/air-economizer-high-limits ` fixed-variant path MUST be
150208absent.
151209
152210### Deferred routine contracts
153211
154212Canonical typed routine artifact schemas, the generated deployment bundle
155- schema, semantic sidecars, source inventory , specialization, and executable
156- deployments are deferred. This version defines no routine interface, vectors,
157- provenance , source map, or executable CXF contract.
213+ schema, source-to-family and class mapping, semantic sidecars , specialization,
214+ and executable deployments are deferred. This version defines no routine
215+ interface, vectors , source map, or executable CXF contract.
158216
159217## Design stance (why the pieces split this way)
160218
0 commit comments