@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
@@ -1,34 +1,23 @@
1
1
  {
2
2
  "name": "c4a",
3
- "version": "0.6.18",
3
+ "version": "0.7.0",
4
4
  "description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
5
- "author": {
6
- "name": "c4a"
7
- },
5
+ "author": { "name": "c4a" },
8
6
  "homepage": "https://github.com/context4ai/c4a",
9
- "repository": "https://github.com/context4ai/c4a/tree/main/packages/context-cli",
7
+ "repository": "https://github.com/context4ai/c4a",
10
8
  "license": "MIT",
11
- "keywords": [
12
- "context",
13
- "knowledge-base",
14
- "codex-plugin",
15
- "agent-skills",
16
- "c4a"
17
- ],
9
+ "keywords": ["context", "knowledge-base", "codex-plugin", "agent-skills", "c4a"],
18
10
  "skills": "./skills/",
19
11
  "interface": {
20
12
  "displayName": "C4A Context",
21
- "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.18",
13
+ "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.7.0",
22
14
  "longDescription": "Create a Context workspace and use agent-guided next steps to register sources, run extraction, review candidates, build package outputs, and verify health without silently mutating source repositories.",
23
15
  "developerName": "c4a",
24
16
  "category": "Productivity",
25
17
  "brandColor": "#ef6f2e",
26
18
  "composerIcon": "./assets/icon.svg",
27
19
  "logo": "./assets/logo.svg",
28
- "capabilities": [
29
- "Read",
30
- "Write"
31
- ],
20
+ "capabilities": ["Read", "Write"],
32
21
  "websiteURL": "https://github.com/context4ai/c4a",
33
22
  "defaultPrompt": [
34
23
  "Continue my Context workspace with the next useful step.",
@@ -2,4 +2,4 @@
2
2
 
3
3
  This directory is generated by `bun run build:plugin`.
4
4
  Do not edit files here directly.
5
- Edit `packages/context-cli/plugin/` and rerun the build instead.
5
+ Edit `plugins/context/` and rerun the build instead.
@@ -2,4 +2,4 @@
2
2
 
3
3
  This directory is generated by `bun run build:plugin`.
4
4
  Do not edit files here directly.
5
- Edit `packages/context-cli/plugin/` and rerun the build instead.
5
+ Edit `plugins/context/` and rerun the build instead.
@@ -1,22 +1,11 @@
1
1
  ---
2
2
  name: context
3
- description: >
4
- Build or continue structured, traceable Agent knowledge from documents and code. Use the local `context` CLI for workspace writes.
3
+ description: Build or continue structured, traceable Agent knowledge from documents and code. Use the local `context` CLI for workspace writes.
5
4
  tools:
6
5
  - Bash
7
6
  ---
8
7
 
9
- # Context
10
-
11
- Public Context entry for agents that expose skills instead of slash commands.
12
-
13
- - Public entry: `context`
14
- - Host command names are installation-specific; use the command or skill surfaced by the current host instead of deriving a filesystem path from an example name.
15
- - CLI primitive prefix: `context ...`
16
-
17
- ---
18
-
19
- ## Workflow
8
+ ## Your Task
20
9
 
21
10
  Context is a knowledge management tool built for Agent knowledge workflows. It
22
11
  compiles Feishu/Lark documents, local Markdown, repository code, and manually
@@ -38,6 +27,18 @@ Run:
38
27
  context entry [project-dir] --language <language> --format json
39
28
  ```
40
29
 
30
+ If the request does not already choose ordinary review or fully managed
31
+ operation, first use the read-only entry result to state a short execution
32
+ plan, then ask the user to choose once. Explain that ordinary review pauses at
33
+ human Gates and presents HTML reports, while fully managed operation resolves
34
+ delegatable Gates within this conversation but still stops for permissions,
35
+ hard validation, or non-delegatable decisions. Prefer the host's native choice
36
+ UI. When initialization already needs a confirmation or missing option, combine
37
+ the mode choice with that question instead of adding another round. Keep the
38
+ answer only in this conversation and do not ask again after initialization,
39
+ capture, or resume. An explicit request for review, human confirmation, fully
40
+ managed work, or no further review already resolves this choice.
41
+
41
42
  Use the user's explicit language choice when present; otherwise pass `zh-CN`
42
43
  for a Chinese conversation and `en` for an English conversation. Pass
43
44
  `project-dir`, `--name`, `--dev`, or `--debug` only when the user explicitly
@@ -103,12 +104,14 @@ before workflow evaluation. Debugging records traces below
103
104
  source evidence.
104
105
 
105
106
  Document optimization is enabled by default for newly initialized workspaces.
106
- It conservatively repairs formatting, Markdown, links, and obvious local errors
107
- without broadly rewriting source-backed prose. It keeps approved pages
108
- source-faithful and stores only changed full-page revisions beside them as
109
- `knowledge/**/*__revision.md`. Default knowledge discovery excludes those
110
- reserved sidecars; validation and package compilation apply them to the
111
- matching base page.
107
+ It performs source-constrained editorial revision: the CLI identifies
108
+ readability and knowledge-value signals, and the Agent may keep, repair,
109
+ reshape, or safely omit content only inside its existing source Section. It
110
+ must preserve facts, link targets, images, code, numbers, identifiers, and
111
+ source evidence. Approved pages remain source-faithful; only changed full-page
112
+ revisions are stored beside them as `knowledge/**/*__revision.md`. Default
113
+ knowledge discovery excludes those reserved sidecars, and internal editorial
114
+ audit state is not included in package output.
112
115
 
113
116
  For an existing workspace, respect its current `package.json` setting. Run
114
117
  `context optimize-docs enable` or `context optimize-docs disable` only when the
@@ -135,6 +138,89 @@ The managed loop executes only Route-selected work and returns the current
135
138
  host execution, diagnostics, or a non-unique plan needs attention. Resume from
136
139
  that returned Route; never reconstruct a command from an earlier step.
137
140
 
141
+ Code knowledge is published under `codeindex`. Context mechanically audits each
142
+ module's input analysis, stable boundaries, facts, explanation, evidence scope,
143
+ and page shape without producing a total score. In fully managed operation,
144
+ follow returned repair actions automatically; after three failed revisions of
145
+ the same module problem, stop at the one aggregated human-guidance Gate. If a
146
+ legacy workspace returns `route.extract.codeindex-migration-required`, execute
147
+ only its migration command; do not rename `codegraph` paths manually.
148
+
149
+ ### Discover Indexer Providers before selection
150
+
151
+ For `indexer-provider-required`, `indexer-provider-unavailable`,
152
+ `indexer-customization-required`, `indexer-customization-invalid`, or
153
+ `indexer-customization-upstream-changed`, read
154
+ `node_modules/@c4a/context/docs/guides/indexer-provider-and-customization.md`
155
+ before proposing a selection or project change. It defines the registry-only
156
+ default, six-level customization ladder, upgrade conflict handling, debugging
157
+ commands, and the exit condition for each level. Do not replace it with a
158
+ remembered or host-specific workflow.
159
+
160
+ When the current Route starts a new Code or Markdown indexing task, run this
161
+ read-only command once before creating or changing any Provider registry entry:
162
+
163
+ ```bash
164
+ context indexer catalog --format json
165
+ ```
166
+
167
+ Report the returned CLI-bundled entry Skills together with every other Indexer
168
+ Skill already visible through the current host. The conversational report must
169
+ include each Skill name, readable exact version when available, and source type
170
+ (CLI-bundled community, workspace, installed plugin, or authorized marketplace
171
+ result). When the host already exposes an exact Skill root or `SKILL.md` path,
172
+ read only its YAML frontmatter and sibling `context-indexer.yaml` during
173
+ discovery. The manifest version is authoritative;
174
+ `metadata.context-provider-version` is a readable copy that must match it. Do
175
+ not load the Provider body or other guidance until the Route selects it. If the
176
+ host exposes no readable root or exact version, report the version as
177
+ unavailable rather than guessing it.
178
+
179
+ Group observations with the same Skill name and exact version into one
180
+ conversational item and list all observed source types on that item. An
181
+ installed projection of an identical CLI-bundled identity is not a second
182
+ Provider. Keep different versions separate. The route input still preserves
183
+ each distinct source observation as its own `visible_skills` entry because
184
+ `source_type` is singular; never use source count or discovery order as
185
+ selection precedence. Do not search arbitrary directories, infer host cache
186
+ paths, install a plugin, or query a marketplace unless the user separately
187
+ authorizes it. Keep this discovery report only in the conversation: do not
188
+ write it to `src/`, `package.json`, lifecycle state, receipts, audit output, or
189
+ `dist/`. Do not repeat it during an unchanged task resume; repeat it only for a
190
+ new indexing task, a changed host-visible Skill set, or an explicit diagnostic
191
+ request.
192
+
193
+ After the requirements are applied, author one
194
+ `context.indexer.provider-route-input/v1` payload whose `registry` preserves
195
+ the applied `requirements` block exactly and whose `visible_skills` contains
196
+ only the just-reported path-free identities. Route it before any Host resolves
197
+ or reads an external Provider:
198
+
199
+ ```bash
200
+ context indexer route-indexer-provider-selection --input <payload.yaml-or-json> --format json
201
+ ```
202
+
203
+ On `community-fallback-required`, retry with the applicable CLI-bundled profile
204
+ and set `community_fallback_attempted: true`. Read-scope overlap is allowed, but
205
+ an exact primary owner-cell conflict must be resolved explicitly; do not use
206
+ array or discovery order as precedence. If fallback leaves a required owner
207
+ cell uncovered, preserve the returned `capability_gap_proof`. Only the Route's
208
+ following `propose-indexer-customization` Agent Action may turn that exact proof
209
+ into a dependency-free minimal `extend` draft; do not weaken the requirement,
210
+ write source, add dependencies, or claim the draft is applied.
211
+
212
+ Only `selection-validation-required` returns a
213
+ `selection_proposal_input`. Pass that exact object to:
214
+
215
+ ```bash
216
+ context indexer validate-indexer-selection-proposal --input <payload.yaml-or-json> --format json
217
+ ```
218
+
219
+ Use only the returned `next_provider_requests` for resolution. A successful
220
+ static report does not authorize materialization, installation, execution, or
221
+ writing the proposal into `src/indexers.yaml`; continue through the Route's
222
+ resolver, staging, final validation, confirmation, and apply Actions.
223
+
138
224
  ### Follow the current Route
139
225
 
140
226
  Treat `workflow.current` as the current-step authority:
@@ -180,6 +266,14 @@ Explain, ask, confirm, and summarize in the user's current conversation
180
266
  language. Keep commands, flags, paths, ids, status values, JSONL keys,
181
267
  `source_ref` values, and copied CLI tokens unchanged.
182
268
 
269
+ Keep a conversation-local list of HTML review reports that the user actually
270
+ used to make a review decision. Preserve each exact report URL or local path
271
+ and its reviewed scope when the Route provides them. In the final completion
272
+ summary, include one compact `Review reports` section containing those exact
273
+ references. Do not scan workspace internals to reconstruct the list, persist a
274
+ second ledger, invent a public URL, or describe an inaccessible report or a
275
+ fully managed/force approval as user-reviewed.
276
+
183
277
  When the user explicitly asks to publish a completed build, treat publication
184
278
  as a downstream distribution step outside the Context Route. Use only an
185
279
  explicitly installed distribution tool and its documented complete-output
@@ -1,28 +1,15 @@
1
1
  {
2
2
  "name": "c4a",
3
3
  "displayName": "C4A Context",
4
- "version": "0.6.18",
4
+ "version": "0.7.0",
5
5
  "description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
6
- "author": {
7
- "name": "Context4AI",
8
- "email": "support@context4ai.dev"
9
- },
6
+ "author": { "name": "Context4AI", "email": "support@context4ai.dev" },
10
7
  "homepage": "https://github.com/context4ai/c4a",
11
8
  "repository": "https://github.com/context4ai/c4a",
12
9
  "license": "MIT",
13
10
  "logo": "assets/logo.svg",
14
- "keywords": [
15
- "context",
16
- "knowledge",
17
- "citations",
18
- "agent-skills"
19
- ],
11
+ "keywords": ["context", "knowledge", "citations", "agent-skills"],
20
12
  "category": "developer-tools",
21
- "tags": [
22
- "knowledge",
23
- "documentation",
24
- "agent-skills",
25
- "citations"
26
- ],
13
+ "tags": ["knowledge", "documentation", "agent-skills", "citations"],
27
14
  "commands": "./commands/"
28
15
  }
@@ -2,4 +2,4 @@
2
2
 
3
3
  This directory is generated by `bun run build:plugin`.
4
4
  Do not edit files here directly.
5
- Edit `packages/context-cli/plugin/` and rerun the build instead.
5
+ Edit `plugins/context/` and rerun the build instead.
@@ -2,12 +2,13 @@
2
2
 
3
3
  This directory is generated by `bun run build:plugin`.
4
4
  Do not edit files here directly.
5
- Edit `packages/context-cli/plugin/` and rerun the build instead.
5
+ Edit `plugins/context/` and rerun the build instead.
6
6
 
7
7
  Install shape:
8
8
 
9
9
  - Marketplace/GitHub plugin shape: this directory is a plugin root with `.cursor-plugin/plugin.json` and `commands/`.
10
- - User entries are under `commands/`; Cursor command files are prefixed as `c4a-*` to avoid global slash-command collisions.
10
+ - The public entry is under `commands/`; Cursor command files are prefixed as `c4a-*` to avoid global slash-command collisions.
11
+ - Lifecycle Provider skills are installed separately into the shared user skill directory by `context plugin install`.
11
12
  - Local plugin fallback: symlink or copy this directory to `~/.cursor/plugins/local/c4a/` only when Marketplace import is unavailable.
12
13
 
13
14
  Cursor Marketplace installs this plugin root directly.
@@ -1,7 +1,5 @@
1
1
  ---
2
- description: "Build or continue structured, traceable Agent knowledge from documents and code."
3
- argument-hint: "[project-dir or user intent]"
4
- allowed-tools: Bash(context:*), Bash(bun:*), Bash(cd *)
2
+ description: "Build or continue structured, traceable Agent knowledge from documents and code. Use the local `context` CLI for workspace writes."
5
3
  ---
6
4
 
7
5
  Start or continue a C4A Context knowledge workspace.
@@ -30,6 +28,18 @@ Run:
30
28
  context entry [project-dir] --language <language> --format json
31
29
  ```
32
30
 
31
+ If the request does not already choose ordinary review or fully managed
32
+ operation, first use the read-only entry result to state a short execution
33
+ plan, then ask the user to choose once. Explain that ordinary review pauses at
34
+ human Gates and presents HTML reports, while fully managed operation resolves
35
+ delegatable Gates within this conversation but still stops for permissions,
36
+ hard validation, or non-delegatable decisions. Prefer the host's native choice
37
+ UI. When initialization already needs a confirmation or missing option, combine
38
+ the mode choice with that question instead of adding another round. Keep the
39
+ answer only in this conversation and do not ask again after initialization,
40
+ capture, or resume. An explicit request for review, human confirmation, fully
41
+ managed work, or no further review already resolves this choice.
42
+
33
43
  Use the user's explicit language choice when present; otherwise pass `zh-CN`
34
44
  for a Chinese conversation and `en` for an English conversation. Pass
35
45
  `project-dir`, `--name`, `--dev`, or `--debug` only when the user explicitly
@@ -95,12 +105,14 @@ before workflow evaluation. Debugging records traces below
95
105
  source evidence.
96
106
 
97
107
  Document optimization is enabled by default for newly initialized workspaces.
98
- It conservatively repairs formatting, Markdown, links, and obvious local errors
99
- without broadly rewriting source-backed prose. It keeps approved pages
100
- source-faithful and stores only changed full-page revisions beside them as
101
- `knowledge/**/*__revision.md`. Default knowledge discovery excludes those
102
- reserved sidecars; validation and package compilation apply them to the
103
- matching base page.
108
+ It performs source-constrained editorial revision: the CLI identifies
109
+ readability and knowledge-value signals, and the Agent may keep, repair,
110
+ reshape, or safely omit content only inside its existing source Section. It
111
+ must preserve facts, link targets, images, code, numbers, identifiers, and
112
+ source evidence. Approved pages remain source-faithful; only changed full-page
113
+ revisions are stored beside them as `knowledge/**/*__revision.md`. Default
114
+ knowledge discovery excludes those reserved sidecars, and internal editorial
115
+ audit state is not included in package output.
104
116
 
105
117
  For an existing workspace, respect its current `package.json` setting. Run
106
118
  `context optimize-docs enable` or `context optimize-docs disable` only when the
@@ -127,6 +139,89 @@ The managed loop executes only Route-selected work and returns the current
127
139
  host execution, diagnostics, or a non-unique plan needs attention. Resume from
128
140
  that returned Route; never reconstruct a command from an earlier step.
129
141
 
142
+ Code knowledge is published under `codeindex`. Context mechanically audits each
143
+ module's input analysis, stable boundaries, facts, explanation, evidence scope,
144
+ and page shape without producing a total score. In fully managed operation,
145
+ follow returned repair actions automatically; after three failed revisions of
146
+ the same module problem, stop at the one aggregated human-guidance Gate. If a
147
+ legacy workspace returns `route.extract.codeindex-migration-required`, execute
148
+ only its migration command; do not rename `codegraph` paths manually.
149
+
150
+ ### Discover Indexer Providers before selection
151
+
152
+ For `indexer-provider-required`, `indexer-provider-unavailable`,
153
+ `indexer-customization-required`, `indexer-customization-invalid`, or
154
+ `indexer-customization-upstream-changed`, read
155
+ `node_modules/@c4a/context/docs/guides/indexer-provider-and-customization.md`
156
+ before proposing a selection or project change. It defines the registry-only
157
+ default, six-level customization ladder, upgrade conflict handling, debugging
158
+ commands, and the exit condition for each level. Do not replace it with a
159
+ remembered or host-specific workflow.
160
+
161
+ When the current Route starts a new Code or Markdown indexing task, run this
162
+ read-only command once before creating or changing any Provider registry entry:
163
+
164
+ ```bash
165
+ context indexer catalog --format json
166
+ ```
167
+
168
+ Report the returned CLI-bundled entry Skills together with every other Indexer
169
+ Skill already visible through the current host. The conversational report must
170
+ include each Skill name, readable exact version when available, and source type
171
+ (CLI-bundled community, workspace, installed plugin, or authorized marketplace
172
+ result). When the host already exposes an exact Skill root or `SKILL.md` path,
173
+ read only its YAML frontmatter and sibling `context-indexer.yaml` during
174
+ discovery. The manifest version is authoritative;
175
+ `metadata.context-provider-version` is a readable copy that must match it. Do
176
+ not load the Provider body or other guidance until the Route selects it. If the
177
+ host exposes no readable root or exact version, report the version as
178
+ unavailable rather than guessing it.
179
+
180
+ Group observations with the same Skill name and exact version into one
181
+ conversational item and list all observed source types on that item. An
182
+ installed projection of an identical CLI-bundled identity is not a second
183
+ Provider. Keep different versions separate. The route input still preserves
184
+ each distinct source observation as its own `visible_skills` entry because
185
+ `source_type` is singular; never use source count or discovery order as
186
+ selection precedence. Do not search arbitrary directories, infer host cache
187
+ paths, install a plugin, or query a marketplace unless the user separately
188
+ authorizes it. Keep this discovery report only in the conversation: do not
189
+ write it to `src/`, `package.json`, lifecycle state, receipts, audit output, or
190
+ `dist/`. Do not repeat it during an unchanged task resume; repeat it only for a
191
+ new indexing task, a changed host-visible Skill set, or an explicit diagnostic
192
+ request.
193
+
194
+ After the requirements are applied, author one
195
+ `context.indexer.provider-route-input/v1` payload whose `registry` preserves
196
+ the applied `requirements` block exactly and whose `visible_skills` contains
197
+ only the just-reported path-free identities. Route it before any Host resolves
198
+ or reads an external Provider:
199
+
200
+ ```bash
201
+ context indexer route-indexer-provider-selection --input <payload.yaml-or-json> --format json
202
+ ```
203
+
204
+ On `community-fallback-required`, retry with the applicable CLI-bundled profile
205
+ and set `community_fallback_attempted: true`. Read-scope overlap is allowed, but
206
+ an exact primary owner-cell conflict must be resolved explicitly; do not use
207
+ array or discovery order as precedence. If fallback leaves a required owner
208
+ cell uncovered, preserve the returned `capability_gap_proof`. Only the Route's
209
+ following `propose-indexer-customization` Agent Action may turn that exact proof
210
+ into a dependency-free minimal `extend` draft; do not weaken the requirement,
211
+ write source, add dependencies, or claim the draft is applied.
212
+
213
+ Only `selection-validation-required` returns a
214
+ `selection_proposal_input`. Pass that exact object to:
215
+
216
+ ```bash
217
+ context indexer validate-indexer-selection-proposal --input <payload.yaml-or-json> --format json
218
+ ```
219
+
220
+ Use only the returned `next_provider_requests` for resolution. A successful
221
+ static report does not authorize materialization, installation, execution, or
222
+ writing the proposal into `src/indexers.yaml`; continue through the Route's
223
+ resolver, staging, final validation, confirmation, and apply Actions.
224
+
130
225
  ### Follow the current Route
131
226
 
132
227
  Treat `workflow.current` as the current-step authority:
@@ -172,6 +267,14 @@ Explain, ask, confirm, and summarize in the user's current conversation
172
267
  language. Keep commands, flags, paths, ids, status values, JSONL keys,
173
268
  `source_ref` values, and copied CLI tokens unchanged.
174
269
 
270
+ Keep a conversation-local list of HTML review reports that the user actually
271
+ used to make a review decision. Preserve each exact report URL or local path
272
+ and its reviewed scope when the Route provides them. In the final completion
273
+ summary, include one compact `Review reports` section containing those exact
274
+ references. Do not scan workspace internals to reconstruct the list, persist a
275
+ second ledger, invent a public URL, or describe an inaccessible report or a
276
+ fully managed/force approval as user-reviewed.
277
+
175
278
  When the user explicitly asks to publish a completed build, treat publication
176
279
  as a downstream distribution step outside the Context Route. Use only an
177
280
  explicitly installed distribution tool and its documented complete-output
@@ -1,22 +1,11 @@
1
1
  ---
2
- name: c4a-context
3
- description: >
4
- Build or continue structured, traceable Agent knowledge from documents and code. Use the local `context` CLI for workspace writes.
2
+ name: context
3
+ description: Build or continue structured, traceable Agent knowledge from documents and code. Use the local `context` CLI for workspace writes.
5
4
  tools:
6
5
  - Bash
7
6
  ---
8
7
 
9
- # Context
10
-
11
- Public Context entry for agents that expose skills instead of slash commands.
12
-
13
- - Public entry: `c4a-context`
14
- - Host command names are installation-specific; use the command or skill surfaced by the current host instead of deriving a filesystem path from an example name.
15
- - CLI primitive prefix: `context ...`
16
-
17
- ---
18
-
19
- ## Workflow
8
+ ## Your Task
20
9
 
21
10
  Context is a knowledge management tool built for Agent knowledge workflows. It
22
11
  compiles Feishu/Lark documents, local Markdown, repository code, and manually
@@ -38,6 +27,18 @@ Run:
38
27
  context entry [project-dir] --language <language> --format json
39
28
  ```
40
29
 
30
+ If the request does not already choose ordinary review or fully managed
31
+ operation, first use the read-only entry result to state a short execution
32
+ plan, then ask the user to choose once. Explain that ordinary review pauses at
33
+ human Gates and presents HTML reports, while fully managed operation resolves
34
+ delegatable Gates within this conversation but still stops for permissions,
35
+ hard validation, or non-delegatable decisions. Prefer the host's native choice
36
+ UI. When initialization already needs a confirmation or missing option, combine
37
+ the mode choice with that question instead of adding another round. Keep the
38
+ answer only in this conversation and do not ask again after initialization,
39
+ capture, or resume. An explicit request for review, human confirmation, fully
40
+ managed work, or no further review already resolves this choice.
41
+
41
42
  Use the user's explicit language choice when present; otherwise pass `zh-CN`
42
43
  for a Chinese conversation and `en` for an English conversation. Pass
43
44
  `project-dir`, `--name`, `--dev`, or `--debug` only when the user explicitly
@@ -103,12 +104,14 @@ before workflow evaluation. Debugging records traces below
103
104
  source evidence.
104
105
 
105
106
  Document optimization is enabled by default for newly initialized workspaces.
106
- It conservatively repairs formatting, Markdown, links, and obvious local errors
107
- without broadly rewriting source-backed prose. It keeps approved pages
108
- source-faithful and stores only changed full-page revisions beside them as
109
- `knowledge/**/*__revision.md`. Default knowledge discovery excludes those
110
- reserved sidecars; validation and package compilation apply them to the
111
- matching base page.
107
+ It performs source-constrained editorial revision: the CLI identifies
108
+ readability and knowledge-value signals, and the Agent may keep, repair,
109
+ reshape, or safely omit content only inside its existing source Section. It
110
+ must preserve facts, link targets, images, code, numbers, identifiers, and
111
+ source evidence. Approved pages remain source-faithful; only changed full-page
112
+ revisions are stored beside them as `knowledge/**/*__revision.md`. Default
113
+ knowledge discovery excludes those reserved sidecars, and internal editorial
114
+ audit state is not included in package output.
112
115
 
113
116
  For an existing workspace, respect its current `package.json` setting. Run
114
117
  `context optimize-docs enable` or `context optimize-docs disable` only when the
@@ -135,6 +138,89 @@ The managed loop executes only Route-selected work and returns the current
135
138
  host execution, diagnostics, or a non-unique plan needs attention. Resume from
136
139
  that returned Route; never reconstruct a command from an earlier step.
137
140
 
141
+ Code knowledge is published under `codeindex`. Context mechanically audits each
142
+ module's input analysis, stable boundaries, facts, explanation, evidence scope,
143
+ and page shape without producing a total score. In fully managed operation,
144
+ follow returned repair actions automatically; after three failed revisions of
145
+ the same module problem, stop at the one aggregated human-guidance Gate. If a
146
+ legacy workspace returns `route.extract.codeindex-migration-required`, execute
147
+ only its migration command; do not rename `codegraph` paths manually.
148
+
149
+ ### Discover Indexer Providers before selection
150
+
151
+ For `indexer-provider-required`, `indexer-provider-unavailable`,
152
+ `indexer-customization-required`, `indexer-customization-invalid`, or
153
+ `indexer-customization-upstream-changed`, read
154
+ `node_modules/@c4a/context/docs/guides/indexer-provider-and-customization.md`
155
+ before proposing a selection or project change. It defines the registry-only
156
+ default, six-level customization ladder, upgrade conflict handling, debugging
157
+ commands, and the exit condition for each level. Do not replace it with a
158
+ remembered or host-specific workflow.
159
+
160
+ When the current Route starts a new Code or Markdown indexing task, run this
161
+ read-only command once before creating or changing any Provider registry entry:
162
+
163
+ ```bash
164
+ context indexer catalog --format json
165
+ ```
166
+
167
+ Report the returned CLI-bundled entry Skills together with every other Indexer
168
+ Skill already visible through the current host. The conversational report must
169
+ include each Skill name, readable exact version when available, and source type
170
+ (CLI-bundled community, workspace, installed plugin, or authorized marketplace
171
+ result). When the host already exposes an exact Skill root or `SKILL.md` path,
172
+ read only its YAML frontmatter and sibling `context-indexer.yaml` during
173
+ discovery. The manifest version is authoritative;
174
+ `metadata.context-provider-version` is a readable copy that must match it. Do
175
+ not load the Provider body or other guidance until the Route selects it. If the
176
+ host exposes no readable root or exact version, report the version as
177
+ unavailable rather than guessing it.
178
+
179
+ Group observations with the same Skill name and exact version into one
180
+ conversational item and list all observed source types on that item. An
181
+ installed projection of an identical CLI-bundled identity is not a second
182
+ Provider. Keep different versions separate. The route input still preserves
183
+ each distinct source observation as its own `visible_skills` entry because
184
+ `source_type` is singular; never use source count or discovery order as
185
+ selection precedence. Do not search arbitrary directories, infer host cache
186
+ paths, install a plugin, or query a marketplace unless the user separately
187
+ authorizes it. Keep this discovery report only in the conversation: do not
188
+ write it to `src/`, `package.json`, lifecycle state, receipts, audit output, or
189
+ `dist/`. Do not repeat it during an unchanged task resume; repeat it only for a
190
+ new indexing task, a changed host-visible Skill set, or an explicit diagnostic
191
+ request.
192
+
193
+ After the requirements are applied, author one
194
+ `context.indexer.provider-route-input/v1` payload whose `registry` preserves
195
+ the applied `requirements` block exactly and whose `visible_skills` contains
196
+ only the just-reported path-free identities. Route it before any Host resolves
197
+ or reads an external Provider:
198
+
199
+ ```bash
200
+ context indexer route-indexer-provider-selection --input <payload.yaml-or-json> --format json
201
+ ```
202
+
203
+ On `community-fallback-required`, retry with the applicable CLI-bundled profile
204
+ and set `community_fallback_attempted: true`. Read-scope overlap is allowed, but
205
+ an exact primary owner-cell conflict must be resolved explicitly; do not use
206
+ array or discovery order as precedence. If fallback leaves a required owner
207
+ cell uncovered, preserve the returned `capability_gap_proof`. Only the Route's
208
+ following `propose-indexer-customization` Agent Action may turn that exact proof
209
+ into a dependency-free minimal `extend` draft; do not weaken the requirement,
210
+ write source, add dependencies, or claim the draft is applied.
211
+
212
+ Only `selection-validation-required` returns a
213
+ `selection_proposal_input`. Pass that exact object to:
214
+
215
+ ```bash
216
+ context indexer validate-indexer-selection-proposal --input <payload.yaml-or-json> --format json
217
+ ```
218
+
219
+ Use only the returned `next_provider_requests` for resolution. A successful
220
+ static report does not authorize materialization, installation, execution, or
221
+ writing the proposal into `src/indexers.yaml`; continue through the Route's
222
+ resolver, staging, final validation, confirmation, and apply Actions.
223
+
138
224
  ### Follow the current Route
139
225
 
140
226
  Treat `workflow.current` as the current-step authority:
@@ -180,6 +266,14 @@ Explain, ask, confirm, and summarize in the user's current conversation
180
266
  language. Keep commands, flags, paths, ids, status values, JSONL keys,
181
267
  `source_ref` values, and copied CLI tokens unchanged.
182
268
 
269
+ Keep a conversation-local list of HTML review reports that the user actually
270
+ used to make a review decision. Preserve each exact report URL or local path
271
+ and its reviewed scope when the Route provides them. In the final completion
272
+ summary, include one compact `Review reports` section containing those exact
273
+ references. Do not scan workspace internals to reconstruct the list, persist a
274
+ second ledger, invent a public URL, or describe an inaccessible report or a
275
+ fully managed/force approval as user-reviewed.
276
+
183
277
  When the user explicitly asks to publish a completed build, treat publication
184
278
  as a downstream distribution step outside the Context Route. Use only an
185
279
  explicitly installed distribution tool and its documented complete-output
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: context-code-indexer
3
+ description: Context-managed Provider for evidence-bound code knowledge. Use only when the Context Indexer lifecycle selects this Provider, not as a standalone workflow.
4
+ metadata:
5
+ context-role: "indexer-provider"
6
+ context-public-entry: "false"
7
+ context-provider-version: "1.0.0"
8
+ ---
9
+
10
+ # Context Code Indexer
11
+
12
+ Provider authors must satisfy
13
+ `node_modules/@c4a/context/docs/guides/code-indexer-skill-authoring.md` and the
14
+ shared Provider/customization guide before publishing or extending this Skill.
15
+ Those documents are authoring contracts; the current workset and Route remain
16
+ execution authority.
17
+
18
+ Use this Provider only through the Context Indexer lifecycle. The workspace registry selects an exact profile, version, integrity, scope, and operation. Do not scan outside the supplied workset or write project files directly.
19
+
20
+ The machine-readable authority is `context-indexer.yaml`. Detailed authoring guidance is materialized by Context from the registered Bundle after its file ledger and integrity have been verified.