@c4a/context-cli 0.6.18 → 0.7.0

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 (297) hide show
  1. package/README.md +73 -8
  2. package/README.zh-CN.md +47 -7
  3. package/cli.js +89881 -53821
  4. package/docs/document-optimization.md +35 -11
  5. package/docs/document-optimization.zh-CN.md +29 -9
  6. package/indexers/bundles/context-code-indexer/SKILL.md +20 -0
  7. package/indexers/bundles/context-code-indexer/context-indexer.yaml +230 -0
  8. package/indexers/bundles/context-code-indexer/references/composers/contracts-and-chains.md +23 -0
  9. package/indexers/bundles/context-code-indexer/references/composers/cross-module-chain.md +22 -0
  10. package/indexers/bundles/context-code-indexer/references/composers/development-and-delivery.md +22 -0
  11. package/indexers/bundles/context-code-indexer/references/composers/event-flow.md +21 -0
  12. package/indexers/bundles/context-code-indexer/references/composers/examples-and-documentation.md +22 -0
  13. package/indexers/bundles/context-code-indexer/references/composers/persistence-boundary.md +21 -0
  14. package/indexers/bundles/context-code-indexer/references/composers/protocol-boundary.md +22 -0
  15. package/indexers/bundles/context-code-indexer/references/composers/public-contract.md +23 -0
  16. package/indexers/bundles/context-code-indexer/references/indexer.md +49 -0
  17. package/indexers/bundles/context-code-indexer/references/metrics.md +201 -0
  18. package/indexers/bundles/context-code-indexer/templates/adapter-integration.md +119 -0
  19. package/indexers/bundles/context-code-indexer/templates/api-service.md +118 -0
  20. package/indexers/bundles/context-code-indexer/templates/background-runtime.md +109 -0
  21. package/indexers/bundles/context-code-indexer/templates/cli-tool.md +129 -0
  22. package/indexers/bundles/context-code-indexer/templates/component-library.md +99 -0
  23. package/indexers/bundles/context-code-indexer/templates/contract-source.md +73 -0
  24. package/indexers/bundles/context-code-indexer/templates/data-sync-reconciliation.md +77 -0
  25. package/indexers/bundles/context-code-indexer/templates/derived-generated-source.md +117 -0
  26. package/indexers/bundles/context-code-indexer/templates/domain-service.md +109 -0
  27. package/indexers/bundles/context-code-indexer/templates/event-consumer.md +62 -0
  28. package/indexers/bundles/context-code-indexer/templates/gateway-facade.md +89 -0
  29. package/indexers/bundles/context-code-indexer/templates/monorepo-container.md +124 -0
  30. package/indexers/bundles/context-code-indexer/templates/plugin-extension.md +52 -0
  31. package/indexers/bundles/context-code-indexer/templates/sdk-library.md +132 -0
  32. package/indexers/bundles/context-code-indexer/templates/storage-repository.md +56 -0
  33. package/indexers/bundles/context-code-indexer/templates/web-application.md +146 -0
  34. package/indexers/bundles/context-code-indexer/tests/fixtures/chapters.json +226 -0
  35. package/indexers/bundles/context-code-indexer/tests/fixtures/composers.json +82 -0
  36. package/indexers/bundles/context-code-indexer/tests/fixtures/profiles.json +210 -0
  37. package/indexers/bundles/context-code-indexer/tests/fixtures/scenarios.json +122 -0
  38. package/indexers/bundles/context-markdown-indexer/SKILL.md +20 -0
  39. package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +147 -0
  40. package/indexers/bundles/context-markdown-indexer/references/classification.md +63 -0
  41. package/indexers/bundles/context-markdown-indexer/references/editorial-policy.md +106 -0
  42. package/indexers/bundles/context-markdown-indexer/references/indexer.md +23 -0
  43. package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +146 -0
  44. package/indexers/bundles/context-markdown-indexer/references/structure-and-artifacts.md +109 -0
  45. package/indexers/bundles/context-markdown-indexer/tests/fixtures/anonymous.json +31 -0
  46. package/indexers/bundles/context-markdown-indexer/tests/fixtures/editorial.json +309 -0
  47. package/indexers/bundles/context-markdown-indexer/tests/fixtures/migration-equivalence.json +186 -0
  48. package/indexers/bundles/context-markdown-indexer/tests/fixtures/profiles.json +171 -0
  49. package/indexers/bundles/context-markdown-indexer/tests/fixtures/routing.json +151 -0
  50. package/indexers/capability-manifest.json +40 -0
  51. package/indexers/contracts/hard-rule-conformance.json +2644 -0
  52. package/indexers/contracts/operator-contract.json +35 -0
  53. package/indexers/contracts/profile-contract.json +10162 -0
  54. package/indexers/release-manifest.json +208 -0
  55. package/package.json +5 -4
  56. package/plugins/README.md +17 -109
  57. package/plugins/README_CN.md +11 -89
  58. package/plugins/VERSION +1 -1
  59. package/plugins/claude/.claude-plugin/plugin.json +3 -11
  60. package/plugins/claude/CLAUDE.md +1 -1
  61. package/plugins/claude/README.md +1 -1
  62. package/plugins/claude/commands/context.md +112 -7
  63. package/plugins/codex/.codex-plugin/plugin.json +6 -17
  64. package/plugins/codex/AGENTS.md +1 -1
  65. package/plugins/codex/README.md +1 -1
  66. package/plugins/codex/skills/context/SKILL.md +113 -19
  67. package/plugins/cursor/.cursor-plugin/plugin.json +4 -17
  68. package/plugins/cursor/AGENTS.md +1 -1
  69. package/plugins/cursor/README.md +3 -2
  70. package/plugins/cursor/commands/c4a-context.md +112 -9
  71. package/plugins/skills/{c4a-context → context}/SKILL.md +114 -20
  72. package/plugins/skills/context-code-indexer/SKILL.md +20 -0
  73. package/plugins/skills/context-code-indexer/context-indexer.yaml +230 -0
  74. package/plugins/skills/context-code-indexer/references/composers/contracts-and-chains.md +23 -0
  75. package/plugins/skills/context-code-indexer/references/composers/cross-module-chain.md +22 -0
  76. package/plugins/skills/context-code-indexer/references/composers/development-and-delivery.md +22 -0
  77. package/plugins/skills/context-code-indexer/references/composers/event-flow.md +21 -0
  78. package/plugins/skills/context-code-indexer/references/composers/examples-and-documentation.md +22 -0
  79. package/plugins/skills/context-code-indexer/references/composers/persistence-boundary.md +21 -0
  80. package/plugins/skills/context-code-indexer/references/composers/protocol-boundary.md +22 -0
  81. package/plugins/skills/context-code-indexer/references/composers/public-contract.md +23 -0
  82. package/plugins/skills/context-code-indexer/references/indexer.md +49 -0
  83. package/plugins/skills/context-code-indexer/references/metrics.md +201 -0
  84. package/plugins/skills/context-code-indexer/templates/adapter-integration.md +119 -0
  85. package/plugins/skills/context-code-indexer/templates/api-service.md +118 -0
  86. package/plugins/skills/context-code-indexer/templates/background-runtime.md +109 -0
  87. package/plugins/skills/context-code-indexer/templates/cli-tool.md +129 -0
  88. package/plugins/skills/context-code-indexer/templates/component-library.md +99 -0
  89. package/plugins/skills/context-code-indexer/templates/contract-source.md +73 -0
  90. package/plugins/skills/context-code-indexer/templates/data-sync-reconciliation.md +77 -0
  91. package/plugins/skills/context-code-indexer/templates/derived-generated-source.md +117 -0
  92. package/plugins/skills/context-code-indexer/templates/domain-service.md +109 -0
  93. package/plugins/skills/context-code-indexer/templates/event-consumer.md +62 -0
  94. package/plugins/skills/context-code-indexer/templates/gateway-facade.md +89 -0
  95. package/plugins/skills/context-code-indexer/templates/monorepo-container.md +124 -0
  96. package/plugins/skills/context-code-indexer/templates/plugin-extension.md +52 -0
  97. package/plugins/skills/context-code-indexer/templates/sdk-library.md +132 -0
  98. package/plugins/skills/context-code-indexer/templates/storage-repository.md +56 -0
  99. package/plugins/skills/context-code-indexer/templates/web-application.md +146 -0
  100. package/plugins/skills/context-code-indexer/tests/fixtures/chapters.json +226 -0
  101. package/plugins/skills/context-code-indexer/tests/fixtures/composers.json +82 -0
  102. package/plugins/skills/context-code-indexer/tests/fixtures/profiles.json +210 -0
  103. package/plugins/skills/context-code-indexer/tests/fixtures/scenarios.json +122 -0
  104. package/plugins/skills/context-markdown-indexer/SKILL.md +20 -0
  105. package/plugins/skills/context-markdown-indexer/context-indexer.yaml +147 -0
  106. package/plugins/skills/context-markdown-indexer/references/classification.md +63 -0
  107. package/plugins/skills/context-markdown-indexer/references/editorial-policy.md +106 -0
  108. package/plugins/skills/context-markdown-indexer/references/indexer.md +23 -0
  109. package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +146 -0
  110. package/plugins/skills/context-markdown-indexer/references/structure-and-artifacts.md +109 -0
  111. package/plugins/skills/context-markdown-indexer/tests/fixtures/anonymous.json +31 -0
  112. package/plugins/skills/context-markdown-indexer/tests/fixtures/editorial.json +309 -0
  113. package/plugins/skills/context-markdown-indexer/tests/fixtures/migration-equivalence.json +186 -0
  114. package/plugins/skills/context-markdown-indexer/tests/fixtures/profiles.json +171 -0
  115. package/plugins/skills/context-markdown-indexer/tests/fixtures/routing.json +151 -0
  116. package/providers/context/actions/accept-main-index-run.yaml +7 -0
  117. package/providers/context/actions/accept-material-answer-run.yaml +7 -0
  118. package/providers/context/actions/accept-post-author-composer-run.yaml +7 -0
  119. package/providers/context/actions/actualize-material-answer-bindings.yaml +8 -0
  120. package/providers/context/actions/apply-code-index-guidance.yaml +5 -0
  121. package/providers/context/actions/apply-document-optimization-guidance.yaml +5 -0
  122. package/providers/context/actions/apply-indexer-project.yaml +7 -0
  123. package/providers/context/actions/audit-material-gap-state.yaml +8 -0
  124. package/providers/context/actions/audit-projected-artifact-fan-out.yaml +8 -0
  125. package/providers/context/actions/authorize-indexer-contract-overlay.yaml +7 -0
  126. package/providers/context/actions/authorize-indexer-dependencies.yaml +7 -0
  127. package/providers/context/actions/authorize-indexer-program-execution.yaml +7 -0
  128. package/providers/context/actions/build-main-index-author-worksets.yaml +7 -0
  129. package/providers/context/actions/build-main-index-catalog-fallback.yaml +7 -0
  130. package/providers/context/actions/build-main-index-partition-worksets.yaml +7 -0
  131. package/providers/context/actions/build-material-question-workset.yaml +7 -0
  132. package/providers/context/actions/build-post-author-composer-worksets.yaml +7 -0
  133. package/providers/context/actions/build-question-target-inventory.yaml +7 -0
  134. package/providers/context/actions/build-subject-catalog.yaml +7 -0
  135. package/providers/context/actions/build-target-resolution-views.yaml +7 -0
  136. package/providers/context/actions/checkpoint-material-answer-review.yaml +8 -0
  137. package/providers/context/actions/checkpoint-material-gaps.yaml +8 -0
  138. package/providers/context/actions/close-indexer-approved-knowledge.yaml +8 -0
  139. package/providers/context/actions/compile-indexer-candidates.yaml +8 -0
  140. package/providers/context/actions/compose-indexer-post-author-fragments.yaml +7 -0
  141. package/providers/context/actions/configure-community-indexer-fallback.yaml +6 -0
  142. package/providers/context/actions/configure-indexer-providers.yaml +6 -0
  143. package/providers/context/actions/confirm-index-requirement-workset.yaml +8 -0
  144. package/providers/context/actions/confirm-subject-reidentification.yaml +8 -0
  145. package/providers/context/actions/converge-main-index-partition-run.yaml +7 -0
  146. package/providers/context/actions/discover-markdown-indexer-providers.yaml +6 -0
  147. package/providers/context/actions/evaluate-material-gaps.yaml +8 -0
  148. package/providers/context/actions/fail-main-index-run.yaml +7 -0
  149. package/providers/context/actions/fail-material-answer-run.yaml +7 -0
  150. package/providers/context/actions/fail-post-author-composer-run.yaml +7 -0
  151. package/providers/context/actions/inspect-index-candidate-review-readiness.yaml +8 -0
  152. package/providers/context/actions/inspect-index-profile-failure.yaml +7 -0
  153. package/providers/context/actions/inspect-indexer-dependencies.yaml +7 -0
  154. package/providers/context/actions/inspect-indexer-program-execution.yaml +7 -0
  155. package/providers/context/actions/inspect-indexer-project-proposal.yaml +7 -0
  156. package/providers/context/actions/inspect-markdown-provider-capture.yaml +7 -0
  157. package/providers/context/actions/inspect-material-answer-review.yaml +8 -0
  158. package/providers/context/actions/maintain-evidence.yaml +1 -1
  159. package/providers/context/actions/materialize-indexer-instructions.yaml +7 -0
  160. package/providers/context/actions/migrate-codeindex.yaml +5 -0
  161. package/providers/context/actions/observe-indexer-project.yaml +7 -0
  162. package/providers/context/actions/observe-main-index-run-ledger.yaml +7 -0
  163. package/providers/context/actions/observe-material-answer-runs.yaml +7 -0
  164. package/providers/context/actions/observe-post-author-composer-worksets.yaml +7 -0
  165. package/providers/context/actions/override-index-profile-audit.yaml +7 -0
  166. package/providers/context/actions/prepare-indexer-customization-project.yaml +7 -0
  167. package/providers/context/actions/prepare-main-index-run-ledger.yaml +7 -0
  168. package/providers/context/actions/prepare-material-answer-runs.yaml +7 -0
  169. package/providers/context/actions/propose-indexer-customization.yaml +7 -0
  170. package/providers/context/actions/propose-overlay-question-amendment.yaml +7 -0
  171. package/providers/context/actions/rebind-indexer-selection-to-requirement.yaml +7 -0
  172. package/providers/context/actions/reconcile-indexer-results.yaml +7 -0
  173. package/providers/context/actions/record-index-profile-revision.yaml +7 -0
  174. package/providers/context/actions/register-source-batch.yaml +1 -1
  175. package/providers/context/actions/report-index-profile-failure.yaml +7 -0
  176. package/providers/context/actions/report-indexer-incremental-impact.yaml +8 -0
  177. package/providers/context/actions/resolve-effective-composers.yaml +7 -0
  178. package/providers/context/actions/restore-repository-sources.yaml +1 -1
  179. package/providers/context/actions/review-material-answer-candidate.yaml +8 -0
  180. package/providers/context/actions/revise-index-output.yaml +7 -0
  181. package/providers/context/actions/route-index-requirement-confirmation.yaml +8 -0
  182. package/providers/context/actions/route-indexer-provider-selection.yaml +7 -0
  183. package/providers/context/actions/run-indexer-agent-step.yaml +7 -0
  184. package/providers/context/actions/run-indexer-post-author-composer.yaml +7 -0
  185. package/providers/context/actions/run-material-answer-indexers.yaml +7 -0
  186. package/providers/context/actions/start-main-index-run.yaml +7 -0
  187. package/providers/context/actions/start-material-answer-run.yaml +7 -0
  188. package/providers/context/actions/start-post-author-composer-run.yaml +7 -0
  189. package/providers/context/actions/validate-indexer-contract-overlays.yaml +7 -0
  190. package/providers/context/actions/validate-indexer-customization.yaml +7 -0
  191. package/providers/context/actions/validate-indexer-selection-proposal.yaml +7 -0
  192. package/providers/context/actions/validate-main-index-run.yaml +7 -0
  193. package/providers/context/actions/validate-markdown-provider-selection.yaml +7 -0
  194. package/providers/context/actions/validate-subject-key-schemas.yaml +8 -0
  195. package/providers/context/codes.yaml +72 -0
  196. package/providers/context/graphs/indexer.yaml +1068 -0
  197. package/providers/context/graphs/workspace.yaml +52 -3
  198. package/providers/context/manifest.json +1487 -157
  199. package/providers/context/provider.yaml +3 -2
  200. package/providers/context/resources/dialogue/code-extraction.md +12 -0
  201. package/providers/context/resources/dialogue/document-classification.md +1 -1
  202. package/providers/context/resources/dialogue/knowledge-review.md +7 -1
  203. package/providers/context/resources/dialogue/source-boundary.md +9 -1
  204. package/providers/context/resources/dialogue/workflow-mode-after-capture.md +11 -8
  205. package/providers/context/resources/dialogue/workflow-mode-after-creation.md +6 -4
  206. package/providers/context/resources/manuals/guides/lark-resources.md +7 -0
  207. package/providers/context/resources/manuals/guides/package-outputs.md +3 -3
  208. package/providers/context/resources/manuals/reference/code-extractors.md +7 -6
  209. package/providers/context/resources/manuals/reference/package-templates.md +18 -10
  210. package/providers/context/resources/manuals/reference/project-api.md +49 -24
  211. package/providers/context/resources/procedures/close-and-build.md +24 -9
  212. package/providers/context/resources/procedures/code-extraction.md +41 -13
  213. package/providers/context/resources/procedures/code-index-audit.md +83 -13
  214. package/providers/context/resources/procedures/document-capture.md +9 -0
  215. package/providers/context/resources/procedures/document-optimization.md +88 -21
  216. package/providers/context/resources/procedures/document-revision.md +11 -6
  217. package/providers/context/resources/procedures/knowledge-review.md +4 -1
  218. package/providers/context/resources/procedures/source-boundary.md +20 -8
  219. package/providers/context/resources/semantic/align/structure-planning.md +4 -4
  220. package/providers/context/resources/semantic/code-index/classification.md +8 -5
  221. package/providers/context/resources/semantic/code-index/templates/adapter.md +9 -0
  222. package/providers/context/resources/semantic/code-index/templates/contracts-and-chains.md +81 -0
  223. package/providers/context/resources/views/resolved-indexer-instructions.yaml +23 -0
  224. package/providers/context/schemas/document-optimization-decisions.schema.json +29 -6
  225. package/providers/context/schemas/indexer-agent-step-input.schema.json +30 -0
  226. package/providers/context/schemas/indexer-agent-step-result.schema.json +47 -0
  227. package/providers/context/schemas/indexer-candidate-compile-input.schema.json +57 -0
  228. package/providers/context/schemas/indexer-candidate-compile-output.schema.json +38 -0
  229. package/providers/context/schemas/indexer-candidate-review-readiness-input.schema.json +46 -0
  230. package/providers/context/schemas/indexer-candidate-review-readiness-output.schema.json +104 -0
  231. package/providers/context/schemas/indexer-contract-overlay-authorization-input.schema.json +32 -0
  232. package/providers/context/schemas/indexer-contract-overlay-authorization-result.schema.json +121 -0
  233. package/providers/context/schemas/indexer-contract-overlay-validation-input.schema.json +90 -0
  234. package/providers/context/schemas/indexer-contract-overlay-validation-result.schema.json +158 -0
  235. package/providers/context/schemas/indexer-customization-project-preparation-result.schema.json +44 -0
  236. package/providers/context/schemas/indexer-customization-proposal-draft.schema.json +83 -0
  237. package/providers/context/schemas/indexer-customization-validation-result.schema.json +36 -0
  238. package/providers/context/schemas/indexer-dependency-authorization-input.schema.json +71 -0
  239. package/providers/context/schemas/indexer-dependency-authorization-result.schema.json +138 -0
  240. package/providers/context/schemas/indexer-incremental-impact-input.schema.json +31 -0
  241. package/providers/context/schemas/indexer-incremental-impact-output.schema.json +52 -0
  242. package/providers/context/schemas/indexer-main-lifecycle-input.schema.json +187 -0
  243. package/providers/context/schemas/indexer-main-lifecycle-output.schema.json +180 -0
  244. package/providers/context/schemas/indexer-markdown-provider-capture-input.schema.json +17 -0
  245. package/providers/context/schemas/indexer-markdown-provider-capture-output.schema.json +54 -0
  246. package/providers/context/schemas/indexer-markdown-provider-validation-input.schema.json +34 -0
  247. package/providers/context/schemas/indexer-markdown-provider-validation-output.schema.json +75 -0
  248. package/providers/context/schemas/indexer-material-answer-lifecycle-input.schema.json +90 -0
  249. package/providers/context/schemas/indexer-material-answer-lifecycle-output.schema.json +80 -0
  250. package/providers/context/schemas/indexer-material-answer-review-inspection-input.schema.json +32 -0
  251. package/providers/context/schemas/indexer-material-answer-review-inspection-output.schema.json +32 -0
  252. package/providers/context/schemas/indexer-material-answer-review-resolution-input.schema.json +19 -0
  253. package/providers/context/schemas/indexer-material-answer-review-resolution-output.schema.json +87 -0
  254. package/providers/context/schemas/indexer-material-gap-lifecycle-input.schema.json +86 -0
  255. package/providers/context/schemas/indexer-material-gap-lifecycle-output.schema.json +19 -0
  256. package/providers/context/schemas/indexer-materialize-request.schema.json +53 -0
  257. package/providers/context/schemas/indexer-materialized-resource.schema.json +57 -0
  258. package/providers/context/schemas/indexer-overlay-question-amendment.schema.json +13 -0
  259. package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +40 -0
  260. package/providers/context/schemas/indexer-overlay-question-rebind-input.schema.json +35 -0
  261. package/providers/context/schemas/indexer-overlay-question-rebind-result.schema.json +25 -0
  262. package/providers/context/schemas/indexer-post-author-fragment-request.schema.json +26 -0
  263. package/providers/context/schemas/indexer-post-author-fragment-result.schema.json +18 -0
  264. package/providers/context/schemas/indexer-post-author-lifecycle-input.schema.json +94 -0
  265. package/providers/context/schemas/indexer-post-author-lifecycle-output.schema.json +72 -0
  266. package/providers/context/schemas/indexer-profile-failure-inspection-input.schema.json +13 -0
  267. package/providers/context/schemas/indexer-profile-failure-inspection-result.schema.json +19 -0
  268. package/providers/context/schemas/indexer-profile-failure-report-input.schema.json +22 -0
  269. package/providers/context/schemas/indexer-profile-failure-report-result.schema.json +49 -0
  270. package/providers/context/schemas/indexer-profile-override-decision.schema.json +20 -0
  271. package/providers/context/schemas/indexer-profile-override-result.schema.json +49 -0
  272. package/providers/context/schemas/indexer-profile-revision-agent-input.schema.json +18 -0
  273. package/providers/context/schemas/indexer-profile-revision-record-input.schema.json +31 -0
  274. package/providers/context/schemas/indexer-profile-revision-record-result.schema.json +45 -0
  275. package/providers/context/schemas/indexer-program-execution-authorization-input.schema.json +145 -0
  276. package/providers/context/schemas/indexer-program-execution-authorization-result.schema.json +60 -0
  277. package/providers/context/schemas/indexer-project-action-result.schema.json +19 -0
  278. package/providers/context/schemas/indexer-project-gate-input.schema.json +100 -0
  279. package/providers/context/schemas/indexer-project-observation-input.schema.json +16 -0
  280. package/providers/context/schemas/indexer-project-observation-result.schema.json +42 -0
  281. package/providers/context/schemas/indexer-provider-route-input.schema.json +55 -0
  282. package/providers/context/schemas/indexer-provider-route-report.schema.json +188 -0
  283. package/providers/context/schemas/indexer-requirement-confirmation-input.schema.json +27 -0
  284. package/providers/context/schemas/indexer-requirement-confirmation-output.schema.json +24 -0
  285. package/providers/context/schemas/indexer-result-reconciliation-input.schema.json +59 -0
  286. package/providers/context/schemas/indexer-result-reconciliation-output.schema.json +43 -0
  287. package/providers/context/schemas/indexer-selection-proposal-input.schema.json +12 -0
  288. package/providers/context/schemas/indexer-selection-proposal-validation.schema.json +23 -0
  289. package/providers/context/schemas/indexer-subject-reidentification-input.schema.json +37 -0
  290. package/providers/context/schemas/indexer-subject-reidentification-output.schema.json +31 -0
  291. package/providers/context/schemas/source-batch-input.schema.json +18 -3
  292. package/providers/context/skills/configure-indexer-providers/SKILL.md +58 -0
  293. package/providers/context/skills/prepare-indexer-customization-project/SKILL.md +31 -0
  294. package/providers/context/skills/propose-indexer-customization/SKILL.md +40 -0
  295. package/providers/context/skills/revise-index-output/SKILL.md +12 -0
  296. package/providers/context/skills/run-indexer-agent-step/SKILL.md +20 -0
  297. package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +21 -0
package/README.md CHANGED
@@ -21,9 +21,10 @@ npm install -g @c4a/context-cli@latest
21
21
  context plugin install
22
22
  ```
23
23
 
24
- Restart or refresh the Agent host after installation. The bundled installer
25
- projects the same source entry into supported Claude, Codex, Cursor, and
26
- Skill-compatible layouts.
24
+ Restart or refresh the Agent host after installation. One install creates the
25
+ host-namespaced Context entry and projects `context-code-indexer` and
26
+ `context-markdown-indexer` as unnamespaced lifecycle Provider Skills for
27
+ Claude, Codex, and Cursor.
27
28
 
28
29
  The public community entry is `/c4a:context`. It creates a requested workspace,
29
30
  locates an existing workspace, or resumes the current workflow. Users should
@@ -169,11 +170,74 @@ for maintainers, automation, and diagnostics:
169
170
  - `context plugin status` checks installed Agent projections;
170
171
  - `context debug enable` records optional traces below
171
172
  `.tmp/context-runtime/debug/`;
172
- - new workspaces enable conservative document revisions by default;
173
+ - new workspaces enable source-constrained editorial revisions by default;
173
174
  `context optimize-docs enable|disable` changes that workspace preference
174
175
  without modifying approved `knowledge/`;
175
176
  - `context revise "<title or approved path>"` starts one conversational
176
177
  correction and routes its validation before the next package build;
178
+ - code extraction writes `knowledge/codeindex/**` and independently audits
179
+ source analysis, stable-boundary coverage, content density, evidence scope,
180
+ and page size before Review; legacy `codegraph` workspaces migrate through
181
+ the returned Route action;
182
+ - the `context indexer` lifecycle builds contract-derived question targets,
183
+ digest-bound partition and author worksets, exact SubjectKey resolution
184
+ views, and independent post-author composer worksets. Main runs use a local
185
+ content-addressed ledger whose accepted Result/receipt transition is atomic;
186
+ ordinal/fixed-count partitions advance through the authorized strategy order,
187
+ and exhausted strategies use a persisted-predecessor CLI catalog fallback that
188
+ creates one parent unit without an Agent or user Gate;
189
+ post-author runs use a separate ledger and atomic envelope record. Observe
190
+ commands publish pending/accepted/failed/stale counts and never use numeric
191
+ cursors. Reconciliation then recomputes every required coverage domain from
192
+ current owner cells, accepted author Results, registered materials, and the
193
+ complete CLI-owned question-target set; capability or material gaps cannot be
194
+ reported as complete;
195
+ - the `markdown-provider` Indexer Route starts only from exact current document
196
+ capture. Agent discovery reports visible `context-markdown-indexer*` Skills
197
+ without persisting the discovery list; the CLI recomputes the route and
198
+ static validation, resolves and stages exact CLI-bundled Bundles, and stops
199
+ external resolution or local customization at explicit Host/customization
200
+ Outcomes;
201
+ - `route-index-requirement-confirmation` recomputes the canonical requirement
202
+ comparison before routing. Ordinary confirmation may use its explicit
203
+ authority, while contraction or incomparable obligation replacement always
204
+ enters the human-only Gate. `validate-subject-key-schemas` likewise requires
205
+ an exact Provider-major re-identification authorization for identity-breaking
206
+ changes over approved Nodes; incomplete, split, merged, or colliding mappings
207
+ fail before that Gate. Exact target matches that resolve to multiple Nodes
208
+ return `index-target-resolution-ambiguous`, and invalid reuse returns
209
+ `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;
177
241
  - `context clean-cache --dry-run` previews cleanup of Context-owned stale
178
242
  plugin caches.
179
243
 
@@ -181,11 +245,11 @@ Revision-bound commands should be copied from `workflow.current`; examples in
181
245
  documentation are orientation, not a substitute for the current Route. See the
182
246
  [installed quickstart](./docs/quickstart.md) and
183
247
  [debug tracing guide](./docs/debug-tracing.md).
184
- See also [document revisions](./docs/document-optimization.md).
248
+ See also [source-constrained editorial revisions](./docs/document-optimization.md).
185
249
 
186
250
  ## Documentation and development
187
251
 
188
- - [Plugin contract](./plugin/README.md)
252
+ - [Plugin contract](../../plugins/context/README.md)
189
253
  - [Workflow Provider internals](./context-workflow/README.md)
190
254
  - [SDK documentation index](../context/docs/README.md)
191
255
  - [Knowledge-project walkthrough](../context/docs/getting-started.md)
@@ -203,8 +267,9 @@ bun run --filter @c4a/context-cli lint
203
267
  bun run --filter @c4a/context-cli test
204
268
  ```
205
269
 
206
- Build generates the installable host projections under `dist/plugins`; edit
207
- only `plugin/` and the bundled workflow source, never generated output.
270
+ Build generates installable host projections under `dist/plugins` and the
271
+ direct-Git projection under `../../plugins/context/repo-install`; edit only
272
+ `../../plugins/context/` and the bundled workflow source, never generated output.
208
273
 
209
274
  ## License
210
275
 
package/README.zh-CN.md CHANGED
@@ -17,8 +17,9 @@ npm install -g @c4a/context-cli@latest
17
17
  context plugin install
18
18
  ```
19
19
 
20
- 安装后重启或刷新 Agent 宿主。同一份入口源会被安装器投影到支持的 Claude、Codex、
21
- Cursor 和 Skill-compatible 目录。
20
+ 安装后重启或刷新 Agent 宿主。一次安装会生成一个带宿主命名空间的 Context 主入口,
21
+ 并把 `context-code-indexer`、`context-markdown-indexer` 作为无命名空间的生命周期
22
+ Provider Skill 投影到 Claude、Codex 和 Cursor 的用户技能目录。
22
23
 
23
24
  社区版公开入口是 `/c4a:context`。它可以创建用户请求的工作区、定位已有工作区,
24
25
  或从当前状态继续流程。用户应该从知识意图开始,而不是内部命令:
@@ -143,20 +144,58 @@ context/
143
144
  - `context <command> --help` 是当前参数的权威来源;
144
145
  - `context plugin status` 检查已安装的 Agent 投影;
145
146
  - `context debug enable` 在 `.tmp/context-runtime/debug/` 记录可选轨迹;
146
- - 新工作区默认开启保守的文档修订;`context optimize-docs enable|disable`
147
+ - 新工作区默认开启来源约束的编辑修订;`context optimize-docs enable|disable`
147
148
  可调整工作区偏好,同时保持 `knowledge/` 中的正式知识不变;
148
149
  - `context revise "<标题或正式知识路径>"` 从对话启动一次单页修正,校验后再由
149
150
  Route 提示重新构建;
151
+ - 代码提取写入 `knowledge/codeindex/**`,并在 Review 前分别检查输入分析、稳定边界
152
+ 覆盖、正文密度、证据范围和页面规模;旧 `codegraph` 工作区只通过 Route 返回的
153
+ 迁移动作升级;
154
+ - `context indexer` 生命周期以内容寻址 ledger 恢复 main/post-author 运行,再由 CLI
155
+ 根据 current owner、accepted Result 和完整 question-target 集重新计算 coverage;
156
+ capability/material gap 不能被报告为 complete。ordinal/fixed-count partition 按授权顺序自动重试;
157
+ 策略耗尽后只允许带持久化前驱的 CLI catalog fallback 生成唯一父单元,不调用 Agent 或用户 Gate;
158
+ - `markdown-provider` Indexer Route 只能从精确 current 的文档 capture 开始。Agent
159
+ 只报告当前会话可见的 `context-markdown-indexer*` Skill,不持久化 discovery list;
160
+ CLI 重新计算 Route 与静态校验,自动解析并 stage 精确 CLI-bundled Bundle,外部解析
161
+ 或本地定制则分别停在显式 Host/customization Outcome;
162
+ - `route-index-requirement-confirmation` 会重新计算 canonical requirement comparator;普通确认
163
+ 只可使用显式 authority,contraction 或不可比较的义务替换始终进入不可委托人工 Gate。
164
+ `validate-subject-key-schemas` 对已有 approved Node 上的 identity-breaking 变化要求 Provider
165
+ major 与精确 re-identification 授权,漏映射、split、merge 或 collision 在 Gate 前失败;精确
166
+ target 命中多个 Node 返回 `index-target-resolution-ambiguous`,非法复用返回
167
+ `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;
150
189
  - `context clean-cache --dry-run` 预览 Context-owned 过期插件缓存清理。
151
190
 
152
191
  绑定 revision 的命令应从 `workflow.current` 原样复制;文档示例只用于理解入口,
153
192
  不能替代当前 Route。参见[安装后快速说明](./docs/quickstart.zh-CN.md)和
154
193
  [debug tracing](./docs/debug-tracing.md)。
155
- 文档编译优化与对话修订参见[文档修订页](./docs/document-optimization.zh-CN.md)。
194
+ 文档编译优化与对话修订参见[来源约束的编辑修订](./docs/document-optimization.zh-CN.md)。
156
195
 
157
196
  ## 文档与开发
158
197
 
159
- - [插件契约](./plugin/README_CN.md)
198
+ - [插件契约](../../plugins/context/README_CN.md)
160
199
  - [Workflow Provider 内部说明](./context-workflow/README.zh-CN.md)
161
200
  - [SDK 文档索引](../context/docs/README.zh-CN.md)
162
201
  - [知识项目完整示例](../context/docs/getting-started.md)
@@ -173,8 +212,9 @@ bun run --filter @c4a/context-cli lint
173
212
  bun run --filter @c4a/context-cli test
174
213
  ```
175
214
 
176
- 构建会在 `dist/plugins` 生成可安装的宿主投影;只修改 `plugin/` 和 Workflow
177
- Provider 源码,不要直接编辑生成产物。
215
+ 构建会在 `dist/plugins` 生成 npm 宿主投影,并在
216
+ `../../plugins/context/repo-install` 生成 Git 直装投影;只修改
217
+ `../../plugins/context/` 和 Workflow Provider 源码,不要直接编辑生成产物。
178
218
 
179
219
  ## License
180
220