@c4a/context-cli 0.6.1-beta.2 → 0.6.1-beta.3

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 (40) hide show
  1. package/cli.js +59015 -58198
  2. package/docs/quickstart.md +6 -0
  3. package/package.json +2 -2
  4. package/plugins/README.md +11 -0
  5. package/plugins/README_CN.md +9 -0
  6. package/plugins/VERSION +1 -1
  7. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  8. package/plugins/claude/commands/continue.md +16 -1
  9. package/plugins/claude/commands/init.md +16 -15
  10. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  11. package/plugins/codex/skills/continue/SKILL.md +16 -1
  12. package/plugins/codex/skills/init/SKILL.md +18 -17
  13. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  14. package/plugins/cursor/commands/context-continue.md +16 -1
  15. package/plugins/cursor/commands/context-init.md +18 -17
  16. package/plugins/skills/context-continue/SKILL.md +16 -1
  17. package/plugins/skills/context-init/SKILL.md +18 -17
  18. package/providers/context/actions/align-next.yaml +0 -1
  19. package/providers/context/actions/apply-managed-review.yaml +0 -1
  20. package/providers/context/actions/apply-structure-confirmation.yaml +0 -1
  21. package/providers/context/actions/capture-next.yaml +0 -1
  22. package/providers/context/actions/compile-next.yaml +0 -1
  23. package/providers/context/actions/configure-code-extraction.yaml +0 -1
  24. package/providers/context/actions/configure-document-capture.yaml +0 -1
  25. package/providers/context/actions/configure-package-output.yaml +0 -1
  26. package/providers/context/actions/configure-prose-lifecycle.yaml +0 -1
  27. package/providers/context/actions/ensure-repository-sources.yaml +1 -1
  28. package/providers/context/actions/extract-next.yaml +0 -1
  29. package/providers/context/actions/repair-project-entry.yaml +0 -1
  30. package/providers/context/actions/repair-workspace-state.yaml +0 -1
  31. package/providers/context/manifest.json +45 -45
  32. package/providers/context/provider.yaml +1 -1
  33. package/providers/context/resources/manuals/reference/project-api.md +20 -0
  34. package/providers/context/resources/procedures/close-and-build.md +0 -1
  35. package/providers/context/resources/procedures/document-classification.md +0 -1
  36. package/providers/context/resources/procedures/evidence-maintenance.md +0 -1
  37. package/providers/context/resources/procedures/knowledge-review.md +0 -1
  38. package/providers/context/resources/procedures/project-configuration.md +0 -1
  39. package/providers/context/resources/procedures/verify-and-repair.md +0 -1
  40. package/providers/context/resources/semantic/align/structure-planning.md +20 -7
@@ -2,7 +2,7 @@
2
2
  "schema": "agent-graph.bundle.v1",
3
3
  "provider": {
4
4
  "id": "c4a/context",
5
- "version": "0.6.1-beta.2"
5
+ "version": "0.6.1-beta.3"
6
6
  },
7
7
  "providerManifest": "provider.yaml",
8
8
  "graphs": [
@@ -16,17 +16,17 @@
16
16
  {
17
17
  "id": "align-next",
18
18
  "path": "actions/align-next.yaml",
19
- "digest": "sha256:e7afec0ac46e078d16b5593f2a6c781db4ce5613ecea78824e32db20814026f9"
19
+ "digest": "sha256:6370fc4db94177da33b3343c5a83bb8c1162637f676a05ff5a674afd98959e59"
20
20
  },
21
21
  {
22
22
  "id": "apply-managed-review",
23
23
  "path": "actions/apply-managed-review.yaml",
24
- "digest": "sha256:727408016a246f39a38cbdcc611bdd62c3dc901575d1b9598b149601e13ea56f"
24
+ "digest": "sha256:25e2c2c215889dd13a6dec8714bc2b6357f3e01b09cc684f1e82d986e30ef064"
25
25
  },
26
26
  {
27
27
  "id": "apply-structure-confirmation",
28
28
  "path": "actions/apply-structure-confirmation.yaml",
29
- "digest": "sha256:67fa9fd70f201b6459756afe95f445583d3a332996c6cdca09303b56ca9f4350"
29
+ "digest": "sha256:2d5acf97ca692d324c829b25e020708b0d5fcd7ee004b7fd2be625a197dc77c3"
30
30
  },
31
31
  {
32
32
  "id": "build-next",
@@ -36,7 +36,7 @@
36
36
  {
37
37
  "id": "capture-next",
38
38
  "path": "actions/capture-next.yaml",
39
- "digest": "sha256:25c53a9853f508886060b2a88b6d3962e907dd8a0aca2fd118c1a9e9396a640e"
39
+ "digest": "sha256:409a091eb771d5087408832539a50cb7b6f0c0d25dd47257798df49f5d8b6fc3"
40
40
  },
41
41
  {
42
42
  "id": "close-approved-knowledge",
@@ -46,37 +46,37 @@
46
46
  {
47
47
  "id": "compile-next",
48
48
  "path": "actions/compile-next.yaml",
49
- "digest": "sha256:3dc91d9cfbbf6f3a67c94d66d406502ccc9c45ce5c42563c374c63b43a42e54a"
49
+ "digest": "sha256:e0fec702b2e77b4425c90ad47813fe2e9a6a007013d983b5e51243eb0c61433e"
50
50
  },
51
51
  {
52
52
  "id": "configure-code-extraction",
53
53
  "path": "actions/configure-code-extraction.yaml",
54
- "digest": "sha256:37ee0a186ca2a4de6cce45b65237d2ab9333249aac3fab16f874ed85aad6cd39"
54
+ "digest": "sha256:db83bf8d71f4bd1869d023b96bb095fbe206018125a528478693920ba9e2ffe3"
55
55
  },
56
56
  {
57
57
  "id": "configure-document-capture",
58
58
  "path": "actions/configure-document-capture.yaml",
59
- "digest": "sha256:351bee54b3946d082731c8c9e75104d8e5058e6830aa7717061d4ede4ce0dbec"
59
+ "digest": "sha256:c5955af91692dd8e46b519aba8eec56a6a0dab58c1639f2ff42f746daf558f1d"
60
60
  },
61
61
  {
62
62
  "id": "configure-package-output",
63
63
  "path": "actions/configure-package-output.yaml",
64
- "digest": "sha256:13176b41722ed2db04d9c5522be3d39d07cf3a268a6ead3b16d96b7fa49d2173"
64
+ "digest": "sha256:2f5a682988ce3f32c53cf5131c36cf88e62332e8f27d5daaa0dedfb6e687b55a"
65
65
  },
66
66
  {
67
67
  "id": "configure-prose-lifecycle",
68
68
  "path": "actions/configure-prose-lifecycle.yaml",
69
- "digest": "sha256:e3b4b6db85c9b8ed0288773febd509eb690246d798678bab71da846412b48de1"
69
+ "digest": "sha256:226d20be637455b3ffba4a115dd0437d3330354d8a73b8e5313b3af303d53bcc"
70
70
  },
71
71
  {
72
72
  "id": "ensure-repository-sources",
73
73
  "path": "actions/ensure-repository-sources.yaml",
74
- "digest": "sha256:3fd30d746a882f6a3dfaeca8fa6270b08bdb7dc7bd34402b849b0953ec2e9743"
74
+ "digest": "sha256:00205debd0e58065f04520b1543c3e5dffc0da63cf42ffff4370757e59557791"
75
75
  },
76
76
  {
77
77
  "id": "extract-next",
78
78
  "path": "actions/extract-next.yaml",
79
- "digest": "sha256:99f952085f23dfb0d7adcca0e12fcf31043bde568f3314326b542fd4547331cb"
79
+ "digest": "sha256:3d5e26cbdd912c9be666ce423b19456b31ab67da53c4e01a1a1c7a3dc1e6420a"
80
80
  },
81
81
  {
82
82
  "id": "inspect-document-classification",
@@ -111,7 +111,7 @@
111
111
  {
112
112
  "id": "repair-project-entry",
113
113
  "path": "actions/repair-project-entry.yaml",
114
- "digest": "sha256:fb225cac409f3edc79d8d8931aef89a57ead11728747c49fe0f1fafb2a3f2028"
114
+ "digest": "sha256:7850eea903cfb5d5f17078cc79f790325eed75f07cd7e40ef91add1ee87ed9cd"
115
115
  },
116
116
  {
117
117
  "id": "repair-verification",
@@ -121,7 +121,7 @@
121
121
  {
122
122
  "id": "repair-workspace-state",
123
123
  "path": "actions/repair-workspace-state.yaml",
124
- "digest": "sha256:8927f0b2c576c47bf20fc42aa9f9936633aab9b7057877fcfebec800e9285228"
124
+ "digest": "sha256:67296adf5336a7f746e250dc23676972282f88410fb6a6edc41a929e15d1856b"
125
125
  }
126
126
  ],
127
127
  "resources": [
@@ -148,7 +148,7 @@
148
148
  {
149
149
  "id": "context.sdk.project-api",
150
150
  "path": "resources/manuals/reference/project-api.md",
151
- "digest": "sha256:8258c1bac40f919582a6b4a13f95ab250f6619dc98dd2df770d56839d3978dca"
151
+ "digest": "sha256:fa9e6d2eb48f4ae74b560b77c8f490ca723d6e070be30217643f0515cebc6cf1"
152
152
  },
153
153
  {
154
154
  "id": "context.sdk.template-variables",
@@ -173,7 +173,7 @@
173
173
  {
174
174
  "id": "context.semantic.align.structure-planning",
175
175
  "path": "resources/semantic/align/structure-planning.md",
176
- "digest": "sha256:3d077e85f3f0e44da8f291a18bb4fe1e6e40b2885c7f0160a638ce60b72d174e"
176
+ "digest": "sha256:08f4dab4f53583415155a869be821b4ce2f275bc197be8976a38d3b30a66aa39"
177
177
  },
178
178
  {
179
179
  "id": "context.semantic.compile.index",
@@ -258,7 +258,7 @@
258
258
  {
259
259
  "id": "procedure.close-and-build",
260
260
  "path": "resources/procedures/close-and-build.md",
261
- "digest": "sha256:0edb69a16d98538c76d6d0d321bdd1b5fe704bdbbecad8ff545faae2be8bd617"
261
+ "digest": "sha256:02e91b42cf9faec65bbbb27de512298b4715b9808f1ec364022b34145173dd3d"
262
262
  },
263
263
  {
264
264
  "id": "procedure.code-extraction",
@@ -273,17 +273,17 @@
273
273
  {
274
274
  "id": "procedure.document-classification",
275
275
  "path": "resources/procedures/document-classification.md",
276
- "digest": "sha256:115257038ea1d559846e43e8591bcda31a55e51b6f60d164bd6dd34c88d3df9a"
276
+ "digest": "sha256:eae7ce95e0e61e90b71be5b020e49f64f14a04833ecb618509ca5fd3cfb34176"
277
277
  },
278
278
  {
279
279
  "id": "procedure.evidence-maintenance",
280
280
  "path": "resources/procedures/evidence-maintenance.md",
281
- "digest": "sha256:ccc6e56074b7dd7d14fd0e98e7706370b7950c56baaa3d163acb6a87268a179b"
281
+ "digest": "sha256:2bceea12b4430586e0b6bbaef46dc32ad999f9d2cc373b7db77a88f5fca93ccc"
282
282
  },
283
283
  {
284
284
  "id": "procedure.knowledge-review",
285
285
  "path": "resources/procedures/knowledge-review.md",
286
- "digest": "sha256:6a9af6aaf43f07e36ae76e9b8049d1a76fb3847e80173eedeeb250a0bcc0b8bb"
286
+ "digest": "sha256:5ebf2bb9399d291f8a5dbba249169b4fb221e456aa6c05081c4c54b2e6f3cf48"
287
287
  },
288
288
  {
289
289
  "id": "procedure.package-output",
@@ -293,7 +293,7 @@
293
293
  {
294
294
  "id": "procedure.project-configuration",
295
295
  "path": "resources/procedures/project-configuration.md",
296
- "digest": "sha256:899af7cffb1d856b00c496dd45ffcccc14f22c19b586cf1d80679329ba8ea277"
296
+ "digest": "sha256:4e62fe0e5056cedfa9976d38275e5b4c5805d7e3913cb13d26edc78fa04e49ef"
297
297
  },
298
298
  {
299
299
  "id": "procedure.prose-align",
@@ -318,7 +318,7 @@
318
318
  {
319
319
  "id": "procedure.verify-and-repair",
320
320
  "path": "resources/procedures/verify-and-repair.md",
321
- "digest": "sha256:4209d1361c8a6293367e239e8b6b6e7d6a708e8c3fa1160cfafdff4cdcb6b857"
321
+ "digest": "sha256:6becb02923a07eae47de7a9cfca2fc28ee3932a62bbcf4d273ec0f5b430b15e9"
322
322
  }
323
323
  ],
324
324
  "schemas": [
@@ -336,15 +336,15 @@
336
336
  "files": [
337
337
  {
338
338
  "path": "actions/align-next.yaml",
339
- "digest": "sha256:e7afec0ac46e078d16b5593f2a6c781db4ce5613ecea78824e32db20814026f9"
339
+ "digest": "sha256:6370fc4db94177da33b3343c5a83bb8c1162637f676a05ff5a674afd98959e59"
340
340
  },
341
341
  {
342
342
  "path": "actions/apply-managed-review.yaml",
343
- "digest": "sha256:727408016a246f39a38cbdcc611bdd62c3dc901575d1b9598b149601e13ea56f"
343
+ "digest": "sha256:25e2c2c215889dd13a6dec8714bc2b6357f3e01b09cc684f1e82d986e30ef064"
344
344
  },
345
345
  {
346
346
  "path": "actions/apply-structure-confirmation.yaml",
347
- "digest": "sha256:67fa9fd70f201b6459756afe95f445583d3a332996c6cdca09303b56ca9f4350"
347
+ "digest": "sha256:2d5acf97ca692d324c829b25e020708b0d5fcd7ee004b7fd2be625a197dc77c3"
348
348
  },
349
349
  {
350
350
  "path": "actions/build-next.yaml",
@@ -352,7 +352,7 @@
352
352
  },
353
353
  {
354
354
  "path": "actions/capture-next.yaml",
355
- "digest": "sha256:25c53a9853f508886060b2a88b6d3962e907dd8a0aca2fd118c1a9e9396a640e"
355
+ "digest": "sha256:409a091eb771d5087408832539a50cb7b6f0c0d25dd47257798df49f5d8b6fc3"
356
356
  },
357
357
  {
358
358
  "path": "actions/close-approved-knowledge.yaml",
@@ -360,31 +360,31 @@
360
360
  },
361
361
  {
362
362
  "path": "actions/compile-next.yaml",
363
- "digest": "sha256:3dc91d9cfbbf6f3a67c94d66d406502ccc9c45ce5c42563c374c63b43a42e54a"
363
+ "digest": "sha256:e0fec702b2e77b4425c90ad47813fe2e9a6a007013d983b5e51243eb0c61433e"
364
364
  },
365
365
  {
366
366
  "path": "actions/configure-code-extraction.yaml",
367
- "digest": "sha256:37ee0a186ca2a4de6cce45b65237d2ab9333249aac3fab16f874ed85aad6cd39"
367
+ "digest": "sha256:db83bf8d71f4bd1869d023b96bb095fbe206018125a528478693920ba9e2ffe3"
368
368
  },
369
369
  {
370
370
  "path": "actions/configure-document-capture.yaml",
371
- "digest": "sha256:351bee54b3946d082731c8c9e75104d8e5058e6830aa7717061d4ede4ce0dbec"
371
+ "digest": "sha256:c5955af91692dd8e46b519aba8eec56a6a0dab58c1639f2ff42f746daf558f1d"
372
372
  },
373
373
  {
374
374
  "path": "actions/configure-package-output.yaml",
375
- "digest": "sha256:13176b41722ed2db04d9c5522be3d39d07cf3a268a6ead3b16d96b7fa49d2173"
375
+ "digest": "sha256:2f5a682988ce3f32c53cf5131c36cf88e62332e8f27d5daaa0dedfb6e687b55a"
376
376
  },
377
377
  {
378
378
  "path": "actions/configure-prose-lifecycle.yaml",
379
- "digest": "sha256:e3b4b6db85c9b8ed0288773febd509eb690246d798678bab71da846412b48de1"
379
+ "digest": "sha256:226d20be637455b3ffba4a115dd0437d3330354d8a73b8e5313b3af303d53bcc"
380
380
  },
381
381
  {
382
382
  "path": "actions/ensure-repository-sources.yaml",
383
- "digest": "sha256:3fd30d746a882f6a3dfaeca8fa6270b08bdb7dc7bd34402b849b0953ec2e9743"
383
+ "digest": "sha256:00205debd0e58065f04520b1543c3e5dffc0da63cf42ffff4370757e59557791"
384
384
  },
385
385
  {
386
386
  "path": "actions/extract-next.yaml",
387
- "digest": "sha256:99f952085f23dfb0d7adcca0e12fcf31043bde568f3314326b542fd4547331cb"
387
+ "digest": "sha256:3d5e26cbdd912c9be666ce423b19456b31ab67da53c4e01a1a1c7a3dc1e6420a"
388
388
  },
389
389
  {
390
390
  "path": "actions/inspect-document-classification.yaml",
@@ -412,7 +412,7 @@
412
412
  },
413
413
  {
414
414
  "path": "actions/repair-project-entry.yaml",
415
- "digest": "sha256:fb225cac409f3edc79d8d8931aef89a57ead11728747c49fe0f1fafb2a3f2028"
415
+ "digest": "sha256:7850eea903cfb5d5f17078cc79f790325eed75f07cd7e40ef91add1ee87ed9cd"
416
416
  },
417
417
  {
418
418
  "path": "actions/repair-verification.yaml",
@@ -420,7 +420,7 @@
420
420
  },
421
421
  {
422
422
  "path": "actions/repair-workspace-state.yaml",
423
- "digest": "sha256:8927f0b2c576c47bf20fc42aa9f9936633aab9b7057877fcfebec800e9285228"
423
+ "digest": "sha256:67296adf5336a7f746e250dc23676972282f88410fb6a6edc41a929e15d1856b"
424
424
  },
425
425
  {
426
426
  "path": "codes.yaml",
@@ -432,7 +432,7 @@
432
432
  },
433
433
  {
434
434
  "path": "provider.yaml",
435
- "digest": "sha256:1789ef237bd5d8272c6d339b9b1c30c4df17696b91133336459d10926a609af2"
435
+ "digest": "sha256:f05c81fbb86e6e34289d0828c04a15336dafaa8fcc122e49afc7496a00e97ac3"
436
436
  },
437
437
  {
438
438
  "path": "resources/diagnostics/verification.md",
@@ -488,7 +488,7 @@
488
488
  },
489
489
  {
490
490
  "path": "resources/manuals/reference/project-api.md",
491
- "digest": "sha256:8258c1bac40f919582a6b4a13f95ab250f6619dc98dd2df770d56839d3978dca"
491
+ "digest": "sha256:fa9e6d2eb48f4ae74b560b77c8f490ca723d6e070be30217643f0515cebc6cf1"
492
492
  },
493
493
  {
494
494
  "path": "resources/manuals/reference/template-variables.md",
@@ -496,7 +496,7 @@
496
496
  },
497
497
  {
498
498
  "path": "resources/procedures/close-and-build.md",
499
- "digest": "sha256:0edb69a16d98538c76d6d0d321bdd1b5fe704bdbbecad8ff545faae2be8bd617"
499
+ "digest": "sha256:02e91b42cf9faec65bbbb27de512298b4715b9808f1ec364022b34145173dd3d"
500
500
  },
501
501
  {
502
502
  "path": "resources/procedures/code-extraction.md",
@@ -508,15 +508,15 @@
508
508
  },
509
509
  {
510
510
  "path": "resources/procedures/document-classification.md",
511
- "digest": "sha256:115257038ea1d559846e43e8591bcda31a55e51b6f60d164bd6dd34c88d3df9a"
511
+ "digest": "sha256:eae7ce95e0e61e90b71be5b020e49f64f14a04833ecb618509ca5fd3cfb34176"
512
512
  },
513
513
  {
514
514
  "path": "resources/procedures/evidence-maintenance.md",
515
- "digest": "sha256:ccc6e56074b7dd7d14fd0e98e7706370b7950c56baaa3d163acb6a87268a179b"
515
+ "digest": "sha256:2bceea12b4430586e0b6bbaef46dc32ad999f9d2cc373b7db77a88f5fca93ccc"
516
516
  },
517
517
  {
518
518
  "path": "resources/procedures/knowledge-review.md",
519
- "digest": "sha256:6a9af6aaf43f07e36ae76e9b8049d1a76fb3847e80173eedeeb250a0bcc0b8bb"
519
+ "digest": "sha256:5ebf2bb9399d291f8a5dbba249169b4fb221e456aa6c05081c4c54b2e6f3cf48"
520
520
  },
521
521
  {
522
522
  "path": "resources/procedures/package-output.md",
@@ -524,7 +524,7 @@
524
524
  },
525
525
  {
526
526
  "path": "resources/procedures/project-configuration.md",
527
- "digest": "sha256:899af7cffb1d856b00c496dd45ffcccc14f22c19b586cf1d80679329ba8ea277"
527
+ "digest": "sha256:4e62fe0e5056cedfa9976d38275e5b4c5805d7e3913cb13d26edc78fa04e49ef"
528
528
  },
529
529
  {
530
530
  "path": "resources/procedures/prose-align.md",
@@ -544,7 +544,7 @@
544
544
  },
545
545
  {
546
546
  "path": "resources/procedures/verify-and-repair.md",
547
- "digest": "sha256:4209d1361c8a6293367e239e8b6b6e7d6a708e8c3fa1160cfafdff4cdcb6b857"
547
+ "digest": "sha256:6becb02923a07eae47de7a9cfca2fc28ee3932a62bbcf4d273ec0f5b430b15e9"
548
548
  },
549
549
  {
550
550
  "path": "resources/semantic/align/candidate-resolution.md",
@@ -560,7 +560,7 @@
560
560
  },
561
561
  {
562
562
  "path": "resources/semantic/align/structure-planning.md",
563
- "digest": "sha256:3d077e85f3f0e44da8f291a18bb4fe1e6e40b2885c7f0160a638ce60b72d174e"
563
+ "digest": "sha256:08f4dab4f53583415155a869be821b4ce2f275bc197be8976a38d3b30a66aa39"
564
564
  },
565
565
  {
566
566
  "path": "resources/semantic/compile/index.md",
@@ -606,5 +606,5 @@
606
606
  "graphDependencies": {
607
607
  "workspace": []
608
608
  },
609
- "digest": "sha256:e130fa822a5329aa5bee9ebdf9c66942e541b0defc58070f5a43264fba083c08"
609
+ "digest": "sha256:04d64bac7e963b9074ab27a621487b0980e09bf4be0c383fc6a3f240e5ee16d5"
610
610
  }
@@ -1,6 +1,6 @@
1
1
  schema: agent-graph.provider.v1
2
2
  id: c4a/context
3
- version: 0.6.1-beta.2
3
+ version: 0.6.1-beta.3
4
4
  name: Context workflow
5
5
  description: Internal work contract for Context knowledge workspaces.
6
6
  graphs:
@@ -256,6 +256,17 @@ returned by `workflow.current`. Source boundaries and unread source bodies,
256
256
  external operations, payload validation, deterministic close, and verification
257
257
  errors are never bypassed.
258
258
 
259
+ For consecutive mechanical routes, the Agent may run:
260
+
261
+ ```bash
262
+ context run --managed --until blocked-or-complete --format json
263
+ ```
264
+
265
+ This is a bounded host loop over the same revisioned routes. It stops before
266
+ read-only interpretation, project configuration, unresolved authority,
267
+ diagnostics, or a non-unique command plan; it does not add another workflow
268
+ entry or make semantic decisions.
269
+
259
270
  ### `captureFile`
260
271
 
261
272
  Capture a registered file source into a committed normalized document snapshot.
@@ -360,6 +371,7 @@ context run align:file:<source-name>:architecture --view read-plan --format json
360
371
  context run align:file:<source-name>:architecture --view source-index --compact --format json
361
372
  context run align:file:<source-name>:architecture --view span-detail --span <source-ref> --format json
362
373
  context run align:file:<source-name>:architecture --view span-text --span <source-ref> --format json
374
+ context run align:file:<source-name>:architecture --view existing-knowledge --query <title-or-stable-ref> --format json
363
375
  context run align:file:<source-name>:architecture --view schema --format json
364
376
  context run align:file:<source-name>:architecture --view semantic-rules --format json
365
377
  context run align:file:<source-name>:architecture --validate --input <structure.yaml> --format json
@@ -377,6 +389,14 @@ schema and full reports stay behind explicit Views, while `--verbose` restores
377
389
  the full phase result and repeated contracts. Long diagnostics return a compact
378
390
  first page plus an exact diagnostics continuation command.
379
391
 
392
+ `existing-knowledge` is the authoring-time lookup for approved identities. It
393
+ returns stable NodeRefs, ViewRefs, titles, tags, collections, and section counts
394
+ without exposing workspace storage paths. `--query` performs deterministic
395
+ case-insensitive exact/prefix/substring matching; `--collection`,
396
+ `--node-type`, `--page-size`, and the returned continuation command narrow or
397
+ page the same View. Use it after reading source evidence and before introducing
398
+ a new Node identity. Structure validation remains the final duplicate gate.
399
+
380
400
  Align and compile evidence results include `semantic_rules`. Its `required`
381
401
  array is the rule subset selected for the current judgment, with a selection
382
402
  reason and content digest for each rule. `handle`, `digest`, and
@@ -17,4 +17,3 @@ removed, and index changes.
17
17
  Run only the current route command, then evaluate again. A successful build
18
18
  means the currently declared scope is current; newly captured or newly declared
19
19
  targets can reopen earlier graph nodes.
20
-
@@ -17,4 +17,3 @@ user decision unless the current session explicitly delegates this gate.
17
17
  After the decision, declare the complete align, compile, and review lifecycle
18
18
  for the same canonical source and collection. Re-evaluate instead of assuming
19
19
  the declaration closed every document target.
20
-
@@ -18,4 +18,3 @@ the resulting evidence state must stay explicit.
18
18
 
19
19
  Use the affected `view_ref` values from the current diagnostic resource. Do not
20
20
  target maintenance by guessed paths or node names.
21
-
@@ -22,4 +22,3 @@ conversation. It does not bypass source permission, validation, close, or
22
22
  verify.
23
23
 
24
24
  After apply, re-evaluate. Do not infer that close or package output is current.
25
-
@@ -19,4 +19,3 @@ declaration requested by the route in `src/index.ts`.
19
19
 
20
20
  The Context SDK API reference is a discoverable resource. Do not guess an API
21
21
  shape from older prompts or cached plugin text.
22
-
@@ -17,4 +17,3 @@ then run verification again.
17
17
  Do not delete candidates, approved pages, snapshots, or structure slots to make
18
18
  verification pass. Derived diagnostics should not be handled as independent
19
19
  root failures.
20
-
@@ -34,9 +34,9 @@ Run `context run align:<type>:<source>:<collection> --view read-plan --format js
34
34
  - Schema names and enum values come from
35
35
  `context run align:<type>:<source>:<collection> --view schema --format json`. Use
36
36
  that schema as the authoring contract for `context.structure.v1`.
37
- - Existing approved knowledge and `knowledge/structure.yaml` are the lookup
38
- registry exposed through current CLI/status/query views. Do not read
39
- `knowledge/**` or create a separate registry file.
37
+ - Existing approved knowledge is the lookup registry exposed by the current
38
+ align `existing-knowledge` View. Do not read `knowledge/**`, guess a top-level
39
+ query command, or create a separate registry file.
40
40
  - Code projection Nodes are reusable knowledge handles. When document evidence belongs on a code symbol, reuse the code slug instead of creating a parallel document Node.
41
41
  - Validation diagnostics are the mechanical structure ownership source of
42
42
  truth. Non-content spans such as navigation references, placeholders, front
@@ -55,7 +55,10 @@ Run `context run align:<type>:<source>:<collection> --view read-plan --format js
55
55
  placeholder/relation source is skipped entirely, leave its relation clues in
56
56
  `unresolved[]` only when they still matter; otherwise omit them.
57
57
  - `views[]` and diagnostics distinguish citable evidence from supporting context. Do not promote supporting/context-only material into cited Sections unless a later ownership correction makes it citation-eligible.
58
- - Keep cache-friendly prompt order: fixed protocol/schema first, existing knowledge lookup second, source evidence views third, current semantic payload last. Preserve CLI JSON order and do not add timestamps, random ids, scratch paths, or host paths to generated payloads.
58
+ - Keep cache-friendly prompt order: fixed protocol/schema first, source evidence
59
+ views second, targeted existing-knowledge results third, and the current
60
+ semantic payload last. Preserve CLI JSON order and do not add timestamps,
61
+ random ids, scratch paths, or host paths to generated payloads.
59
62
  - Structure digests and snapshot hashes are stale guards. Follow returned
60
63
  `next_action.command` and do not invent digest values.
61
64
  - Node type, tag, fake-Entity, `domain`, and `action` gates are in `structure-planning/references/gates.md`.
@@ -91,8 +94,9 @@ or `next_command`.
91
94
 
92
95
  `read-plan` is the navigation surface. It chooses whether the next evidence read
93
96
  is `source-index`, `span-detail`, `span-text`, or another current evidence view.
94
- Read those views and then author the requested
95
- `context.structure.v1` payload yourself. Never pipe evidence text into validate.
97
+ Read those views and then author the requested `context.structure.v1` payload
98
+ yourself after completing the targeted lookup in Step 3. Never pipe evidence
99
+ text into validate.
96
100
 
97
101
  If an evidence view is truncated, `page.has_more: true`, or the CLI returns a
98
102
  `next_command`, run that command before authoring.
@@ -107,7 +111,16 @@ is explicitly needed, otherwise return to the CLI-designated navigation view.
107
111
 
108
112
  ### Step 3 — Reuse Existing Knowledge
109
113
 
110
- Query existing knowledge for reusable names before proposing new term/service/system/action Nodes. Exact title/slug/alias hits should usually become references to the existing Node, not duplicate candidates.
114
+ After source evidence identifies a candidate title or stable ref, run:
115
+
116
+ ```bash
117
+ context run align:<type>:<source>:<collection> --view existing-knowledge --query <title-or-stable-ref> --format json
118
+ ```
119
+
120
+ Use the returned pagination command when present. Exact title, NodeRef, ViewRef,
121
+ or tag hits should usually reuse the existing Node instead of creating a
122
+ duplicate candidate. The lookup is deterministic identity discovery; the Agent
123
+ still decides whether the source evidence describes the same concept.
111
124
 
112
125
  When a code projection Node already represents the object, reuse its slug for prose evidence and plan only prose-owned Sections for the current source evidence.
113
126