@c4a/context-cli 0.7.0 → 0.7.4

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 (219) hide show
  1. package/README.md +18 -39
  2. package/README.zh-CN.md +13 -27
  3. package/cli.js +59230 -80555
  4. package/indexers/bundles/context-code-indexer/SKILL.md +30 -3
  5. package/indexers/bundles/context-code-indexer/context-indexer.yaml +3 -8
  6. package/indexers/bundles/context-code-indexer/references/indexer.md +110 -7
  7. package/indexers/bundles/context-code-indexer/references/metrics.md +143 -37
  8. package/indexers/bundles/context-code-indexer/templates/adapter-integration.md +2 -2
  9. package/indexers/bundles/context-code-indexer/templates/component-library.md +8 -0
  10. package/indexers/bundles/context-code-indexer/templates/gateway-facade.md +16 -0
  11. package/indexers/bundles/context-markdown-indexer/SKILL.md +13 -3
  12. package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +20 -7
  13. package/indexers/bundles/context-markdown-indexer/references/indexer.md +33 -4
  14. package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +30 -14
  15. package/indexers/bundles/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
  16. package/indexers/bundles/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
  17. package/indexers/bundles/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
  18. package/indexers/bundles/context-markdown-indexer/tests/fixtures/routing.json +122 -0
  19. package/indexers/contracts/operator-contract.json +2 -2
  20. package/indexers/contracts/profile-contract.json +3819 -454
  21. package/indexers/release-manifest.json +22 -22
  22. package/package.json +13 -3
  23. package/plugins/VERSION +1 -1
  24. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  25. package/plugins/claude/commands/context.md +44 -85
  26. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  27. package/plugins/codex/skills/context/SKILL.md +44 -85
  28. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  29. package/plugins/cursor/commands/c4a-context.md +44 -85
  30. package/plugins/skills/context/SKILL.md +44 -85
  31. package/plugins/skills/context-code-indexer/SKILL.md +30 -3
  32. package/plugins/skills/context-code-indexer/context-indexer.yaml +3 -8
  33. package/plugins/skills/context-code-indexer/references/indexer.md +110 -7
  34. package/plugins/skills/context-code-indexer/references/metrics.md +143 -37
  35. package/plugins/skills/context-code-indexer/templates/adapter-integration.md +2 -2
  36. package/plugins/skills/context-code-indexer/templates/component-library.md +8 -0
  37. package/plugins/skills/context-code-indexer/templates/gateway-facade.md +16 -0
  38. package/plugins/skills/context-markdown-indexer/SKILL.md +13 -3
  39. package/plugins/skills/context-markdown-indexer/context-indexer.yaml +20 -7
  40. package/plugins/skills/context-markdown-indexer/references/indexer.md +33 -4
  41. package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +30 -14
  42. package/plugins/skills/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
  43. package/plugins/skills/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
  44. package/plugins/skills/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
  45. package/plugins/skills/context-markdown-indexer/tests/fixtures/routing.json +122 -0
  46. package/providers/context/actions/advance-current-indexer-lifecycle.yaml +6 -0
  47. package/providers/context/actions/configure-indexer-providers.yaml +1 -1
  48. package/providers/context/actions/materialize-indexer-workset-view.yaml +7 -0
  49. package/providers/context/actions/run-indexer-lifecycle.yaml +7 -0
  50. package/providers/context/actions/run-indexer-post-author-composer.yaml +1 -1
  51. package/providers/context/codes.yaml +9 -49
  52. package/providers/context/graphs/indexer.yaml +75 -592
  53. package/providers/context/graphs/workspace.yaml +25 -500
  54. package/providers/context/manifest.json +110 -1199
  55. package/providers/context/provider.yaml +2 -2
  56. package/providers/context/resources/diagnostics/projection-stale.md +0 -1
  57. package/providers/context/resources/dialogue/human-gates.md +3 -3
  58. package/providers/context/resources/manuals/reference/package-templates.md +2 -3
  59. package/providers/context/resources/manuals/reference/project-api.md +52 -985
  60. package/providers/context/resources/procedures/close-and-build.md +8 -23
  61. package/providers/context/resources/procedures/knowledge-review.md +13 -4
  62. package/providers/context/resources/procedures/source-capture-detailed.md +6 -8
  63. package/providers/context/resources/views/authorized-indexer-workset-view.yaml +15 -0
  64. package/providers/context/resources/views/package-current.yaml +1 -1
  65. package/providers/context/resources/views/resolved-indexer-instructions.yaml +1 -1
  66. package/providers/context/resources/views/review-current.yaml +1 -1
  67. package/providers/context/resources/views/source-boundary.yaml +1 -1
  68. package/providers/context/resources/views/source-current.yaml +1 -1
  69. package/providers/context/resources/views/verification-current.yaml +1 -1
  70. package/providers/context/resources/views/workspace-current.yaml +1 -1
  71. package/providers/context/schemas/indexer-agent-step-input.schema.json +2 -2
  72. package/providers/context/schemas/indexer-agent-step-result.schema.json +298 -32
  73. package/providers/context/schemas/indexer-authorized-workset-view.schema.json +65 -0
  74. package/providers/context/schemas/indexer-contract-overlay-validation-input.schema.json +0 -42
  75. package/providers/context/schemas/indexer-contract-overlay-validation-result.schema.json +27 -122
  76. package/providers/context/schemas/indexer-lifecycle-continuation.schema.json +15 -0
  77. package/providers/context/schemas/indexer-main-lifecycle-input.schema.json +13 -20
  78. package/providers/context/schemas/indexer-main-lifecycle-output.schema.json +17 -2
  79. package/providers/context/schemas/indexer-materialized-resource.schema.json +8 -1
  80. package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +55 -6
  81. package/providers/context/schemas/indexer-overlay-question-rebind-input.schema.json +4 -4
  82. package/providers/context/schemas/indexer-workset-view-materialization-request.schema.json +32 -0
  83. package/providers/context/skills/configure-indexer-providers/SKILL.md +40 -27
  84. package/providers/context/skills/run-indexer-agent-step/SKILL.md +34 -8
  85. package/providers/context/skills/run-indexer-lifecycle/SKILL.md +37 -0
  86. package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +38 -9
  87. package/docs/document-optimization.md +0 -82
  88. package/docs/document-optimization.zh-CN.md +0 -70
  89. package/indexers/capability-manifest.json +0 -40
  90. package/indexers/contracts/hard-rule-conformance.json +0 -2644
  91. package/providers/context/actions/accept-main-index-run.yaml +0 -7
  92. package/providers/context/actions/accept-material-answer-run.yaml +0 -7
  93. package/providers/context/actions/accept-post-author-composer-run.yaml +0 -7
  94. package/providers/context/actions/actualize-material-answer-bindings.yaml +0 -8
  95. package/providers/context/actions/align-next.yaml +0 -6
  96. package/providers/context/actions/apply-code-index-guidance.yaml +0 -5
  97. package/providers/context/actions/apply-document-optimization-guidance.yaml +0 -5
  98. package/providers/context/actions/apply-structure-confirmation.yaml +0 -5
  99. package/providers/context/actions/audit-material-gap-state.yaml +0 -8
  100. package/providers/context/actions/audit-projected-artifact-fan-out.yaml +0 -8
  101. package/providers/context/actions/authorize-indexer-contract-overlay.yaml +0 -7
  102. package/providers/context/actions/build-main-index-author-worksets.yaml +0 -7
  103. package/providers/context/actions/build-main-index-catalog-fallback.yaml +0 -7
  104. package/providers/context/actions/build-main-index-partition-worksets.yaml +0 -7
  105. package/providers/context/actions/build-material-question-workset.yaml +0 -7
  106. package/providers/context/actions/build-post-author-composer-worksets.yaml +0 -7
  107. package/providers/context/actions/build-question-target-inventory.yaml +0 -7
  108. package/providers/context/actions/build-subject-catalog.yaml +0 -7
  109. package/providers/context/actions/build-target-resolution-views.yaml +0 -7
  110. package/providers/context/actions/checkpoint-material-answer-review.yaml +0 -8
  111. package/providers/context/actions/checkpoint-material-gaps.yaml +0 -8
  112. package/providers/context/actions/close-indexer-approved-knowledge.yaml +0 -8
  113. package/providers/context/actions/compile-next.yaml +0 -5
  114. package/providers/context/actions/compose-indexer-post-author-fragments.yaml +0 -7
  115. package/providers/context/actions/configure-code-extraction.yaml +0 -5
  116. package/providers/context/actions/configure-prose-lifecycle.yaml +0 -5
  117. package/providers/context/actions/converge-main-index-partition-run.yaml +0 -7
  118. package/providers/context/actions/evaluate-material-gaps.yaml +0 -8
  119. package/providers/context/actions/extract-next.yaml +0 -5
  120. package/providers/context/actions/fail-main-index-run.yaml +0 -7
  121. package/providers/context/actions/fail-material-answer-run.yaml +0 -7
  122. package/providers/context/actions/fail-post-author-composer-run.yaml +0 -7
  123. package/providers/context/actions/inspect-code-extraction.yaml +0 -5
  124. package/providers/context/actions/inspect-document-classification.yaml +0 -5
  125. package/providers/context/actions/inspect-index-candidate-review-readiness.yaml +0 -8
  126. package/providers/context/actions/inspect-index-profile-failure.yaml +0 -7
  127. package/providers/context/actions/inspect-material-answer-review.yaml +0 -8
  128. package/providers/context/actions/inspect-structure.yaml +0 -5
  129. package/providers/context/actions/migrate-codeindex.yaml +0 -5
  130. package/providers/context/actions/observe-main-index-run-ledger.yaml +0 -7
  131. package/providers/context/actions/observe-material-answer-runs.yaml +0 -7
  132. package/providers/context/actions/observe-post-author-composer-worksets.yaml +0 -7
  133. package/providers/context/actions/optimize-documents.yaml +0 -6
  134. package/providers/context/actions/override-index-profile-audit.yaml +0 -7
  135. package/providers/context/actions/prepare-main-index-run-ledger.yaml +0 -7
  136. package/providers/context/actions/prepare-material-answer-runs.yaml +0 -7
  137. package/providers/context/actions/preview-extraction-batch.yaml +0 -5
  138. package/providers/context/actions/reconcile-indexer-results.yaml +0 -7
  139. package/providers/context/actions/reconcile-review-identities.yaml +0 -5
  140. package/providers/context/actions/record-index-profile-revision.yaml +0 -7
  141. package/providers/context/actions/report-index-profile-failure.yaml +0 -7
  142. package/providers/context/actions/resolve-effective-composers.yaml +0 -7
  143. package/providers/context/actions/review-material-answer-candidate.yaml +0 -8
  144. package/providers/context/actions/revise-code-index-audit.yaml +0 -5
  145. package/providers/context/actions/revise-document.yaml +0 -5
  146. package/providers/context/actions/revise-index-output.yaml +0 -7
  147. package/providers/context/actions/run-material-answer-indexers.yaml +0 -7
  148. package/providers/context/actions/start-main-index-run.yaml +0 -7
  149. package/providers/context/actions/start-material-answer-run.yaml +0 -7
  150. package/providers/context/actions/start-post-author-composer-run.yaml +0 -7
  151. package/providers/context/actions/submit-code-index-audit.yaml +0 -6
  152. package/providers/context/resources/dialogue/code-extraction.md +0 -87
  153. package/providers/context/resources/dialogue/document-classification.md +0 -33
  154. package/providers/context/resources/dialogue/structure-confirmation.md +0 -44
  155. package/providers/context/resources/dialogue/workflow-mode-after-capture.md +0 -25
  156. package/providers/context/resources/manuals/reference/code-extractors.md +0 -152
  157. package/providers/context/resources/procedures/code-extraction.md +0 -188
  158. package/providers/context/resources/procedures/code-index-audit.md +0 -113
  159. package/providers/context/resources/procedures/document-classification.md +0 -22
  160. package/providers/context/resources/procedures/document-optimization.md +0 -110
  161. package/providers/context/resources/procedures/document-revision.md +0 -36
  162. package/providers/context/resources/procedures/prose-align.md +0 -68
  163. package/providers/context/resources/procedures/prose-compile.md +0 -23
  164. package/providers/context/resources/semantic/align/candidate-resolution.md +0 -106
  165. package/providers/context/resources/semantic/align/density-profile.md +0 -41
  166. package/providers/context/resources/semantic/align/gates.md +0 -276
  167. package/providers/context/resources/semantic/align/structure-planning.md +0 -337
  168. package/providers/context/resources/semantic/code-index/classification.md +0 -270
  169. package/providers/context/resources/semantic/code-index/templates/adapter.md +0 -118
  170. package/providers/context/resources/semantic/code-index/templates/api-service.md +0 -116
  171. package/providers/context/resources/semantic/code-index/templates/background-runtime.md +0 -109
  172. package/providers/context/resources/semantic/code-index/templates/cli-tool.md +0 -129
  173. package/providers/context/resources/semantic/code-index/templates/contract-source.md +0 -73
  174. package/providers/context/resources/semantic/code-index/templates/contracts-and-chains.md +0 -81
  175. package/providers/context/resources/semantic/code-index/templates/cross-module-chain.md +0 -78
  176. package/providers/context/resources/semantic/code-index/templates/derived-source.md +0 -116
  177. package/providers/context/resources/semantic/code-index/templates/domain-service.md +0 -109
  178. package/providers/context/resources/semantic/code-index/templates/event-flow.md +0 -62
  179. package/providers/context/resources/semantic/code-index/templates/monorepo-container.md +0 -124
  180. package/providers/context/resources/semantic/code-index/templates/persistence-boundary.md +0 -56
  181. package/providers/context/resources/semantic/code-index/templates/plugin-extension.md +0 -52
  182. package/providers/context/resources/semantic/code-index/templates/protocol-boundary.md +0 -88
  183. package/providers/context/resources/semantic/code-index/templates/sdk-library.md +0 -132
  184. package/providers/context/resources/semantic/code-index/templates/web-application.md +0 -145
  185. package/providers/context/resources/semantic/compile/index.md +0 -31
  186. package/providers/context/resources/views/code-index-audit.yaml +0 -6
  187. package/providers/context/resources/views/document-optimization-current.yaml +0 -6
  188. package/providers/context/resources/views/extraction-preview.yaml +0 -6
  189. package/providers/context/resources/views/structure-current.yaml +0 -6
  190. package/providers/context/schemas/code-index-audit-decision.schema.json +0 -94
  191. package/providers/context/schemas/document-optimization-decisions.schema.json +0 -57
  192. package/providers/context/schemas/indexer-candidate-review-readiness-input.schema.json +0 -46
  193. package/providers/context/schemas/indexer-candidate-review-readiness-output.schema.json +0 -104
  194. package/providers/context/schemas/indexer-contract-overlay-authorization-input.schema.json +0 -32
  195. package/providers/context/schemas/indexer-contract-overlay-authorization-result.schema.json +0 -121
  196. package/providers/context/schemas/indexer-material-answer-lifecycle-input.schema.json +0 -90
  197. package/providers/context/schemas/indexer-material-answer-lifecycle-output.schema.json +0 -80
  198. package/providers/context/schemas/indexer-material-answer-review-inspection-input.schema.json +0 -32
  199. package/providers/context/schemas/indexer-material-answer-review-inspection-output.schema.json +0 -32
  200. package/providers/context/schemas/indexer-material-answer-review-resolution-input.schema.json +0 -19
  201. package/providers/context/schemas/indexer-material-answer-review-resolution-output.schema.json +0 -87
  202. package/providers/context/schemas/indexer-material-gap-lifecycle-input.schema.json +0 -86
  203. package/providers/context/schemas/indexer-material-gap-lifecycle-output.schema.json +0 -19
  204. package/providers/context/schemas/indexer-post-author-fragment-result.schema.json +0 -18
  205. package/providers/context/schemas/indexer-post-author-lifecycle-input.schema.json +0 -94
  206. package/providers/context/schemas/indexer-post-author-lifecycle-output.schema.json +0 -72
  207. package/providers/context/schemas/indexer-profile-failure-inspection-input.schema.json +0 -13
  208. package/providers/context/schemas/indexer-profile-failure-inspection-result.schema.json +0 -19
  209. package/providers/context/schemas/indexer-profile-failure-report-input.schema.json +0 -22
  210. package/providers/context/schemas/indexer-profile-failure-report-result.schema.json +0 -49
  211. package/providers/context/schemas/indexer-profile-override-decision.schema.json +0 -20
  212. package/providers/context/schemas/indexer-profile-override-result.schema.json +0 -49
  213. package/providers/context/schemas/indexer-profile-revision-agent-input.schema.json +0 -18
  214. package/providers/context/schemas/indexer-profile-revision-record-input.schema.json +0 -31
  215. package/providers/context/schemas/indexer-profile-revision-record-result.schema.json +0 -45
  216. package/providers/context/schemas/indexer-result-reconciliation-input.schema.json +0 -59
  217. package/providers/context/schemas/indexer-result-reconciliation-output.schema.json +0 -43
  218. package/providers/context/schemas/prose-structure-batch.schema.json +0 -35
  219. package/providers/context/skills/revise-index-output/SKILL.md +0 -12
package/README.md CHANGED
@@ -170,19 +170,18 @@ for maintainers, automation, and diagnostics:
170
170
  - `context plugin status` checks installed Agent projections;
171
171
  - `context debug enable` records optional traces below
172
172
  `.tmp/context-runtime/debug/`;
173
- - new workspaces enable source-constrained editorial revisions by default;
174
- `context optimize-docs enable|disable` changes that workspace preference
175
- without modifying approved `knowledge/`;
176
- - `context revise "<title or approved path>"` starts one conversational
177
- correction and routes its validation before the next package build;
178
- - code extraction writes `knowledge/codeindex/**` and independently audits
173
+ - `context revise "<current Candidate title, path, or id>" --instruction
174
+ "<requested correction>"` reopens exactly the owning Author workset before
175
+ approval; it does not create a second revision page or mutate approved
176
+ `knowledge/` directly;
177
+ - code extraction stages reader-facing `codeindex` Candidates and independently audits
179
178
  source analysis, stable-boundary coverage, content density, evidence scope,
180
179
  and page size before Review; legacy `codegraph` workspaces migrate through
181
180
  the returned Route action;
182
181
  - the `context indexer` lifecycle builds contract-derived question targets,
183
182
  digest-bound partition and author worksets, exact SubjectKey resolution
184
183
  views, and independent post-author composer worksets. Main runs use a local
185
- content-addressed ledger whose accepted Result/receipt transition is atomic;
184
+ content-addressed ledger whose accepted Result transition is atomic;
186
185
  ordinal/fixed-count partitions advance through the authorized strategy order,
187
186
  and exhausted strategies use a persisted-predecessor CLI catalog fallback that
188
187
  creates one parent unit without an Agent or user Gate;
@@ -207,37 +206,18 @@ for maintainers, automation, and diagnostics:
207
206
  fail before that Gate. Exact target matches that resolve to multiple Nodes
208
207
  return `index-target-resolution-ambiguous`, and invalid reuse returns
209
208
  `index-target-resolution-invalid`;
210
- - `context indexer build-material-question-workset` derives second-phase answer
211
- eligibility from current registry, Provider, scope, source, and evidence-kind
212
- authority. `prepare|observe|start|accept|fail-material-answer-*` use an
213
- independent durable ledger; complete empty Results are cache hits, while
214
- candidate evidence requires exact current source-span read receipts;
215
- - material-answer candidates use a separate limited Review Route. Its baseline
216
- and decision bind one exact question target and canonical source-span evidence
217
- set. Approval returns an `answer-approved` successor-ledger fact for the later
218
- checkpoint writer; it does not approve an Artifact, reader page, or final
219
- knowledge candidate;
220
- - main Candidate Review has one Graph predecessor:
221
- `inspect-index-candidate-review-readiness`. The CLI accepts only digests of
222
- content-addressed precompile/postcompile audit records and verifies their
223
- requirement, registry, inventory, layout, candidate-set, and effective
224
- revision bindings. Missing, stale, baseline-failed, or profile-blocked audits
225
- cannot resolve the Review Gate. A profile failure enters
226
- `revise-index-output`; `record-index-profile-revision` retains a stable
227
- problem lineage and at most three distinct result fingerprints. After the
228
- third failure, `report-index-profile-failure` persists the full metrics,
229
- examples, history, missing inputs, and capability-loss report.
230
- `inspect-index-profile-failure` is read-only, and the following
231
- `override-index-profile-audit` Gate is non-delegable. Its receipt binds the
232
- report, audit, candidate revision, failed metrics, user, and timestamp.
233
- Baseline failures cannot issue or consume that receipt;
234
- - `checkpoint-material-gaps` is the mandatory retained writer before any
235
- reconciliation stop. Approved answers inline their accepted workset;
236
- `actualize-material-answer-bindings` maps them against one current layout
237
- proposal set and reopens stale sources, while `close-indexer-approved-knowledge`
238
- accepts provenance only from the approved structure it closes atomically.
239
- `audit-material-gap-state` is read-only: it recomputes the expected ledger and
240
- routes pre-Review drift to checkpoint or approved post-Review state to close;
209
+ - unresolved material questions remain in the current reconciliation report.
210
+ Newly captured Markdown or other authorized material reruns the normal main
211
+ Indexer path and updates the same Candidate; there is no second checkpoint,
212
+ answer-only operation, or Review Route;
213
+ - main Candidate Review requires current precompile/postcompile audit records.
214
+ The CLI verifies requirement, registry, inventory, layout and candidate-set
215
+ bindings. A blocking mechanical failure reopens the affected Author or
216
+ Composer workset before recompilation; advisory profile metrics are warnings
217
+ and do not create a retry ledger or override Gate;
218
+ - required material gaps block the ordinary lifecycle until new captured input
219
+ reruns the affected workset. The ordinary `context close` writes approved
220
+ structure and clears completed runtime lifecycle state;
241
221
  - `context clean-cache --dry-run` previews cleanup of Context-owned stale
242
222
  plugin caches.
243
223
 
@@ -245,7 +225,6 @@ Revision-bound commands should be copied from `workflow.current`; examples in
245
225
  documentation are orientation, not a substitute for the current Route. See the
246
226
  [installed quickstart](./docs/quickstart.md) and
247
227
  [debug tracing guide](./docs/debug-tracing.md).
248
- See also [source-constrained editorial revisions](./docs/document-optimization.md).
249
228
 
250
229
  ## Documentation and development
251
230
 
package/README.zh-CN.md CHANGED
@@ -144,11 +144,10 @@ context/
144
144
  - `context <command> --help` 是当前参数的权威来源;
145
145
  - `context plugin status` 检查已安装的 Agent 投影;
146
146
  - `context debug enable` 在 `.tmp/context-runtime/debug/` 记录可选轨迹;
147
- - 新工作区默认开启来源约束的编辑修订;`context optimize-docs enable|disable`
148
- 可调整工作区偏好,同时保持 `knowledge/` 中的正式知识不变;
149
- - `context revise "<标题或正式知识路径>"` 从对话启动一次单页修正,校验后再由
150
- Route 提示重新构建;
151
- - 代码提取写入 `knowledge/codeindex/**`,并在 Review 前分别检查输入分析、稳定边界
147
+ - `context revise "<当前候选标题、路径或 id>" --instruction "<修正要求>"`
148
+ 会在批准前精确重开该候选所属的 Author workset;它不会创建第二套 revision
149
+ 页面,也不会直接改写正式 `knowledge/`;
150
+ - 代码提取先暂存可读的 `codeindex` Candidate,并在 Review 前分别检查输入分析、稳定边界
152
151
  覆盖、正文密度、证据范围和页面规模;旧 `codegraph` 工作区只通过 Route 返回的
153
152
  迁移动作升级;
154
153
  - `context indexer` 生命周期以内容寻址 ledger 恢复 main/post-author 运行,再由 CLI
@@ -165,33 +164,20 @@ context/
165
164
  major 与精确 re-identification 授权,漏映射、split、merge 或 collision 在 Gate 前失败;精确
166
165
  target 命中多个 Node 返回 `index-target-resolution-ambiguous`,非法复用返回
167
166
  `index-target-resolution-invalid`;
168
- - `context indexer build-material-question-workset` current registry、Provider、scope、
169
- source evidence-kind authority 的交集派生二阶段回答资格;
170
- `prepare|observe|start|accept|fail-material-answer-*` 使用独立 durable ledger,完整空 Result
171
- 也作为 cache hit,candidate evidence 则必须携带精确的 current source-span 读取回执;
172
- - material-answer candidate 使用独立的受限 Review Route,只批准一个精确问题目标与
173
- canonical source-span evidence binding。批准结果只是供后续 checkpoint 写入的
174
- `answer-approved` successor-ledger fact,不批准 Artifact、读者页面或主知识候选;
175
- - Candidate Review 只有 `inspect-index-candidate-review-readiness` 一个 Graph 前驱。CLI
176
- 只接受内容寻址 precompile/postcompile audit record digest,并复核 requirement、registry、
177
- inventory、layout、candidate set 与 effective revision 绑定;record 缺失、stale、基础失败或
178
- profile 未通过时都不能解析 Review Gate。profile 失败进入 `revise-index-output`;
179
- `record-index-profile-revision` 按稳定 problem lineage 最多记录三个不同的 Result fingerprint。
180
- 第三轮后 `report-index-profile-failure` 才持久化包含指标、示例、历史、缺失输入与能力损失的完整
181
- 报告;`inspect-index-profile-failure` 只读展示该报告,随后
182
- `override-index-profile-audit` 使用不可委托 Gate。回执精确绑定报告、审计、候选 revision、失败
183
- 指标、用户和时间;baseline 失败不能生成或消费该回执;
184
- - `checkpoint-material-gaps` 是 reconciliation 任何停止前的 retained writer。批准答案会
185
- 内联 accepted workset;`actualize-material-answer-bindings` 按同一个 current layout proposal
186
- set 映射并在 source stale 时 reopen,`close-indexer-approved-knowledge` 只接受其同时关闭的
187
- approved structure 内部 provenance,并原子收敛 ledger;`audit-material-gap-state` 始终只读,
188
- 内存复算 expected ledger,并把主 Review 前的漂移路由到 checkpoint、把已批准的后置状态路由到 close;
167
+ - 未解决的 material question 只保留在 current reconciliation report。新采集的 Markdown
168
+ 或其他授权材料重新运行普通 main Indexer,并更新同一个 Candidate;不存在第二份
169
+ checkpoint、answer-only operation Review Route;
170
+ - Candidate Review 要求 current precompile/postcompile audit record。CLI 会复核
171
+ requirement、registry、inventory、layout candidate set 绑定;阻塞性的机械失败会重开受影响的
172
+ Author Composer workset 后重新编译,建议性的 profile metric 只作为 warning,不建立重试账本或
173
+ override Gate;
174
+ - 必需 material gap 会阻塞普通生命周期,直到新增 capture 重新运行受影响 workset;普通
175
+ `context close` 写入 approved structure 并清理已完成的运行时生命周期状态;
189
176
  - `context clean-cache --dry-run` 预览 Context-owned 过期插件缓存清理。
190
177
 
191
178
  绑定 revision 的命令应从 `workflow.current` 原样复制;文档示例只用于理解入口,
192
179
  不能替代当前 Route。参见[安装后快速说明](./docs/quickstart.zh-CN.md)和
193
180
  [debug tracing](./docs/debug-tracing.md)。
194
- 文档编译优化与对话修订参见[来源约束的编辑修订](./docs/document-optimization.zh-CN.md)。
195
181
 
196
182
  ## 文档与开发
197
183