@c4a/context-cli 0.6.19 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/README.md +67 -6
  2. package/README.zh-CN.md +42 -5
  3. package/cli.js +75051 -42154
  4. package/indexers/bundles/context-code-indexer/SKILL.md +20 -0
  5. package/indexers/bundles/context-code-indexer/context-indexer.yaml +230 -0
  6. package/indexers/bundles/context-code-indexer/references/composers/contracts-and-chains.md +23 -0
  7. package/indexers/bundles/context-code-indexer/references/composers/cross-module-chain.md +22 -0
  8. package/indexers/bundles/context-code-indexer/references/composers/development-and-delivery.md +22 -0
  9. package/indexers/bundles/context-code-indexer/references/composers/event-flow.md +21 -0
  10. package/indexers/bundles/context-code-indexer/references/composers/examples-and-documentation.md +22 -0
  11. package/indexers/bundles/context-code-indexer/references/composers/persistence-boundary.md +21 -0
  12. package/indexers/bundles/context-code-indexer/references/composers/protocol-boundary.md +22 -0
  13. package/indexers/bundles/context-code-indexer/references/composers/public-contract.md +23 -0
  14. package/indexers/bundles/context-code-indexer/references/indexer.md +49 -0
  15. package/indexers/bundles/context-code-indexer/references/metrics.md +201 -0
  16. package/indexers/bundles/context-code-indexer/templates/adapter-integration.md +119 -0
  17. package/indexers/bundles/context-code-indexer/templates/api-service.md +118 -0
  18. package/indexers/bundles/context-code-indexer/templates/background-runtime.md +109 -0
  19. package/indexers/bundles/context-code-indexer/templates/cli-tool.md +129 -0
  20. package/indexers/bundles/context-code-indexer/templates/component-library.md +99 -0
  21. package/indexers/bundles/context-code-indexer/templates/contract-source.md +73 -0
  22. package/indexers/bundles/context-code-indexer/templates/data-sync-reconciliation.md +77 -0
  23. package/indexers/bundles/context-code-indexer/templates/derived-generated-source.md +117 -0
  24. package/indexers/bundles/context-code-indexer/templates/domain-service.md +109 -0
  25. package/indexers/bundles/context-code-indexer/templates/event-consumer.md +62 -0
  26. package/indexers/bundles/context-code-indexer/templates/gateway-facade.md +89 -0
  27. package/indexers/bundles/context-code-indexer/templates/monorepo-container.md +124 -0
  28. package/indexers/bundles/context-code-indexer/templates/plugin-extension.md +52 -0
  29. package/indexers/bundles/context-code-indexer/templates/sdk-library.md +132 -0
  30. package/indexers/bundles/context-code-indexer/templates/storage-repository.md +56 -0
  31. package/indexers/bundles/context-code-indexer/templates/web-application.md +146 -0
  32. package/indexers/bundles/context-code-indexer/tests/fixtures/chapters.json +226 -0
  33. package/indexers/bundles/context-code-indexer/tests/fixtures/composers.json +82 -0
  34. package/indexers/bundles/context-code-indexer/tests/fixtures/profiles.json +210 -0
  35. package/indexers/bundles/context-code-indexer/tests/fixtures/scenarios.json +122 -0
  36. package/indexers/bundles/context-markdown-indexer/SKILL.md +20 -0
  37. package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +147 -0
  38. package/indexers/bundles/context-markdown-indexer/references/classification.md +63 -0
  39. package/indexers/bundles/context-markdown-indexer/references/editorial-policy.md +106 -0
  40. package/indexers/bundles/context-markdown-indexer/references/indexer.md +23 -0
  41. package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +146 -0
  42. package/indexers/bundles/context-markdown-indexer/references/structure-and-artifacts.md +109 -0
  43. package/indexers/bundles/context-markdown-indexer/tests/fixtures/anonymous.json +31 -0
  44. package/indexers/bundles/context-markdown-indexer/tests/fixtures/editorial.json +309 -0
  45. package/indexers/bundles/context-markdown-indexer/tests/fixtures/migration-equivalence.json +186 -0
  46. package/indexers/bundles/context-markdown-indexer/tests/fixtures/profiles.json +171 -0
  47. package/indexers/bundles/context-markdown-indexer/tests/fixtures/routing.json +151 -0
  48. package/indexers/capability-manifest.json +40 -0
  49. package/indexers/contracts/hard-rule-conformance.json +2644 -0
  50. package/indexers/contracts/operator-contract.json +35 -0
  51. package/indexers/contracts/profile-contract.json +10162 -0
  52. package/indexers/release-manifest.json +208 -0
  53. package/package.json +5 -4
  54. package/plugins/README.md +17 -109
  55. package/plugins/README_CN.md +11 -89
  56. package/plugins/VERSION +1 -1
  57. package/plugins/claude/.claude-plugin/plugin.json +3 -11
  58. package/plugins/claude/CLAUDE.md +1 -1
  59. package/plugins/claude/README.md +1 -1
  60. package/plugins/claude/commands/context.md +76 -1
  61. package/plugins/codex/.codex-plugin/plugin.json +6 -17
  62. package/plugins/codex/AGENTS.md +1 -1
  63. package/plugins/codex/README.md +1 -1
  64. package/plugins/codex/skills/context/SKILL.md +77 -13
  65. package/plugins/cursor/.cursor-plugin/plugin.json +4 -17
  66. package/plugins/cursor/AGENTS.md +1 -1
  67. package/plugins/cursor/README.md +3 -2
  68. package/plugins/cursor/commands/c4a-context.md +76 -3
  69. package/plugins/skills/{c4a-context → context}/SKILL.md +78 -14
  70. package/plugins/skills/context-code-indexer/SKILL.md +20 -0
  71. package/plugins/skills/context-code-indexer/context-indexer.yaml +230 -0
  72. package/plugins/skills/context-code-indexer/references/composers/contracts-and-chains.md +23 -0
  73. package/plugins/skills/context-code-indexer/references/composers/cross-module-chain.md +22 -0
  74. package/plugins/skills/context-code-indexer/references/composers/development-and-delivery.md +22 -0
  75. package/plugins/skills/context-code-indexer/references/composers/event-flow.md +21 -0
  76. package/plugins/skills/context-code-indexer/references/composers/examples-and-documentation.md +22 -0
  77. package/plugins/skills/context-code-indexer/references/composers/persistence-boundary.md +21 -0
  78. package/plugins/skills/context-code-indexer/references/composers/protocol-boundary.md +22 -0
  79. package/plugins/skills/context-code-indexer/references/composers/public-contract.md +23 -0
  80. package/plugins/skills/context-code-indexer/references/indexer.md +49 -0
  81. package/plugins/skills/context-code-indexer/references/metrics.md +201 -0
  82. package/plugins/skills/context-code-indexer/templates/adapter-integration.md +119 -0
  83. package/plugins/skills/context-code-indexer/templates/api-service.md +118 -0
  84. package/plugins/skills/context-code-indexer/templates/background-runtime.md +109 -0
  85. package/plugins/skills/context-code-indexer/templates/cli-tool.md +129 -0
  86. package/plugins/skills/context-code-indexer/templates/component-library.md +99 -0
  87. package/plugins/skills/context-code-indexer/templates/contract-source.md +73 -0
  88. package/plugins/skills/context-code-indexer/templates/data-sync-reconciliation.md +77 -0
  89. package/plugins/skills/context-code-indexer/templates/derived-generated-source.md +117 -0
  90. package/plugins/skills/context-code-indexer/templates/domain-service.md +109 -0
  91. package/plugins/skills/context-code-indexer/templates/event-consumer.md +62 -0
  92. package/plugins/skills/context-code-indexer/templates/gateway-facade.md +89 -0
  93. package/plugins/skills/context-code-indexer/templates/monorepo-container.md +124 -0
  94. package/plugins/skills/context-code-indexer/templates/plugin-extension.md +52 -0
  95. package/plugins/skills/context-code-indexer/templates/sdk-library.md +132 -0
  96. package/plugins/skills/context-code-indexer/templates/storage-repository.md +56 -0
  97. package/plugins/skills/context-code-indexer/templates/web-application.md +146 -0
  98. package/plugins/skills/context-code-indexer/tests/fixtures/chapters.json +226 -0
  99. package/plugins/skills/context-code-indexer/tests/fixtures/composers.json +82 -0
  100. package/plugins/skills/context-code-indexer/tests/fixtures/profiles.json +210 -0
  101. package/plugins/skills/context-code-indexer/tests/fixtures/scenarios.json +122 -0
  102. package/plugins/skills/context-markdown-indexer/SKILL.md +20 -0
  103. package/plugins/skills/context-markdown-indexer/context-indexer.yaml +147 -0
  104. package/plugins/skills/context-markdown-indexer/references/classification.md +63 -0
  105. package/plugins/skills/context-markdown-indexer/references/editorial-policy.md +106 -0
  106. package/plugins/skills/context-markdown-indexer/references/indexer.md +23 -0
  107. package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +146 -0
  108. package/plugins/skills/context-markdown-indexer/references/structure-and-artifacts.md +109 -0
  109. package/plugins/skills/context-markdown-indexer/tests/fixtures/anonymous.json +31 -0
  110. package/plugins/skills/context-markdown-indexer/tests/fixtures/editorial.json +309 -0
  111. package/plugins/skills/context-markdown-indexer/tests/fixtures/migration-equivalence.json +186 -0
  112. package/plugins/skills/context-markdown-indexer/tests/fixtures/profiles.json +171 -0
  113. package/plugins/skills/context-markdown-indexer/tests/fixtures/routing.json +151 -0
  114. package/providers/context/actions/accept-main-index-run.yaml +7 -0
  115. package/providers/context/actions/accept-material-answer-run.yaml +7 -0
  116. package/providers/context/actions/accept-post-author-composer-run.yaml +7 -0
  117. package/providers/context/actions/actualize-material-answer-bindings.yaml +8 -0
  118. package/providers/context/actions/apply-document-optimization-guidance.yaml +5 -0
  119. package/providers/context/actions/apply-indexer-project.yaml +7 -0
  120. package/providers/context/actions/audit-material-gap-state.yaml +8 -0
  121. package/providers/context/actions/audit-projected-artifact-fan-out.yaml +8 -0
  122. package/providers/context/actions/authorize-indexer-contract-overlay.yaml +7 -0
  123. package/providers/context/actions/authorize-indexer-dependencies.yaml +7 -0
  124. package/providers/context/actions/authorize-indexer-program-execution.yaml +7 -0
  125. package/providers/context/actions/build-main-index-author-worksets.yaml +7 -0
  126. package/providers/context/actions/build-main-index-catalog-fallback.yaml +7 -0
  127. package/providers/context/actions/build-main-index-partition-worksets.yaml +7 -0
  128. package/providers/context/actions/build-material-question-workset.yaml +7 -0
  129. package/providers/context/actions/build-post-author-composer-worksets.yaml +7 -0
  130. package/providers/context/actions/build-question-target-inventory.yaml +7 -0
  131. package/providers/context/actions/build-subject-catalog.yaml +7 -0
  132. package/providers/context/actions/build-target-resolution-views.yaml +7 -0
  133. package/providers/context/actions/checkpoint-material-answer-review.yaml +8 -0
  134. package/providers/context/actions/checkpoint-material-gaps.yaml +8 -0
  135. package/providers/context/actions/close-indexer-approved-knowledge.yaml +8 -0
  136. package/providers/context/actions/compile-indexer-candidates.yaml +8 -0
  137. package/providers/context/actions/compose-indexer-post-author-fragments.yaml +7 -0
  138. package/providers/context/actions/configure-community-indexer-fallback.yaml +6 -0
  139. package/providers/context/actions/configure-indexer-providers.yaml +6 -0
  140. package/providers/context/actions/confirm-index-requirement-workset.yaml +8 -0
  141. package/providers/context/actions/confirm-subject-reidentification.yaml +8 -0
  142. package/providers/context/actions/converge-main-index-partition-run.yaml +7 -0
  143. package/providers/context/actions/discover-markdown-indexer-providers.yaml +6 -0
  144. package/providers/context/actions/evaluate-material-gaps.yaml +8 -0
  145. package/providers/context/actions/fail-main-index-run.yaml +7 -0
  146. package/providers/context/actions/fail-material-answer-run.yaml +7 -0
  147. package/providers/context/actions/fail-post-author-composer-run.yaml +7 -0
  148. package/providers/context/actions/inspect-index-candidate-review-readiness.yaml +8 -0
  149. package/providers/context/actions/inspect-index-profile-failure.yaml +7 -0
  150. package/providers/context/actions/inspect-indexer-dependencies.yaml +7 -0
  151. package/providers/context/actions/inspect-indexer-program-execution.yaml +7 -0
  152. package/providers/context/actions/inspect-indexer-project-proposal.yaml +7 -0
  153. package/providers/context/actions/inspect-markdown-provider-capture.yaml +7 -0
  154. package/providers/context/actions/inspect-material-answer-review.yaml +8 -0
  155. package/providers/context/actions/materialize-indexer-instructions.yaml +7 -0
  156. package/providers/context/actions/observe-indexer-project.yaml +7 -0
  157. package/providers/context/actions/observe-main-index-run-ledger.yaml +7 -0
  158. package/providers/context/actions/observe-material-answer-runs.yaml +7 -0
  159. package/providers/context/actions/observe-post-author-composer-worksets.yaml +7 -0
  160. package/providers/context/actions/override-index-profile-audit.yaml +7 -0
  161. package/providers/context/actions/prepare-indexer-customization-project.yaml +7 -0
  162. package/providers/context/actions/prepare-main-index-run-ledger.yaml +7 -0
  163. package/providers/context/actions/prepare-material-answer-runs.yaml +7 -0
  164. package/providers/context/actions/propose-indexer-customization.yaml +7 -0
  165. package/providers/context/actions/propose-overlay-question-amendment.yaml +7 -0
  166. package/providers/context/actions/rebind-indexer-selection-to-requirement.yaml +7 -0
  167. package/providers/context/actions/reconcile-indexer-results.yaml +7 -0
  168. package/providers/context/actions/record-index-profile-revision.yaml +7 -0
  169. package/providers/context/actions/report-index-profile-failure.yaml +7 -0
  170. package/providers/context/actions/report-indexer-incremental-impact.yaml +8 -0
  171. package/providers/context/actions/resolve-effective-composers.yaml +7 -0
  172. package/providers/context/actions/review-material-answer-candidate.yaml +8 -0
  173. package/providers/context/actions/revise-index-output.yaml +7 -0
  174. package/providers/context/actions/route-index-requirement-confirmation.yaml +8 -0
  175. package/providers/context/actions/route-indexer-provider-selection.yaml +7 -0
  176. package/providers/context/actions/run-indexer-agent-step.yaml +7 -0
  177. package/providers/context/actions/run-indexer-post-author-composer.yaml +7 -0
  178. package/providers/context/actions/run-material-answer-indexers.yaml +7 -0
  179. package/providers/context/actions/start-main-index-run.yaml +7 -0
  180. package/providers/context/actions/start-material-answer-run.yaml +7 -0
  181. package/providers/context/actions/start-post-author-composer-run.yaml +7 -0
  182. package/providers/context/actions/validate-indexer-contract-overlays.yaml +7 -0
  183. package/providers/context/actions/validate-indexer-customization.yaml +7 -0
  184. package/providers/context/actions/validate-indexer-selection-proposal.yaml +7 -0
  185. package/providers/context/actions/validate-main-index-run.yaml +7 -0
  186. package/providers/context/actions/validate-markdown-provider-selection.yaml +7 -0
  187. package/providers/context/actions/validate-subject-key-schemas.yaml +8 -0
  188. package/providers/context/codes.yaml +70 -0
  189. package/providers/context/graphs/indexer.yaml +1068 -0
  190. package/providers/context/graphs/workspace.yaml +20 -1
  191. package/providers/context/manifest.json +1433 -121
  192. package/providers/context/provider.yaml +3 -2
  193. package/providers/context/resources/manuals/reference/code-extractors.md +2 -2
  194. package/providers/context/resources/manuals/reference/project-api.md +2 -2
  195. package/providers/context/resources/procedures/code-extraction.md +6 -2
  196. package/providers/context/resources/procedures/code-index-audit.md +36 -6
  197. package/providers/context/resources/procedures/document-optimization.md +23 -4
  198. package/providers/context/resources/semantic/code-index/templates/adapter.md +9 -0
  199. package/providers/context/resources/semantic/code-index/templates/contracts-and-chains.md +81 -0
  200. package/providers/context/resources/views/resolved-indexer-instructions.yaml +23 -0
  201. package/providers/context/schemas/document-optimization-decisions.schema.json +1 -1
  202. package/providers/context/schemas/indexer-agent-step-input.schema.json +30 -0
  203. package/providers/context/schemas/indexer-agent-step-result.schema.json +47 -0
  204. package/providers/context/schemas/indexer-candidate-compile-input.schema.json +57 -0
  205. package/providers/context/schemas/indexer-candidate-compile-output.schema.json +38 -0
  206. package/providers/context/schemas/indexer-candidate-review-readiness-input.schema.json +46 -0
  207. package/providers/context/schemas/indexer-candidate-review-readiness-output.schema.json +104 -0
  208. package/providers/context/schemas/indexer-contract-overlay-authorization-input.schema.json +32 -0
  209. package/providers/context/schemas/indexer-contract-overlay-authorization-result.schema.json +121 -0
  210. package/providers/context/schemas/indexer-contract-overlay-validation-input.schema.json +90 -0
  211. package/providers/context/schemas/indexer-contract-overlay-validation-result.schema.json +158 -0
  212. package/providers/context/schemas/indexer-customization-project-preparation-result.schema.json +44 -0
  213. package/providers/context/schemas/indexer-customization-proposal-draft.schema.json +83 -0
  214. package/providers/context/schemas/indexer-customization-validation-result.schema.json +36 -0
  215. package/providers/context/schemas/indexer-dependency-authorization-input.schema.json +71 -0
  216. package/providers/context/schemas/indexer-dependency-authorization-result.schema.json +138 -0
  217. package/providers/context/schemas/indexer-incremental-impact-input.schema.json +31 -0
  218. package/providers/context/schemas/indexer-incremental-impact-output.schema.json +52 -0
  219. package/providers/context/schemas/indexer-main-lifecycle-input.schema.json +187 -0
  220. package/providers/context/schemas/indexer-main-lifecycle-output.schema.json +180 -0
  221. package/providers/context/schemas/indexer-markdown-provider-capture-input.schema.json +17 -0
  222. package/providers/context/schemas/indexer-markdown-provider-capture-output.schema.json +54 -0
  223. package/providers/context/schemas/indexer-markdown-provider-validation-input.schema.json +34 -0
  224. package/providers/context/schemas/indexer-markdown-provider-validation-output.schema.json +75 -0
  225. package/providers/context/schemas/indexer-material-answer-lifecycle-input.schema.json +90 -0
  226. package/providers/context/schemas/indexer-material-answer-lifecycle-output.schema.json +80 -0
  227. package/providers/context/schemas/indexer-material-answer-review-inspection-input.schema.json +32 -0
  228. package/providers/context/schemas/indexer-material-answer-review-inspection-output.schema.json +32 -0
  229. package/providers/context/schemas/indexer-material-answer-review-resolution-input.schema.json +19 -0
  230. package/providers/context/schemas/indexer-material-answer-review-resolution-output.schema.json +87 -0
  231. package/providers/context/schemas/indexer-material-gap-lifecycle-input.schema.json +86 -0
  232. package/providers/context/schemas/indexer-material-gap-lifecycle-output.schema.json +19 -0
  233. package/providers/context/schemas/indexer-materialize-request.schema.json +53 -0
  234. package/providers/context/schemas/indexer-materialized-resource.schema.json +57 -0
  235. package/providers/context/schemas/indexer-overlay-question-amendment.schema.json +13 -0
  236. package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +40 -0
  237. package/providers/context/schemas/indexer-overlay-question-rebind-input.schema.json +35 -0
  238. package/providers/context/schemas/indexer-overlay-question-rebind-result.schema.json +25 -0
  239. package/providers/context/schemas/indexer-post-author-fragment-request.schema.json +26 -0
  240. package/providers/context/schemas/indexer-post-author-fragment-result.schema.json +18 -0
  241. package/providers/context/schemas/indexer-post-author-lifecycle-input.schema.json +94 -0
  242. package/providers/context/schemas/indexer-post-author-lifecycle-output.schema.json +72 -0
  243. package/providers/context/schemas/indexer-profile-failure-inspection-input.schema.json +13 -0
  244. package/providers/context/schemas/indexer-profile-failure-inspection-result.schema.json +19 -0
  245. package/providers/context/schemas/indexer-profile-failure-report-input.schema.json +22 -0
  246. package/providers/context/schemas/indexer-profile-failure-report-result.schema.json +49 -0
  247. package/providers/context/schemas/indexer-profile-override-decision.schema.json +20 -0
  248. package/providers/context/schemas/indexer-profile-override-result.schema.json +49 -0
  249. package/providers/context/schemas/indexer-profile-revision-agent-input.schema.json +18 -0
  250. package/providers/context/schemas/indexer-profile-revision-record-input.schema.json +31 -0
  251. package/providers/context/schemas/indexer-profile-revision-record-result.schema.json +45 -0
  252. package/providers/context/schemas/indexer-program-execution-authorization-input.schema.json +145 -0
  253. package/providers/context/schemas/indexer-program-execution-authorization-result.schema.json +60 -0
  254. package/providers/context/schemas/indexer-project-action-result.schema.json +19 -0
  255. package/providers/context/schemas/indexer-project-gate-input.schema.json +100 -0
  256. package/providers/context/schemas/indexer-project-observation-input.schema.json +16 -0
  257. package/providers/context/schemas/indexer-project-observation-result.schema.json +42 -0
  258. package/providers/context/schemas/indexer-provider-route-input.schema.json +55 -0
  259. package/providers/context/schemas/indexer-provider-route-report.schema.json +188 -0
  260. package/providers/context/schemas/indexer-requirement-confirmation-input.schema.json +27 -0
  261. package/providers/context/schemas/indexer-requirement-confirmation-output.schema.json +24 -0
  262. package/providers/context/schemas/indexer-result-reconciliation-input.schema.json +59 -0
  263. package/providers/context/schemas/indexer-result-reconciliation-output.schema.json +43 -0
  264. package/providers/context/schemas/indexer-selection-proposal-input.schema.json +12 -0
  265. package/providers/context/schemas/indexer-selection-proposal-validation.schema.json +23 -0
  266. package/providers/context/schemas/indexer-subject-reidentification-input.schema.json +37 -0
  267. package/providers/context/schemas/indexer-subject-reidentification-output.schema.json +31 -0
  268. package/providers/context/skills/configure-indexer-providers/SKILL.md +58 -0
  269. package/providers/context/skills/prepare-indexer-customization-project/SKILL.md +31 -0
  270. package/providers/context/skills/propose-indexer-customization/SKILL.md +40 -0
  271. package/providers/context/skills/revise-index-output/SKILL.md +12 -0
  272. package/providers/context/skills/run-indexer-agent-step/SKILL.md +20 -0
  273. package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +21 -0
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: context-markdown-indexer
3
+ description: Context-managed Provider for evidence-bound document knowledge. Use only when the Context Indexer lifecycle selects this Provider, not as a standalone workflow.
4
+ metadata:
5
+ context-role: "indexer-provider"
6
+ context-public-entry: "false"
7
+ context-provider-version: "1.0.0"
8
+ ---
9
+
10
+ # Context Markdown Indexer
11
+
12
+ Provider authors must satisfy
13
+ `node_modules/@c4a/context/docs/guides/markdown-indexer-skill-authoring.md` and
14
+ the shared Provider/customization guide before publishing or extending this
15
+ Skill. Those documents are authoring contracts; the current captured evidence,
16
+ workset and Route remain execution authority.
17
+
18
+ Use this Provider only through the Context Indexer lifecycle. Context supplies exact captured sources, profile authority, worksets, and evidence views; the Provider does not read arbitrary workspace paths or write approved knowledge directly.
19
+
20
+ The machine-readable authority is `context-indexer.yaml`. Context materializes the detailed guidance only after verifying this Bundle's release identity and complete file ledger.
@@ -0,0 +1,147 @@
1
+ protocol: context.indexer.provider/v1
2
+ id: context-markdown-indexer
3
+ version: 1.0.0
4
+ domains: [markdown]
5
+
6
+ activation:
7
+ target_kinds: [document, document-set, documentation-site]
8
+ required_signals:
9
+ - id: captured-document
10
+ description: The registered target scope contains a current captured Markdown or structured document snapshot.
11
+ supporting_signals:
12
+ - id: explicit-audience
13
+ description: The source identifies a reader, task, policy, decision, procedure, or reference boundary.
14
+ - id: cross-source-evidence
15
+ description: The readable scope contains current corroborating material for unresolved claims.
16
+ negative_signals:
17
+ - id: transient-conversation
18
+ description: The material is an unapproved transient conversation without a durable source identity.
19
+ agent_questions:
20
+ - Which reader goal and authority apply to each source-backed Section?
21
+
22
+ provides:
23
+ profiles:
24
+ - domain-reference
25
+ - product-requirements
26
+ - technical-guide
27
+ - user-and-developer-guide
28
+ - public-api-reference
29
+ - runbook
30
+ - faq-support
31
+ - standard-policy
32
+ - decision-record
33
+ - incident-review
34
+ - test-validation
35
+ - release-migration-guide
36
+ - documentation-site
37
+ operations:
38
+ - id: main-index
39
+ consumes: context.indexer.main-workset/v1
40
+ produces: context.indexer.main-result/v1
41
+ accepts_layer_fragments: [fact-enrichment, template-variables]
42
+ - id: material-answer
43
+ consumes: context.indexer.material-question-workset/v1
44
+ produces: context.indexer.material-answer-result/v1
45
+ supported_evidence_kinds: [contract, configuration, documentation, runbook, decision-record, test-result, runtime-observation, tool-snapshot]
46
+ accepts_layer_fragments: [fact-enrichment]
47
+ source_roles: [authoritative-document, supporting-document, operational-document, decision-record]
48
+ logical_units:
49
+ - id: reader-subject
50
+ identity: canonical-subject-key
51
+ artifacts:
52
+ recommended: [content]
53
+ supported_policy_variants: [standard]
54
+
55
+ provider:
56
+ instructions:
57
+ - path: references/indexer.md
58
+ profiles:
59
+ - domain-reference
60
+ - product-requirements
61
+ - technical-guide
62
+ - user-and-developer-guide
63
+ - public-api-reference
64
+ - runbook
65
+ - faq-support
66
+ - standard-policy
67
+ - decision-record
68
+ - incident-review
69
+ - test-validation
70
+ - release-migration-guide
71
+ - documentation-site
72
+ - path: references/classification.md
73
+ profiles:
74
+ - domain-reference
75
+ - product-requirements
76
+ - technical-guide
77
+ - user-and-developer-guide
78
+ - public-api-reference
79
+ - runbook
80
+ - faq-support
81
+ - standard-policy
82
+ - decision-record
83
+ - incident-review
84
+ - test-validation
85
+ - release-migration-guide
86
+ - documentation-site
87
+ - path: references/structure-and-artifacts.md
88
+ profiles:
89
+ - domain-reference
90
+ - product-requirements
91
+ - technical-guide
92
+ - user-and-developer-guide
93
+ - public-api-reference
94
+ - runbook
95
+ - faq-support
96
+ - standard-policy
97
+ - decision-record
98
+ - incident-review
99
+ - test-validation
100
+ - release-migration-guide
101
+ - documentation-site
102
+ - path: references/semantic-planning.md
103
+ profiles:
104
+ - domain-reference
105
+ - product-requirements
106
+ - technical-guide
107
+ - user-and-developer-guide
108
+ - public-api-reference
109
+ - runbook
110
+ - faq-support
111
+ - standard-policy
112
+ - decision-record
113
+ - incident-review
114
+ - test-validation
115
+ - release-migration-guide
116
+ - documentation-site
117
+ - path: references/editorial-policy.md
118
+ profiles:
119
+ - domain-reference
120
+ - product-requirements
121
+ - technical-guide
122
+ - user-and-developer-guide
123
+ - public-api-reference
124
+ - runbook
125
+ - faq-support
126
+ - standard-policy
127
+ - decision-record
128
+ - incident-review
129
+ - test-validation
130
+ - release-migration-guide
131
+ - documentation-site
132
+ forbidden_fallbacks: [whole-document-single-classification, unsupported-section-publication, inferred-authority]
133
+ completion_checks: [section-disposition-closure, source-authority-binding, material-gap-closure]
134
+
135
+ customization:
136
+ supports: [config, instructions-append, template-override, program-extend]
137
+
138
+ quality_guidance:
139
+ metric_ids:
140
+ - inventory-disposition-coverage
141
+ - duplicated-fact-target-ratio
142
+ - narrative-enumeration-ratio
143
+ - normalized-template-repetition-ratio
144
+ - implementation-body-ratio
145
+ - reference-only-reader-targets
146
+ - unresolved-ordinal-partitions
147
+ - discretionary-artifacts-per-logical-unit
@@ -0,0 +1,63 @@
1
+ # Section classification and projection intent
2
+
3
+ Classify evidence at Section granularity. A profile describes the source family;
4
+ it does not force one whole document into one reader purpose. For every emitted
5
+ Section, choose the semantic `document_kind`, `reader_goal`, and
6
+ `artifact_kind` before grouping Sections into Artifacts.
7
+
8
+ Use body evidence, source authority, audience, and the reader task. File names,
9
+ URLs, headings, navigation labels, and the selected profile are hints, not proof
10
+ that every Section has the same intent. Do not infer authority from polished
11
+ language or an official-looking path.
12
+
13
+ ## Canonical projection vocabulary
14
+
15
+ The current community Markdown profiles use the following semantic intents.
16
+ The CLI profile contract owns their stable storage projection; this table does
17
+ not authorize a collection or output path.
18
+
19
+ | Profile or Section family | Use when the evidence primarily… | `document_kind` | `reader_goal` | `artifact_kind` |
20
+ | --- | --- | --- | --- | --- |
21
+ | `domain-reference` | defines a durable domain, vocabulary, boundary, or business concept | `domain-reference` | `understand-domain` | `content` |
22
+ | `product-requirements` | states product intent, behavior, scope, actors, or acceptance needs | `product-requirements` | `understand-product-intent` | `content` |
23
+ | `technical-guide` | explains architecture, runtime behavior, interfaces, or design constraints | `technical-guide` | `understand-technical-design` | `content` |
24
+ | user/developer product guidance | explains a user-visible capability or product behavior | `product-requirements` | `understand-product-intent` | `content` |
25
+ | user/developer technical guidance | explains implementation-facing design or integration context | `technical-guide` | `understand-technical-design` | `content` |
26
+ | user/developer task guidance | gives a repeatable task, setup, operation, or troubleshooting sequence | `task-guide` | `complete-reader-task` | `content` |
27
+ | public API contract | supports lookup of public operations, fields, compatibility, or examples | `public-api-reference` | `look-up-public-contract` | `content` |
28
+ | public contract policy | states normative compatibility or usage constraints around a public contract | `public-contract-policy` | `follow-public-contract-policy` | `content` |
29
+ | `runbook` | directs operation, diagnosis, mitigation, recovery, or rollback | `runbook` | `operate-or-recover-system` | `content` |
30
+ | `faq-support` | answers a durable reader question with reusable evidence | `faq-support` | `resolve-reader-question` | `content` |
31
+ | `standard-policy` | defines a stable rule, standard, policy, or compliance boundary | `standard-policy` | `follow-standard-or-policy` | `content` |
32
+ | `decision-record` | records alternatives, a choice, rationale, and consequences | `decision-record` | `understand-decision-and-tradeoffs` | `content` |
33
+ | `incident-review` | records impact, timeline, cause, response, and follow-up learning | `incident-review` | `learn-from-incident` | `content` |
34
+ | `test-validation` | defines or reports verification, acceptance, or observed results | `test-validation` | `verify-behavior-or-acceptance` | `content` |
35
+ | release explanation | explains what changed, compatibility, or release impact | `release-guide` | `understand-release-change` | `content` |
36
+ | migration procedure | tells a reader how to migrate, verify, and recover | `migration-guide` | `complete-migration` | `content` |
37
+
38
+ `documentation-site` is an umbrella router. Apply the matching row above to
39
+ each source-backed Section; do not invent a site-wide projection intent and do
40
+ not collapse a multi-document site to one classification.
41
+
42
+ ## Classification order
43
+
44
+ 1. Establish the Section's current source authority and audience from the
45
+ authorized evidence view.
46
+ 2. State the concrete question the Section enables a reader to answer or task
47
+ it enables them to complete.
48
+ 3. Choose the narrowest matching `document_kind` and `reader_goal` pair from
49
+ the current profile contract.
50
+ 4. Use `artifact_kind: content` for the current community Markdown Bundle. Do
51
+ not invent a specialized Artifact kind unless the supplied profile contract
52
+ explicitly registers it.
53
+ 5. Return the intent on every actual or template-projected Section. Do not put
54
+ a collection, directory, filename, or package root in the Result.
55
+
56
+ When a Section mixes multiple reader tasks, split it along continuous evidence
57
+ boundaries. Keep one Section only when the material forms one coherent answer
58
+ for one reader goal. A heading change alone does not require a split, and a
59
+ shared heading does not justify combining unrelated tasks.
60
+
61
+ If no registered intent fits, return a material/capability disposition instead
62
+ of selecting the nearest label. Unsupported or authority-ambiguous material
63
+ must not become a reader Artifact.
@@ -0,0 +1,106 @@
1
+ # Section editorial policy
2
+
3
+ Apply editorial decisions to one source-backed Section at a time. A signal is a
4
+ review lead with a recommended outcome; it is not authority to change facts,
5
+ cross Section boundaries, or discard evidence. Preserve exact links, code,
6
+ commands, identifiers, numbers, conditions, attachments, and source meaning.
7
+
8
+ The community policy owns scenario interpretation and revision guidance. The
9
+ Context plan may also report syntax, protected-value, or safety-baseline
10
+ signals. Use the same decision discipline for both, while leaving detection,
11
+ source spans, stale checks, protected values, revision persistence, and final
12
+ validation to Context.
13
+
14
+ ## Signal catalog
15
+
16
+ | Signal | Meaning in the current Section | Confidence | Recommended outcome | Eligible omission reason |
17
+ | --- | --- | --- | --- | --- |
18
+ | `unanswered-question-set` | Multiple reader questions have no answer, decision, or next action. | `review` | `omit` only when the Section is only the unresolved question set; otherwise separate the supported material. | `unanswered-question` |
19
+ | `answered-question-set` | Multiple questions already have source-backed answers. | `review` | `reshape` as a concise FAQ without deleting answers. | none |
20
+ | `empty-table-row` | A reader-visible table row carries no value. | `high` | `repair` the table structure. | none |
21
+ | `placeholder-content` | The Section contains only placeholder material. | `high` | `omit` the non-knowledge Section. | `empty-or-placeholder` |
22
+ | `wide-table` | A table combines many columns with complex cells. | `high` | `reshape` into a short index and evidence-preserving details. | none |
23
+ | `long-table-cell` | A table cell contains prose that no longer works as a lookup value. | `high` | `reshape` without summarizing away facts. | none |
24
+ | `raw-or-unlabeled-link` | A destination is shown without a descriptive reader label. | `high` | `repair` the label or surrounding sentence while preserving the destination exactly. | none |
25
+ | `adjacent-links` | Neighboring links do not explain their relationship. | `high` | `repair` the separator or labels without changing destinations. | none |
26
+ | `volatile-query-url` | A destination appears session-, signature-, token-, or time-bound. | `review` | `request-input` unless current evidence proves a stable destination or the signal is a false positive. | none |
27
+ | `strikethrough-only-block` | The Section contains only obsolete-looking struck-through material and no replacement. | `review` | `omit` when it has no continuing historical reader value. | `obsolete-without-replacement` |
28
+ | `brainstorm-without-decision` | Proposals or open considerations appear without a recorded decision. | `review` | `omit` only the decision-free draft; do not infer an answer. | `draft-without-decision` |
29
+ | `duplicate-fragment` | Equivalent reader-visible content already has a canonical source-backed representation. | `high` | `omit` the duplicate only after authority, lifecycle, and meaning are proved equivalent. | `duplicate-content` |
30
+ | `unstable-owner-reference` | The Section appears to depend on a named individual rather than a durable responsibility. | `review` | `request-input`, or `keep` only when Section evidence proves the label is a stable role and the signal is a false positive. | none |
31
+ | `sensitive-value-candidate` | Authorized evidence contains a credential-shaped or sensitive value candidate. | `review` | `request-input`; never reproduce a secret-like example in guidance or output. | none |
32
+ | `heading-hierarchy-invalid` | Heading levels do not form a valid reader hierarchy. | `high` | `repair` headings without changing Section meaning. | none |
33
+ | `heading-content-overloaded` | A heading contains link inventory or body content. | `high` | `repair` by moving details into the Section body. | none |
34
+ | `markdown-syntax-damaged` | Reader Markdown is structurally incomplete or malformed. | `high` | `repair` the syntax before publication. | none |
35
+ | `conversion-artifact` | Source-conversion annotations remain reader visible. | `high` | `omit` only the conversion residue. | `conversion-artifact` |
36
+ | `mixed-facts-and-draft` | Stable statements and unresolved draft material are mixed together. | `review` | `reshape` to preserve supported facts and isolate the unresolved part. | none |
37
+
38
+ Compact tables, answered limitations with impact and action, deprecations with
39
+ a current replacement, and historical evidence with continuing reader value
40
+ are knowledge. Do not omit them merely because a nearby signal name appears to
41
+ fit. File length, page count, deadline, or effort never changes the outcome.
42
+
43
+ ## Outcomes
44
+
45
+ - `keep`: use when there is no actionable signal, or for a `review` signal only
46
+ with a Section-specific assessment that proves a false positive or explains
47
+ why the proposed edit would damage source fidelity.
48
+ - `repair`: make a local presentation correction without changing facts or
49
+ protected values.
50
+ - `reshape`: reorganize the same supported material without broadening,
51
+ narrowing, or summarizing away its evidence.
52
+ - `omit`: remove only an explicitly eligible non-knowledge fragment with the
53
+ exact omission reason supplied by the plan.
54
+ - `request-input`: pause for information that cannot be recovered from the
55
+ authorized Section or evidence view. It is an outcome, not a silent `keep`.
56
+
57
+ Resolve safe actions across the complete current workset. A large batch is not
58
+ a reason to default to `keep`, skip a Section, or lower the quality standard.
59
+ In managed operation, complete every independently safe action without adding a
60
+ routine review pause. Managed authority does not lower these rules and does not
61
+ turn genuinely missing input into `keep`; ask once for the remaining batched
62
+ input after completing the independent analysis.
63
+
64
+ ## Assessment contract
65
+
66
+ An assessment is required only when keeping a reported `review` signal or when
67
+ a repaired/reshaped result retains a review signal after rescan. It must:
68
+
69
+ 1. be Section-specific rather than copied across a batch;
70
+ 2. name every remaining signal code;
71
+ 3. cite concrete source evidence for a false positive, or state the exact
72
+ source fidelity loss the recommended edit would cause;
73
+ 4. explicitly say `false-positive` for a kept `request-input` signal;
74
+ 5. never cite time, cost, effort, workload, batch size, deadline, or progress.
75
+
76
+ A `high` signal cannot be justified by assessment and kept unchanged; it must
77
+ be resolved. A Section without a signal can be kept without an assessment.
78
+ Every repair or reshape is subject to the same post-revision signal scan and
79
+ protected-value validation; selecting an action is not proof of resolution.
80
+
81
+ ## Anonymous decision examples
82
+
83
+ - Two unanswered planning questions with no decision: choose `omit` with
84
+ `unanswered-question`; never invent the answers.
85
+ - Two source-backed question/answer pairs: choose `reshape` into an FAQ and
86
+ retain both answers and their evidence.
87
+ - A compact two-column lookup table: choose `keep`; width alone is not a
88
+ `wide-table` signal.
89
+ - A five-column table containing long links and prose: choose `reshape` into an
90
+ index plus details while preserving destinations and values.
91
+ - `Owner: platform-operations` where the same Section defines that string as a
92
+ durable role: `keep` may be justified with
93
+ `unstable-owner-reference: false-positive because the source defines a stable responsibility`.
94
+ - A signed or expiring destination with no stable replacement in evidence:
95
+ choose `request-input`; do not copy its sensitive query value into the
96
+ assessment.
97
+ - A current rule followed by an undecided proposal: choose `reshape`, retain
98
+ the rule, and isolate the proposal rather than omitting the whole Section.
99
+ - Struck-through text that is the only surviving historical record may be kept
100
+ only with a Section-specific `strikethrough-only-block` assessment explaining
101
+ the exact source fidelity loss; ordinary obsolete-only prose should be
102
+ omitted.
103
+
104
+ Before returning a decision, confirm every Section has one outcome, every kept
105
+ signal has a valid assessment, every omission has an eligible reason, and no
106
+ revision changes authority, evidence, identity, or protected values.
@@ -0,0 +1,23 @@
1
+ # Markdown Indexer authoring contract
2
+
3
+ Classify and author at the source-backed Section level. A document profile describes reader intent; it is not an output directory. Mixed documents may contain Sections with different reader goals, but every Section must retain one stable subject, owner, source authority, and projection intent.
4
+
5
+ Use `classification.md` as the semantic source for `document_kind`, `reader_goal`, and current `artifact_kind` selection. Use `structure-and-artifacts.md` for mixed-document routing, Section-versus-Artifact promotion, density, duplicate/conflict handling, and target candidate resolution. The CLI-supplied profile contract remains the only authority for collection and path projection.
6
+
7
+ Use `semantic-planning.md` for evidence authority, SubjectKey/target-resolution
8
+ judgment, relation and structured-claim gates, content-purpose precision, and
9
+ stale/collision recovery behavior. It adapts the useful semantic gates from the
10
+ former align path to the current Result ABI; it does not authorize legacy align
11
+ commands or `context.structure.v1`.
12
+
13
+ Use `editorial-policy.md` for scenario editorial signals, recommended outcomes, Section-specific assessments, omission eligibility, and anonymous decision examples. Context still owns signal spans, protected values, revision CAS/storage, rescans, and final validation.
14
+
15
+ Preserve exact commands, identifiers, links, attachments, tables, and code blocks when they are evidence-bearing. Separate deterministic catalogs from explanation. Do not publish unsupported claims, conversion annotations, placeholders, or unresolved requests as knowledge.
16
+
17
+ When current source material cannot answer a required canonical question, return the exact material-question disposition for the supplied target. Answers may use only authorized evidence kinds and spans. Context owns review, layout, collection mapping, material-gap persistence, quality thresholds, and final close.
18
+
19
+ Follow the operation in the supplied run request. For `main-index`, return only the current `IndexerResult`/`ArtifactResult` contract; Context derives the exact source-span, selected-fact, logical-unit, Artifact, and negative group-input dependencies from that result. For `material-answer`, return only `context.indexer.material-answer-result/v1`. Each binding must echo one eligible `question_key`, its exact `question_revision_digest`, and canonical evidence claims containing only `kind`, authorized `source_ref`, normalized `source_spans`, and the current content `evidence_digest`. Do not return reader prose, an answer body, source-origin/input identities, an `EvidenceItemRef`, a future Artifact/Section identity, or an actualization. Context canonicalizes evidence, performs the limited Review, derives a body-free planned answer from the approved binding, and maps its supplied answer landing after layout.
20
+
21
+ Never create a legacy `MarkdownCollectionSlice` or invoke the independent `alignProse` phase. Never mix `main-index` and `material-answer` output.
22
+
23
+ Do not return output paths, collection names, arbitrary question text, new authority, or pass/fail claims.
@@ -0,0 +1,146 @@
1
+ # Evidence, subject, and claim planning
2
+
3
+ Use these rules while producing the operation selected by the current run
4
+ request. For the current `main-index` `ArtifactResult`, apply every rule below. For
5
+ `material-answer`, produce only evidence claims for eligible questions; the
6
+ question identity, landing, canonical evidence items, planned-answer projection
7
+ and post-layout actualization remain Context-owned. These rules preserve the
8
+ useful semantic judgments from the former classification and align path without
9
+ restoring `context.structure.v1`, collection selection, or a second write
10
+ workflow. Context remains the authority for schemas, SubjectKey normalization,
11
+ identities, paths, collisions, stale state, layout changes, Review, and
12
+ publication.
13
+
14
+ ## Evidence and authority
15
+
16
+ Read every authorized evidence item required by the current workset before
17
+ making a source-wide decision. A file name, URL, title, heading, navigation
18
+ label, polished wording, profile id, or example is a navigation signal, not
19
+ proof of subject identity, authority, or reader intent.
20
+
21
+ Use only current source roles, evidence bindings, target-resolution views, and
22
+ question targets supplied with the workset. Supporting or context-only material
23
+ may guide investigation but cannot become a cited Section or structured claim
24
+ unless the current authority makes it eligible. Preserve exact identifiers,
25
+ commands, links, numbers, conditions, code, and source-authored uncertainty.
26
+
27
+ Positive example: a Section is classified from its complete requirement text
28
+ and stated audience. Negative example: a document is classified as a runbook
29
+ only because its path contains `ops/`.
30
+
31
+ ## Subject boundary
32
+
33
+ The primary logical-unit SubjectKey is fixed by the workset. Do not replace it
34
+ with a title-derived key. When Context supplies target-resolution entries,
35
+ close every entry with exactly one current disposition:
36
+
37
+ - `reuse-existing` only for an exact evidence-supported subject match;
38
+ - `create-independent` only when evidence establishes a distinct durable
39
+ subject and separate reader value under a permitted SubjectKey schema;
40
+ - `request-material` when a semantic decision is possible but identity facts
41
+ or authority are insufficient;
42
+ - `unsupported` when the required parser, evidence kind, or capability is not
43
+ available.
44
+
45
+ Treat local material as a Section before proposing an independent subject or
46
+ Artifact. A heading, table row, FAQ label, warning, short example, relationship
47
+ phrase, or one-off conclusion does not establish independent identity. A
48
+ concrete product or technical object, an atomic term, a repeatable process with
49
+ source-backed steps and outcome, or a real grouping scope with supported child
50
+ subjects may justify a separate subject when the current schema permits it.
51
+
52
+ Positive examples include an independently named service with its own contract,
53
+ or a repeatable recovery procedure with actors, steps, outcome, and standalone
54
+ retrieval value. Negative examples include “component usage” as one sentence,
55
+ “three modes” as a parallel list, a navigation-only placeholder, or “X impact
56
+ on Y” without an independent referent. Keep those as Sections, registered
57
+ questions, or unresolved target decisions as appropriate.
58
+
59
+ Titles and headings are evidence, not identity. Keep reader-facing labels in
60
+ the authored content; do not invent aliases, slugs, collections, containment,
61
+ or paths to force a match. A subject shaped like a grouping scope needs current
62
+ supported child identities. A process-shaped subject needs actual process
63
+ evidence, not merely a word such as “flow”, “migration”, or “strategy”.
64
+
65
+ ## Section and Artifact planning
66
+
67
+ Apply `classification.md` and `structure-and-artifacts.md` at Section scope.
68
+ Keep source-backed Sections continuous when possible. Split unrelated reader
69
+ tasks even under one heading; merge adjacent headings only when they form one
70
+ coherent answer with compatible projection intent. A dedicated Artifact must
71
+ clear the same independent reader-task and evidence-boundary test regardless of
72
+ content type.
73
+
74
+ Use density only to choose an inspection granularity. `macro`, `meso`, `micro`,
75
+ and `single-pass` never choose a SubjectKey, authority, projection intent, or
76
+ quality outcome.
77
+
78
+ ## Relation and structured-claim gate
79
+
80
+ Emit a structured claim only when its subject is authorized, its owner Section
81
+ exists, and the cited evidence in that same Section supports the claim kind.
82
+ Do not convert a vague “related” mention, shared table membership, name
83
+ similarity, containment, or endpoint-only evidence into a stronger relation.
84
+ When evidence conflicts and source precedence does not resolve it, preserve the
85
+ conflict in the supported diagnostic or material-question disposition instead
86
+ of selecting by file order, heading order, or polished wording.
87
+
88
+ Source-authored uncertainty belongs in the reader prose when it is material.
89
+ Do not use a confidence label to conceal Agent uncertainty, and do not invent a
90
+ structured field that the current schema does not expose. Missing endpoint,
91
+ ownership, or relation evidence must remain unresolved rather than becoming a
92
+ dangling claim.
93
+
94
+ Positive example: a cited Section explicitly states that one component consumes
95
+ another component's output, and both subjects are authorized. Negative example:
96
+ two components appear in one “See also” list, so the Indexer invents a runtime
97
+ dependency.
98
+
99
+ ## Content-purpose precision
100
+
101
+ Choose the narrowest registered Section projection intent. Preserve these
102
+ semantic boundaries when they apply:
103
+
104
+ - a decision needs alternatives or options, the selected path, and rationale;
105
+ - an incident review needs incident identity plus impact/timeline and cause,
106
+ response, mitigation, or follow-up evidence;
107
+ - a test/validation Section needs a checkable target, scenario, observation, or
108
+ acceptance result;
109
+ - a standard/policy Section needs a stable normative rule or constraint;
110
+ - a task or migration guide needs a reader action, verification, and relevant
111
+ recovery boundary;
112
+ - an example is literal sample material, not ordinary scenario prose;
113
+ - a comparison distinguishes at least two subjects across meaningful
114
+ dimensions.
115
+
116
+ If the registered vocabulary cannot express the evidence, return a material or
117
+ capability disposition. Do not use a broad narrative label merely to avoid the
118
+ missing-intent path.
119
+
120
+ ## Duplicate, deletion, and recovery rules
121
+
122
+ Collapse duplicate statements only when their subject, authority, reader task,
123
+ and evidence boundary are the same. Preserve separate Sections when authority,
124
+ lifecycle, reader task, or evidence boundary differs. Omit material only under
125
+ the eligible reasons in `editorial-policy.md`; an answered question, actionable
126
+ limitation, replacement-bearing deprecation, source-backed decision, or
127
+ recovery instruction remains knowledge.
128
+
129
+ On an ambiguous target, return the current unresolved/material disposition. On
130
+ a stale workset, digest mismatch, schema mismatch, collision, or forged layout,
131
+ stop and use the fresh Context route; do not repair the failure by changing a
132
+ semantic label, inventing an alias, or hand-authoring a path. A destructive or
133
+ ambiguous layout change is handled by Context's conditional human Gate. A
134
+ non-destructive addition does not create a review pause merely because it is
135
+ new.
136
+
137
+ If the same current semantic quality problem survives three accepted revision
138
+ attempts, keep already-passing Sections intact and request one aggregated piece
139
+ of content-organization, source-fidelity, or missing-material guidance. Retry
140
+ history and assessments are runtime audit data, never reader knowledge.
141
+
142
+ Before returning the Result, verify that every required evidence item and
143
+ target-resolution entry has a disposition, every Section has one current
144
+ projection intent and evidence boundary, every claim is owned and cited, every
145
+ duplicate/conflict decision is explicit, and no collection, path, temporary
146
+ identity, placeholder, or unsupported claim appears in the Result.
@@ -0,0 +1,109 @@
1
+ # Structure, Artifact promotion, and candidate resolution
2
+
3
+ Plan reader output from source-backed Sections outward. Headings and files are
4
+ navigation aids; the stable unit is the reader subject plus its evidence-bound
5
+ Sections. Context owns identity derivation, schema validation, layout, paths,
6
+ conflict detection, Review, and publication.
7
+
8
+ ## Section first, Artifact when justified
9
+
10
+ Keep a candidate as a Section by default. A heading, table row, FAQ label,
11
+ single warning, short example, or local subtopic is not independently a reader
12
+ Artifact merely because it has a title.
13
+
14
+ Record the semantic boundary decision in conformance reasoning as
15
+ `retain-section-group` or `promote-reader-artifact`; these are fixture and
16
+ guidance labels, not extra fields in `ArtifactResult`.
17
+
18
+ Promote source material to a dedicated Artifact when evidence supports at least
19
+ one of these boundaries:
20
+
21
+ - it serves a distinct reader task or projection intent from adjacent material;
22
+ - it is independently retrievable outside the surrounding page and carries
23
+ enough context to answer that task without the parent prose;
24
+ - it has its own authority, lifecycle, owner, timeline, or cross-cutting scope;
25
+ - it is a coherent, substantial unit whose inclusion would make the surrounding
26
+ Artifact mix unrelated reader purposes;
27
+ - another Section in the proposed Artifact has an incompatible projection
28
+ intent under the current CLI profile contract.
29
+
30
+ Do not promote solely because the source has many headings, a recognized label,
31
+ or a long table. Do not create thin Artifacts to improve counts. If material has
32
+ an independent subject rather than merely a separate reader page, use the
33
+ workset's target-resolution choices; never invent a Node identity from a title.
34
+
35
+ Within one Artifact, every Section must use that Artifact's `artifact_kind`.
36
+ Start by grouping only Sections with the same exact
37
+ `document_kind + reader_goal + artifact_kind` intent. Different intents may be
38
+ combined only when the current CLI-provided contract proves they share one
39
+ layout destination and the combined page remains one coherent reader task. If
40
+ the contract would project them differently, return separate Artifacts; do not
41
+ return a path or ask Context to move Sections silently.
42
+
43
+ ## Reading density
44
+
45
+ Density is a private reading and planning strategy, not Result metadata, a
46
+ quality score, or a separate stage.
47
+
48
+ | Mode | Use when | Authoring behavior |
49
+ | --- | --- | --- |
50
+ | `macro` | A long source has many major headings or broad topic shifts. | Establish major reader-task boundaries first, then inspect each boundary before producing Sections. |
51
+ | `meso` | A normal guide or record has several related sections. | Use meaningful local units and preserve precise evidence spans; this is the default. |
52
+ | `micro` | Material is fragmented, note-like, or dense with short independent claims. | Keep evidence windows narrow and avoid bundling unrelated claims into one Section. |
53
+ | `single-pass` | A short coherent source can be read completely within the supplied budget. | Avoid over-segmentation while still closing every evidence disposition. |
54
+
55
+ Markdown headings are planning hints, not hard boundaries. Sibling headings can
56
+ remain together when they form one coherent reader answer. Unrelated headings
57
+ must split even if a common parent exists. Density never chooses authority,
58
+ identity, projection intent, or pass/fail status.
59
+
60
+ ## Candidate resolution
61
+
62
+ Treat CLI anomaly and existing-target views as constraints on a semantic
63
+ decision, not as automatic recommendations. For each candidate, choose one
64
+ evidence-backed outcome:
65
+
66
+ - `accept-correction`: the diagnostic identifies a real ownership, grouping,
67
+ projection, or evidence error; return the corrected Result.
68
+ - `dismiss-with-rationale`: the signal is mechanically true but the current
69
+ grouping remains semantically coherent; preserve the Result and state the
70
+ source-backed rationale in the supplied diagnostic surface.
71
+ - `keep-unresolved`: evidence cannot distinguish valid alternatives; return the
72
+ registered material question, target-resolution, unsupported, or diagnostic
73
+ disposition instead of guessing.
74
+
75
+ For duplicates, keep one canonical statement when evidence and reader purpose
76
+ are the same. Preserve separate Sections only when each has a distinct
77
+ authority, lifecycle, reader task, or evidence boundary. For conflicting facts,
78
+ do not pick a winner from file order, heading order, recency without authority,
79
+ or polished wording. Use source precedence supplied by the workset; otherwise
80
+ keep the conflict unresolved.
81
+
82
+ When the workset offers target-resolution entries:
83
+
84
+ - reuse an existing subject only for an exact evidence-supported match;
85
+ - create an independent subject only when the evidence supports standalone
86
+ identity and reader value;
87
+ - request material when the semantic decision is possible but evidence is
88
+ insufficient;
89
+ - return unsupported when the required parser or capability is absent.
90
+
91
+ The CLI validates subject keys, refs, schema, digests, collision rules, stale
92
+ state, and output layout. Do not repair those mechanical failures by changing a
93
+ semantic label, creating an alias, or returning a hand-authored path.
94
+
95
+ ## Result check
96
+
97
+ Before returning an `ArtifactResult`, confirm:
98
+
99
+ - every actual Section has one registered projection intent and current
100
+ evidence;
101
+ - mixed reader intents were evaluated Section by Section;
102
+ - every dedicated Artifact clears an evidence-backed promotion boundary;
103
+ - every Artifact contains only layout-compatible Sections and one Artifact
104
+ kind;
105
+ - density affected only reading granularity, not authority or quality claims;
106
+ - duplicates, conflicts, and ambiguous targets have an explicit semantic
107
+ disposition;
108
+ - no collection, path, temporary batch identity, or unsupported claim appears
109
+ in the Result.
@@ -0,0 +1,31 @@
1
+ {
2
+ "protocol": "context.indexer.authoring-fixture/v1",
3
+ "id": "anonymous-technical-guide",
4
+ "anonymized": true,
5
+ "profile": "technical-guide",
6
+ "source_role": "authoritative-document",
7
+ "logical_unit_id": "reader-subject",
8
+ "logical_unit_ref": "node:anonymous-technical-guide",
9
+ "canonical_facts": {
10
+ "target": {
11
+ "eligible": true
12
+ }
13
+ },
14
+ "artifact_policy_variant": "standard",
15
+ "artifacts": [
16
+ {
17
+ "artifact_id": "guide",
18
+ "artifact_kind": "content",
19
+ "purpose": "required",
20
+ "reader_question_refs": [
21
+ "question:source-authority"
22
+ ],
23
+ "evidence_refs": [
24
+ "evidence:anonymous-guide-source"
25
+ ]
26
+ }
27
+ ],
28
+ "evidence_refs": [
29
+ "evidence:anonymous-guide-source"
30
+ ]
31
+ }