-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontract-record.schema.json
More file actions
147 lines (147 loc) · 4.84 KB
/
Copy pathcontract-record.schema.json
File metadata and controls
147 lines (147 loc) · 4.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/DrBaher/contract-vault-cli/blob/main/docs/spec/contract-record.schema.json",
"title": "contract-vault record schema (v1)",
"description": "A single executed-deal entry: <vault>/<counterparty>/<name>/record.json. Built by `contract-vault ingest` from extract-cli output. Every value carries provenance via field_meta and per-item source/confidence; downstream treats data as 'verify, not trust'. source is one of {deterministic, llm, manual, none} where 'manual' marks human edits.",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"id",
"title",
"status",
"signed_on",
"parties",
"effective_date",
"expiration_date",
"term",
"governing_law",
"value",
"source",
"obligations",
"provenance",
"field_meta"
],
"$defs": {
"source": {
"enum": ["deterministic", "llm", "manual", "none"]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"nullableString": {
"type": ["string", "null"]
},
"fieldMeta": {
"type": "object",
"additionalProperties": false,
"required": ["confidence", "source"],
"properties": {
"confidence": { "$ref": "#/$defs/confidence" },
"source": { "$ref": "#/$defs/source" }
}
}
},
"properties": {
"schema_version": { "const": "1.0" },
"id": { "type": "string" },
"title": { "$ref": "#/$defs/nullableString" },
"status": { "type": "string" },
"signed_on": { "$ref": "#/$defs/nullableString" },
"parties": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["name", "role", "source", "confidence"],
"properties": {
"name": { "type": "string" },
"role": { "$ref": "#/$defs/nullableString" },
"source": { "$ref": "#/$defs/source" },
"confidence": { "$ref": "#/$defs/confidence" }
}
}
},
"effective_date": { "$ref": "#/$defs/nullableString" },
"expiration_date": { "$ref": "#/$defs/nullableString" },
"term": {
"type": "object",
"additionalProperties": false,
"required": ["length", "auto_renew", "notice_period_days", "renewal_window"],
"properties": {
"length": { "$ref": "#/$defs/nullableString" },
"auto_renew": { "type": ["boolean", "null"] },
"notice_period_days": { "type": ["integer", "null"] },
"renewal_window": {
"type": ["object", "null"],
"additionalProperties": false,
"required": ["deadline", "expiration"],
"properties": {
"deadline": { "type": "string" },
"expiration": { "type": "string" }
}
}
}
},
"governing_law": { "$ref": "#/$defs/nullableString" },
"value": {
"type": "object",
"additionalProperties": false,
"required": ["raw", "amount", "currency"],
"properties": {
"raw": {},
"amount": { "type": ["number", "null"] },
"currency": { "$ref": "#/$defs/nullableString" }
}
},
"source": {
"type": "object",
"additionalProperties": false,
"required": ["path", "sha256", "format", "vaulted"],
"properties": {
"path": { "type": "string" },
"sha256": { "type": "string" },
"format": { "type": "string" },
"vaulted": { "type": "boolean" }
}
},
"obligations": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["type", "due", "description", "source", "confidence"],
"properties": {
"type": { "type": "string" },
"due": { "$ref": "#/$defs/nullableString" },
"description": { "type": "string" },
"source": { "$ref": "#/$defs/source" },
"confidence": { "$ref": "#/$defs/confidence" },
"id": { "type": "string" },
"status": { "enum": ["open", "done", "waived"] },
"owner": { "$ref": "#/$defs/nullableString" },
"recurrence": { "enum": ["weekly", "monthly", "quarterly", "semiannual", "annual"] },
"reminders": { "type": "array", "items": { "type": "integer", "minimum": 0 } }
}
}
},
"provenance": {
"type": "object",
"additionalProperties": false,
"required": ["from_extract", "extractor_version", "llm_used", "ingested_at"],
"properties": {
"from_extract": { "type": "boolean" },
"extractor_version": { "type": "string" },
"llm_used": { "type": "boolean" },
"ingested_at": { "type": "string" },
"last_reviewed_at": { "type": "string" }
}
},
"field_meta": {
"type": "object",
"additionalProperties": { "$ref": "#/$defs/fieldMeta" }
}
}
}