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

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
@@ -18,7 +18,7 @@ Record new factual contributions as managed sources before expanding source
18
18
  ownership; an editing instruction alone is not a permanent factual source.
19
19
 
20
20
  Return the full revised Markdown in the supplied output schema, preserving the
21
- page's identity, source list, and source-bound section markup. Do not silently
21
+ page's stable fragment markers and metadata. Do not silently
22
22
  turn paraphrased text into a verbatim quotation. Do not directly write knowledge
23
23
  files. Context prepares a Candidate and routes it through the existing Review,
24
24
  apply, close, and build steps. Managed mode delegates Review, not source truth.
@@ -27,18 +27,18 @@ If Context reports that the approved page changed, read that version and restart
27
27
  the revision. Never overwrite a concurrent edit with the old page snapshot.
28
28
 
29
29
  When `target.base_digest` is null, this is a new page in the confirmed update scope.
30
- The supplied Markdown contains only its stable identity and initial metadata.
30
+ The supplied Markdown contains its initial metadata. Article identity stays in the structure.
31
31
  Read the specified source material and write the complete page with source-bound
32
32
  sections, using the existing purpose and page forms. Do not treat the initial
33
33
  heading as an already written page.
34
34
 
35
- Use `target.source_refs` as the final page source list. It can include explicitly
35
+ Use `target.source_refs` as the allowed source scope, not as a list to copy onto the page. It can include explicitly
36
36
  selected supporting material absent from the old Markdown. Read that material
37
37
  before using it, add only its relevant explanation, and cite it in the affected
38
38
  sections. A session rationale is not proof of runtime behavior.
39
39
 
40
40
  When `target.previous_path` is present, the user explicitly selected a page move.
41
- Keep its stable Node/View identity. The supplied Markdown already rebases its
41
+ Keep its stable article identity and fragment IDs. The supplied Markdown already rebases its
42
42
  relative links for `target.path`; do not put them back at the old location.
43
43
  Explain the move in the review summary. Approval moves the page and updates
44
44
  incoming Markdown navigation together; do not create a second copy or manually
@@ -49,13 +49,22 @@ For selected `note` inputs, read [note guidance](note.md). For `sessions`,
49
49
  read [sessions guidance](sessions.md). Read only the applicable source guide.
50
50
 
51
51
 
52
- Read `writing_context` for the selected Provider, reader profile, current sections
53
- and actual template resources. These apply to direct page corrections too.
52
+ Read `writing_context` for the confirmed reader requirements, current sections,
53
+ authorized source entries and any available skill guidance from this temporary
54
+ work session. A missing skill selection does not invalidate the approved page
55
+ or require restoring a former Provider registration. These inputs apply to
56
+ direct page corrections too.
54
57
  Preserve the current page form; choose a different form only for an explicit
55
58
  change of purpose. Do not replace API tables with generic explanatory prose.
56
59
  The current sections are approved content, not freshly extracted API facts.
57
- For source updates or an explicit regeneration request, `program_blocks` contains API tables computed from current
58
- scoped Parser facts with the ordinary deterministic renderer. Select only the
60
+ Ordinary source updates do not automatically parse the repository or generate
61
+ API tables. Read the changed material relevant to the requested correction;
62
+ use a suitable scoped analysis capability when needed. Do not wait for a
63
+ Provider selection, version check or program block before revising ordinary
64
+ prose. Keep actual source citations and the current revision baseline.
65
+
66
+ When an explicit regeneration request supplies `program_blocks`, they contain
67
+ API tables computed from scoped Parser facts with the deterministic renderer. Select only the
59
68
  relevant blocks and place their exact `token` inside the corresponding sourced
60
69
  section. The CLI expands it at submission; do not retype its rows. Do not use an
61
70
  unrelated declaration merely because it shares a module. If a needed block is
@@ -101,11 +110,21 @@ For a small change, submit `sections` instead of `markdown`. Select exact IDs fr
101
110
  `writing_context.current_sections`; each edit contains `section_id` and `content`,
102
111
  an ordered array of `{ "markdown": "replacement text" }` or
103
112
  `{ "program": "exact token from program_blocks" }`. The CLI retains untouched
104
- sections, page identity and the edited section's source references. Do not include
113
+ sections and page identity. Omitted references preserve the previous citations. Do not include
105
114
  section wrappers in replacement text. Use full Markdown for new pages, changed
106
115
  structure or pages without unambiguous section IDs. Both forms use the current
107
116
  Action schema and the same source and baseline validation.
108
117
 
118
+ When a fragment's support changes, include `references` with its actual
119
+ `source_ref` and `locator` (`path`, `start_line`, `end_line`). Each fragment allows
120
+ up to three positions; Context reads the captured region and computes its digest.
121
+ For full Markdown, optional `sections` contains only `{ section_id, references }`
122
+ entries; for local edits it can accompany `content` or update references alone.
123
+ An explicit empty list removes that fragment's citations. Deleted fragments lose
124
+ their references; new fragments need their own selected sources, not copied IDs.
125
+ Uniquely moved unchanged text can retain its fingerprint at its new position;
126
+ changed or ambiguous regions remain visible for review, not silently refreshed.
127
+
109
128
  For example, after substituting IDs/tokens from this Route:
110
129
 
111
130
  ```json
@@ -131,29 +150,3 @@ If the user explicitly requires a different presentation, explain the difference
131
150
  and resolve that choice before accepting it. Do not rerun unchanged Repair to
132
151
  force a format the program deliberately omits. Check the actual resulting page;
133
152
  accepted tasks or an empty Composer result alone do not demonstrate a correction.
134
-
135
- ## Changed supporting articles
136
-
137
- `knowledge_input` separates approved interpretation from source-bound facts.
138
- Recheck the relevant interpretation when an upstream article changes; ordinary
139
- revision refreshes its version only after Review. Waiting input does not make
140
- old statements current, and a wording-only edit must retain the review warning.
141
-
142
- For a split, merge or removed upstream, use the existing `context task adjust
143
- --input - --format json` with `instruction` and `knowledge_dependencies`:
144
-
145
- ```json
146
- {"instruction":"Rebind the affected explanation to the approved replacement","knowledge_dependencies":{"dependencies":[{"artifact_ref":"<approved article identity>","section_refs":[],"required":true}]}}
147
- ```
148
-
149
- Select identities from the authorized approved article catalog; do not guess
150
- paths or promote prose into parser facts. Read the new current Route's
151
- `knowledge_input`, then repeat the adjustment with the same dependencies plus
152
- `sections`: each item has the retained `section_key`, selected `fact_refs` and
153
- `evidence_refs`. These are a full support replacement for those sections, not an
154
- append. Use only the supplied replacement facts or still-valid direct facts.
155
- An empty dependency list explicitly removes the old relationship; the remaining
156
- explanation still needs valid direct evidence. Revise the text to match the
157
- selection before submitting. The CLI checks identity, scope and version; the
158
- Agent and Review judge the explanation. Pending upstream approval remains a
159
- concrete task to finish or adjust, not a reason to clear the warning manually.
@@ -11,7 +11,7 @@ Open one report for the complete current candidate set and apply only a payload
11
11
  that matches its collection scope and candidate-set digest.
12
12
 
13
13
  Before Review, Context checks both sides of approved page identity: whether a
14
- candidate path is already owned by another `view_ref` / `node_ref`, and whether
14
+ candidate path is already owned by another `article_id`, and whether
15
15
  the candidate `view_ref` is already approved at another path. Either conflict
16
16
  blocks Review. Follow the returned identity-coordination route: the default
17
17
  mechanical repair preserves the approved identity and approved path, then
@@ -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.
@@ -4,137 +4,36 @@ kind: procedure
4
4
  mediaType: text/markdown
5
5
  ---
6
6
 
7
- # Parallel Partition and Author tasks
8
-
9
- This procedure applies only to a current Partition or Author Action with
10
- `tasks[]`. The Host runs the workers; Context does not launch models. The current
11
- Route, required readings and output schema remain authoritative. Delegation does
12
- not grant source access, approve a Gate or change the accepted scope.
13
-
14
- ## Choose execution once per batch
15
-
16
- Use available native Host delegation only when current user/Host permissions
17
- allow it, at least two independent tasks are ready, and workers can read the
18
- assigned material and return their result without writing files. Respect an
19
- explicit single-Agent preference and Host capacity or budget limits. Do not
20
- install another agent runner, start nested CLI sessions or request broader
21
- permissions just to parallelize. If these conditions are absent, continue the
22
- same batch sequentially without a new user question.
23
-
24
- Resolve any existing scope or human decision before dispatching dependent tasks.
25
- Permission to use multiple Agents does not waive that decision.
26
-
27
- Choose `min(4, ready task count, available worker slots)` concurrent workers,
28
- excluding the coordinator. Use parallel mode only when that value is at least
29
- two. Do not split one task or enlarge a CLI batch to fill slots. Schedule later
30
- tasks from the same batch as workers finish; never prepare the next batch while
31
- this one is active. Known dependencies between tasks require sequential handling
32
- by the coordinator. A worker result never becomes evidence for a peer.
33
-
34
- Tell the user briefly, in their language, how many planning or writing workers
35
- will run when first enabling delegation or changing its concurrency/mode. Reuse
36
- that announcement across unchanged batches. Report a fallback once when it happens. Worker completion is draft
37
- progress; only CLI receipts establish accepted production progress.
38
-
39
- ## Single coordinator and read-only workers
40
-
41
- The coordinator reads the Route, output schema and shared instructions, resolves
42
- existing human decisions, and owns all Context commands, receipts and writes.
43
- Workers consume only their assigned task reading and its authorized shared/detail
44
- files and captured source access. Material requiring CLI preparation is requested
45
- from the coordinator. Never let a worker run `context status`, a materializer,
46
- preview, completion, capture, parser, review, close or build.
47
-
48
- Use a Host read-only worker/tool profile when available. Workers must not run
49
- shell commands, Git, scripts or other tools that can change files or external
50
- state, and must not spawn workers. If the Host cannot honor this boundary, use
51
- single-Agent execution. Workers return results through Host messages; they do
52
- not write even scratch files. If a task cannot fit a complete response within
53
- the Host's output budget, the coordinator handles it sequentially and writes
54
- the payload itself. Do not truncate a result or publish a stub to fit transport.
55
-
56
- The coordinator alone writes the final payload under the workspace's
57
- `.tmp/agent-payloads/`, using a new file for each submission attempt. Never edit
58
- runtime readings or ledgers. This prevents worker file collisions without
59
- depending on filenames, worktrees or the project write lock to isolate them.
60
-
61
- ## Assign and collect
62
-
63
- Use `template.indexer-agent-worker` from the current Route. Bind each assignment
64
- in coordinator memory to the current Route revision, Action `input_digest`,
65
- task manifest, instruction/resource digests and a unique attempt identifier.
66
- Task keys repeat across batches, so `task_key` alone is not an assignment ID.
67
- Copy these values; never compute or repair authority values from prose.
68
-
69
- Send one task entry, its exact Route-provided reading location and applicable
70
- shared instructions, the relevant output schema, and settled reader/scope
71
- decisions. Give enough instruction content or exact resource locations for the
72
- worker to read independently. A parent's reading does not populate a worker's
73
- context or authorize an unread receipt. Do not broadcast the entire batch,
74
- conversation, live repository or sibling task readings.
75
-
76
- Keep a mapping from Host worker ID to assignment attempt. Before dispatch, choose
77
- a finite task deadline supported by the Host (default ten minutes; shorten to
78
- the remaining session budget). Wait using native completion notifications or
79
- bounded waits while continuing user progress updates. A deadline is a Host
80
- execution limit, not a statement that evidence is missing.
81
-
82
- Accept a reply only from the active attempt for that task and only after it is
83
- complete. The worker uses the template's Host reply envelope to echo assignment
84
- identifiers separately from its single `{task_key, result}` entry. Check the Host
85
- worker ID and that binding against the saved assignment;
86
- do not insert coordination metadata into the Context semantic Result. Retain
87
- successful drafts in coordinator memory until the batch is assembled.
88
-
89
- ## Merge and submit
90
-
91
- Reconcile Partition proposals against the settled reader purpose and accepted
92
- subjects, especially overlapping identities, primary member ownership and
93
- unresolved cross-task boundaries. Do not silently rename a subject or discard a
94
- member to make proposals fit. Resolve disagreements from authorized material
95
- in the coordinator; use the current schema's unresolved outcome when necessary.
96
-
97
- For Author, review consistency with the accepted page plans, evidence boundaries
98
- and reader terminology. A task may contain several planned articles: assign the
99
- whole task, not independent writers for its sections or articles. CLI performs
100
- the existing schema, ownership, reference and coverage validation.
101
-
102
- Assemble one entry per current task in task-key order, keeping the normal
103
- single-Agent output shape. Use the current Author preview when needed, then
104
- submit the complete batch once through the saved revision-bound command. Do not
105
- submit as each worker finishes or turn Host errors into `unsupported`,
106
- `catalog-only` or empty semantic results. Resolve unfinished work locally first.
107
-
108
- Finish or revoke every active assignment before any command that may change the batch or its material.
109
- Do not poll status merely to check workers. The revision-bound CLI command is
110
- the final freshness check; if an external change is observed, invalidate the
111
- assignments and obtain the current Route before submitting.
112
-
113
- ## Failures and sequential fallback
114
-
115
- | Event | Coordinator action |
116
- | --- | --- |
117
- | Delegation unavailable, denied, or capacity below two before dispatch | Execute the batch sequentially. Do not retry permission prompts or simulate workers. |
118
- | Spawn failure, rate limit, timeout, tool failure, context loss or truncated reply | Stop dispatching for this batch. Revoke the failed attempt, cancel/close it if supported, and finish that task and unassigned tasks sequentially. Let healthy read-only peers finish within their deadlines. |
119
- | Missing/foreign task key, wrong attempt/revision, malformed or incomplete result | Discard that reply; take over its task sequentially using the original authorized input. Do not repeatedly respawn or treat the draft as committed. |
120
- | Conflicting proposals | Reconcile affected tasks in the coordinator; preserve unaffected drafts. Unresolved scope decisions follow the existing human Gate. |
121
- | Worker attempts a write, unauthorized tool or source access | Revoke all workers and stop parallel dispatch. Inspect any reported effects before continuing. If workspace integrity or authority is uncertain, follow current recovery guidance or report the concrete blocker. |
122
- | Route, task set or material binding changes | Revoke old attempts; discard incompatible drafts and follow the fresh Route. Never relabel an old reply with new digests or task keys. |
123
- | CLI accepts only part of a submission | Read `outcomes` and the returned next Route/task-only retry. Preserve committed peers; repair only the returned unfinished tasks sequentially. |
124
- | Completion reply is lost or next preparation fails | Inspect current status or the supplied recovery command before retrying. Accepted tasks may already be saved; never blindly replay the payload. |
125
- | Project write lock is held | Wait for the active writer using existing recovery guidance. Never remove its lock or launch another writer. |
126
-
127
- Revocation means marking the attempt inactive before taking over. Ignore all late
128
- replies, even if cancellation is unsupported. Such workers remain read-only;
129
- do not reuse their slots until the Host confirms termination. Do not start a
130
- new parallel batch while revoked workers are still active. A revoked read-only
131
- worker does not block the coordinator's sequential takeover or completion;
132
- its obsolete reply can no longer be accepted. If its read-only boundary is in
133
- doubt, use the violation handling above instead. After any execution
134
- failure, keep the rest of this batch sequential and reassess capability only at
135
- the next fresh batch. A user request to stay single-Agent persists.
136
-
137
- Sequential fallback preserves evidence, scope, review and completion requirements.
138
- If the coordinator also cannot complete the task, retain drafts and report the
139
- actual missing material, permission or Host limit through the existing workflow.
140
- Do not clear runtime state, widen sources or lower coverage to force progress.
7
+ # Coordinate issued batch directories
8
+
9
+ CLI owns stage boundaries and determines which batches are eligible. The Agent
10
+ chooses how to finish the issued work. Enable `--multi-agent` only when this host
11
+ can coordinate child Agents and current permissions allow them. Otherwise use
12
+ the default single batch; do not simulate workers or seek extra permissions just
13
+ to parallelize. A capability declaration does not waive any user decision.
14
+
15
+ Assign disjoint output directories from the issued batches. Give each worker
16
+ its task goals, relevant shared guidance, authorized source entrypoints and
17
+ designated draft paths. Workers can read source text and write their assigned
18
+ drafts. They do not change CLI-owned materials, formal articles, shared runtime
19
+ state or a peer's drafts. One coordinator submits to Context and performs all
20
+ shared-state CLI writes; workers return completed paths and unresolved issues.
21
+
22
+ The host's capacity and the tasks determine scheduling; there is no fixed worker
23
+ count, mandatory attempt ledger or new handoff schema. Use host completion
24
+ notifications and ordinary bounded waits. Do not poll full Context status to
25
+ check worker progress, or confuse a finished draft with a received article.
26
+
27
+ The coordinator checks the outputs against their tasks, resolves cross-article
28
+ terminology and source ambiguity where needed, and submits any completed subset
29
+ through the stage file contract. Keep task input handles as supplied by CLI.
30
+ Do not require every worker to finish before submitting independent work.
31
+
32
+ If a worker fails or loses context, retain completed files and take over or
33
+ redispatch only its unfinished work. Stop the old worker before another writer
34
+ uses the same output paths, and ignore late results from revoked work. Ordinary
35
+ host errors are not source exclusions or evidence that a task is complete.
36
+
37
+ When capability is unavailable, omit `--multi-agent` on the next call. Already
38
+ issued tasks and drafts stay valid. Source changes or task replacement use the
39
+ CLI's existing task-local refresh and repair protocol, not skill-version checks.
@@ -0,0 +1,61 @@
1
+ ---
2
+ id: procedure.production-requirements
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Long-term production requirements
8
+
9
+ Use the reader purpose and source boundaries already confirmed by the user.
10
+ Ask for missing decisions before writing; registering a source does not authorize
11
+ unrelated modules. This is not the work-start report: the report follows the
12
+ lightweight investigation and must still wait for user feedback.
13
+
14
+ Write `src/indexers.yaml` with this minimal shape, replacing the example values
15
+ with the user's actual purpose and registered source reference:
16
+
17
+ ```yaml
18
+ requirements:
19
+ - id: service-readers
20
+ purpose: Explain the service responsibilities and supported usage
21
+ target_scope:
22
+ targets:
23
+ - source_ref: repo:service
24
+ ```
25
+
26
+ Optional long-term decisions are `reader_goals` and `questions` (text lists),
27
+ `coverage_domains` (domain to `required`, `optional` or `out-of-scope`), and
28
+ `evidence_source_scope` with the same `targets` shape for authorized supporting
29
+ sources. Existing `module_refs` are reading focus, not a module-to-path permission
30
+ map. Use an ordinary task brief for relevant directories; no additional module
31
+ mapping or scope receipt is required.
32
+
33
+ An explicit exclusion belongs inside its requirement:
34
+
35
+ ```yaml
36
+ exclusions:
37
+ - scope:
38
+ targets:
39
+ - source_ref: repo:service
40
+ paths: [generated]
41
+ reason: Generated outputs are outside the requested reader purpose
42
+ ```
43
+
44
+ `paths` contains exact source-relative files or directories, not glob patterns;
45
+ omit it only for a confirmed exclusion of the whole selected source scope.
46
+ Do not automatically exclude something merely because it is large or costly.
47
+
48
+ Do not add Provider selections, versions, hashes, run identifiers, candidate
49
+ receipts or task assignments. Those are not long-term requirements. Skills and
50
+ writing batches are declared in the temporary investigation plan.
51
+
52
+ After editing, run `context status --format json` and consume its current Route.
53
+
54
+ When article targets and source grouping are already clear, put the existing
55
+ plan fields (`capabilities`, `articles`, optional `indexer_usage`) in a file under
56
+ `.tmp/agent-work/`, omitting only `stage`, which does not exist yet. Each article
57
+ contains `path`, `question`, `sources` and `batch`, with optional `brief` and
58
+ `after`. Add `--input <that-file>` to the returned `action prepare-current`
59
+ command to prepare those tasks without a separate investigation-plan submission.
60
+ This does not approve the report or permit writing before user feedback.
61
+ When targets are unclear, use normal preparation and investigate the skeletons.
@@ -0,0 +1,57 @@
1
+ ---
2
+ id: procedure.production-stage-files
3
+ kind: procedure
4
+ mediaType: text/markdown
5
+ ---
6
+
7
+ # Production stage files
8
+
9
+ The stage entry links CLI-owned requirements, planned skill guidance and task
10
+ directories. Read relevant source text before writing; a skeleton is navigation,
11
+ not semantic evidence. Skill names guide work, not article ownership or versions.
12
+
13
+ Choose relevant code directories while planning or writing. A task brief may
14
+ name useful reading scope; module labels do not imply directory permissions.
15
+ No module mapping file, version receipt or article-level scope fields are needed.
16
+ Read related code as needed within the user's authorized sources.
17
+
18
+ Write results under the returned Agent directory. All submission paths are
19
+ relative to that stage directory, even when the manifest is in `submissions/`.
20
+ Copy the CLI's submission template, keep completed tasks only, and keep each
21
+ task's prefilled `input`. Submit the manifest using the returned command.
22
+ Do not edit submitted files until the command returns.
23
+
24
+ A complete article uses `content` (Markdown) and `references` (YAML/JSON).
25
+ Markdown has reader-facing title and description frontmatter, followed by the
26
+ complete article with stable `context:section` markers. References contain
27
+ `sections`, each with its matching `id` and `references` list. A reference is
28
+ `source_ref` plus `locator: {path, start_line, end_line}` from actual authorized
29
+ text. CLI computes source digests. A fragment may cite at most three distinct
30
+ source positions; an article may have multiple fragments.
31
+
32
+ A revision uses `edits` instead of `content`/`references`. The file contains an
33
+ `edits` list. Each item maps `replace: [old-fragment-ids]` to `with: [...]`, whose
34
+ entries contain `id` and the changed `markdown` and/or `references`.
35
+ Omitted fields retain the previous value only for the same fragment identity.
36
+ New identities require both fields. Empty `with` deletes the named fragments.
37
+ A split or merge explicitly names old and new identities; merging cannot
38
+ silently delete intervening article text. Insert with empty `replace` and
39
+ `after: <existing-id>`, or `after: null` before the first fragment.
40
+ Fragment Markdown excludes its outer markers, which CLI generates.
41
+
42
+ The same edits format can repair a failed complete draft retained temporarily
43
+ by CLI. If that draft is missing or structurally unusable, resubmit a corrected
44
+ complete article. Failed tasks report a file/fragment when available; accepted
45
+ tasks remain saved even if preparation of the next directory fails.
46
+
47
+ The default is one batch. Supply `--multi-agent` only when this caller supports
48
+ coordinating multiple batch directories. Omitting it safely downgrades scheduling
49
+ without invalidating already-issued tasks or overwriting worker drafts.
50
+
51
+ If the user explicitly asks to receive completed articles before the remaining
52
+ work finishes, run `context run --deliver --format json`. This pauses writing,
53
+ not approval: follow the returned Review, close and build routes. A successful
54
+ build resumes the same stage; a failed build retains the pause and all tasks.
55
+ To cancel that pause explicitly, use `context run --resume-writing --format json`.
56
+ It preserves approved articles, candidates and existing task input handles.
57
+ Partial delivery must include the approved articles needed by its local links.
@@ -10,16 +10,14 @@ A source boundary is a user decision about which repositories, modules, or
10
10
  documents may become approved knowledge. It affects extraction scope,
11
11
  provenance, output paths, and freshness checks.
12
12
 
13
- For the first production task in a newly initialized workspace, source
14
- registration is the boundary after work-start intake. Read the required work-start
15
- procedure and template, treat a supplied checklist as task guidance, read batch
16
- metadata titles under that procedure's limits and fallback without fetching bodies
17
- or outlines, resolve the required information,
18
- present the completed report and wait for user feedback before preparing this
19
- action's payload. Do not start registration, capture or extraction while any start
20
- condition remains unresolved. The payload must carry the report path required by
21
- the current schema; the CLI verifies the report exists and records its digest but
22
- does not judge its prose or infer decisions from it.
13
+ For the first production task, confirm the reader purpose and authorized material
14
+ scope, reusing choices already explicit in the conversation. A supplied checklist
15
+ is task guidance unless the user also selects it as source material. Register and
16
+ capture the confirmed sources so lightweight investigation can produce code
17
+ skeletons and document overviews. The formal work-start report belongs after that
18
+ investigation and planning, before bulk writing; its presence or digest is never
19
+ source-registration evidence or user approval. Do not broaden source authorization
20
+ while gathering the plan.
23
21
 
24
22
  Do not infer this boundary by using the current directory, monorepo layout,
25
23
  package names, or Git remotes to select additional sources. Once the user has named a concrete local module
@@ -21,28 +21,23 @@ its progress is changing. Never start a competing writer or delete a writer lock
21
21
  the recorded effect, then apply its digest when completion of those writes is
22
22
  authorized. This finishes prior writes and may touch approved knowledge; it is
23
23
  not draft rollback. Invalid journals or unclear ownership require escalation.
24
- - Failed Author work: preview `task recover --operation author --workset <digest...>
25
- --instruction <concrete correction> --format json`. Explicit article dependencies
26
- can expand the affected worksets. Read the entire affected scope before applying.
27
- - Restore the active accepted planning baseline: use `--operation plan` with the
28
- same selection/instruction arguments. The checkpoint contains references to the
29
- already stored immutable requests, not copies of all source or parser data. It
30
- is available only after structure acceptance and is removed by lifecycle cleanup.
31
- A changed registered source/configuration/approved-knowledge baseline prevents
32
- restoration; use normal revision or replan instead. It does not recover deleted
33
- runtime data from Git or choose arbitrary historical versions.
24
+ - Failed writing: repair the reported article or fragment in the current stage
25
+ directory and resubmit its files. Accepted peers remain valid. If the selected
26
+ article has already been accepted, use its ordinary `context revise` action.
27
+ - Changed materials or plan: use the current preparation or plan-amendment route.
28
+ There is no separate workset/accepted-plan restoration operation. If temporary
29
+ state has been removed, begin a new production run from formal content and
30
+ long-term requirements; do not reconstruct old candidates or process state.
34
31
 
35
- The preview lists affected worksets and discarded candidates. Within an explicit
36
- repair task or delegated authorization covering those unfinished drafts, explain
37
- that scope and apply without another ritual approval. Obtain a decision only if
38
- the expanded scope discards work outside that authorization. Never treat a digest
39
- as permission to undo published knowledge. CLI validates mechanical identities,
32
+ The transaction preview lists affected files and previously started writes.
33
+ Complete them only within existing authorization. Never treat a digest as
34
+ permission to undo published knowledge. CLI checks current task identities,
40
35
  references and transaction consistency; the Agent diagnoses prose and planning.
41
36
 
42
- A repair changes request identities, archives replaced local draft/projection state,
43
- and preserves approved pages, menu, sources and existing packages. Read the fresh
44
- Route after success; do not reuse old task keys/results. Unrelated accepted results
45
- stay valid. Rebuilding whole-batch projections is not re-authoring their content.
37
+ A task refresh may change its input identity; use the refreshed files and receipt.
38
+ Ordinary failed-draft repair retains the task when its inputs are unchanged.
39
+ Approved pages, navigation, sources and existing packages are not discarded by
40
+ inspection. Unrelated accepted results stay valid.
46
41
  Do not silently exclude a failing module, weaken evidence or mark unfinished work
47
42
  complete to escape an error.
48
43
 
@@ -50,7 +45,7 @@ complete to escape an error.
50
45
 
51
46
  If the same cause persists after a correction without new evidence, do not repeat
52
47
  the same operation. Try a different supported recovery only when its prerequisites
53
- and effect justify it. If the ledger/checkpoint is unreadable, ownership cannot be
48
+ and effect justify it. If the current stage is unreadable, ownership cannot be
54
49
  established, the baseline changed, or a CLI defect prevents safe recovery, retain
55
50
  current work and write `issue/YYYY-MM-DD-short-description.md` using
56
51
  [the issue template](../templates/recovery-issue.md). Use the user's local date and