@c4a/context-cli 0.6.16 → 0.6.18

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.
Files changed (29) hide show
  1. package/README.md +2 -1
  2. package/README.zh-CN.md +2 -2
  3. package/cli.js +4859 -3834
  4. package/docs/document-optimization.md +10 -14
  5. package/docs/document-optimization.zh-CN.md +9 -13
  6. package/package.json +2 -2
  7. package/plugins/VERSION +1 -1
  8. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  9. package/plugins/claude/commands/context.md +27 -13
  10. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  11. package/plugins/codex/skills/context/SKILL.md +27 -13
  12. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  13. package/plugins/cursor/commands/c4a-context.md +27 -13
  14. package/plugins/skills/c4a-context/SKILL.md +27 -13
  15. package/providers/context/actions/apply-forced-review.yaml +5 -0
  16. package/providers/context/actions/revise-code-index-audit.yaml +5 -0
  17. package/providers/context/actions/submit-code-index-audit.yaml +6 -0
  18. package/providers/context/codes.yaml +3 -0
  19. package/providers/context/graphs/workspace.yaml +51 -1
  20. package/providers/context/manifest.json +70 -16
  21. package/providers/context/provider.yaml +1 -1
  22. package/providers/context/resources/dialogue/knowledge-review.md +9 -0
  23. package/providers/context/resources/manuals/reference/project-api.md +9 -2
  24. package/providers/context/resources/procedures/close-and-build.md +8 -0
  25. package/providers/context/resources/procedures/code-extraction.md +14 -0
  26. package/providers/context/resources/procedures/code-index-audit.md +43 -0
  27. package/providers/context/resources/procedures/knowledge-review.md +6 -0
  28. package/providers/context/resources/views/code-index-audit.yaml +6 -0
  29. package/providers/context/schemas/code-index-audit-decision.schema.json +94 -0
@@ -2,14 +2,14 @@
2
2
  "schema": "agent-graph.bundle.v1",
3
3
  "provider": {
4
4
  "id": "c4a/context",
5
- "version": "0.6.16"
5
+ "version": "0.6.18"
6
6
  },
7
7
  "providerManifest": "provider.yaml",
8
8
  "graphs": [
9
9
  {
10
10
  "id": "workspace",
11
11
  "path": "graphs/workspace.yaml",
12
- "digest": "sha256:29a79bec9dd37dd9973fb43ab52090c90e4ba8cf734f85729a56ac1f0ec22f91"
12
+ "digest": "sha256:010fae5620a92e492de41d1213c34ad4013681ff2f72cc4f8e30d29ad4359881"
13
13
  }
14
14
  ],
15
15
  "actions": [
@@ -23,6 +23,11 @@
23
23
  "path": "actions/align-next.yaml",
24
24
  "digest": "sha256:8f2a7203d5b631c0b1e6cc14d4d70acbf8ac0197b3cfd19fa3111212ffb47498"
25
25
  },
26
+ {
27
+ "id": "apply-forced-review",
28
+ "path": "actions/apply-forced-review.yaml",
29
+ "digest": "sha256:ed530819831b68824bd373dec399c73a30d7eeebd2ef72ae0eab3e7a60cad80f"
30
+ },
26
31
  {
27
32
  "id": "apply-managed-review",
28
33
  "path": "actions/apply-managed-review.yaml",
@@ -158,13 +163,28 @@
158
163
  "path": "actions/restore-repository-sources.yaml",
159
164
  "digest": "sha256:8e44f0dc15ac9b0eea8af62dcefd315d7c03a52dab1cda373537d275ae7383dc"
160
165
  },
166
+ {
167
+ "id": "revise-code-index-audit",
168
+ "path": "actions/revise-code-index-audit.yaml",
169
+ "digest": "sha256:0ea9c41b2b698bf3a779381b42d6cd9b7eb9d54718498f3b2875eab4c23a76f6"
170
+ },
161
171
  {
162
172
  "id": "revise-document",
163
173
  "path": "actions/revise-document.yaml",
164
174
  "digest": "sha256:605d3808670582da69881c9a2eb8b0de21b42fbdd04c1d04a8fa93513989a08e"
175
+ },
176
+ {
177
+ "id": "submit-code-index-audit",
178
+ "path": "actions/submit-code-index-audit.yaml",
179
+ "digest": "sha256:30ecc7cf9fcae232f9d3075d4410f5753c599bee148e06bf08afe4c219bb45c4"
165
180
  }
166
181
  ],
167
182
  "resources": [
183
+ {
184
+ "id": "context.code-index-audit",
185
+ "path": "resources/views/code-index-audit.yaml",
186
+ "digest": "sha256:b74c2457d2cc2cb37183b6dd1da4c14f198baec56a6cbf6b78c0a1013b38cde6"
187
+ },
168
188
  {
169
189
  "id": "context.document-optimization-current",
170
190
  "path": "resources/views/document-optimization-current.yaml",
@@ -203,7 +223,7 @@
203
223
  {
204
224
  "id": "context.sdk.project-api",
205
225
  "path": "resources/manuals/reference/project-api.md",
206
- "digest": "sha256:27c0f9523fa747c9acf7438f8e05993a83ea9942e962bfa0dfb879c9f927cc28"
226
+ "digest": "sha256:5fe640181630d7a363aec785ff8c76963bd41f797a4546d903fd6d5c1e7fd82b"
207
227
  },
208
228
  {
209
229
  "id": "context.sdk.template-variables",
@@ -303,7 +323,7 @@
303
323
  {
304
324
  "id": "dialogue.knowledge-review",
305
325
  "path": "resources/dialogue/knowledge-review.md",
306
- "digest": "sha256:be908d5c2092790a2b3b24008367285a896c76e705685358549492a4f2eefa6b"
326
+ "digest": "sha256:26699582f0d9c014e84e4b21b5cf591614edbe16b544d6145c8dd61112bc1339"
307
327
  },
308
328
  {
309
329
  "id": "dialogue.package-output",
@@ -343,12 +363,17 @@
343
363
  {
344
364
  "id": "procedure.close-and-build",
345
365
  "path": "resources/procedures/close-and-build.md",
346
- "digest": "sha256:bc7cc7aea9fd6796e71cc50c8ec44446fc7c576c9ddc3f6fe080d25488838592"
366
+ "digest": "sha256:4f68373f9406dee8607a7b814e97dcd25c8508c2113f0f50152af1ef24ea33ef"
347
367
  },
348
368
  {
349
369
  "id": "procedure.code-extraction",
350
370
  "path": "resources/procedures/code-extraction.md",
351
- "digest": "sha256:b32901a9b4e68f4b8518e3bc6dfa00a010cc0a14ee2dbdf2b454948791c8a058"
371
+ "digest": "sha256:1e5bbf399bdf442c28e52f5f8faeb16e8f5f8fdd94f6ccdfae87ec63ded478b7"
372
+ },
373
+ {
374
+ "id": "procedure.code-index-audit",
375
+ "path": "resources/procedures/code-index-audit.md",
376
+ "digest": "sha256:72f98ccb1370c58381187eba9d90808cf4c71168febf17a74147da05db13c169"
352
377
  },
353
378
  {
354
379
  "id": "procedure.document-capture",
@@ -378,7 +403,7 @@
378
403
  {
379
404
  "id": "procedure.knowledge-review",
380
405
  "path": "resources/procedures/knowledge-review.md",
381
- "digest": "sha256:a5d1f85514125eee0da2fda87b9b9af1e922248dffd8e3fc98f626a8325297d2"
406
+ "digest": "sha256:ee67b6182b7315d60aea3ed023e0688e3a0c80d90d8ebe31f38d04708d5228d1"
382
407
  },
383
408
  {
384
409
  "id": "procedure.package-output",
@@ -507,6 +532,11 @@
507
532
  }
508
533
  ],
509
534
  "schemas": [
535
+ {
536
+ "id": "schemas/code-index-audit-decision.schema.json",
537
+ "path": "schemas/code-index-audit-decision.schema.json",
538
+ "digest": "sha256:96a1bc4b962577c8a5b000a7c619271aed8845109362a6c3e54187c74bf69919"
539
+ },
510
540
  {
511
541
  "id": "schemas/document-optimization-decisions.schema.json",
512
542
  "path": "schemas/document-optimization-decisions.schema.json",
@@ -542,6 +572,10 @@
542
572
  "path": "actions/align-next.yaml",
543
573
  "digest": "sha256:8f2a7203d5b631c0b1e6cc14d4d70acbf8ac0197b3cfd19fa3111212ffb47498"
544
574
  },
575
+ {
576
+ "path": "actions/apply-forced-review.yaml",
577
+ "digest": "sha256:ed530819831b68824bd373dec399c73a30d7eeebd2ef72ae0eab3e7a60cad80f"
578
+ },
545
579
  {
546
580
  "path": "actions/apply-managed-review.yaml",
547
581
  "digest": "sha256:25e2c2c215889dd13a6dec8714bc2b6357f3e01b09cc684f1e82d986e30ef064"
@@ -650,21 +684,29 @@
650
684
  "path": "actions/restore-repository-sources.yaml",
651
685
  "digest": "sha256:8e44f0dc15ac9b0eea8af62dcefd315d7c03a52dab1cda373537d275ae7383dc"
652
686
  },
687
+ {
688
+ "path": "actions/revise-code-index-audit.yaml",
689
+ "digest": "sha256:0ea9c41b2b698bf3a779381b42d6cd9b7eb9d54718498f3b2875eab4c23a76f6"
690
+ },
653
691
  {
654
692
  "path": "actions/revise-document.yaml",
655
693
  "digest": "sha256:605d3808670582da69881c9a2eb8b0de21b42fbdd04c1d04a8fa93513989a08e"
656
694
  },
695
+ {
696
+ "path": "actions/submit-code-index-audit.yaml",
697
+ "digest": "sha256:30ecc7cf9fcae232f9d3075d4410f5753c599bee148e06bf08afe4c219bb45c4"
698
+ },
657
699
  {
658
700
  "path": "codes.yaml",
659
- "digest": "sha256:d2edb3ac2599e5a5acfa1ef3bd807f23dd743d4cce10a53113a511eaf314c927"
701
+ "digest": "sha256:387e46f7da76e3152dcd5ab61481bb3c4465624ecfbfd58994276b67b4565f5e"
660
702
  },
661
703
  {
662
704
  "path": "graphs/workspace.yaml",
663
- "digest": "sha256:29a79bec9dd37dd9973fb43ab52090c90e4ba8cf734f85729a56ac1f0ec22f91"
705
+ "digest": "sha256:010fae5620a92e492de41d1213c34ad4013681ff2f72cc4f8e30d29ad4359881"
664
706
  },
665
707
  {
666
708
  "path": "provider.yaml",
667
- "digest": "sha256:a718b8f16af0967f020ef9211a3da1507369a0889d7faf88beeaed536a0256ce"
709
+ "digest": "sha256:d4fc8b8a219056c3f48bfa69d467e12e592a348f1c823a08ab553e8374d6af54"
668
710
  },
669
711
  {
670
712
  "path": "resources/diagnostics/projection-stale.md",
@@ -700,7 +742,7 @@
700
742
  },
701
743
  {
702
744
  "path": "resources/dialogue/knowledge-review.md",
703
- "digest": "sha256:be908d5c2092790a2b3b24008367285a896c76e705685358549492a4f2eefa6b"
745
+ "digest": "sha256:26699582f0d9c014e84e4b21b5cf591614edbe16b544d6145c8dd61112bc1339"
704
746
  },
705
747
  {
706
748
  "path": "resources/dialogue/package-output.md",
@@ -744,7 +786,7 @@
744
786
  },
745
787
  {
746
788
  "path": "resources/manuals/reference/project-api.md",
747
- "digest": "sha256:27c0f9523fa747c9acf7438f8e05993a83ea9942e962bfa0dfb879c9f927cc28"
789
+ "digest": "sha256:5fe640181630d7a363aec785ff8c76963bd41f797a4546d903fd6d5c1e7fd82b"
748
790
  },
749
791
  {
750
792
  "path": "resources/manuals/reference/template-variables.md",
@@ -752,11 +794,15 @@
752
794
  },
753
795
  {
754
796
  "path": "resources/procedures/close-and-build.md",
755
- "digest": "sha256:bc7cc7aea9fd6796e71cc50c8ec44446fc7c576c9ddc3f6fe080d25488838592"
797
+ "digest": "sha256:4f68373f9406dee8607a7b814e97dcd25c8508c2113f0f50152af1ef24ea33ef"
756
798
  },
757
799
  {
758
800
  "path": "resources/procedures/code-extraction.md",
759
- "digest": "sha256:b32901a9b4e68f4b8518e3bc6dfa00a010cc0a14ee2dbdf2b454948791c8a058"
801
+ "digest": "sha256:1e5bbf399bdf442c28e52f5f8faeb16e8f5f8fdd94f6ccdfae87ec63ded478b7"
802
+ },
803
+ {
804
+ "path": "resources/procedures/code-index-audit.md",
805
+ "digest": "sha256:72f98ccb1370c58381187eba9d90808cf4c71168febf17a74147da05db13c169"
760
806
  },
761
807
  {
762
808
  "path": "resources/procedures/document-capture.md",
@@ -780,7 +826,7 @@
780
826
  },
781
827
  {
782
828
  "path": "resources/procedures/knowledge-review.md",
783
- "digest": "sha256:a5d1f85514125eee0da2fda87b9b9af1e922248dffd8e3fc98f626a8325297d2"
829
+ "digest": "sha256:ee67b6182b7315d60aea3ed023e0688e3a0c80d90d8ebe31f38d04708d5228d1"
784
830
  },
785
831
  {
786
832
  "path": "resources/procedures/package-output.md",
@@ -902,6 +948,10 @@
902
948
  "path": "resources/semantic/compile/index.md",
903
949
  "digest": "sha256:4145f6bdc2855e354d00d311448584c3ed4b73849fc1277a2ed72d7be84e9e7c"
904
950
  },
951
+ {
952
+ "path": "resources/views/code-index-audit.yaml",
953
+ "digest": "sha256:b74c2457d2cc2cb37183b6dd1da4c14f198baec56a6cbf6b78c0a1013b38cde6"
954
+ },
905
955
  {
906
956
  "path": "resources/views/document-optimization-current.yaml",
907
957
  "digest": "sha256:5c98530b9a33e09445ae5e0f18151f66975106b6a0d327ac27875497c2f7f76d"
@@ -938,6 +988,10 @@
938
988
  "path": "resources/views/workspace-current.yaml",
939
989
  "digest": "sha256:712d146a1538e47d09c0cfad9961c5ad1c7ebb7e9796a52c0b0bdb6007f50dc1"
940
990
  },
991
+ {
992
+ "path": "schemas/code-index-audit-decision.schema.json",
993
+ "digest": "sha256:96a1bc4b962577c8a5b000a7c619271aed8845109362a6c3e54187c74bf69919"
994
+ },
941
995
  {
942
996
  "path": "schemas/document-optimization-decisions.schema.json",
943
997
  "digest": "sha256:a21e84dbdcc2bad85970ebc3171f58176b480f751076745424c7f9742b972f5c"
@@ -966,5 +1020,5 @@
966
1020
  "graphDependencies": {
967
1021
  "workspace": []
968
1022
  },
969
- "digest": "sha256:4f5bf521512a167b2e78c2649deeffa11f2dff07a137970bb1027b164697bc6f"
1023
+ "digest": "sha256:a3f1974e2359466c24d0853d3326ab7799d5e3b02cb611c667be726f09843ee3"
970
1024
  }
@@ -1,6 +1,6 @@
1
1
  schema: agent-graph.provider.v1
2
2
  id: c4a/context
3
- version: 0.6.16
3
+ version: 0.6.18
4
4
  name: Context workflow
5
5
  description: Internal work contract for Context knowledge workspaces.
6
6
  graphs:
@@ -18,6 +18,15 @@ The user does not need to create a payload file; the Agent may write the pasted
18
18
  payload to ignored scratch storage for the CLI command. Never derive a payload
19
19
  from HTML, candidate ids, snapshots, or a default decision.
20
20
 
21
+ Do not mention force approval when first presenting Review. If the user replies
22
+ without a Payload that they approve or want to continue, explain that the
23
+ report Payload remains the normal path. Only at that point, when the report is
24
+ unavailable to them, tell them they may explicitly reply with the exact phrase
25
+ `强制批准` to approve the complete current scope without per-candidate choices.
26
+ Execute the Route's `after-human-confirmation` force-approval command only after
27
+ that exact phrase appears in the current conversation. Phrases such as `我批准`,
28
+ `继续`, or `全部通过` do not invoke this escape path.
29
+
21
30
  Do not open Review for one page or module while another confirmed item in the
22
31
  same round is still being generated. If a repeat codegraph run has no delta,
23
32
  state that existing approvals were preserved and no Review gate remains.
@@ -951,11 +951,18 @@ review html --all --open --format json`, confirm the returned `opened` field,
951
951
  and wait for the user-copied payload. They should not run the phase as an
952
952
  automatic approval step or synthesize a payload themselves.
953
953
 
954
- The only batch-wide exception is explicit current-conversation fully managed
955
- authority. In that mode, follow the `context status --managed` route to
954
+ One batch-wide path is explicit current-conversation fully managed authority.
955
+ In that mode, follow the `context status --managed` route to
956
956
  `context review approve-all ... --managed`; the CLI validates the exact current
957
957
  scope before applying one default-approved decision.
958
958
 
959
+ Ordinary mode has a separate user-confirmed escape path for environments where
960
+ the Review report cannot be opened. Do not advertise it in the initial Review
961
+ prompt. After the user reports that limitation, the exact conversation phrase
962
+ `强制批准` authorizes only the current Route's revision-bound
963
+ `context review approve-all ... --force` command. Other generic approval or
964
+ continue wording does not invoke it.
965
+
959
966
  The gate is batch-scoped: prose waits for every planned View across all active
960
967
  structure slots and every declared `pendingStructureTargets` item in the round;
961
968
  codegraph waits for every pending extract phase in the confirmed module round.
@@ -26,3 +26,11 @@ package inventory. Revision sidecars are never emitted as separate knowledge.
26
26
  Run only the current route command, then evaluate again. A successful build
27
27
  means the currently declared scope is current; newly captured or newly declared
28
28
  targets can reopen earlier graph nodes.
29
+ # Code-index audit record
30
+
31
+ When a package selects approved `codegraph` pages, build requires the current
32
+ batch-level Agent audit to be accepted. The complete report remains in the
33
+ Context workspace at `knowledge/code-index-audit.json` and is not copied into
34
+ `dist/` or uploaded with the package. `context-build-inventory.json` stores only
35
+ the report digest, decision, and compact package summary needed to identify the
36
+ audited build.
@@ -144,3 +144,17 @@ extractor, keep the lifecycle in `extractCustom()` and implement only the
144
144
  missing project adapter. If reliable syntax facts cannot be produced, stop at
145
145
  configuration and report the generic capability gap rather than emitting an
146
146
  empty or guessed graph.
147
+ # Agent audit after extraction
148
+
149
+ After every complete code-extraction batch, the Route produces one batch-level
150
+ code-index audit. Mechanical signals cover content depth, evidence scope,
151
+ declared-source coverage, and structured handoffs. They are review evidence,
152
+ not an automatic numeric rejection: the Agent must inspect the affected pages
153
+ and submit one `accept`, `revise`, or `request-input` decision for all index
154
+ units together.
155
+
156
+ Do not split this into one confirmation per module. In fully managed operation,
157
+ real issues select `revise` and the Route returns through project configuration,
158
+ batch Preview, extraction, and a new audit until the index is acceptable. A
159
+ false positive may be accepted only with a concrete inspected reason. Ask the
160
+ user only when reliable correction needs unavailable material or access.
@@ -0,0 +1,43 @@
1
+ ---
2
+ id: procedure.code-index-audit
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Code-index Agent audit
8
+
9
+ This Route is a required semantic review of the complete proposed code index.
10
+ The CLI reports mechanical signals; the Agent reads the affected candidate
11
+ content and evidence, compares registered sources with the user-confirmed
12
+ scope, and decides whether the index is fit for its declared output profiles.
13
+
14
+ The report is not a numeric rejection. A signal may be a false positive, but
15
+ it may not be ignored. Every elevated signal must receive an assessment tied
16
+ to inspected content. Submit one `context.code-index-audit-decision.v1`
17
+ payload for the complete batch.
18
+
19
+ ## Decisions
20
+
21
+ - `accept`: the requested scope is represented and every real content-depth,
22
+ evidence-scope, and relationship issue is resolved. An acceptable or
23
+ non-applicable signal needs a concrete reason.
24
+ - `revise`: one or more real problems remain. Identify the affected units and
25
+ describe changes to scope, aggregation, sections, evidence, or structured
26
+ handoffs. The Route returns to `src/index.ts`, Preview, extraction, and a new
27
+ audit revision.
28
+ - `request-input`: reliable revision requires material unavailable in the
29
+ registered sources, such as an external protocol or missing source boundary.
30
+ Ask only for that material, then submit a new decision.
31
+
32
+ ## Fully managed operation
33
+
34
+ Fully managed authority does not auto-accept this audit. When a signal is a
35
+ real problem, choose `revise` and continue the revision loop without asking the
36
+ user. Repeat until the proposed index matches the requested scope and its
37
+ module maps, contracts, and handoffs contain useful source-backed explanation.
38
+ Pause only for unavailable material, source access, tool failure, or a
39
+ concrete no-progress blocker.
40
+
41
+ After each decision, briefly tell the user which decision was selected, the
42
+ affected units, and the next Graph path. Do not stop a managed run merely to
43
+ announce a successful automatic revision.
@@ -26,6 +26,12 @@ Without explicit session-managed authority:
26
26
  - let the user approve or reject candidates;
27
27
  - apply the exact returned decision payload.
28
28
 
29
+ The ordinary Route also carries a revision-bound force-approval resolution
30
+ Action as an escape path. Do not advertise it when first presenting Review.
31
+ Use it only after the user cannot use the report and explicitly replies with
32
+ the exact phrase `强制批准` in the current conversation. It approves the complete
33
+ current scope atomically; no candidate-specific decisions are inferred.
34
+
29
35
  With explicit session-managed authority, Context may approve the complete
30
36
  current batch atomically. The authority exists only in the current
31
37
  conversation. It does not bypass source permission, validation, close, or
@@ -0,0 +1,6 @@
1
+ schema: agent-graph.resource.v1
2
+ id: context.code-index-audit
3
+ kind: context-view
4
+ mediaType: text/markdown
5
+ description: Current code-index content-depth, evidence-scope, relationship, source-coverage signals, and prior Agent decisions.
6
+ materializer: actions/materialize-context-view.yaml
@@ -0,0 +1,94 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "context.code-index-audit-decision.v1",
4
+ "title": "Context code-index Agent audit decision",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema",
9
+ "report_digest",
10
+ "decision",
11
+ "summary",
12
+ "reviewed_units",
13
+ "scope_assessment",
14
+ "signal_assessments"
15
+ ],
16
+ "properties": {
17
+ "schema": { "const": "context.code-index-audit-decision.v1" },
18
+ "report_digest": { "type": "string", "minLength": 1 },
19
+ "decision": {
20
+ "type": "string",
21
+ "enum": ["accept", "revise", "request-input"]
22
+ },
23
+ "summary": { "type": "string", "minLength": 1 },
24
+ "reviewed_units": {
25
+ "type": "array",
26
+ "minItems": 1,
27
+ "uniqueItems": true,
28
+ "items": { "type": "string", "minLength": 1 }
29
+ },
30
+ "scope_assessment": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "required": ["matches_requested_scope", "omissions", "summary"],
34
+ "properties": {
35
+ "matches_requested_scope": { "type": "boolean" },
36
+ "omissions": {
37
+ "type": "array",
38
+ "uniqueItems": true,
39
+ "items": { "type": "string" }
40
+ },
41
+ "summary": { "type": "string", "minLength": 1 }
42
+ }
43
+ },
44
+ "signal_assessments": {
45
+ "type": "array",
46
+ "items": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": ["signal_id", "disposition", "reason"],
50
+ "properties": {
51
+ "signal_id": { "type": "string", "minLength": 1 },
52
+ "disposition": {
53
+ "type": "string",
54
+ "enum": ["fix", "acceptable", "not-applicable"]
55
+ },
56
+ "reason": { "type": "string", "minLength": 1 }
57
+ }
58
+ }
59
+ },
60
+ "revision_plan": {
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "required": ["units", "actions"],
64
+ "properties": {
65
+ "units": {
66
+ "type": "array",
67
+ "minItems": 1,
68
+ "uniqueItems": true,
69
+ "items": { "type": "string", "minLength": 1 }
70
+ },
71
+ "actions": {
72
+ "type": "array",
73
+ "minItems": 1,
74
+ "items": { "type": "string", "minLength": 1 }
75
+ }
76
+ }
77
+ },
78
+ "requested_material": {
79
+ "type": "array",
80
+ "minItems": 1,
81
+ "items": { "type": "string", "minLength": 1 }
82
+ }
83
+ },
84
+ "allOf": [
85
+ {
86
+ "if": { "properties": { "decision": { "const": "revise" } } },
87
+ "then": { "required": ["revision_plan"] }
88
+ },
89
+ {
90
+ "if": { "properties": { "decision": { "const": "request-input" } } },
91
+ "then": { "required": ["requested_material"] }
92
+ }
93
+ ]
94
+ }