ultimate-brain 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,10 +40,10 @@ Run CLI commands as `brain <command> --brain <brain> --json`. If `brain` is not
40
40
  - **Don't fix anything in Notion.** Structure changes go through the `brain-notion-change` skill (decision 0022).
41
41
  4. **Store the ids.** For each database found, run `brain config set notion.databases.<key> '"<database id>"'`. Store the **database** id, not the data source id; skills resolve the data source when they query.
42
42
  5. **Tasks** (decision 0018):
43
- - **The default Tasks database on Brain Data:** set `notion.tasks.database` to its id. The template's mapping (Name, Status, Due, Project, Area, Meeting, Source, Brain ID) already matches it; check `notion.tasks.properties.source` is `"Source"` when the database has that relation (built from 0.3.0 on, or after migration 0005), and set it to `""` when it doesn't, so sync never writes to a missing property.
43
+ - **The default Tasks database on Brain Data:** set `notion.tasks.database` to its id. The template's mapping (Name, Status, Due, Project, Area, Meeting, Source, Brain ID) already matches it; set `notion.tasks.status_type` to `"status"` with `brain config set` when it's absent or different (its Status is Notion's built-in type; a brain made before 0.3.2 has no such field), and check `notion.tasks.properties.source` is `"Source"` when the database has that relation (built from 0.3.0 on, or after migration 0005), and set it to `""` when it doesn't, so sync never writes to a missing property.
44
44
  - **The user's own tasks database:** ask which one, read its properties, and propose a mapping for `title` (required), `status`, `due`, `project`, `area`, `owner`, either `meeting` (a relation to Meetings, preferred) or `meeting_url` (a URL property), and `source` (a relation to the Inbox, optional: the backlink for the owner's tasks from documents and emails).
45
45
  - Show the mapping and get a yes before running `brain config set notion.tasks '<json>'`.
46
- - Also set `new_task_status` to the status option new tasks should get.
46
+ - Also set `new_task_status` to the status option new tasks should get, and `status_type` to the mapped Status property's type: `status` (Notion's built-in Status) or `select`. Always set it: absent means `select`.
47
47
  - **No tasks database:** leave `notion.tasks.database` empty. The ingest then lists action items in its report instead.
48
48
  6. **Your identities** (decision 0037), when `brain.json` has no `owner.person`. Ask once: "Which names and work email addresses do you appear under in meetings, documents and emails?" (for example a nickname, a work name, two email addresses). Find the owner's person note in `brain index --json` by the owner name in `brain.json` and its aliases. Then:
49
49
  - add each name and email the note doesn't list yet as an alias, with one `add_link` proposal per value (`field: aliases`, `why` = the user's answer, `source` = an owner-ruling source as in brain-ingest references/extraction.md, "Owner rulings"); the CLI groups them into one Review row, which the user approves here in chat (brain-apply, chat mode). In a catch-up, the answer to its batch question is that approval: apply them with `decided_by: chat` without asking again;
package/README.md CHANGED
@@ -44,7 +44,7 @@ To try a release candidate: `npm install -g ultimate-brain@next`. To go back: `n
44
44
  | [synthesis/synthesis.md](synthesis/synthesis.md) | The v1 design: schema, meeting-ingest workflow, Notion bridge |
45
45
  | [docs/notion-space-design.md](docs/notion-space-design.md) | Notion databases, views, and the Notion AI prompts to build them |
46
46
  | [decisions/](decisions/) | Every accepted architecture decision |
47
- | [build/TASKS.md](build/TASKS.md) | Build plan split between Claude Code and Codex |
47
+ | [build/TASKS.md](build/TASKS.md) | Build plan: Claude Code builds, Codex reviews (decision 0044) |
48
48
  | [reviews/](reviews/) | Research: reviews of five open-source second-brain repos |
49
49
 
50
50
  Agent rules live in [AGENTS.md](AGENTS.md); `CLAUDE.md` imports it.
package/dist/lib/sync.js CHANGED
@@ -740,7 +740,7 @@ export function renderTasks(workspace, targetId, input) {
740
740
  const put = (key, type, value) => { const name = config.properties[key]; if (typeof name === "string" && name !== "")
741
741
  properties[name] = { type, value }; };
742
742
  put("title", "title", item.title);
743
- put("status", "select", config.new_task_status);
743
+ put("status", config.status_type, config.new_task_status);
744
744
  if (item.due !== undefined)
745
745
  put("due", "date", dateOutput(item.due));
746
746
  if (!sourceMode && item.owner !== undefined)
@@ -799,7 +799,7 @@ function taskProjects(workspace, meeting, value, itemIndex) {
799
799
  function publishedPages(value, workspace) { return (Array.isArray(value) ? value : []).map((id) => workspace.get(String(id))?.attributes.notion).filter((id) => typeof id === "string"); }
800
800
  function tasksConfig(workspace) { if (!loadSchemas().brain(workspace.config))
801
801
  throw new BrainError("BRAIN_CONFIG_INVALID", "brain.json fails its schema"); const notion = workspace.config.notion; const tasks = notion.tasks; if (typeof tasks.database !== "string" || tasks.database === "")
802
- throw new BrainError("BRAIN_CONFIG_INVALID", "Tasks database is not configured"); return { database: tasks.database, properties: tasks.properties, new_task_status: tasks.new_task_status }; }
802
+ throw new BrainError("BRAIN_CONFIG_INVALID", "Tasks database is not configured"); return { database: tasks.database, properties: tasks.properties, new_task_status: tasks.new_task_status, status_type: tasks.status_type === "status" ? "status" : "select" }; }
803
803
  export function record(workspace, input) {
804
804
  if (!isRecord(input) || !Array.isArray(input.records))
805
805
  throw new BrainError("INPUT_INVALID", "record input needs a records list");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-brain",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "CLI for an AI-assisted Markdown and Git second brain",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -64,6 +64,46 @@
64
64
  }
65
65
  }
66
66
  },
67
+ "repos": {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "object",
71
+ "required": [
72
+ "name",
73
+ "path",
74
+ "area",
75
+ "patterns",
76
+ "commit"
77
+ ],
78
+ "additionalProperties": false,
79
+ "properties": {
80
+ "name": {
81
+ "type": "string",
82
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
83
+ },
84
+ "path": {
85
+ "type": "string",
86
+ "pattern": "^(/|~/)"
87
+ },
88
+ "area": {
89
+ "type": "string",
90
+ "pattern": "^area-[0-9abcdefghjkmnpqrstvwxyz]{8}$"
91
+ },
92
+ "patterns": {
93
+ "type": "array",
94
+ "minItems": 1,
95
+ "items": {
96
+ "type": "string",
97
+ "minLength": 1
98
+ }
99
+ },
100
+ "commit": {
101
+ "type": "string",
102
+ "pattern": "^([0-9a-f]{40})?$"
103
+ }
104
+ }
105
+ }
106
+ },
67
107
  "notion": {
68
108
  "type": "object",
69
109
  "required": [
@@ -172,6 +212,12 @@
172
212
  },
173
213
  "new_task_status": {
174
214
  "type": "string"
215
+ },
216
+ "status_type": {
217
+ "enum": [
218
+ "status",
219
+ "select"
220
+ ]
175
221
  }
176
222
  },
177
223
  "allOf": [
@@ -834,11 +834,49 @@
834
834
  "type": "string",
835
835
  "minLength": 1
836
836
  },
837
+ "repo": {
838
+ "type": "string",
839
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
840
+ },
841
+ "repo_path": {
842
+ "type": "string",
843
+ "minLength": 1,
844
+ "pattern": "^[^/\\\\].*$"
845
+ },
846
+ "commit": {
847
+ "type": "string",
848
+ "pattern": "^[0-9a-f]{40}$"
849
+ },
850
+ "attached_to": {
851
+ "$ref": "#/$defs/sourceId"
852
+ },
837
853
  "summary": {
838
854
  "type": "string",
839
855
  "minLength": 1,
840
856
  "maxLength": 400
841
857
  },
858
+ "digest": {
859
+ "type": "string",
860
+ "minLength": 1
861
+ },
862
+ "notion_text": {
863
+ "enum": [
864
+ "digest",
865
+ "full"
866
+ ]
867
+ },
868
+ "notion_parts": {
869
+ "type": "array",
870
+ "minItems": 1,
871
+ "uniqueItems": true,
872
+ "items": {
873
+ "type": "string",
874
+ "pattern": "^[1-9][0-9]*(-[1-9][0-9]*)?$"
875
+ }
876
+ },
877
+ "notion_text_requested": {
878
+ "$ref": "#/$defs/timestamp"
879
+ },
842
880
  "notion": {
843
881
  "$ref": "#/$defs/notionPageId"
844
882
  },
@@ -936,13 +974,136 @@
936
974
  }
937
975
  }
938
976
  }
977
+ },
978
+ {
979
+ "description": "repo, repo_path and commit come together (0042).",
980
+ "if": {
981
+ "anyOf": [
982
+ {
983
+ "required": [
984
+ "repo"
985
+ ]
986
+ },
987
+ {
988
+ "required": [
989
+ "repo_path"
990
+ ]
991
+ },
992
+ {
993
+ "required": [
994
+ "commit"
995
+ ]
996
+ }
997
+ ]
998
+ },
999
+ "then": {
1000
+ "required": [
1001
+ "repo",
1002
+ "repo_path",
1003
+ "commit"
1004
+ ],
1005
+ "properties": {
1006
+ "source_key": {
1007
+ "pattern": "^file:"
1008
+ }
1009
+ }
1010
+ }
1011
+ },
1012
+ {
1013
+ "if": {
1014
+ "required": [
1015
+ "attached_to"
1016
+ ]
1017
+ },
1018
+ "then": {
1019
+ "properties": {
1020
+ "source_key": {
1021
+ "pattern": "^file:"
1022
+ }
1023
+ }
1024
+ }
1025
+ },
1026
+ {
1027
+ "description": "notion_parts only with notion_text: full (0043).",
1028
+ "if": {
1029
+ "required": [
1030
+ "notion_parts"
1031
+ ]
1032
+ },
1033
+ "then": {
1034
+ "required": [
1035
+ "notion_text"
1036
+ ],
1037
+ "properties": {
1038
+ "notion_text": {
1039
+ "const": "full"
1040
+ }
1041
+ }
1042
+ }
1043
+ },
1044
+ {
1045
+ "description": "No brain-written Inbox body on minutes, captures or attachments (0043).",
1046
+ "if": {
1047
+ "anyOf": [
1048
+ {
1049
+ "required": [
1050
+ "attached_to"
1051
+ ]
1052
+ },
1053
+ {
1054
+ "required": [
1055
+ "kind"
1056
+ ],
1057
+ "properties": {
1058
+ "kind": {
1059
+ "enum": [
1060
+ "minutes",
1061
+ "capture"
1062
+ ]
1063
+ }
1064
+ }
1065
+ },
1066
+ {
1067
+ "not": {
1068
+ "required": [
1069
+ "kind"
1070
+ ]
1071
+ }
1072
+ }
1073
+ ]
1074
+ },
1075
+ "then": {
1076
+ "not": {
1077
+ "anyOf": [
1078
+ {
1079
+ "required": [
1080
+ "digest"
1081
+ ]
1082
+ },
1083
+ {
1084
+ "required": [
1085
+ "notion_text"
1086
+ ]
1087
+ },
1088
+ {
1089
+ "required": [
1090
+ "notion_parts"
1091
+ ]
1092
+ },
1093
+ {
1094
+ "required": [
1095
+ "notion_text_requested"
1096
+ ]
1097
+ }
1098
+ ]
1099
+ }
1100
+ }
939
1101
  }
940
1102
  ]
941
1103
  },
942
1104
  "view": {
943
1105
  "required": [
944
1106
  "view_kind",
945
- "project",
946
1107
  "generated_from",
947
1108
  "generated_at"
948
1109
  ],
@@ -950,12 +1111,30 @@
950
1111
  "view_kind": {
951
1112
  "enum": [
952
1113
  "brief",
953
- "decision_log"
1114
+ "decision_log",
1115
+ "area_brief",
1116
+ "report"
954
1117
  ]
955
1118
  },
956
1119
  "project": {
957
1120
  "$ref": "#/$defs/projectId"
958
1121
  },
1122
+ "area": {
1123
+ "$ref": "#/$defs/areaId"
1124
+ },
1125
+ "projects": {
1126
+ "type": "array",
1127
+ "items": {
1128
+ "$ref": "#/$defs/projectId"
1129
+ }
1130
+ },
1131
+ "question": {
1132
+ "type": "string",
1133
+ "minLength": 1
1134
+ },
1135
+ "asked_in": {
1136
+ "$ref": "#/$defs/notionPageId"
1137
+ },
959
1138
  "generated_from": {
960
1139
  "type": "array",
961
1140
  "items": {
@@ -964,6 +1143,15 @@
964
1143
  },
965
1144
  "generated_at": {
966
1145
  "$ref": "#/$defs/timestamp"
1146
+ },
1147
+ "notion": {
1148
+ "$ref": "#/$defs/notionPageId"
1149
+ },
1150
+ "last_synced": {
1151
+ "$ref": "#/$defs/timestamp"
1152
+ },
1153
+ "notion_published": {
1154
+ "type": "object"
967
1155
  }
968
1156
  },
969
1157
  "not": {
@@ -984,7 +1172,159 @@
984
1172
  ]
985
1173
  }
986
1174
  ]
987
- }
1175
+ },
1176
+ "allOf": [
1177
+ {
1178
+ "if": {
1179
+ "properties": {
1180
+ "view_kind": {
1181
+ "enum": [
1182
+ "brief",
1183
+ "decision_log"
1184
+ ]
1185
+ }
1186
+ }
1187
+ },
1188
+ "then": {
1189
+ "allOf": [
1190
+ {
1191
+ "required": [
1192
+ "project"
1193
+ ]
1194
+ },
1195
+ {
1196
+ "not": {
1197
+ "anyOf": [
1198
+ {
1199
+ "required": [
1200
+ "area"
1201
+ ]
1202
+ },
1203
+ {
1204
+ "required": [
1205
+ "projects"
1206
+ ]
1207
+ },
1208
+ {
1209
+ "required": [
1210
+ "question"
1211
+ ]
1212
+ },
1213
+ {
1214
+ "required": [
1215
+ "asked_in"
1216
+ ]
1217
+ },
1218
+ {
1219
+ "required": [
1220
+ "notion"
1221
+ ]
1222
+ },
1223
+ {
1224
+ "required": [
1225
+ "last_synced"
1226
+ ]
1227
+ },
1228
+ {
1229
+ "required": [
1230
+ "notion_published"
1231
+ ]
1232
+ }
1233
+ ]
1234
+ }
1235
+ }
1236
+ ]
1237
+ }
1238
+ },
1239
+ {
1240
+ "if": {
1241
+ "properties": {
1242
+ "view_kind": {
1243
+ "const": "area_brief"
1244
+ }
1245
+ }
1246
+ },
1247
+ "then": {
1248
+ "allOf": [
1249
+ {
1250
+ "required": [
1251
+ "area"
1252
+ ]
1253
+ },
1254
+ {
1255
+ "not": {
1256
+ "anyOf": [
1257
+ {
1258
+ "required": [
1259
+ "project"
1260
+ ]
1261
+ },
1262
+ {
1263
+ "required": [
1264
+ "projects"
1265
+ ]
1266
+ },
1267
+ {
1268
+ "required": [
1269
+ "question"
1270
+ ]
1271
+ },
1272
+ {
1273
+ "required": [
1274
+ "asked_in"
1275
+ ]
1276
+ },
1277
+ {
1278
+ "required": [
1279
+ "notion"
1280
+ ]
1281
+ },
1282
+ {
1283
+ "required": [
1284
+ "last_synced"
1285
+ ]
1286
+ },
1287
+ {
1288
+ "required": [
1289
+ "notion_published"
1290
+ ]
1291
+ }
1292
+ ]
1293
+ }
1294
+ }
1295
+ ]
1296
+ }
1297
+ },
1298
+ {
1299
+ "if": {
1300
+ "properties": {
1301
+ "view_kind": {
1302
+ "const": "report"
1303
+ }
1304
+ }
1305
+ },
1306
+ "then": {
1307
+ "allOf": [
1308
+ {
1309
+ "required": [
1310
+ "question"
1311
+ ]
1312
+ },
1313
+ {
1314
+ "not": {
1315
+ "anyOf": [
1316
+ {
1317
+ "required": [
1318
+ "project"
1319
+ ]
1320
+ }
1321
+ ]
1322
+ }
1323
+ }
1324
+ ]
1325
+ }
1326
+ }
1327
+ ]
988
1328
  },
989
1329
  "memory": {
990
1330
  "required": [
@@ -42,7 +42,9 @@
42
42
  "supersede",
43
43
  "contradiction",
44
44
  "merge",
45
- "new_item"
45
+ "new_item",
46
+ "review_notes",
47
+ "answer"
46
48
  ]
47
49
  },
48
50
  "target": {
@@ -114,12 +116,14 @@
114
116
  "uniqueItems": true,
115
117
  "items": {
116
118
  "type": "object",
117
- "required": [
118
- "field",
119
- "value"
120
- ],
121
119
  "additionalProperties": false,
122
120
  "properties": {
121
+ "note": {
122
+ "$ref": "note.schema.json#/$defs/id"
123
+ },
124
+ "target": {
125
+ "$ref": "note.schema.json#/$defs/id"
126
+ },
123
127
  "field": {
124
128
  "type": "string"
125
129
  },
@@ -127,7 +131,44 @@
127
131
  "type": "string",
128
132
  "minLength": 1
129
133
  }
130
- }
134
+ },
135
+ "oneOf": [
136
+ {
137
+ "required": [
138
+ "note"
139
+ ],
140
+ "not": {
141
+ "anyOf": [
142
+ {
143
+ "required": [
144
+ "field"
145
+ ]
146
+ },
147
+ {
148
+ "required": [
149
+ "value"
150
+ ]
151
+ },
152
+ {
153
+ "required": [
154
+ "target"
155
+ ]
156
+ }
157
+ ]
158
+ }
159
+ },
160
+ {
161
+ "required": [
162
+ "field",
163
+ "value"
164
+ ],
165
+ "not": {
166
+ "required": [
167
+ "note"
168
+ ]
169
+ }
170
+ }
171
+ ]
131
172
  }
132
173
  },
133
174
  "decided_at": {
@@ -199,7 +240,6 @@
199
240
  },
200
241
  "links": {
201
242
  "type": "array",
202
- "minItems": 1,
203
243
  "uniqueItems": true,
204
244
  "items": {
205
245
  "type": "object",
@@ -209,6 +249,9 @@
209
249
  ],
210
250
  "additionalProperties": false,
211
251
  "properties": {
252
+ "target": {
253
+ "$ref": "note.schema.json#/$defs/id"
254
+ },
212
255
  "field": {
213
256
  "enum": [
214
257
  "aliases",
@@ -225,6 +268,20 @@
225
268
  }
226
269
  }
227
270
  }
271
+ },
272
+ "notes": {
273
+ "type": "array",
274
+ "uniqueItems": true,
275
+ "items": {
276
+ "$ref": "note.schema.json#/$defs/id"
277
+ }
278
+ },
279
+ "answer": {
280
+ "type": "string",
281
+ "minLength": 1
282
+ },
283
+ "answer_note": {
284
+ "$ref": "note.schema.json#/$defs/id"
228
285
  }
229
286
  },
230
287
  "additionalProperties": false,
@@ -326,6 +383,21 @@
326
383
  "required": [
327
384
  "before"
328
385
  ]
386
+ },
387
+ {
388
+ "required": [
389
+ "notes"
390
+ ]
391
+ },
392
+ {
393
+ "required": [
394
+ "answer"
395
+ ]
396
+ },
397
+ {
398
+ "required": [
399
+ "answer_note"
400
+ ]
329
401
  }
330
402
  ]
331
403
  },
@@ -347,6 +419,18 @@
347
419
  ]
348
420
  }
349
421
  ]
422
+ },
423
+ "properties": {
424
+ "links": {
425
+ "minItems": 1,
426
+ "items": {
427
+ "not": {
428
+ "required": [
429
+ "target"
430
+ ]
431
+ }
432
+ }
433
+ }
350
434
  }
351
435
  },
352
436
  {
@@ -620,7 +704,8 @@
620
704
  "enum": [
621
705
  "update_fact",
622
706
  "contradiction",
623
- "add_to_note"
707
+ "add_to_note",
708
+ "answer"
624
709
  ]
625
710
  }
626
711
  }
@@ -649,7 +734,10 @@
649
734
  "then": {
650
735
  "properties": {
651
736
  "kind": {
652
- "const": "add_link"
737
+ "enum": [
738
+ "add_link",
739
+ "review_notes"
740
+ ]
653
741
  }
654
742
  }
655
743
  }
@@ -670,7 +758,10 @@
670
758
  "then": {
671
759
  "properties": {
672
760
  "kind": {
673
- "const": "add_link"
761
+ "enum": [
762
+ "add_link",
763
+ "review_notes"
764
+ ]
674
765
  },
675
766
  "decision": {
676
767
  "properties": {
@@ -681,6 +772,298 @@
681
772
  }
682
773
  }
683
774
  }
775
+ },
776
+ {
777
+ "if": {
778
+ "properties": {
779
+ "kind": {
780
+ "const": "review_notes"
781
+ }
782
+ }
783
+ },
784
+ "then": {
785
+ "required": [
786
+ "notes",
787
+ "links"
788
+ ],
789
+ "properties": {
790
+ "links": {
791
+ "items": {
792
+ "required": [
793
+ "target"
794
+ ]
795
+ }
796
+ }
797
+ },
798
+ "anyOf": [
799
+ {
800
+ "properties": {
801
+ "notes": {
802
+ "minItems": 1
803
+ }
804
+ }
805
+ },
806
+ {
807
+ "properties": {
808
+ "links": {
809
+ "minItems": 1
810
+ }
811
+ }
812
+ }
813
+ ],
814
+ "not": {
815
+ "anyOf": [
816
+ {
817
+ "required": [
818
+ "target"
819
+ ]
820
+ },
821
+ {
822
+ "required": [
823
+ "field"
824
+ ]
825
+ },
826
+ {
827
+ "required": [
828
+ "before"
829
+ ]
830
+ },
831
+ {
832
+ "required": [
833
+ "after"
834
+ ]
835
+ },
836
+ {
837
+ "required": [
838
+ "content"
839
+ ]
840
+ },
841
+ {
842
+ "required": [
843
+ "note"
844
+ ]
845
+ },
846
+ {
847
+ "required": [
848
+ "supersedes"
849
+ ]
850
+ },
851
+ {
852
+ "required": [
853
+ "merge_into"
854
+ ]
855
+ },
856
+ {
857
+ "required": [
858
+ "answer"
859
+ ]
860
+ },
861
+ {
862
+ "required": [
863
+ "answer_note"
864
+ ]
865
+ }
866
+ ]
867
+ }
868
+ }
869
+ },
870
+ {
871
+ "if": {
872
+ "properties": {
873
+ "kind": {
874
+ "const": "answer"
875
+ }
876
+ }
877
+ },
878
+ "then": {
879
+ "required": [
880
+ "target",
881
+ "answer"
882
+ ],
883
+ "not": {
884
+ "anyOf": [
885
+ {
886
+ "required": [
887
+ "field"
888
+ ]
889
+ },
890
+ {
891
+ "required": [
892
+ "before"
893
+ ]
894
+ },
895
+ {
896
+ "required": [
897
+ "after"
898
+ ]
899
+ },
900
+ {
901
+ "required": [
902
+ "content"
903
+ ]
904
+ },
905
+ {
906
+ "required": [
907
+ "note"
908
+ ]
909
+ },
910
+ {
911
+ "required": [
912
+ "links"
913
+ ]
914
+ },
915
+ {
916
+ "required": [
917
+ "notes"
918
+ ]
919
+ },
920
+ {
921
+ "required": [
922
+ "supersedes"
923
+ ]
924
+ },
925
+ {
926
+ "required": [
927
+ "merge_into"
928
+ ]
929
+ }
930
+ ]
931
+ }
932
+ }
933
+ },
934
+ {
935
+ "if": {
936
+ "anyOf": [
937
+ {
938
+ "required": [
939
+ "notes"
940
+ ]
941
+ }
942
+ ]
943
+ },
944
+ "then": {
945
+ "properties": {
946
+ "kind": {
947
+ "const": "review_notes"
948
+ }
949
+ }
950
+ }
951
+ },
952
+ {
953
+ "if": {
954
+ "anyOf": [
955
+ {
956
+ "required": [
957
+ "answer"
958
+ ]
959
+ },
960
+ {
961
+ "required": [
962
+ "answer_note"
963
+ ]
964
+ }
965
+ ]
966
+ },
967
+ "then": {
968
+ "properties": {
969
+ "kind": {
970
+ "const": "answer"
971
+ }
972
+ }
973
+ }
974
+ },
975
+ {
976
+ "description": "exclude entries fit the kind: {field, value} on add_link, {note} or {target, field, value} on review_notes.",
977
+ "if": {
978
+ "required": [
979
+ "kind",
980
+ "decision"
981
+ ],
982
+ "properties": {
983
+ "kind": {
984
+ "const": "add_link"
985
+ },
986
+ "decision": {
987
+ "required": [
988
+ "exclude"
989
+ ]
990
+ }
991
+ }
992
+ },
993
+ "then": {
994
+ "properties": {
995
+ "decision": {
996
+ "properties": {
997
+ "exclude": {
998
+ "items": {
999
+ "required": [
1000
+ "field",
1001
+ "value"
1002
+ ],
1003
+ "not": {
1004
+ "anyOf": [
1005
+ {
1006
+ "required": [
1007
+ "target"
1008
+ ]
1009
+ },
1010
+ {
1011
+ "required": [
1012
+ "note"
1013
+ ]
1014
+ }
1015
+ ]
1016
+ }
1017
+ }
1018
+ }
1019
+ }
1020
+ }
1021
+ }
1022
+ }
1023
+ },
1024
+ {
1025
+ "if": {
1026
+ "required": [
1027
+ "kind",
1028
+ "decision"
1029
+ ],
1030
+ "properties": {
1031
+ "kind": {
1032
+ "const": "review_notes"
1033
+ },
1034
+ "decision": {
1035
+ "required": [
1036
+ "exclude"
1037
+ ]
1038
+ }
1039
+ }
1040
+ },
1041
+ "then": {
1042
+ "properties": {
1043
+ "decision": {
1044
+ "properties": {
1045
+ "exclude": {
1046
+ "items": {
1047
+ "anyOf": [
1048
+ {
1049
+ "required": [
1050
+ "note"
1051
+ ]
1052
+ },
1053
+ {
1054
+ "required": [
1055
+ "target",
1056
+ "field",
1057
+ "value"
1058
+ ]
1059
+ }
1060
+ ]
1061
+ }
1062
+ }
1063
+ }
1064
+ }
1065
+ }
1066
+ }
684
1067
  }
685
1068
  ]
686
1069
  }
@@ -32,7 +32,8 @@
32
32
  "source": "Source",
33
33
  "brain_id": "Brain ID"
34
34
  },
35
- "new_task_status": "To Do"
35
+ "new_task_status": "To Do",
36
+ "status_type": "status"
36
37
  }
37
38
  }
38
39
  }