@c4a/context-cli 0.6.17 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4a/context-cli",
3
- "version": "0.6.17",
3
+ "version": "0.6.18",
4
4
  "type": "module",
5
5
  "description": "Local runtime and Agent integration for traceable knowledge production",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@c4a/agent-graph": "0.2.6",
27
- "@c4a/context": "0.6.17",
27
+ "@c4a/context": "0.6.18",
28
28
  "commander": "^11.0.0",
29
29
  "fast-xml-parser": "^5.10.1",
30
30
  "handlebars": "^4.7.8",
package/plugins/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.17
1
+ 0.6.18
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "c4a",
3
3
  "description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
4
- "version": "0.6.17",
4
+ "version": "0.6.18",
5
5
  "author": {
6
6
  "name": "c4a"
7
7
  },
@@ -139,6 +139,11 @@ Treat `workflow.current` as the current-step authority:
139
139
  `inspection_action` resource only while inspecting the decision, and read a
140
140
  `resolution_action` resource only after the user confirms the Gate. Neither
141
141
  replaces ordinary required resources.
142
+ For ordinary Knowledge Review, follow the Route-selected dialogue: do not
143
+ advertise force approval in the initial prompt. If the user cannot access
144
+ the report, only their exact current-conversation reply `强制批准` authorizes
145
+ the returned force-approval resolution command; generic approval wording
146
+ does not.
142
147
  3. Execute only `commands` returned by the Route, preserving revision and
143
148
  authority flags exactly. A command marked `after-human-confirmation` waits
144
149
  for the current Gate decision. Run a command whose `execution.target` is `agent-host`
@@ -146,6 +151,9 @@ Treat `workflow.current` as the current-step authority:
146
151
  not inside a restricted child sandbox. Follow the Route-selected procedure
147
152
  for its audit and approval contract; never invent a payload, destination, or
148
153
  substitute command.
154
+ A Context command is complete only after its process returns an exit code and
155
+ receipt. If the host reports that it is still running, keep polling that same
156
+ invocation; never start a second Context write command in parallel.
149
157
  Treat a code-extraction batch preview as one Route action. Read its complete
150
158
  index-unit report and keep same-kind capability or scale decisions in the
151
159
  single returned Gate; do not ask about modules one by one. A non-delegatable
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c4a",
3
- "version": "0.6.17",
3
+ "version": "0.6.18",
4
4
  "description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
5
5
  "author": {
6
6
  "name": "c4a"
@@ -18,7 +18,7 @@
18
18
  "skills": "./skills/",
19
19
  "interface": {
20
20
  "displayName": "C4A Context",
21
- "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.17",
21
+ "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.18",
22
22
  "longDescription": "Create a Context workspace and use agent-guided next steps to register sources, run extraction, review candidates, build package outputs, and verify health without silently mutating source repositories.",
23
23
  "developerName": "c4a",
24
24
  "category": "Productivity",
@@ -151,6 +151,11 @@ Treat `workflow.current` as the current-step authority:
151
151
  `inspection_action` resource only while inspecting the decision, and read a
152
152
  `resolution_action` resource only after the user confirms the Gate. Neither
153
153
  replaces ordinary required resources.
154
+ For ordinary Knowledge Review, follow the Route-selected dialogue: do not
155
+ advertise force approval in the initial prompt. If the user cannot access
156
+ the report, only their exact current-conversation reply `强制批准` authorizes
157
+ the returned force-approval resolution command; generic approval wording
158
+ does not.
154
159
  3. Execute only `commands` returned by the Route, preserving revision and
155
160
  authority flags exactly. A command marked `after-human-confirmation` waits
156
161
  for the current Gate decision. Run a command whose `execution.target` is `agent-host`
@@ -158,6 +163,9 @@ Treat `workflow.current` as the current-step authority:
158
163
  not inside a restricted child sandbox. Follow the Route-selected procedure
159
164
  for its audit and approval contract; never invent a payload, destination, or
160
165
  substitute command.
166
+ A Context command is complete only after its process returns an exit code and
167
+ receipt. If the host reports that it is still running, keep polling that same
168
+ invocation; never start a second Context write command in parallel.
161
169
  Treat a code-extraction batch preview as one Route action. Read its complete
162
170
  index-unit report and keep same-kind capability or scale decisions in the
163
171
  single returned Gate; do not ask about modules one by one. A non-delegatable
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "c4a",
3
3
  "displayName": "C4A Context",
4
- "version": "0.6.17",
4
+ "version": "0.6.18",
5
5
  "description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
6
6
  "author": {
7
7
  "name": "Context4AI",
@@ -143,6 +143,11 @@ Treat `workflow.current` as the current-step authority:
143
143
  `inspection_action` resource only while inspecting the decision, and read a
144
144
  `resolution_action` resource only after the user confirms the Gate. Neither
145
145
  replaces ordinary required resources.
146
+ For ordinary Knowledge Review, follow the Route-selected dialogue: do not
147
+ advertise force approval in the initial prompt. If the user cannot access
148
+ the report, only their exact current-conversation reply `强制批准` authorizes
149
+ the returned force-approval resolution command; generic approval wording
150
+ does not.
146
151
  3. Execute only `commands` returned by the Route, preserving revision and
147
152
  authority flags exactly. A command marked `after-human-confirmation` waits
148
153
  for the current Gate decision. Run a command whose `execution.target` is `agent-host`
@@ -150,6 +155,9 @@ Treat `workflow.current` as the current-step authority:
150
155
  not inside a restricted child sandbox. Follow the Route-selected procedure
151
156
  for its audit and approval contract; never invent a payload, destination, or
152
157
  substitute command.
158
+ A Context command is complete only after its process returns an exit code and
159
+ receipt. If the host reports that it is still running, keep polling that same
160
+ invocation; never start a second Context write command in parallel.
153
161
  Treat a code-extraction batch preview as one Route action. Read its complete
154
162
  index-unit report and keep same-kind capability or scale decisions in the
155
163
  single returned Gate; do not ask about modules one by one. A non-delegatable
@@ -151,6 +151,11 @@ Treat `workflow.current` as the current-step authority:
151
151
  `inspection_action` resource only while inspecting the decision, and read a
152
152
  `resolution_action` resource only after the user confirms the Gate. Neither
153
153
  replaces ordinary required resources.
154
+ For ordinary Knowledge Review, follow the Route-selected dialogue: do not
155
+ advertise force approval in the initial prompt. If the user cannot access
156
+ the report, only their exact current-conversation reply `强制批准` authorizes
157
+ the returned force-approval resolution command; generic approval wording
158
+ does not.
154
159
  3. Execute only `commands` returned by the Route, preserving revision and
155
160
  authority flags exactly. A command marked `after-human-confirmation` waits
156
161
  for the current Gate decision. Run a command whose `execution.target` is `agent-host`
@@ -158,6 +163,9 @@ Treat `workflow.current` as the current-step authority:
158
163
  not inside a restricted child sandbox. Follow the Route-selected procedure
159
164
  for its audit and approval contract; never invent a payload, destination, or
160
165
  substitute command.
166
+ A Context command is complete only after its process returns an exit code and
167
+ receipt. If the host reports that it is still running, keep polling that same
168
+ invocation; never start a second Context write command in parallel.
161
169
  Treat a code-extraction batch preview as one Route action. Read its complete
162
170
  index-unit report and keep same-kind capability or scale decisions in the
163
171
  single returned Gate; do not ask about modules one by one. A non-delegatable
@@ -0,0 +1,5 @@
1
+ schema: agent-graph.action.v1
2
+ id: apply-forced-review
3
+ runner: host
4
+ effect: write
5
+ handler: context.review.force-approve-current
@@ -0,0 +1,5 @@
1
+ schema: agent-graph.action.v1
2
+ id: revise-code-index-audit
3
+ runner: host
4
+ effect: write
5
+ handler: context.project.revise-code-index
@@ -0,0 +1,6 @@
1
+ schema: agent-graph.action.v1
2
+ id: submit-code-index-audit
3
+ runner: host
4
+ effect: write
5
+ handler: context.code-index-audit.submit
6
+ inputSchema: schemas/code-index-audit-decision.schema.json
@@ -29,6 +29,9 @@ codes:
29
29
  - { code: route.extract.ownership-required, kind: route-reason, summary: Revise the index plan so every projected page has one output owner., document: resources/procedures/code-extraction.md }
30
30
  - { code: route.extract.scale-limit-exceeded, kind: route-reason, summary: At least one index unit exceeds the supported page limit., document: resources/procedures/code-extraction.md }
31
31
  - { code: route.extract.pending-target, kind: route-reason, summary: Extract the next pending code target before another workflow family., document: resources/procedures/code-extraction.md }
32
+ - { code: route.extract.audit-input-required, kind: route-reason, summary: The code-index audit requires specific source or protocol material that is not currently available., document: resources/procedures/code-index-audit.md }
33
+ - { code: route.extract.audit-revision-required, kind: route-reason, summary: Revise the code-index plan and content for issues confirmed by the Agent audit., document: resources/procedures/code-index-audit.md }
34
+ - { code: route.extract.audit-required, kind: route-reason, summary: The complete proposed code index requires one Agent semantic audit decision., document: resources/procedures/code-index-audit.md }
32
35
  - { code: route.document.classification-required, kind: route-reason, summary: A captured document needs an evidence-backed collection decision., document: resources/procedures/document-classification.md }
33
36
  - { code: route.prose.configuration-required, kind: route-reason, summary: A document target is missing a complete prose lifecycle declaration., document: resources/procedures/project-configuration.md }
34
37
  - { code: route.structure.pending-target, kind: route-reason, summary: Prepare the next document structure slot from source evidence., document: resources/procedures/prose-align.md }
@@ -172,6 +172,7 @@ nodes:
172
172
  kind: gate
173
173
  reasonCode: route.review.decision-required
174
174
  inspectionAction: actions/inspect-review.yaml
175
+ resolutionAction: actions/apply-forced-review.yaml
175
176
  delegated:
176
177
  inspection: skip
177
178
  resolutionAction: actions/apply-managed-review.yaml
@@ -440,6 +441,51 @@ nodes:
440
441
  - resources/procedures/code-extraction.md
441
442
  - resources/views/source-boundary.yaml
442
443
 
444
+ - id: resolve-code-index-audit-input
445
+ kind: gate
446
+ reasonCode: route.extract.audit-input-required
447
+ resolutionAction: actions/submit-code-index-audit.yaml
448
+ gate:
449
+ id: code-index-audit-input
450
+ prompt: Provide the specific missing source or protocol material required to complete the code-index audit.
451
+ delegatable: false
452
+ satisfiedBy:
453
+ - path: extract.audit_input_required
454
+ equals: false
455
+ resources:
456
+ required:
457
+ - resources/procedures/code-index-audit.md
458
+ - resources/dialogue/human-gates.md
459
+ - resources/views/code-index-audit.yaml
460
+
461
+ - id: revise-code-index-audit
462
+ kind: action
463
+ reasonCode: route.extract.audit-revision-required
464
+ action: actions/revise-code-index-audit.yaml
465
+ satisfiedBy:
466
+ - path: extract.audit_revision_required
467
+ equals: false
468
+ resources:
469
+ required:
470
+ - resources/procedures/code-index-audit.md
471
+ - resources/semantic/code-index/classification.md
472
+ - resources/views/code-index-audit.yaml
473
+ recommended:
474
+ - resources/manuals/reference/code-extractors.md
475
+
476
+ - id: audit-code-index
477
+ kind: action
478
+ reasonCode: route.extract.audit-required
479
+ action: actions/submit-code-index-audit.yaml
480
+ satisfiedBy:
481
+ - path: extract.audit_resolved
482
+ equals: true
483
+ resources:
484
+ required:
485
+ - resources/procedures/code-index-audit.md
486
+ - resources/semantic/code-index/classification.md
487
+ - resources/views/code-index-audit.yaml
488
+
443
489
  - id: classify-document
444
490
  kind: gate
445
491
  reasonCode: route.document.classification-required
@@ -501,6 +547,7 @@ nodes:
501
547
  kind: gate
502
548
  reasonCode: route.review.decision-required
503
549
  inspectionAction: actions/inspect-review.yaml
550
+ resolutionAction: actions/apply-forced-review.yaml
504
551
  delegated:
505
552
  inspection: skip
506
553
  resolutionAction: actions/apply-managed-review.yaml
@@ -689,7 +736,10 @@ edges:
689
736
  - { from: preview-extraction-batch, to: repair-extraction-ownership }
690
737
  - { from: repair-extraction-ownership, to: revise-extraction-scale }
691
738
  - { from: revise-extraction-scale, to: extract-next }
692
- - { from: extract-next, to: review-current-batch }
739
+ - { from: extract-next, to: resolve-code-index-audit-input }
740
+ - { from: resolve-code-index-audit-input, to: revise-code-index-audit, kind: gatedBy }
741
+ - { from: revise-code-index-audit, to: audit-code-index }
742
+ - { from: audit-code-index, to: review-current-batch }
693
743
  - { from: review-current-batch, to: apply-managed-review, kind: gatedBy }
694
744
  - { from: apply-managed-review, to: classify-document }
695
745
  - { from: classify-document, to: configure-prose-lifecycle, kind: gatedBy }
@@ -2,14 +2,14 @@
2
2
  "schema": "agent-graph.bundle.v1",
3
3
  "provider": {
4
4
  "id": "c4a/context",
5
- "version": "0.6.17"
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:31e9ca586a2c9edab004d04be8221e46897a7b88a601e9acad603af3ba250910"
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:5da3c1272fa593c6eb36bbb33acc303e01dae0788f5f6ff5389835a76f8bd2df"
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.17
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