@c4a/context-cli 0.7.9 → 0.7.10-alpha.1

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 (345) hide show
  1. package/cli.js +59387 -99747
  2. package/indexers/bundles/context-code-indexer/SKILL.md +19 -44
  3. package/indexers/bundles/context-code-indexer/context-indexer.yaml +2 -19
  4. package/indexers/bundles/context-code-indexer/references/composers/contracts-and-chains.md +7 -2
  5. package/indexers/bundles/context-code-indexer/references/composers/cross-module-chain.md +7 -2
  6. package/indexers/bundles/context-code-indexer/references/composers/development-and-delivery.md +7 -2
  7. package/indexers/bundles/context-code-indexer/references/composers/event-flow.md +7 -2
  8. package/indexers/bundles/context-code-indexer/references/composers/examples-and-documentation.md +7 -2
  9. package/indexers/bundles/context-code-indexer/references/composers/persistence-boundary.md +7 -2
  10. package/indexers/bundles/context-code-indexer/references/composers/protocol-boundary.md +8 -3
  11. package/indexers/bundles/context-code-indexer/references/composers/public-contract.md +9 -4
  12. package/indexers/bundles/context-code-indexer/references/indexer.md +137 -328
  13. package/indexers/bundles/context-code-indexer/references/metrics.md +1 -1
  14. package/indexers/bundles/context-code-indexer/templates/adapter-integration-maintenance-guide.md +1 -9
  15. package/indexers/bundles/context-code-indexer/templates/adapter-integration-request-adaptation-guide.md +1 -9
  16. package/indexers/bundles/context-code-indexer/templates/adapter-integration-usage-guide.md +1 -9
  17. package/indexers/bundles/context-code-indexer/templates/api-service-maintenance-guide.md +1 -9
  18. package/indexers/bundles/context-code-indexer/templates/api-service-public-api-reference.md +1 -9
  19. package/indexers/bundles/context-code-indexer/templates/background-runtime-maintenance-guide.md +1 -9
  20. package/indexers/bundles/context-code-indexer/templates/background-runtime-task-runtime-guide.md +1 -9
  21. package/indexers/bundles/context-code-indexer/templates/cli-tool-maintenance-guide.md +1 -9
  22. package/indexers/bundles/context-code-indexer/templates/cli-tool-public-api-reference.md +1 -9
  23. package/indexers/bundles/context-code-indexer/templates/cli-tool-usage-guide.md +1 -9
  24. package/indexers/bundles/context-code-indexer/templates/component-library-maintenance-guide.md +1 -9
  25. package/indexers/bundles/context-code-indexer/templates/component-library-public-api-reference.md +1 -9
  26. package/indexers/bundles/context-code-indexer/templates/component-library-usage-guide.md +1 -9
  27. package/indexers/bundles/context-code-indexer/templates/contract-source-public-api-reference.md +1 -9
  28. package/indexers/bundles/context-code-indexer/templates/contract-source-usage-guide.md +1 -9
  29. package/indexers/bundles/context-code-indexer/templates/data-sync-reconciliation-maintenance-guide.md +1 -9
  30. package/indexers/bundles/context-code-indexer/templates/data-sync-reconciliation-task-runtime-guide.md +1 -9
  31. package/indexers/bundles/context-code-indexer/templates/data-sync-reconciliation.md +5 -6
  32. package/indexers/bundles/context-code-indexer/templates/derived-generated-source-public-api-reference.md +1 -9
  33. package/indexers/bundles/context-code-indexer/templates/derived-generated-source-usage-guide.md +1 -9
  34. package/indexers/bundles/context-code-indexer/templates/domain-service-maintenance-guide.md +1 -9
  35. package/indexers/bundles/context-code-indexer/templates/domain-service-public-api-reference.md +1 -9
  36. package/indexers/bundles/context-code-indexer/templates/event-consumer-maintenance-guide.md +1 -9
  37. package/indexers/bundles/context-code-indexer/templates/event-consumer-task-runtime-guide.md +1 -9
  38. package/indexers/bundles/context-code-indexer/templates/gateway-facade-maintenance-guide.md +1 -9
  39. package/indexers/bundles/context-code-indexer/templates/gateway-facade-public-api-reference.md +1 -9
  40. package/indexers/bundles/context-code-indexer/templates/gateway-facade-request-adaptation-guide.md +1 -9
  41. package/indexers/bundles/context-code-indexer/templates/monorepo-container-maintenance-guide.md +1 -9
  42. package/indexers/bundles/context-code-indexer/templates/monorepo-container-usage-guide.md +1 -9
  43. package/indexers/bundles/context-code-indexer/templates/plugin-extension-maintenance-guide.md +1 -9
  44. package/indexers/bundles/context-code-indexer/templates/plugin-extension-public-api-reference.md +1 -9
  45. package/indexers/bundles/context-code-indexer/templates/plugin-extension-usage-guide.md +1 -9
  46. package/indexers/bundles/context-code-indexer/templates/sdk-library-maintenance-guide.md +1 -9
  47. package/indexers/bundles/context-code-indexer/templates/sdk-library-public-api-reference.md +1 -9
  48. package/indexers/bundles/context-code-indexer/templates/sdk-library-usage-guide.md +1 -9
  49. package/indexers/bundles/context-code-indexer/templates/storage-repository-maintenance-guide.md +1 -9
  50. package/indexers/bundles/context-code-indexer/templates/storage-repository-public-api-reference.md +1 -9
  51. package/indexers/bundles/context-code-indexer/templates/web-application-federation-guide.md +1 -9
  52. package/indexers/bundles/context-code-indexer/templates/web-application-maintenance-guide.md +1 -9
  53. package/indexers/bundles/context-code-indexer/templates/web-application-page-task-guide.md +1 -9
  54. package/indexers/bundles/context-code-indexer/tests/fixtures/composers.json +8 -8
  55. package/indexers/bundles/context-code-indexer/tests/fixtures/profiles.json +240 -48
  56. package/indexers/bundles/context-markdown-indexer/SKILL.md +20 -24
  57. package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +2 -2
  58. package/indexers/bundles/context-markdown-indexer/references/classification.md +28 -63
  59. package/indexers/bundles/context-markdown-indexer/references/editorial-policy.md +2 -2
  60. package/indexers/bundles/context-markdown-indexer/references/indexer.md +57 -113
  61. package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +48 -176
  62. package/indexers/bundles/context-markdown-indexer/references/structure-and-artifacts.md +33 -115
  63. package/indexers/bundles/context-markdown-indexer/tests/fixtures/anonymous.json +0 -6
  64. package/indexers/bundles/context-markdown-indexer/tests/fixtures/profiles.json +195 -39
  65. package/indexers/bundles/context-note-indexer/SKILL.md +20 -5
  66. package/indexers/bundles/context-note-indexer/context-indexer.yaml +2 -371
  67. package/indexers/bundles/context-note-indexer/references/classification.md +22 -49
  68. package/indexers/bundles/context-note-indexer/references/customization.md +19 -32
  69. package/indexers/bundles/context-note-indexer/references/extension-placement.md +13 -39
  70. package/indexers/bundles/context-note-indexer/references/indexer.md +6 -2
  71. package/indexers/bundles/context-note-indexer/references/updates-and-composition.md +26 -32
  72. package/indexers/bundles/context-note-indexer/references/writing.md +4 -4
  73. package/indexers/bundles/context-note-indexer/tests/fixtures/profiles.json +0 -54
  74. package/indexers/bundles/context-sessions-indexer/SKILL.md +20 -5
  75. package/indexers/bundles/context-sessions-indexer/context-indexer.yaml +2 -371
  76. package/indexers/bundles/context-sessions-indexer/references/classification.md +22 -50
  77. package/indexers/bundles/context-sessions-indexer/references/customization.md +19 -32
  78. package/indexers/bundles/context-sessions-indexer/references/extension-placement.md +12 -39
  79. package/indexers/bundles/context-sessions-indexer/references/indexer.md +6 -2
  80. package/indexers/bundles/context-sessions-indexer/references/updates-and-composition.md +26 -32
  81. package/indexers/bundles/context-sessions-indexer/references/writing.md +4 -4
  82. package/indexers/bundles/context-sessions-indexer/tests/fixtures/profiles.json +0 -54
  83. package/indexers/contracts/operator-contract.json +2 -4
  84. package/indexers/contracts/profile-contract.json +246 -940
  85. package/indexers/release-manifest.json +94 -98
  86. package/package.json +12 -12
  87. package/parserEntryWorker.js +2759 -16446
  88. package/plugins/VERSION +1 -1
  89. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  90. package/plugins/claude/commands/context.md +6 -7
  91. package/plugins/claude/skills/context-indexer-create/SKILL.md +31 -70
  92. package/plugins/claude/skills/context-indexer-create/references/guides/indexer-skill-creation.md +107 -97
  93. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  94. package/plugins/codex/skills/context/SKILL.md +6 -7
  95. package/plugins/codex/skills/context-indexer-create/SKILL.md +31 -70
  96. package/plugins/codex/skills/context-indexer-create/references/guides/indexer-skill-creation.md +107 -97
  97. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  98. package/plugins/cursor/commands/c4a-context.md +6 -7
  99. package/plugins/cursor/skills/context-indexer-create/SKILL.md +31 -70
  100. package/plugins/cursor/skills/context-indexer-create/references/guides/indexer-skill-creation.md +107 -97
  101. package/plugins/skills/context/SKILL.md +6 -7
  102. package/plugins/skills/context-code-indexer/SKILL.md +19 -44
  103. package/plugins/skills/context-code-indexer/context-indexer.yaml +2 -19
  104. package/plugins/skills/context-code-indexer/references/composers/contracts-and-chains.md +7 -2
  105. package/plugins/skills/context-code-indexer/references/composers/cross-module-chain.md +7 -2
  106. package/plugins/skills/context-code-indexer/references/composers/development-and-delivery.md +7 -2
  107. package/plugins/skills/context-code-indexer/references/composers/event-flow.md +7 -2
  108. package/plugins/skills/context-code-indexer/references/composers/examples-and-documentation.md +7 -2
  109. package/plugins/skills/context-code-indexer/references/composers/persistence-boundary.md +7 -2
  110. package/plugins/skills/context-code-indexer/references/composers/protocol-boundary.md +8 -3
  111. package/plugins/skills/context-code-indexer/references/composers/public-contract.md +9 -4
  112. package/plugins/skills/context-code-indexer/references/indexer.md +137 -328
  113. package/plugins/skills/context-code-indexer/references/metrics.md +1 -1
  114. package/plugins/skills/context-code-indexer/templates/adapter-integration-maintenance-guide.md +1 -9
  115. package/plugins/skills/context-code-indexer/templates/adapter-integration-request-adaptation-guide.md +1 -9
  116. package/plugins/skills/context-code-indexer/templates/adapter-integration-usage-guide.md +1 -9
  117. package/plugins/skills/context-code-indexer/templates/api-service-maintenance-guide.md +1 -9
  118. package/plugins/skills/context-code-indexer/templates/api-service-public-api-reference.md +1 -9
  119. package/plugins/skills/context-code-indexer/templates/background-runtime-maintenance-guide.md +1 -9
  120. package/plugins/skills/context-code-indexer/templates/background-runtime-task-runtime-guide.md +1 -9
  121. package/plugins/skills/context-code-indexer/templates/cli-tool-maintenance-guide.md +1 -9
  122. package/plugins/skills/context-code-indexer/templates/cli-tool-public-api-reference.md +1 -9
  123. package/plugins/skills/context-code-indexer/templates/cli-tool-usage-guide.md +1 -9
  124. package/plugins/skills/context-code-indexer/templates/component-library-maintenance-guide.md +1 -9
  125. package/plugins/skills/context-code-indexer/templates/component-library-public-api-reference.md +1 -9
  126. package/plugins/skills/context-code-indexer/templates/component-library-usage-guide.md +1 -9
  127. package/plugins/skills/context-code-indexer/templates/contract-source-public-api-reference.md +1 -9
  128. package/plugins/skills/context-code-indexer/templates/contract-source-usage-guide.md +1 -9
  129. package/plugins/skills/context-code-indexer/templates/data-sync-reconciliation-maintenance-guide.md +1 -9
  130. package/plugins/skills/context-code-indexer/templates/data-sync-reconciliation-task-runtime-guide.md +1 -9
  131. package/plugins/skills/context-code-indexer/templates/data-sync-reconciliation.md +5 -6
  132. package/plugins/skills/context-code-indexer/templates/derived-generated-source-public-api-reference.md +1 -9
  133. package/plugins/skills/context-code-indexer/templates/derived-generated-source-usage-guide.md +1 -9
  134. package/plugins/skills/context-code-indexer/templates/domain-service-maintenance-guide.md +1 -9
  135. package/plugins/skills/context-code-indexer/templates/domain-service-public-api-reference.md +1 -9
  136. package/plugins/skills/context-code-indexer/templates/event-consumer-maintenance-guide.md +1 -9
  137. package/plugins/skills/context-code-indexer/templates/event-consumer-task-runtime-guide.md +1 -9
  138. package/plugins/skills/context-code-indexer/templates/gateway-facade-maintenance-guide.md +1 -9
  139. package/plugins/skills/context-code-indexer/templates/gateway-facade-public-api-reference.md +1 -9
  140. package/plugins/skills/context-code-indexer/templates/gateway-facade-request-adaptation-guide.md +1 -9
  141. package/plugins/skills/context-code-indexer/templates/monorepo-container-maintenance-guide.md +1 -9
  142. package/plugins/skills/context-code-indexer/templates/monorepo-container-usage-guide.md +1 -9
  143. package/plugins/skills/context-code-indexer/templates/plugin-extension-maintenance-guide.md +1 -9
  144. package/plugins/skills/context-code-indexer/templates/plugin-extension-public-api-reference.md +1 -9
  145. package/plugins/skills/context-code-indexer/templates/plugin-extension-usage-guide.md +1 -9
  146. package/plugins/skills/context-code-indexer/templates/sdk-library-maintenance-guide.md +1 -9
  147. package/plugins/skills/context-code-indexer/templates/sdk-library-public-api-reference.md +1 -9
  148. package/plugins/skills/context-code-indexer/templates/sdk-library-usage-guide.md +1 -9
  149. package/plugins/skills/context-code-indexer/templates/storage-repository-maintenance-guide.md +1 -9
  150. package/plugins/skills/context-code-indexer/templates/storage-repository-public-api-reference.md +1 -9
  151. package/plugins/skills/context-code-indexer/templates/web-application-federation-guide.md +1 -9
  152. package/plugins/skills/context-code-indexer/templates/web-application-maintenance-guide.md +1 -9
  153. package/plugins/skills/context-code-indexer/templates/web-application-page-task-guide.md +1 -9
  154. package/plugins/skills/context-code-indexer/tests/fixtures/composers.json +8 -8
  155. package/plugins/skills/context-code-indexer/tests/fixtures/profiles.json +240 -48
  156. package/plugins/skills/context-indexer-create/SKILL.md +31 -70
  157. package/plugins/skills/context-indexer-create/references/guides/indexer-skill-creation.md +107 -97
  158. package/plugins/skills/context-markdown-indexer/SKILL.md +20 -24
  159. package/plugins/skills/context-markdown-indexer/context-indexer.yaml +2 -2
  160. package/plugins/skills/context-markdown-indexer/references/classification.md +28 -63
  161. package/plugins/skills/context-markdown-indexer/references/editorial-policy.md +2 -2
  162. package/plugins/skills/context-markdown-indexer/references/indexer.md +57 -113
  163. package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +48 -176
  164. package/plugins/skills/context-markdown-indexer/references/structure-and-artifacts.md +33 -115
  165. package/plugins/skills/context-markdown-indexer/tests/fixtures/anonymous.json +0 -6
  166. package/plugins/skills/context-markdown-indexer/tests/fixtures/profiles.json +195 -39
  167. package/plugins/skills/context-note-indexer/SKILL.md +20 -5
  168. package/plugins/skills/context-note-indexer/context-indexer.yaml +2 -371
  169. package/plugins/skills/context-note-indexer/references/classification.md +22 -49
  170. package/plugins/skills/context-note-indexer/references/customization.md +19 -32
  171. package/plugins/skills/context-note-indexer/references/extension-placement.md +13 -39
  172. package/plugins/skills/context-note-indexer/references/indexer.md +6 -2
  173. package/plugins/skills/context-note-indexer/references/updates-and-composition.md +26 -32
  174. package/plugins/skills/context-note-indexer/references/writing.md +4 -4
  175. package/plugins/skills/context-note-indexer/tests/fixtures/profiles.json +0 -54
  176. package/plugins/skills/context-sessions-indexer/SKILL.md +20 -5
  177. package/plugins/skills/context-sessions-indexer/context-indexer.yaml +2 -371
  178. package/plugins/skills/context-sessions-indexer/references/classification.md +22 -50
  179. package/plugins/skills/context-sessions-indexer/references/customization.md +19 -32
  180. package/plugins/skills/context-sessions-indexer/references/extension-placement.md +12 -39
  181. package/plugins/skills/context-sessions-indexer/references/indexer.md +6 -2
  182. package/plugins/skills/context-sessions-indexer/references/updates-and-composition.md +26 -32
  183. package/plugins/skills/context-sessions-indexer/references/writing.md +4 -4
  184. package/plugins/skills/context-sessions-indexer/tests/fixtures/profiles.json +0 -54
  185. package/providers/context/actions/approve-production-report.yaml +5 -0
  186. package/providers/context/actions/configure-production-requirements.yaml +5 -0
  187. package/providers/context/actions/prepare-production-stage.yaml +5 -0
  188. package/providers/context/actions/register-source-batch.yaml +1 -1
  189. package/providers/context/actions/run-indexer-lifecycle.yaml +4 -1
  190. package/providers/context/actions/work-production-stage.yaml +5 -0
  191. package/providers/context/codes.yaml +10 -7
  192. package/providers/context/graphs/indexer.yaml +127 -596
  193. package/providers/context/graphs/workspace.yaml +2 -37
  194. package/providers/context/manifest.json +106 -813
  195. package/providers/context/provider.yaml +1 -1
  196. package/providers/context/resources/contracts/indexer-provider-guide.yaml +2 -2
  197. package/providers/context/resources/diagnostics/verification.md +4 -6
  198. package/providers/context/resources/dialogue/source-boundary.md +5 -7
  199. package/providers/context/resources/manuals/guides/code-indexer-skill-authoring.md +84 -0
  200. package/providers/context/resources/manuals/guides/indexer-provider-and-customization.md +117 -0
  201. package/providers/context/resources/manuals/guides/knowledge-updates.md +35 -14
  202. package/providers/context/resources/manuals/guides/markdown-indexer-skill-authoring.md +65 -0
  203. package/providers/context/resources/manuals/reference/package-templates.md +39 -65
  204. package/providers/context/resources/manuals/reference/template-variables.md +2 -3
  205. package/providers/context/resources/procedures/approved-revision.md +28 -35
  206. package/providers/context/resources/procedures/knowledge-review.md +1 -1
  207. package/providers/context/resources/procedures/knowledge-updates.md +35 -14
  208. package/providers/context/resources/procedures/parallel-agent-batch.md +33 -134
  209. package/providers/context/resources/procedures/production-requirements.md +61 -0
  210. package/providers/context/resources/procedures/production-stage-files.md +57 -0
  211. package/providers/context/resources/procedures/source-boundary.md +8 -10
  212. package/providers/context/resources/procedures/task-recovery.md +15 -20
  213. package/providers/context/resources/procedures/work-start-report.md +91 -413
  214. package/providers/context/resources/templates/indexer-agent-worker.md +20 -61
  215. package/providers/context/resources/templates/work-start-report.md +43 -279
  216. package/providers/context/schemas/approved-revision-result.schema.json +61 -2
  217. package/providers/context/schemas/indexer-agent-step-result.schema.json +128 -2043
  218. package/providers/context/schemas/source-batch-input.schema.json +0 -14
  219. package/providers/context/skills/resolve-current-indexer-gate/SKILL.md +11 -50
  220. package/providers/context/skills/run-indexer-agent-step/SKILL.md +19 -425
  221. package/providers/context/skills/run-indexer-lifecycle/SKILL.md +28 -214
  222. package/providers/context/skills/work-production-stage/SKILL.md +35 -0
  223. package/indexers/bundles/context-markdown-indexer/tests/fixtures/migration-equivalence.json +0 -186
  224. package/plugins/claude/skills/context-indexer-create/references/guides/code-indexer-skill-authoring.md +0 -180
  225. package/plugins/claude/skills/context-indexer-create/references/guides/indexer-manifest-example.md +0 -103
  226. package/plugins/claude/skills/context-indexer-create/references/guides/indexer-provider-and-customization.md +0 -471
  227. package/plugins/claude/skills/context-indexer-create/references/guides/markdown-indexer-skill-authoring.md +0 -136
  228. package/plugins/claude/skills/context-indexer-create/references/guides/note.md +0 -37
  229. package/plugins/claude/skills/context-indexer-create/references/guides/sessions.md +0 -50
  230. package/plugins/claude/skills/context-indexer-create/references/reference/indexer-provider-protocol.md +0 -854
  231. package/plugins/codex/skills/context-indexer-create/references/guides/code-indexer-skill-authoring.md +0 -180
  232. package/plugins/codex/skills/context-indexer-create/references/guides/indexer-manifest-example.md +0 -103
  233. package/plugins/codex/skills/context-indexer-create/references/guides/indexer-provider-and-customization.md +0 -471
  234. package/plugins/codex/skills/context-indexer-create/references/guides/markdown-indexer-skill-authoring.md +0 -136
  235. package/plugins/codex/skills/context-indexer-create/references/guides/note.md +0 -37
  236. package/plugins/codex/skills/context-indexer-create/references/guides/sessions.md +0 -50
  237. package/plugins/codex/skills/context-indexer-create/references/reference/indexer-provider-protocol.md +0 -854
  238. package/plugins/cursor/skills/context-indexer-create/references/guides/code-indexer-skill-authoring.md +0 -180
  239. package/plugins/cursor/skills/context-indexer-create/references/guides/indexer-manifest-example.md +0 -103
  240. package/plugins/cursor/skills/context-indexer-create/references/guides/indexer-provider-and-customization.md +0 -471
  241. package/plugins/cursor/skills/context-indexer-create/references/guides/markdown-indexer-skill-authoring.md +0 -136
  242. package/plugins/cursor/skills/context-indexer-create/references/guides/note.md +0 -37
  243. package/plugins/cursor/skills/context-indexer-create/references/guides/sessions.md +0 -50
  244. package/plugins/cursor/skills/context-indexer-create/references/reference/indexer-provider-protocol.md +0 -854
  245. package/plugins/skills/context-indexer-create/references/guides/code-indexer-skill-authoring.md +0 -180
  246. package/plugins/skills/context-indexer-create/references/guides/indexer-manifest-example.md +0 -103
  247. package/plugins/skills/context-indexer-create/references/guides/indexer-provider-and-customization.md +0 -471
  248. package/plugins/skills/context-indexer-create/references/guides/markdown-indexer-skill-authoring.md +0 -136
  249. package/plugins/skills/context-indexer-create/references/guides/note.md +0 -37
  250. package/plugins/skills/context-indexer-create/references/guides/sessions.md +0 -50
  251. package/plugins/skills/context-indexer-create/references/reference/indexer-provider-protocol.md +0 -854
  252. package/plugins/skills/context-markdown-indexer/tests/fixtures/migration-equivalence.json +0 -186
  253. package/providers/context/actions/advance-current-indexer-lifecycle.yaml +0 -6
  254. package/providers/context/actions/apply-indexer-project.yaml +0 -7
  255. package/providers/context/actions/authorize-current-indexer-provider-program.yaml +0 -6
  256. package/providers/context/actions/authorize-indexer-dependencies.yaml +0 -7
  257. package/providers/context/actions/authorize-indexer-program-execution.yaml +0 -7
  258. package/providers/context/actions/compile-indexer-candidates.yaml +0 -8
  259. package/providers/context/actions/configure-community-indexer-fallback.yaml +0 -6
  260. package/providers/context/actions/configure-indexer-providers.yaml +0 -6
  261. package/providers/context/actions/confirm-index-requirement-workset.yaml +0 -8
  262. package/providers/context/actions/confirm-subject-reidentification.yaml +0 -8
  263. package/providers/context/actions/discover-markdown-indexer-providers.yaml +0 -6
  264. package/providers/context/actions/finalize-current-indexer-provider-selection.yaml +0 -5
  265. package/providers/context/actions/inspect-indexer-dependencies.yaml +0 -7
  266. package/providers/context/actions/inspect-indexer-program-execution.yaml +0 -7
  267. package/providers/context/actions/inspect-indexer-project-proposal.yaml +0 -7
  268. package/providers/context/actions/inspect-markdown-provider-capture.yaml +0 -7
  269. package/providers/context/actions/maintain-evidence.yaml +0 -6
  270. package/providers/context/actions/materialize-indexer-instructions.yaml +0 -7
  271. package/providers/context/actions/materialize-indexer-workset-view.yaml +0 -7
  272. package/providers/context/actions/observe-indexer-project.yaml +0 -7
  273. package/providers/context/actions/prepare-indexer-customization-project.yaml +0 -7
  274. package/providers/context/actions/propose-indexer-customization.yaml +0 -7
  275. package/providers/context/actions/propose-overlay-question-amendment.yaml +0 -7
  276. package/providers/context/actions/rebind-indexer-selection-to-requirement.yaml +0 -7
  277. package/providers/context/actions/report-indexer-incremental-impact.yaml +0 -8
  278. package/providers/context/actions/resolve-current-indexer-provider.yaml +0 -6
  279. package/providers/context/actions/route-index-requirement-confirmation.yaml +0 -8
  280. package/providers/context/actions/route-indexer-provider-selection.yaml +0 -7
  281. package/providers/context/actions/run-indexer-agent-step.yaml +0 -7
  282. package/providers/context/actions/run-indexer-post-author-composer.yaml +0 -7
  283. package/providers/context/actions/validate-indexer-contract-overlays.yaml +0 -7
  284. package/providers/context/actions/validate-indexer-customization.yaml +0 -7
  285. package/providers/context/actions/validate-indexer-selection-proposal.yaml +0 -7
  286. package/providers/context/actions/validate-main-index-run.yaml +0 -7
  287. package/providers/context/actions/validate-markdown-provider-selection.yaml +0 -7
  288. package/providers/context/actions/validate-subject-key-schemas.yaml +0 -8
  289. package/providers/context/resources/dialogue/evidence-maintenance.md +0 -26
  290. package/providers/context/resources/procedures/evidence-maintenance.md +0 -20
  291. package/providers/context/resources/views/authorized-indexer-workset-view.yaml +0 -15
  292. package/providers/context/resources/views/resolved-indexer-instructions.yaml +0 -21
  293. package/providers/context/schemas/evidence-maintenance-input.schema.json +0 -30
  294. package/providers/context/schemas/indexer-agent-step-input.schema.json +0 -80
  295. package/providers/context/schemas/indexer-authorized-workset-view.schema.json +0 -65
  296. package/providers/context/schemas/indexer-candidate-compile-input.schema.json +0 -57
  297. package/providers/context/schemas/indexer-candidate-compile-output.schema.json +0 -38
  298. package/providers/context/schemas/indexer-contract-overlay-validation-input.schema.json +0 -48
  299. package/providers/context/schemas/indexer-contract-overlay-validation-result.schema.json +0 -63
  300. package/providers/context/schemas/indexer-customization-project-preparation-result.schema.json +0 -44
  301. package/providers/context/schemas/indexer-customization-proposal-draft.schema.json +0 -83
  302. package/providers/context/schemas/indexer-customization-validation-result.schema.json +0 -36
  303. package/providers/context/schemas/indexer-dependency-authorization-input.schema.json +0 -71
  304. package/providers/context/schemas/indexer-dependency-authorization-result.schema.json +0 -138
  305. package/providers/context/schemas/indexer-incremental-impact-input.schema.json +0 -31
  306. package/providers/context/schemas/indexer-incremental-impact-output.schema.json +0 -52
  307. package/providers/context/schemas/indexer-main-lifecycle-input.schema.json +0 -180
  308. package/providers/context/schemas/indexer-main-lifecycle-output.schema.json +0 -194
  309. package/providers/context/schemas/indexer-markdown-provider-capture-input.schema.json +0 -17
  310. package/providers/context/schemas/indexer-markdown-provider-capture-output.schema.json +0 -54
  311. package/providers/context/schemas/indexer-markdown-provider-validation-input.schema.json +0 -34
  312. package/providers/context/schemas/indexer-markdown-provider-validation-output.schema.json +0 -75
  313. package/providers/context/schemas/indexer-materialize-request.schema.json +0 -49
  314. package/providers/context/schemas/indexer-materialized-resource.schema.json +0 -64
  315. package/providers/context/schemas/indexer-overlay-question-amendment.schema.json +0 -13
  316. package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +0 -89
  317. package/providers/context/schemas/indexer-overlay-question-rebind-input.schema.json +0 -35
  318. package/providers/context/schemas/indexer-overlay-question-rebind-result.schema.json +0 -25
  319. package/providers/context/schemas/indexer-program-execution-authorization-input.schema.json +0 -145
  320. package/providers/context/schemas/indexer-program-execution-authorization-result.schema.json +0 -60
  321. package/providers/context/schemas/indexer-project-action-result.schema.json +0 -19
  322. package/providers/context/schemas/indexer-project-gate-input.schema.json +0 -100
  323. package/providers/context/schemas/indexer-project-observation-input.schema.json +0 -16
  324. package/providers/context/schemas/indexer-project-observation-result.schema.json +0 -42
  325. package/providers/context/schemas/indexer-provider-route-input.schema.json +0 -55
  326. package/providers/context/schemas/indexer-provider-route-report.schema.json +0 -188
  327. package/providers/context/schemas/indexer-requirement-confirmation-input.schema.json +0 -27
  328. package/providers/context/schemas/indexer-requirement-confirmation-output.schema.json +0 -24
  329. package/providers/context/schemas/indexer-selection-proposal-input.schema.json +0 -12
  330. package/providers/context/schemas/indexer-selection-proposal-validation.schema.json +0 -23
  331. package/providers/context/schemas/indexer-subject-reidentification-input.schema.json +0 -37
  332. package/providers/context/schemas/indexer-subject-reidentification-output.schema.json +0 -31
  333. package/providers/context/schemas/indexer-workset-view-materialization-request.schema.json +0 -35
  334. package/providers/context/skills/authorize-current-indexer-provider-program/SKILL.md +0 -20
  335. package/providers/context/skills/configure-indexer-providers/SKILL.md +0 -137
  336. package/providers/context/skills/configure-indexer-providers/references/guides/code-indexer-skill-authoring.md +0 -180
  337. package/providers/context/skills/configure-indexer-providers/references/guides/indexer-provider-and-customization.md +0 -471
  338. package/providers/context/skills/configure-indexer-providers/references/guides/markdown-indexer-skill-authoring.md +0 -136
  339. package/providers/context/skills/configure-indexer-providers/references/guides/note.md +0 -37
  340. package/providers/context/skills/configure-indexer-providers/references/guides/sessions.md +0 -50
  341. package/providers/context/skills/configure-indexer-providers/references/reference/indexer-provider-protocol.md +0 -854
  342. package/providers/context/skills/prepare-indexer-customization-project/SKILL.md +0 -31
  343. package/providers/context/skills/propose-indexer-customization/SKILL.md +0 -40
  344. package/providers/context/skills/resolve-current-indexer-provider/SKILL.md +0 -20
  345. package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +0 -122
@@ -1,6 +1,6 @@
1
1
  schema: agent-graph.provider.v1
2
2
  id: c4a/context
3
- version: 0.7.9
3
+ version: 0.7.10-alpha.1
4
4
  name: Context workflow
5
5
  description: Internal work contract for Context knowledge workspaces.
6
6
  graphs:
@@ -2,5 +2,5 @@ schema: agent-graph.resource.file.v1
2
2
  id: context.indexer.provider-guide
3
3
  kind: procedure
4
4
  mediaType: text/markdown
5
- path: skills/configure-indexer-providers/references/guides/indexer-provider-and-customization.md
6
- description: Current registry examples, Provider selection and customization instructions with bundled linked manuals.
5
+ path: resources/manuals/guides/indexer-provider-and-customization.md
6
+ description: Current requirements, lightweight Indexer guidance, stage-directory writing and temporary storage boundaries.
@@ -10,14 +10,12 @@ Context reports one root diagnostic with counts and keeps derived findings in a
10
10
  separate detail view. Codes are stable machine identifiers; this document gives
11
11
  the shared recovery boundary.
12
12
 
13
- Broken source references or invalid stored structure require a corrected
14
- candidate or an explicit evidence-maintenance decision. Projection-only
13
+ Invalid stored structure requires a corrected candidate. Projection-only
15
14
  failures can be repaired by deterministic close. Content-quality suggestions,
16
15
  including suspected unfilled placeholders, are advisory: they do not change a
17
16
  successful CLI outcome or add a gate. The existing Agent or user Review decides
18
17
  whether the content needs revision.
19
18
 
20
- `approved-source-orphaned` is a persistent warning produced only after an
21
- explicit `keep-orphaned` decision. It records that the page remains usable by
22
- policy while its original source document cannot be resolved. It does not
23
- permit changed source content to bypass replacement Review.
19
+ Changed, missing or ambiguously relocated source regions identify articles to
20
+ inspect through the normal revision workflow. Warnings do not add a separate
21
+ maintenance gate, silently rewrite articles or confirm that the prose is current.
@@ -6,13 +6,11 @@ mediaType: text/markdown
6
6
 
7
7
  # Source-boundary dialogue
8
8
 
9
- For the first production task in a new workspace, use the required work-start
10
- procedure before presenting this source registration action. Read a supplied
11
- plan as task guidance, read batch metadata titles under that procedure's limits and
12
- 10-document failure fallback (no bodies or outlines; retain URLs when titles are unavailable),
13
- resolve every required start condition, present the report and wait for feedback.
14
- Do not register the plan itself or begin capture merely because it contains source
15
- paths. Once confirmed, include the report path required by the current input schema.
9
+ Confirm the reader purpose and source boundary, reusing explicit choices already
10
+ provided by the user. Read a supplied plan as task guidance, not automatically as
11
+ source material. Register and capture confirmed sources for lightweight
12
+ investigation; the work-start report follows planning and must receive feedback
13
+ before bulk writing. Source registration carries no report path or digest.
16
14
 
17
15
  Describe the boundary in user terms before showing a registration command. For
18
16
  code, distinguish a whole repository/subspace from one concrete package or
@@ -0,0 +1,84 @@
1
+ ---
2
+ id: context.sdk.code-indexer-skill-authoring
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Code Indexer Skill authoring
8
+
9
+ An Indexer exposes the source skeleton and guides source-grounded writing.
10
+ Read [planning and writing guidance](./indexer-provider-and-customization.md)
11
+ for the current workflow. Do not recreate routing inside a Skill.
12
+
13
+ ## Skill responsibilities
14
+
15
+ Describe the supported technology, activation signals, useful reader questions,
16
+ and how to investigate an authorized module. A module may use several Skills for
17
+ different concerns. There is no exclusive primary owner, version pin, integrity
18
+ receipt or production registration prerequisite. Skill names and optional usage
19
+ configuration are temporary planning guidance, not article metadata.
20
+
21
+ Keep `SKILL.md` focused on discovery and decisions. Put optional detailed writing
22
+ guidance and reusable scripts beside it, with relative links and clear triggers.
23
+ Distribution metadata does not impose workspace version validation.
24
+
25
+ ## Skeleton first
26
+
27
+ During planning, prefer directories, manifests, registration points and bounded
28
+ search. Either let the Agent inspect these directly or offer a fast helper suited
29
+ to the stack. Report matching names, known counts and file locations. Do not
30
+ require complete symbol extraction, call graphs or reading every implementation
31
+ before proposing articles.
32
+
33
+ Distinguish file-list counts from syntax-derived feature counts. A helper with a
34
+ budget must identify inspected and uninspected scope, return a continuation when
35
+ available, and label partial counts. Never present a stopped scan as a full total.
36
+ Representative deeper reading is optional when it clarifies a topic boundary.
37
+
38
+ Signals suggest topics; they do not prove semantics. A route registration can
39
+ suggest an API topic, but not its error behavior or business meaning. Prefer
40
+ reader questions to a mechanical page for each directory, symbol or heading.
41
+ Keep module directories explicit in task guidance when needed, without adding
42
+ a separate persisted boundary protocol or a new validation gate.
43
+
44
+ ## Writing and evidence
45
+
46
+ Once the current report is confirmed, read the source needed for each assigned
47
+ article. Describe contracts, state changes, failure behavior and integration
48
+ points where relevant. Optional parsing can help locate declarations; it is not
49
+ proof of runtime behavior. Preserve expressions without executing project code,
50
+ distinguish declaration defaults from implementation defaults, and state unknowns.
51
+
52
+ Use the current stage's Markdown and reference-file schemas. Each fragment cites
53
+ at most three actual source locations; the CLI computes regional digests. Split
54
+ an explanation when it needs separate evidence, not to fill a fixed template.
55
+ Reuse stable article and fragment identities when revising. Supporting documents,
56
+ notes or sessions may contribute to the same article without becoming code facts.
57
+
58
+ The Agent plans batches and chooses reading order within the work released by
59
+ the CLI. If supported, workers write assigned drafts and the coordinator submits
60
+ completed subsets. Do not require every batch to finish before submission.
61
+ Use the existing missing-material and repair outputs, not a per-member ledger,
62
+ another content audit or a Skill-specific retry protocol.
63
+
64
+ ## Optional scripts
65
+
66
+ Scripts serve a concrete repeated task; they are not mandatory for every stack.
67
+ Take explicit authorized paths and bounded options, keep source files read-only,
68
+ and return concise output or a file in the supplied temporary area. Do not execute
69
+ repository code, read credentials, traverse unrelated directories or contact
70
+ external services implicitly. Full parsing belongs to selected writing tasks.
71
+ Report unsupported syntax and incomplete traversal separately from zero matches.
72
+
73
+ ## Validation and distribution
74
+
75
+ Test supported technology with anonymous fixtures: feature discovery, bounded
76
+ stopping, unsupported input, repeated names in different paths, and final article
77
+ references. For generated API explanations, verify defaults, shared types and
78
+ unresolved cross-file links in the final page as well as the parser output.
79
+ Use relevant fixtures, not a mandatory matrix for unrelated technologies.
80
+
81
+ Verify packaged relative links and executable helpers. Keep community examples
82
+ free of company-specific services; organization and project knowledge belongs in
83
+ their own Skills. Publishing or installing a Skill requires the appropriate
84
+ authorization and does not add a hash or version check to knowledge production.
@@ -0,0 +1,117 @@
1
+ ---
2
+ id: context.sdk.indexer-provider-and-customization
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Indexer guidance for planning and writing
8
+
9
+ Follow the current Route returned by `context run` or `context status --format json`.
10
+ The CLI prepares a stage directory and returns its instructions, schemas and
11
+ submission command. Use those files instead of copying long content into arguments.
12
+
13
+ ## Responsibilities
14
+
15
+ An Indexer helps expose the source skeleton and guides source-grounded writing.
16
+ It is not a mandatory full symbol scan or a semantic classifier owned by the CLI.
17
+ Use a visible Skill directly, or its bounded CLI-assisted discovery, as appropriate
18
+ for the technology. Multiple Indexers may explain different aspects of one module.
19
+ There is no mandatory primary-owner selection or Provider resolution stage.
20
+
21
+ At the start of this continuous work, declare the available relevant Skills and
22
+ whether the Agent can schedule sub-agents. Use the capability schema supplied in
23
+ the stage directory. A new session must declare its actual capabilities; do not
24
+ inherit another session's parallel scheduling claim. Skill names and optional
25
+ configuration are guidance, not version pins or evidence of completed reading.
26
+ Do not inspect caches, compare Skill hashes, resolve exact versions or create a
27
+ second installation registry. Installation and enabling Skills belong to the Host.
28
+
29
+ ## Confirmed requirements
30
+
31
+ The configuration Route names the required file and supplies its schema. The
32
+ requirements-only registry records reader goals and authorized sources, not
33
+ production assignments. For example, replace the source and goals with the
34
+ user's actual scope:
35
+
36
+ ```yaml
37
+ protocol: context.indexer.registry/v1
38
+ requirements:
39
+ - id: integration-guide
40
+ purpose: Help application developers understand and integrate the system.
41
+ reader_goals: [understand-system, integrate-system]
42
+ coverage_domains:
43
+ architecture: required
44
+ target_scope:
45
+ targets:
46
+ - source_ref: repo:sample
47
+ evidence_source_scope:
48
+ targets:
49
+ - source_ref: repo:sample
50
+ indexers: []
51
+ ```
52
+
53
+ Use registered source identities, not guessed paths or URLs. Keep any confirmed
54
+ exclusions and supporting-source boundaries. Sources needed for another requirement
55
+ are not globally excluded. Module directory boundaries can be supplied in task
56
+ instructions by the Agent or CLI; do not invent persistent article fields or
57
+ extra module-path validation. A module name alone does not identify its directory.
58
+
59
+ ## Lightweight investigation and planning
60
+
61
+ For code, inspect directories, manifests and registration points. Return names,
62
+ known counts and locations, not every symbol, call graph or implementation detail.
63
+ Discovery has a bounded budget. Report incomplete coverage honestly; partial
64
+ feature counts are not totals. Read representative code only when it helps make
65
+ the plan. Deep extraction belongs to writing the selected topic.
66
+
67
+ For documents, start with titles, bounded introductory text and heading outlines.
68
+ Read more when necessary. Reuse code topics or existing articles where the content
69
+ belongs, without forcing business concepts into physical directory names. Notes
70
+ and sessions can directly suggest a new article or an amendment to an existing one.
71
+
72
+ Submit article paths, reader questions, source associations and writing batches
73
+ using the supplied planning schema. Record selected Skill names and configuration
74
+ in the temporary plan's `indexer_usage`; the CLI can return it during planning
75
+ and writing. It is not persisted on articles, sections or production results.
76
+ Known one-to-one tasks can use the direct-writing path without an extra semantic
77
+ planning submission. Do not create an inventory-member disposition ledger.
78
+
79
+ Present the final work-start report after the relevant source overviews and plan
80
+ are ready, before bulk writing. Wait for the user's confirmation, including in
81
+ managed mode. Do not add approval for internal batch counts or Skill choices.
82
+
83
+ ## Directory-based writing
84
+
85
+ The CLI determines which batches are ready and supplies their material and
86
+ acceptance rules. Within that authorized work the Agent chooses reading order,
87
+ writing order and, when supported, sub-agent scheduling. Without sub-agent support,
88
+ work serially through the returned batch. Workers may write their assigned draft
89
+ files; the coordinator submits completed subsets and owns shared CLI writes.
90
+
91
+ Write Markdown and references into the stage's temporary output directory. Submit
92
+ the short file manifest with stage-relative paths. Whole-article submissions and
93
+ section repairs use the returned schemas. Read the receipt for accepted tasks,
94
+ precise errors and next ready work; do not resubmit accepted content unnecessarily.
95
+ Multiple authorized sources may support an article. A new task or changed plan
96
+ must still respect confirmed requirements and the work-start report boundary.
97
+
98
+ ## Storage and continuation
99
+
100
+ Drafts, capability declarations, plans, candidates, acceptance receipts and
101
+ transaction state remain in `.tmp`. Only formal knowledge, necessary source
102
+ material and long-term requirements belong in durable project content.
103
+ With intact temporary state the current work can resume or retry safely. After
104
+ clearing `.tmp` or cloning elsewhere, start new production from formal knowledge
105
+ and sources; do not reconstruct the old workflow. There is no historical protocol
106
+ migration or compatibility path.
107
+
108
+ Source authorization, real references, safe file reads and concurrent-write
109
+ protection still apply. Skill identity is not a production acceptance condition.
110
+
111
+ ## When maintaining a Skill
112
+
113
+ For an explicitly requested Skill change, use the
114
+ [code Skill authoring guide](./code-indexer-skill-authoring.md) or
115
+ [document Skill authoring guide](./markdown-indexer-skill-authoring.md).
116
+ These are authoring references, not additional reading required for routine
117
+ knowledge production.
@@ -36,6 +36,20 @@ optional: preserve the original URL without falling back to body retrieval or
36
36
  changing credentials. Resolve intent from the conversation; refine provisional
37
37
  chapters and module boundaries from evidence after formal capture.
38
38
 
39
+ ## Agent-planned writing order
40
+
41
+ Within the tasks available in the current Route, the Agent may choose a writing
42
+ order from the reader's needs and relationships between topics. There is no
43
+ fixed code-first or document-first rule. Prefer foundational concepts and shared
44
+ terminology before walkthroughs or summaries that benefit from them, when this
45
+ reduces rework. Independent topics can proceed without waiting; adjust the order
46
+ as writing progresses instead of maintaining a separate scheduling artifact.
47
+
48
+ This is an Agent working preference, not a new dependency or completion gate.
49
+ Do not add dependency fields, fetch extra material, or delay useful work merely
50
+ to establish an order. Keep current task boundaries, source permissions and
51
+ submission rules; do not pull future batches forward or change the CLI Route.
52
+
39
53
  ## Workspace versions and changelog
40
54
 
41
55
  `package.json.version` is the workspace SemVer. At completed-scope delivery the
@@ -139,6 +153,13 @@ ordered `content` list of `{ "markdown": "new text" }` and/or
139
153
  selected section's source references remain intact. Use full Markdown when
140
154
  changing structure, adding a page or when a section has no unambiguous ID.
141
155
 
156
+ To change a fragment's citations, include `references` alongside its `section_id`:
157
+ each entry supplies `source_ref` and `locator` (`path`, `start_line`, `end_line`).
158
+ Context computes the region fingerprint. This uses the same revision submission,
159
+ with at most three source positions per fragment. Full Markdown may include a
160
+ `sections` list of reference edits; local section edits may change content,
161
+ references, or both. Omission preserves citations; an empty list removes them.
162
+
142
163
  For an optional check, append `--preview` to the current `action complete-current`
143
164
  command with the same revision and input file. It validates and returns the
144
165
  assembled page and previous text without accepting the edit. Submit the same
@@ -412,17 +433,17 @@ Indexer's read scope. Its `task adjust` scope also supplies the explicit
412
433
  `requirement_ref`. This extends the current page's available sources and keeps
413
434
  queued pages; it does not silently start another task or another Indexer.
414
435
 
415
- ### Replacing supporting article identities
416
-
417
- When an upstream article is split, merged or removed, start `context revise` for
418
- its consumer and use `context task adjust --input - --format json` with
419
- `instruction` and `knowledge_dependencies: { dependencies }`. Each dependency
420
- uses an approved `artifact_ref`, optional `section_refs`, and `required` flag.
421
- The current Author input returns authorized replacement facts and their evidence.
422
- Repeat the adjustment with `knowledge_dependencies.sections`, selecting each
423
- retained `section_key` and its full `fact_refs` and `evidence_refs` support. Then
424
- revise the explanation and complete normal Review, close and build. An explicit
425
- empty dependency list removes the relationship only when remaining sections have
426
- valid direct support. Missing dependencies, changed approvals and invalid source
427
- references cannot silently become current evidence. Writing quality remains an
428
- Agent/Review decision; no chapter-count or wording gate is introduced.
436
+ ### Revising material reused from another article
437
+
438
+ When a supporting article changes, revise the affected explanation using
439
+ `context revise`. Read the relevant approved text and, where needed, its original
440
+ sources. Keep direct source regions on the affected output fragments; do not
441
+ recreate an article dependency graph or copy facts and evidence IDs.
442
+
443
+ Revision section edits may supply `references` as `source_ref` plus a
444
+ `locator` containing `path`, `start_line`, and `end_line`. Context computes the
445
+ regional digest. Omitted references preserve the current fragment's citations;
446
+ an explicit empty list removes them, and deleting a fragment removes its
447
+ citations. Each fragment may cite at most three source positions. Register and
448
+ authorize new material before citing it, then follow normal Review, close and
449
+ build. Article links alone do not authorize reading new sources or prove a claim.
@@ -0,0 +1,65 @@
1
+ ---
2
+ id: context.sdk.markdown-indexer-skill-authoring
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Markdown Indexer Skill authoring
8
+
9
+ Use the shared [planning and writing guidance](./indexer-provider-and-customization.md).
10
+ Document Skills help interpret captured articles; notes and sessions have their
11
+ own guidance but can support the same reader topic. No unique primary owner,
12
+ version lock or per-document disposition ledger is required.
13
+
14
+ ## Captured sources
15
+
16
+ Start from authorized captured Markdown and its source identity. Capture proves
17
+ which bytes are available, not what they mean. Titles, headings and filenames are
18
+ navigation aids, not proof that the Agent has read the body.
19
+
20
+ Do not fetch new documents, follow external links or widen source authorization
21
+ implicitly. Request missing material through the current workflow. Keep the
22
+ distinction between a source being unavailable and its contents being irrelevant.
23
+
24
+ ## Planning
25
+
26
+ Read the supplied titles, bounded introductions and complete H2/H3 outlines.
27
+ The Agent may read additional sections or the full document when needed, then
28
+ chooses article targets and writing batches. Do not require full-body reading of
29
+ every document or a separate planning submission for an already explicit target.
30
+
31
+ Consult code topics and existing article descriptions and references. Reuse a
32
+ topic when its reader question fits, or propose a clearer business topic instead
33
+ of forcing a document under a code directory. One document may support several
34
+ articles and several authorized documents may support one article.
35
+
36
+ The final work-start report follows the relevant source overview and plan, and
37
+ must wait for the user before bulk writing, including in managed mode.
38
+
39
+ ## Writing and repairs
40
+
41
+ Read the actual passages needed for the article. Distinguish authoritative rules,
42
+ examples, decisions and proposals; a session suggestion is not an implemented
43
+ behavior. Write Markdown and references in the supplied temporary directory and
44
+ submit the short stage-relative manifest. Title and description belong to the
45
+ article, not an internal layout-mapping tuple.
46
+
47
+ Keep stable article and fragment identities when revising. Each fragment cites
48
+ at most three actual source regions. The CLI handles source digests and safety;
49
+ the Agent judges whether the evidence supports the explanation. For a local
50
+ failure, use the returned fragment identifier or position to repair the affected
51
+ part. Completed independent tasks can be submitted without the rest of the batch.
52
+
53
+ Do not inflate page counts, produce a page for every heading, or turn missing
54
+ evidence into speculative prose. A genuine material gap remains unfinished work;
55
+ an explicit exclusion uses the existing exclusion mechanism. Neither requires
56
+ a new reconciliation ledger or additional content-review stage.
57
+
58
+ ## Useful fixtures
59
+
60
+ Cover an ordinary one-to-one article, multi-document synthesis, reuse of an
61
+ existing topic, fragment repair, source line changes, links and images, and
62
+ missing material for the document forms the Skill supports. Verify both source
63
+ fidelity and the final page. Keep examples anonymous and check packaged links.
64
+ Drafts and scheduling details remain temporary; deleting `.tmp` starts fresh
65
+ production from formal knowledge and available sources, not a workflow migration.
@@ -238,19 +238,15 @@ rejects it.
238
238
  The default kb template includes:
239
239
 
240
240
  - `skills/knowledge-query/SKILL.md`, a reusable skill that teaches agents to
241
- query copied knowledge pages structure-first, cite page/section evidence, use
242
- `context-build-inventory.json` edge records for package-visible
243
- relationships, and report gaps instead of inventing unsupported answers. The
244
- build inventory also exposes `structure.relationship_coverage` so a consumer
245
- can distinguish an observed zero-edge result from unknown relationship
246
- coverage. The
241
+ navigate copied knowledge pages, cite relevant text and its exported source
242
+ attribution, and report gaps instead of inventing unsupported answers. The
247
243
  default entry OKF root is `wikis/`; packages that select additional internal
248
244
  collections expose
249
245
  `guides/`, `rules/`, or `feats/` indexes when those roots are selected.
250
246
  - `skills/knowledge-query/scripts/search.mjs`, a dependency-free BM25 fallback
251
247
  for exact terms, mixed keyword queries, and large Markdown indexes. It chunks
252
248
  mechanically, returns inspectable paths and line ranges, and never replaces
253
- source-backed relationship evidence.
249
+ reading the relevant source-backed explanation.
254
250
  - `wikis/index.md`, the editable OKF bundle entry page for the generated
255
251
  `dist/<package-name>/wikis/` directory.
256
252
 
@@ -267,10 +263,8 @@ The generated
267
263
  KB entry surface. Internal collections are mapped into OKF roots during build:
268
264
  `codeindex`, `business`, and `product` go to `wikis/`; `architecture`, `sop`,
269
265
  `faq`, `decision`, and `incident` go to `guides/`; `standards` and `test` go to
270
- `rules/`; and `feats` goes to `feats/`. Treat `wikis/` as the structured
271
- entity-and-relationship layer. Guides and rules may explain, operationalize,
272
- or constrain that knowledge, but directory placement alone does not establish
273
- a relationship.
266
+ `rules/`; and `feats` goes to `feats/`. These roots organize articles by content
267
+ type; directory placement does not establish a relationship or a subject graph.
274
268
 
275
269
  Default navigation rules:
276
270
 
@@ -313,54 +307,36 @@ wants project-specific behavior beyond knowledge lookup.
313
307
 
314
308
  ## Context OKF Profiles
315
309
 
316
- Approved Markdown under `knowledge/` and its deterministic
317
- `knowledge/structure.yaml` projection form the authoring source of truth:
318
-
319
- - top-level YAML frontmatter uses OKF fields such as `type`, `title`,
320
- `description`, `tags`, `timestamp`, and `resource`;
321
- - each Markdown page keeps reader fields, stable page identity, `sources`, and a
322
- small recovery capsule (`resource`, `node_type`, containment fields, and
323
- relationship mode);
324
- - large or repeated machine state such as complete `code_symbols`, code
325
- evidence, relationship records, candidate fingerprints, and optimization
326
- decisions lives once in the corresponding `structure.yaml` view record;
327
- - Context readers hydrate that machine state in memory before verify, audit,
328
- revision, or build. Do not copy a compact page as a new page without using a
329
- Context authoring command;
330
- - do not nest Context production metadata under `context`; fields such as
331
- `context.sources` and `context.code_symbols` are not accepted production fields;
332
- - section provenance lives in `<!-- context:section ... source_ref="..." -->`
333
- comments. When a Section needs more than one citation, the CLI preserves the
334
- complete set in its adjacent `context:source_refs` block;
335
- - do not add frontmatter `source_refs`; page-level provenance is derived from
336
- section source refs when needed;
337
- - do not add `context` or `schema` fields.
338
-
339
- Package knowledge pages under `dist/<package-name>/` use a consumer projection.
340
- They retain reader-facing fields such as `title`, `type`, `description`, `tags`,
341
- `timestamp`, and custom non-lifecycle fields. Node identity, `resource`,
342
- `sources`, Section evidence comments, and build-only fields are omitted from the
343
- page. `context-build-inventory.json` records the distributed path, approved
344
- knowledge path, node identity, source summary, and package-visible structure.
345
- Maintainers return to the mapped `knowledge/` page for exact `sources` and
346
- `source_ref` attribution. `knowledge/` is never rewritten by this projection.
347
-
348
- Accepted section `source_ref` forms:
349
-
350
- ```text
351
- src-N#symbol:<file>:<symbol-id>:<kind>@<digest>
352
- src-N#span:<heading-hint> L<start>-<end>@<span-hash>
353
- ```
354
-
355
- The code symbol form includes the source-relative file so same-name symbols in
356
- different files resolve to one exact symbol-index row. Consumers should still
357
- treat the complete `source_ref` as opaque. Production pages do not expose
358
- Candidate fingerprints, Indexer digests, or `code_origin`.
359
-
360
- `#span:` refs retain source snapshot line ranges for human review, diffing, and
361
- stable re-pinning. They resolve against the stored file/Lark snapshot or the saved
362
- Note/Sessions Markdown, not the code symbol index. A session's optional commit/MR
363
- association stays in its source file; knowledge does not duplicate those fields.
310
+ Approved Markdown under `knowledge/` and the article index in
311
+ `knowledge/structure.yaml` have separate responsibilities:
312
+
313
+ - Markdown owns `title`, `type`, `description` and the ISO UTC `timestamp`.
314
+ `resource` and `tags` are optional reader metadata, not required identities.
315
+ - Structure owns stable `article_id`, `path`, `collection`, `visibility`,
316
+ and fragment `sections` with their region `references`.
317
+ - Markdown fragment markers contain only their stable ID:
318
+ `<!-- context:section id="usage" -->` and `<!-- /context:section -->`.
319
+ Structure records each corresponding ID and at most three source positions
320
+ per fragment, not three per article.
321
+ - A reference contains `source_ref`, `locator: { path, start_line, end_line }`
322
+ and the Host-computed regional `content_digest`. Do not duplicate this in
323
+ Markdown frontmatter or comments.
324
+ - Neither Markdown nor structure keeps a node graph, parser fact ledger,
325
+ evidence-binding table or a second copy of article prose.
326
+ - Article moves retain identity through Context's existing revision workflow.
327
+ Direct Markdown copies alone do not include complete provenance.
328
+
329
+ Package pages under `dist/<package-name>/` retain reader metadata and receive
330
+ a generated Sources section derived from the article references and source
331
+ registry. Repository links include file and line ranges; document links retain
332
+ the captured document attribution. This export does not rewrite `knowledge/`.
333
+ The build inventory maps exported pages back to their approved article paths.
334
+
335
+ Source snapshots and regional baselines remain machine-managed. Update checks
336
+ compare cited regions, relocating unchanged text only when its new position is
337
+ unambiguous. Missing, changed or ambiguous regions require review; an unchanged
338
+ region does not prove that uncited new material is irrelevant. A session's
339
+ optional commit/MR association stays with its source document.
364
340
 
365
341
  The kb package root may contain agent files such as `AGENTS.md` and `skills/`.
366
342
  The OKF-compatible surface is the selected `wikis/`, `guides/`, `rules/`, and
@@ -383,12 +359,10 @@ The OKF-compatible surface is the selected `wikis/`, `guides/`, `rules/`, and
383
359
  file includes `selected_by` entries such as `{ "kind": "collection" }`,
384
360
  `{ "kind": "okf_root" }`, `{ "kind": "include" }`, or `{ "kind": "default" }`,
385
361
  and a `production_metadata` object for selected page-level production fields.
386
- Child and relationship records use the inventory's canonical structure
387
- projection. The inventory exposes package-visible typed
388
- edges under `structure.edge_records`; these records are filtered to edges whose
389
- endpoints are present in the selected package. Use those edge records for
390
- relationship citations inside the package instead of assuming the workspace
391
- `knowledge/structure.yaml` file is bundled.
362
+ The `structure.articles` projection retains selected article identities and
363
+ fragment source references. It does not contain graph nodes or typed edges.
364
+ Published Markdown includes readable source attribution derived from these
365
+ references; the Agent does not maintain a second source list in the page.
392
366
 
393
367
  For KB packages, the inventory records `package.distribution` as
394
368
  `layout: "flat"`, `knowledge_namespace: null`, and the four package-relative
@@ -141,13 +141,12 @@ Each item contains:
141
141
  | `sourcePath` | Approved knowledge path before OKF output mapping, for example `architecture/entity/button.md`. |
142
142
  | `approved_path` | Alias for `sourcePath`. |
143
143
  | `dist_path` | Alias for `path`. |
144
+ | `article_id` | Stable article identity from the approved article index. |
144
145
  | `internalCollection` | Internal approved collection, for example `architecture`. |
145
146
  | `internal_collection` | Alias for `internalCollection`. |
146
147
  | `collection` | Internal approved collection; alias for `internalCollection`. |
147
148
  | `okf_root` | OKF output root, for example `wikis`, `guides`, `rules`, or `feats`. |
148
149
  | `okf_root_path` | Final flat package-relative OKF root. |
149
- | `node_ref` | Stable NodeRef from approved frontmatter, for example `entity/button`. |
150
- | `view_ref` | Stable ViewRef from approved frontmatter, for example `architecture:entity/button`. |
151
150
  | `pathWithinCollection` | Path below the OKF root, for example `architecture/entity/button.md`. |
152
151
  | `href` | Link relative to the template file currently being rendered. Use this in custom templates. |
153
152
  | `hrefFromTemplate` | Alias for `href`. |
@@ -157,7 +156,7 @@ Each item contains:
157
156
  | `type` | OKF `type` from frontmatter. |
158
157
  | `description` | OKF `description` from frontmatter, when present. |
159
158
  | `timestamp` | OKF `timestamp` from frontmatter, when present. |
160
- | `source` | First top-level `sources` entry without the `repo:` prefix, or the group name. |
159
+ | `source` | First actual source reference from the article index, or the group name. |
161
160
  | `group` | First path segment under the OKF root. |
162
161
  | `parentPath` | Parent path below the OKF root. |
163
162
  | `depth` | Segment count below the OKF root. |